Skip to content

Commit f602353

Browse files
ChangMarkusYubrauner
authored andcommitted
netfs: Fix a KMSAN uninit-value error in netfs_clear_buffer
Use folioq_count instead of folioq_nr_slots to fix a KMSAN uninit-value error in netfs_clear_buffer Signed-off-by: Chang Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: cd0277e ("netfs: Use new folio_queue data type and iterator instead of xarray iter") Acked-by: David Howells <[email protected]> Reported-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=921873345a95f4dae7e9 Signed-off-by: Christian Brauner <[email protected]>
1 parent 0d24852 commit f602353

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/netfs/misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void netfs_clear_buffer(struct netfs_io_request *rreq)
102102

103103
while ((p = rreq->buffer)) {
104104
rreq->buffer = p->next;
105-
for (int slot = 0; slot < folioq_nr_slots(p); slot++) {
105+
for (int slot = 0; slot < folioq_count(p); slot++) {
106106
struct folio *folio = folioq_folio(p, slot);
107107
if (!folio)
108108
continue;

0 commit comments

Comments
 (0)