On 2018/10/31 6:34, Yanjun Zhu wrote:
On 2018/10/30 21:54, Andrew Boyer wrote:
kfree_skb() already handles the case in which skb is NULL.
Signed-off-by: Andrew Boyer <andrew.boyer@xxxxxxxx>
Reviewed-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxxx>
Sorry. My bad. I think this is also fixed in the latest linux kernel.
Please check it again.
Zhu Yanjun
---
drivers/infiniband/sw/rxe/rxe_recv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_recv.c
b/drivers/infiniband/sw/rxe/rxe_recv.c
index 08ad9dc72205..26e82f5fb4cb 100644
--- a/drivers/infiniband/sw/rxe/rxe_recv.c
+++ b/drivers/infiniband/sw/rxe/rxe_recv.c
@@ -328,8 +328,7 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev
*rxe, struct sk_buff *skb)
rxe_drop_ref(mcg); /* drop ref from rxe_pool_get_key. */
err1:
- if (skb)
- kfree_skb(skb);
+ kfree_skb(skb);
}
static int rxe_match_dgid(struct rxe_dev *rxe, struct sk_buff *skb)