]> git.baikalelectronics.ru Git - kernel.git/commit
net: devlink: skip info_get op call if it is not defined in dumpit
authorJiri Pirko <jiri@mellanox.com>
Sat, 23 Mar 2019 23:21:03 +0000 (00:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Mar 2019 18:25:29 +0000 (11:25 -0700)
commita2b6ff6ee0963122e4d87dd3186430a8a8eb9957
tree7259781362e5ebbe450ffdd305347fdeeea3b655
parent3c059423f5892da5cfef01ddc447b11106d7dfb4
net: devlink: skip info_get op call if it is not defined in dumpit

In dumpit, unlike doit, the check for info_get op being defined
is missing. Add it and avoid null pointer dereference in case driver
does not define this op.

Fixes: e2bf41513891 ("devlink: add device information API")
Reported-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/devlink.c