[SCSI] fix oops in all legacy host adapters caused by 6f381fa
authorJames Bottomley <jbottomley@parallels.com>
Fri, 4 May 2012 09:40:04 +0000 (09:40 +0000)
committerVarun Wadekar <vwadekar@nvidia.com>
Fri, 18 May 2012 10:39:34 +0000 (15:39 +0530)
commita54d369c4899d01f003eab3afe38ebe4a6845d86
treeb6308804a7fd87078549fa8d165d2f9f994230c9
parent3e3fa2930f8db79dfef977f94983c15a78c094e3
[SCSI] fix oops in all legacy host adapters caused by 6f381fa

Commit 6f381fa344911d5a234b13574433cf23036f9467
Author: Lin Ming <ming.m.lin@intel.com>

[SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue

Caused a regression where we oops in every legacy mode SCSI host driver
because they supply a NULL pointer to scsi_add_host().  Fix this by checking
for the NULL in scsi_add_host_with_dma() and changing the DMA device to being
the platform_bus in that case (which replicates the original behaviour).

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hosts.c