]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
sh_eth: fix invalid context bug while calling auto-negotiation by ethtool
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Wed, 4 Jul 2018 08:12:39 +0000 (11:12 +0300)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:43:25 +0000 (19:43 -0600)
commitc154d939e24af0e528a2ff0eaeabef20a3328d2d
tree42fef51d42657cafc3dda40ca4e2d42a7aee80b6
parent713490b134f5ff58feffb3500a94e68649e2e48e
sh_eth: fix invalid context bug while calling auto-negotiation by ethtool

BugLink: https://bugs.launchpad.net/bugs/1835845
[ Upstream commit 53a710b5044d8475faa6813000b6dd659400ef7b ]

Since commit 35b5f6b1a82b ("PHYLIB: Locking fixes for PHY I/O
potentially sleeping") phy_start_aneg() function utilizes a mutex
to serialize changes to phy state, however the helper function is
called in atomic context.

The bug can be reproduced by running "ethtool -r" command, the bug
is reported if CONFIG_DEBUG_ATOMIC_SLEEP build option is enabled.

Fixes: dc19e4e5e02f ("sh: sh_eth: Add support ethtool")
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/renesas/sh_eth.c