android_kernel_samsung_univ.../block
Alan Jenkins c9ae49135d block: do not use interruptible wait anywhere
commit 1dc3039bc87ae7d19a990c3ee71cfd8a9068f428 upstream.

When blk_queue_enter() waits for a queue to unfreeze, or unset the
PREEMPT_ONLY flag, do not allow it to be interrupted by a signal.

The PREEMPT_ONLY flag was introduced later in commit 3a0a529971ec
("block, scsi: Make SCSI quiesce and resume work reliably").  Note the SCSI
device is resumed asynchronously, i.e. after un-freezing userspace tasks.

So that commit exposed the bug as a regression in v4.15.  A mysterious
SIGBUS (or -EIO) sometimes happened during the time the device was being
resumed.  Most frequently, there was no kernel log message, and we saw Xorg
or Xwayland killed by SIGBUS.[1]

[1] E.g. https://bugzilla.redhat.com/show_bug.cgi?id=1553979

Without this fix, I get an IO error in this test:

# dd if=/dev/sda of=/dev/null iflag=direct & \
  while killall -SIGUSR1 dd; do sleep 0.1; done & \
  echo mem > /sys/power/state ; \
  sleep 5; killall dd  # stop after 5 seconds

The interruptible wait was added to blk_queue_enter in
commit 3ef28e83ab ("block: generic request_queue reference counting").
Before then, the interruptible wait was only in blk-mq, but I don't think
it could ever have been correct.

Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:18:32 +02:00
..
partitions partitions/msdos: Unable to mount UFS 44bsd partitions 2018-04-08 11:51:56 +02:00
bio-integrity.c bio-integrity: Do not allocate integrity context for bio w/o data 2018-04-13 19:50:17 +02:00
bio.c more bio_map_user_iov() leak fixes 2017-12-16 10:33:56 +01:00
blk-cgroup.c blkcg: fix double free of new_blkg in blkcg_init_queue 2018-03-22 09:23:19 +01:00
blk-core.c block: do not use interruptible wait anywhere 2018-07-25 10:18:32 +02:00
blk-exec.c
blk-flush.c
blk-integrity.c block: fix blk_integrity_register to use template's interval_exp if not 0 2017-05-20 14:27:00 +02:00
blk-ioc.c
blk-iopoll.c
blk-lib.c
blk-map.c
blk-merge.c
blk-mq-cpu.c
blk-mq-cpumap.c
blk-mq-sysfs.c
blk-mq-tag.c
blk-mq-tag.h
blk-mq.c blk-mq: fix kernel oops in blk_mq_tag_idle() 2018-04-13 19:50:22 +02:00
blk-mq.h
blk-settings.c
blk-softirq.c
blk-sysfs.c
blk-tag.c
blk-throttle.c blk-throttle: make sure expire time isn't too big 2018-03-22 09:23:22 +01:00
blk-timeout.c
blk.h
bounce.c
bsg-lib.c Revert "bsg-lib: don't free job in bsg_prepare_job" 2017-10-21 17:09:03 +02:00
bsg.c
cfq-iosched.c
cmdline-parser.c
compat_ioctl.c
deadline-iosched.c
elevator.c
genhd.c block: fix del_gendisk() vs blkdev_ioctl crash 2017-04-27 09:09:34 +02:00
ioctl.c
ioprio.c
Kconfig
Kconfig.iosched
Makefile
noop-iosched.c
partition-generic.c block: fix an error code in add_partition() 2018-04-13 19:50:10 +02:00
scsi_ioctl.c
t10-pi.c