From: Gabor Juhos Date: Thu, 26 Sep 2013 18:01:49 +0000 (+0000) Subject: kernel/3.10: add '003-11-' prefix for patches backported from 3.11 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=396c3b023e3152c280c1ad7c4729c7cf6fd4577d;p=openwrt%2Fstaging%2Fthess.git kernel/3.10: add '003-11-' prefix for patches backported from 3.11 Signed-off-by: Gabor Juhos SVN-Revision: 38217 --- diff --git a/target/linux/generic/patches-3.10/001-MIPS-Declare-emulate_load_store_microMIPS-as-a-stati.patch b/target/linux/generic/patches-3.10/001-MIPS-Declare-emulate_load_store_microMIPS-as-a-stati.patch deleted file mode 100644 index f91dbb5268..0000000000 --- a/target/linux/generic/patches-3.10/001-MIPS-Declare-emulate_load_store_microMIPS-as-a-stati.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 2b76d9221a02fa69bbb8c1045616afb923fc6bad Mon Sep 17 00:00:00 2001 -From: David Daney -Date: Fri, 24 May 2013 20:54:08 +0000 -Subject: [PATCH] MIPS: Declare emulate_load_store_microMIPS as a static - function. - -commit 74338805ec6869594d583535f941cb478c94dd73 upstream. - -It is only used from within a single file, it should not be globally -visible. - -Signed-off-by: David Daney -Acked-by: Steven J. Hill -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/5325/ -Signed-off-by: Ralf Baechle ---- - arch/mips/kernel/unaligned.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - ---- a/arch/mips/kernel/unaligned.c -+++ b/arch/mips/kernel/unaligned.c -@@ -684,7 +684,8 @@ const int reg16to32[] = { 16, 17, 2, 3, - /* Recode table from 16-bit STORE register notation to 32-bit GPR. */ - const int reg16to32st[] = { 0, 17, 2, 3, 4, 5, 6, 7 }; - --void emulate_load_store_microMIPS(struct pt_regs *regs, void __user * addr) -+static void emulate_load_store_microMIPS(struct pt_regs *regs, -+ void __user *addr) - { - unsigned long value; - unsigned int res; diff --git a/target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch b/target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch deleted file mode 100644 index b1eddc6ee7..0000000000 --- a/target/linux/generic/patches-3.10/002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 15a051ad98309f71989f9bda4b020fff160f4022 Mon Sep 17 00:00:00 2001 -From: David Daney -Date: Fri, 24 May 2013 20:54:10 +0000 -Subject: [PATCH 2/2] MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS - -commit 3ddc14add5e6341cf8ef4058c34c67ba7fd15317 upstream. - -As Jonas Gorske said in his patch: - - Disable cpu_has_mmips for everything but SEAD3 and MALTA. Most of - these platforms are from before the micromips introduction, so they - are very unlikely to implement it. - - Reduces an -Os compiled, uncompressed kernel image by 8KiB for - BCM63XX. - -This patch taks a different approach than his, we gate the runtime -test for microMIPS by the config symbol SYS_SUPPORTS_MICROMIPS. - -Signed-off-by: David Daney -Cc: Jonas Gorski -Cc: Steven J. Hill -Acked-by: Steven J. Hill -Cc: linux-mips@linux-mips.org -Patchwork: https://patchwork.linux-mips.org/patch/5327/ -Signed-off-by: Ralf Baechle ---- - arch/mips/include/asm/cpu-features.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/arch/mips/include/asm/cpu-features.h -+++ b/arch/mips/include/asm/cpu-features.h -@@ -99,7 +99,11 @@ - #define cpu_has_rixi (cpu_data[0].options & MIPS_CPU_RIXI) - #endif - #ifndef cpu_has_mmips --#define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS) -+# ifdef CONFIG_SYS_SUPPORTS_MICROMIPS -+# define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS) -+# else -+# define cpu_has_mmips 0 -+# endif - #endif - #ifndef cpu_has_vtag_icache - #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) diff --git a/target/linux/generic/patches-3.10/003-11-001-MIPS-Declare-emulate_load_store_microMIPS-as-a-stati.patch b/target/linux/generic/patches-3.10/003-11-001-MIPS-Declare-emulate_load_store_microMIPS-as-a-stati.patch new file mode 100644 index 0000000000..f91dbb5268 --- /dev/null +++ b/target/linux/generic/patches-3.10/003-11-001-MIPS-Declare-emulate_load_store_microMIPS-as-a-stati.patch @@ -0,0 +1,32 @@ +From 2b76d9221a02fa69bbb8c1045616afb923fc6bad Mon Sep 17 00:00:00 2001 +From: David Daney +Date: Fri, 24 May 2013 20:54:08 +0000 +Subject: [PATCH] MIPS: Declare emulate_load_store_microMIPS as a static + function. + +commit 74338805ec6869594d583535f941cb478c94dd73 upstream. + +It is only used from within a single file, it should not be globally +visible. + +Signed-off-by: David Daney +Acked-by: Steven J. Hill +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/5325/ +Signed-off-by: Ralf Baechle +--- + arch/mips/kernel/unaligned.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/arch/mips/kernel/unaligned.c ++++ b/arch/mips/kernel/unaligned.c +@@ -684,7 +684,8 @@ const int reg16to32[] = { 16, 17, 2, 3, + /* Recode table from 16-bit STORE register notation to 32-bit GPR. */ + const int reg16to32st[] = { 0, 17, 2, 3, 4, 5, 6, 7 }; + +-void emulate_load_store_microMIPS(struct pt_regs *regs, void __user * addr) ++static void emulate_load_store_microMIPS(struct pt_regs *regs, ++ void __user *addr) + { + unsigned long value; + unsigned int res; diff --git a/target/linux/generic/patches-3.10/003-11-002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch b/target/linux/generic/patches-3.10/003-11-002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch new file mode 100644 index 0000000000..b1eddc6ee7 --- /dev/null +++ b/target/linux/generic/patches-3.10/003-11-002-MIPS-Only-set-cpu_has_mmips-if-SYS_SUPPORTS_MICROMIP.patch @@ -0,0 +1,45 @@ +From 15a051ad98309f71989f9bda4b020fff160f4022 Mon Sep 17 00:00:00 2001 +From: David Daney +Date: Fri, 24 May 2013 20:54:10 +0000 +Subject: [PATCH 2/2] MIPS: Only set cpu_has_mmips if SYS_SUPPORTS_MICROMIPS + +commit 3ddc14add5e6341cf8ef4058c34c67ba7fd15317 upstream. + +As Jonas Gorske said in his patch: + + Disable cpu_has_mmips for everything but SEAD3 and MALTA. Most of + these platforms are from before the micromips introduction, so they + are very unlikely to implement it. + + Reduces an -Os compiled, uncompressed kernel image by 8KiB for + BCM63XX. + +This patch taks a different approach than his, we gate the runtime +test for microMIPS by the config symbol SYS_SUPPORTS_MICROMIPS. + +Signed-off-by: David Daney +Cc: Jonas Gorski +Cc: Steven J. Hill +Acked-by: Steven J. Hill +Cc: linux-mips@linux-mips.org +Patchwork: https://patchwork.linux-mips.org/patch/5327/ +Signed-off-by: Ralf Baechle +--- + arch/mips/include/asm/cpu-features.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/arch/mips/include/asm/cpu-features.h ++++ b/arch/mips/include/asm/cpu-features.h +@@ -99,7 +99,11 @@ + #define cpu_has_rixi (cpu_data[0].options & MIPS_CPU_RIXI) + #endif + #ifndef cpu_has_mmips +-#define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS) ++# ifdef CONFIG_SYS_SUPPORTS_MICROMIPS ++# define cpu_has_mmips (cpu_data[0].options & MIPS_CPU_MICROMIPS) ++# else ++# define cpu_has_mmips 0 ++# endif + #endif + #ifndef cpu_has_vtag_icache + #define cpu_has_vtag_icache (cpu_data[0].icache.flags & MIPS_CACHE_VTAG) diff --git a/target/linux/generic/patches-3.10/003-11-003-of-pci-Add-of_pci_get_devfn-function.patch b/target/linux/generic/patches-3.10/003-11-003-of-pci-Add-of_pci_get_devfn-function.patch new file mode 100644 index 0000000000..d786d6b5c5 --- /dev/null +++ b/target/linux/generic/patches-3.10/003-11-003-of-pci-Add-of_pci_get_devfn-function.patch @@ -0,0 +1,78 @@ +From 45ab9702fb47d18dca116b3a0509efa19fbcb27a Mon Sep 17 00:00:00 2001 +From: Thierry Reding +Date: Thu, 16 May 2013 17:55:18 +0200 +Subject: [PATCH] of/pci: Add of_pci_get_devfn() function + +commit 45ab9702fb47d18dca116b3a0509efa19fbcb27a upstream. + +This function can be used to parse the device and function number from a +standard 5-cell PCI resource. PCI_SLOT() and PCI_FUNC() can be used on +the returned value obtain the device and function numbers respectively. + +Signed-off-by: Thierry Reding +Signed-off-by: Thomas Petazzoni +Signed-off-by: Jason Cooper +--- + drivers/of/of_pci.c | 34 +++++++++++++++++++++++++++++----- + include/linux/of_pci.h | 1 + + 2 files changed, 30 insertions(+), 5 deletions(-) + +--- a/drivers/of/of_pci.c ++++ b/drivers/of/of_pci.c +@@ -5,14 +5,15 @@ + #include + + static inline int __of_pci_pci_compare(struct device_node *node, +- unsigned int devfn) ++ unsigned int data) + { +- unsigned int size; +- const __be32 *reg = of_get_property(node, "reg", &size); ++ int devfn; + +- if (!reg || size < 5 * sizeof(__be32)) ++ devfn = of_pci_get_devfn(node); ++ if (devfn < 0) + return 0; +- return ((be32_to_cpup(®[0]) >> 8) & 0xff) == devfn; ++ ++ return devfn == data; + } + + struct device_node *of_pci_find_child_device(struct device_node *parent, +@@ -40,3 +41,26 @@ struct device_node *of_pci_find_child_de + return NULL; + } + EXPORT_SYMBOL_GPL(of_pci_find_child_device); ++ ++/** ++ * of_pci_get_devfn() - Get device and function numbers for a device node ++ * @np: device node ++ * ++ * Parses a standard 5-cell PCI resource and returns an 8-bit value that can ++ * be passed to the PCI_SLOT() and PCI_FUNC() macros to extract the device ++ * and function numbers respectively. On error a negative error code is ++ * returned. ++ */ ++int of_pci_get_devfn(struct device_node *np) ++{ ++ unsigned int size; ++ const __be32 *reg; ++ ++ reg = of_get_property(np, "reg", &size); ++ ++ if (!reg || size < 5 * sizeof(__be32)) ++ return -EINVAL; ++ ++ return (be32_to_cpup(reg) >> 8) & 0xff; ++} ++EXPORT_SYMBOL_GPL(of_pci_get_devfn); +--- a/include/linux/of_pci.h ++++ b/include/linux/of_pci.h +@@ -10,5 +10,6 @@ int of_irq_map_pci(const struct pci_dev + struct device_node; + struct device_node *of_pci_find_child_device(struct device_node *parent, + unsigned int devfn); ++int of_pci_get_devfn(struct device_node *np); + + #endif diff --git a/target/linux/generic/patches-3.10/003-11-004-hso-Earlier-catch-of-error-condition.patch b/target/linux/generic/patches-3.10/003-11-004-hso-Earlier-catch-of-error-condition.patch new file mode 100644 index 0000000000..04866edbcd --- /dev/null +++ b/target/linux/generic/patches-3.10/003-11-004-hso-Earlier-catch-of-error-condition.patch @@ -0,0 +1,42 @@ +From 35e57e1b49a351aa804dab6010cd46ae6112a541 Mon Sep 17 00:00:00 2001 +From: Daniel Gimpelevich +Date: Wed, 21 Aug 2013 01:43:07 -0700 +Subject: [PATCH] hso: Earlier catch of error condition + +commit 35e57e1b49a351aa804dab6010cd46ae6112a541 upstream. + +There is no need to get an interface specification if we know it's the +wrong one. + +Signed-off-by: Daniel Gimpelevich +Acked-by: Greg Kroah-Hartman +Signed-off-by: David S. Miller +--- + drivers/net/usb/hso.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/net/usb/hso.c ++++ b/drivers/net/usb/hso.c +@@ -2886,6 +2886,11 @@ static int hso_probe(struct usb_interfac + struct hso_shared_int *shared_int; + struct hso_device *tmp_dev = NULL; + ++ if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { ++ dev_err(&interface->dev, "Not our interface\n"); ++ return -ENODEV; ++ } ++ + if_num = interface->altsetting->desc.bInterfaceNumber; + + /* Get the interface/port specification from either driver_info or from +@@ -2895,10 +2900,6 @@ static int hso_probe(struct usb_interfac + else + port_spec = hso_get_config_data(interface); + +- if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { +- dev_err(&interface->dev, "Not our interface\n"); +- return -ENODEV; +- } + /* Check if we need to switch to alt interfaces prior to port + * configuration */ + if (interface->num_altsetting > 1) diff --git a/target/linux/generic/patches-3.10/003-11-008-hso-Fix-stack-corruption-on-some-architectures.patch b/target/linux/generic/patches-3.10/003-11-008-hso-Fix-stack-corruption-on-some-architectures.patch new file mode 100644 index 0000000000..e44f713d63 --- /dev/null +++ b/target/linux/generic/patches-3.10/003-11-008-hso-Fix-stack-corruption-on-some-architectures.patch @@ -0,0 +1,50 @@ +From e75dc677ff8d06ffa61bef6fee436227ae5440c6 Mon Sep 17 00:00:00 2001 +From: Daniel Gimpelevich +Date: Wed, 21 Aug 2013 01:43:19 -0700 +Subject: [PATCH] hso: Fix stack corruption on some architectures + +commit e75dc677ff8d06ffa61bef6fee436227ae5440c6 upstream. + +As Sergei Shtylyov explained in the #mipslinux IRC channel: +[Mon 2013-08-19 12:28:21 PM PDT] guys, are you sure it's not "DMA off stack" case? +[Mon 2013-08-19 12:28:35 PM PDT] it's a known stack corruptor on non-coherent arches +[Mon 2013-08-19 12:31:48 PM PDT] headless: for usb/ehci? +[Mon 2013-08-19 12:34:11 PM PDT] headless: explain +[Mon 2013-08-19 12:35:38 PM PDT] usb_control_msg() (or other such func) should not use buffer on stack. DMA from/to stack is prohibited +[Mon 2013-08-19 12:35:58 PM PDT] and EHCI uses DMA on control xfers (as well as all the others) + +Signed-off-by: Daniel Gimpelevich +Acked-by: Greg Kroah-Hartman +Signed-off-by: David S. Miller +--- + drivers/net/usb/hso.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/net/usb/hso.c ++++ b/drivers/net/usb/hso.c +@@ -2816,13 +2816,16 @@ exit: + static int hso_get_config_data(struct usb_interface *interface) + { + struct usb_device *usbdev = interface_to_usbdev(interface); +- u8 config_data[17]; ++ u8 *config_data = kmalloc(17, GFP_KERNEL); + u32 if_num = interface->altsetting->desc.bInterfaceNumber; + s32 result; + ++ if (!config_data) ++ return -ENOMEM; + if (usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), + 0x86, 0xC0, 0, 0, config_data, 17, + USB_CTRL_SET_TIMEOUT) != 0x11) { ++ kfree(config_data); + return -EIO; + } + +@@ -2873,6 +2876,7 @@ static int hso_get_config_data(struct us + if (config_data[16] & 0x1) + result |= HSO_INFO_CRC_BUG; + ++ kfree(config_data); + return result; + } + diff --git a/target/linux/generic/patches-3.10/003-of-pci-Add-of_pci_get_devfn-function.patch b/target/linux/generic/patches-3.10/003-of-pci-Add-of_pci_get_devfn-function.patch deleted file mode 100644 index d786d6b5c5..0000000000 --- a/target/linux/generic/patches-3.10/003-of-pci-Add-of_pci_get_devfn-function.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 45ab9702fb47d18dca116b3a0509efa19fbcb27a Mon Sep 17 00:00:00 2001 -From: Thierry Reding -Date: Thu, 16 May 2013 17:55:18 +0200 -Subject: [PATCH] of/pci: Add of_pci_get_devfn() function - -commit 45ab9702fb47d18dca116b3a0509efa19fbcb27a upstream. - -This function can be used to parse the device and function number from a -standard 5-cell PCI resource. PCI_SLOT() and PCI_FUNC() can be used on -the returned value obtain the device and function numbers respectively. - -Signed-off-by: Thierry Reding -Signed-off-by: Thomas Petazzoni -Signed-off-by: Jason Cooper ---- - drivers/of/of_pci.c | 34 +++++++++++++++++++++++++++++----- - include/linux/of_pci.h | 1 + - 2 files changed, 30 insertions(+), 5 deletions(-) - ---- a/drivers/of/of_pci.c -+++ b/drivers/of/of_pci.c -@@ -5,14 +5,15 @@ - #include - - static inline int __of_pci_pci_compare(struct device_node *node, -- unsigned int devfn) -+ unsigned int data) - { -- unsigned int size; -- const __be32 *reg = of_get_property(node, "reg", &size); -+ int devfn; - -- if (!reg || size < 5 * sizeof(__be32)) -+ devfn = of_pci_get_devfn(node); -+ if (devfn < 0) - return 0; -- return ((be32_to_cpup(®[0]) >> 8) & 0xff) == devfn; -+ -+ return devfn == data; - } - - struct device_node *of_pci_find_child_device(struct device_node *parent, -@@ -40,3 +41,26 @@ struct device_node *of_pci_find_child_de - return NULL; - } - EXPORT_SYMBOL_GPL(of_pci_find_child_device); -+ -+/** -+ * of_pci_get_devfn() - Get device and function numbers for a device node -+ * @np: device node -+ * -+ * Parses a standard 5-cell PCI resource and returns an 8-bit value that can -+ * be passed to the PCI_SLOT() and PCI_FUNC() macros to extract the device -+ * and function numbers respectively. On error a negative error code is -+ * returned. -+ */ -+int of_pci_get_devfn(struct device_node *np) -+{ -+ unsigned int size; -+ const __be32 *reg; -+ -+ reg = of_get_property(np, "reg", &size); -+ -+ if (!reg || size < 5 * sizeof(__be32)) -+ return -EINVAL; -+ -+ return (be32_to_cpup(reg) >> 8) & 0xff; -+} -+EXPORT_SYMBOL_GPL(of_pci_get_devfn); ---- a/include/linux/of_pci.h -+++ b/include/linux/of_pci.h -@@ -10,5 +10,6 @@ int of_irq_map_pci(const struct pci_dev - struct device_node; - struct device_node *of_pci_find_child_device(struct device_node *parent, - unsigned int devfn); -+int of_pci_get_devfn(struct device_node *np); - - #endif diff --git a/target/linux/generic/patches-3.10/007-hso-Earlier-catch-of-error-condition.patch b/target/linux/generic/patches-3.10/007-hso-Earlier-catch-of-error-condition.patch deleted file mode 100644 index 04866edbcd..0000000000 --- a/target/linux/generic/patches-3.10/007-hso-Earlier-catch-of-error-condition.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 35e57e1b49a351aa804dab6010cd46ae6112a541 Mon Sep 17 00:00:00 2001 -From: Daniel Gimpelevich -Date: Wed, 21 Aug 2013 01:43:07 -0700 -Subject: [PATCH] hso: Earlier catch of error condition - -commit 35e57e1b49a351aa804dab6010cd46ae6112a541 upstream. - -There is no need to get an interface specification if we know it's the -wrong one. - -Signed-off-by: Daniel Gimpelevich -Acked-by: Greg Kroah-Hartman -Signed-off-by: David S. Miller ---- - drivers/net/usb/hso.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - ---- a/drivers/net/usb/hso.c -+++ b/drivers/net/usb/hso.c -@@ -2886,6 +2886,11 @@ static int hso_probe(struct usb_interfac - struct hso_shared_int *shared_int; - struct hso_device *tmp_dev = NULL; - -+ if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { -+ dev_err(&interface->dev, "Not our interface\n"); -+ return -ENODEV; -+ } -+ - if_num = interface->altsetting->desc.bInterfaceNumber; - - /* Get the interface/port specification from either driver_info or from -@@ -2895,10 +2900,6 @@ static int hso_probe(struct usb_interfac - else - port_spec = hso_get_config_data(interface); - -- if (interface->cur_altsetting->desc.bInterfaceClass != 0xFF) { -- dev_err(&interface->dev, "Not our interface\n"); -- return -ENODEV; -- } - /* Check if we need to switch to alt interfaces prior to port - * configuration */ - if (interface->num_altsetting > 1) diff --git a/target/linux/generic/patches-3.10/008-hso-Fix-stack-corruption-on-some-architectures.patch b/target/linux/generic/patches-3.10/008-hso-Fix-stack-corruption-on-some-architectures.patch deleted file mode 100644 index e44f713d63..0000000000 --- a/target/linux/generic/patches-3.10/008-hso-Fix-stack-corruption-on-some-architectures.patch +++ /dev/null @@ -1,50 +0,0 @@ -From e75dc677ff8d06ffa61bef6fee436227ae5440c6 Mon Sep 17 00:00:00 2001 -From: Daniel Gimpelevich -Date: Wed, 21 Aug 2013 01:43:19 -0700 -Subject: [PATCH] hso: Fix stack corruption on some architectures - -commit e75dc677ff8d06ffa61bef6fee436227ae5440c6 upstream. - -As Sergei Shtylyov explained in the #mipslinux IRC channel: -[Mon 2013-08-19 12:28:21 PM PDT] guys, are you sure it's not "DMA off stack" case? -[Mon 2013-08-19 12:28:35 PM PDT] it's a known stack corruptor on non-coherent arches -[Mon 2013-08-19 12:31:48 PM PDT] headless: for usb/ehci? -[Mon 2013-08-19 12:34:11 PM PDT] headless: explain -[Mon 2013-08-19 12:35:38 PM PDT] usb_control_msg() (or other such func) should not use buffer on stack. DMA from/to stack is prohibited -[Mon 2013-08-19 12:35:58 PM PDT] and EHCI uses DMA on control xfers (as well as all the others) - -Signed-off-by: Daniel Gimpelevich -Acked-by: Greg Kroah-Hartman -Signed-off-by: David S. Miller ---- - drivers/net/usb/hso.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - ---- a/drivers/net/usb/hso.c -+++ b/drivers/net/usb/hso.c -@@ -2816,13 +2816,16 @@ exit: - static int hso_get_config_data(struct usb_interface *interface) - { - struct usb_device *usbdev = interface_to_usbdev(interface); -- u8 config_data[17]; -+ u8 *config_data = kmalloc(17, GFP_KERNEL); - u32 if_num = interface->altsetting->desc.bInterfaceNumber; - s32 result; - -+ if (!config_data) -+ return -ENOMEM; - if (usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), - 0x86, 0xC0, 0, 0, config_data, 17, - USB_CTRL_SET_TIMEOUT) != 0x11) { -+ kfree(config_data); - return -EIO; - } - -@@ -2873,6 +2876,7 @@ static int hso_get_config_data(struct us - if (config_data[16] & 0x1) - result |= HSO_INFO_CRC_BUG; - -+ kfree(config_data); - return result; - } -