Revision 9c1c2b35f1d94de8325344c2777d7ee67492db3b authored by Jeff Layton on 03 April 2019, 17:16:01 UTC, committed by Ilya Dryomov on 21 January 2020, 18:02:37 UTC
Currently, we just assume that it will stick around by virtue of the submitter's reference, but later patches will allow the syscall to return early and we can't rely on that reference at that point. While I'm not aware of any reports of it, Xiubo pointed out that this may fix a use-after-free. If the wait for a reply times out or is canceled via signal, and then the reply comes in after the syscall returns, the client can end up trying to access r_parent without a reference. Take an extra reference to the inode when setting r_parent and release it when releasing the request. Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
1 parent def9d27
File | Mode | Size |
---|---|---|
partitions | ||
Kconfig | -rw-r--r-- | 6.2 KB |
Kconfig.iosched | -rw-r--r-- | 1.4 KB |
Makefile | -rw-r--r-- | 1.6 KB |
badblocks.c | -rw-r--r-- | 14.1 KB |
bfq-cgroup.c | -rw-r--r-- | 37.4 KB |
bfq-iosched.c | -rw-r--r-- | 236.1 KB |
bfq-iosched.h | -rw-r--r-- | 36.6 KB |
bfq-wf2q.c | -rw-r--r-- | 52.4 KB |
bio-integrity.c | -rw-r--r-- | 12.3 KB |
bio.c | -rw-r--r-- | 55.3 KB |
blk-cgroup-rwstat.c | -rw-r--r-- | 3.4 KB |
blk-cgroup-rwstat.h | -rw-r--r-- | 3.9 KB |
blk-cgroup.c | -rw-r--r-- | 44.3 KB |
blk-core.c | -rw-r--r-- | 48.7 KB |
blk-exec.c | -rw-r--r-- | 2.6 KB |
blk-flush.c | -rw-r--r-- | 15.0 KB |
blk-integrity.c | -rw-r--r-- | 11.6 KB |
blk-ioc.c | -rw-r--r-- | 10.2 KB |
blk-iocost.c | -rw-r--r-- | 67.1 KB |
blk-iolatency.c | -rw-r--r-- | 28.0 KB |
blk-lib.c | -rw-r--r-- | 10.2 KB |
blk-map.c | -rw-r--r-- | 6.0 KB |
blk-merge.c | -rw-r--r-- | 24.6 KB |
blk-mq-cpumap.c | -rw-r--r-- | 2.2 KB |
blk-mq-debugfs-zoned.c | -rw-r--r-- | 435 bytes |
blk-mq-debugfs.c | -rw-r--r-- | 24.4 KB |
blk-mq-debugfs.h | -rw-r--r-- | 2.7 KB |
blk-mq-pci.c | -rw-r--r-- | 1.3 KB |
blk-mq-rdma.c | -rw-r--r-- | 1.3 KB |
blk-mq-sched.c | -rw-r--r-- | 14.1 KB |
blk-mq-sched.h | -rw-r--r-- | 2.5 KB |
blk-mq-sysfs.c | -rw-r--r-- | 8.4 KB |
blk-mq-tag.c | -rw-r--r-- | 15.0 KB |
blk-mq-tag.h | -rw-r--r-- | 2.2 KB |
blk-mq-virtio.c | -rw-r--r-- | 1.3 KB |
blk-mq.c | -rw-r--r-- | 85.8 KB |
blk-mq.h | -rw-r--r-- | 7.6 KB |
blk-pm.c | -rw-r--r-- | 6.6 KB |
blk-pm.h | -rw-r--r-- | 1.4 KB |
blk-rq-qos.c | -rw-r--r-- | 7.1 KB |
blk-rq-qos.h | -rw-r--r-- | 5.0 KB |
blk-settings.c | -rw-r--r-- | 28.0 KB |
blk-softirq.c | -rw-r--r-- | 3.7 KB |
blk-stat.c | -rw-r--r-- | 4.6 KB |
blk-stat.h | -rw-r--r-- | 4.6 KB |
blk-sysfs.c | -rw-r--r-- | 26.3 KB |
blk-throttle.c | -rw-r--r-- | 69.2 KB |
blk-timeout.c | -rw-r--r-- | 3.8 KB |
blk-wbt.c | -rw-r--r-- | 19.9 KB |
blk-wbt.h | -rw-r--r-- | 2.9 KB |
blk-zoned.c | -rw-r--r-- | 12.3 KB |
blk.h | -rw-r--r-- | 10.7 KB |
bounce.c | -rw-r--r-- | 9.3 KB |
bsg-lib.c | -rw-r--r-- | 9.8 KB |
bsg.c | -rw-r--r-- | 11.1 KB |
cmdline-parser.c | -rw-r--r-- | 4.9 KB |
compat_ioctl.c | -rw-r--r-- | 11.2 KB |
elevator.c | -rw-r--r-- | 18.9 KB |
genhd.c | -rw-r--r-- | 50.7 KB |
ioctl.c | -rw-r--r-- | 14.6 KB |
ioprio.c | -rw-r--r-- | 5.1 KB |
kyber-iosched.c | -rw-r--r-- | 27.8 KB |
mq-deadline.c | -rw-r--r-- | 20.6 KB |
opal_proto.h | -rw-r--r-- | 9.3 KB |
partition-generic.c | -rw-r--r-- | 15.3 KB |
scsi_ioctl.c | -rw-r--r-- | 22.4 KB |
sed-opal.c | -rw-r--r-- | 62.4 KB |
t10-pi.c | -rw-r--r-- | 7.7 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...