]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.29 patches
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 May 2009 05:16:53 +0000 (22:16 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 May 2009 05:16:53 +0000 (22:16 -0700)
queue-2.6.29/cifs-fix-endian-conversion-of-vcnum-field.patch [new file with mode: 0644]
queue-2.6.29/dmatest-fix-max-channels-handling.patch [new file with mode: 0644]
queue-2.6.29/epoll-fix-size-check-in-epoll_create.patch [new file with mode: 0644]
queue-2.6.29/hid-add-noget-quirk-for-devices-from-ch-products.patch [new file with mode: 0644]
queue-2.6.29/lockd-fix-list-corruption-on-lockd-restart.patch [new file with mode: 0644]
queue-2.6.29/nfs-fix-the-notifications-when-renaming-onto-an-existing-file.patch [new file with mode: 0644]
queue-2.6.29/nfsd4-check-for-negative-dentry-before-use-in-nfsv4-readdir.patch [new file with mode: 0644]
queue-2.6.29/series

diff --git a/queue-2.6.29/cifs-fix-endian-conversion-of-vcnum-field.patch b/queue-2.6.29/cifs-fix-endian-conversion-of-vcnum-field.patch
new file mode 100644 (file)
index 0000000..9b91fd2
--- /dev/null
@@ -0,0 +1,35 @@
+From 051a2a0d3242b448281376bb63cfa9385e0b6c68 Mon Sep 17 00:00:00 2001
+From: Steve French <sfrench@us.ibm.com>
+Date: Fri, 1 May 2009 16:21:04 +0000
+Subject: CIFS: Fix endian conversion of vcnum field
+
+From: Steve French <sfrench@us.ibm.com>
+
+commit 051a2a0d3242b448281376bb63cfa9385e0b6c68 upstream.
+
+When multiply mounting from the same client to the same server, with
+different userids, we create a vcnum which should be unique if
+possible (this is not the same as the smb uid, which is the handle
+to the security context).  We were not endian converting additional
+(beyond the first which is zero) vcnum properly.
+
+Acked-by: Shirish Pargaonkar <shirishp@us.ibm.com>
+Acked-by: Jeff Layton <jlayton@redhat.com>
+Signed-off-by: Steve French <sfrench@us.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/cifs/sess.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/cifs/sess.c
++++ b/fs/cifs/sess.c
+@@ -111,7 +111,7 @@ static __le16 get_next_vcnum(struct cifs
+ get_vc_num_exit:
+       write_unlock(&cifs_tcp_ses_lock);
+-      return le16_to_cpu(vcnum);
++      return cpu_to_le16(vcnum);
+ }
+ static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB)
diff --git a/queue-2.6.29/dmatest-fix-max-channels-handling.patch b/queue-2.6.29/dmatest-fix-max-channels-handling.patch
new file mode 100644 (file)
index 0000000..70c5b28
--- /dev/null
@@ -0,0 +1,35 @@
+From c56c81abe7e684bc6203632d807303eb765690dc Mon Sep 17 00:00:00 2001
+From: Dan Williams <dan.j.williams@intel.com>
+Date: Wed, 8 Apr 2009 15:08:23 -0700
+Subject: dmatest: fix max channels handling
+
+From: Dan Williams <dan.j.williams@intel.com>
+
+commit c56c81abe7e684bc6203632d807303eb765690dc upstream.
+
+The check for reaching max_channels is short circuited by 'continuing'
+after successfully adding a channel.
+
+[ Impact: make the 'max_channels' module parameter actually have an effect ]
+
+Reported-by: Dan Carpenter <error27@gmail.com>
+Signed-off-by: Dan Williams <dan.j.williams@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/dma/dmatest.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/dma/dmatest.c
++++ b/drivers/dma/dmatest.c
+@@ -410,9 +410,7 @@ static int __init dmatest_init(void)
+               chan = dma_request_channel(mask, filter, NULL);
+               if (chan) {
+                       err = dmatest_add_channel(chan);
+-                      if (err == 0)
+-                              continue;
+-                      else {
++                      if (err) {
+                               dma_release_channel(chan);
+                               break; /* add_channel failed, punt */
+                       }
diff --git a/queue-2.6.29/epoll-fix-size-check-in-epoll_create.patch b/queue-2.6.29/epoll-fix-size-check-in-epoll_create.patch
new file mode 100644 (file)
index 0000000..1803640
--- /dev/null
@@ -0,0 +1,36 @@
+From bfe3891a5f5d3b78146a45f40e435d14f5ae39dd Mon Sep 17 00:00:00 2001
+From: Davide Libenzi <davidel@xmailserver.org>
+Date: Tue, 12 May 2009 13:19:44 -0700
+Subject: epoll: fix size check in epoll_create()
+
+From: Davide Libenzi <davidel@xmailserver.org>
+
+commit bfe3891a5f5d3b78146a45f40e435d14f5ae39dd upstream.
+
+Fix a size check WRT the manual pages.  This was inadvertently broken by
+commit 9fe5ad9c8cef9ad5873d8ee55d1cf00d9b607df0 ("flag parameters
+add-on: remove epoll_create size param").
+
+Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
+Cc: <Hiroyuki.Mach@gmail.com>
+Cc: rohit verma <rohit.170309@gmail.com>
+Cc: Ulrich Drepper <drepper@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/eventpoll.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/eventpoll.c
++++ b/fs/eventpoll.c
+@@ -1136,7 +1136,7 @@ error_return:
+ SYSCALL_DEFINE1(epoll_create, int, size)
+ {
+-      if (size < 0)
++      if (size <= 0)
+               return -EINVAL;
+       return sys_epoll_create1(0);
diff --git a/queue-2.6.29/hid-add-noget-quirk-for-devices-from-ch-products.patch b/queue-2.6.29/hid-add-noget-quirk-for-devices-from-ch-products.patch
new file mode 100644 (file)
index 0000000..77622de
--- /dev/null
@@ -0,0 +1,54 @@
+From b820aabf6cb987fd03d85b0b5f599685051e0426 Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Wed, 6 May 2009 15:48:49 -0400
+Subject: HID: add NOGET quirk for devices from CH Products
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+commit b820aabf6cb987fd03d85b0b5f599685051e0426 upstream.
+
+This patch (as1240) adds the NOGET quirk for three devices from CH
+Products: the Pro pedals, the Combatstick joystick, and the Flight-Sim
+yoke.  Without these quirks, the devices haven't worked for many
+kernel releases.  Sometimes replugging them after boot-up would get
+them to work and sometimes they wouldn't work at all.
+
+Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
+Reported-by: Sean Hildebrand <silverwraithii@gmail.com>
+Reported-by: Sid Boyce <sboyce@blueyonder.co.uk>
+Tested-by: Sean Hildebrand <silverwraithii@gmail.com>
+Tested-by: Sid Boyce <sboyce@blueyonder.co.uk>
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hid/hid-ids.h           |    5 +++++
+ drivers/hid/usbhid/hid-quirks.c |    3 +++
+ 2 files changed, 8 insertions(+)
+
+--- a/drivers/hid/hid-ids.h
++++ b/drivers/hid/hid-ids.h
+@@ -110,6 +110,11 @@
+ #define USB_VENDOR_ID_BERKSHIRE               0x0c98
+ #define USB_DEVICE_ID_BERKSHIRE_PCWD  0x1140
++#define USB_VENDOR_ID_CH              0x068e
++#define USB_DEVICE_ID_CH_PRO_PEDALS   0x00f2
++#define USB_DEVICE_ID_CH_COMBATSTICK  0x00f4
++#define USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE      0x00ff
++
+ #define USB_VENDOR_ID_CHERRY          0x046a
+ #define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023
+--- a/drivers/hid/usbhid/hid-quirks.c
++++ b/drivers/hid/usbhid/hid-quirks.c
+@@ -50,6 +50,9 @@ static const struct hid_blacklist {
+       { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
++      { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET },
++      { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET },
++      { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET },
diff --git a/queue-2.6.29/lockd-fix-list-corruption-on-lockd-restart.patch b/queue-2.6.29/lockd-fix-list-corruption-on-lockd-restart.patch
new file mode 100644 (file)
index 0000000..5e8aab4
--- /dev/null
@@ -0,0 +1,78 @@
+From 89996df4b5b1a09c279f50b3fd03aa9df735f5cb Mon Sep 17 00:00:00 2001
+From: J. Bruce Fields <bfields@citi.umich.edu>
+Date: Wed, 6 May 2009 16:32:54 -0400
+Subject: lockd: fix list corruption on lockd restart
+
+From: J. Bruce Fields <bfields@citi.umich.edu>
+
+commit 89996df4b5b1a09c279f50b3fd03aa9df735f5cb upstream.
+
+If lockd is signalled soon enough after restart then locks_start_grace()
+will try to re-add an entry to a list and trigger a lock corruption
+warning.
+
+Thanks to Wang Chen for the problem report and diagnosis.
+
+WARNING: at lib/list_debug.c:26 __list_add+0x27/0x5c()
+...
+list_add corruption. next->prev should be prev (ef8fe958), but was ef8ff128.  (next=ef8ff128).
+...
+Pid: 23062, comm: lockd Tainted: G        W  2.6.30-rc2 #3
+Call Trace:
+[<c042d5b5>] warn_slowpath+0x71/0xa0
+[<c0422a96>] ? update_curr+0x11d/0x125
+[<c044b12d>] ? trace_hardirqs_on_caller+0x18/0x150
+[<c044b270>] ? trace_hardirqs_on+0xb/0xd
+[<c051c61a>] ? _raw_spin_lock+0x53/0xfa
+[<c051c89f>] __list_add+0x27/0x5c
+[<ef8f6daa>] locks_start_grace+0x22/0x30 [lockd]
+[<ef8f34da>] set_grace_period+0x39/0x53 [lockd]
+[<c06b8921>] ? lock_kernel+0x1c/0x28
+[<ef8f3558>] lockd+0x64/0x164 [lockd]
+[<c044b12d>] ? trace_hardirqs_on_caller+0x18/0x150
+[<c04227b0>] ? complete+0x34/0x3e
+[<ef8f34f4>] ? lockd+0x0/0x164 [lockd]
+[<ef8f34f4>] ? lockd+0x0/0x164 [lockd]
+[<c043dd42>] kthread+0x45/0x6b
+[<c043dcfd>] ? kthread+0x0/0x6b
+[<c0403c23>] kernel_thread_helper+0x7/0x10
+
+Reported-by: Wang Chen <wangchen@cn.fujitsu.com>
+Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/lockd/svc.c |   15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+--- a/fs/lockd/svc.c
++++ b/fs/lockd/svc.c
+@@ -115,6 +115,16 @@ static void set_grace_period(void)
+       schedule_delayed_work(&grace_period_end, grace_period);
+ }
++static void restart_grace(void)
++{
++      if (nlmsvc_ops) {
++              cancel_delayed_work_sync(&grace_period_end);
++              locks_end_grace(&lockd_manager);
++              nlmsvc_invalidate_all();
++              set_grace_period();
++      }
++}
++
+ /*
+  * This is the lockd kernel thread
+  */
+@@ -160,10 +170,7 @@ lockd(void *vrqstp)
+               if (signalled()) {
+                       flush_signals(current);
+-                      if (nlmsvc_ops) {
+-                              nlmsvc_invalidate_all();
+-                              set_grace_period();
+-                      }
++                      restart_grace();
+                       continue;
+               }
diff --git a/queue-2.6.29/nfs-fix-the-notifications-when-renaming-onto-an-existing-file.patch b/queue-2.6.29/nfs-fix-the-notifications-when-renaming-onto-an-existing-file.patch
new file mode 100644 (file)
index 0000000..77b85a3
--- /dev/null
@@ -0,0 +1,56 @@
+From b1e4adf4ea41bb8b5a7bfc1a7001f137e65495df Mon Sep 17 00:00:00 2001
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+Date: Thu, 19 Mar 2009 15:35:49 -0400
+Subject: NFS: Fix the notifications when renaming onto an existing file
+
+From: Trond Myklebust <Trond.Myklebust@netapp.com>
+
+commit b1e4adf4ea41bb8b5a7bfc1a7001f137e65495df upstream.
+
+NFS appears to be returning an unnecessary "delete" notification when
+we're doing an atomic rename. See
+
+  http://bugzilla.gnome.org/show_bug.cgi?id=575684
+
+The fix is to get rid of the redundant call to d_delete().
+
+Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/nfs/dir.c |    9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+--- a/fs/nfs/dir.c
++++ b/fs/nfs/dir.c
+@@ -1624,8 +1624,7 @@ static int nfs_rename(struct inode *old_
+               } else if (atomic_read(&new_dentry->d_count) > 1)
+                       /* dentry still busy? */
+                       goto out;
+-      } else
+-              nfs_drop_nlink(new_inode);
++      }
+ go_ahead:
+       /*
+@@ -1638,10 +1637,8 @@ go_ahead:
+       }
+       nfs_inode_return_delegation(old_inode);
+-      if (new_inode != NULL) {
++      if (new_inode != NULL)
+               nfs_inode_return_delegation(new_inode);
+-              d_delete(new_dentry);
+-      }
+       error = NFS_PROTO(old_dir)->rename(old_dir, &old_dentry->d_name,
+                                          new_dir, &new_dentry->d_name);
+@@ -1650,6 +1647,8 @@ out:
+       if (rehash)
+               d_rehash(rehash);
+       if (!error) {
++              if (new_inode != NULL)
++                      nfs_drop_nlink(new_inode);
+               d_move(old_dentry, new_dentry);
+               nfs_set_verifier(new_dentry,
+                                       nfs_save_change_attribute(new_dir));
diff --git a/queue-2.6.29/nfsd4-check-for-negative-dentry-before-use-in-nfsv4-readdir.patch b/queue-2.6.29/nfsd4-check-for-negative-dentry-before-use-in-nfsv4-readdir.patch
new file mode 100644 (file)
index 0000000..bcce80e
--- /dev/null
@@ -0,0 +1,76 @@
+From b2c0cea6b1cb210e962f07047df602875564069e Mon Sep 17 00:00:00 2001
+From: J. Bruce Fields <bfields@citi.umich.edu>
+Date: Tue, 5 May 2009 19:04:29 -0400
+Subject: nfsd4: check for negative dentry before use in nfsv4 readdir
+
+From: J. Bruce Fields <bfields@citi.umich.edu>
+
+commit b2c0cea6b1cb210e962f07047df602875564069e upstream.
+
+After 2f9092e1020246168b1309b35e085ecd7ff9ff72 "Fix i_mutex vs.  readdir
+handling in nfsd" (and 14f7dd63 "Copy XFS readdir hack into nfsd code"),
+an entry may be removed between the first mutex_unlock and the second
+mutex_lock. In this case, lookup_one_len() will return a negative
+dentry.  Check for this case to avoid a NULL dereference.
+
+Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
+Reviewed-by: J. R. Okajima <hooanon05@yahoo.co.jp>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/nfsd/nfs4xdr.c |   16 +++++++++++++++-
+ 1 file changed, 15 insertions(+), 1 deletion(-)
+
+--- a/fs/nfsd/nfs4xdr.c
++++ b/fs/nfsd/nfs4xdr.c
+@@ -1843,6 +1843,15 @@ nfsd4_encode_dirent_fattr(struct nfsd4_r
+       dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen);
+       if (IS_ERR(dentry))
+               return nfserrno(PTR_ERR(dentry));
++      if (!dentry->d_inode) {
++              /*
++               * nfsd_buffered_readdir drops the i_mutex between
++               * readdir and calling this callback, leaving a window
++               * where this directory entry could have gone away.
++               */
++              dput(dentry);
++              return nfserr_noent;
++      }
+       exp_get(exp);
+       /*
+@@ -1905,6 +1914,7 @@ nfsd4_encode_dirent(void *ccdv, const ch
+       struct nfsd4_readdir *cd = container_of(ccd, struct nfsd4_readdir, common);
+       int buflen;
+       __be32 *p = cd->buffer;
++      __be32 *cookiep;
+       __be32 nfserr = nfserr_toosmall;
+       /* In nfsv4, "." and ".." never make it onto the wire.. */
+@@ -1921,7 +1931,7 @@ nfsd4_encode_dirent(void *ccdv, const ch
+               goto fail;
+       *p++ = xdr_one;                             /* mark entry present */
+-      cd->offset = p;                             /* remember pointer */
++      cookiep = p;
+       p = xdr_encode_hyper(p, NFS_OFFSET_MAX);    /* offset of next entry */
+       p = xdr_encode_array(p, name, namlen);      /* name length & name */
+@@ -1935,6 +1945,8 @@ nfsd4_encode_dirent(void *ccdv, const ch
+               goto fail;
+       case nfserr_dropit:
+               goto fail;
++      case nfserr_noent:
++              goto skip_entry;
+       default:
+               /*
+                * If the client requested the RDATTR_ERROR attribute,
+@@ -1953,6 +1965,8 @@ nfsd4_encode_dirent(void *ccdv, const ch
+       }
+       cd->buflen -= (p - cd->buffer);
+       cd->buffer = p;
++      cd->offset = cookiep;
++skip_entry:
+       cd->common.err = nfs_ok;
+       return 0;
+ fail:
index 53ddcc38232384916f1a55ff5c872202f027c658..2c0a0cabb440c465ffb6487dd1fa662502a7ec2b 100644 (file)
@@ -34,3 +34,10 @@ mm-close-page_mkwrite-races.patch
 gfs2-fix-page_mkwrite-return-code.patch
 nfs-fix-the-return-value-in-nfs_page_mkwrite.patch
 nfs-close-page_mkwrite-races.patch
+cifs-fix-endian-conversion-of-vcnum-field.patch
+epoll-fix-size-check-in-epoll_create.patch
+nfsd4-check-for-negative-dentry-before-use-in-nfsv4-readdir.patch
+nfs-fix-the-notifications-when-renaming-onto-an-existing-file.patch
+lockd-fix-list-corruption-on-lockd-restart.patch
+dmatest-fix-max-channels-handling.patch
+hid-add-noget-quirk-for-devices-from-ch-products.patch