From: Peter Hurley <peter@hurleysoftware.com>
To: Alexander Aring <alex.aring@gmail.com>
Cc: Jukka Rissanen <jukka.rissanen@linux.intel.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Bluetooth: Incorrect locking when sending data in softirq
Date: Wed, 15 Oct 2014 17:58:40 -0400 [thread overview]
Message-ID: <543EEE10.2010000@hurleysoftware.com> (raw)
In-Reply-To: <20141015215324.GB17138@omega>
On 10/15/2014 05:53 PM, Alexander Aring wrote:
> Hi Peter,
>
> On Wed, Oct 15, 2014 at 04:46:24PM -0400, Peter Hurley wrote:
> ...
>>
>> That's happening because 6lowpan.c:send_mcast_pkt() is disabling
>> interrupts with the read_lock_irqsave() before calling send_pkt().
>>
>> It's unclear browsing through the lowpan driver why the
>> irqflags save/restore read_lock flavors are being used; is there a
>> place where the bluetooth core is calling the driver in atomic
>> context (ie., where interrupts are disabled)?
>>
>
> In my opinion bt_xmit is called in atomic context. Make the stacktrace
> sense now?
I don't think so.
The network layer is very careful about keeping interrupts enabled
and calling network drivers from softirq, so that spin_lock_bh() is
typically all that's required.
> It's the callback 'ndo_start_xmit' of 'struct net_device_ops' [0].
The send_mcast_pkt() isn't showing in the stack trace because it's
being inlined; and send_mcast_pkt() is definitely disabling interrupts
and calling send_pkt().
Regards,
Peter Hurley
next prev parent reply other threads:[~2014-10-15 21:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 12:43 [PATCH] Bluetooth: Incorrect locking when sending data in softirq Jukka Rissanen
2014-10-15 13:18 ` Peter Hurley
2014-10-15 13:32 ` Jukka Rissanen
2014-10-15 20:46 ` Peter Hurley
2014-10-15 21:53 ` Alexander Aring
2014-10-15 21:58 ` Peter Hurley [this message]
2014-10-15 22:23 ` Alexander Aring
2014-10-16 1:20 ` Peter Hurley
2014-10-16 7:47 ` Jukka Rissanen
2014-10-15 13:36 ` Alexander Aring
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=543EEE10.2010000@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=alex.aring@gmail.com \
--cc=jukka.rissanen@linux.intel.com \
--cc=linux-bluetooth@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.