diff options
author | Daniel Mack <zonque@gmail.com> | 2013-04-02 20:35:27 +0200 |
---|---|---|
committer | Daniel Mack <zonque@gmail.com> | 2013-04-02 20:35:27 +0200 |
commit | b0630abe69d52f63c5f7960bea6525081dbc3759 (patch) | |
tree | 5171d87688752313a2c011dab847b91209592329 | |
parent | c44afec9b6ff9dbb2d26d585772558c55bc5af7e (diff) | |
download | kdbus-bus-b0630abe69d52f63c5f7960bea6525081dbc3759.tar.gz kdbus-bus-b0630abe69d52f63c5f7960bea6525081dbc3759.tar.bz2 kdbus-bus-b0630abe69d52f63c5f7960bea6525081dbc3759.zip |
policy: hold lock on hash operations
-rw-r--r-- | policy.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -46,10 +46,12 @@ static void __kdbus_policy_db_free(struct kref *kref) container_of(kref, struct kdbus_policy_db, kref); int i; + mutex_lock(&db->entries_lock); hash_for_each_safe(db->entries_hash, i, tmp, e, hentry) { hash_del(&e->hentry); kfree(e); } + mutex_unlock(&db->entries_lock); kfree(db); } |