Re: [PATCH] fs/namei: fix WARNING in do_mknodat due to invalid inode unlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 25, 2025 at 12:23:03AM +0530, ssranevjti@xxxxxxxxx wrote:
> From: Shaurya Rane <ssrane_b23@xxxxxxxxxxxxx>
> 
> The done_path_create() function unconditionally calls inode_unlock() on
> path->dentry->d_inode without verifying that the path and inode are valid.
> Under certain error conditions or race scenarios, this can lead to attempting
> to unlock an inode that was never locked or has been corrupted, resulting in
> a WARNING from the rwsem debugging code.
> 
> Add defensive checks to ensure both path->dentry and path->dentry->d_inode
> are valid before attempting to unlock. This prevents the rwsem warning while
> maintaining existing behavior for normal cases.
> 
> Reported-by: syzbot+0cee785b798102696a4b@xxxxxxxxxxxxxxxxxxxxxxxxx

No.  You are papering over some bugs you have not even bothered to describe -
"certain error conditions or race scenarios" is as useless as it gets.

Don't do that.  Fixing a bug found by syzbot is useful; papering over
it does no good whatsoever.

NAK.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux