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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 May 2009 18:31:05 +0200
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	tom.leiming@...il.com, arjan@...radead.org,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] kernel/async.c:introduce async_schedule*_atomic

On Tue, 12 May 2009 18:04:35 +0200,
Frederic Weisbecker <fweisbec@...il.com> wrote:

> On Tue, May 12, 2009 at 05:44:58PM +0200, Frederic Weisbecker wrote:
> > On Tue, May 12, 2009 at 11:13:42PM +0800, tom.leiming@...il.com wrote:
> > >   * Returns an async_cookie_t that may be used for checkpointing later.
> > > - * Note: This function may be called from atomic or non-atomic contexts.
> > > + * Note:This function may be called from non-atomic contexts,and not
> > > + * 	called from atomic contexts with safety. Please use
> > > + * 	async_schedule_atomic in atomic contexts.
> 
> 
> I suggest to add a comment which explains the reason for which it is unsafe
> to call it in atomic context: because the scheduled work might be synchronously
> executed.
> 
> One could believe this is because async_schedule() internally uses
> a function which might sleep whereas the actual problem may come
> from the scheduled function.

I'm wondering whether this is not mixing two different things up:
- Making async_schedule_* safe from an atomic context.
- Disallowing calling the function synchronously if asynchronous
  scheduling failed.

Perhaps we want async_schedule_nosync() in addition?

> 
> BTW, now that we have an atomic safe version, may be we could
> also adapt the kmalloc GFP flags subsequently?

Yes, that would make sense.
--
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