summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorManoj Chourasia <mchourasia@nvidia.com>2013-07-22 15:33:13 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-14 06:44:19 -0700
commit7c5b2352dbd302fa2940973af841ba9be39502f6 (patch)
tree037d8c47fda2746cf8324bd50399ca7dd5434c86 /arch
parent30817a87476f44c2d4fe499b300b6ff0b703d527 (diff)
HID: hidraw: correctly deallocate memory on device disconnect
commit 212a871a3934beccf43431608c27ed2e05a476ec upstream. This changes puts the commit 4fe9f8e203f back in place with the fixes for slab corruption because of the commit. When a device is unplugged, wait for all processes that have opened the device to close before deallocating the device. This commit was solving kernel crash because of the corruption in rb tree of vmalloc. The rootcause was the device data pointer was geting excessed after the memory associated with hidraw was freed. The commit 4fe9f8e203f was buggy as it was also freeing the hidraw first and then calling delete operation on the list associated with that hidraw leading to slab corruption. Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com> Tested-by: Peter Wu <lekensteyn@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions