Re: [PATCH] input: polldev can cause crash in case of polling disabled
From: Oleg Nesterov <oleg@redhat.com>
Date: 2010-02-17 20:24:29
From: Oleg Nesterov <oleg@redhat.com>
Date: 2010-02-17 20:24:29
On 02/17, Dmitry Torokhov wrote:
It apppears that it is allowed to try to cancel work that has never been queued
Yes,
and I believe that canceled or completed work should be exactly the same as never been queued work (which is apparently not the case currently).
And yes, currently this is not the case. As I said, I agree that cancel() could clear ->data. Will this change help? (in any case this change is not for 2.6.33) But I don't see how "completed" can do this, please see my previous email. Note that flush() can't do this too.
Yes, it is certainly possible to work around the issue in every driver that may happen to shut down and re-create workqueue as needed. The question is whether it is the right thing to do.
I'd say, the question is whether we can improve this ;) Well, see above. Oleg.