summaryrefslogtreecommitdiff
path: root/ipv6.h
AgeCommit message (Expand)AuthorFilesLines
2013-06-04misc: cleanup header commentsDaniel Borkmann1-7/+0
2013-03-15all: import netsniff-ng 0.5.8-rc0 sourceDaniel Borkmann1-0/+39
e='this.form.submit();'>
authorDavid Rivshin <drivshin@allworx.com>2016-04-27 21:32:31 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-28 17:27:29 -0400
commitd733f7542ad47cf73e033c90cf55158587e1d060 (patch)
tree552f4ff79dcecd32d50c614e7ed8e6c4f819524a
parent552165bcf7060b998b4a9b5b86110b6a5e04dfd9 (diff)
drivers: net: cpsw: fix segfault in case of bad phy-handle
If an emac node has a phy-handle property that points to something which is not a phy, then a segmentation fault will occur when the interface is brought up. This is because while phy_connect() will return ERR_PTR() on failure, of_phy_connect() will return NULL. The common error check uses IS_ERR(), and so missed when of_phy_connect() fails. The NULL pointer is then dereferenced. Also, the common error message referenced slave->data->phy_id, which would be empty in the case of phy-handle. Instead, use the name of the device_node as a useful identifier. And in the phy_id case add the error code for completeness. Fixes: 9e42f715264f ("drivers: net: cpsw: add phy-handle parsing") Signed-off-by: David Rivshin <drivshin@allworx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat