Re: [PATCHv2 1/1] IB/rxe: avoid double kfree skb

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

 



On Thu, Jun 07, 2018 at 02:32:52AM -0400, Zhu Yanjun wrote:
> In rxe_send, when network_type is not RDMA_NETWORK_IPV4 or
> RDMA_NETWORK_IPV6, skb is freed and -EINVAL is returned.
> Then rxe_xmit_packet will return -EINVAL, too. In rxe_requester,
> this skb is double freed.
> In rxe_requester, kfree_skb is needed only after fill_packet fails.
> So kfree_skb is moved from label err to test fill_packet.

The better solution is not to release skb in rxe_send(), but do it at
the same place where you allocated/initialized skb.

Thanks

Attachment: signature.asc
Description: PGP signature


[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