ethtool: fix error paths in ethnl_set_channels()
authorIvan Vecera <ivecera@redhat.com>
Tue, 15 Dec 2020 09:08:10 +0000 (10:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Jan 2021 13:56:48 +0000 (14:56 +0100)
commit95fcb69c491e976affb135a40cbd1d19b98bb02f
tree0621455b871c5407fe4dee77677fa9c6227ae229
parentaeab3d7a04f8127fa81e3e763914122ad260c930
ethtool: fix error paths in ethnl_set_channels()

[ Upstream commit ef72cd3c5ce168829c6684ecb2cae047d3493690 ]

Fix two error paths in ethnl_set_channels() to avoid lock-up caused
but unreleased RTNL.

Fixes: e19c591eafad ("ethtool: set device channel counts with CHANNELS_SET request")
Reported-by: LiLiang <liali@redhat.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Link: https://lore.kernel.org/r/20201215090810.801777-1-ivecera@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ethtool/channels.c