lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 21 Nov 2017 07:12:11 +0100 (CET)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Eddie James <eajames@...ux.vnet.ibm.com>
cc:     gregkh@...uxfoundation.org, devicetree@...r.kernel.org,
        robh+dt@...nel.org, mark.rutland@....com,
        bradleyb@...ziesquirrel.com, cbostic@...ux.vnet.ibm.com,
        joel@....id.au, eajames@...ux.vnet.ibm.com,
        "Edward A. James" <eajames@...ibm.com>, kbuild-all@...org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] drivers/fsi: sbefifo: fix call_kern.cocci warnings

Function sbefifo_enq_xfr called inside lock from sbefifo_write_common but
uses GFP_KERNEL.  Change to GFP_ATOMIC.

Generated by: scripts/coccinelle/locks/call_kern.cocci

Fixes: 0f8664fbfc9f ("drivers/fsi: sbefifo: Add miscdevice")
CC: Edward A. James <eajames@...ibm.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

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.


 fsi-sbefifo.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/fsi/fsi-sbefifo.c
+++ b/drivers/fsi/fsi-sbefifo.c
@@ -266,7 +266,7 @@ static struct sbefifo_xfr *sbefifo_enq_x
 	if (READ_ONCE(sbefifo->rc))
 		return ERR_PTR(sbefifo->rc);

-	xfr = kzalloc(sizeof(*xfr), GFP_KERNEL);
+	xfr = kzalloc(sizeof(*xfr), GFP_ATOMIC);
 	if (!xfr)
 		return ERR_PTR(-ENOMEM);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ