diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-01-09 11:58:34 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-10 20:18:52 -0500 |
commit | faf3a932fbeb77860226a8323eacb835edc98648 (patch) | |
tree | 89e9312654f638db3f1723446d57d57d231f74da /net/qrtr | |
parent | d9584d8ccc06ba98f4fad8ec720de66b6659fd35 (diff) |
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/qrtr')
0 files changed, 0 insertions, 0 deletions