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]

 



On Fri, Jan 12, 2024 at 02:21:55PM +0000, David Howells 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

Let's cc hch so he's aware of how much pain this change caused.

Never change function semantics without changing its name or arguments.

> 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;
> 
> 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