Re: [PATCH v6 bluetooth-next] 6lowpan: Use skb_cow in IPHC decompression.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jukka,

sorry.

I was a little too fast here, because I am sure now this should solve your
lockdep issue.

On Mon, Oct 13, 2014 at 07:11:11PM +0200, Alexander Aring wrote:
> Hi Jukka,
> 
> On Mon, Oct 13, 2014 at 06:09:14PM +0300, Jukka Rissanen wrote:
> > Hi Martin,
> > 
> > On ma, 2014-10-13 at 15:56 +0100, Martin Townsend wrote:
> > > Hi Jukka,
> > > 
> > > Does this patch help?
> > 
> > Unfortunately no, I still see inconsistent lock state. It would probably
> > have been too easy :)
> > 
> 
> I remeber something, I think 802.15.4 had similar issues long time ago.
> 
s/remeber/remember/

> The fix was 20e7c4e80dcd01dad5e6c8b32455228b8fe9c619 ("6lowpan: fix
> lockdep splats"). Please check that, you need something like that!
> 

Something like that:

diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 4ebc806..02fd21a 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -642,7 +642,27 @@ static netdev_tx_t bt_xmit(struct sk_buff *skb, struct net_device *netdev)
        return err < 0 ? NET_XMIT_DROP : err;
 }
 
+static struct lock_class_key bt_tx_busylock;
+static struct lock_class_key bt_netdev_xmit_lock_key;
+
+static void bt_set_lockdep_class_one(struct net_device *dev,
+                                    struct netdev_queue *txq,
+                                    void *_unused)
+{
+       lockdep_set_class(&txq->_xmit_lock,
+                         &bt_netdev_xmit_lock_key);
+}
+
+
+static int bt_dev_init(struct net_device *dev)
+{
+       netdev_for_each_tx_queue(dev, bt_set_lockdep_class_one, NULL);
+       dev->qdisc_tx_busylock = &bt_tx_busylock;
+       return 0;
+}
+
 static const struct net_device_ops netdev_ops = {
+       .ndo_init               = bt_dev_init,
        .ndo_start_xmit         = bt_xmit,
 };


- Alex

[0] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=20e7c4e80dcd01dad5e6c8b32455228b8fe9c619
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux