Re: [PATCH RFC netfs] Fix uninitialized variable in netfs_retry_read_subrequests()

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

 



Paul E. McKenney <paulmck@xxxxxxxxxx> wrote:

> This should actually be considered more of a bug report than a patch.
> 
> Clang 18.1.8 (but not GCC 11.5.0) complains that the "subreq" local
> variable can be used uninitialized in netfs_retry_read_subrequests(),
> just after the abandon_after label.  This function is unusual in having
> three instances of this local variable.  The third and last one is clearly
> erroneous because there is a branch out of the enclosing do-while loop
> to the end of this function, and it looks like the intent is that the
> code at the end of this function be using the same value of the "subreq"
> local variable as is used within that do-while loop.
> 
> Therefore, take the obvious (if potentially quite misguided) approach
> of removing the third declaration of "subreq", instead simply setting
> it to NULL.

I think you're looking at the old version of my netfs-writeback branch that's
residing in Christian's vfs.netfs branch.  I've posted a new version of my
branch[1] without this problem and am hoping for Christian to update the
branch[2] so that Stephen can pull it into linux-next.

David

[1] https://lore.kernel.org/linux-fsdevel/20241216204124.3752367-1-dhowells@xxxxxxxxxx/T/#t

[2] And hoping he'll remember to drop "[PATCH v5 26/32] Display waited-on page
index after 1min of waiting" for me.  I forgot to remove that debugging patch.






[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