Re: Patch "cifs: Fix flushing, invalidation and file size with copy_file_range()" has been added to the 6.1-stable tree

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

 



David Howells <dhowells@xxxxxxxxxx> wrote:

> Jitindar Singh, Suraj <surajjs@xxxxxxxxxx> wrote:
> 
> > When testing the v6.1.69 kernel I bisected an issue to the below commit
> > which was added in v6.1.68. When running the xfstests[1] on cifs I
> > observe a null pointer dereference in cifs_flush_folio() because folio
> > is null and dereferenced in size = folio_size(folio).
> 
> Yeah.  __filemap_get_folio() works differently in v6.1.y.  There it returns a
> folio or NULL.  In 6.7 it returns a folio or a negative error code.  The error
> check in cifs_flush_folio() needs to change to something like:
> 
> 	folio = filemap_get_folio(inode->i_mapping, index);
> 	if (!folio)
> 		return -ENOMEM;

Actually, it should return 0, not -ENOMEM.

David






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux