swh:1:snp:32555a3fd8878f019c2ebd6c964bc1edcaeff337
Revision 645efa84f6c7566ea863ed37a8b3247247f72e02 authored by Mikulas Patocka on 05 February 2019, 10:09:00 UTC, committed by Mike Snitzer on 06 February 2019, 22:24:37 UTC
Block core changes to switch bio-based IO accounting to be percpu had a
side-effect of altering DM core to now rely on calling waitqueue_active
(in both bio-based and request-based) to check if another task is in
dm_wait_for_completion().

A memory barrier is needed before calling waitqueue_active().  DM core
doesn't piggyback on a preceding memory barrier so it must explicitly
use its own.

For more details on why using waitqueue_active() without a preceding
barrier is unsafe, please see the comment before the waitqueue_active()
definition in include/linux/wait.h.

Add the missing memory barrier by switching to using wq_has_sleeper().

Fixes: 6f75723190d8 ("dm: remove the pending IO accounting")
Fixes: c4576aed8d85 ("dm: fix request-based dm's use of dm_wait_for_completion")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent 8834f56
History
Tip revision: ffb4d94b4314655cea60ab7962756e6bab72fc7e authored by Linus Torvalds on 30 September 2022, 23:25:52 UTC
Merge tag 'drm-fixes-2022-10-01' of git://anongit.freedesktop.org/drm/drm
Tip revision: ffb4d94
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 13.9 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 31 bytes
.gitattributes -rw-r--r-- 30 bytes
.gitignore -rw-r--r-- 1.5 KB
.mailmap -rw-r--r-- 10.7 KB
COPYING -rw-r--r-- 423 bytes
CREDITS -rw-r--r-- 96.9 KB
Kbuild -rw-r--r-- 1.7 KB
Kconfig -rw-r--r-- 563 bytes
MAINTAINERS -rw-r--r-- 481.7 KB
Makefile -rw-r--r-- 59.1 KB
README -rw-r--r-- 727 bytes

README

back to top