Re: [RFC-PATCH] nfsd: when unhashing openowners, increment openowner's refcount

J. Bruce Fields
2019-08-26T14:38:18Z

On Mon, Aug 26, 2019 at 09:39:51AM -0400, J. Bruce Fields wrote:
> On Sun, Aug 25, 2019 at 01:12:34PM +0300, Alex Lyakas wrote:
> > You are listed as maintainers of nfsd. Can you please take a look at
> > the below patch?
>
> Thanks!
>
> I take it this was found by some kind of code analysis or fuzzing, not
> use in production?
>
> Asking because I've been considering just deprecating it, so:

So, unless someone objects I'd like to queue this up for 5.4.

--b.

commit 9d60d93198c6
Author: J. Bruce Fields <bfields@redhat.com>
Date: Mon Aug 26 10:28:58 2019 -0400

Deprecate nfsd fault injection

This is only useful for client testing. I haven't really maintained it,
and reference counting and locking are wrong at this point. You can get
some of the same functionality now from nfsd/clients/.

It was a good idea but I think its time has passed.

In the unlikely event of users, hopefully the BROKEN dependency will
prompt them to speak up. Otherwise I expect to remove it soon.

Reported-by: Alex Lyakas <alex@zadara.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

diff --git a/fs/nfsd/Kconfig b/fs/nfsd/Kconfig
index bff8456220e0..10cefb0c07c7 100644
--- a/fs/nfsd/Kconfig
+++ b/fs/nfsd/Kconfig
@@ -148,7 +148,7 @@ config NFSD_V4_SECURITY_LABEL

config NFSD_FAULT_INJECTION
bool "NFS server manual fault injection"
- depends on NFSD_V4 && DEBUG_KERNEL && DEBUG_FS
+ depends on NFSD_V4 && DEBUG_KERNEL && DEBUG_FS && BROKEN
help
This option enables support for manually injecting faults
into the NFS server. This is intended to be used for