]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: add checking of wait_for_completion_killable() return value
authorViacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Fri, 6 Jun 2025 19:04:32 +0000 (12:04 -0700)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 11 Jun 2025 07:45:05 +0000 (09:45 +0200)
commit03410ccaafd9baa21b64e23c7131749e5c6d9939
tree5e7d85fc7d841bdd80988577d66cd0b3378af860
parent9233d2c1fd2d072e9d85e14c2adb804df28c8c23
ceph: add checking of wait_for_completion_killable() return value

The Coverity Scan service has detected the calling of
wait_for_completion_killable() without checking the return
value in ceph_lock_wait_for_completion() [1]. The CID 1636232
defect contains explanation: "If the function returns an error
value, the error value may be mistaken for a normal value.
In ceph_lock_wait_for_completion(): Value returned from
a function is not checked for errors before being used. (CWE-252)".

The patch adds the checking of wait_for_completion_killable()
return value and return the error code from
ceph_lock_wait_for_completion().

[1] https://scan5.scan.coverity.com/#/project-view/64304/10063?selectedIssue=1636232

Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
fs/ceph/locks.c