All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v7] nl80211: Stop scheduled scan if netlink client disappears
Date: Wed, 26 Nov 2014 10:32:19 +0100	[thread overview]
Message-ID: <1416994339.2019.4.camel@sipsolutions.net> (raw)
In-Reply-To: <1416992841-15728-1-git-send-email-jukka.rissanen@linux.intel.com> (sfid-20141126_100742_107746_BD7B37FA)

On Wed, 2014-11-26 at 11:07 +0200, Jukka Rissanen wrote:
> An attribute NL80211_ATTR_SOCKET_OWNER can be set by the scan initiator.
> If present, the attribute will cause the scan to be stopped if the client
> dies.
> 
> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
> ---
> Hi,
> 
> v7:
> - convert the cfg80211_sched_scan_request to __rcu pointer in order
>   to avoid races when accessing it

You totally need to revisit how to use RCU.

Just some examples:
 * don't synchronize_rcu() after assignment - what did you do that for?
 * don't use rcu_read_lock() when you already have the write lock (rtnl)
 * don't use rcu_access_pointer(), use
    - local variables
    - rcu_dereference_protected() (or rather rtnl_dereference())
    - rcu_dereference()
 * actually fix it to assign the values before rcu_assign_pointer() so
they're
   all published together ...

Also, please make that a separate patch so it isn't mixed with the
functional changes.

johannes


  reply	other threads:[~2014-11-26  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26  9:07 [PATCH v7] nl80211: Stop scheduled scan if netlink client disappears Jukka Rissanen
2014-11-26  9:32 ` Johannes Berg [this message]
2014-11-26 10:30   ` Jukka Rissanen
2014-11-26 10:45     ` Johannes Berg

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=1416994339.2019.4.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=jukka.rissanen@linux.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 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.