[PATCH 4.14 45/81] vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING"

2019-06-13 Thread Greg Kroah-Hartman
ask to TASK_INTERRUPTIBLE, before doing the condition check. This means that we will try to acquire the mutex while already in a sleeping state. The scheduler warns us by giving the following warning: [ 4050.264464] [ cut here ] [ 4050.264508] do not call blocking ops w

[PATCH 4.19 069/118] vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING"

2019-06-13 Thread Greg Kroah-Hartman
ask to TASK_INTERRUPTIBLE, before doing the condition check. This means that we will try to acquire the mutex while already in a sleeping state. The scheduler warns us by giving the following warning: [ 4050.264464] [ cut here ] [ 4050.264508] do not call blocking ops w

[PATCH 5.1 088/155] vfio: Fix WARNING "do not call blocking ops when !TASK_RUNNING"

2019-06-13 Thread Greg Kroah-Hartman
ask to TASK_INTERRUPTIBLE, before doing the condition check. This means that we will try to acquire the mutex while already in a sleeping state. The scheduler warns us by giving the following warning: [ 4050.264464] [ cut here ] [ 4050.264508] do not call blocking ops w

[PATCH 4.9 25/41] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-08-14 Thread Greg Kroah-Hartman
4.9-stable review patch. If anyone has any objections, please let me know. -- From: Ian Abbott commit cef988642cdac44e910a27cb6e8166c96f86a0df upstream. Comedi's read and write file operation handlers (`comedi_read()` and `comedi_write()`) currently call `copy_to_user()` or `c

[PATCH 4.12 36/65] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-08-14 Thread Greg Kroah-Hartman
4.12-stable review patch. If anyone has any objections, please let me know. -- From: Ian Abbott commit cef988642cdac44e910a27cb6e8166c96f86a0df upstream. Comedi's read and write file operation handlers (`comedi_read()` and `comedi_write()`) currently call `copy_to_user()` or `

Re: [PATCH] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-08-01 Thread Piotr Gregor
On Fri, Jul 28, 2017 at 04:22:31PM +0100, Ian Abbott wrote: > Comedi's read and write file operation handlers (`comedi_read()` and > `comedi_write()`) currently call `copy_to_user()` or `copy_from_user()` > whilst in the `TASK_INTERRUPTIBLE` state, which falls foul of the > `might_fault()` checks w

[PATCH] staging: comedi: comedi_fops: do not call blocking ops when !TASK_RUNNING

2017-07-28 Thread Ian Abbott
Comedi's read and write file operation handlers (`comedi_read()` and `comedi_write()`) currently call `copy_to_user()` or `copy_from_user()` whilst in the `TASK_INTERRUPTIBLE` state, which falls foul of the `might_fault()` checks when enabled. Fix it by setting the current task state back to `TASK

Re: [BUG] drivers: staging: comedi: do not call blocking ops when !TASK_RUNNING; state=1

2017-07-18 Thread Ian Abbott
ul 13 08:42:02 BST 2017 x86_64 GNU/Linux [ 80.542018] NOHZ: local_softirq_pending 80 [ 125.175471] [ cut here ] [ 125.175491] WARNING: CPU: 0 PID: 1497 at kernel/sched/core.c:7833 __might_sleep+0x9f/0xb0() [ 125.175728] do not call blocking ops when !TASK_RUNNING; st

Re: [BUG] drivers: staging: comedi: do not call blocking ops when !TASK_RUNNING; state=1

2017-07-17 Thread Piotr Gregor
02 BST 2017 > >x86_64 GNU/Linux > > > >[ 80.542018] NOHZ: local_softirq_pending 80 > >[ 125.175471] [ cut here ] > >[ 125.175491] WARNING: CPU: 0 PID: 1497 at kernel/sched/core.c:7833 > >__might_sleep+0x9f/0xb0() > >[ 125.175728] do not call bloc

Re: [BUG] drivers: staging: comedi: do not call blocking ops when !TASK_RUNNING; state=1

2017-07-17 Thread Ian Abbott
] [ 125.175491] WARNING: CPU: 0 PID: 1497 at kernel/sched/core.c:7833 __might_sleep+0x9f/0xb0() [ 125.175728] do not call blocking ops when !TASK_RUNNING; state=1 set at [] comedi_read+0x1a1/0x610 [comedi] [ 125.175735] Modules linked in: cpufreq_conservative cpufreq_powersave cpufreq_userspace cfg80211

[BUG] drivers: staging: comedi: do not call blocking ops when !TASK_RUNNING; state=1

2017-07-17 Thread Piotr Gregor
/sched/core.c:7833 __might_sleep+0x9f/0xb0() [ 125.175728] do not call blocking ops when !TASK_RUNNING; state=1 set at [] comedi_read+0x1a1/0x610 [comedi] [ 125.175735] Modules linked in: cpufreq_conservative cpufreq_powersave cpufreq_userspace cfg80211 nfsd auth_rpcgss oid_registry nfs_acl nfs

Re: kvm 4.10 merge grumbles wrt suspicious RCU usage , might_sleep() and sched: do not call blocking ops when !TASK_RUNNING

2016-12-15 Thread Paolo Bonzini
0 RSI: ae80 RDI: > 0011 > [ 101.899172] RBP: 7fd36eb5f000 R08: R09: > 00000000 > [ 101.899172] R10: 0000 R11: 0246 R12: > 0001 > [ 101.899173] R13: 0004 R14:

kvm 4.10 merge grumbles wrt suspicious RCU usage , might_sleep() and sched: do not call blocking ops when !TASK_RUNNING

2016-12-14 Thread Mike Galbraith
2 PID: 4265 at kernel/sched/core.c:7840 __might_sleep+0x80/0x90 [ 101.959144] do not call blocking ops when !TASK_RUNNING; state=1 set at [] prepare_to_swait+0x40/0xd0 [ 101.959146] Modules linked in: tun(E) ebtable_filter(E) ebtables(E) fuse(E) nf_log_ipv6(E) xt_pkttype(E) xt_physdev(E)

[PATCH 4.7 075/143] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-09-05 Thread Greg Kroah-Hartman
n the wait_event loop, which means we might clobber the task state: [ 10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at [] [ 10.845531] [ cut here ] [ 10.850161] WARNING: at kernel/sched/core.c:7630 ... [ 12.164333] ---[ end trace 45409966a9a

[PATCH 4.4 065/113] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-09-05 Thread Greg Kroah-Hartman
n the wait_event loop, which means we might clobber the task state: [ 10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at [] [ 10.845531] [ cut here ] [ 10.850161] WARNING: at kernel/sched/core.c:7630 ... [ 12.164333] ---[ end trace 45409966a9a

Re: [PATCH v2] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-21 Thread Jonathan Cameron
On 21/08/16 13:26, Lars-Peter Clausen wrote: > On 08/21/2016 01:21 PM, Jonathan Cameron wrote: > [...] >> I've applied to this to the fixes-togreg branch of iio.git >> >> For now I haven't marked it for stable, purely because I'm not sure >> when the first 'problem' usage was introduced. I'm happy

Re: [PATCH v2] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-21 Thread Lars-Peter Clausen
On 08/21/2016 01:21 PM, Jonathan Cameron wrote: [...] > I've applied to this to the fixes-togreg branch of iio.git > > For now I haven't marked it for stable, purely because I'm not sure > when the first 'problem' usage was introduced. I'm happy to explicitly > send a request for stable inclusion

Re: [PATCH v2] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-21 Thread Jonathan Cameron
wait_event loop, which >>> means we might clobber the task state: >>> >>> [ 10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at >>> [] >>> [ 10.845531] [ cut here ] >>> [ 10.850161] WARNING:

Re: [PATCH v2] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-16 Thread Lars-Peter Clausen
ght clobber the task state: >> >> [ 10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at >> [] >> [ 10.845531] [ cut here ] >> [ 10.850161] WARNING: at kernel/sched/core.c:7630 >> ... >> [ 12.164333] ---[ end trace

Re: [PATCH v2] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-15 Thread Jonathan Cameron
On 09/08/16 01:19, Brian Norris wrote: > When using CONFIG_DEBUG_ATOMIC_SLEEP, the scheduler nicely points out > that we're calling sleeping primitives within the wait_event loop, which > means we might clobber the task state: > > [ 10.831289] do not call blocking ops when

Re: [PATCH] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-09 Thread Lars-Peter Clausen
On 08/09/2016 12:23 AM, Brian Norris wrote: > Hi Lars, > > On Thu, Aug 04, 2016 at 12:21:08PM +0200, Lars-Peter Clausen wrote: >> And then also drop the if (!indio_dev->info) at the beginning of the >> function. > > I was poking through the usage of this ->info field, and it looks like > it's su

[PATCH v2] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-08 Thread Brian Norris
When using CONFIG_DEBUG_ATOMIC_SLEEP, the scheduler nicely points out that we're calling sleeping primitives within the wait_event loop, which means we might clobber the task state: [ 10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at [] [ 10.845531]

Re: [PATCH] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-08 Thread Brian Norris
Hi Lars, On Thu, Aug 04, 2016 at 12:21:08PM +0200, Lars-Peter Clausen wrote: > And then also drop the if (!indio_dev->info) at the beginning of the function. I was poking through the usage of this ->info field, and it looks like it's supposed to be protected by the 'info_exist_lock' lock, but tha

Re: [PATCH] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-04 Thread Lars-Peter Clausen
On 08/04/2016 11:41 AM, Brian Norris wrote: > On Thu, Aug 04, 2016 at 10:45:39AM +0200, Lars-Peter Clausen wrote: >>> @@ -132,10 +133,13 @@ ssize_t iio_buffer_read_first_n_outer(struct file >>> *filp, char __user *buf, >>> to_wait = min_t(size_t, n / datum_size, rb->watermark); >>> >

Re: [PATCH] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-04 Thread Brian Norris
On Thu, Aug 04, 2016 at 10:45:39AM +0200, Lars-Peter Clausen wrote: > > @@ -132,10 +133,13 @@ ssize_t iio_buffer_read_first_n_outer(struct file > > *filp, char __user *buf, > > to_wait = min_t(size_t, n / datum_size, rb->watermark); > > > > do { > > - ret = wait_event_i

Re: [PATCH] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-04 Thread Lars-Peter Clausen
On 08/04/2016 10:26 AM, Brian Norris wrote: > When using CONFIG_DEBUG_ATOMIC_SLEEP, the scheduler nicely points out > that we're calling sleeping primitives within the wait_event loop, which > means we might clobber the task state: > > [ 10.831289] do not call blocking op

[PATCH] iio: fix sched WARNING "do not call blocking ops when !TASK_RUNNING"

2016-08-04 Thread Brian Norris
When using CONFIG_DEBUG_ATOMIC_SLEEP, the scheduler nicely points out that we're calling sleeping primitives within the wait_event loop, which means we might clobber the task state: [ 10.831289] do not call blocking ops when !TASK_RUNNING; state=1 set at [] [ 10.845531]

Re: iio: WARNING at kernel/sched/core.c:7630: do not call blocking ops when !TASK_RUNNING

2016-08-02 Thread Brian Norris
Hi Lars, On Tue, Aug 02, 2016 at 03:06:39PM +0200, Lars-Peter Clausen wrote: > On 08/02/2016 03:12 AM, Brian Norris wrote: > > I'm seeing the following warnings when I read from an IIO char device, > > with CONFIG_DEBUG_ATOMIC_SLEEP=y. I'm testing a v4.4 kernel, but AFAICT, > > nothing too relevan

Re: iio: WARNING at kernel/sched/core.c:7630: do not call blocking ops when !TASK_RUNNING

2016-08-02 Thread Lars-Peter Clausen
On 08/02/2016 06:57 PM, Brian Norris wrote: > Hi Lars, > > On Tue, Aug 02, 2016 at 03:06:39PM +0200, Lars-Peter Clausen wrote: >> On 08/02/2016 03:12 AM, Brian Norris wrote: >>> I'm seeing the following warnings when I read from an IIO char device, >>> with CONFIG_DEBUG_ATOMIC_SLEEP=y. I'm testing

Re: iio: WARNING at kernel/sched/core.c:7630: do not call blocking ops when !TASK_RUNNING

2016-08-02 Thread Lars-Peter Clausen
On 08/02/2016 03:12 AM, Brian Norris wrote: > Hi all, > > I'm seeing the following warnings when I read from an IIO char device, > with CONFIG_DEBUG_ATOMIC_SLEEP=y. I'm testing a v4.4 kernel, but AFAICT, > nothing too relevant has changed between that and v4.7: [...] > Have any of you seen this ki

iio: WARNING at kernel/sched/core.c:7630: do not call blocking ops when !TASK_RUNNING

2016-08-01 Thread Brian Norris
Hi all, I'm seeing the following warnings when I read from an IIO char device, with CONFIG_DEBUG_ATOMIC_SLEEP=y. I'm testing a v4.4 kernel, but AFAICT, nothing too relevant has changed between that and v4.7: [ 10.831289] do not call blocking ops when !TASK_RUNNING; stat

do not call blocking ops when !TASK_RUNNING

2015-05-08 Thread poma
[ 19.381055] [ cut here ] [ 19.381225] WARNING: CPU: 3 PID: 487 at kernel/sched/core.c:7291 __might_sleep+0x87/0x90() [ 19.381373] do not call blocking ops when !TASK_RUNNING; state=2 set at [] wait_for_completion_io+0xe5/0x140 ... [ 19.387265] Call Trace

Re: [PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-03-09 Thread Rusty Russell
Thomas Huth writes: > On Wed, 25 Feb 2015 16:11:27 +0100 > Cornelia Huck wrote: > >> On Wed, 25 Feb 2015 15:36:02 +0100 >> "Michael S. Tsirkin" wrote: >> >> > virtio balloon has this code: >> > wait_event_interruptible(vb->config_change, >> > (diff = tow

Re: [PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Thomas Huth
On Wed, 25 Feb 2015 16:11:27 +0100 Cornelia Huck wrote: > On Wed, 25 Feb 2015 15:36:02 +0100 > "Michael S. Tsirkin" wrote: > > > virtio balloon has this code: > > wait_event_interruptible(vb->config_change, > > (diff = towards_target(vb)) != 0 > >

Re: [PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Cornelia Huck
On Wed, 25 Feb 2015 15:36:02 +0100 "Michael S. Tsirkin" wrote: > virtio balloon has this code: > wait_event_interruptible(vb->config_change, > (diff = towards_target(vb)) != 0 > || vb->need_stats_update >

Re: [PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Michael S. Tsirkin
On Wed, Feb 25, 2015 at 03:32:08PM +0100, Cornelia Huck wrote: > On Wed, 25 Feb 2015 15:14:36 +0100 > "Michael S. Tsirkin" wrote: > > > virtio balloon has this code: > > wait_event_interruptible(vb->config_change, > > (diff = towards_target(vb)) != 0 > >

[PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Michael S. Tsirkin
virtio balloon has this code: wait_event_interruptible(vb->config_change, (diff = towards_target(vb)) != 0 || vb->need_stats_update || kthread_should_stop() ||

Re: [PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Cornelia Huck
On Wed, 25 Feb 2015 15:14:36 +0100 "Michael S. Tsirkin" wrote: > virtio balloon has this code: > wait_event_interruptible(vb->config_change, > (diff = towards_target(vb)) != 0 > || vb->need_stats_update >

[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Michael S. Tsirkin
virtio balloon has this code: wait_event_interruptible(vb->config_change, (diff = towards_target(vb)) != 0 || vb->need_stats_update || kthread_should_stop() ||

Re: [v3.19-rc1] read_events => aio_read_events => WARNING: "do not call blocking ops when !TASK_RUNNING"

2014-12-24 Thread Benjamin LaHaise
On Wed, Dec 24, 2014 at 02:50:02PM +0800, Fam Zheng wrote: > Could you trace down to the source code context of this io_getevents call in > mysqld? The change merely made io_getevents return a lot more quickly than > before, so it seems like that a polling loop is spinning too fast as a result. T

Re: [v3.19-rc1] read_events => aio_read_events => WARNING: "do not call blocking ops when !TASK_RUNNING"

2014-12-23 Thread Fam Zheng
On Mon, 12/22 13:12, Bjørn Mork wrote: > Hello, > > I got this warning on v3.19-rc1: > > [ 16.325814] [ cut here ] > [ 16.325832] WARNING: CPU: 0 PID: 3368 at kernel/sched/core.c:7303 > __might_sleep+0x55/0x94() > [ 16.325839] do no

[v3.19-rc1] read_events => aio_read_events => WARNING: "do not call blocking ops when !TASK_RUNNING"

2014-12-22 Thread Bjørn Mork
Hello, I got this warning on v3.19-rc1: [ 16.325814] [ cut here ] [ 16.325832] WARNING: CPU: 0 PID: 3368 at kernel/sched/core.c:7303 __might_sleep+0x55/0x94() [ 16.325839] do not call blocking ops when !TASK_RUNNING; state=1 set at [] prepare_to_wait_event+0x8c