Re: [PATCH 2/4] pktgen: make sure that pktgen_thread_worker hasbeen executed

From: Robert Olsson
Date: Tue May 20 2008 - 16:00:42 EST



Denis V. Lunev writes:

> static int kthread(void *_create)
> {
> ...
> if (!kthread_should_stop())
> pktgen_thread_worker();
> ...
> }
>
> and kthread_stop. If kthread_stop will be called _before_ the control
> goes inside pktgen_thread_worker you'll OOPS.

For some reason my tests survives here... but agree the completion syncing
gives better control.

Cheers
--ro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/