summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/timerlist.py
diff options
context:
space:
mode:
authorViacheslav Dubeyko <Slava.Dubeyko@ibm.com>2025-06-13 11:31:08 -0700
committerIlya Dryomov <idryomov@gmail.com>2025-10-08 23:30:46 +0200
commit5824ccba9a39a3ad914fc9b2972a2c1119abaac9 (patch)
treea26210e419c2722f1105ae4e7bbc1cb74f56ff06 /scripts/gdb/linux/timerlist.py
parent5b2d1377d6cc4147492780b0bd95fb9c4cb28d1b (diff)
ceph: fix potential race condition in ceph_ioctl_lazyio()
The Coverity Scan service has detected potential race condition in ceph_ioctl_lazyio() [1]. The CID 1591046 contains explanation: "Check of thread-shared field evades lock acquisition (LOCK_EVASION). Thread1 sets fmode to a new value. Now the two threads have an inconsistent view of fmode and updates to fields correlated with fmode may be lost. The data guarded by this critical section may be read while in an inconsistent state or modified by multiple racing threads. In ceph_ioctl_lazyio: Checking the value of a thread-shared field outside of a locked region to determine if a locked operation involving that thread shared field has completed. (CWE-543)". The patch places fi->fmode field access under ci->i_ceph_lock protection. Also, it introduces the is_file_already_lazy variable that is set under the lock and it is checked later out of scope of critical section. [1] https://scan5.scan.coverity.com/#/project-view/64304/10063?selectedIssue=1591046 Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'scripts/gdb/linux/timerlist.py')
0 files changed, 0 insertions, 0 deletions