All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] fuse: support copying large folios
@ 2025-05-23 15:59 Dan Carpenter
  2025-05-23 17:32 ` Joanne Koong
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2025-05-23 15:59 UTC (permalink / raw)
  To: Joanne Koong; +Cc: linux-fsdevel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-05-23 18:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 15:59 [bug report] fuse: support copying large folios Dan Carpenter
2025-05-23 17:32 ` Joanne Koong
2025-05-23 18:51   ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.