From: Greg KH <gregkh@linuxfoundation.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: hemantk@codeaurora.org, bbhatt@codeaurora.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
jarvis.w.jiang@gmail.com, loic.poulain@linaro.org,
Wei Yongjun <weiyongjun1@huawei.com>,
Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH 2/3] bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove()
Date: Wed, 9 Jun 2021 18:59:16 +0200 [thread overview]
Message-ID: <YMDzZDVDOgR22ey1@kroah.com> (raw)
In-Reply-To: <20210606153741.20725-3-manivannan.sadhasivam@linaro.org>
On Sun, Jun 06, 2021 at 09:07:40PM +0530, Manivannan Sadhasivam wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> This driver's remove path calls del_timer(). However, that function
> does not wait until the timer handler finishes. This means that the
> timer handler may still be running after the driver's remove function
> has finished, which would result in a use-after-free.
>
> Fix by calling del_timer_sync(), which makes sure the timer handler
> has finished, and unable to re-schedule itself.
>
> Fixes: 8562d4fe34a3 ("mhi: pci_generic: Add health-check")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> Reviewed-by: Hemant kumar <hemantk@codeaurora.org>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
> Link: https://lore.kernel.org/r/20210413160318.2003699-1-weiyongjun1@huawei.com
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> drivers/bus/mhi/pci_generic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
No Cc: stable on this? I'll go add it...
next prev parent reply other threads:[~2021-06-09 16:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-06 15:37 [PATCH 0/3] MHI fixes for v5.13 Manivannan Sadhasivam
2021-06-06 15:37 ` [PATCH 1/3] bus: mhi: pci_generic: T99W175: update channel name from AT to DUN Manivannan Sadhasivam
2021-06-06 15:37 ` [PATCH 2/3] bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove() Manivannan Sadhasivam
2021-06-09 16:59 ` Greg KH [this message]
2021-06-06 15:37 ` [PATCH 3/3] bus: mhi: pci-generic: Fix hibernation Manivannan Sadhasivam
2021-06-09 17:04 ` Greg KH
2021-06-09 17:44 ` Manivannan Sadhasivam
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=YMDzZDVDOgR22ey1@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=bbhatt@codeaurora.org \
--cc=hemantk@codeaurora.org \
--cc=hulkci@huawei.com \
--cc=jarvis.w.jiang@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=weiyongjun1@huawei.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).