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:	Fri, 29 Mar 2013 14:43:31 -0400
From:	"J. Bruce Fields" <bfields@...ldses.org>
To:	Toralf Förster <toralf.foerster@....de>
Cc:	Linux NFS mailing list <linux-nfs@...r.kernel.org>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: kernel 3.8.4 : kernel BUG at fs/locks.c:2093!   part #2

On Wed, Mar 27, 2013 at 05:57:27PM -0400, J. Bruce Fields wrote:
> On Wed, Mar 27, 2013 at 10:35:12PM +0100, Toralf Förster wrote:
> > On 03/26/2013 03:46 PM, J. Bruce Fields wrote:
> > > Can you run with test patches?
> > 
> > applied - today I got a warning instead a bug at the host kernel (3.8.4):
> 
> Excellent!  Thanks, I think I see the bug now....

This logic is just terrible; I'll see what if I can make this more
sensible.

For now, though, this should fix the bug.

Thanks again for this testing.

--b.

commit 01463db0a864d43bd2c9a69ff37d5a75b7822a49
Author: J. Bruce Fields <bfields@...hat.com>
Date:   Thu Mar 28 20:37:14 2013 -0400

    nfsd4: don't close read-write opens too soon
    
    Don't actually close any opens until we don't need them at all.
    
    This means being left with write access when it's not really necessary,
    but that's better than putting a file that might still have posix locks
    held on it, as we have been.
    
    Signed-off-by: J. Bruce Fields <bfields@...hat.com>

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index aac878e..285a0c8 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -210,13 +210,7 @@ static void __nfs4_file_put_access(struct nfs4_file *fp, int oflag)
 {
 	if (atomic_dec_and_test(&fp->fi_access[oflag])) {
 		nfs4_file_put_fd(fp, oflag);
-		/*
-		 * It's also safe to get rid of the RDWR open *if*
-		 * we no longer have need of the other kind of access
-		 * or if we already have the other kind of open:
-		 */
-		if (fp->fi_fds[1-oflag]
-			|| atomic_read(&fp->fi_access[1 - oflag]) == 0)
+		if (atomic_read(&fp->fi_access[1 - oflag]) == 0)
 			nfs4_file_put_fd(fp, O_RDWR);
 	}
 }
--
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