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: <20150320134232.GX29656@ZenIV.linux.org.uk>
Date:	Fri, 20 Mar 2015 13:42:32 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Vitaly Chernooky <vitalii.chernookyi@...ballogic.com>
Cc:	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	David Vrabel <david.vrabel@...rix.com>,
	Marek Marczykowski-Górecki 
	<marmarek@...isiblethingslab.com>,
	Iurii Konovalenko <iurii.konovalenko@...ballogic.com>,
	Ian Campbell <ian.campbell@...rix.com>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	Andrii Anisov <andrii.anisov@...ballogic.com>,
	Artem Mygaiev <artem.mygaiev@...ballogic.com>
Subject: Re: [PATCH] [RFC] Fix deadlock on regular nonseekable files

On Fri, Mar 20, 2015 at 03:17:54PM +0200, Vitaly Chernooky wrote:
> >From 8ef72cde695d1b1a3e9f6165477c9e7415fca2b1 Mon Sep 17 00:00:00 2001
> From: Vitaly Chernooky <vitaly.chernooky@...ballogic.com>
> Date: Fri, 20 Mar 2015 12:26:37 +0200
> Subject: [PATCH] Fix deadlock on regular nonseekable files
> 
> 'Commit 9c225f2655e36a470c4f58dbbc99244c5fc7f2d4 ("vfs: atomic f_pos
> accesses as per POSIX")' introduce following regression. If some program
> does multithreaded IO on file in pseudo-filesystem, like procfs, with
> nonseekable files marked as regular, we get deadlock on f_pos_lock
> mutex, if there are simultaneous reading and writing by different
> threads.
 
Details of deadlock, please.  How do we manage that when it's always the
outermost lock to be taken?  Describe the minimal deadlocked set of threads -
thread 1 holds <this> and is blocked trying to get <that>, etc.

AFAICS, any threads blocked on f_pos_lock are not holding anything else and
cannot impede the rest.  What am I missing here?
--
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