lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6XoU6GopCT-CxNK@ashyti-mobl2.lan>
Date: Fri, 7 Feb 2025 12:02:43 +0100
From: Andi Shyti <andi.shyti@...ux.intel.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
	Jani Nikula <jani.nikula@...ux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@...el.com>,
	Tvrtko Ursulin <tursulin@...ulin.net>,
	David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andi Shyti <andi.shyti@...ux.intel.com>,
	David Hildenbrand <david@...hat.com>,
	Josef Bacik <josef@...icpanda.com>,
	"Matthew Wilcox (Oracle)" <willy@...radead.org>,
	Brian Geffon <bgeffon@...gle.com>, intel-gfx@...ts.freedesktop.org,
	dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next] drm/i915: Fix NULL vs IS_ERR() check in
 __shmem_writeback()

Hi Dan,

On Thu, Feb 06, 2025 at 11:17:02AM +0300, Dan Carpenter wrote:
> The filemap_lock_folio() function doesn't return NULL, it returns error
> pointers.
> 
> Fixes: 25dd342f0cc8 ("drm/i915/gem: convert __shmem_writeback() to folios")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
>  drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
> index a784fb44e59c..fb263b421958 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
> @@ -319,7 +319,7 @@ void __shmem_writeback(size_t size, struct address_space *mapping)
>  		struct folio *folio;
>  
>  		folio = filemap_lock_folio(mapping, i);
> -		if (!folio)
> +		if (IS_ERR(folio))

I don't see this patch yet in -next yet (and of course not in
drm-tip), which branch is it based on?

Thanks,
Andi

>  			continue;
>  
>  		if (!folio_mapped(folio) && folio_clear_dirty_for_io(folio)) {
> -- 
> 2.47.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ