Patch "net: qualcomm: rmnet: Fix leak on transmit failure" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
net: qualcomm: rmnet: Fix leak on transmit failure
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net-qualcomm-rmnet-fix-leak-on-transmit-failure.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Fri Feb 23 11:45:09 CET 2018
From: Subash Abhinov Kasiviswanathan <[email protected]>
Date: Tue, 5 Dec 2017 13:41:17 -0700
Subject: net: qualcomm: rmnet: Fix leak on transmit failure
From: Subash Abhinov Kasiviswanathan <[email protected]>
[ Upstream commit c20a548792f15f8d8e38cd74356301c6db0d241f ]
If a skb in transmit path does not have sufficient headroom to add the map header, the skb is not sent out and is never freed.
--- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c +6 -2
@@ -166,12 +166,12 @@ static int rmnet_map_egress_handler(struif (skb_headroom (skb) < required_headroom) {if (pskb_expand_head (skb, required_headroom,0 ,GFP_KERNEL )) -return RMNET_MAP_CONSUMED ; + goto fail; } map_header =rmnet_map_add_map_header (skb, additional_header_len,0 );if (!map_header) -return RMNET_MAP_CONSUMED ; + goto fail;if (port->egress_data_format &RMNET_EGRESS_FORMAT_MUXING ) {if (ep->mux_id ==0xff )
@@ -183,6 +183,10 @@ static int rmnet_map_egress_handler(stru skb->protocol =htons (ETH_P_MAP );return RMNET_MAP_SUCCESS ; + +fail: +kfree_skb (skb); +return RMNET_MAP_CONSUMED ; }/* Ingress / Egress Entry Points */
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/net-qualcomm-rmnet-fix-leak-on-transmit-failure.patch