Bug 97331 - do not call blocking ops when !TASK_RUNNING
Summary: do not call blocking ops when !TASK_RUNNING
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Console/Framebuffers (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: James Simmons
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-26 21:15 UTC by Stas Sergeev
Modified: 2015-06-20 20:00 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.0.0-rc6+ git
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Stas Sergeev 2015-04-26 21:15:30 UTC
Hello.

Whenever I paste with mouse into non-kms console, I
am getting this (fully reproducable):

[  305.868525] ------------[ cut here ]------------
[  305.868613] WARNING: CPU: 3 PID: 4320 at kernel/sched/core.c:7287 __might_sle
ep+0x87/0x90()
[  305.868698] do not call blocking ops when !TASK_RUNNING; state=1 set at [<fff
fffff8138d55e>] paste_selection+0x9e/0x190

[  305.873317] Call Trace:
[  305.873398]  [<ffffffff81541bcd>] dump_stack+0x4f/0x7b
[  305.873480]  [<ffffffff810533fb>] warn_slowpath_common+0x8b/0xd0
[  305.873562]  [<ffffffff81053481>] warn_slowpath_fmt+0x41/0x50
[  305.873644]  [<ffffffff8138d55e>] ? paste_selection+0x9e/0x190
[  305.873759]  [<ffffffff8138d55e>] ? paste_selection+0x9e/0x190
[  305.873841]  [<ffffffff810759f7>] __might_sleep+0x87/0x90
[  305.873923]  [<ffffffff8154900f>] down_read+0x1f/0x60
[  305.874005]  [<ffffffff8138253a>] n_tty_receive_buf_common+0x4a/0xcc0
[  305.874088]  [<ffffffff81099a65>] ? mark_held_locks+0x75/0xa0
[  305.874184]  [<ffffffff8154aafd>] ? _raw_spin_unlock_irqrestore+0x6d/0x90
[  305.874267]  [<ffffffff81099bcd>] ? trace_hardirqs_on_caller+0x13d/0x1e0
[  305.874349]  [<ffffffff813831bf>] n_tty_receive_buf2+0xf/0x20
[  305.874431]  [<ffffffff8138d618>] paste_selection+0x158/0x190
[  305.874514]  [<ffffffff8107b9b0>] ? wake_up_state+0x10/0x10
[  305.874596]  [<ffffffff813956d0>] tioclinux+0xb0/0x2b0
[  305.874678]  [<ffffffff8118408c>] ? path_openat+0x6c/0x690
[  305.874760]  [<ffffffff8138a66f>] vt_ioctl+0x22f/0x1450
[  305.874842]  [<ffffffff8109a4fb>] ? __lock_acquire+0x40b/0x1880
[  305.874925]  [<ffffffff8137d3a1>] tty_ioctl+0x411/0xce0
[  305.875040]  [<ffffffff81188648>] do_vfs_ioctl+0x2f8/0x540
[  305.875122]  [<ffffffff8154aa20>] ? _raw_spin_unlock+0x30/0x60
[  305.875205]  [<ffffffff81113288>] ? context_tracking_user_exit+0x68/0xf0
[  305.875288]  [<ffffffff81099bcd>] ? trace_hardirqs_on_caller+0x13d/0x1e0
[  305.875370]  [<ffffffff811888d7>] SyS_ioctl+0x47/0x90
[  305.875452]  [<ffffffff8154b689>] system_call_fastpath+0x12/0x17
[  305.875534] ---[ end trace be98f3dc1989f494 ]---
Comment 1 Andreas Mohr 2015-06-20 20:00:57 UTC
Confirmed (-rc5, when using gpm on text tty, middle button):

[  162.292047] ------------[ cut here ]------------
[  162.292317] WARNING: CPU: 0 PID: 3973 at kernel/sched/core.c:7286 __might_sleep+0x77/0x90()
[  162.292822] do not call blocking ops when !TASK_RUNNING; state=1 set at [<c1312ff9>] paste_selection+0x89/0x160
[  162.293438] Modules linked in: zram lz4_compress lz4_decompress joydev usbhid radeon uhci_hcd ehci_hcd snd_pcsp snd_als4000 snd_azt3328 snd_sb_common usbcore sr_mod snd_via82xx snd_opl3_lib serio_raw cdrom sg usb_common snd_hwdep snd_ac97_codec ac97_bus drm_kms_helper ttm i2c_viapro snd_mpu401_uart snd_rawmidi snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_device 8250 serial_core snd_timer snd gameport w83627hf hwmon_vid rtc_cmos via_rhine mii psmouse fuse parport_pc ppdev lp parport
[  162.296943] CPU: 0 PID: 3973 Comm: gpm Not tainted 4.1.0-rc5-00080-ge10470f #9
[  162.297359] Hardware name: VIA Technologies, Inc. VT8367-8235/VT8367-8235, BIOS 6.00 PG 09/16/2003
[  162.297896]  dee63d1c dee63d1c dee63cd8 c1488c0e dee63d0c c103b50e c15ee5e0 dee63d38
[  162.298447]  00000f85 c15eb4c4 00001c76 c1053a57 00001c76 c1053a57 c1312ff9 00000001
[  162.298999]  dd12af3c dee63d24 c103b56e 00000009 dee63d1c c15ee5e0 dee63d38 dee63d58
[  162.299552] Call Trace:
[  162.299642]  [<c1488c0e>] dump_stack+0x16/0x18
[  162.299868]  [<c103b50e>] warn_slowpath_common+0x7e/0xb0
[  162.300179]  [<c1053a57>] ? __might_sleep+0x77/0x90
[  162.300432]  [<c1053a57>] ? __might_sleep+0x77/0x90
[  162.300684]  [<c1312ff9>] ? paste_selection+0x89/0x160
[  162.300954]  [<c103b56e>] warn_slowpath_fmt+0x2e/0x30
[  162.301218]  [<c1053a57>] __might_sleep+0x77/0x90
[  162.301457]  [<c1312ff9>] ? paste_selection+0x89/0x160
[  162.301727]  [<c1312ff9>] ? paste_selection+0x89/0x160
[  162.301998]  [<c148b067>] down_read+0x17/0x30
[  162.302212]  [<c1309dfe>] n_tty_receive_buf_common+0x2e/0xa30
[  162.302526]  [<c148bf83>] ? ldsem_down_read+0x23/0x190
[  162.302795]  [<c130a81a>] n_tty_receive_buf2+0x1a/0x20
[  162.303063]  [<c130a800>] ? n_tty_receive_buf_common+0xa30/0xa30
[  162.303394]  [<c1313042>] paste_selection+0xd2/0x160
[  162.303653]  [<c10542b0>] ? wake_up_process+0x40/0x40
[  162.303918]  [<c1319f07>] tioclinux+0xa7/0x290
[  162.336223]  [<c13108ec>] vt_ioctl+0x1dc/0x1310
[  162.368304]  [<c10f2c35>] ? dput+0xb5/0x1d0
[  162.400283]  [<c10fa23b>] ? mntput+0x1b/0x30
[  162.432059]  [<c10e7fcd>] ? terminate_walk+0x3d/0x40
[  162.463812]  [<c10ea4d7>] ? do_last.isra.46+0xc7/0xcb0
[  162.495264]  [<c1310710>] ? complete_change_console+0xd0/0xd0
[  162.526620]  [<c13066aa>] tty_ioctl+0x38a/0xac0
[  162.557893]  [<c1053a0c>] ? __might_sleep+0x2c/0x90
[  162.589025]  [<c1053a0c>] ? __might_sleep+0x2c/0x90
[  162.619882]  [<c13055cd>] ? __tty_fasync+0x4d/0xf0
[  162.650621]  [<c127566a>] ? _copy_to_user+0x3a/0x50
[  162.681357]  [<c10e4297>] ? cp_new_stat64+0xf7/0x110
[  162.712031]  [<c1306320>] ? no_tty+0x20/0x20
[  162.742559]  [<c10efb82>] do_vfs_ioctl+0x322/0x550
[  162.772833]  [<c10e4563>] ? SyS_fstat64+0x23/0x30
[  162.802883]  [<c10efde8>] SyS_ioctl+0x38/0x70
[  162.832825]  [<c148c510>] syscall_call+0x7/0x7
[  162.862598] ---[ end trace 672836810ebbcd0c ]---

Note You need to log in before you can comment on or make changes to this bug.