From: Greg Kroah-Hartman Date: Wed, 12 Aug 2009 19:26:38 +0000 (-0700) Subject: .27 patches X-Git-Tag: v2.6.30.5~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42e180f1d46554593a8cc987a10695399fa56120;p=thirdparty%2Fkernel%2Fstable-queue.git .27 patches --- diff --git a/queue-2.6.27/compat_ioctl-hook-up-compat-handler-for-fiemap-ioctl.patch b/queue-2.6.27/compat_ioctl-hook-up-compat-handler-for-fiemap-ioctl.patch new file mode 100644 index 00000000000..93d27f4ce22 --- /dev/null +++ b/queue-2.6.27/compat_ioctl-hook-up-compat-handler-for-fiemap-ioctl.patch @@ -0,0 +1,42 @@ +From 69130c7cf96ea853dc5be599dd6a4b98907d39cc Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Thu, 6 Aug 2009 15:07:37 -0700 +Subject: compat_ioctl: hook up compat handler for FIEMAP ioctl + +From: Eric Sandeen + +commit 69130c7cf96ea853dc5be599dd6a4b98907d39cc upstream. + +The FIEMAP_IOC_FIEMAP mapping ioctl was missing a 32-bit compat handler, +which means that 32-bit suerspace on 64-bit kernels cannot use this ioctl +command. + +The structure is nicely aligned, padded, and sized, so it is just this +simple. + +Tested w/ 32-bit ioctl tester (from Josef) on a 64-bit kernel on ext4. + +Signed-off-by: Eric Sandeen +Cc: +Cc: Mark Lord +Cc: Arnd Bergmann +Cc: Josef Bacik +Cc: Jan Kara +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/compat_ioctl.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/fs/compat_ioctl.c ++++ b/fs/compat_ioctl.c +@@ -1910,6 +1910,7 @@ COMPATIBLE_IOCTL(FIONCLEX) + COMPATIBLE_IOCTL(FIOASYNC) + COMPATIBLE_IOCTL(FIONBIO) + COMPATIBLE_IOCTL(FIONREAD) /* This is also TIOCINQ */ ++COMPATIBLE_IOCTL(FS_IOC_FIEMAP) + /* 0x00 */ + COMPATIBLE_IOCTL(FIBMAP) + COMPATIBLE_IOCTL(FIGETBSZ) diff --git a/queue-2.6.27/execve-must-clear-current-clear_child_tid.patch b/queue-2.6.27/execve-must-clear-current-clear_child_tid.patch new file mode 100644 index 00000000000..5d3deac5c24 --- /dev/null +++ b/queue-2.6.27/execve-must-clear-current-clear_child_tid.patch @@ -0,0 +1,126 @@ +From 9c8a8228d0827e0d91d28527209988f672f97d28 Mon Sep 17 00:00:00 2001 +From: Eric Dumazet +Date: Thu, 6 Aug 2009 15:09:28 -0700 +Subject: execve: must clear current->clear_child_tid + +From: Eric Dumazet + +commit 9c8a8228d0827e0d91d28527209988f672f97d28 upstream. + +While looking at Jens Rosenboom bug report +(http://lkml.org/lkml/2009/7/27/35) about strange sys_futex call done from +a dying "ps" program, we found following problem. + +clone() syscall has special support for TID of created threads. This +support includes two features. + +One (CLONE_CHILD_SETTID) is to set an integer into user memory with the +TID value. + +One (CLONE_CHILD_CLEARTID) is to clear this same integer once the created +thread dies. + +The integer location is a user provided pointer, provided at clone() +time. + +kernel keeps this pointer value into current->clear_child_tid. + +At execve() time, we should make sure kernel doesnt keep this user +provided pointer, as full user memory is replaced by a new one. + +As glibc fork() actually uses clone() syscall with CLONE_CHILD_SETTID and +CLONE_CHILD_CLEARTID set, chances are high that we might corrupt user +memory in forked processes. + +Following sequence could happen: + +1) bash (or any program) starts a new process, by a fork() call that + glibc maps to a clone( ... CLONE_CHILD_SETTID | CLONE_CHILD_CLEARTID + ...) syscall + +2) When new process starts, its current->clear_child_tid is set to a + location that has a meaning only in bash (or initial program) context + (&THREAD_SELF->tid) + +3) This new process does the execve() syscall to start a new program. + current->clear_child_tid is left unchanged (a non NULL value) + +4) If this new program creates some threads, and initial thread exits, + kernel will attempt to clear the integer pointed by + current->clear_child_tid from mm_release() : + + if (tsk->clear_child_tid + && !(tsk->flags & PF_SIGNALED) + && atomic_read(&mm->mm_users) > 1) { + u32 __user * tidptr = tsk->clear_child_tid; + tsk->clear_child_tid = NULL; + + /* + * We don't check the error code - if userspace has + * not set up a proper pointer then tough luck. + */ +<< here >> put_user(0, tidptr); + sys_futex(tidptr, FUTEX_WAKE, 1, NULL, NULL, 0); + } + +5) OR : if new program is not multi-threaded, but spied by /proc/pid + users (ps command for example), mm_users > 1, and the exiting program + could corrupt 4 bytes in a persistent memory area (shm or memory mapped + file) + +If current->clear_child_tid points to a writeable portion of memory of the +new program, kernel happily and silently corrupts 4 bytes of memory, with +unexpected effects. + +Fix is straightforward and should not break any sane program. + +Reported-by: Jens Rosenboom +Acked-by: Linus Torvalds +Signed-off-by: Eric Dumazet +Signed-off-by: Oleg Nesterov +Cc: Peter Zijlstra +Cc: Sonny Rao +Cc: Ingo Molnar +Cc: Thomas Gleixner +Cc: Ulrich Drepper +Cc: Oleg Nesterov +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/fork.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +--- a/kernel/fork.c ++++ b/kernel/fork.c +@@ -536,18 +536,18 @@ void mm_release(struct task_struct *tsk, + * the value intact in a core dump, and to save the unnecessary + * trouble otherwise. Userland only wants this done for a sys_exit. + */ +- if (tsk->clear_child_tid +- && !(tsk->flags & PF_SIGNALED) +- && atomic_read(&mm->mm_users) > 1) { +- u32 __user * tidptr = tsk->clear_child_tid; ++ if (tsk->clear_child_tid) { ++ if (!(tsk->flags & PF_SIGNALED) && ++ atomic_read(&mm->mm_users) > 1) { ++ /* ++ * We don't check the error code - if userspace has ++ * not set up a proper pointer then tough luck. ++ */ ++ put_user(0, tsk->clear_child_tid); ++ sys_futex(tsk->clear_child_tid, FUTEX_WAKE, ++ 1, NULL, NULL, 0); ++ } + tsk->clear_child_tid = NULL; +- +- /* +- * We don't check the error code - if userspace has +- * not set up a proper pointer then tough luck. +- */ +- put_user(0, tidptr); +- sys_futex(tidptr, FUTEX_WAKE, 1, NULL, NULL, 0); + } + } + diff --git a/queue-2.6.27/flat-fix-uninitialized-ptr-with-shared-libs.patch b/queue-2.6.27/flat-fix-uninitialized-ptr-with-shared-libs.patch new file mode 100644 index 00000000000..8ce8f36302d --- /dev/null +++ b/queue-2.6.27/flat-fix-uninitialized-ptr-with-shared-libs.patch @@ -0,0 +1,54 @@ +From 3440625d78711bee41a84cf29c3d8c579b522666 Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Thu, 6 Aug 2009 15:09:34 -0700 +Subject: flat: fix uninitialized ptr with shared libs + +From: Linus Torvalds + +commit 3440625d78711bee41a84cf29c3d8c579b522666 upstream. + +The new credentials code broke load_flat_shared_library() as it now uses +an uninitialized cred pointer. + +Reported-by: Bernd Schmidt +Tested-by: Bernd Schmidt +Cc: Mike Frysinger +Cc: David Howells +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + fs/binfmt_flat.c | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +--- a/fs/binfmt_flat.c ++++ b/fs/binfmt_flat.c +@@ -824,15 +824,22 @@ static int load_flat_shared_library(int + if (IS_ERR(bprm.file)) + return res; + ++ bprm.cred = prepare_exec_creds(); ++ res = -ENOMEM; ++ if (!bprm.cred) ++ goto out; ++ + res = prepare_binprm(&bprm); + + if (res <= (unsigned long)-4096) + res = load_flat_file(&bprm, libs, id, NULL); +- if (bprm.file) { +- allow_write_access(bprm.file); +- fput(bprm.file); +- bprm.file = NULL; +- } ++ ++ abort_creds(bprm.cred); ++ ++out: ++ allow_write_access(bprm.file); ++ fput(bprm.file); ++ + return(res); + } + diff --git a/queue-2.6.27/mm_for_maps-shift-down_read-to-the-caller.patch b/queue-2.6.27/mm_for_maps-shift-down_read-to-the-caller.patch new file mode 100644 index 00000000000..3d924804513 --- /dev/null +++ b/queue-2.6.27/mm_for_maps-shift-down_read-to-the-caller.patch @@ -0,0 +1,70 @@ +From 00f89d218523b9bf6b522349c039d5ac80aa536d Mon Sep 17 00:00:00 2001 +From: Oleg Nesterov +Date: Fri, 10 Jul 2009 03:27:38 +0200 +Subject: mm_for_maps: shift down_read(mmap_sem) to the caller + +From: Oleg Nesterov + +commit 00f89d218523b9bf6b522349c039d5ac80aa536d upstream. + +mm_for_maps() takes ->mmap_sem after security checks, this looks +strange and obfuscates the locking rules. Move this lock to its +single caller, m_start(). + +Signed-off-by: Oleg Nesterov +Acked-by: Serge Hallyn +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + fs/proc/base.c | 8 +++----- + fs/proc/task_mmu.c | 1 + + fs/proc/task_nommu.c | 1 + + 3 files changed, 5 insertions(+), 5 deletions(-) + +--- a/fs/proc/base.c ++++ b/fs/proc/base.c +@@ -240,9 +240,8 @@ static int check_mem_permission(struct t + struct mm_struct *mm_for_maps(struct task_struct *task) + { + struct mm_struct *mm = get_task_mm(task); +- if (!mm) +- return NULL; +- if (mm != current->mm) { ++ ++ if (mm && mm != current->mm) { + /* + * task->mm can be changed before security check, + * in that case we must notice the change after. +@@ -250,10 +249,9 @@ struct mm_struct *mm_for_maps(struct tas + if (!ptrace_may_access(task, PTRACE_MODE_READ) || + mm != task->mm) { + mmput(mm); +- return NULL; ++ mm = NULL; + } + } +- down_read(&mm->mmap_sem); + return mm; + } + +--- a/fs/proc/task_mmu.c ++++ b/fs/proc/task_mmu.c +@@ -119,6 +119,7 @@ static void *m_start(struct seq_file *m, + mm = mm_for_maps(priv->task); + if (!mm) + return NULL; ++ down_read(&mm->mmap_sem); + + tail_vma = get_gate_vma(priv->task); + priv->tail_vma = tail_vma; +--- a/fs/proc/task_nommu.c ++++ b/fs/proc/task_nommu.c +@@ -137,6 +137,7 @@ static void *m_start(struct seq_file *m, + priv->task = NULL; + return NULL; + } ++ down_read(&mm->mmap_sem); + + /* start from the Nth VMA */ + for (vml = mm->context.vmlist; vml; vml = vml->next) diff --git a/queue-2.6.27/mm_for_maps-simplify-use-ptrace_may_access.patch b/queue-2.6.27/mm_for_maps-simplify-use-ptrace_may_access.patch new file mode 100644 index 00000000000..0e9888941f4 --- /dev/null +++ b/queue-2.6.27/mm_for_maps-simplify-use-ptrace_may_access.patch @@ -0,0 +1,65 @@ +From 13f0feafa6b8aead57a2a328e2fca6a5828bf286 Mon Sep 17 00:00:00 2001 +From: Oleg Nesterov +Date: Tue, 23 Jun 2009 21:25:32 +0200 +Subject: mm_for_maps: simplify, use ptrace_may_access() + +From: Oleg Nesterov + +commit 13f0feafa6b8aead57a2a328e2fca6a5828bf286 upstream. + +It would be nice to kill __ptrace_may_access(). It requires task_lock(), +but this lock is only needed to read mm->flags in the middle. + +Convert mm_for_maps() to use ptrace_may_access(), this also simplifies +the code a little bit. + +Also, we do not need to take ->mmap_sem in advance. In fact I think +mm_for_maps() should not play with ->mmap_sem at all, the caller should +take this lock. + +With or without this patch, without ->cred_guard_mutex held we can race +with exec() and get the new ->mm but check old creds. + +Signed-off-by: Oleg Nesterov +Reviewed-by: Serge Hallyn +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + fs/proc/base.c | 23 +++++++++++------------ + 1 file changed, 11 insertions(+), 12 deletions(-) + +--- a/fs/proc/base.c ++++ b/fs/proc/base.c +@@ -242,20 +242,19 @@ struct mm_struct *mm_for_maps(struct tas + struct mm_struct *mm = get_task_mm(task); + if (!mm) + return NULL; ++ if (mm != current->mm) { ++ /* ++ * task->mm can be changed before security check, ++ * in that case we must notice the change after. ++ */ ++ if (!ptrace_may_access(task, PTRACE_MODE_READ) || ++ mm != task->mm) { ++ mmput(mm); ++ return NULL; ++ } ++ } + down_read(&mm->mmap_sem); +- task_lock(task); +- if (task->mm != mm) +- goto out; +- if (task->mm != current->mm && +- __ptrace_may_access(task, PTRACE_MODE_READ) < 0) +- goto out; +- task_unlock(task); + return mm; +-out: +- task_unlock(task); +- up_read(&mm->mmap_sem); +- mmput(mm); +- return NULL; + } + + static int proc_pid_cmdline(struct task_struct *task, char * buffer) diff --git a/queue-2.6.27/series b/queue-2.6.27/series index 09bc3ee52ae..1664fe81970 100644 --- a/queue-2.6.27/series +++ b/queue-2.6.27/series @@ -13,3 +13,13 @@ ieee1394-sbp2-add-support-for-disks-2-tb.patch firewire-sbp2-add-support-for-disks-2-tb.patch x86-enable-gart-iommu-only-after-setting-up-protection-methods.patch asix-new-device-ids.patch +compat_ioctl-hook-up-compat-handler-for-fiemap-ioctl.patch +execve-must-clear-current-clear_child_tid.patch +flat-fix-uninitialized-ptr-with-shared-libs.patch +usb-devio-properly-do-access_ok-checks.patch +usb-ftdi_sio-add-vendor-and-product-id-for-bayer-glucose-meter-serial-converter-cable.patch +usb-ftdi_sio-add-product_id-for-marvell-openrd-base-client.patch +usb-storage-include-prolific-technology-usb-drive-in-unusual_devs-list.patch +usb-usbfs-fix-enoent-error-code-to-be-enodev.patch +mm_for_maps-simplify-use-ptrace_may_access.patch +mm_for_maps-shift-down_read-to-the-caller.patch diff --git a/queue-2.6.27/usb-devio-properly-do-access_ok-checks.patch b/queue-2.6.27/usb-devio-properly-do-access_ok-checks.patch new file mode 100644 index 00000000000..e3cff2f98f0 --- /dev/null +++ b/queue-2.6.27/usb-devio-properly-do-access_ok-checks.patch @@ -0,0 +1,49 @@ +From 18753ebc8a98efe0e8ff6167afb31cef220c8e50 Mon Sep 17 00:00:00 2001 +From: Michael Buesch +Date: Wed, 29 Jul 2009 11:39:03 +0200 +Subject: USB: devio: Properly do access_ok() checks + +From: Michael Buesch + +commit 18753ebc8a98efe0e8ff6167afb31cef220c8e50 upstream. + +access_ok() checks must be done on every part of the userspace structure +that is accessed. If access_ok() on one part of the struct succeeded, it +does not imply it will succeed on other parts of the struct. (Does +depend on the architecture implementation of access_ok()). + +This changes the __get_user() users to first check access_ok() on the +data structure. + +Signed-off-by: Michael Buesch +Cc: Pete Zaitcev +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/devio.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/usb/core/devio.c ++++ b/drivers/usb/core/devio.c +@@ -1305,7 +1305,8 @@ static int get_urb32(struct usbdevfs_urb + struct usbdevfs_urb32 __user *uurb) + { + __u32 uptr; +- if (get_user(kurb->type, &uurb->type) || ++ if (!access_ok(VERIFY_READ, uurb, sizeof(*uurb)) || ++ __get_user(kurb->type, &uurb->type) || + __get_user(kurb->endpoint, &uurb->endpoint) || + __get_user(kurb->status, &uurb->status) || + __get_user(kurb->flags, &uurb->flags) || +@@ -1522,8 +1523,9 @@ static int proc_ioctl_compat(struct dev_ + u32 udata; + + uioc = compat_ptr((long)arg); +- if (get_user(ctrl.ifno, &uioc->ifno) || +- get_user(ctrl.ioctl_code, &uioc->ioctl_code) || ++ if (!access_ok(VERIFY_READ, uioc, sizeof(*uioc)) || ++ __get_user(ctrl.ifno, &uioc->ifno) || ++ __get_user(ctrl.ioctl_code, &uioc->ioctl_code) || + __get_user(udata, &uioc->data)) + return -EFAULT; + ctrl.data = compat_ptr(udata); diff --git a/queue-2.6.27/usb-ftdi_sio-add-product_id-for-marvell-openrd-base-client.patch b/queue-2.6.27/usb-ftdi_sio-add-product_id-for-marvell-openrd-base-client.patch new file mode 100644 index 00000000000..09bc30b3a11 --- /dev/null +++ b/queue-2.6.27/usb-ftdi_sio-add-product_id-for-marvell-openrd-base-client.patch @@ -0,0 +1,47 @@ +From 50d0678e2026c18e4147f0b16b5853113659b82d Mon Sep 17 00:00:00 2001 +From: Dhaval Vasa +Date: Fri, 7 Aug 2009 17:26:49 +0530 +Subject: USB: ftdi_sio: add product_id for Marvell OpenRD Base, Client + +From: Dhaval Vasa + +commit 50d0678e2026c18e4147f0b16b5853113659b82d upstream. + +reference: +http://www.open-rd.org + +Signed-off-by: Dhaval Vasa +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 2 ++ + drivers/usb/serial/ftdi_sio.h | 7 +++++++ + 2 files changed, 9 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -664,6 +664,8 @@ static struct usb_device_id id_table_com + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, + { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, ++ { USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID), ++ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { }, /* Optional parameter entry */ + { } /* Terminating entry */ + }; +--- a/drivers/usb/serial/ftdi_sio.h ++++ b/drivers/usb/serial/ftdi_sio.h +@@ -904,6 +904,13 @@ + #define BAYER_CONTOUR_CABLE_PID 0x6001 + + /* ++ * Marvell OpenRD Base, Client ++ * http://www.open-rd.org ++ * OpenRD Base, Client use VID 0x0403 ++ */ ++#define MARVELL_OPENRD_PID 0x9e90 ++ ++/* + * BmRequestType: 1100 0000b + * bRequest: FTDI_E2_READ + * wValue: 0 diff --git a/queue-2.6.27/usb-ftdi_sio-add-vendor-and-product-id-for-bayer-glucose-meter-serial-converter-cable.patch b/queue-2.6.27/usb-ftdi_sio-add-vendor-and-product-id-for-bayer-glucose-meter-serial-converter-cable.patch new file mode 100644 index 00000000000..58aafa926a5 --- /dev/null +++ b/queue-2.6.27/usb-ftdi_sio-add-vendor-and-product-id-for-bayer-glucose-meter-serial-converter-cable.patch @@ -0,0 +1,49 @@ +From c47aacc67a3d26dfab9c9b8965975ed2b2010b30 Mon Sep 17 00:00:00 2001 +From: Marko Hänninen +Date: Fri, 31 Jul 2009 22:32:39 +0300 +Subject: USB: ftdi_sio: add vendor and product id for Bayer glucose meter serial converter cable + +From: Marko Hänninen + +commit c47aacc67a3d26dfab9c9b8965975ed2b2010b30 upstream. + +Attached patch adds USB vendor and product IDs for Bayer's USB to serial +converter cable used by Bayer blood glucose meters. It seems to be a +FT232RL based device and works without any problem with ftdi_sio driver +when this patch is applied. See: http://winglucofacts.com/cables/ + + +Signed-off-by: Marko Hänninen +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/serial/ftdi_sio.c | 1 + + drivers/usb/serial/ftdi_sio.h | 7 +++++++ + 2 files changed, 8 insertions(+) + +--- a/drivers/usb/serial/ftdi_sio.c ++++ b/drivers/usb/serial/ftdi_sio.c +@@ -663,6 +663,7 @@ static struct usb_device_id id_table_com + { USB_DEVICE(ADI_VID, ADI_GNICE_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, + { USB_DEVICE(JETI_VID, JETI_SPC1201_PID) }, ++ { USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) }, + { }, /* Optional parameter entry */ + { } /* Terminating entry */ + }; +--- a/drivers/usb/serial/ftdi_sio.h ++++ b/drivers/usb/serial/ftdi_sio.h +@@ -897,6 +897,13 @@ + #define JETI_SPC1201_PID 0x04b2 + + /* ++ * Bayer Ascensia Contour blood glucose meter USB-converter cable. ++ * http://winglucofacts.com/cables/ ++ */ ++#define BAYER_VID 0x1A79 ++#define BAYER_CONTOUR_CABLE_PID 0x6001 ++ ++/* + * BmRequestType: 1100 0000b + * bRequest: FTDI_E2_READ + * wValue: 0 diff --git a/queue-2.6.27/usb-storage-include-prolific-technology-usb-drive-in-unusual_devs-list.patch b/queue-2.6.27/usb-storage-include-prolific-technology-usb-drive-in-unusual_devs-list.patch new file mode 100644 index 00000000000..0719e6101a2 --- /dev/null +++ b/queue-2.6.27/usb-storage-include-prolific-technology-usb-drive-in-unusual_devs-list.patch @@ -0,0 +1,43 @@ +From c15e3ca1d822abba78c00b1ffc3e7b382a50396e Mon Sep 17 00:00:00 2001 +From: Rogerio Brito +Date: Thu, 6 Aug 2009 15:20:19 -0700 +Subject: USB: storage: include Prolific Technology USB drive in unusual_devs list + +From: Rogerio Brito + +commit c15e3ca1d822abba78c00b1ffc3e7b382a50396e upstream. + +Add a quirk entry for the Leading Driver UD-11 usb flash drive. + +As Alan Stern told me, the device doesn't deal correctly with the +locking media feature of the device, and this patch incorporates it. + +Compiled, tested, working. + +Signed-off-by: Rogerio Brito +Cc: Phil Dibowitz +Cc: Alan Stern +Cc: Robert Hancock +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/unusual_devs.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -989,6 +989,13 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0 + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY ), + ++/* Reported by Rogerio Brito */ ++UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001, ++ "Prolific Technology, Inc.", ++ "Mass Storage Device", ++ US_SC_DEVICE, US_PR_DEVICE, NULL, ++ US_FL_NOT_LOCKABLE ), ++ + /* Reported by Richard -=[]=- */ + /* Change to bcdDeviceMin (0x0100 to 0x0001) reported by + * Thomas Bartosik */ diff --git a/queue-2.6.27/usb-usbfs-fix-enoent-error-code-to-be-enodev.patch b/queue-2.6.27/usb-usbfs-fix-enoent-error-code-to-be-enodev.patch new file mode 100644 index 00000000000..e1f8c54b006 --- /dev/null +++ b/queue-2.6.27/usb-usbfs-fix-enoent-error-code-to-be-enodev.patch @@ -0,0 +1,32 @@ +From 01105a246345f011fde64d24a601090b646e9e4c Mon Sep 17 00:00:00 2001 +From: Alan Stern +Date: Thu, 30 Jul 2009 15:28:14 -0400 +Subject: USB: usbfs: fix -ENOENT error code to be -ENODEV + +From: Alan Stern + +commit 01105a246345f011fde64d24a601090b646e9e4c upstream. + +This patch (as1272) changes the error code returned when an open call +for a USB device node fails to locate the corresponding device. The +appropriate error code is -ENODEV, not -ENOENT. + +Signed-off-by: Alan Stern +CC: Kay Sievers +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/core/devio.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/usb/core/devio.c ++++ b/drivers/usb/core/devio.c +@@ -579,7 +579,7 @@ static int usbdev_open(struct inode *ino + if (!ps) + goto out; + +- ret = -ENOENT; ++ ret = -ENODEV; + + /* usbdev device-node */ + if (imajor(inode) == USB_DEVICE_MAJOR)