net: ethernet: microchip: lan743x: Fix skb allocation failure
authorYuiko Oshino <yuiko.oshino@microchip.com>
Wed, 27 Oct 2021 18:23:02 +0000 (14:23 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Nov 2021 13:10:09 +0000 (14:10 +0100)
commitb93a70bf2b5756dc088d7b7f41dc7d25cc765de8
treeef1ef4aa373bbf380a01c8a33e4c01abf4e57d50
parentb9c85a71e1b4898e978c594a44e881456313a855
net: ethernet: microchip: lan743x: Fix skb allocation failure

commit e8684db191e4164f3f5f3ad7dec04a6734c25f1c upstream.

The driver allocates skb during ndo_open with GFP_ATOMIC which has high chance of failure when there are multiple instances.
GFP_KERNEL is enough while open and use GFP_ATOMIC only from interrupt context.

Fixes: 23f0703c125b ("lan743x: Add main source files for new lan743x driver")
Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/microchip/lan743x_main.c