Re: [PATCH -next] nfsd: remove duplicated include from filecache.c

2019-08-20 Thread J . Bruce Fields
Thanks, applied.--b. On Tue, Aug 20, 2019 at 01:32:43AM +, YueHaibing wrote: > Remove duplicated include. > > Signed-off-by: YueHaibing > --- > fs/nfsd/filecache.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c > index

Re: [PATCH] nfsd4: Fix kernel crash when reading proc file reply_cache_stats

2019-08-16 Thread J. Bruce Fields
On Tue, Aug 06, 2019 at 05:41:04PM +0800, zhe...@windriver.com wrote: > From: He Zhe > > reply_cache_stats uses wrong parameter as seq file private structure and > thus causes the following kernel crash when users read > /proc/fs/nfsd/reply_cache_stats Thanks, applying for 5.3. --b. > > BUG:

Re: [PATCH v3 0/3] auth_gss: netns refcount leaks when use-gss-proxy==1

2019-08-01 Thread J. Bruce Fields
I lost track, what happened to these patches? --b. On Wed, Jun 12, 2019 at 08:09:27PM +0800, Wenbin Zeng wrote: > This patch series fixes an auth_gss bug that results in netns refcount > leaks when use-gss-proxy is set to 1. > > The problem was found in privileged docker containers with

Re: [PATCH] fs: nfsd: Fix three possible null-pointer dereferences

2019-07-30 Thread J. Bruce Fields
On Tue, Jul 30, 2019 at 07:03:39PM -0400, J. Bruce Fields wrote: > Thanks! But I think actually the correct fix is just to remove the NULL > checks entirely. So, something like the following (untested).--b. commit 7ce38d2d8a66 Author: J. Bruce Fields Date: Tue Jul 30 19:06:38 2019

Re: [PATCH] fs: nfsd: Fix three possible null-pointer dereferences

2019-07-30 Thread J. Bruce Fields
On Wed, Jul 24, 2019 at 04:28:03PM +0800, Jia-Ju Bai wrote: > In nfs4_xdr_dec_cb_recall(), nfs4_xdr_dec_cb_layout() and > nfs4_xdr_dec_cb_notify_lock(), there is an if statement to check whether > cb is NULL. > > When cb is NULL, the three functions all call: > decode_cb_op_status(...,

Re: [PATCH 08/16] nfsd: escape high characters in binary data

2019-07-10 Thread J. Bruce Fields
On Fri, Jun 28, 2019 at 12:33:58PM -0400, J. Bruce Fields wrote: > But I may just give up and go with my existing patch and put > off that project indefinitely, especially if there's no real need to fix > the existing callers. I went with the existing patch, but gave a little mor

[GIT PULL] nfsd changes for 5.3

2019-07-10 Thread J. Bruce Fields
exporting of cache_seq_next Geert Uytterhoeven (1): nfsd: Spelling s/EACCESS/EACCES/ J. Bruce Fields (23): nfsd: don't call nfsd_reply_cache_shutdown twice nfsd4: drc containerization nfsd: note inadequate stats locking nfsd: use 64-bit seconds fields in nfsd v4 code nfs

Re: [PATCH -next] nfsd: Make __get_nfsdfs_client() static

2019-07-09 Thread J. Bruce Fields
Thanks, applied.--b. On Mon, Jul 08, 2019 at 08:54:08PM +0800, YueHaibing wrote: > Fix sparse warning: > > fs/nfsd/nfsctl.c:1221:22: warning: > symbol '__get_nfsdfs_client' was not declared. Should it be static? > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing > --- >

Re: [PATCH -next] nfsd: Make two functions static

2019-07-09 Thread J. Bruce Fields
Thanks, applied.--b. On Mon, Jul 08, 2019 at 03:29:33PM +0800, YueHaibing wrote: > Fix sparse warnings: > > fs/nfsd/nfs4state.c:1908:6: warning: symbol 'drop_client' was not declared. > Should it be static? > fs/nfsd/nfs4state.c:2518:6: warning: symbol 'force_expire_client' was not > declared.

Re: [PATCH 8/8] nfsd: Fix misuse of strlcpy

2019-07-09 Thread J. Bruce Fields
On Mon, Jul 08, 2019 at 10:40:50PM -0700, Joe Perches wrote: > On Mon, 2019-07-08 at 23:14 -0400, J. Bruce Fields wrote: > > On Thu, Jul 04, 2019 at 04:57:48PM -0700, Joe Perches wrote: > > > Probable cut typo - use the correct field size. > > > > Huh, that's been

Re: [PATCH 8/8] nfsd: Fix misuse of strlcpy

2019-07-08 Thread J. Bruce Fields
On Thu, Jul 04, 2019 at 04:57:48PM -0700, Joe Perches wrote: > Probable cut typo - use the correct field size. Huh, that's been there forever, I wonder why we haven't seen crashes? Oh, I see, name and authname both have the same size. Anyway, makes sense, thanks. Will apply for 5.3. (Unless

Re: linux-next: manual merge of the vfs tree with the nfsd tree

2019-07-08 Thread J. Bruce Fields
On Tue, Jul 09, 2019 at 12:15:31AM +1000, Stephen Rothwell wrote: > Hi, > > On Mon, 8 Jul 2019 08:45:10 -0400 "J. Bruce Fields" > wrote: > > > > I did a fetch of > > > > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.

Re: [PATCH] sunrpc/cache: remove the exporting of cache_seq_next

2019-07-08 Thread J. Bruce Fields
Makes sense, thanks; apply for 5.3.--b. On Mon, Jul 08, 2019 at 07:14:23PM +0300, Denis Efremov wrote: > The function cache_seq_next is declared static and marked > EXPORT_SYMBOL_GPL, which is at best an odd combination. Because the > function is not used outside of the net/sunrpc/cache.c file it

Re: linux-next: manual merge of the vfs tree with the nfsd tree

2019-07-08 Thread J. Bruce Fields
On Mon, Jul 08, 2019 at 11:06:33AM +1000, Stephen Rothwell wrote: > Today's linux-next merge of the vfs tree got a conflict in: > > fs/nfsd/nfsctl.c > > between commits: > > e8a79fb14f6b ("nfsd: add nfsd/clients directory") > > from the nfsd tree and commit: > > 96a374a35f82 ("vfs:

[GIT PULL] nfsd bugfixes for 5.2

2019-07-05 Thread J. Bruce Fields
Please pull: git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.2-2 Two more quick bugfixes for nfsd, fixing a regression causing mount failures on high-memory machines and fixing the DRC over RDMA. --b. Chuck Lever (1): svcrdma: Ignore source port when computing DRC hash Paul Menzel

Re: linux-next: Fixes tag needs some work in the nfsd tree

2019-07-03 Thread J. Bruce Fields
On Thu, Jul 04, 2019 at 07:40:48AM +1000, Stephen Rothwell wrote: > Hi all, > > In commit > > 56496758e181 ("nfsd: Fix overflow causing non-working mounts on 1 TB > machines") > > Fixes tag > > Fixes: 10a68cdf10 (nfsd: fix performance-limiting session calculation) > > has these

Re: [PATCH] nfsd: Fix overflow causing non-working mounts on 1 TB machines

2019-07-03 Thread J. Bruce Fields
On Wed, Jul 03, 2019 at 06:03:06PM +0200, Paul Menzel wrote: > Dear Bruce, > > > On 7/3/19 5:56 PM, J. Bruce Fields wrote: > > Good catch! And thanks for the detailed explanation. Applying for 5.2 > > and stable. > > Thanks. Please note, that in the last p

Re: [PATCH] nfsd: Fix overflow causing non-working mounts on 1 TB machines

2019-07-03 Thread J. Bruce Fields
Good catch! And thanks for the detailed explanation. Applying for 5.2 and stable. On Wed, Jul 03, 2019 at 02:54:43PM +0200, Paul Menzel wrote: > Date: Wed, 3 Jul 2019 13:28:15 +0200 > > Since commit 10a68cdf10 (nfsd: fix performance-limiting session > calculation) (Linux 5.1-rc1 and 4.19.31),

Re: [PATCH 08/16] nfsd: escape high characters in binary data

2019-06-28 Thread J. Bruce Fields
On Thu, Jun 27, 2019 at 08:58:22PM -0700, Kees Cook wrote: > On Thu, Jun 27, 2019 at 04:21:24PM -0400, J. Bruce Fields wrote: > > No, I was confused: "\n" is non-printable according to isprint(), so > > ESCAPE_ANY_NP *will* escape it. So this isn't quite so bad. SSID

Re: [PATCH 08/16] nfsd: escape high characters in binary data

2019-06-27 Thread J. Bruce Fields
On Wed, Jun 26, 2019 at 12:21:49PM -0400, J. Bruce Fields wrote: > On Mon, Jun 24, 2019 at 05:05:12PM -0400, J. Bruce Fields wrote: > > On Sat, Jun 22, 2019 at 01:22:56PM -0700, Kees Cook wrote: > > > On Sat, Jun 22, 2019 at 03:00:58PM -0400, J. Bruce Fields wrote: > &

Re: [PATCH 08/16] nfsd: escape high characters in binary data

2019-06-27 Thread J. Bruce Fields
On Wed, Jun 26, 2019 at 09:16:44PM -0700, Kees Cook wrote: > Right -- any they're almost all logged surrounded by ' or " which means > those would need to be escaped as well. The prism2 is leaking newlines > too, as well as the thunderbolt sysfs printing. > > So... seems like we should fix this.

Re: [PATCH 08/16] nfsd: escape high characters in binary data

2019-06-26 Thread J. Bruce Fields
On Mon, Jun 24, 2019 at 05:05:12PM -0400, J. Bruce Fields wrote: > On Sat, Jun 22, 2019 at 01:22:56PM -0700, Kees Cook wrote: > > On Sat, Jun 22, 2019 at 03:00:58PM -0400, J. Bruce Fields wrote: > > > The logic around ESCAPE_NP and the "only" string is really confusing.

Re: [PATCH 08/16] nfsd: escape high characters in binary data

2019-06-24 Thread J. Bruce Fields
On Sat, Jun 22, 2019 at 01:22:56PM -0700, Kees Cook wrote: > On Sat, Jun 22, 2019 at 03:00:58PM -0400, J. Bruce Fields wrote: > > The logic around ESCAPE_NP and the "only" string is really confusing. I > > started assuming I could just add an ESCAP

Re: [PATCH 08/16] nfsd: escape high characters in binary data

2019-06-22 Thread J. Bruce Fields
On Fri, Jun 21, 2019 at 03:26:00PM -0700, Kees Cook wrote: > On Fri, Jun 21, 2019 at 01:45:44PM -0400, J. Bruce Fields wrote: > > I'm not sure who to get review from for this kind of thing. > > > > Kees, you seem to be one of the only people to touch string_helpers.c >

Re: [PATCH 08/16] nfsd: escape high characters in binary data

2019-06-21 Thread J. Bruce Fields
I'm not sure who to get review from for this kind of thing. Kees, you seem to be one of the only people to touch string_helpers.c at all recently, any ideas? --b. On Thu, Jun 20, 2019 at 10:51:07AM -0400, J. Bruce Fields wrote: > From: "J. Bruce Fields" > > I'm exposing som

[PATCH] Replace Jeff by Chuck as nfsd co-maintainer

2019-06-19 Thread J. Bruce Fields
From: "J. Bruce Fields" Jeff's picking up more responsibilities elsewhere, and Chuck's agreed to take over. For now, as before, nothing's changing day-to-day, but I want to have a co-maintainer if only for bus factor. Acked-by: Jeff Layton Signed-off-by: J. Bruce Fields --- MAINT

Re: [PATCH v2 0/3] auth_gss: netns refcount leaks when use-gss-proxy==1

2019-06-12 Thread J. Bruce Fields
On Wed, Jun 12, 2019 at 04:37:55PM +0800, Wenbin Zeng wrote: > On Tue, May 14, 2019 at 09:03:31PM -0400, J. Bruce Fields wrote: > > Whoops, I was slow to test these. I'm getting failuring krb5 nfs > > mounts, and the following the server's logs. Dropping the three patches > &

Re: KASAN: use-after-free Read in unregister_shrinker

2019-06-06 Thread J. Bruce Fields
o fail, then later you'd have to create another namespace and this time have a later module's init fail. This is the patch I have, which also fixes a (probably less important) failure to free the slab cache. --b. commit 17c869b35dc9 Author: J. Bruce Fields Date: Wed Jun 5 18:03:52 2019 -0400 nfs

[GIT PULL] nfsd bugfix for 5.2

2019-05-31 Thread J. Bruce Fields
Please pull: git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.2-1 This reverts a minor fix which could cause us to treat conflicting NLM locks as nonconflicting. We have proper fix queued up for 5.3. In the meantime, a quick revert seems best for 5.2 and stable. --b. Benjamin Coddington

Re: [PATCH] [trivial] nfsd: Spelling s/EACCESS/EACCES/

2019-05-31 Thread J . Bruce Fields
Thanks, applying for 5.3.--b. On Mon, May 27, 2019 at 02:21:32PM +0200, Geert Uytterhoeven wrote: > The correct spelling is EACCES: > > include/uapi/asm-generic/errno-base.h:#define EACCES 13 /* Permission denied > */ > > Signed-off-by: Geert Uytterhoeven > --- > fs/nfsd/vfs.c | 2 +- > 1

Re: [PATCH -next] lockd: Make two symbols static

2019-05-28 Thread J. Bruce Fields
On Tue, May 28, 2019 at 06:49:13AM -0400, Benjamin Coddington wrote: > Maintainers, what's the best thing to do here: fold these into > another patch version and post it (add attribution)? Add it as > another patch at the end of the series? Either would be fine. Yeah, if it was folded in then

[GIT PULL] nfsd changes for 5.2

2019-05-15 Thread J. Bruce Fields
variable warning J. Bruce Fields (2): nfsd: allow fh_want_write to be called twice nfsd: fh_drop_write in nfsd_unlink NeilBrown (2): sunrpc/cache: handle missing listeners better. locks: move checks from locks_free_lock() to locks_release_private() Scott Mayhew (6

Re: [PATCH] overlayfs: ignore empty NFSv4 ACLs in ext4 upperdir

2019-05-10 Thread J. Bruce Fields
On Tue, May 07, 2019 at 10:24:58AM +1000, NeilBrown wrote: > Interesting perspective though doesn't NFSv4 explicitly allow > client-side ACL enforcement in the case of delegations? Not really. What you're probably thinking of is the single ACE that the server can return on granting a

Re: [PATCH] overlayfs: ignore empty NFSv4 ACLs in ext4 upperdir

2019-05-07 Thread J. Bruce Fields
On Tue, May 07, 2019 at 04:07:21AM -0400, Miklos Szeredi wrote: > On Fri, May 3, 2019 at 11:35 AM J. Bruce Fields wrote: > > > > On Thu, May 02, 2019 at 12:02:33PM +1000, NeilBrown wrote: > > > > Silently not copying the ACLs is probably not a good ide

Re: [PATCH] overlayfs: ignore empty NFSv4 ACLs in ext4 upperdir

2019-05-03 Thread J. Bruce Fields
On Fri, May 03, 2019 at 01:26:01PM -0400, Amir Goldstein wrote: > On Fri, May 3, 2019 at 12:03 PM J. Bruce Fields wrote: > > > > On Thu, May 02, 2019 at 12:02:33PM +1000, NeilBrown wrote: > > > On Tue, Dec 06 2016, J. Bruce Fields wrote: > > > > > >

Re: [PATCH] overlayfs: ignore empty NFSv4 ACLs in ext4 upperdir

2019-05-03 Thread J. Bruce Fields
On Thu, May 02, 2019 at 12:02:33PM +1000, NeilBrown wrote: > On Tue, Dec 06 2016, J. Bruce Fields wrote: > > > On Tue, Dec 06, 2016 at 02:18:31PM +0100, Andreas Gruenbacher wrote: > >> On Tue, Dec 6, 2016 at 11:08 AM, Miklos Szeredi wrote: > >> > On Tue,

Re: [PATCH] overlayfs: ignore empty NFSv4 ACLs in ext4 upperdir

2019-05-03 Thread J. Bruce Fields
On Thu, May 02, 2019 at 05:51:12PM +, Goetz, Patrick G wrote: > > > On 5/2/19 12:44 PM, Andreas Gruenbacher wrote: > > On Thu, 2 May 2019 at 19:27, Goetz, Patrick G > > wrote: > >> On 5/1/19 10:57 PM, NeilBrown wrote: > >>> Support some day support for nfs4 acls were added to ext4 (not a

Re: [PATCH] overlayfs: ignore empty NFSv4 ACLs in ext4 upperdir

2019-05-02 Thread J. Bruce Fields
On Thu, May 02, 2019 at 05:08:14PM +0200, Andreas Grünbacher wrote: > You'll still see permissions that differ from what the filesystem > enforces, and copy-up would change that behavior. That's always true, and this issue isn't really specific to NFSv4 ACLs (or ACLs at all), it already exists

[GIT PULL] nfsd bugfixes for 5.1

2019-04-23 Thread J. Bruce Fields
Please pull nfsd bugfixes from: git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.1-1 Fix miscellaneous nfsd bugs, in NFSv4.1 callbacks, NFSv4.1 lock-notification callbacks, NFSv3 readdir encoding, and the cache/upcall code. --b. Jeff Layton (2): nfsd: wake waiters blocked on

Re: [PATCH] nfsd: avoid uninitialized variable warning

2019-03-22 Thread J. Bruce Fields
On Fri, Mar 22, 2019 at 03:07:11PM +0100, Arnd Bergmann wrote: > clang warns that 'contextlen' may be accessed without an initialization: > > fs/nfsd/nfs4xdr.c:2911:9: error: variable 'contextlen' is uninitialized when > used here [-Werror,-Wuninitialized] >

Re: [PATCH 20/38] vfs: Convert nfsctl to fs_context

2019-03-14 Thread J. Bruce Fields
cc: "J. Bruce Fields" > cc: Jeff Layton > cc: linux-...@vger.kernel.org > --- > > fs/nfsd/nfsctl.c | 33 ++--- > 1 file changed, 26 insertions(+), 7 deletions(-) > > diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c > index f2feb2

Re: [PATCH 3/7] kthreads: allow multiple kthreadd's

2019-03-12 Thread J. Bruce Fields
I'd like to try to get this in 5.2. Can anyone give me an ACK for the kthread parts? Or tell me who to ask? Let me know if I should resend. Or, of course, tell me if I've missed something and this is all a terrible idea. --b. On Fri, Feb 08, 2019 at 03:10:43PM -0500, J. Bruce Fields wrote

[GIT PULL] nfsd changes for 5.1

2019-03-12 Thread J. Bruce Fields
warnings in work completion handlers Dan Carpenter (1): nfsd: fix an IS_ERR() vs NULL check Gustavo A. R. Silva (1): svcrdma: Use struct_size() in kmalloc() J. Bruce Fields (4): svcrpc: svc_xprt_has_something_to_do seems a little long svcrpc: fix unlikely races preventing

Re: [PATCH] nfsd: allow nfsv3 readdir request to be larger.

2019-03-08 Thread J. Bruce Fields
Thanks! Applied. On Thu, Mar 07, 2019 at 09:49:46AM +1100, NeilBrown wrote: > > nfsd currently reports the NFSv4 dtpref FSINFO parameter (Just changed NFSv4 here to NFSv3.)--b. > to be PAGE_SIZE, so NFS clients will typically ask for one > page of directory entries at a time. This is

Re: [PATCH] nfsd: fix memory corruption caused by readdir

2019-03-05 Thread J. Bruce Fields
On Tue, Mar 05, 2019 at 10:48:45AM +1100, NeilBrown wrote: > On Mon, Mar 04 2019, J. Bruce Fields wrote: > > > On Mon, Mar 04, 2019 at 02:08:22PM +1100, NeilBrown wrote: > >> (Note that the commit hash in the Fixes tag is from the 'history' > >> tree - this

Re: [PATCH] nfsd: fix memory corruption caused by readdir

2019-03-04 Thread J. Bruce Fields
On Mon, Mar 04, 2019 at 02:08:22PM +1100, NeilBrown wrote: > (Note that the commit hash in the Fixes tag is from the 'history' > tree - this bug predates git). > Fixes: eb229d253e6c ("[PATCH] kNFSd: fix two xdr-encode bugs for readdirplus > reply") It'd be nice to provide a URL for that. The

[GIT PULL] more nfsd fixes for 5.0

2019-02-15 Thread J. Bruce Fields
Please pull nfsd bugfixes from: git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.0-2 Two small fixes, one for crashes using nfs/krb5 with older enctypes, one that could prevent clients from reclaiming state after a kernel upgrade. --b. J. Bruce Fields (1): Revert "nfsd4: r

Re: [PATCH 0/7] Eliminate delegation self-conflicts

2019-02-15 Thread J. Bruce Fields
On Mon, Feb 11, 2019 at 10:58:04AM -0500, J. Bruce Fields wrote: > On Sat, Feb 09, 2019 at 07:43:54AM -0500, Jeff Layton wrote: > > On Fri, 2019-02-08 at 15:10 -0500, J. Bruce Fields wrote: > > > From: "J. Bruce Fields" > > > > > > These patches a

Re: [PATCH 0/7] Eliminate delegation self-conflicts

2019-02-11 Thread J. Bruce Fields
On Sat, Feb 09, 2019 at 07:43:54AM -0500, Jeff Layton wrote: > On Fri, 2019-02-08 at 15:10 -0500, J. Bruce Fields wrote: > > From: "J. Bruce Fields" > > > > These patches allow NFSv4 clients holding delegations to keep them when > > the operation that would b

[PATCH 7/7] nfsd: ignore delegation self-conflicts

2019-02-08 Thread J. Bruce Fields
From: "J. Bruce Fields" A client's actions shouldn't revoke its own delegations, even if those same actions (rename, link, etc.) would conflict if they came from a different client. Since nfsd has the necessary information to determine both who is performing the action and

[PATCH 6/7] rpc: move rpc server threads into their own thread group

2019-02-08 Thread J. Bruce Fields
From: "J. Bruce Fields" Signed-off-by: J. Bruce Fields --- include/linux/sunrpc/svc.h | 1 + net/sunrpc/svc.c | 23 ++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index e5

[PATCH 0/7] Eliminate delegation self-conflicts

2019-02-08 Thread J. Bruce Fields
From: "J. Bruce Fields" These patches allow NFSv4 clients holding delegations to keep them when the operation that would break a delegation comes from the same client. To do that, we somehow need to pass the identity of the delegation-breaker down through the VFS. This series use

[PATCH 2/7] kthreads: Simplify tsk_fork_get_node

2019-02-08 Thread J. Bruce Fields
From: "J. Bruce Fields" This will also simplify a following patch that allows multiple kthreadd's. Signed-off-by: J. Bruce Fields --- init/init_task.c | 3 +++ kernel/fork.c| 4 kernel/kthread.c | 3 +-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/init/i

[PATCH 5/7] rpc: separate out body of svc_start_kthreads

2019-02-08 Thread J. Bruce Fields
From: "J. Bruce Fields" No change in behavior, just trivial refactoring. Signed-off-by: J. Bruce Fields --- net/sunrpc/svc.c | 62 +--- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/net/sunrpc/svc.c b/net/sunrpc/s

[PATCH 3/7] kthreads: allow multiple kthreadd's

2019-02-08 Thread J. Bruce Fields
From: "J. Bruce Fields" Allow subsystems to run their own kthreadd's. I'm experimenting with this to allow nfsd to put its threads into its own thread group to make it easy for the vfs to tell when nfsd is breaking one of its own leases. Signed-off-by: J. Bruce Fields --- inc

[PATCH 1/7] kthreads: minor kthreadd refactoring

2019-02-08 Thread J. Bruce Fields
From: "J. Bruce Fields" Trivial refactoring, no change in behavior. Not really necessary, a separate function for the inner loop just seems a little nicer to me. Signed-off-by: J. Bruce Fields --- kernel/kthread.c | 33 +++-- 1 file changed, 19 inserti

[PATCH 4/7] kthreads: allow cloning threads with different flags

2019-02-08 Thread J. Bruce Fields
From: "J. Bruce Fields" This is so knfsd can add CLONE_THREAD. Signed-off-by: J. Bruce Fields --- include/linux/kthread.h | 3 ++- kernel/kthread.c| 11 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/linux/kthread.h b/include/linux/kthre

[GIT PULL] nfsd fixes for 5.0

2019-02-07 Thread J. Bruce Fields
Please pull git://linux-nfs.org/~bfields/linux.git tags/nfsd-5.0-1 for two small nfsd bugfixes for 5.0, for an RDMA bug and a file clone bug. --b. Chuck Lever (1): svcrdma: Remove max_sge check at connect time Trond Myklebust (1): nfsd: Fix error return values for

Re: There is no 'no space' message when using xfs with nfs.

2019-01-10 Thread J. Bruce Fields
On Sun, Dec 09, 2018 at 10:07:26PM +0900, Guk-Bong Kwon wrote: > i use xfs filesystem over nfs > > > I am using the xfs file system via NFS on two Linux servers. > > Even though xfs is full, you will not get a 'no space' message through nfs. > > The server's load average goes up and the

[GIT PULL] nfsd

2019-01-02 Thread J. Bruce Fields
, increase indentation in switch statement J. Bruce Fields (6): nfsd4: zero-length WRITE should succeed nfsd4: remove unused nfs4_check_olstateid parameter nfsd4: forbid all renames during grace period nfsd4: skip unused assignment lockd: fix decoding of TEST results

Re: [PATCH 01/20] nfsd: drop useless LIST_HEAD

2018-12-23 Thread J. Bruce Fields
Applied, thanks.--b. On Sun, Dec 23, 2018 at 09:56:56AM +0100, Julia Lawall wrote: > Drop LIST_HEAD where the variable it declares is never used. > > This was introduced in c5c707f96fc9a ("nfsd: implement pNFS > layout recalls"), but was not used even in that commit. > > The semantic patch that

Re: [LKP] [fs/locks] fd7732e033: stress-ng.eventfd.ops 21.9% improvement

2018-12-11 Thread J. Bruce Fields
On Tue, Dec 11, 2018 at 05:14:29PM +0800, kernel test robot wrote: > FYI, we noticed a 21.9% improvement of stress-ng.eventfd.ops due to commit: So, doesn't sound like a problem, but just looking into it out of curiosity. I love that you do this, but these reports can be hard to figure out

Re: [PATCH 00/23 - V5] NFS: Remove generic RPC credentials.

2018-12-04 Thread J. Bruce Fields
On Mon, Dec 03, 2018 at 11:30:30AM +1100, NeilBrown wrote: > This is the same series as posted on 07 November, modified slightly > to match some recent code changes upstream - nothing substantial. > > General description: > > There doesn't seem to be a maintainer for the 'cred' code, so I don't

Re: [PATCH 00/23 - V5] NFS: Remove generic RPC credentials.

2018-12-04 Thread J. Bruce Fields
On Mon, Dec 03, 2018 at 11:30:30AM +1100, NeilBrown wrote: > This is the same series as posted on 07 November, modified slightly > to match some recent code changes upstream - nothing substantial. > > General description: > > There doesn't seem to be a maintainer for the 'cred' code, so I don't

Re: NFSd: NULL-dereference when writing to v4_end_grace when server is not yet started

2018-11-27 Thread J. Bruce Fields
On Tue, Nov 27, 2018 at 03:58:49PM -0500, J. Bruce Fields wrote: > On Sun, Nov 25, 2018 at 09:17:10AM +0300, Anatoly Trosinenko wrote: > > When manually exploring the kernel NFSd feature, I have stumbled upon > > a NULL-dereference when writing to v4_end_grace when server is not

Re: NFSd: NULL-dereference when writing to v4_end_grace when server is not yet started

2018-11-27 Thread J. Bruce Fields
On Tue, Nov 27, 2018 at 03:58:49PM -0500, J. Bruce Fields wrote: > On Sun, Nov 25, 2018 at 09:17:10AM +0300, Anatoly Trosinenko wrote: > > When manually exploring the kernel NFSd feature, I have stumbled upon > > a NULL-dereference when writing to v4_end_grace when server is not

Re: [PATCH] nfsd: clean up indentation, increase indentation in switch statement

2018-11-27 Thread J . Bruce Fields
Thanks, applying for 4.21.--b. On Sat, Nov 03, 2018 at 04:12:53PM +, Colin King wrote: > From: Colin Ian King > > Trivial fix to clean up indentation, add in missing tabs. > > Signed-off-by: Colin Ian King > --- > fs/nfsd/nfs4state.c | 6 +++--- > 1 file changed, 3 insertions(+), 3

Re: [PATCH] nfsd: clean up indentation, increase indentation in switch statement

2018-11-27 Thread J . Bruce Fields
Thanks, applying for 4.21.--b. On Sat, Nov 03, 2018 at 04:12:53PM +, Colin King wrote: > From: Colin Ian King > > Trivial fix to clean up indentation, add in missing tabs. > > Signed-off-by: Colin Ian King > --- > fs/nfsd/nfs4state.c | 6 +++--- > 1 file changed, 3 insertions(+), 3

Re: NFSd: NULL-dereference when writing to v4_end_grace when server is not yet started

2018-11-27 Thread J. Bruce Fields
hat a lot of the other nfsctl methods do. --b. commit ad5fdf47b4e3 Author: J. Bruce Fields Date: Tue Nov 27 15:54:17 2018 -0500 nfsd4: fix crash on writing v4_end_grace before nfsd startup Anatoly Trosinenko reports that this: 1) Checkout fresh master Linux branch (tested wi

Re: NFSd: NULL-dereference when writing to v4_end_grace when server is not yet started

2018-11-27 Thread J. Bruce Fields
hat a lot of the other nfsctl methods do. --b. commit ad5fdf47b4e3 Author: J. Bruce Fields Date: Tue Nov 27 15:54:17 2018 -0500 nfsd4: fix crash on writing v4_end_grace before nfsd startup Anatoly Trosinenko reports that this: 1) Checkout fresh master Linux branch (tested wi

Re: [LKP] [fs/locks] 83b381078b: will-it-scale.per_thread_ops -62.5% regression

2018-11-27 Thread J. Bruce Fields
Thanks for the report! On Tue, Nov 27, 2018 at 02:01:02PM +0800, kernel test robot wrote: > FYI, we noticed a -62.5% regression of will-it-scale.per_thread_ops due to > commit: > > > commit: 83b381078b5ecab098ebf6bc9548bb32af1dbf31 ("fs/locks: always > delete_block after waiting.") >

Re: [LKP] [fs/locks] 83b381078b: will-it-scale.per_thread_ops -62.5% regression

2018-11-27 Thread J. Bruce Fields
Thanks for the report! On Tue, Nov 27, 2018 at 02:01:02PM +0800, kernel test robot wrote: > FYI, we noticed a -62.5% regression of will-it-scale.per_thread_ops due to > commit: > > > commit: 83b381078b5ecab098ebf6bc9548bb32af1dbf31 ("fs/locks: always > delete_block after waiting.") >

Re: [PATCH V2] exportfs: do not read dentry after free

2018-11-23 Thread J. Bruce Fields
On Fri, Nov 23, 2018 at 03:56:33PM +0800, Pan Bian wrote: > The function dentry_connected calls dput(dentry) to drop the previously > acquired reference to dentry. In this case, dentry can be released. > After that, IS_ROOT(dentry) checks the condition > (dentry == dentry->d_parent), which may

Re: [PATCH V2] exportfs: do not read dentry after free

2018-11-23 Thread J. Bruce Fields
On Fri, Nov 23, 2018 at 03:56:33PM +0800, Pan Bian wrote: > The function dentry_connected calls dput(dentry) to drop the previously > acquired reference to dentry. In this case, dentry can be released. > After that, IS_ROOT(dentry) checks the condition > (dentry == dentry->d_parent), which may

[GIT PULL] nfsd bugfixes

2018-11-13 Thread J. Bruce Fields
Please pull: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.20-1 Three nfsd bugfixes. None are new bugs, but they all take a little effort to hit, which might explain why they weren't found sooner. --b. Frank Sorenson (1): sunrpc: correct the computation for page_ptr when

[GIT PULL] nfsd bugfixes

2018-11-13 Thread J. Bruce Fields
Please pull: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.20-1 Three nfsd bugfixes. None are new bugs, but they all take a little effort to hit, which might explain why they weren't found sooner. --b. Frank Sorenson (1): sunrpc: correct the computation for page_ptr when

Re: [PATCH 00/12 v5] locks: avoid thundering-herd wake-ups

2018-11-12 Thread J. Bruce Fields
ACK to the series. It also passed my usual regression tests on top of 4.19. (I still have some unrelated problems to sort out on 4.20.) --b. On Mon, Nov 12, 2018 at 12:14:48PM +1100, NeilBrown wrote: > Changes: > - field names improved as requested by Bruce. >"fl_blocked_requests" is a

Re: [PATCH 00/12 v5] locks: avoid thundering-herd wake-ups

2018-11-12 Thread J. Bruce Fields
ACK to the series. It also passed my usual regression tests on top of 4.19. (I still have some unrelated problems to sort out on 4.20.) --b. On Mon, Nov 12, 2018 at 12:14:48PM +1100, NeilBrown wrote: > Changes: > - field names improved as requested by Bruce. >"fl_blocked_requests" is a

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-12 Thread J. Bruce Fields
On Mon, Nov 12, 2018 at 12:14:49PM +1100, NeilBrown wrote: > When we find an existing lock which conflicts with a request, > and the request wants to wait, we currently add the request > to a list. When the lock is removed, the whole list is woken. > This can cause the thundering-herd problem. >

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-12 Thread J. Bruce Fields
On Mon, Nov 12, 2018 at 12:14:49PM +1100, NeilBrown wrote: > When we find an existing lock which conflicts with a request, > and the request wants to wait, we currently add the request > to a list. When the lock is removed, the whole list is woken. > This can cause the thundering-herd problem. >

Re: [PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-12 Thread J. Bruce Fields
On Mon, Nov 12, 2018 at 12:14:48PM +1100, NeilBrown wrote: > struct file lock contains an 'fl_next' pointer which > is used to point to the lock that this request is blocked > waiting for. So rename it to fl_blocker. > > The fl_blocked list_head in an active lock is the head of a list of >

Re: [PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-12 Thread J. Bruce Fields
On Mon, Nov 12, 2018 at 12:14:48PM +1100, NeilBrown wrote: > struct file lock contains an 'fl_next' pointer which > is used to point to the lock that this request is blocked > waiting for. So rename it to fl_blocker. > > The fl_blocked list_head in an active lock is the head of a list of >

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-09 Thread J. Bruce Fields
On Fri, Nov 09, 2018 at 05:24:04PM +1100, NeilBrown wrote: > Thanks pretty thorough - and even looks correct. > I'll re-reading some time when it isn't late, and maybe make it into a > comment in the code. > I agree, this sort of documentation can be quite helpful. OK. The idea looks sound to

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-09 Thread J. Bruce Fields
On Fri, Nov 09, 2018 at 05:24:04PM +1100, NeilBrown wrote: > Thanks pretty thorough - and even looks correct. > I'll re-reading some time when it isn't late, and maybe make it into a > comment in the code. > I agree, this sort of documentation can be quite helpful. OK. The idea looks sound to

Re: [PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-08 Thread J. Bruce Fields
On Fri, Nov 09, 2018 at 11:32:16AM +1100, NeilBrown wrote: > On Thu, Nov 08 2018, J. Bruce Fields wrote: > > > On Mon, Nov 05, 2018 at 12:30:47PM +1100, NeilBrown wrote: > >> struct file lock contains an 'fl_next' pointer which > >> is used to point to the loc

Re: [PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-08 Thread J. Bruce Fields
On Fri, Nov 09, 2018 at 11:32:16AM +1100, NeilBrown wrote: > On Thu, Nov 08 2018, J. Bruce Fields wrote: > > > On Mon, Nov 05, 2018 at 12:30:47PM +1100, NeilBrown wrote: > >> struct file lock contains an 'fl_next' pointer which > >> is used to point to the loc

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-08 Thread J. Bruce Fields
On Fri, Nov 09, 2018 at 11:38:19AM +1100, NeilBrown wrote: > On Thu, Nov 08 2018, J. Bruce Fields wrote: > > > On Mon, Nov 05, 2018 at 12:30:48PM +1100, NeilBrown wrote: > >> When we find an existing lock which conflicts with a request, > >> and the request w

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-08 Thread J. Bruce Fields
On Fri, Nov 09, 2018 at 11:38:19AM +1100, NeilBrown wrote: > On Thu, Nov 08 2018, J. Bruce Fields wrote: > > > On Mon, Nov 05, 2018 at 12:30:48PM +1100, NeilBrown wrote: > >> When we find an existing lock which conflicts with a request, > >> and the request w

Re: [PATCH 00/12] Series short description

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:47PM +1100, NeilBrown wrote: > Here is the respin on this series with the file_lock properly > initlized for unlock requests. > I found one that I had missed before - in locks_remove_flock() > The change makes this code smaller! > > Original series description: > >

Re: [PATCH 00/12] Series short description

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:47PM +1100, NeilBrown wrote: > Here is the respin on this series with the file_lock properly > initlized for unlock requests. > I found one that I had missed before - in locks_remove_flock() > The change makes this code smaller! > > Original series description: > >

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:48PM +1100, NeilBrown wrote: > When we find an existing lock which conflicts with a request, > and the request wants to wait, we currently add the request > to a list. When the lock is removed, the whole list is woken. > This can cause the thundering-herd problem. >

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:48PM +1100, NeilBrown wrote: > When we find an existing lock which conflicts with a request, > and the request wants to wait, we currently add the request > to a list. When the lock is removed, the whole list is woken. > This can cause the thundering-herd problem. >

Re: [PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:47PM +1100, NeilBrown wrote: > struct file lock contains an 'fl_next' pointer which > is used to point to the lock that this request is blocked > waiting for. So rename it to fl_blocker. > > The fl_blocked list_head in an active lock is the head of a list of >

Re: [PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:47PM +1100, NeilBrown wrote: > struct file lock contains an 'fl_next' pointer which > is used to point to the lock that this request is blocked > waiting for. So rename it to fl_blocker. > > The fl_blocked list_head in an active lock is the head of a list of >

Re: [GIT PULL] nfsd changes for 4.20

2018-10-31 Thread J. Bruce Fields
On Tue, Oct 30, 2018 at 01:06:58PM -0700, Linus Torvalds wrote: > On Tue, Oct 30, 2018 at 12:55 PM Linus Torvalds > wrote: > > > > Pulled, > > Oh, I take that back. Semantic conflict with locking name change > (recv_lock -> queue_lock) and new code in > >

Re: [GIT PULL] nfsd changes for 4.20

2018-10-31 Thread J. Bruce Fields
On Tue, Oct 30, 2018 at 01:06:58PM -0700, Linus Torvalds wrote: > On Tue, Oct 30, 2018 at 12:55 PM Linus Torvalds > wrote: > > > > Pulled, > > Oh, I take that back. Semantic conflict with locking name change > (recv_lock -> queue_lock) and new code in > >

[GIT PULL] nfsd changes for 4.20

2018-10-30 Thread J. Bruce Fields
Please pull nfsd changes for 4.20: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.20 Olga added support for the NFSv4.2 asynchronous copy protocol. We already supported COPY, by copying a limited amount of data and then returning a short result, letting the client resend. The

[GIT PULL] nfsd changes for 4.20

2018-10-30 Thread J. Bruce Fields
Please pull nfsd changes for 4.20: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.20 Olga added support for the NFSv4.2 asynchronous copy protocol. We already supported COPY, by copying a limited amount of data and then returning a short result, letting the client resend. The

Re: KASAN: slab-out-of-bounds Read in string (2)

2018-10-25 Thread J. Bruce Fields
On Thu, Oct 25, 2018 at 06:17:25PM +0300, Amir Goldstein wrote: > On Thu, Oct 25, 2018 at 6:02 PM Bruce Fields wrote: > > > > > So I guess it has fallen between the cracks. > > > > Feel free to send a patch to Jeff. > > > > > > > > Thanks, > > > > Amir. > > > > > > Actually, this should probably

Re: KASAN: slab-out-of-bounds Read in string (2)

2018-10-25 Thread J. Bruce Fields
On Thu, Oct 25, 2018 at 06:17:25PM +0300, Amir Goldstein wrote: > On Thu, Oct 25, 2018 at 6:02 PM Bruce Fields wrote: > > > > > So I guess it has fallen between the cracks. > > > > Feel free to send a patch to Jeff. > > > > > > > > Thanks, > > > > Amir. > > > > > > Actually, this should probably

<    1   2   3   4   5   6   7   8   9   10   >