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: <CALCETrVRe2koQAwEiR7p10LqSi4durr9s6uo-1iv_aG-ZNGSkg@mail.gmail.com>
Date:	Tue, 14 Jan 2014 13:26:26 -0800
From:	Andy Lutomirski <luto@...capital.net>
To:	Frank Filz <ffilzlnx@...dspring.com>
Cc:	"J. Bruce Fields" <bfields@...ldses.org>,
	Jeff Layton <jlayton@...hat.com>,
	Linux FS Devel <linux-fsdevel@...r.kernel.org>,
	nfs-ganesha-devel@...ts.sourceforge.net,
	samba-technical@...ts.samba.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Richard Hipp <drh@...ci.com>
Subject: Re: [PATCH v5 13/14] locks: skip deadlock detection on FL_FILE_PVT locks

[grr, gmail -- I didn't actually intend to send that.]

On Tue, Jan 14, 2014 at 1:24 PM, Andy Lutomirski <luto@...capital.net> wrote:
> On Tue, Jan 14, 2014 at 1:19 PM, Frank Filz <ffilzlnx@...dspring.com> wrote:
>>>       process 2 requests a write lock, gets -EDEADLK, unlocks and
>>>       requests a new read lock.  That request succeeds because there
>>>       is no conflicting lock.  (Note the lock manager had no
>>>       opportunity to upgrade 1's lock here thanks to the conflict with
>>>       3's lock.)
>>
>> As I understand write lock priority, process 2 requesting a new read lock
>> would block, once there is a write lock waiter, no further read locks would
>> be granted that would conflict with that waiting write lock.
>
> ...which reminds me -- if anyone implements writer priority, please
> make it optional (either w/ a writer-priority-ignoring read lock or a
> non-priority-granting write lock).  I have an application for which
> writer priority would be really annoying.
>
> Even better: Have read-lock-and-wait-for-pending-writers be an explicit new operation.
>
> (Writer priority a

Writer priority can introduce new deadlocks.  Suppose that a reader
(holding a read lock) starts a subprocess that takes a new read lock
and waits for that subprocess.  Throw an unrelated process in that
tries to take a write lock and you have an instant deadlock.

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