diff mbox

[Lucid,SRU] UBUNTU: SAUCE: Fix nfs oops stable regression

Message ID 1409791248-27758-1-git-send-email-tim.gardner@canonical.com
State New
Headers show

Commit Message

Tim Gardner Sept. 4, 2014, 12:40 a.m. UTC
From: Tim Gardner <tim.gardner@canonical.com>

BugLink: http://bugs.launchpad.net/bugs/1348670

Fix regression introduced in 3.2.60 by cherry-picking a post-3.14 patch that
depends on the set_acl methods being able to cope with a NULL ACL argument.

Signed-off-by: Sergio Gelato <Sergio.Gelato@astro.su.se>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 fs/nfsd/vfs.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Brad Figg Sept. 4, 2014, 12:51 a.m. UTC | #1
On 09/03/2014 05:40 PM, rtg.canonical@gmail.com wrote:
> From: Tim Gardner <tim.gardner@canonical.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1348670
> 
> Fix regression introduced in 3.2.60 by cherry-picking a post-3.14 patch that
> depends on the set_acl methods being able to cope with a NULL ACL argument.
> 
> Signed-off-by: Sergio Gelato <Sergio.Gelato@astro.su.se>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  fs/nfsd/vfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 446dc01..fc208e4 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -450,6 +450,9 @@ set_nfsv4_acl_one(struct dentry *dentry, struct posix_acl *pacl, char *key)
>  	char *buf = NULL;
>  	int error = 0;
>  
> +	if (!pacl)
> +		return vfs_setxattr(dentry, key, NULL, 0, 0);
> +
>  	buflen = posix_acl_xattr_size(pacl->a_count);
>  	buf = kmalloc(buflen, GFP_KERNEL);
>  	error = -ENOMEM;
>
Luis Henriques Sept. 4, 2014, 8:52 a.m. UTC | #2
On Wed, Sep 03, 2014 at 05:40:48PM -0700, rtg.canonical@gmail.com wrote:
> From: Tim Gardner <tim.gardner@canonical.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1348670
> 
> Fix regression introduced in 3.2.60 by cherry-picking a post-3.14 patch that
> depends on the set_acl methods being able to cope with a NULL ACL argument.
> 
> Signed-off-by: Sergio Gelato <Sergio.Gelato@astro.su.se>
> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
> ---
>  fs/nfsd/vfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 446dc01..fc208e4 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -450,6 +450,9 @@ set_nfsv4_acl_one(struct dentry *dentry, struct posix_acl *pacl, char *key)
>  	char *buf = NULL;
>  	int error = 0;
>  
> +	if (!pacl)
> +		return vfs_setxattr(dentry, key, NULL, 0, 0);
> +
>  	buflen = posix_acl_xattr_size(pacl->a_count);
>  	buf = kmalloc(buflen, GFP_KERNEL);
>  	error = -ENOMEM;
> -- 
> 1.9.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team

I guess there was a typo on the 'Subject:' line: this patch is meant
to be applied to Precise, not Lucid -- the bug refers to kernel
version 3.2, not 2.6.32.

Cheers,
--
Luís
Andy Whitcroft Sept. 4, 2014, 9:49 a.m. UTC | #3
As pointed out by Luis, this seems to be a Precise SRU request.  I have
applied it there.  Did you intend to include a Lucid one as well, or was
this a title typo?

Applied to Precise.

-apw
Sergio Gelato Sept. 4, 2014, 10 a.m. UTC | #4
* Luis Henriques [2014-09-04 09:52:45 +0100]:
> I guess there was a typo on the 'Subject:' line: this patch is meant
> to be applied to Precise, not Lucid -- the bug refers to kernel
> version 3.2, not 2.6.32.

The patch applies to 3.2 and 3.13 at least. If the change that caused the
regression (NFSD: Call ->set_acl with a NULL ACL structure if no entries)
has been applied to 2.6.32, then my patch (or something similar) may well
be needed there too.

The code being patched was refactored away in 3.14.
Andy Whitcroft Sept. 4, 2014, 10:16 a.m. UTC | #5
On Thu, Sep 04, 2014 at 10:49:23AM +0100, Andy Whitcroft wrote:
> As pointed out by Luis, this seems to be a Precise SRU request.  I have
> applied it there.  Did you intend to include a Lucid one as well, or was
> this a title typo?
> 
> Applied to Precise.

On reviewing the bug, it also seems that this is likely applicable to T
as well, the code being removed in v3.14 rendering U unaffected.

-apw
Tim Gardner Sept. 4, 2014, 2:35 p.m. UTC | #6
On 09/04/2014 03:16 AM, Andy Whitcroft wrote:
> On Thu, Sep 04, 2014 at 10:49:23AM +0100, Andy Whitcroft wrote:
>> As pointed out by Luis, this seems to be a Precise SRU request.  I have
>> applied it there.  Did you intend to include a Lucid one as well, or was
>> this a title typo?
>>
>> Applied to Precise.
>
> On reviewing the bug, it also seems that this is likely applicable to T
> as well, the code being removed in v3.14 rendering U unaffected.
>
> -apw
>

Doh! I should never send out patches after 5P. Indeed this does look 
applicable to 3.13. Shall I just apply it ?

rtg
Tim Gardner Sept. 4, 2014, 11:17 p.m. UTC | #7

Andy Whitcroft Sept. 5, 2014, 9:30 a.m. UTC | #8
On Thu, Sep 04, 2014 at 07:35:40AM -0700, Tim Gardner wrote:
> On 09/04/2014 03:16 AM, Andy Whitcroft wrote:
> >On Thu, Sep 04, 2014 at 10:49:23AM +0100, Andy Whitcroft wrote:
> >>As pointed out by Luis, this seems to be a Precise SRU request.  I have
> >>applied it there.  Did you intend to include a Lucid one as well, or was
> >>this a title typo?
> >>
> >>Applied to Precise.
> >
> >On reviewing the bug, it also seems that this is likely applicable to T
> >as well, the code being removed in v3.14 rendering U unaffected.
> >
> >-apw
> >
> 
> Doh! I should never send out patches after 5P. Indeed this does look
> applicable to 3.13. Shall I just apply it ?

Works for me, if it is a cherry-pick there as well, and I can't see how
it couldn't be:

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
diff mbox

Patch

diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 446dc01..fc208e4 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -450,6 +450,9 @@  set_nfsv4_acl_one(struct dentry *dentry, struct posix_acl *pacl, char *key)
 	char *buf = NULL;
 	int error = 0;
 
+	if (!pacl)
+		return vfs_setxattr(dentry, key, NULL, 0, 0);
+
 	buflen = posix_acl_xattr_size(pacl->a_count);
 	buf = kmalloc(buflen, GFP_KERNEL);
 	error = -ENOMEM;