From 24996edce547fd981c089db9a12717fd76a51160 Mon Sep 17 00:00:00 2001 From: Sebastian Ott Date: Tue, 4 Sep 2012 19:37:51 +0200 Subject: [PATCH] s390/scm: reorder scm_remove Do not reset drvdata before the block device is cleaned up. With a non-empty block queue drvdata could be accessed. Signed-off-by: Sebastian Ott Signed-off-by: Martin Schwidefsky --- drivers/s390/block/scm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/block/scm_drv.c b/drivers/s390/block/scm_drv.c index 349966f6fc52..9fa0a908607b 100644 --- a/drivers/s390/block/scm_drv.c +++ b/drivers/s390/block/scm_drv.c @@ -52,8 +52,8 @@ static int scm_remove(struct scm_device *scmdev) { struct scm_blk_dev *bdev = dev_get_drvdata(&scmdev->dev); - dev_set_drvdata(&scmdev->dev, NULL); scm_blk_dev_cleanup(bdev); + dev_set_drvdata(&scmdev->dev, NULL); kfree(bdev); return 0; -- GitLab