From: Hans de Goede <hdegoede@redhat.com>
To: Jithu Joseph <jithu.joseph@intel.com>, markgross@kernel.org
Cc: ashok.raj@intel.com, tony.luck@intel.com,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, patches@lists.linux.dev
Subject: Re: [PATCH 1/1] platform/x86/intel/ifs: release cpus_read_lock()
Date: Wed, 4 Oct 2023 11:55:55 +0200 [thread overview]
Message-ID: <bce65f65-66d9-3242-4656-7b2266a0e010@redhat.com> (raw)
In-Reply-To: <20230927184824.2566086-1-jithu.joseph@intel.com>
Hi,
On 9/27/23 20:48, Jithu Joseph wrote:
> Couple of error paths in do_core_test() was returning directly without
> doing a necessary cpus_read_unlock().
>
> Following lockdep warning was observed when exercising these scenarios
> with PROVE_RAW_LOCK_NESTING enabled:
>
> [ 139.304775] ================================================
> [ 139.311185] WARNING: lock held when returning to user space!
> [ 139.317593] 6.6.0-rc2ifs01+ #11 Tainted: G S W I
> [ 139.324499] ------------------------------------------------
> [ 139.330908] bash/11476 is leaving the kernel with locks still held!
> [ 139.338000] 1 lock held by bash/11476:
> [ 139.342262] #0: ffffffffaa26c930 (cpu_hotplug_lock){++++}-{0:0}, at:
> do_core_test+0x35/0x1c0 [intel_ifs]
>
> Fix the flow so that all scenarios release the lock prior to returning
> from the function.
>
> Fixes: 5210fb4e1880 ("platform/x86/intel/ifs: Sysfs interface for Array BIST")
> Cc: stable@vger.kernel.org
> Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Thank you for your patch/series, I've applied this patch
(series) to the pdx86 fixes branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes
Note it will show up in the pdx86 fixes branch once I've pushed
my local branch there, which might take a while.
I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.
Regards,
Hans
> ---
> drivers/platform/x86/intel/ifs/runtest.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/x86/intel/ifs/runtest.c b/drivers/platform/x86/intel/ifs/runtest.c
> index 1061eb7ec399..43c864add778 100644
> --- a/drivers/platform/x86/intel/ifs/runtest.c
> +++ b/drivers/platform/x86/intel/ifs/runtest.c
> @@ -331,14 +331,15 @@ int do_core_test(int cpu, struct device *dev)
> switch (test->test_num) {
> case IFS_TYPE_SAF:
> if (!ifsd->loaded)
> - return -EPERM;
> - ifs_test_core(cpu, dev);
> + ret = -EPERM;
> + else
> + ifs_test_core(cpu, dev);
> break;
> case IFS_TYPE_ARRAY_BIST:
> ifs_array_test_core(cpu, dev);
> break;
> default:
> - return -EINVAL;
> + ret = -EINVAL;
> }
> out:
> cpus_read_unlock();
>
> base-commit: 6465e260f48790807eef06b583b38ca9789b6072
prev parent reply other threads:[~2023-10-04 9:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 18:48 Jithu Joseph
2023-10-04 9:55 ` Hans de Goede [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=bce65f65-66d9-3242-4656-7b2266a0e010@redhat.com \
--to=hdegoede@redhat.com \
--cc=ashok.raj@intel.com \
--cc=jithu.joseph@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=patches@lists.linux.dev \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tony.luck@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®