Revision 74f464e97044da33b25aaed00213914b0edf1f2e authored by Jens Axboe on 17 April 2019, 14:57:48 UTC, committed by Jens Axboe on 17 April 2019, 17:41:49 UTC
This is a leftover from when the rings initially were not free flowing,
and hence a test for tail + 1 == head would indicate full. Since we now
let them wrap instead of mask them with the size, we need to check if
they drift more than the ring size from each other.

This fixes a case where we'd overwrite CQ ring entries, if the user
failed to reap completions. Both cases would ultimately result in lost
completions as the application violated the depth it asked for. The only
difference is that before this fix we'd return invalid entries for the
overflowed completions, instead of properly flagging it in the
cq_ring->overflow variable.

Reported-by: Stefan Bühler <source@stbuehler.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent b19062a
History
File Mode Size
9p
adfs
affs
afs
autofs
befs
bfs
btrfs
cachefiles
ceph
cifs
coda
configfs
cramfs
crypto
debugfs
devpts
dlm
ecryptfs
efivarfs
efs
exportfs
ext2
ext4
f2fs
fat
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hugetlbfs
isofs
jbd2
jffs2
jfs
kernfs
lockd
minix
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
orangefs
overlayfs
proc
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf
ufs
xfs
Kconfig -rw-r--r-- 7.5 KB
Kconfig.binfmt -rw-r--r-- 7.2 KB
Makefile -rw-r--r-- 4.3 KB
aio.c -rw-r--r-- 56.1 KB
anon_inodes.c -rw-r--r-- 4.5 KB
attr.c -rw-r--r-- 9.7 KB
bad_inode.c -rw-r--r-- 5.3 KB
binfmt_aout.c -rw-r--r-- 8.3 KB
binfmt_elf.c -rw-r--r-- 63.5 KB
binfmt_elf_fdpic.c -rw-r--r-- 47.3 KB
binfmt_em86.c -rw-r--r-- 2.8 KB
binfmt_flat.c -rw-r--r-- 27.7 KB
binfmt_misc.c -rw-r--r-- 18.3 KB
binfmt_script.c -rw-r--r-- 4.3 KB
block_dev.c -rw-r--r-- 54.9 KB
buffer.c -rw-r--r-- 90.2 KB
char_dev.c -rw-r--r-- 16.6 KB
compat.c -rw-r--r-- 3.4 KB
compat_binfmt_elf.c -rw-r--r-- 3.4 KB
compat_ioctl.c -rw-r--r-- 31.0 KB
coredump.c -rw-r--r-- 21.2 KB
d_path.c -rw-r--r-- 11.2 KB
dax.c -rw-r--r-- 45.6 KB
dcache.c -rw-r--r-- 82.1 KB
dcookies.c -rw-r--r-- 7.0 KB
direct-io.c -rw-r--r-- 41.0 KB
drop_caches.c -rw-r--r-- 1.8 KB
eventfd.c -rw-r--r-- 10.8 KB
eventpoll.c -rw-r--r-- 64.8 KB
exec.c -rw-r--r-- 46.9 KB
fcntl.c -rw-r--r-- 23.3 KB
fhandle.c -rw-r--r-- 6.8 KB
file.c -rw-r--r-- 24.2 KB
file_table.c -rw-r--r-- 10.1 KB
filesystems.c -rw-r--r-- 6.4 KB
fs-writeback.c -rw-r--r-- 71.5 KB
fs_context.c -rw-r--r-- 15.5 KB
fs_parser.c -rw-r--r-- 10.9 KB
fs_pin.c -rw-r--r-- 2.0 KB
fs_struct.c -rw-r--r-- 3.3 KB
fs_types.c -rw-r--r-- 2.5 KB
inode.c -rw-r--r-- 56.4 KB
internal.h -rw-r--r-- 5.2 KB
io_uring.c -rw-r--r-- 69.8 KB
ioctl.c -rw-r--r-- 17.7 KB
iomap.c -rw-r--r-- 54.9 KB
libfs.c -rw-r--r-- 31.8 KB
locks.c -rw-r--r-- 77.2 KB
mbcache.c -rw-r--r-- 12.0 KB
mount.h -rw-r--r-- 3.9 KB
mpage.c -rw-r--r-- 21.1 KB
namei.c -rw-r--r-- 122.9 KB
namespace.c -rw-r--r-- 87.6 KB
no-block.c -rw-r--r-- 688 bytes
nsfs.c -rw-r--r-- 6.2 KB
open.c -rw-r--r-- 29.2 KB
pipe.c -rw-r--r-- 27.6 KB
pnode.c -rw-r--r-- 15.1 KB
pnode.h -rw-r--r-- 1.9 KB
posix_acl.c -rw-r--r-- 21.4 KB
proc_namespace.c -rw-r--r-- 7.8 KB
read_write.c -rw-r--r-- 49.6 KB
readdir.c -rw-r--r-- 11.3 KB
select.c -rw-r--r-- 35.3 KB
seq_file.c -rw-r--r-- 24.4 KB
signalfd.c -rw-r--r-- 9.0 KB
splice.c -rw-r--r-- 40.0 KB
stack.c -rw-r--r-- 2.5 KB
stat.c -rw-r--r-- 19.4 KB
statfs.c -rw-r--r-- 9.9 KB
super.c -rw-r--r-- 46.4 KB
sync.c -rw-r--r-- 9.9 KB
timerfd.c -rw-r--r-- 13.4 KB
userfaultfd.c -rw-r--r-- 50.5 KB
utimes.c -rw-r--r-- 7.4 KB
xattr.c -rw-r--r-- 23.4 KB

back to top