]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.25 networking patch added
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 3 Sep 2008 17:06:36 +0000 (10:06 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 3 Sep 2008 17:06:36 +0000 (10:06 -0700)
queue-2.6.25/sch_prio_2625.patch [new file with mode: 0644]
queue-2.6.25/series

diff --git a/queue-2.6.25/sch_prio_2625.patch b/queue-2.6.25/sch_prio_2625.patch
new file mode 100644 (file)
index 0000000..d36efe2
--- /dev/null
@@ -0,0 +1,54 @@
+From cb3b7106b526380da4133364ffb2cf187759d8ea Mon Sep 17 00:00:00 2001
+From: Thomas Graf <tgraf@suug.ch>
+Date: Wed, 3 Sep 2008 01:00:02 -0700
+Subject: [PATCH] sch_prio: Fix nla_parse_nested_compat() regression
+
+From: Thomas Graf <tgraf@suug.ch>
+
+[ No upstream commit, this is fixing code no longer in 2.6.27 ]
+
+nla_parse_nested_compat() was used to parse two different message
+formats in the netem and prio qdisc, when it was "fixed" to work
+with netem, it broke the multi queue support in the prio qdisc.
+Since the prio qdisc code in question is already removed in the
+development tree, this patch only fixes the regression in the
+stable tree.
+
+Based on original patch from Alexander H Duyck <alexander.h.duyck@intel.com>
+
+Signed-off-by: Thomas Graf <tgraf@suug.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ net/sched/sch_prio.c |   16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+--- a/net/sched/sch_prio.c
++++ b/net/sched/sch_prio.c
+@@ -228,14 +228,20 @@ static int prio_tune(struct Qdisc *sch, 
+ {
+       struct prio_sched_data *q = qdisc_priv(sch);
+       struct tc_prio_qopt *qopt;
+-      struct nlattr *tb[TCA_PRIO_MAX + 1];
++      struct nlattr *tb[TCA_PRIO_MAX + 1] = {0};
+       int err;
+       int i;
+-      err = nla_parse_nested_compat(tb, TCA_PRIO_MAX, opt, NULL, qopt,
+-                                    sizeof(*qopt));
+-      if (err < 0)
+-              return err;
++      qopt = nla_data(opt);
++      if (nla_len(opt) < sizeof(*qopt))
++              return -1;
++
++      if (nla_len(opt) >= sizeof(*qopt) + sizeof(struct nlattr)) {
++              err = nla_parse_nested(tb, TCA_PRIO_MAX,
++                                     (struct nlattr *) (qopt + 1), NULL);
++              if (err < 0)
++                      return err;
++      }
+       q->bands = qopt->bands;
+       /* If we're multiqueue, make sure the number of incoming bands
index 0399b9a77907dda0cabcd3a711d66cb372b86834..6e68490a4d5dbc47ceb470a63b2efbad7e29bb82 100644 (file)
@@ -13,3 +13,4 @@ cifs-fix-o_append-on-directio-mounts.patch
 0008-sctp-add-verification-checks-to-SCTP_AUTH_KEY-optio.patch
 0011-sctp-correct-bounds-check-in-sctp_setsockopt_auth_k.patch
 0012-sctp-fix-random-memory-dereference-with-SCTP_HMAC_I.patch
+sch_prio_2625.patch