linux-uconsole/drivers
hujianyang ad233850c2 UBI: fix soft lockup in ubi_check_volume()
commit 9aa272b492 upstream.

Running mtd-utils/tests/ubi-tests/io_basic.c could cause
soft lockup or watchdog reset. It is because *updatevol*
will perform ubi_check_volume() after updating finish
and this function will full scan the updated lebs if the
volume is initialized as STATIC_VOLUME.

This patch adds *cond_resched()* in the loop of lebs scan
to avoid soft lockup.

Helped by Richard Weinberger <richard@nod.at>

[ 2158.067096] INFO: rcu_sched self-detected stall on CPU { 1}  (t=2101 jiffies g=1606 c=1605 q=56)
[ 2158.172867] CPU: 1 PID: 2073 Comm: io_basic Tainted: G           O 3.10.53 #21
[ 2158.172898] [<c000f624>] (unwind_backtrace+0x0/0x120) from [<c000c294>] (show_stack+0x10/0x14)
[ 2158.172918] [<c000c294>] (show_stack+0x10/0x14) from [<c008ac3c>] (rcu_check_callbacks+0x1c0/0x660)
[ 2158.172936] [<c008ac3c>] (rcu_check_callbacks+0x1c0/0x660) from [<c002b480>] (update_process_times+0x38/0x64)
[ 2158.172953] [<c002b480>] (update_process_times+0x38/0x64) from [<c005ff38>] (tick_sched_handle+0x54/0x60)
[ 2158.172966] [<c005ff38>] (tick_sched_handle+0x54/0x60) from [<c00601ac>] (tick_sched_timer+0x44/0x74)
[ 2158.172978] [<c00601ac>] (tick_sched_timer+0x44/0x74) from [<c003f348>] (__run_hrtimer+0xc8/0x1b8)
[ 2158.172992] [<c003f348>] (__run_hrtimer+0xc8/0x1b8) from [<c003fd9c>] (hrtimer_interrupt+0x128/0x2a4)
[ 2158.173007] [<c003fd9c>] (hrtimer_interrupt+0x128/0x2a4) from [<c0246f1c>] (arch_timer_handler_virt+0x28/0x30)
[ 2158.173022] [<c0246f1c>] (arch_timer_handler_virt+0x28/0x30) from [<c0086214>] (handle_percpu_devid_irq+0x9c/0x124)
[ 2158.173036] [<c0086214>] (handle_percpu_devid_irq+0x9c/0x124) from [<c0082bd8>] (generic_handle_irq+0x20/0x30)
[ 2158.173049] [<c0082bd8>] (generic_handle_irq+0x20/0x30) from [<c000969c>] (handle_IRQ+0x64/0x8c)
[ 2158.173060] [<c000969c>] (handle_IRQ+0x64/0x8c) from [<c0008544>] (gic_handle_irq+0x3c/0x60)
[ 2158.173074] [<c0008544>] (gic_handle_irq+0x3c/0x60) from [<c02f0f80>] (__irq_svc+0x40/0x50)
[ 2158.173083] Exception stack(0xc4043c98 to 0xc4043ce0)
[ 2158.173092] 3c80:                                                       c4043ce4 00000019
[ 2158.173102] 3ca0: 1f8a865f c050ad10 1f8a864c 00000031 c04b5970 0003ebce 00000000 f3550000
[ 2158.173113] 3cc0: bf00bc68 00000800 0003ebce c4043ce0 c0186d14 c0186cb8 80000013 ffffffff
[ 2158.173130] [<c02f0f80>] (__irq_svc+0x40/0x50) from [<c0186cb8>] (read_current_timer+0x4/0x38)
[ 2158.173145] [<c0186cb8>] (read_current_timer+0x4/0x38) from [<1f8a865f>] (0x1f8a865f)
[ 2183.927097] BUG: soft lockup - CPU#1 stuck for 22s! [io_basic:2073]
[ 2184.002229] Modules linked in: nandflash(O) [last unloaded: nandflash]

Signed-off-by: Wang Kai <morgan.wang@huawei.com>
Signed-off-by: hujianyang <hujianyang@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-13 05:15:43 -07:00
..
accessibility
acpi cpuidle: ACPI: do not overwrite name and description of C0 2015-04-19 10:10:49 +02:00
amba
ata sata_dwc_460ex: fix resource leak on error path 2015-01-29 17:40:56 -08:00
atm atm: idt77252: fix dev refcnt leak 2013-12-08 07:29:25 -08:00
auxdisplay
base driver core: Fix unbalanced device reference in drivers_probe 2015-01-16 06:59:01 -08:00
bcma
block rbd: end I/O the entire obj_request on error 2015-05-13 05:15:41 -07:00
bluetooth Bluetooth: Ignore isochronous endpoints for Intel USB bootloader 2015-04-29 10:33:59 +02:00
bus bus: mvebu-mbus: fix support of MBus window 13 2015-01-29 17:40:56 -08:00
cdrom
char tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send 2015-03-26 15:00:58 +01:00
clk clk: sunxi: Support factor clocks with N factor starting not from 0 2015-03-18 13:22:34 +01:00
clocksource clocksource: exynos_mct: Fix bitmask regression for exynos4_mct_write 2015-01-29 17:40:56 -08:00
connector net: Use netlink_ns_capable to verify the permisions of netlink messages 2014-06-26 15:12:37 -04:00
cpufreq cpufreq: speedstep-smi: enable interrupts when waiting 2015-03-06 14:40:48 -08:00
cpuidle cpuidle: Check the result of cpuidle_get_driver() against NULL 2014-04-14 06:42:15 -07:00
crypto crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:57 -08:00
dca
devfreq
dio
dma dmaengine: omap-dma: Fix memory leak when terminating running transfer 2015-04-19 10:10:49 +02:00
edac sb_edac: avoid INTERNAL ERROR message in EDAC with unspecified channel 2015-04-29 10:34:01 +02:00
eisa Revert "EISA: Initialize device before its resources" 2014-02-13 13:47:59 -08:00
extcon extcon: max77693: Fix two NULL pointer exceptions on missing pdata 2014-07-06 18:54:15 -07:00
firewire firewire: cdev: prevent kernel stack leaking into ioctl arguments 2014-11-21 09:22:53 -08:00
firmware efi-pstore: Make efi-pstore return a unique id 2015-02-05 22:35:40 -08:00
gpio gpio: tps65912: fix wrong container_of arguments 2015-03-06 14:40:52 -08:00
gpu drm/i915: cope with large i2c transfers 2015-05-06 21:56:27 +02:00
hid HID: fixup the conflicting keyboard mappings quirk 2015-03-18 13:22:35 +01:00
hsi
hv Drivers: hv: vmbus: Don't wait after requesting offers 2015-05-13 05:15:43 -07:00
hwmon hwmon: (dme1737) Prevent overflow problem when writing large limits 2014-09-05 16:28:35 -07:00
hwspinlock
i2c i2c: core: Export bus recovery functions 2015-05-06 21:56:27 +02:00
ide
idle x86 idle: Repair large-server 50-watt idle-power regression 2014-01-09 12:24:21 -08:00
iio iio: imu: Use iio_trigger_get for indio_dev->trig assignment 2015-04-19 10:10:49 +02:00
infiniband IB/mlx4: Fix WQE LSO segment calculation 2015-05-06 21:56:27 +02:00
input Input: elantech - fix absolute mode setting on some ASUS laptops 2015-05-06 21:56:24 +02:00
iommu iommu/vt-d: Fix an off-by-one bug in __domain_mapping() 2015-01-16 06:59:01 -08:00
ipack
irqchip irqchip: gic: Fix core ID calculation when topology is read from DT 2014-07-28 08:00:06 -07:00
isdn isdnloop: several buffer overflows 2014-04-14 06:42:18 -07:00
leds leds: leds-pwm: properly clean up after probe failure 2014-06-07 13:25:34 -07:00
lguest x86, flags: Rename X86_EFLAGS_BIT1 to X86_EFLAGS_FIXED 2014-11-14 08:47:54 -08:00
macintosh
mailbox
md dm: hold suspend_lock while suspending device during device deletion 2015-04-13 14:02:12 +02:00
media stk1160: Make sure current buffer is released 2015-05-06 21:56:27 +02:00
memory
memstick memstick: mspro_block: add missing curly braces 2015-05-06 21:56:28 +02:00
message mptfusion: enable no_write_same for vmware scsi disks 2014-10-30 09:35:10 -07:00
mfd mfd: tc6393xb: Fail ohci suspend if full state restore is required 2015-01-08 09:58:15 -08:00
misc mei: bus: fix possible boundaries violation 2014-11-21 09:22:55 -08:00
mmc mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles 2015-03-06 14:40:49 -08:00
mtd UBI: fix soft lockup in ubi_check_volume() 2015-05-13 05:15:43 -07:00
net wl18xx: show rx_frames_per_rates as an array as it really is 2015-05-06 21:56:28 +02:00
nfc NFC: microread: Potential overflows in microread_target_discovered() 2014-10-05 14:54:12 -07:00
ntb NTB: Correct debugfs to work with more than 1 NTB Device 2013-11-13 12:05:35 +09:00
nubus
of of/base: Fix PowerPC address parsing hack 2014-12-06 15:05:47 -08:00
oprofile
parisc
parport drivers: parport: Kconfig: exclude arm64 for PARPORT_PC 2015-05-06 21:56:26 +02:00
pci PCI: Fix infinite loop with ROM image of size 0 2015-03-06 14:40:48 -08:00
pcmcia
pinctrl pinctrl: Fix two deadlocks 2015-01-29 17:40:55 -08:00
platform hp_accel: Add support for HP ZBook 15 2015-01-27 07:52:31 -08:00
pnp PNP / ACPI: proper handling of ACPI IO/Memory resource parsing failures 2014-03-23 21:38:22 -07:00
power power_supply: lp8788-charger: Fix leaked power supply on probe fail 2015-05-06 21:56:21 +02:00
pps
ps3
ptp
pwm
rapidio rapidio/tsi721_dma: fix failure to obtain transaction descriptor 2014-08-07 14:30:25 -07:00
regulator regulator: core: Fix enable GPIO reference counting 2015-03-26 15:00:59 +01:00
remoteproc
reset
rpmsg
rtc rtc: rtc-at91rm9200: fix infinite wait for ACKUPD irq 2014-06-26 15:12:37 -04:00
s390 crypto: prefix module autoloading with "crypto-" 2015-01-29 17:40:57 -08:00
sbus bbc-i2c: Fix BBC I2C envctrl on SunBlade 2000 2014-08-14 09:24:16 +08:00
scsi 3w-sas: fix command completion race 2015-05-13 05:15:42 -07:00
sfi
sh
sn
spi spi: spidev: fix possible arithmetic overflow for multi-transfer message 2015-05-06 21:56:21 +02:00
ssb
ssbi
staging staging: panel: fix lcd type 2015-05-13 05:15:42 -07:00
target iscsi target: fix oops when adding reject pdu 2015-04-19 10:10:50 +02:00
tc
thermal
tty serial: of-serial: Remove device_type = "serial" registration 2015-05-13 05:15:41 -07:00
uio Fix a few incorrectly checked [io_]remap_pfn_range() calls 2013-11-13 12:05:33 +09:00
usb usb: gadget: printer: enqueue printer's response for setup request 2015-05-13 05:15:42 -07:00
uwb
vfio vfio-pci: Fix the check on pci device type in vfio_pci_probe() 2015-01-27 07:52:32 -08:00
vhost vhost-scsi: Add missing virtio-scsi -> TCM attribute conversion 2015-02-05 22:35:40 -08:00
video video: vgacon: Don't build on arm64 2015-05-06 21:56:25 +02:00
virt
virtio virtio_pci: fix virtio spec compliance on restore 2014-11-14 08:47:55 -08:00
vlynq
vme VME: Correct read/write alignment algorithm 2014-02-22 12:41:28 -08:00
w1 w1: fix w1_send_slave dropping a slave id 2014-05-06 07:55:28 -07:00
watchdog watchdog: ath79_wdt: avoid spurious restarts on AR934x 2014-07-06 18:54:14 -07:00
xen xen-pciback: limit guest control of command register 2015-03-26 15:00:59 +01:00
zorro
Kconfig
Makefile