All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "xen: don't print error message in case of missing Xenstore entry" has been added to the 4.4-stable tree
@ 2017-11-06  9:25 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-11-06  9:25 UTC (permalink / raw)
  To: jgross, alexander.levin, boris.ostrovsky, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    xen: don't print error message in case of missing Xenstore entry

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xen-don-t-print-error-message-in-case-of-missing-xenstore-entry.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Mon Nov  6 10:22:56 CET 2017
From: Juergen Gross <jgross@suse.com>
Date: Tue, 30 May 2017 20:52:26 +0200
Subject: xen: don't print error message in case of missing Xenstore entry

From: Juergen Gross <jgross@suse.com>


[ Upstream commit 4e93b6481c87ea5afde944a32b4908357ec58992 ]

When registering for the Xenstore watch of the node control/sysrq the
handler will be called at once. Don't issue an error message if the
Xenstore node isn't there, as it will be created only when an event
is being triggered.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/xen/manage.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -275,8 +275,16 @@ static void sysrq_handler(struct xenbus_
 	err = xenbus_transaction_start(&xbt);
 	if (err)
 		return;
-	if (xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key) < 0) {
-		pr_err("Unable to read sysrq code in control/sysrq\n");
+	err = xenbus_scanf(xbt, "control", "sysrq", "%c", &sysrq_key);
+	if (err < 0) {
+		/*
+		 * The Xenstore watch fires directly after registering it and
+		 * after a suspend/resume cycle. So ENOENT is no error but
+		 * might happen in those cases.
+		 */
+		if (err != -ENOENT)
+			pr_err("Error %d reading sysrq code in control/sysrq\n",
+			       err);
 		xenbus_transaction_end(xbt, 1);
 		return;
 	}


Patches currently in stable-queue which might be from jgross@suse.com are

queue-4.4/xen-don-t-print-error-message-in-case-of-missing-xenstore-entry.patch
queue-4.4/xen-manage-correct-return-value-check-on-xenbus_scanf.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-06  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06  9:25 Patch "xen: don't print error message in case of missing Xenstore entry" has been added to the 4.4-stable tree gregkh

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.