Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1183498
| From | Thomas Graf <tgraf@suug.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: mmap()ed AF_NETLINK: lockdep and sleep-in-atomic warnings |
| Date | 2015-07-14 11:40 +0200 |
| Message-ID | <pM4QW-sa-17@gated-at.bofh.it> (permalink) |
| References | <pLLOi-5uN-15@gated-at.bofh.it> <pM0Nk-6x5-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 07/13/15 at 10:11pm, Cong Wang wrote:
> Caused by:
>
> commit 21e4902aea80ef35afc00ee8d2abdea4f519b7f7
> Author: Thomas Graf <tgraf@suug.ch>
> Date: Fri Jan 2 23:00:22 2015 +0100
>
> netlink: Lockless lookup with RCU grace period in socket release
>
> Defers the release of the socket reference using call_rcu() to
> allow using an RCU read-side protected call to rhashtable_lookup()
>
> This restores behaviour and performance gains as previously
> introduced by e341694 ("netlink: Convert netlink_lookup() to use
> RCU protected hash table") without the side effect of severely
> delayed socket destruction.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
>
> We can't hold mutex lock in a rcu callback, perhaps we could
> defer the mmap ring cleanup to a workqueue.
The socket should be dead at this point. It might be simpler to
add a netlink_release_ring() function which doesn't require
locking at all. It would also get rid of all the special handling
for closing vs. non-closing.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: mmap()ed AF_NETLINK: lockdep and sleep-in-atomic warnings Cong Wang <cwang@twopensource.com> - 2015-07-14 07:20 +0200
Re: mmap()ed AF_NETLINK: lockdep and sleep-in-atomic warnings Thomas Graf <tgraf@suug.ch> - 2015-07-14 11:40 +0200
Re: mmap()ed AF_NETLINK: lockdep and sleep-in-atomic warnings Florian Westphal <fw@strlen.de> - 2015-07-14 12:00 +0200
csiph-web