aboutsummaryrefslogtreecommitdiff
path: root/net/sched/sch_drr.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-02 15:46:09 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-02 15:46:09 -0800
commit359aa09be9b2b343e01306cb4a6f29d7159d7498 (patch)
tree8d0347e9aee4ea7b147b9daa681d4b7ecefc1ee6 /net/sched/sch_drr.c
parentc742b4bf7a180619831783dcdad6aec062587e54 (diff)
parent52c0326beaa3cb0049d0f1c51c6ad5d4a04e4430 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (29 commits) zaurus: add usb id for motomagx phones usbnet: make usbnet_get_link() fall back to ethtool_op_get_link() veth: Fix carrier detect cdc_ether: add usb id for Ericsson F3507g r8169: read MAC address from EEPROM on init (2nd attempt) tcp: fix retrans_out leaks net headers: export dcbnl.h net headers: cleanup dcbnl.h netpoll: Add drop checks to all entry points gianfar: Do right check on num_txbdfree pkt_sched: sch_drr: Fix oops in drr_change_class. b44: Disable device on shutdown b44: Unconditionally enable interrupt routing on reset net: fix hp-plus build error libertas: fix misuse of netdev_priv() and dev->ml_priv ipv6: don't use tw net when accounting for recycled tw asix: new device ids tcp_scalable: Update malformed & dead url netfilter: xt_recent: fix proc-file addition/removal of IPv4 addresses netxen: handle pci bar 0 mapping failure ...
Diffstat (limited to 'net/sched/sch_drr.c')
-rw-r--r--net/sched/sch_drr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index f6b4fa97df7..e36e94ab4e1 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -66,11 +66,15 @@ static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
{
struct drr_sched *q = qdisc_priv(sch);
struct drr_class *cl = (struct drr_class *)*arg;
+ struct nlattr *opt = tca[TCA_OPTIONS];
struct nlattr *tb[TCA_DRR_MAX + 1];
u32 quantum;
int err;
- err = nla_parse_nested(tb, TCA_DRR_MAX, tca[TCA_OPTIONS], drr_policy);
+ if (!opt)
+ return -EINVAL;
+
+ err = nla_parse_nested(tb, TCA_DRR_MAX, opt, drr_policy);
if (err < 0)
return err;