Re: [PATCHv2 1/1] IB/rxe: avoid double kfree_skb

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

 



On Thu, 2018-04-26 at 00:41 -0400, Zhu Yanjun wrote:
> When skb is sent, it will pass the following functions in soft roce.
> 
> rxe_send [rdma_rxe]
>     ip_local_out
>         __ip_local_out
>         ip_output
>             ip_finish_output
>                 ip_finish_output2
>                     dev_queue_xmit
>                         __dev_queue_xmit
>                             dev_hard_start_xmit
> 
> In the above functions, if error occurs in the above functions or
> iptables rules drop skb after ip_local_out, kfree_skb will be called.
> So it is not necessary to call kfree_skb in soft roce module again.
> Or else crash will occur.
> 
> The steps to reproduce:
> 
>      server                       client
>     ---------                    ---------
>     |1.1.1.1|<----rxe-channel--->|1.1.1.2|
>     ---------                    ---------
> 
> On server: rping -s -a 1.1.1.1 -v -C 10000 -S 512
> On client: rping -c -a 1.1.1.1 -v -C 10000 -S 512
> 
> The kernel configs CONFIG_DEBUG_KMEMLEAK and
> CONFIG_DEBUG_OBJECTS are enabled on both server and client.
> 
> When rping runs, run the following command in server:
> 
> iptables -I OUTPUT -p udp  --dport 4791 -j DROP
> 
> Without this patch, crash will occur.
> 
> CC: Srinivas Eeda <srinivas.eeda@xxxxxxxxxx>
> CC: Junxiao Bi <junxiao.bi@xxxxxxxxxx>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxxx>
> Reviewed-by: Yuval Shaia <yuval.shaia@xxxxxxxxxx>
> ---
> V1->V2: Not only the dropped skb is freed, but also the error skb
>         is also freed. So in soft roce, it is not necessary to call
>         kfree_skb again.
> ---

I droppped the v1 patch (as I hadn't seen this v2 when I took it) and
added this one back in its place.  Thanks.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

Attachment: signature.asc
Description: This is a digitally signed message part


[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