lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1211309022.7496.3.camel@iris.sw.ru>
Date:	Tue, 20 May 2008 22:43:42 +0400
From:	"Denis V. Lunev" <den@...nvz.org>
To:	Robert Olsson <Robert.Olsson@...a.slu.se>
Cc:	akpm@...ux-foundation.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Patrick McHardy <kaber@...sh.net>,
	Robert Olsson <robert.olsson@....uu.se>,
	Ben Greear <greearb@...delatech.com>
Subject: Re: [PATCH 2/4] pktgen: make sure that pktgen_thread_worker has
	been executed

On Tue, 2008-05-20 at 20:30 +0200, Robert Olsson wrote:
> Denis V. Lunev writes:
> 
>  > The problem is that pktgen_thread_worker can not be executed if kthread_stop
>  > has been called too early. Insert a completion on the normal initialization
>  > path to make sure that pktgen_thread_worker will gain the control for sure.
> 
> 
>  Yes how about if we move the wait_for_completion() to pg_cleanup before
>  we remove the threads. And move the complete() last in pktgen_thread_worker. 
>  This completion would sync with both start and stop.
> 
>  Cheers.
> 					--ro

you can't. The idea is to have a checkpoint _before_ khread_stop.
Currently you have a race between


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.

Regards,
	Den

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ