cns3xxx: prevent the ethernet driver from accessing uninitialized dma descriptor...
[openwrt.git] / target / linux / generic / patches-3.6 / 620-sched_esfq.patch
index 1fdf09d0991a5a57163672388e816d590a39e1b8..a21bf1e45d632f27e4008dbe344c1f125556ae10 100644 (file)
@@ -1,6 +1,6 @@
 --- a/include/linux/pkt_sched.h
 +++ b/include/linux/pkt_sched.h
-@@ -193,6 +193,33 @@ struct tc_sfq_xstats {
+@@ -214,6 +214,33 @@ struct tc_sfq_xstats {
        __s32           allot;
  };
  
 +
 +#include <linux/module.h>
 +#include <asm/uaccess.h>
-+#include <asm/system.h>
 +#include <linux/bitops.h>
 +#include <linux/types.h>
 +#include <linux/kernel.h>
 +      opt.flows = q->depth;
 +      opt.hash_kind = q->hash_kind;
 +
-+      NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
++      if (nla_put(skb, TCA_OPTIONS, sizeof(opt), &opt))
++              goto nla_put_failure;
 +
 +      return skb->len;
 +