Re: [PATCH 2/4] RDMA/rxe: Don't check for NULL before calling kfree_skb()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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)






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux