]> git.baikalelectronics.ru Git - kernel.git/commit
ax25: use GFP_KERNEL in ax25_dev_device_up()
authorPeter Lafreniere <pjlafren@mtu.edu>
Thu, 16 Jun 2022 15:23:33 +0000 (11:23 -0400)
committerJakub Kicinski <kuba@kernel.org>
Sat, 18 Jun 2022 03:34:13 +0000 (20:34 -0700)
commite08f853b31e96a14b0e8acd593b2c0ae40e519f9
tree1287dcc6e328ce477a410f9147c302c3b1682c96
parent689e4343118e673f18d8db5ed17c379db7019cf2
ax25: use GFP_KERNEL in ax25_dev_device_up()

ax25_dev_device_up() is only called during device setup, which is
done in user context. In addition, ax25_dev_device_up()
unconditionally calls ax25_register_dev_sysctl(), which already
allocates with GFP_KERNEL.

Since it is allowed to sleep in this function, here we change
ax25_dev_device_up() to use GFP_KERNEL to reduce unnecessary
out-of-memory errors.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Lafreniere <pjlafren@mtu.edu>
Link: https://lore.kernel.org/r/20220616152333.9812-1-pjlafren@mtu.edu
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ax25/ax25_dev.c