[SCSI] sd: Reshuffle init_sd to avoid crash
authorJoel D. Diaz <joeldiaz@us.ibm.com>
Wed, 10 Oct 2012 08:36:11 +0000 (10:36 +0200)
committerJames Bottomley <JBottomley@Parallels.com>
Tue, 27 Nov 2012 04:59:34 +0000 (08:59 +0400)
commitafd5e34b2bb34881d3a789e62486814a49b47faa
treee289c2ef0d8be9b007423e3c7eda3440e788092f
parent500c152afbafba2adcb23bb2e37b7138eb003b7f
[SCSI] sd: Reshuffle init_sd to avoid crash

scsi_register_driver will register a prep_fn() function, which
in turn migh need to use the sd_cdp_pool for DIF.
Which hasn't been initialised at this point, leading to
a crash. So reshuffle the init_sd() and exit_sd() paths
to have the driver registered last.

Signed-off-by: Joel D. Diaz <joeldiaz@us.ibm.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/sd.c