Messages in this thread Patch in this message | | | Subject | [PATCH 09/12] pps: fix device destruction ordering | From | Konstantin Khlebnikov <> | Date | Fri, 14 Dec 2012 15:02:59 +0400 |
| |
device_destroy() calls final kfree(), thus cdev_del() must be called before it. Catched as overwritten poison in kmalloc-512.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Rodolfo Giometti <giometti@enneenne.com> --- drivers/pps/pps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pps/pps.c b/drivers/pps/pps.c index 2420d5a..769bb84 100644 --- a/drivers/pps/pps.c +++ b/drivers/pps/pps.c @@ -352,8 +352,8 @@ free_idr: void pps_unregister_cdev(struct pps_device *pps) { - device_destroy(pps_class, pps->dev->devt); cdev_del(&pps->cdev); + device_destroy(pps_class, pps->dev->devt); } /*
| |