public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: jslaby@suse.com, jikos@kernel.org, linux-input@vger.kernel.org
Cc: Oliver Neukum <oneukum@suse.com>,
	Oliver Neukum <ONeukum@suse.com>,
	stable@vger.kernel.org
Subject: [PATCH] hid-elo: kill not flush the work
Date: Tue, 31 May 2016 14:48:15 +0200	[thread overview]
Message-ID: <1464698895-6788-1-git-send-email-oneukum@suse.com> (raw)

Flushing a work that reschedules itself is not a sensible
operation. It needs to be killed. Failure to do so leads
to a kernel panic in the timer code.

Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
---
 drivers/hid/hid-elo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-elo.c b/drivers/hid/hid-elo.c
index aad8c16..0cd4f72 100644
--- a/drivers/hid/hid-elo.c
+++ b/drivers/hid/hid-elo.c
@@ -261,7 +261,7 @@ static void elo_remove(struct hid_device *hdev)
 	struct elo_priv *priv = hid_get_drvdata(hdev);
 
 	hid_hw_stop(hdev);
-	flush_workqueue(wq);
+	cancel_delayed_work_sync(&priv->work);
 	kfree(priv);
 }
 
-- 
2.1.4


             reply	other threads:[~2016-05-31 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31 12:48 Oliver Neukum [this message]
2016-05-31 15:39 ` [PATCH] hid-elo: kill not flush the work Benjamin Tissoires
2016-06-01 12:10 ` Jiri Kosina

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=1464698895-6788-1-git-send-email-oneukum@suse.com \
    --to=oneukum@suse.com \
    --cc=jikos@kernel.org \
    --cc=jslaby@suse.com \
    --cc=linux-input@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