From: Greg Kroah-Hartman Date: Wed, 13 May 2009 05:16:53 +0000 (-0700) Subject: .29 patches X-Git-Tag: v2.6.29.4~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be58864f142b70bf3ed575cfdacd3e28e99bcd8f;p=thirdparty%2Fkernel%2Fstable-queue.git .29 patches --- 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 index 00000000000..9b91fd2e3c5 --- /dev/null +++ b/queue-2.6.29/cifs-fix-endian-conversion-of-vcnum-field.patch @@ -0,0 +1,35 @@ +From 051a2a0d3242b448281376bb63cfa9385e0b6c68 Mon Sep 17 00:00:00 2001 +From: Steve French +Date: Fri, 1 May 2009 16:21:04 +0000 +Subject: CIFS: Fix endian conversion of vcnum field + +From: Steve French + +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 +Acked-by: Jeff Layton +Signed-off-by: Steve French +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..70c5b286f7f --- /dev/null +++ b/queue-2.6.29/dmatest-fix-max-channels-handling.patch @@ -0,0 +1,35 @@ +From c56c81abe7e684bc6203632d807303eb765690dc Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Wed, 8 Apr 2009 15:08:23 -0700 +Subject: dmatest: fix max channels handling + +From: Dan Williams + +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 +Signed-off-by: Dan Williams +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..1803640f174 --- /dev/null +++ b/queue-2.6.29/epoll-fix-size-check-in-epoll_create.patch @@ -0,0 +1,36 @@ +From bfe3891a5f5d3b78146a45f40e435d14f5ae39dd Mon Sep 17 00:00:00 2001 +From: Davide Libenzi +Date: Tue, 12 May 2009 13:19:44 -0700 +Subject: epoll: fix size check in epoll_create() + +From: Davide Libenzi + +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 +Cc: +Cc: rohit verma +Cc: Ulrich Drepper +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..77622de8fd6 --- /dev/null +++ b/queue-2.6.29/hid-add-noget-quirk-for-devices-from-ch-products.patch @@ -0,0 +1,54 @@ +From b820aabf6cb987fd03d85b0b5f599685051e0426 Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Wed, 6 May 2009 15:48:49 -0400 +Subject: HID: add NOGET quirk for devices from CH Products + +From: Alan Stern + +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 +Reported-by: Sean Hildebrand +Reported-by: Sid Boyce +Tested-by: Sean Hildebrand +Tested-by: Sid Boyce +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..5e8aab4e91b --- /dev/null +++ b/queue-2.6.29/lockd-fix-list-corruption-on-lockd-restart.patch @@ -0,0 +1,78 @@ +From 89996df4b5b1a09c279f50b3fd03aa9df735f5cb Mon Sep 17 00:00:00 2001 +From: J. Bruce Fields +Date: Wed, 6 May 2009 16:32:54 -0400 +Subject: lockd: fix list corruption on lockd restart + +From: J. Bruce Fields + +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: +[] warn_slowpath+0x71/0xa0 +[] ? update_curr+0x11d/0x125 +[] ? trace_hardirqs_on_caller+0x18/0x150 +[] ? trace_hardirqs_on+0xb/0xd +[] ? _raw_spin_lock+0x53/0xfa +[] __list_add+0x27/0x5c +[] locks_start_grace+0x22/0x30 [lockd] +[] set_grace_period+0x39/0x53 [lockd] +[] ? lock_kernel+0x1c/0x28 +[] lockd+0x64/0x164 [lockd] +[] ? trace_hardirqs_on_caller+0x18/0x150 +[] ? complete+0x34/0x3e +[] ? lockd+0x0/0x164 [lockd] +[] ? lockd+0x0/0x164 [lockd] +[] kthread+0x45/0x6b +[] ? kthread+0x0/0x6b +[] kernel_thread_helper+0x7/0x10 + +Reported-by: Wang Chen +Signed-off-by: J. Bruce Fields +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..77b85a3e13d --- /dev/null +++ b/queue-2.6.29/nfs-fix-the-notifications-when-renaming-onto-an-existing-file.patch @@ -0,0 +1,56 @@ +From b1e4adf4ea41bb8b5a7bfc1a7001f137e65495df Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Thu, 19 Mar 2009 15:35:49 -0400 +Subject: NFS: Fix the notifications when renaming onto an existing file + +From: Trond Myklebust + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..bcce80ec45d --- /dev/null +++ b/queue-2.6.29/nfsd4-check-for-negative-dentry-before-use-in-nfsv4-readdir.patch @@ -0,0 +1,76 @@ +From b2c0cea6b1cb210e962f07047df602875564069e Mon Sep 17 00:00:00 2001 +From: J. Bruce Fields +Date: Tue, 5 May 2009 19:04:29 -0400 +Subject: nfsd4: check for negative dentry before use in nfsv4 readdir + +From: J. Bruce Fields + +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 +Reviewed-by: J. R. Okajima +Signed-off-by: Greg Kroah-Hartman + +--- + 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: diff --git a/queue-2.6.29/series b/queue-2.6.29/series index 53ddcc38232..2c0a0cabb44 100644 --- a/queue-2.6.29/series +++ b/queue-2.6.29/series @@ -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