Re: [tipc-discussion] [PATCH] net: tipc: Fix a possible null-pointer dereference in tipc_publ_purge()

2019-07-26 Thread David Miller
From: Jia-Ju Bai Date: Thu, 25 Jul 2019 17:20:21 +0800 > @@ -223,7 +223,8 @@ static void tipc_publ_purge(struct net *net, struct > publication *publ, u32 addr) > publ->key); > } > > - kfree_rcu(p, rcu); > + if (p) > + kfree_rcu(p, rcu); Please

Re: [tipc-discussion] [PATCH] net: tipc: Fix a possible null-pointer dereference in tipc_publ_purge()

2019-07-26 Thread Ying Xue
On 7/25/19 5:20 PM, Jia-Ju Bai wrote: > In tipc_publ_purge(), there is an if statement on 215 to > check whether p is NULL: > if (p) > > When p is NULL, it is used on line 226: > kfree_rcu(p, rcu); > > Thus, a possible null-pointer dereference may occur. > > To fix this bug, p is