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]
Date:	Sun, 5 May 2013 11:23:18 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Colin Cross <ccross@...roid.com>
Cc:	linux-kernel@...r.kernel.org,
	Trond Myklebust <Trond.Myklebust@...app.com>,
	Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	"David S. Miller" <davem@...emloft.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Mandeep Singh Baines <msb@...omium.org>,
	Paul Walmsley <paul@...an.com>,
	Al Viro <viro@...iv.linux.org.uk>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Oleg Nesterov <oleg@...hat.com>, linux-nfs@...r.kernel.org,
	linux-pm@...r.kernel.org, netdev@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Tejun Heo <tj@...nel.org>, Ben Chan <benchan@...omium.org>
Subject: Re: [PATCH 1/2] freezer: add unsafe versions of freezable helpers


* Colin Cross <ccross@...roid.com> wrote:

> NFS calls the freezable helpers with locks held, which is unsafe
> and caused lockdep warnings when 6aa9707 "lockdep: check that no
> locks held at freeze time" was applied (reverted in dbf520a).
> Add new *_unsafe versions of the helpers that will not run the
> lockdep test when 6aa9707 is reapplied, and call them from NFS.
> 
> Signed-off-by: Colin Cross <ccross@...roid.com>
> ---
>  fs/nfs/inode.c          |  2 +-
>  fs/nfs/nfs3proc.c       |  2 +-
>  fs/nfs/nfs4proc.c       |  4 ++--
>  include/linux/freezer.h | 42 +++++++++++++++++++++++++++++++++++++++++-
>  net/sunrpc/sched.c      |  2 +-
>  5 files changed, 46 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
> index 1f94167..53cbee5 100644
> --- a/fs/nfs/inode.c
> +++ b/fs/nfs/inode.c
> @@ -79,7 +79,7 @@ int nfs_wait_bit_killable(void *word)
>  {
>  	if (fatal_signal_pending(current))
>  		return -ERESTARTSYS;
> -	freezable_schedule();
> +	freezable_schedule_unsafe();

I'd suggest naming such variants _unkillable() instead of _unsafe().

There's nothing inherently 'unsafe' about it: the user asked for a hard 
NFS mount and is getting it: with the side effect that it exposes the 
machine to network delays in a 'hard' way as well. Which means suspend may 
block indefinitely as well on network failure.

So it's two conflicting user requirements: 'hard NFS mount' and 'suspend 
now'. We pick the lesser evil, the requirement that is considered higher 
prio: the hard NFS mount in this case.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ