tipc: add NULL pointer check
authorHoang Le <hoang.h.le@dektech.com.au>
Wed, 3 Apr 2019 06:05:04 +0000 (13:05 +0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 5 Apr 2019 00:34:11 +0000 (17:34 -0700)
commite1279ff7aec19d7154da30bf5b83e797a13fbced
tree4973b70e2590391fcf1ecc12f5021081a60cbfd2
parent95e27a4da6143ad8a0c908215a0f402031b9ebf3
tipc: add NULL pointer check

skb somehow dequeued out of inputq before processing, it causes to
NULL pointer and kernel crashed.

Add checking skb valid before using.

Fixes: c55c8edafa9 ("tipc: smooth change between replicast and broadcast")
Reported-by: Tuong Lien Tong <tuong.t.lien@dektech.com.au>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/bcast.c