提交 c95567c8 编写于 作者: K Kim Lilliestierna XX 提交者: David S. Miller

caif: added check for potential null return

Add check on NULL return from caif_get().
Signed-off-by: NKim Lilliestierna <Kim.xx.Lilliestierna@stericsson.com>
Signed-off-by: NSjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 be4852c9
...@@ -128,6 +128,11 @@ void caif_flow_cb(struct sk_buff *skb) ...@@ -128,6 +128,11 @@ void caif_flow_cb(struct sk_buff *skb)
rcu_read_lock(); rcu_read_lock();
caifd = caif_get(skb->dev); caifd = caif_get(skb->dev);
WARN_ON(caifd == NULL);
if (caifd == NULL)
return;
caifd_hold(caifd); caifd_hold(caifd);
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册