Re: [PATCH v1] mount: handle OOM on mnt_warn_timestamp_expiry

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

 



On Tue, Jul 30, 2024 at 10:58:13AM +0200, Olaf Hering wrote:
> If no page could be allocated, an error pointer was used as format
> string in pr_warn.
> 
> Rearrange the code to return early in case of OOM. Also add a check
> for the return value of d_path. The API of that function is not
> documented. It currently returns only ERR_PTR values, but may return
> also NULL in the future. Use PTR_ERR_OR_ZERO to cover both cases.

Don't use PTR_ERR_OR_ZERO.  And don't mix ERR_PTR() and NULL for
error returns without a really good reason for that.

d_path() is *NOT* going to return NULL.

NAK in that form.




[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