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 <khlebni...@openvz.org> Cc: Rodolfo Giometti <giome...@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); } /* -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/