commit | 5692dbb56e6012c0755614ee64fe4c221f357e7a | [log] [tgz] |
---|---|---|
author | Simon Horman <simon.horman@netronome.com> | Wed Mar 08 08:57:08 2017 -0800 |
committer | David S. Miller <davem@davemloft.net> | Thu Mar 09 16:39:58 2017 -0800 |
tree | 15c1fd7c703b0994ccff2ac1c04118f47bd33e66 | |
parent | b9dcf88a47ebab2743a0c627a95126c4cb3e9883 [diff] |
nfp: prevent theoretical buffer overrun in nfp_eth_read_ports Prevent theoretical buffer overrun by returning an error if the number of entries returned by the firmware does not match those present. Also use a common handling error path. Found by inspection. Signed-off-by: Simon Horman <simon.horman@netronome.com> Tested-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>