Commit Graph

399521 Commits

Author SHA1 Message Date
Jan Kara
f51667e9c7 bdi: avoid oops on device removal
commit 5acda9d12d upstream.

After commit 839a8e8660 ("writeback: replace custom worker pool
implementation with unbound workqueue") when device is removed while we
are writing to it we crash in bdi_writeback_workfn() ->
set_worker_desc() because bdi->dev is NULL.

This can happen because even though bdi_unregister() cancels all pending
flushing work, nothing really prevents new ones from being queued from
balance_dirty_pages() or other places.

Fix the problem by clearing BDI_registered bit in bdi_unregister() and
checking it before scheduling of any flushing work.

Fixes: 839a8e8660

Reviewed-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Derek Basehore <dbasehore@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit bf0972039d)
2014-05-22 21:11:01 +08:00
Derek Basehore
a66396333f backing_dev: fix hung task on sync
commit 6ca738d60c upstream.

bdi_wakeup_thread_delayed() used the mod_delayed_work() function to
schedule work to writeback dirty inodes.  The problem with this is that
it can delay work that is scheduled for immediate execution, such as the
work from sync_inodes_sb().  This can happen since mod_delayed_work()
can now steal work from a work_queue.  This fixes the problem by using
queue_delayed_work() instead.  This is a regression caused by commit
839a8e8660 ("writeback: replace custom worker pool implementation with
unbound workqueue").

The reason that this causes a problem is that laptop-mode will change
the delay, dirty_writeback_centisecs, to 60000 (10 minutes) by default.
In the case that bdi_wakeup_thread_delayed() races with
sync_inodes_sb(), sync will be stopped for 10 minutes and trigger a hung
task.  Even if dirty_writeback_centisecs is not long enough to cause a
hung task, we still don't want to delay sync for that long.

We fix the problem by using queue_delayed_work() when we want to
schedule writeback sometime in future.  This function doesn't change the
timer if it is already armed.

For the same reason, we also change bdi_writeback_workfn() to
immediately queue the work again in the case that the work_list is not
empty.  The same problem can happen if the sync work is run on the
rescue worker.

[jack@suse.cz: update changelog, add comment, use bdi_wakeup_thread_delayed()]
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Alexander Viro <viro@zento.linux.org.uk>
Reviewed-by: Tejun Heo <tj@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Derek Basehore <dbasehore@chromium.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: Benson Leung <bleung@chromium.org>
Cc: Sonny Rao <sonnyrao@chromium.org>
Cc: Luigi Semenzato <semenzato@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

(cherry picked from commit 39305a6ac7)
2014-05-22 21:10:39 +08:00
wlf
38d12ba9ca USB: add dwc_otg_usb_state function for vbus power control. 2014-05-22 17:44:22 +08:00
张晴
77b2eae948 rk3288:pmic:ricoh619:slove pwrkey missed when wakeup;modify some fg error 2014-05-22 16:53:53 +08:00
zwl
eeaf3becf3 rk fb: add set win state in set_par and pan_display that may use for BOX 2014-05-22 16:03:39 +08:00
lintao
3ad1679c5b mmc: host: rk_sdmmc:
When sysyem enter suspend, MHSC would be power-off, and the CD int
    will be trigger after controller power-on sequential flow, it's wrong case
    for sd card always in slot! Move it to routine_card to judge present state
    and decide whether to wakeup screen or not. Now, SHOULD NOT disable vcc_sd
    in regulator_state_mem .

    [28890.551808] mmc_sd_detect(mmc1): Unable to re-detect card (-110)
    [28890.551842] mmc1: card 1234 removed
    [28890.856547] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63)
    [28891.163590] mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
    [28891.163709] rk_sdmmc: BOOT Bus speed=50000000Hz,Bus width=4bits.[mmc1]
    [28891.163766] mmc1: new high speed SDHC card at address 1234
    [28891.164460] mmcblk1: mmc1:1234 SA32G 29.3 GiB
    [28891.165939] mmcblk1: p1
2014-05-22 15:36:27 +08:00
黄涛
a554b12b59 ARM: rockchip: fix rk3288 tsadc_int pinctrl 2014-05-22 15:11:52 +08:00
wlf
a8dda01fcd USB: fix Coding Style. 2014-05-22 11:30:11 +08:00
zwl
b6f6268626 rk fb: modify fb align for improve gpu ddr utilization 2014-05-22 09:22:19 +08:00
黄涛
cdeca016f0 clocksource: rockchip_timer: rk_timer_read_current_value64 return u64 2014-05-22 08:30:40 +08:00
陈亮
2503f7a325 fix bug: ddr freq will not change any more when video quit abnormal 2014-05-21 05:16:45 -07:00
陈亮
7dc0b3f526 ddrfreq: separate ddr from clk frame to fix dead lock and advance performance 2014-05-21 02:11:06 -07:00
ljf
129ae0dd4f rk3288: remove unused files and config (old vpu service) 2014-05-21 16:18:41 +08:00
gwl
924246cd82 WiFi&BT add io reference voltage control to reducing power consumption, default is disabled. 2014-05-20 17:24:15 +08:00
陈金泉
577fa13a2f audio coding style : use pr_err and pr_info to replace printk 2014-05-20 17:03:42 +08:00
陈金泉
31b39493ff Audio : Change coding style 2014-05-20 16:20:02 +08:00
wdc
c6e662a3d7 i2c: fix i2c transfer error when irqs disabled 2014-05-20 14:16:16 +08:00
hjc
5ee3dd9a45 rk fb: sync with hwc when wait at fb 2014-05-20 12:14:36 +08:00
郭毅
abec95fe27 rtc: fix some bug of rtc-HYM8563 and change default rtc to HYM8563 2014-05-20 11:08:56 +08:00
黄涛
45023a5f42 rk: cpufreq: interactive: support touch boost and adjust param 2014-05-20 11:02:32 +08:00
wlf
b38a7c86d9 USB: Fix NULL pointer bug when handle data toggle error interrupt. 2014-05-20 10:27:24 +08:00
wdc
2ad68c18b8 rk_keys: not to read adc value when suspend 2014-05-19 21:56:55 +08:00
wlf
6e03b7cca2 USB: Improve transmission performance of the mass storage. 2014-05-19 18:27:21 +08:00
gwl
f970a4594d WiFi:bcmdhd: add rockchip_wifi_set_carddetect(0) to remove device when turn off wifi. 2014-05-19 17:56:59 +08:00
hcy
1336657f18 fix LPDDR2 bandwidth cause VOP empty interrupt 2014-05-19 15:48:45 +08:00
郭毅
4025e68859 p977: dts: change emmc freq to 100M and modify hym8563's i2c address 2014-05-19 09:57:54 +08:00
黄涛
d503f603b8 ARM: rockchip: last log v3.0 2014-05-19 08:53:00 +08:00
xjh
c65a51d45d MIPI:1. reduce charge pump current 2.rmove interrupt 3. remove info print 2014-05-16 18:14:43 +08:00
hjc
8dea5b71db rk fb: delete acq wait message 2014-05-16 15:05:22 +08:00
lintao
a129ac03e6 mmc: host: rk_sdmmc: fix clksum divider 2 before controller 2014-05-16 10:32:58 +08:00
陈亮
810a696ac0 rk3288-tb: adjust arm and gpu dvfs table for syr82x dcdc 2014-05-15 18:11:47 -07:00
lintao
d00e874ad8 mmc: host: rk_sdmmc: fix IP bug for div larger than 1 2014-05-15 18:22:14 +08:00
郭毅
f8bb89bc7d p977_8846: support act8846 device shutdown and limit arm'freq to 1.6G 2014-05-15 17:38:39 +08:00
张晴
e1053d40cd rk3288:pmic:act8846:support act8846 device shutdown 2014-05-15 16:31:23 +08:00
ljf
8449a93af7 rk3288: deactivate iommu before power off, get rid of warnning from iommu module 2014-05-15 15:24:45 +08:00
ljf
1208acba8a rk3288: enable iep iommu mode when iommu driver available 2014-05-15 09:58:53 +08:00
wdc
623e2be92c saradc: fix sometimes adc print log frequently 2014-05-14 18:03:47 +08:00
郭毅
a8b85ba099 p977: 8846_dts: disabled unused pwm1 to make pmic_vsel work fine; 2014-05-14 17:42:02 +08:00
张晴
74e7271062 rk3288:pmic:act8846:modify vsel pin level 2014-05-14 16:59:02 +08:00
yxj
b9ef752097 rk32 dp: use clk_prepare_enable and clk_disable_unprepare 2014-05-14 16:26:53 +08:00
郭毅
7e93db1b10 p977: dts: modify wrong voltage of 400M gpu 2014-05-14 16:23:58 +08:00
郭毅
fce758e999 p977: dts: add rk3288-p977_8846.dts
if your p977's pmu is act8846 please make rk3288-p977_8846.img
2014-05-14 16:10:24 +08:00
郭毅
6b6d790ed2 rtc : support for rtc-HYM8563 2014-05-14 15:56:28 +08:00
zwl
55fe2104bb rk hdmi: fix hdmi win state err when suspend 2014-05-14 14:34:03 +08:00
dkl
70edad0ad8 ddrfreq && dvfs: change the notify events listened to.
Change the notify events listened to from RK_CLK_PD_PRE_ENABLE/DISABLE
to RK_CLK_PD_PREPARE/UNPREPARE.
2014-05-14 14:05:16 +08:00
dkl
b4cae74732 clk: pd: rockchip: add notify when clk_pd_prepare/unprepare 2014-05-14 14:00:47 +08:00
yxj
7d857804a0 rk fb: alloc framebuffer from vmalloc when iommu enabled 2014-05-14 11:20:47 +08:00
CMY
2305db926f Revert "rk: ion: support cache ops for CMA heap"
This reverts commit 98ad00141c.

Conflicts:
	drivers/staging/android/ion/ion.c
	drivers/staging/android/ion/ion_cma_heap.c
	drivers/staging/android/ion/ion_priv.h
2014-05-14 10:40:01 +08:00
zwl
9af754f0e9 rk32 lvds: fix lvds no display when resume 2014-05-14 10:19:14 +08:00
yxj
c262b3b4db rk fb:fix compile err with iommu 2014-05-14 09:18:09 +08:00