]> git.baikalelectronics.ru Git - kernel.git/commit
ip: fix error handling in ip_finish_output2()
authorVasiliy Kulikov <segoon@openwall.com>
Mon, 6 Aug 2012 03:55:29 +0000 (03:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Aug 2012 20:30:01 +0000 (13:30 -0700)
commit423e28f7dbaa8e5e8af418be228b0bdd336f3391
tree85e0fc87c1df524a936d2c0d61a86bd9f994c760
parent66e5a8512f66018f41d0c34f7df547ca52966e07
ip: fix error handling in ip_finish_output2()

__neigh_create() returns either a pointer to struct neighbour or PTR_ERR().
But the caller expects it to return either a pointer or NULL.  Replace
the NULL check with IS_ERR() check.

The bug was introduced in 8f086b3c7315239fc602c6248e8fc37951a989f5
("ipv4: Make neigh lookups directly in output packet path.").

Signed-off-by: Vasily Kulikov <segoon@openwall.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c