diff options
author | George Spelvin <linux@horizon.com> | 2013-02-12 07:27:20 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-28 13:38:31 (GMT) |
commit | 49626fbb0360332e40fd76a48cb2ba876d6134ad (patch) | |
tree | b6a4724d7f0bd9e13586ac5cd498bdf23b9397a4 /drivers/staging | |
parent | de43c8b10f40a8e5bda0a32c9a7edf779c5aac15 (diff) | |
download | linux-fsl-qoriq-49626fbb0360332e40fd76a48cb2ba876d6134ad.tar.xz |
pps: Fix a use-after free bug when unregistering a source.
commit d953e0e837e65ecc1ddaa4f9560f7925878a0de6 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>
Diffstat (limited to 'drivers/staging')
0 files changed, 0 insertions, 0 deletions