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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1340646583-21059-3-git-send-email-sjur.brandeland@stericsson.com>
Date:	Mon, 25 Jun 2012 19:49:34 +0200
From:	sjur.brandeland@...ricsson.com
To:	davem@...emloft.net
Cc:	netdev@...r.kernel.org, sjurbren@...il.com,
	Kim Lilliestierna XX <kim.xx.lilliestierna@...ricsson.com>,
	Kim Lilliestierna <Kim.xx.Lilliestierna@...ricsson.com>,
	Sjur Brændeland 
	<sjur.brandeland@...ricssion.com>
Subject: [net-next 02/11] caif: added check for potential null return

From: Kim Lilliestierna XX <kim.xx.lilliestierna@...ricsson.com>

Add check on NULL return from caif_get().

Signed-off-by: Kim Lilliestierna <Kim.xx.Lilliestierna@...ricsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@...ricssion.com>
---
 net/caif/caif_dev.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index 92c9397..0f010af 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -129,6 +129,11 @@ void caif_flow_cb(struct sk_buff *skb)
 
 	rcu_read_lock();
 	caifd = caif_get(skb->dev);
+
+	WARN_ON(caifd == NULL);
+	if (caifd == NULL)
+		return;
+
 	caifd_hold(caifd);
 	rcu_read_unlock();
 
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ