[bug report] fuse: support copying large folios

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

 



Hello Joanne Koong,

This is a semi-automatic email about new static checker warnings.

Commit f008a4390bde ("fuse: support copying large folios") from May
12, 2025, leads to the following Smatch complaint:

    fs/fuse/dev.c:1103 fuse_copy_folio()
    warn: variable dereferenced before check 'folio' (see line 1101)

fs/fuse/dev.c
  1100		struct folio *folio = *foliop;
  1101		size_t size = folio_size(folio);
                                         ^^^^^
The patch adds an unchecked dereference

  1102	
  1103		if (folio && zeroing && count < size)
                    ^^^^^
and it also adds this check for NULL which is too late.

  1104			folio_zero_range(folio, 0, size);
  1105	

regards,
dan carpenter




[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