From: Johannes Berg <johannes@sipsolutions.net>
To: Arend Van Spriel <arend.vanspriel@broadcom.com>,
Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, Daniel J Blueman <daniel@quora.org>
Subject: Re: [PATCH for-4.11 2/2] cfg80211: check rdev resume callback only for registered wiphy
Date: Tue, 28 Mar 2017 16:25:51 +0200 [thread overview]
Message-ID: <1490711151.18052.2.camel@sipsolutions.net> (raw)
In-Reply-To: <0ad46312-df78-4d80-8526-1a33e1e86acf@broadcom.com> (sfid-20170328_161314_259929_C61D537D)
> > > - if (rdev->ops->resume) {
> > > - rtnl_lock();
> > > - if (rdev->wiphy.registered)
> > > - ret = rdev_resume(rdev);
> > > - rtnl_unlock();
> > > - }
> > > + rtnl_lock();
> > > + if (rdev->wiphy.registered && rdev->ops->resume)
> > > + ret = rdev_resume(rdev);
> > > + rtnl_unlock();
> >
> > Hmm? Commit message seems ... old perhaps?
>
> Hmmm, why? Before the patch rdev->ops was accessed before checking
> rdev->wiphy.registered. When rdev->wiphy.registers is false we no
> longer access rdev->ops after the patch. So a driver doing a
> wiphy_unregister() can safely kfree() the callback struct after it.
Oh, right. Looks like I misinterpreted things.
johannes
next prev parent reply other threads:[~2017-03-28 14:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-28 8:11 [PATCH for-4.11 0/2] brcmfmac: fixing use-after-free reports Arend van Spriel
2017-03-28 8:11 ` [PATCH for-4.11 1/2] brcmfmac: use local iftype avoiding use-after-free of virtual interface Arend van Spriel
2017-03-30 16:44 ` [for-4.11, " Kalle Valo
2017-03-28 8:11 ` [PATCH for-4.11 2/2] cfg80211: check rdev resume callback only for registered wiphy Arend van Spriel
2017-03-28 12:34 ` Johannes Berg
2017-03-28 14:13 ` Arend Van Spriel
2017-03-28 14:25 ` Johannes Berg [this message]
2017-03-28 14:46 ` Arend Van Spriel
2017-03-29 6:34 ` Johannes Berg
2017-03-29 7:13 ` Johannes Berg
2017-03-28 11:59 ` [PATCH for-4.11 0/2] brcmfmac: fixing use-after-free reports Kalle Valo
2017-03-28 14:08 ` Arend Van Spriel
2017-03-28 15:00 ` 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=1490711151.18052.2.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=arend.vanspriel@broadcom.com \
--cc=daniel@quora.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.