--- /dev/null
+From 69130c7cf96ea853dc5be599dd6a4b98907d39cc Mon Sep 17 00:00:00 2001
+From: Eric Sandeen <sandeen@redhat.com>
+Date: Thu, 6 Aug 2009 15:07:37 -0700
+Subject: compat_ioctl: hook up compat handler for FIEMAP ioctl
+
+From: Eric Sandeen <sandeen@redhat.com>
+
+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 <sandeen@redhat.com>
+Cc: <linux-ext4@vger.kernel.org>
+Cc: Mark Lord <lkml@rtr.ca>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Cc: Josef Bacik <josef@redhat.com>
+Cc: Jan Kara <jack@suse.cz>
+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/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)
--- /dev/null
+From 9c8a8228d0827e0d91d28527209988f672f97d28 Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <eric.dumazet@gmail.com>
+Date: Thu, 6 Aug 2009 15:09:28 -0700
+Subject: execve: must clear current->clear_child_tid
+
+From: Eric Dumazet <eric.dumazet@gmail.com>
+
+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 <jens@mcbone.net>
+Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: Oleg Nesterov <oleg@redhat.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Sonny Rao <sonnyrao@us.ibm.com>
+Cc: Ingo Molnar <mingo@elte.hu>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Ulrich Drepper <drepper@redhat.com>
+Cc: Oleg Nesterov <oleg@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>
+
+---
+ 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);
+ }
+ }
+
--- /dev/null
+From 3440625d78711bee41a84cf29c3d8c579b522666 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Thu, 6 Aug 2009 15:09:34 -0700
+Subject: flat: fix uninitialized ptr with shared libs
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+commit 3440625d78711bee41a84cf29c3d8c579b522666 upstream.
+
+The new credentials code broke load_flat_shared_library() as it now uses
+an uninitialized cred pointer.
+
+Reported-by: Bernd Schmidt <bernds_cb1@t-online.de>
+Tested-by: Bernd Schmidt <bernds_cb1@t-online.de>
+Cc: Mike Frysinger <vapier@gentoo.org>
+Cc: David Howells <dhowells@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/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);
+ }
+
--- /dev/null
+From 00f89d218523b9bf6b522349c039d5ac80aa536d Mon Sep 17 00:00:00 2001
+From: Oleg Nesterov <oleg@redhat.com>
+Date: Fri, 10 Jul 2009 03:27:38 +0200
+Subject: mm_for_maps: shift down_read(mmap_sem) to the caller
+
+From: Oleg Nesterov <oleg@redhat.com>
+
+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 <oleg@redhat.com>
+Acked-by: Serge Hallyn <serue@us.ibm.com>
+Signed-off-by: James Morris <jmorris@namei.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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)
--- /dev/null
+From 13f0feafa6b8aead57a2a328e2fca6a5828bf286 Mon Sep 17 00:00:00 2001
+From: Oleg Nesterov <oleg@redhat.com>
+Date: Tue, 23 Jun 2009 21:25:32 +0200
+Subject: mm_for_maps: simplify, use ptrace_may_access()
+
+From: Oleg Nesterov <oleg@redhat.com>
+
+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 <oleg@redhat.com>
+Reviewed-by: Serge Hallyn <serue@us.ibm.com>
+Signed-off-by: James Morris <jmorris@namei.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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)
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
--- /dev/null
+From 18753ebc8a98efe0e8ff6167afb31cef220c8e50 Mon Sep 17 00:00:00 2001
+From: Michael Buesch <mb@bu3sch.de>
+Date: Wed, 29 Jul 2009 11:39:03 +0200
+Subject: USB: devio: Properly do access_ok() checks
+
+From: Michael Buesch <mb@bu3sch.de>
+
+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 <mb@bu3sch.de>
+Cc: Pete Zaitcev <zaitcev@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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);
--- /dev/null
+From 50d0678e2026c18e4147f0b16b5853113659b82d Mon Sep 17 00:00:00 2001
+From: Dhaval Vasa <dhaval.vasa@einfochips.com>
+Date: Fri, 7 Aug 2009 17:26:49 +0530
+Subject: USB: ftdi_sio: add product_id for Marvell OpenRD Base, Client
+
+From: Dhaval Vasa <dhaval.vasa@einfochips.com>
+
+commit 50d0678e2026c18e4147f0b16b5853113659b82d upstream.
+
+reference:
+http://www.open-rd.org
+
+Signed-off-by: Dhaval Vasa <dhaval.vasa@einfochips.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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
--- /dev/null
+From c47aacc67a3d26dfab9c9b8965975ed2b2010b30 Mon Sep 17 00:00:00 2001
+From: Marko Hänninen <bugitus@gmail.com>
+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 <bugitus@gmail.com>
+
+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 <bugitus@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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
--- /dev/null
+From c15e3ca1d822abba78c00b1ffc3e7b382a50396e Mon Sep 17 00:00:00 2001
+From: Rogerio Brito <rbrito@ime.usp.br>
+Date: Thu, 6 Aug 2009 15:20:19 -0700
+Subject: USB: storage: include Prolific Technology USB drive in unusual_devs list
+
+From: Rogerio Brito <rbrito@ime.usp.br>
+
+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 <rbrito@ime.usp.br>
+Cc: Phil Dibowitz <phil@ipom.com>
+Cc: Alan Stern <stern@rowland.harvard.edu>
+Cc: Robert Hancock <hancockrwd@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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 <rbrito@ime.usp.br> */
++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 -=[]=- <micro_flyer@hotmail.com> */
+ /* Change to bcdDeviceMin (0x0100 to 0x0001) reported by
+ * Thomas Bartosik <tbartdev@gmx-topmail.de> */
--- /dev/null
+From 01105a246345f011fde64d24a601090b646e9e4c Mon Sep 17 00:00:00 2001
+From: Alan Stern <stern@rowland.harvard.edu>
+Date: Thu, 30 Jul 2009 15:28:14 -0400
+Subject: USB: usbfs: fix -ENOENT error code to be -ENODEV
+
+From: Alan Stern <stern@rowland.harvard.edu>
+
+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 <stern@rowland.harvard.edu>
+CC: Kay Sievers <kay.sievers@vrfy.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ 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)