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: <1342061369.4091.21.camel@ThinkPad-T420>
Date:	Thu, 12 Jul 2012 10:49:29 +0800
From:	Li Zhong <zhong@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, arjan@...ux.intel.com,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Christian Kujau <lists@...dbynature.de>,
	Cong Wang <xiyou.wangcong@...il.com>,
	Dan Williams <dan.j.williams@...el.com>
Subject: Re: [PATCH RESEND] Fix a dead loop in async_synchronize_full()

On Wed, 2012-07-11 at 15:42 -0700, Andrew Morton wrote:
> On Mon, 09 Jul 2012 15:04:25 +0800
> Li Zhong <zhong@...ux.vnet.ibm.com> wrote:
> 
> > This patch tries to fix a dead loop in  async_synchronize_full(), which
> > could be seen when preemption is disabled on a single cpu machine. 
> > 
> > void async_synchronize_full(void)
> > {
> >         do {
> >                 async_synchronize_cookie(next_cookie);
> >         } while (!list_empty(&async_running) || !
> > list_empty(&async_pending));
> > }
> > 
> > async_synchronize_cookie() calls async_synchronize_cookie_domain() with
> > &async_running as the default domain to synchronize. 
> > 
> > However, there might be some works in the async_pending list from other
> > domains. On a single cpu system, without preemption, there is no chance
> > for the other works to finish, so async_synchronize_full() enters a dead
> > loop. 
> > 
> > It seems async_synchronize_full() wants to synchronize all entries in
> > all running lists(domains), so maybe we could just check the entry_count
> > to know whether all works are finished. 
> > 
> > Currently, async_synchronize_cookie_domain() expects a non-NULL running
> > list ( if NULL, there would be NULL pointer dereference ), so maybe a
> > NULL pointer could be used as an indication for the functions to
> > synchronize all works in all domains. 
> 
> The patch is fairly wordwrapped - please fix up your email client.

Ah, sorry for that, I will check it. 

> 
> More seriously, it does not apply to linux-next due to some fairly
> significant changes which have been sitting in Dan's tree since May. 
> What's going on?
> 

Just went through Dan's patches, it seems that they also had
async_synchronize_full() to sync all domains. I will test/check those
patches, and drop this one if the result is good. 

--
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