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: <201009151917.25589.arnd@arndb.de>
Date:	Wed, 15 Sep 2010 19:17:25 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Sage Weil <sage@...dream.net>
Cc:	Trond Myklebust <Trond.Myklebust@...app.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	Matthew Wilcox <willy@...ux.intel.com>,
	Christoph Hellwig <hch@....de>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Miklos Szeredi <mszeredi@...e.cz>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, John Kacur <jkacur@...hat.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>, gregf@...newdream.net
Subject: Re: [PATCH] Remove BKL from fs/locks.c

On Wednesday 15 September 2010, Sage Weil wrote:
> > @@ -2362,7 +2362,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
> >       if (recon_state->flock) {
> >               int num_fcntl_locks, num_flock_locks;
> >  
> > -             lock_kernel();
> > +             lock_flocks();
> >               ceph_count_locks(inode, &num_fcntl_locks, &num_flock_locks);
> >               rec.v2.flock_len = (2*sizeof(u32) +
> >                                   (num_fcntl_locks+num_flock_locks) *
> > @@ -2373,7 +2373,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
> >                       err = ceph_encode_locks(inode, pagelist,
> >                                               num_fcntl_locks,
> >                                               num_flock_locks);
> > -             unlock_kernel();
> > +             unlock_flocks();
> >       }
> 
> The Ceph code won't currently behave with lock_flocks() taking a spinlock.  
> We're preparing a patch to fix that now.  As long as there is a window 
> between lock_flocks() being defined and the spinlock conversion, I can 
> send the fix upstream then and avoid any breakage.  Or send the patches 
> your way to include in your tree, whatever you prefer!

I'd be happy to just integrate the fix in this patch, or as a separate patch
in the series.

I certainly don't want to break any file system in the middle of the series,
I'm sure we can find a way to do it right.

What is the problem? I just saw ceph_pagelist_addpage potentially sleeping,
is that what you are thinking of?

> > +void unlock_flocks(void)
> > +{
> > +     unlock_kernel();
> > +}
> 
> EXPORT_SYMBOL(unlock_flocks); ?

Right, thanks!

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