From: subashab@codeaurora.org
To: Loic Poulain <loic.poulain@linaro.org>
Cc: kuba@kernel.org, davem@davemloft.net,
willemdebruijn.kernel@gmail.com, netdev@vger.kernel.org,
stranche@codeaurora.org
Subject: Re: [PATCH net-next v2 2/2] net: qualcomm: rmnet: Fix rx_handler for non-linear skbs
Date: Tue, 02 Feb 2021 17:57:10 -0700 [thread overview]
Message-ID: <f6d99c2c648337be7a00dbafb66fe6cd@codeaurora.org> (raw)
In-Reply-To: <1612282568-14094-2-git-send-email-loic.poulain@linaro.org>
On 2021-02-02 09:16, Loic Poulain wrote:
> 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>
> ---
> v2: Add this patch to the series to prevent crash
>
> drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c
> index 3d7d3ab..2776c32 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)
Reviewed-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
next prev parent reply other threads:[~2021-02-03 0:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-02 16:16 [PATCH net-next v2 1/2] net: mhi-net: Add de-aggeration support Loic Poulain
2021-02-02 16:16 ` [PATCH net-next v2 2/2] net: qualcomm: rmnet: Fix rx_handler for non-linear skbs Loic Poulain
2021-02-02 22:46 ` Willem de Bruijn
2021-02-03 0:57 ` subashab [this message]
2021-02-02 22:45 ` [PATCH net-next v2 1/2] net: mhi-net: Add de-aggeration support Willem de Bruijn
2021-02-03 7:27 ` Loic Poulain
2021-02-03 14:05 ` Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6d99c2c648337be7a00dbafb66fe6cd@codeaurora.org \
--to=subashab@codeaurora.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=loic.poulain@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=stranche@codeaurora.org \
--cc=willemdebruijn.kernel@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).