Thread (23 messages) flat view 23 messages, 4 authors, 2014-08-11

Re: [Xen-devel] [PATCH net v2 2/3] xen-netback: don't stop dealloc kthread too early

From: Wei Liu <hidden>
Date: 2014-08-11 14:39:20

On Mon, Aug 11, 2014 at 03:34:48PM +0100, David Vrabel wrote:
[...]
quoted
quoted
And cleaning it up a bit (the while() could be a for(;;)).
Unfortunately this approach is bogus. If xenbus thread is not blocked it
can free up various resources while dealloc thread is running -- queue
can be gone under dealloc thread's feet.
kthread_stop() waits until the thread exits (like pthread_join()).

/**
 * kthread_stop - stop a thread created by kthread_create().
 * @k: thread created by kthread_create().
 *
 * Sets kthread_should_stop() for @k to return true, wakes it, and
 * waits for it to exit.
Ah, misremeber the behaviour of kthread_stop. Sorry for the noise.

Wei.
David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help