From: Johannes Berg <johannes@sipsolutions.net>
To: Andrew Zaborowski <andrew.zaborowski@intel.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT
Date: Tue, 13 Dec 2016 16:33:20 +0100 [thread overview]
Message-ID: <1481643200.20412.9.camel@sipsolutions.net> (raw)
In-Reply-To: <20161212164500.691-1-andrew.zaborowski@intel.com> (sfid-20161212_174513_083117_405C8DC6)
[snip]
Please fix coding style, particularly indentation.
> +static void cfg80211_disconnect_wk(struct work_struct *work)
> +{
> + struct cfg80211_registered_device *rdev;
> + struct wireless_dev *wdev;
> +
> + wdev = container_of(work, struct wireless_dev, disconnect_wk);
> + rdev = wiphy_to_rdev(wdev->wiphy);
Those should also be possible as initializers on the same line, I
guess?
It might also be worthwhile moving this function into a better file,
even if then it needs a prototype in core.h (it can't be inlined anyway
since it's called through a function pointer in the work struct)
> + if (!wdev->netdev)
> + return;
This obviously cannot happen.
All the code you added to nl80211.c is racy.
johannes
next prev parent reply other threads:[~2016-12-13 15:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 16:45 [PATCH v3] cfg80211: NL80211_ATTR_SOCKET_OWNER support for CMD_CONNECT Andrew Zaborowski
2016-12-13 15:33 ` Johannes Berg [this message]
2016-12-13 15:36 ` Johannes Berg
2016-12-18 0:11 ` Andrew Zaborowski
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=1481643200.20412.9.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=andrew.zaborowski@intel.com \
--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 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).