virtio_net: Fix missed rtnl_unlock
authorDaniel Jurgens <danielj@nvidia.com>
Wed, 15 May 2024 16:31:25 +0000 (11:31 -0500)
committerJakub Kicinski <kuba@kernel.org>
Fri, 17 May 2024 02:37:41 +0000 (19:37 -0700)
commitfa033def4171d2e4e29d5e3714fb2a5b1fc077e8
treeacec73d23b4989f3f422e5e0a8f36e54f9642016
parente03e7f20ebf7e1611d40d1fdc1bde900fd3335f6
virtio_net: Fix missed rtnl_unlock

The rtnl_lock would stay locked if allocating promisc_allmulti failed.
Also changed the allocation to GFP_KERNEL.

Fixes: ff7c7d9f5261 ("virtio_net: Remove command data from control_buf")
Reported-by: Eric Dumazet <edumaset@google.com>
Link: https://lore.kernel.org/netdev/CANn89iLazVaUCvhPm6RPJJ0owra_oFnx7Fhc8d60gV-65ad3WQ@mail.gmail.com/
Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20240515163125.569743-1-danielj@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/virtio_net.c