public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Oliver Neukum <oneukum@suse.com>,
	valentina.manea.m@gmail.com, shuah@kernel.org, i@zenithal.me,
	gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] usb: vhci-hcd: Do not drop references before new references are gained
Date: Wed, 17 Jul 2024 15:26:19 -0600	[thread overview]
Message-ID: <c930fd3d-67d7-464b-a3cd-3da4401723f9@linuxfoundation.org> (raw)
In-Reply-To: <f8b192bd-55e3-4b00-92b3-67ba99b5b86e@suse.com>

On 7/16/24 08:33, Oliver Neukum wrote:
> 
> 
> On 09.07.24 21:38, Shuah Khan wrote:
>> On 7/9/24 05:38, Oliver Neukum wrote:
>>> At a few places the driver carries stale pointers
>>> to references that can still be used. Make sure that does not happen.
>>> This strictly speaking closes ZDI-CAN-22273, though there may be
>>> similar races in the driver.
>>>
>>> Signed-off-by: Oliver Neukum <oneukum@suse.com>
>>
>> Sorry I need a bit more explanation to follow the change you
>> are making. Also how did you find the problem?
> 
> Hi,
> 
> I looked at the initial report you wrote and it seemed to me that the issue
> was that vhci_device_reset() leaves a stale pointer around and vhci_urb_enqueue()
> in the special cases drops the old reference before it gets a new reference,
> which together causes the race condition you were hitting.
> 

Thank you.

Acked-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah


      reply	other threads:[~2024-07-17 21:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 11:38 [PATCH] usb: vhci-hcd: Do not drop references before new references are gained Oliver Neukum
2024-07-09 19:38 ` Shuah Khan
2024-07-16 14:33   ` Oliver Neukum
2024-07-17 21:26     ` Shuah Khan [this message]

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=c930fd3d-67d7-464b-a3cd-3da4401723f9@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=i@zenithal.me \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=shuah@kernel.org \
    --cc=valentina.manea.m@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