From: David Miller <davem@davemloft.net>
To: der.herr@hofr.at
Cc: kuznet@ms2.inr.ac.ru, eric.dumazet@gmail.com, roque@di.fc.ul.pt,
peterz@infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH] rebalance locks by converting write_lock_bh to write_lock+local_bh_disable
Date: Sat, 23 Nov 2013 14:39:29 -0800 (PST) [thread overview]
Message-ID: <20131123.143929.975712910203893827.davem@davemloft.net> (raw)
In-Reply-To: <20131121235402.GA11774@opentech.at>
From: Nicholas Mc Guire <der.herr@hofr.at>
Date: Fri, 22 Nov 2013 00:54:02 +0100
> From 2c8e669b691b825c0ed2a02bd7a698d8ed5c6d29 Mon Sep 17 00:00:00 2001
> From: Nicholas Mc Guire <der.herr@hofr.at>
> Date: Thu, 21 Nov 2013 18:22:55 -0500
> Subject: [PATCH] rebalance locks by converting write_lock_bh to write_lock+local_bh_disable
>
>
> in __neigh_event_send write_lock_bh(&neigh->lock) is implicitly balanced by
> write_unlock(&neigh->lock)+local_bh_disable() - while this is equivalent with
> respect to the effective low level locking primitives it breaks balancing
> in the locking api. This makes automatic lock-checking trigger false
> positives, creates an implicit dependency between *_lock_bh and *_lock
> functions as well as making the extremly simply locking of net core even
> easier to understand.
>
> The api inbalance was introduced in:
> commit cd28ca0a3dd17c68d24b839602a0e6268ad28b5d
> Author: Eric Dumazet <eric.dumazet@gmail.com>
> This patch just rebalances the lock api
>
> No change of functionality
>
> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
This is a valid locking idiom, fix the lock checking.
next prev parent reply other threads:[~2013-11-23 22:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 23:54 [PATCH] rebalance locks by converting write_lock_bh to write_lock+local_bh_disable Nicholas Mc Guire
2013-11-23 22:39 ` David Miller [this message]
2013-11-23 23:58 ` Nicholas Mc Guire
2013-11-25 9:40 ` [PATCH] rebalance locks by converting write_lock_bh towrite_lock+local_bh_disable David Laight
2013-11-25 10:37 ` Nicholas Mc Guire
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=20131123.143929.975712910203893827.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=der.herr@hofr.at \
--cc=eric.dumazet@gmail.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=roque@di.fc.ul.pt \
/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).