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:	Mon, 25 Jan 2016 16:21:54 +0100 (CET)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Geliang Tang <geliangtang@....com>
cc:	linux-usb@...r.kernel.org, kbuild-all@...org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Felipe Balbi <balbi@...com>,
	Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] usb: gadget: rndis: fix itnull.cocci warnings

The index variable of list_for_each_entry_safe is an offset from a list
pointer, and thus should not be NULL.

Generated by: scripts/coccinelle/iterators/itnull.cocci

CC: Geliang Tang <geliangtang@....com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
usb-testing
head:   0e781c2258ffb2a42bf44f62dea8662f38cbfd34
commit: f6281af9d62e128aa6efad29cf7265062af114f2 [27/38] usb: gadget:
rndis: use list_for_each_entry_safe

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

--- a/drivers/usb/gadget/function/rndis.c
+++ b/drivers/usb/gadget/function/rndis.c
@@ -1009,7 +1009,7 @@ void rndis_free_response(struct rndis_pa
 	rndis_resp_t *r, *n;

 	list_for_each_entry_safe(r, n, &params->resp_queue, list) {
-		if (r && r->buf == buf) {
+		if (r->buf == buf) {
 			list_del(&r->list);
 			kfree(r);
 		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ