| From f6a290b419a2675c4b77a6b0731cd2a64332365e Mon Sep 17 00:00:00 2001 |
| From: Anton Blanchard <anton@samba.org> |
| Date: Mon, 7 Nov 2011 22:05:21 +1100 |
| Subject: SCSI: mpt2sas: _scsih_smart_predicted_fault uses GFP_KERNEL in interrupt context |
| |
| From: Anton Blanchard <anton@samba.org> |
| |
| 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 | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c |
| +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c |
| @@ -3145,7 +3145,7 @@ _scsih_smart_predicted_fault(struct MPT2 |
| /* 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__); |