kernel-ark/drivers/pps
George Spelvin d953e0e837 pps: Fix a use-after free bug when unregistering a source.
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>
Cc: stable <stable@vger.kernel.org>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-13 09:40:35 -08:00
..
clients pps: Use pps_lookup_dev to reduce ldisc coupling 2013-02-13 09:40:35 -08: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 pps: add kernel consumer support 2011-01-13 08:03:21 -08:00
kc.h pps: add kernel consumer support 2011-01-13 08:03:21 -08:00
Kconfig pps, ptp: Remove dependencies on EXPERIMENTAL 2012-11-01 11:35:17 -04:00
Makefile pps: add parallel port PPS signal generator 2011-01-13 08:03:21 -08:00
pps.c pps: Fix a use-after free bug when unregistering a source. 2013-02-13 09:40:35 -08:00
sysfs.c