public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Crash in schedule path after worker thread dies
@ 2011-07-20  0:07 Todd Poynor
  2011-07-20 17:07 ` Tejun Heo
  0 siblings, 1 reply; 3+ messages in thread
From: Todd Poynor @ 2011-07-20  0:07 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-kernel

After a worker thread died due to a bug in a work function, a NULL
dereference was seen when schedule calls wq_worker_sleeping calls
kthread_data:

          return to_kthread(task)->data;

mm_release has apparently already set the task's vfork_done = NULL,
causing to_kthread to return a bad address (on 3.0-rc7 on ARM).

I haven't tried a fix because I'm not sure if avoiding this case is
enough to properly recover from death of a worker thread, or if this
has already been discussed and rejected in the past.  I searched
around a little and found some mentions of problems in worker
functions that were probably followed by the kthread_data crash,
but didn't turn up any specific discussion of this crash.  So I
thought I'd start by mentioning this here, and can help fix or test if
needed.


Todd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-20 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-20  0:07 Crash in schedule path after worker thread dies Todd Poynor
2011-07-20 17:07 ` Tejun Heo
2011-07-20 18:06   ` Todd Poynor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox