[PATCH] sd: Reshuffle init_sd to avoid crash

2012-10-10 Thread Hannes Reinecke
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

Re: [PATCH] sd: Reshuffle init_sd to avoid crash

2012-10-10 Thread James Bottomley
On Wed, 2012-10-10 at 10:36 +0200, Hannes Reinecke wrote: 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

Re: [PATCH] sd: Reshuffle init_sd to avoid crash

2012-10-10 Thread Hannes Reinecke
On 10/10/2012 11:55 AM, James Bottomley wrote: On Wed, 2012-10-10 at 10:36 +0200, Hannes Reinecke wrote: 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

Re: [PATCH] sd: Reshuffle init_sd to avoid crash

2012-10-10 Thread James Bottomley
On Wed, 2012-10-10 at 12:01 +0200, Hannes Reinecke wrote: On 10/10/2012 11:55 AM, James Bottomley wrote: On Wed, 2012-10-10 at 10:36 +0200, Hannes Reinecke wrote: 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