android_kernel_google_msm/drivers/pps
George Spelvin cd59fb1491 pps: Fix a use-after free bug when unregistering a source.
commit d953e0e837 upstream.

Remove the cdev from the system (with cdev_del) *before* deallocating it
(in pps_device_destruct, called via kobject_put from device_destroy).

Also prevent deallocating a device with open file handles.

A better long-term fix is probably to remove the cdev from the pps_device
entirely, and instead have all devices reference one global cdev.  Then
the deallocation ordering becomes simpler.

But that's more complex and invasive change, so we leave that
for later.

Signed-off-by: George Spelvin <linux@horizon.com>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Qiang Huang <h.huangqiang@huawei.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-14 06:44:17 -07:00
..
clients pps: Use pps_lookup_dev to reduce ldisc coupling 2014-04-14 06:44:17 -07:00
generators pps: remove unreachable code 2011-03-22 17:44:17 -07:00
kapi.c pps: default echo function 2011-11-02 16:07:02 -07:00
kc.c
kc.h
Kconfig Fix common misspellings 2011-03-31 11:26:23 -03:00
Makefile
pps.c pps: Fix a use-after free bug when unregistering a source. 2014-04-14 06:44:17 -07:00
sysfs.c