From: Shradha Gupta <shradhagupta@linux.microsoft.com>
To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Cc: Shradha Gupta <shradhagupta@linux.microsoft.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
Dexuan Cui <decui@microsoft.com>,
Michael Kelley <mikelley@microsoft.com>
Subject: [PATCH] kernel: power: swap: Suppress expected 'Image not found' error on Ubuntu
Date: Wed, 14 Dec 2022 22:20:26 -0800 [thread overview]
Message-ID: <1671085226-21347-1-git-send-email-shradhagupta@linux.microsoft.com> (raw)
In 'systemctl hibernate' if resume device is written to the sysfs
resume parameter, a software_resume() call is triggerred. This call
is expected to fail in swsusp_check() call with -EBUSY error and an
'Image not found' error message. This fix suppresses the expected
failure message from getting logged in Ubuntu setups where
CONFIG_DYNAMIC_DEBUG is enabled by default.
Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
---
kernel/power/swap.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 277434b6c0bf..9cbd3edc8339 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -1552,6 +1552,14 @@ int swsusp_check(void)
pr_debug("Image signature found, resuming\n");
} else {
error = PTR_ERR(hib_resume_bdev);
+ /*
+ * If this call is triggered by `systemctl hibernate`, the
+ * call is expected to fail with -EBUSY error.
+ * TODO: Figure out a better way to suppress the error msg
+ * in this case.
+ */
+ if (error == -EBUSY)
+ return error;
}
if (error)
--
2.37.2
next reply other threads:[~2022-12-15 6:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-15 6:20 Shradha Gupta [this message]
2023-01-13 20:14 ` Rafael J. Wysocki
2023-01-14 0:11 ` Dexuan Cui
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=1671085226-21347-1-git-send-email-shradhagupta@linux.microsoft.com \
--to=shradhagupta@linux.microsoft.com \
--cc=decui@microsoft.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.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 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®