aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2011-04-05 17:20:50 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-14 13:02:13 -0700
commit91d6c1f8a77a4efec2543de434a924fdc3e6f5e1 (patch)
tree4ef40eab64ec61a9092ccdc5cfdc1d1d2536c7b1 /drivers/hid
parent8c00d8c60ad1c0221d47122f46ba0266add6ba84 (diff)
inotify: fix double free/corruption of stuct user
commit d0de4dc584ec6aa3b26fffea320a8457827768fc upstream. On an error path in inotify_init1 a normal user can trigger a double free of struct user. This is a regression introduced by a2ae4cc9a16e ("inotify: stop kernel memory leak on file creation failure"). We fix this by making sure that if a group exists the user reference is dropped when the group is cleaned up. We should not explictly drop the reference on error and also drop the reference when the group is cleaned up. The new lifetime rules are that an inotify group lives from inotify_new_group to the last fsnotify_put_group. Since the struct user and inotify_devs are directly tied to this lifetime they are only changed/updated in those two locations. We get rid of all special casing of struct user or user->inotify_devs. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hid')
0 files changed, 0 insertions, 0 deletions