From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5498832561281198618==" MIME-Version: 1.0 From: kernel test robot Subject: [PATCH] iommu: dart: fix call_kern.cocci warnings Date: Sun, 04 Apr 2021 03:18:22 +0800 Message-ID: <20210403191822.GA22291@d5710985ad5b> In-Reply-To: <202104040317.v1pVQvUC-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============5498832561281198618== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org CC: linux-arm-kernel(a)lists.infradead.org TO: Sven Peter CC: Marc Zyngier CC: Joerg Roedel CC: Will Deacon CC: iommu(a)lists.linux-foundation.org CC: linux-kernel(a)vger.kernel.org From: kernel test robot drivers/iommu/apple-dart-iommu.c:438:35-45: ERROR: function apple_dart_atta= ch_stream called on line 519 inside lock on line 509 but uses GFP_KERNEL Find functions that refer to GFP_KERNEL but are called with locks held. Semantic patch information: The proposed change of converting the GFP_KERNEL is not necessarily the correct one. It may be desired to unlock the lock, or to not call the function under the lock in the first place. Generated by: scripts/coccinelle/locks/call_kern.cocci Fixes: ce67d3b3ef37 ("iommu: dart: Add DART iommu driver") CC: Sven Peter Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.g= it hack/m1-pcie head: 1fd2c9634dd24fba323baba52200de18e4d3f4ee commit: ce67d3b3ef3734925631ec65deb1cf8078d826cf [14/15] iommu: dart: Add D= ART iommu driver :::::: branch date: 8 hours ago :::::: commit date: 8 hours ago Please take the patch only if it's a positive warning. Thanks! apple-dart-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/iommu/apple-dart-iommu.c +++ b/drivers/iommu/apple-dart-iommu.c @@ -435,7 +435,7 @@ static int apple_dart_attach_stream(stru goto error; } = - stream =3D kzalloc(sizeof(*stream), GFP_KERNEL); + stream =3D kzalloc(sizeof(*stream), GFP_ATOMIC); if (!stream) { ret =3D -ENOMEM; goto error; --===============5498832561281198618==--