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: <20090511122046.B0ED.A69D9226@jp.fujitsu.com>
Date:	Mon, 11 May 2009 12:21:40 +0900 (JST)
From:	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>
To:	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
Cc:	kosaki.motohiro@...fujitsu.com, linux-kernel@...r.kernel.org
Subject: Re: Q: semaphore and kmalloc(GFP_KERNEL)?

> KOSAKI Motohiro wrote:
> > > Can the kernel detect that we need to let kmalloc() fail and
> > > wake up the writer process so that the writer process releases
> > > the rw_semaphore and reader processes can continue?
> > 
> > it can't. Plus it shouldn't.
> > some caller don't want kmalloc() failure.
> 
> Thanks.
> Then, should I move kmalloc(GFP_KERNEL) to outside the lock whenever possible?

Yes. almost driver does it.
this is generic issue of nested locking.

> (I worry some lock held by the caller interferes kmalloc(GFP_KERNEL).)



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