linux_dsm_epyc7002/drivers/net
Taehee Yoo 3f167e1921 gtp: fix Illegal context switch in RCU read-side critical section.
ipv4_pdp_add() is called in RCU read-side critical section.
So GFP_KERNEL should not be used in the function.
This patch make ipv4_pdp_add() to use GFP_ATOMIC instead of GFP_KERNEL.

Test commands:
gtp-link add gtp1 &
gtp-tunnel add gtp1 v1 100 200 1.1.1.1 2.2.2.2

Splat looks like:
[  130.618881] =============================
[  130.626382] WARNING: suspicious RCU usage
[  130.626994] 5.2.0-rc6+ #50 Not tainted
[  130.627622] -----------------------------
[  130.628223] ./include/linux/rcupdate.h:266 Illegal context switch in RCU read-side critical section!
[  130.629684]
[  130.629684] other info that might help us debug this:
[  130.629684]
[  130.631022]
[  130.631022] rcu_scheduler_active = 2, debug_locks = 1
[  130.632136] 4 locks held by gtp-tunnel/1025:
[  130.632925]  #0: 000000002b93c8b7 (cb_lock){++++}, at: genl_rcv+0x15/0x40
[  130.634159]  #1: 00000000f17bc999 (genl_mutex){+.+.}, at: genl_rcv_msg+0xfb/0x130
[  130.635487]  #2: 00000000c644ed8e (rtnl_mutex){+.+.}, at: gtp_genl_new_pdp+0x18c/0x1150 [gtp]
[  130.636936]  #3: 0000000007a1cde7 (rcu_read_lock){....}, at: gtp_genl_new_pdp+0x187/0x1150 [gtp]
[  130.638348]
[  130.638348] stack backtrace:
[  130.639062] CPU: 1 PID: 1025 Comm: gtp-tunnel Not tainted 5.2.0-rc6+ #50
[  130.641318] Call Trace:
[  130.641707]  dump_stack+0x7c/0xbb
[  130.642252]  ___might_sleep+0x2c0/0x3b0
[  130.642862]  kmem_cache_alloc_trace+0x1cd/0x2b0
[  130.643591]  gtp_genl_new_pdp+0x6c5/0x1150 [gtp]
[  130.644371]  genl_family_rcv_msg+0x63a/0x1030
[  130.645074]  ? mutex_lock_io_nested+0x1090/0x1090
[  130.645845]  ? genl_unregister_family+0x630/0x630
[  130.646592]  ? debug_show_all_locks+0x2d0/0x2d0
[  130.647293]  ? check_flags.part.40+0x440/0x440
[  130.648099]  genl_rcv_msg+0xa3/0x130
[ ... ]

Fixes: 459aa660eb ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-07-07 18:42:47 -07:00
..
appletalk treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
arcnet treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
bonding bonding: validate ip header before check IPPROTO_IGMP 2019-07-03 13:26:12 -07:00
caif treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
can SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
dsa net: dsa: mv88e6xxx: wait after reset deactivation 2019-06-29 12:21:18 -07:00
ethernet net: hns: add support for vlan TSO 2019-07-03 11:48:49 -07:00
fddi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fjes treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 308 2019-06-05 17:37:04 +02:00
hamradio treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 400 2019-06-05 17:37:13 +02:00
hippi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 128 2019-05-30 11:25:13 -07:00
hyperv hv_netvsc: Set probe mode to sync 2019-06-14 19:47:05 -07:00
ieee802154 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 372 2019-06-05 17:37:10 +02:00
ipvlan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-07 09:29:14 -07:00
netdevsim netdevsim: Make nsim_num_vf static 2019-05-05 10:48:45 -07:00
phy Revert "net: phylink: set the autoneg state in phylink_phy_change" 2019-06-15 18:10:30 -07:00
plip treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ppp ppp: mppe: Add softdep to arc4 2019-06-22 09:44:23 -04:00
slip treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
team team: Always enable vlan tx offload 2019-06-26 10:14:08 -07:00
usb r8152: set RTL8152_UNPLUG only for real disconnection 2019-07-05 15:37:32 -07:00
vmxnet3
wan treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 426 2019-06-05 17:37:16 +02:00
wimax treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 268 2019-06-05 17:30:29 +02:00
wireless mt76: usb: fix rx A-MSDU support 2019-06-27 19:48:36 +03:00
xen-netback treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
dummy.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
eql.c
geneve.c SPDX update for 5.2-rc6 2019-06-21 09:58:42 -07:00
gtp.c gtp: fix Illegal context switch in RCU read-side critical section. 2019-07-07 18:42:47 -07:00
ifb.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
LICENSE.SRC
loopback.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
macsec.c macsec: fix checksumming after decryption 2019-07-02 14:12:29 -07:00
macvlan.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
macvtap.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
Makefile net: Always descend into dsa/ 2019-05-14 15:20:11 -07:00
mdio.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mii.c
net_failover.c
netconsole.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 153 2019-05-30 11:26:32 -07:00
nlmon.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
ntb_netdev.c
rionet.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sb1000.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
Space.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sungem_phy.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
tap.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
thunderbolt.c
tun.c tun: wake up waitqueues after IFF_UP is set 2019-06-18 10:46:52 -07:00
veth.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
virtio_net.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
vrf.c ipv6: constify rt6_nexthop() 2019-06-26 13:26:08 -07:00
vsockmon.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
vxlan.c vxlan: do not destroy fdb if register_netdevice() is failed 2019-07-01 19:06:02 -07:00
xen-netfront.c