From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexander Smirnov <alex.bluesman.smirnov@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, dbaryshkov@gmail.com
Subject: Re: [PATCH net-next 1/2] ieee802154: sparse warnings: make symbols static
Date: Wed, 04 Jul 2012 15:45:27 +0200 [thread overview]
Message-ID: <1341409527.2583.1986.camel@edumazet-glaptop> (raw)
In-Reply-To: <CAJmB2rAdDvpGhEDzBQddJBi5fJ55McN8uJEzLQiF_froR4hxVA@mail.gmail.com>
On Wed, 2012-07-04 at 17:38 +0400, Alexander Smirnov wrote:
> Do I need to create 2 separate patches: one for revert and second to
> initialize spinlock correctly, or I can combine these changes in one
> patch?
>
you can combine patch
> >
> > You should validate this code with LOCKDEP
>
> Nothing was shown by LOCKDEP for 6lowpan. :-(
>
Because path was not hit ( fragment expire )
You would have to simulate a drop or something to trigger the lockdep
splat, when lowpan_fragment_timer_expired() fires.
> I've selected the following options:
>
> -*- Spinlock and rw-lock debugging: basic checks
> -*- Mutex debugging: basic checks
> -*- Lock debugging: detect incorrect freeing of live locks
> [*] Lock usage statistics
> [*] Lock dependency engine debugging
>
> >
> > lowpan_dellink() does a spin_lock(&flist_lock);
> > while same lock can be taken by lowpan_fragment_timer_expired() from
> > timer irq, -> deadlock.
>
> What would be the best way to solve this context mismatch? Can I do
> something like following:
> 1. create some 6lowpan internal workqueue
> 2. replace lowpan_fragment_timer_expired() body by queue_work() with
> current list_deleting routine
> 3. when 6lowpan is going to be deleted - I'll flush the queue and
> remove all the timers and respective fragments
>
Just use the spin_lock_bh() variant to disable BH, so that timer doesnt
deadlock with you.
next prev parent reply other threads:[~2012-07-04 13:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 6:18 [PATCH net-next 0/0] fix sparse warnings Alexander Smirnov
2012-07-02 6:18 ` [PATCH net-next 1/2] ieee802154: sparse warnings: make symbols static Alexander Smirnov
2012-07-02 6:37 ` Eric Dumazet
2012-07-02 6:44 ` Eric Dumazet
2012-07-02 6:49 ` Eric Dumazet
2012-07-02 6:53 ` Alexander Smirnov
2012-07-02 7:09 ` Eric Dumazet
2012-07-02 7:13 ` Eric Dumazet
2012-07-04 13:38 ` Alexander Smirnov
2012-07-04 13:45 ` Eric Dumazet [this message]
2012-07-02 6:18 ` [PATCH net-next 2/2] drivers/ieee802154/at231rf230: remove unused return status Alexander Smirnov
2012-07-05 10:13 ` David Miller
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=1341409527.2583.1986.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=alex.bluesman.smirnov@gmail.com \
--cc=davem@davemloft.net \
--cc=dbaryshkov@gmail.com \
--cc=netdev@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