[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200401071023.GD663905@yoga>
Date: Wed, 1 Apr 2020 00:10:23 -0700
From: Bjorn Andersson <bjorn.andersson@...aro.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Cc: gregkh@...uxfoundation.org, davem@...emloft.net,
smohanad@...eaurora.org, jhugo@...eaurora.org,
kvalo@...eaurora.org, hemantk@...eaurora.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 2/3] net: qrtr: Add MHI transport layer
On Tue 31 Mar 23:44 PDT 2020, Manivannan Sadhasivam wrote:
> diff --git a/net/qrtr/mhi.c b/net/qrtr/mhi.c
[..]
> +static void qcom_mhi_qrtr_ul_callback(struct mhi_device *mhi_dev,
> + struct mhi_result *mhi_res)
> +{
> + struct sk_buff *skb = (struct sk_buff *)mhi_res->buf_addr;
> +
> + consume_skb(skb);
> + if (skb->sk)
> + sock_put(skb->sk);
Don't you need to do this in opposite order, to avoid a use after free?
Regards,
Bjorn
Powered by blists - more mailing lists