From: <gregkh@linuxfoundation.org>
To: benjamin.romer@unisys.com, arnd@arndb.de, dcb314@hotmail.com,
gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "staging: unisys: correctly handle return value from queue_delayed_work()" has been added to the 3.18-stable tree
Date: Fri, 05 May 2017 10:47:24 -0700 [thread overview]
Message-ID: <1494006444227147@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
staging: unisys: correctly handle return value from queue_delayed_work()
to the 3.18-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:
staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch
and it can be found in the queue-3.18 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 f84bd6267d623b49f196d54ba9edc41ff1c4d5e3 Mon Sep 17 00:00:00 2001
From: Benjamin Romer <benjamin.romer@unisys.com>
Date: Thu, 1 Oct 2015 11:52:30 -0400
Subject: staging: unisys: correctly handle return value from queue_delayed_work()
From: Benjamin Romer <benjamin.romer@unisys.com>
commit f84bd6267d623b49f196d54ba9edc41ff1c4d5e3 upstream.
Properly handle the return value from queue_delayed_work() - it's a
bool, not an int, so using a less than comparison isn't appropriate.
This mistake was found by David Binderman <dcb314@hotmail.com>.
[arnd: the fix is from 4.4 but needed some minor fixup to adapt
to context changes]
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/staging/unisys/visorutil/periodic_work.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/staging/unisys/visorutil/periodic_work.c
+++ b/drivers/staging/unisys/visorutil/periodic_work.c
@@ -98,8 +98,8 @@ BOOL visor_periodic_work_nextperiod(stru
pw->want_to_stop = FALSE;
rc = TRUE; /* yes, TRUE; see visor_periodic_work_stop() */
goto unlock;
- } else if (queue_delayed_work(pw->workqueue, &pw->work,
- pw->jiffy_interval) < 0) {
+ } else if (!queue_delayed_work(pw->workqueue, &pw->work,
+ pw->jiffy_interval)) {
ERRDEV(pw->devnam, "queue_delayed_work failed!");
pw->is_scheduled = FALSE;
rc = FALSE;
@@ -134,8 +134,8 @@ BOOL visor_periodic_work_start(struct pe
goto unlock;
}
INIT_DELAYED_WORK(&pw->work, &periodic_work_func);
- if (queue_delayed_work(pw->workqueue, &pw->work,
- pw->jiffy_interval) < 0) {
+ if (!queue_delayed_work(pw->workqueue, &pw->work,
+ pw->jiffy_interval)) {
ERRDEV(pw->devnam, "%s queue_delayed_work failed!", __func__);
rc = FALSE;
goto unlock;
Patches currently in stable-queue which might be from benjamin.romer@unisys.com are
queue-3.18/staging-unisys-correctly-handle-return-value-from-queue_delayed_work.patch
reply other threads:[~2017-05-05 17:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1494006444227147@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=benjamin.romer@unisys.com \
--cc=dcb314@hotmail.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).