From: Yinghai Lu <yinghai.lu@oracle.com>
To: "James E.J. Bottomley" <JBottomley@parallels.com>,
Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Cc: Kashyap Desai <kashyap.desai@lsi.com>,
Eric Moore <eric.moore@lsi.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mpt2sas: Fix null reference in recovery_delete_devices
Date: Thu, 10 Nov 2011 08:05:26 -0800 [thread overview]
Message-ID: <4EBBF646.8010705@oracle.com> (raw)
Got panic:
[ 752.590700] BUG: unable to handle kernel NULL pointer dereference at 00000000000000f6
[ 752.598542] IP: [<ffffffff8160b5f3>] mpt2sas_scsih_reset_handler+0x168/0x183
[ 752.605595] PGD 175d43067 PUD 175d44067 PMD 0
[ 752.610081] Oops: 0002 [#1] SMP
[ 752.613342] CPU 0
[ 752.615175] Modules linked in:
[ 752.618428]
[ 752.619921] Pid: 9187, comm: sas2flash Not tainted 3.2.0-rc1-tip-yh-01580-g878f195-dirty #1288 Oracle Corporation Sun Blade
[ 752.632632] RIP: 0010:[<ffffffff8160b5f3>] [<ffffffff8160b5f3>] mpt2sas_scsih_reset_handler+0x168/0x183
it turns out it is introduced in
_scsih_error_recovery_delete_devices() forget to alloc the event before using.
It is introduced by:
| commit 921cd8024b908f8f49f772c8d3a02381b4db2ed2
| Author: nagalakshmi.nandigama@lsi.com <nagalakshmi.nandigama@lsi.com>
| Date: Wed Oct 19 15:36:26 2011 +0530
|
| [SCSI] mpt2sas: New feature - Fast Load Support
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 3 +++
1 file changed, 3 insertions(+)
Index: linux-2.6/drivers/scsi/mpt2sas/mpt2sas_scsih.c
===================================================================
--- linux-2.6.orig/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ linux-2.6/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -2802,6 +2802,9 @@ _scsih_error_recovery_delete_devices(str
if (ioc->is_driver_loading)
return;
+ fw_event = kzalloc(sizeof(struct fw_event_work), GFP_ATOMIC);
+ if (!fw_event)
+ return;
fw_event->event = MPT2SAS_REMOVE_UNRESPONDING_DEVICES;
fw_event->ioc = ioc;
_scsih_fw_event_add(ioc, fw_event);
next reply other threads:[~2011-11-10 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 16:05 Yinghai Lu [this message]
2011-11-14 5:53 ` Nandigama, Nagalakshmi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EBBF646.8010705@oracle.com \
--to=yinghai.lu@oracle.com \
--cc=JBottomley@parallels.com \
--cc=eric.moore@lsi.com \
--cc=kashyap.desai@lsi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nagalakshmi.nandigama@lsi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome