android_kernel_motorola_sm6225/drivers
Taehee Yoo 0a5eca2c94 gtp: fix Illegal context switch in RCU read-side critical section.
[ Upstream commit 3f167e1921865b379a9becf03828e7202c7b4917 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-07-26 09:14:17 +02:00
..
accessibility
acpi ACPICA: Clear status of GPEs on first direct enable 2019-07-26 09:14:09 +02:00
amba
android binder: fix memory leak in error path 2019-07-14 08:11:21 +02:00
ata libata: don't request sense data on !ZAC ATA devices 2019-07-26 09:14:12 +02:00
atm atm: he: fix sign-extension overflow on large shift 2019-02-27 10:08:57 +01:00
auxdisplay auxdisplay: hd44780: Fix memory leak on ->remove() 2019-04-20 09:15:55 +02:00
base regmap: fix bulk writes on paged registers 2019-07-26 09:14:06 +02:00
bcma
block block: null_blk: fix race condition for null_del_dev 2019-07-26 09:14:07 +02:00
bluetooth Bluetooth: Add new 13d3:3501 QCA_ROME device 2019-07-26 09:14:16 +02:00
bus
cdrom cdrom: Fix race condition in cdrom_sysctl_register 2019-04-05 22:33:10 +02:00
char hwrng: omap - Set default quality 2019-05-31 06:46:31 -07:00
clk clk: ti: clkctrl: Fix returning uninitialized data 2019-07-21 09:03:04 +02:00
clocksource clocksource/drivers/exynos_mct: Increase priority over ARM arch timer 2019-07-26 09:14:12 +02:00
connector connector: fix unsafe usage of ->real_parent 2019-03-19 13:12:38 +01:00
cpufreq cpufreq: kirkwood: fix possible object reference leak 2019-05-31 06:46:24 -07:00
cpuidle cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:47:08 +01:00
crypto crypto: inside-secure - do not rely on the hardware last bit for result descriptors 2019-07-26 09:14:04 +02:00
dax mm/huge_memory: fix vmf_insert_pfn_{pmd, pud}() crash, handle unaligned addresses 2019-05-22 07:37:40 +02:00
dca
devfreq
dio
dma dmaengine: imx-sdma: fix use-after-free on probe error path 2019-07-26 09:13:56 +02:00
dma-buf
edac EDAC: Fix global-out-of-bounds write when setting edac_mc_poll_msec 2019-07-26 09:14:13 +02:00
eisa
extcon extcon: arizona: Disable mic detect if running when driver is removed 2019-05-31 06:46:23 -07:00
firewire
firmware efi/bgrt: Drop BGRT status field reserved bits check 2019-07-21 09:03:04 +02:00
fmc
fpga fpga: dfl: Add lockdep classes for pdata->lock 2019-06-25 11:35:55 +08:00
fsi
gnss gnss: sirf: fix premature wakeup interrupt enable 2019-03-10 07:17:21 +01:00
gpio gpiolib: Fix references to gpiod_[gs]et_*value_cansleep() variants 2019-07-26 09:14:16 +02:00
gpu drm/udl: move to embedding drm device inside udl device. 2019-07-21 09:03:18 +02:00
hid HID: multitouch: Add pointstick support for ALPS Touchpad 2019-07-21 09:03:10 +02:00
hsi
hv Drivers: hv: vmbus: Remove the undesired put_cpu_ptr() in hv_synic_cleanup() 2019-05-10 17:54:04 +02:00
hwmon hwmon: (pmbus/core) Treat parameters as paged if on multiple pages 2019-06-25 11:35:59 +08:00
hwspinlock
hwtracing intel_th: msu: Fix single mode with IOMMU 2019-05-25 18:23:26 +02:00
i2c i2c: pca-platform: Fix GPIO lookup code 2019-07-10 09:53:39 +02:00
ide ide: fix a typo in the settings proc file name 2019-01-31 08:14:42 +01:00
idle x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
iio iio: temperature: mlx90632 Relax the compatibility check 2019-06-25 11:35:54 +08:00
infiniband ipoib: correcly show a VF hardware address 2019-07-26 09:14:08 +02:00
input Input: synaptics - enable SMBUS on T480 thinkpad trackpad 2019-07-21 09:03:02 +02:00
iommu iommu: Fix a leak in iommu_insert_resv_region 2019-07-26 09:14:06 +02:00
ipack
irqchip irqchip/meson-gpio: Add support for Meson-G12A SoC 2019-07-26 09:14:06 +02:00
isdn mISDN: make sure device name is NUL terminated 2019-06-22 08:15:16 +02:00
leds leds: trigger: netdev: use memcpy in device_name_store 2019-05-04 09:20:22 +02:00
lightnvm lightnvm: pblk: fix freeing of merged pages 2019-07-26 09:14:09 +02:00
macintosh
mailbox mailbox: stm32-ipcc: check invalid irq 2019-06-15 11:54:04 +02:00
mcb
md bcache: fix potential deadlock in cached_def_free() 2019-07-26 09:14:13 +02:00
media media: hdpvr: fix locking and a missing msleep 2019-07-26 09:14:11 +02:00
memory memory: tegra: Fix integer overflow on tick value calculation 2019-05-25 18:23:32 +02:00
memstick memstick: Prevent memstick host from getting runtime suspended during card detection 2019-02-12 19:47:10 +01:00
message
mfd mfd: twl6040: Fix device init errors for ACCCTL register 2019-06-15 11:54:03 +02:00
misc VMCI: Fix integer overflow in VMCI handle arrays 2019-07-14 08:11:21 +02:00
mmc mmc: core: complete HS400 before checking status 2019-07-14 08:11:13 +02:00
mtd mtd: spinand: macronix: Fix ECC Status Read 2019-06-11 12:20:50 +02:00
mux
net gtp: fix Illegal context switch in RCU read-side critical section. 2019-07-26 09:14:17 +02:00
nfc spi: ST ST95HF NFC: declare missing of table 2019-05-16 19:41:25 +02:00
ntb
nubus
nvdimm libnvdimm: Fix compilation warnings with W=1 2019-06-19 08:18:03 +02:00
nvme nvme-pci: set the errno on ctrl state change error 2019-07-26 09:14:09 +02:00
nvmem nvmem: sunxi_sid: Support SID on A83T and H5 2019-06-15 11:54:07 +02:00
of of: overlay: set node fields from properties when add new overlay node 2019-06-09 09:17:24 +02:00
opp OPP: Use opp_table->regulators to verify no regulator case 2019-02-12 19:47:08 +01:00
oprofile
parisc parisc: Use implicit space register selection for loading the coherence index of I/O pdirs 2019-06-11 12:20:51 +02:00
parport parport: Fix mem leak in parport_register_dev_model 2019-06-25 11:35:55 +08:00
pci ACPI/PCI: PM: Add missing wakeup.flags.valid checks 2019-06-22 08:15:17 +02:00
pcmcia
perf perf/arm-cci: Remove broken race mitigation 2019-05-31 06:46:17 -07:00
phy phy: mapphone-mdm6600: add gpiolib dependency 2019-05-31 06:46:20 -07:00
pinctrl pinctrl: mediatek: Update cur_mask in mask/mask ops 2019-07-21 09:03:11 +02:00
platform platform/mellanox: mlxreg-hotplug: Add devm_free_irq call to remove flow 2019-07-10 09:53:38 +02:00
pnp
power power: supply: max14656: fix potential use-before-alloc 2019-06-15 11:54:09 +02:00
powercap x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:17:53 +02:00
pps
ps3
ptp ptp: Fix pass zero to ERR_PTR() in ptp_clock_register 2019-02-12 19:47:01 +01:00
pwm pwm: Fix deadlock warning when removing PWM device 2019-06-15 11:54:10 +02:00
rapidio rapidio: fix a NULL pointer dereference when create_workqueue() fails 2019-06-15 11:53:59 +02:00
ras RAS/CEC: Fix pfn insertion 2019-07-26 09:14:05 +02:00
regulator regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting 2019-04-05 22:33:15 +02:00
remoteproc
reset reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev 2019-05-08 07:21:47 +02:00
rpmsg
rtc rtc: pcf8523: don't return invalid date when battery is low 2019-06-19 08:18:07 +02:00
s390 s390/qdio: handle PENDING state for QEBSM devices 2019-07-26 09:14:04 +02:00
sbus
scsi scsi: qedi: Check targetname while finding boot target information 2019-07-14 08:11:15 +02:00
sfi
sh
siox
slimbus slimbus: fix a potential NULL pointer dereference in of_qcom_slim_ngd_register 2019-05-31 06:46:14 -07:00
sn
soc soc: bcm: brcmstb: biuctrl: Register writes require a barrier 2019-07-14 08:11:03 +02:00
soundwire soundwire: intel: set dai min and max channels correctly 2019-07-14 08:11:07 +02:00
spi spi: bitbang: Fix NULL pointer dereference in spi_unregister_master 2019-07-10 09:53:32 +02:00
spmi
ssb ssb: Fix possible NULL pointer dereference in ssb_host_pcmcia_exit 2019-05-31 06:46:04 -07:00
staging media: staging: media: davinci_vpfe: - Fix for memory leak if decoder initialization fails. 2019-07-26 09:14:02 +02:00
target scsi: iscsi: set auth_protocol back to NULL if CHAP_A value is not supported 2019-07-26 09:13:56 +02:00
tc
tee tee: optee: avoid possible double list_del() 2019-02-12 19:47:08 +01:00
thermal drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER 2019-06-15 11:54:02 +02:00
thunderbolt thunderbolt: property: Fix a NULL pointer dereference 2019-05-31 06:46:31 -07:00
tty Revert "serial: 8250: Don't service RX FIFO if interrupts are disabled" 2019-07-14 08:11:19 +02:00
uio
usb drivers/usb/typec/tps6598x.c: fix 4CC cmd write 2019-07-14 08:11:20 +02:00
uwb
vfio vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING" 2019-06-15 11:54:07 +02:00
vhost vhost_net: disable zerocopy by default 2019-07-26 09:14:08 +02:00
video video: imsttfb: fix potential NULL pointer dereferences 2019-06-15 11:54:10 +02:00
virt drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl 2019-05-16 19:41:31 +02:00
virtio virtio_pci: fix a NULL pointer reference in vp_del_vqs 2019-05-10 17:54:08 +02:00
visorbus
vlynq
vme
w1 w1: fix the resume command API 2019-05-31 06:46:14 -07:00
watchdog watchdog: fix compile time error of pretimeout governors 2019-06-15 11:54:06 +02:00
xen xenbus: Avoid deadlock during suspend due to open transactions 2019-06-22 08:15:19 +02:00
zorro
Kconfig
Makefile