From: Jarek Poplawski <jarkao2@gmail.com>
To: Denys Fedoryshchenko <denys@visp.net.lb>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH]: Schedule correct qdisc in watchdog.
Date: Mon, 18 Aug 2008 11:35:31 +0000 [thread overview]
Message-ID: <20080818113531.GB7158@ff.dom.local> (raw)
In-Reply-To: <20080818112022.GA7158@ff.dom.local>
On Mon, Aug 18, 2008 at 11:20:22AM +0000, Jarek Poplawski wrote:
> On Mon, Aug 18, 2008 at 02:04:55PM +0300, Denys Fedoryshchenko wrote:
> > Just to update. Current net-2.6 with [PATCH]: Schedule correct qdisc in watchdog. , for now only following warning appearing
>
> So Denys I see you are tracking it all, thanks.
>
> David, I think it would be nice to merge this "00-prevfixes1.patch"
> "pkt_sched: Add lockdep annotation for qdisc locks" from:
> http://permalink.gmane.org/gmane.linux.network/103039
> as well. (It is available on netdev too.)
>
Or I'll better resend this, because of some problems with this link.
Denys, please apply this for testing until it's merged.
Jarek P.
------------------> (resend)
pkt_sched: Add lockdep annotation for qdisc locks
Qdisc locks are initialized in the same function, qdisc_alloc(), so
lockdep can't distinguish tx qdisc lock from rx and reports "possible
recursive locking detected" when both these locks are taken eg. while
using act_mirred with ifb. This looks like a false positive. Anyway,
after this patch these locks will be reported more exactly.
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/sch_api.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index c25465e..bf84181 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -27,6 +27,7 @@
#include <linux/kmod.h>
#include <linux/list.h>
#include <linux/hrtimer.h>
+#include <linux/lockdep.h>
#include <net/net_namespace.h>
#include <net/sock.h>
@@ -707,6 +708,10 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
return err;
}
+/* lockdep annotation is needed for ingress; egress gets it only for name */
+static struct lock_class_key qdisc_tx_lock;
+static struct lock_class_key qdisc_rx_lock;
+
/*
Allocate and initialize new qdisc.
@@ -767,6 +772,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
if (handle == TC_H_INGRESS) {
sch->flags |= TCQ_F_INGRESS;
handle = TC_H_MAKE(TC_H_INGRESS, 0);
+ lockdep_set_class(qdisc_lock(sch), &qdisc_rx_lock);
} else {
if (handle == 0) {
handle = qdisc_alloc_handle(dev);
@@ -774,6 +780,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue,
if (handle == 0)
goto err_out3;
}
+ lockdep_set_class(qdisc_lock(sch), &qdisc_tx_lock);
}
sch->handle = handle;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-08-18 11:35 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-18 8:39 [PATCH]: Schedule correct qdisc in watchdog David Miller
2008-08-18 9:10 ` Jarek Poplawski
2008-08-18 9:31 ` David Miller
2008-08-18 9:47 ` Jarek Poplawski
2008-08-18 10:10 ` David Miller
2008-08-18 10:35 ` Jarek Poplawski
2008-08-18 10:43 ` Jarek Poplawski
2008-08-18 11:04 ` Denys Fedoryshchenko
2008-08-18 11:20 ` Jarek Poplawski
2008-08-18 11:35 ` Jarek Poplawski [this message]
2008-08-18 12:45 ` Denys Fedoryshchenko
2008-08-18 12:58 ` Jarek Poplawski
2008-08-18 23:56 ` David Miller
2008-08-19 5:37 ` Jarek Poplawski
2008-08-19 5:39 ` David Miller
2008-08-19 5:42 ` Jarek Poplawski
2008-08-18 15:55 ` Jarek Poplawski
2008-08-18 18:05 ` Denys Fedoryshchenko
2008-08-19 3:54 ` David Miller
2008-08-19 6:59 ` Jarek Poplawski
2008-08-19 7:03 ` David Miller
2008-08-18 11:06 ` Jarek Poplawski
2008-08-19 3:51 ` David Miller
2008-08-19 4:08 ` 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=20080818113531.GB7158@ff.dom.local \
--to=jarkao2@gmail.com \
--cc=davem@davemloft.net \
--cc=denys@visp.net.lb \
--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;
as well as URLs for NNTP newsgroup(s).