Messages in this thread | | | From | "Martin K. Petersen" <> | Subject | Re: [PATCH] scsi: mpt3sas: Do not use GFP_KERNEL in atomic context | Date | Thu, 18 Mar 2021 23:45:54 -0400 |
| |
On Sat, 20 Feb 2021 10:39:51 +0100, Christophe JAILLET wrote:
> 'mpt3sas_get_port_by_id()' can be called when a spinlock is hold. So use > GFP_ATOMIC instead of GFP_KERNEL when allocating memory. > > Issue spotted by call_kern.cocci: > ./drivers/scsi/mpt3sas/mpt3sas_scsih.c:416:42-52: ERROR: function mpt3sas_get_port_by_id called on line 7125 inside lock on line 7123 but uses GFP_KERNEL > ./drivers/scsi/mpt3sas/mpt3sas_scsih.c:416:42-52: ERROR: function mpt3sas_get_port_by_id called on line 6842 inside lock on line 6839 but uses GFP_KERNEL > ./drivers/scsi/mpt3sas/mpt3sas_scsih.c:416:42-52: ERROR: function mpt3sas_get_port_by_id called on line 6854 inside lock on line 6851 but uses GFP_KERNEL > ./drivers/scsi/mpt3sas/mpt3sas_scsih.c:416:42-52: ERROR: function mpt3sas_get_port_by_id called on line 7706 inside lock on line 7702 but uses GFP_KERNEL > ./drivers/scsi/mpt3sas/mpt3sas_scsih.c:416:42-52: ERROR: function mpt3sas_get_port_by_id called on line 10260 inside lock on line 10256 but uses GFP_KERNEL
Applied to 5.12/scsi-fixes, thanks!
[1/1] scsi: mpt3sas: Do not use GFP_KERNEL in atomic context https://git.kernel.org/mkp/scsi/c/a50bd6461690
-- Martin K. Petersen Oracle Linux Engineering
| |