diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-01-09 22:58:34 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-11 04:18:52 +0300 |
commit | faf3a932fbeb77860226a8323eacb835edc98648 (patch) | |
tree | 89e9312654f638db3f1723446d57d57d231f74da /net/irda | |
parent | d9584d8ccc06ba98f4fad8ec720de66b6659fd35 (diff) | |
download | linux-faf3a932fbeb77860226a8323eacb835edc98648.tar.xz |
net: dsa: Ensure validity of dst->ds[0]
It is perfectly possible to have non zero indexed switches being present
in a DSA switch tree, in such a case, we will be deferencing a NULL
pointer while dsa_cpu_port_ethtool_{setup,restore}. Be more defensive
and ensure that dst->ds[0] is valid before doing anything with it.
Fixes: 0c73c523cf73 ("net: dsa: Initialize CPU port ethtool ops per tree")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda')
0 files changed, 0 insertions, 0 deletions