diff options
author | Maxime Jayat <maxime.jayat@mobile-devices.fr> | 2017-02-21 20:35:51 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-18 08:55:48 +0300 |
commit | 89de640c106731a830ac52566b39d0d417f2817d (patch) | |
tree | 8b2b8601f5be146cc05a070d3dba049186a0284a /drivers/amba | |
parent | ae803f3ffbca73a8ba65759c71ce30f3bbcda83f (diff) | |
download | linux-89de640c106731a830ac52566b39d0d417f2817d.tar.xz |
net: socket: fix recvmmsg not returning error from sock_error
[ Upstream commit e623a9e9dec29ae811d11f83d0074ba254aba374 ]
Commit 34b88a68f26a ("net: Fix use after free in the recvmmsg exit path"),
changed the exit path of recvmmsg to always return the datagrams
variable and modified the error paths to set the variable to the error
code returned by recvmsg if necessary.
However in the case sock_error returned an error, the error code was
then ignored, and recvmmsg returned 0.
Change the error path of recvmmsg to correctly return the error code
of sock_error.
The bug was triggered by using recvmmsg on a CAN interface which was
not up. Linux 4.6 and later return 0 in this case while earlier
releases returned -ENETDOWN.
Fixes: 34b88a68f26a ("net: Fix use after free in the recvmmsg exit path")
Signed-off-by: Maxime Jayat <maxime.jayat@mobile-devices.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/amba')
0 files changed, 0 insertions, 0 deletions