HomeFreeBSD

Cleanup: Suppress Coverity dereference before/after NULL check reports

Description

Cleanup: Suppress Coverity dereference before/after NULL check reports

f224eddf922a33ca4b86d83148e9e6fa155fc290 began dereferencing a NULL
checked pointer in zpl_vap_init(), which made Coverity complain because
either the dereference is unsafe or the NULL check is unnecessary. Upon
inspection, this pointer is guaranteed to never be NULL because it is
from the Linux kernel VFS. The calls into ZFS simply would not make
sense if this pointer were NULL, so the NULL check is unnecessary.

Reported-by: Coverity (CID 1527260)
Reported-by: Coverity (CID 1527262)
Reviewed-by: Mariusz Zaborski <mariusz.zaborski@klarasystems.com>
Reviewed-by: Youzhong Yang <yyang@mathworks.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14170

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Nov 10 2022, 2:09 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 10 2022, 9:58 PM
Parents
rG9e2be2dfbde6: Fix potential NULL pointer dereference regression
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGb1eec00904a2: Cleanup: Suppress Coverity dereference before/after NULL check reports (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Nov 10 2022, 9:58 PM