Skip to content

Commit 60b3e7b

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fix from James Bottomley: "This is a simple fix for a domain revalidation crash which has recently turned up in the libsas code (applies to mvsas, isc and aic94xx)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: libsas: Fix Kernel Crash in smp_execute_task
2 parents 0f0910a + 6302ce4 commit 60b3e7b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/scsi/libsas/sas_discover.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ static void sas_revalidate_domain(struct work_struct *work)
500500
struct sas_discovery_event *ev = to_sas_discovery_event(work);
501501
struct asd_sas_port *port = ev->port;
502502
struct sas_ha_struct *ha = port->ha;
503+
struct domain_device *ddev = port->port_dev;
503504

504505
/* prevent revalidation from finding sata links in recovery */
505506
mutex_lock(&ha->disco_mutex);
@@ -514,8 +515,9 @@ static void sas_revalidate_domain(struct work_struct *work)
514515
SAS_DPRINTK("REVALIDATING DOMAIN on port %d, pid:%d\n", port->id,
515516
task_pid_nr(current));
516517

517-
if (port->port_dev)
518-
res = sas_ex_revalidate_domain(port->port_dev);
518+
if (ddev && (ddev->dev_type == SAS_FANOUT_EXPANDER_DEVICE ||
519+
ddev->dev_type == SAS_EDGE_EXPANDER_DEVICE))
520+
res = sas_ex_revalidate_domain(ddev);
519521

520522
SAS_DPRINTK("done REVALIDATING DOMAIN on port %d, pid:%d, res 0x%x\n",
521523
port->id, task_pid_nr(current), res);

0 commit comments

Comments
 (0)