Re: [PATCH] buffer: Fix unintended successful return

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

 



On Mon,  1 Jan 2024 09:38:48 +0000 "Matthew Wilcox (Oracle)" <willy@xxxxxxxxxxxxx> wrote:

> If try_to_free_buffers() succeeded and then folio_alloc_buffers()
> failed, grow_dev_folio() would return success.  This would be incorrect;
> memory allocation failure is supposed to result in a failure.  It's a
> harmless bug; the caller will simply go around the loop one more time
> and grow_dev_folio() will correctly return a failure that time.  But it
> was an unintended change and looks like a more serious bug than it is.
> 
> While I'm in here, improve the commentary about why we return success
> even though we failed.
> 
> Reported-by: Ryusuke Konishi <konishi.ryusuke@xxxxxxxxx>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>

Cool.  I'll add

Fixes: 6d840a18773f ("buffer: return bool from grow_dev_folio()")




[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