]> git.pld-linux.org Git - packages/kernel.git/commitdiff
- try to fix ingress in 2.6.8.1
authorhavner <havner@pld-linux.org>
Sat, 2 Oct 2004 20:42:24 +0000 (20:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    kernel-2.6.8.1-sch_api.patch -> 1.1

kernel-2.6.8.1-sch_api.patch [new file with mode: 0644]

diff --git a/kernel-2.6.8.1-sch_api.patch b/kernel-2.6.8.1-sch_api.patch
new file mode 100644 (file)
index 0000000..60e23d7
--- /dev/null
@@ -0,0 +1,68 @@
+
+# This is a BitKeeper generated diff -Nru style patch.
+#
+# ChangeSet
+# 2004/08/15 18:08:13+02:00 kaber@xxxxxxxxxxxx 
+# [PKT_SCHED]: cacheline-align qdisc data in qdisc_create()
+# 
+# Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
+# 
+# net/sched/sch_api.c
+# 2004/08/15 18:04:27+02:00 kaber@xxxxxxxxxxxx +13 -8
+# [PKT_SCHED]: cacheline-align qdisc data in qdisc_create()
+# 
+diff -Nru a/net/sched/sch_api.c b/net/sched/sch_api.c
+--- a/net/sched/sch_api.c 2004-08-15 18:09:36 +02:00
++++ b/net/sched/sch_api.c 2004-08-15 18:09:36 +02:00
+@@ -389,7 +389,8 @@
+ {
+       int err;
+       struct rtattr *kind = tca[TCA_KIND-1];
+-      struct Qdisc *sch = NULL;
++      void *p = NULL;
++      struct Qdisc *sch;
+       struct Qdisc_ops *ops;
+       int size;
+@@ -407,12 +408,18 @@
+       if (ops == NULL)
+               goto err_out;
+-      size = sizeof(*sch) + ops->priv_size;
++      /* ensure that the Qdisc and the private data are 32-byte aligned */
++      size = ((sizeof(*sch) + QDISC_ALIGN_CONST) & ~QDISC_ALIGN_CONST);
++      size += ops->priv_size + QDISC_ALIGN_CONST;
+-      sch = kmalloc(size, GFP_KERNEL);
++      p = kmalloc(size, GFP_KERNEL);
+       err = -ENOBUFS;
+-      if (!sch)
++      if (!p)
+               goto err_out;
++      memset(p, 0, size);
++      sch = (struct Qdisc *)(((unsigned long)p + QDISC_ALIGN_CONST)
++      & ~QDISC_ALIGN_CONST);
++      sch->padded = (char *)sch - (char *)p;
+ /* Grrr... Resolve race condition with module unload */
+@@ -420,8 +427,6 @@
+       if (ops != qdisc_lookup_ops(kind))
+               goto err_out;
+-      memset(sch, 0, size);
+-
+       INIT_LIST_HEAD(&sch->list);
+       skb_queue_head_init(&sch->q);
+@@ -470,8 +475,8 @@
+ err_out:
+       *errp = err;
+-      if (sch)
+-              kfree(sch);
++      if (p)
++              kfree(p);
+       return NULL;
+ }
This page took 4.334308 seconds and 4 git commands to generate.