git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ethtool: prevent null pointer dereference with NTUPLE set but no set_rx_ntuple
[pandora-kernel.git]
/
net
/
core
/
ethtool.c
diff --git
a/net/core/ethtool.c
b/net/core/ethtool.c
index
1b7fa98
..
704e176
100644
(file)
--- a/
net/core/ethtool.c
+++ b/
net/core/ethtool.c
@@
-910,6
+910,9
@@
static noinline_for_stack int ethtool_set_rx_ntuple(struct net_device *dev,
struct ethtool_rx_ntuple_flow_spec_container *fsc = NULL;
int ret;
+ if (!ops->set_rx_ntuple)
+ return -EOPNOTSUPP;
+
if (!(dev->features & NETIF_F_NTUPLE))
return -EINVAL;