lkml.org 
[lkml]   [2017]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.18 26/27] xen: dont print error message in case of missing Xenstore entry
    Date
    3.18-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    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
    @@ -272,8 +272,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;
    }

    \
     
     \ /
      Last update: 2017-11-06 12:32    [W:4.441 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site