summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoic Poulain <loic.poulain@linaro.org>2021-02-02 16:44:03 +0100
committerLoic Poulain <loic.poulain@linaro.org>2021-02-02 17:58:32 +0100
commit326270bfc18ba1b9d133e84c6bca6ea11734b123 (patch)
tree6035b9c5dd2c975b3957fcf7c56ed0007648994e
parent569deed618406922f2ad55fafc6270950267546e (diff)
net: qualcomm: rmnet: Fix rx_handler for non-linear skbs
There is no guarantee that rmnet rx_handler is only fed with linear skbs, but current rmnet implementation does not check that, leading to crash in case of non linear skbs processed as linear ones. Fix that by ensuring skb linearization before processing. Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
-rw-r--r--drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
index 3d7d3ab383f8..2776c32424f8 100644
--- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
+++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
@@ -180,7 +180,7 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)
struct rmnet_port *port;
struct net_device *dev;
- if (!skb)
+ if (!skb || skb_linearize(skb))
goto done;
if (skb->pkt_type == PACKET_LOOPBACK)