From: Dan Carpenter <dan.carpenter@linaro.org>
To: David Hildenbrand <david@redhat.com>
Cc: intel-xe@lists.freedesktop.org, linux-mm@kvack.org
Subject: Re: [bug report] bad error return in walk_hugetlb_range()
Date: Tue, 7 Oct 2025 14:41:28 +0300 [thread overview]
Message-ID: <aOT8aOJ88g_TxuEX@stanley.mountain> (raw)
In-Reply-To: <4c3b148e-9019-40db-8ca8-2166ef011c75@redhat.com>
On Tue, Oct 07, 2025 at 12:13:40PM +0200, David Hildenbrand wrote:
> On 04.10.25 08:22, Dan Carpenter wrote:
> > This is really old code. I think it's a bug in hugetlb.
> >
> > drivers/gpu/drm/xe/xe_gt_pagefault.c:353 pf_queue_work_func()
> > warn: passing positive error code 's32min-(-12),(-10)-(-1),1' to 'ERR_PTR'
> >
Thanks, David. Yeah. You're right. My apologies. I tracked down the
confusion and this warning is actually because Smatch thinks that
hmm_range_fault() propogates the positive returns from walk_page_range().
But actually walk_page_range() only returns positive with certain flags.
Someone explained this to me in Jun and I said I would silence the
warning but I forgot... Ugh... Sorry. :(
https://lore.kernel.org/all/aECCaCP3BGGGUUa0@stanley.mountain/
I have done it now, below.
regards,
dan carpenter
From fb706e39230f6f2bc6d68a18837171ea4c1fecc6 Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@linaro.org>
Date: Tue, 7 Oct 2025 14:37:51 +0300
Subject: [PATCH] db/kernel.delete_returns: hmm_range_fault() can't return 1
This is pretty tricky code to read. It doesn't return 1. This leads to
error pointer warnings.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
smatch_data/db/kernel.delete.return_states | 1 +
1 file changed, 1 insertion(+)
diff --git a/smatch_data/db/kernel.delete.return_states b/smatch_data/db/kernel.delete.return_states
index a1b3553a9f03..cfdf252e472c 100644
--- a/smatch_data/db/kernel.delete.return_states
+++ b/smatch_data/db/kernel.delete.return_states
@@ -30,3 +30,4 @@ ubi_find_or_add_av 0
xe_migrate_copy 0
scmi_get_or_create_handler 0
alloc_frame_masks 0
+hmm_range_fault 1
--
2.51.0
prev parent reply other threads:[~2025-10-07 11:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-04 6:22 [bug report] bad error return in walk_hugetlb_range() Dan Carpenter
2025-10-07 10:13 ` David Hildenbrand
2025-10-07 11:41 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aOT8aOJ88g_TxuEX@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=david@redhat.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.