]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.1.10/scsi-mpt2sas-release-spinlock-for-the-raid-device-list-before-blocking-it.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.10 / scsi-mpt2sas-release-spinlock-for-the-raid-device-list-before-blocking-it.patch
1 From 30c43282f3d347f47f9e05199d2b14f56f3f2837 Mon Sep 17 00:00:00 2001
2 From: "nagalakshmi.nandigama@lsi.com" <nagalakshmi.nandigama@lsi.com>
3 Date: Thu, 1 Dec 2011 07:52:56 +0530
4 Subject: SCSI: mpt2sas: Release spinlock for the raid device list before blocking it
5
6 From: "nagalakshmi.nandigama@lsi.com" <nagalakshmi.nandigama@lsi.com>
7
8 commit 30c43282f3d347f47f9e05199d2b14f56f3f2837 upstream.
9
10 Added code to release the spinlock that is used to protect the
11 raid device list before calling a function that can block. The
12 blocking was causing a reschedule, and subsequently it is tried
13 to acquire the same lock, resulting in a panic (NMI Watchdog
14 detecting a CPU lockup).
15
16 Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
17 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
19
20 ---
21 drivers/scsi/mpt2sas/mpt2sas_scsih.c | 7 ++++---
22 1 file changed, 4 insertions(+), 3 deletions(-)
23
24 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
25 +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
26 @@ -6564,6 +6564,7 @@ _scsih_mark_responding_raid_device(struc
27 } else
28 sas_target_priv_data = NULL;
29 raid_device->responding = 1;
30 + spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
31 starget_printk(KERN_INFO, raid_device->starget,
32 "handle(0x%04x), wwid(0x%016llx)\n", handle,
33 (unsigned long long)raid_device->wwid);
34 @@ -6574,16 +6575,16 @@ _scsih_mark_responding_raid_device(struc
35 */
36 _scsih_init_warpdrive_properties(ioc, raid_device);
37 if (raid_device->handle == handle)
38 - goto out;
39 + return;
40 printk(KERN_INFO "\thandle changed from(0x%04x)!!!\n",
41 raid_device->handle);
42 raid_device->handle = handle;
43 if (sas_target_priv_data)
44 sas_target_priv_data->handle = handle;
45 - goto out;
46 + return;
47 }
48 }
49 - out:
50 +
51 spin_unlock_irqrestore(&ioc->raid_device_lock, flags);
52 }
53