]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jan 2013 04:46:28 +0000 (20:46 -0800)
commit0aa31f182374b77a4b704585605ee35a642826cf
tree8ebc3bd50f0579b17899495acc0c62172cc97f0c
parent27b2a263fa42cbad0fb33da2de30e4bbc380c43f
SCSI: sd: Reshuffle init_sd to avoid crash

commit afd5e34b2bb34881d3a789e62486814a49b47faa upstream.

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>
Cc: CAI Qian <caiqian@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/sd.c