OSDN Git Service

SCSI: mpt2sas: _scsih_smart_predicted_fault uses GFP_KERNEL in interrupt context
authorAnton Blanchard <anton@samba.org>
Mon, 7 Nov 2011 11:05:21 +0000 (22:05 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2012 22:13:47 +0000 (14:13 -0800)
commit f6a290b419a2675c4b77a6b0731cd2a64332365e upstream.

_scsih_smart_predicted_fault is called in an interrupt and therefore
must allocate memory using GFP_ATOMIC.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/mpt2sas/mpt2sas_scsih.c

index 5690f09..f88e52a 100644 (file)
@@ -4145,7 +4145,7 @@ _scsih_smart_predicted_fault(struct MPT2SAS_ADAPTER *ioc, u16 handle)
        /* insert into event log */
        sz = offsetof(Mpi2EventNotificationReply_t, EventData) +
             sizeof(Mpi2EventDataSasDeviceStatusChange_t);
-       event_reply = kzalloc(sz, GFP_KERNEL);
+       event_reply = kzalloc(sz, GFP_ATOMIC);
        if (!event_reply) {
                printk(MPT2SAS_ERR_FMT "failure at %s:%d/%s()!\n",
                    ioc->name, __FILE__, __LINE__, __func__);