diff options
author | Zhu Yanjun <yanjun.zhu@oracle.com> | 2018-06-07 09:32:52 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-06-11 20:02:27 +0300 |
commit | 828d810550abc1fffff9b20545fec4bc150d5e82 (patch) | |
tree | 63af46473c30b6c01fa7b565d44c176ed62a315e /drivers/bus/simple-pm-bus.c | |
parent | c1191a19fecad92b73c25770a7f47174280ca564 (diff) | |
download | linux-828d810550abc1fffff9b20545fec4bc150d5e82.tar.xz |
IB/rxe: avoid double kfree skb
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.
Fixes: 5793b4652155 ("IB/rxe: remove unnecessary skb_clone in xmit")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/bus/simple-pm-bus.c')
0 files changed, 0 insertions, 0 deletions