From: Greg Kroah-Hartman Date: Fri, 10 May 2013 21:00:47 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.9.2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b6f9d17468f81b6461fb1d82c8a03dc54c11dee;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: hp_accel-ignore-the-error-from-lis3lv02d_poweron-at-resume.patch nfsd4-don-t-allow-owner-override-on-4.1-claim_fh-opens.patch --- diff --git a/queue-3.4/hp_accel-ignore-the-error-from-lis3lv02d_poweron-at-resume.patch b/queue-3.4/hp_accel-ignore-the-error-from-lis3lv02d_poweron-at-resume.patch new file mode 100644 index 00000000000..cc868414d05 --- /dev/null +++ b/queue-3.4/hp_accel-ignore-the-error-from-lis3lv02d_poweron-at-resume.patch @@ -0,0 +1,36 @@ +From 7783819920ca52fc582a2782f654fe6ed373f465 Mon Sep 17 00:00:00 2001 +From: Shuah Khan +Date: Sat, 9 Mar 2013 11:39:22 -0700 +Subject: hp_accel: Ignore the error from lis3lv02d_poweron() at resume + +From: Shuah Khan + +commit 7783819920ca52fc582a2782f654fe6ed373f465 upstream. + +The error in lis3lv02_poweron() is harmless in the resume path, so +we should ignore it. It is inline with the other usages of lis3lv02_poweron() +and matches the 3.0 code for this routine. This patch is in suse git and +might have missed making it into the mainline. +opensuse - commit id: 66ccdac87c322cf7af12bddba8c805af640b1cff + +Signed-off-by: Takashi Iwai +Signed-off-by: Shuah Khan +Signed-off-by: Matthew Garrett +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/hp_accel.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/platform/x86/hp_accel.c ++++ b/drivers/platform/x86/hp_accel.c +@@ -362,7 +362,8 @@ static int lis3lv02d_suspend(struct acpi + + static int lis3lv02d_resume(struct acpi_device *device) + { +- return lis3lv02d_poweron(&lis3_dev); ++ lis3lv02d_poweron(&lis3_dev); ++ return 0; + } + #else + #define lis3lv02d_suspend NULL diff --git a/queue-3.4/nfsd4-don-t-allow-owner-override-on-4.1-claim_fh-opens.patch b/queue-3.4/nfsd4-don-t-allow-owner-override-on-4.1-claim_fh-opens.patch new file mode 100644 index 00000000000..d764bc11eb0 --- /dev/null +++ b/queue-3.4/nfsd4-don-t-allow-owner-override-on-4.1-claim_fh-opens.patch @@ -0,0 +1,65 @@ +From 9f415eb25574db4b73a9a712a4438e41dc284922 Mon Sep 17 00:00:00 2001 +From: "J. Bruce Fields" +Date: Fri, 3 May 2013 16:09:09 -0400 +Subject: nfsd4: don't allow owner override on 4.1 CLAIM_FH opens + +From: "J. Bruce Fields" + +commit 9f415eb25574db4b73a9a712a4438e41dc284922 upstream. + +The Linux client is using CLAIM_FH to implement regular opens, not just +recovery cases, so it depends on the server to check permissions +correctly. + +Therefore the owner override, which may make sense in the delegation +recovery case, isn't right in the CLAIM_FH case. + +Symptoms: on a client with 49f9a0fafd844c32f2abada047c0b9a5ba0d6255 +"NFSv4.1: Enable open-by-filehandle", Bryan noticed this: + + touch test.txt + chmod 000 test.txt + echo test > test.txt + +succeeding. + +Reported-by: Bryan Schumaker +Signed-off-by: J. Bruce Fields +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfsd/nfs4proc.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +--- a/fs/nfsd/nfs4proc.c ++++ b/fs/nfsd/nfs4proc.c +@@ -270,6 +270,7 @@ static __be32 + do_open_fhandle(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open) + { + __be32 status; ++ int accmode = 0; + + /* We don't know the target directory, and therefore can not + * set the change info +@@ -283,9 +284,19 @@ do_open_fhandle(struct svc_rqst *rqstp, + + open->op_truncate = (open->op_iattr.ia_valid & ATTR_SIZE) && + (open->op_iattr.ia_size == 0); ++ /* ++ * In the delegation case, the client is telling us about an ++ * open that it *already* performed locally, some time ago. We ++ * should let it succeed now if possible. ++ * ++ * In the case of a CLAIM_FH open, on the other hand, the client ++ * may be counting on us to enforce permissions (the Linux 4.1 ++ * client uses this for normal opens, for example). ++ */ ++ if (open->op_claim_type == NFS4_OPEN_CLAIM_DELEG_CUR_FH) ++ accmode = NFSD_MAY_OWNER_OVERRIDE; + +- status = do_open_permission(rqstp, current_fh, open, +- NFSD_MAY_OWNER_OVERRIDE); ++ status = do_open_permission(rqstp, current_fh, open, accmode); + + return status; + } diff --git a/queue-3.4/series b/queue-3.4/series index 0ba74b6d360..dad7192a6ed 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -4,3 +4,5 @@ asoc-wm8994-missing-break-in-wm8994_aif3_hw_params.patch acpica-fix-possible-buffer-overflow-during-a-field-unit-read-operation.patch alsa-hda-fix-oops-caused-by-dereference-null-pointer.patch dm-snapshot-fix-error-return-code-in-snapshot_ctr.patch +nfsd4-don-t-allow-owner-override-on-4.1-claim_fh-opens.patch +hp_accel-ignore-the-error-from-lis3lv02d_poweron-at-resume.patch