From: Kalle Valo <kvalo@codeaurora.org>
To: Christian Lamparter <chunkeey@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-usb@vger.kernel.org,
Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH v2] carl9170: fix misuse of device driver API
Date: Thu, 27 Jun 2019 17:47:20 +0000 (UTC) [thread overview]
Message-ID: <20190627174720.3FE25602F4@smtp.codeaurora.org> (raw)
In-Reply-To: <20190608144947.744-3-chunkeey@gmail.com>
Christian Lamparter <chunkeey@gmail.com> wrote:
> This patch follows Alan Stern's recent patch:
> "p54: Fix race between disconnect and firmware loading"
>
> that overhauled carl9170 buggy firmware loading and driver
> unbinding procedures.
>
> Since the carl9170 code was adapted from p54 it uses the
> same functions and is likely to have the same problem, but
> it's just that the syzbot hasn't reproduce them (yet).
>
> a summary from the changes (copied from the p54 patch):
> * Call usb_driver_release_interface() rather than
> device_release_driver().
>
> * Lock udev (the interface's parent) before unbinding the
> driver instead of locking udev->parent.
>
> * During the firmware loading process, take a reference
> to the USB interface instead of the USB device.
>
> * Don't take an unnecessary reference to the device during
> probe (and then don't drop it during disconnect).
>
> and
>
> * Make sure to prevent use-after-free bugs by explicitly
> setting the driver context to NULL after signaling the
> completion.
>
> Cc: <stable@vger.kernel.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
feb09b293327 carl9170: fix misuse of device driver API
--
https://patchwork.kernel.org/patch/10983223/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2019-06-27 17:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-08 14:49 [PATCH] carl9170: fix enum compare splat Christian Lamparter
2019-06-08 14:49 ` [RFC PATCH v2] ath9k: add loader for AR92XX (and older) pci(e) Christian Lamparter
2019-06-09 13:28 ` Julian Calaby
2019-06-08 14:49 ` [PATCH v2] carl9170: fix misuse of device driver API Christian Lamparter
2019-06-10 14:12 ` Alan Stern
2019-06-27 17:47 ` Kalle Valo [this message]
2019-06-10 7:06 ` [PATCH] carl9170: fix enum compare splat Kalle Valo
2019-06-10 11:45 ` Christian Lamparter
2019-06-18 12:11 ` Kalle Valo
2019-06-20 14:41 ` Christian Lamparter
2019-06-26 14:17 ` Kalle Valo
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=20190627174720.3FE25602F4@smtp.codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=chunkeey@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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).