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: <AANLkTinTm-LwjfBfoFUyp5Dj8S2hexnHGQGpZiOWqyMY@mail.gmail.com>
Date:	Wed, 27 Oct 2010 09:12:06 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Christoph Hellwig <hch@...radead.org>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Bryan Schumaker <bjschuma@...app.com>,
	linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: nfsd changes for 2.6.37

On Wed, Oct 27, 2010 at 8:23 AM, Arnd Bergmann <arnd@...db.de> wrote:
>
> locks_delete_lock is also called with lock_flocks held and calls
> fasync_helper...

We don't really have to use fasync_helper.

In fact, the whole interface is pretty broken for something like file
locking, which isn't actually "fasync()". That whole "on/off as an
argument" is just crazy. It would be _trivial_ to expose a version of
fasync_helper() that takes a pre-allocated fasync_struct for add, and
that has separate helper functions for the add/delete case so that you
don't have the pointless crazy arguments (for "delete" the "fd"
argument is useless, and I do hate "modal" functions that take what
they should do as a flag).

Then fcntl_setlease() would trivially just allocate the dang thing before.

Something like the attached (UNTESTED!) perhaps?

                           Linus

View attachment "patch.diff" of type "text/x-patch" (5305 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ