net: rmnet: use GFP_KERNEL instead of GFP_ATOMIC
authorTaehee Yoo <ap420073@gmail.com>
Wed, 4 Mar 2020 23:25:43 +0000 (23:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Mar 2020 19:47:10 +0000 (11:47 -0800)
In the current code, rmnet_register_real_device() and rmnet_newlink()
are using GFP_ATOMIC.
But, these functions are allowed to sleep.
So, GFP_KERNEL can be used.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c

index 63d0c20..1305522 100644 (file)
@@ -57,7 +57,7 @@ static int rmnet_register_real_device(struct net_device *real_dev)
        if (rmnet_is_real_dev_registered(real_dev))
                return 0;
 
-       port = kzalloc(sizeof(*port), GFP_ATOMIC);
+       port = kzalloc(sizeof(*port), GFP_KERNEL);
        if (!port)
                return -ENOMEM;
 
@@ -127,7 +127,7 @@ static int rmnet_newlink(struct net *src_net, struct net_device *dev,
                return -ENODEV;
        }
 
-       ep = kzalloc(sizeof(*ep), GFP_ATOMIC);
+       ep = kzalloc(sizeof(*ep), GFP_KERNEL);
        if (!ep)
                return -ENOMEM;