aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-09 11:49:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-09 11:49:44 +0200
commitcf6fd4d72fe78061c68af7a241387ec2d26dc161 (patch)
tree54709a7495ad84e09fc6d49398c10447196e2566
parentc9d3986499ae91751f796f147d6439283938c364 (diff)
downloadpatches-cf6fd4d72fe78061c68af7a241387ec2d26dc161.tar.gz
drop some patches now upstream and refresh one
-rw-r--r--iwlwifi-properly-check-debugfs-dentry-before-using-it.patch42
-rw-r--r--p0722
-rw-r--r--series3
-rw-r--r--usb-line6.patch283
-rw-r--r--usb-usb.h-tweak-struct-urb-to-remove-wasted-space.patch35
5 files changed, 9 insertions, 376 deletions
diff --git a/iwlwifi-properly-check-debugfs-dentry-before-using-it.patch b/iwlwifi-properly-check-debugfs-dentry-before-using-it.patch
deleted file mode 100644
index 916ecadddda1a7..00000000000000
--- a/iwlwifi-properly-check-debugfs-dentry-before-using-it.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From foo@baz Sat Mar 30 10:26:34 CET 2019
-Date: Sat, 30 Mar 2019 10:26:34 +0100
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: [PATCH] iwlwifi: properly check debugfs dentry before using it
-
-debugfs can now report an error code if something went wrong instead of
-just NULL. So if the return value is to be used as a "real" dentry, it
-needs to be checked if it is an error before dereferencing it.
-
-This is now happening because of ff9fb72bc077 ("debugfs: return error
-values, not NULL"). If multiple iwlwifi devices are in the system, this
-can cause problems when the driver attempts to create the main debugfs
-directory again. Later on in the code we fail horribly by trying to
-dereference a pointer that is an error value.
-
-Reported-by: Laura Abbott <labbott@redhat.com>
-Cc: Johannes Berg <johannes.berg@intel.com>
-Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-Cc: Luca Coelho <luciano.coelho@intel.com>
-Cc: Intel Linux Wireless <linuxwifi@intel.com>
-Cc: Kalle Valo <kvalo@codeaurora.org>
-Cc: stable <stable@vger.kernel.org> # 5.0
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-
----
- drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
---- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
-+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
-@@ -774,8 +774,7 @@ void iwl_mvm_vif_dbgfs_register(struct i
- return;
-
- mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir);
--
-- if (!mvmvif->dbgfs_dir) {
-+ if (IS_ERR_OR_NULL(mvmvif->dbgfs_dir)) {
- IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n",
- dbgfs_dir);
- return;
diff --git a/p07 b/p07
index 882a35b8611cba..00153eab60f91e 100644
--- a/p07
+++ b/p07
@@ -17,16 +17,16 @@ Cc: Vishal Verma <vishal.l.verma@intel.com>
Cc: Pu Wen <puwen@hygon.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
- arch/x86/kernel/cpu/mce/core.c | 15 ++++-----------
+ arch/x86/kernel/cpu/mce/core.c | 12 +++---------
arch/x86/kernel/cpu/mce/inject.c | 34 +++++-----------------------------
arch/x86/kernel/cpu/mce/severity.c | 14 +++-----------
- 3 files changed, 12 insertions(+), 51 deletions(-)
+ 3 files changed, 11 insertions(+), 49 deletions(-)
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
-@@ -2428,22 +2428,15 @@ static int fake_panic_set(void *data, u6
- DEFINE_SIMPLE_ATTRIBUTE(fake_panic_fops, fake_panic_get,
- fake_panic_set, "%llu\n");
+@@ -2440,22 +2440,16 @@ static int fake_panic_set(void *data, u6
+ DEFINE_DEBUGFS_ATTRIBUTE(fake_panic_fops, fake_panic_get, fake_panic_set,
+ "%llu\n");
-static int __init mcheck_debugfs_init(void)
+static void __init mcheck_debugfs_init(void)
@@ -37,13 +37,12 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dmce = mce_get_debugfs_dir();
- if (!dmce)
- return -ENOMEM;
-- ffake_panic = debugfs_create_file("fake_panic", 0444, dmce, NULL,
-- &fake_panic_fops);
+ ffake_panic = debugfs_create_file_unsafe("fake_panic", 0444, dmce,
+ NULL, &fake_panic_fops);
- if (!ffake_panic)
- return -ENOMEM;
-
- return 0;
-+ debugfs_create_file("fake_panic", 0444, dmce, NULL, &fake_panic_fops);
}
#else
-static int __init mcheck_debugfs_init(void) { return -EINVAL; }
@@ -53,7 +52,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
DEFINE_STATIC_KEY_FALSE(mcsafe_key);
--- a/arch/x86/kernel/cpu/mce/inject.c
+++ b/arch/x86/kernel/cpu/mce/inject.c
-@@ -648,7 +648,6 @@ static const struct file_operations read
+@@ -652,7 +652,6 @@ static const struct file_operations read
static struct dfs_node {
char *name;
@@ -61,7 +60,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
const struct file_operations *fops;
umode_t perm;
} dfs_fls[] = {
-@@ -662,7 +661,7 @@ static struct dfs_node {
+@@ -666,35 +665,16 @@ static struct dfs_node {
{ .name = "README", .fops = &readme_fops, .perm = S_IRUSR | S_IRGRP | S_IROTH },
};
@@ -69,9 +68,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+static void __init debugfs_init(void)
{
unsigned int i;
- u64 cap;
-@@ -671,30 +670,11 @@ static int __init debugfs_init(void)
- n_banks = cap & MCG_BANKCNT_MASK;
dfs_inj = debugfs_create_dir("mce-inject", NULL);
- if (!dfs_inj)
diff --git a/series b/series
index 98d5db905513f5..575b3784f60fd6 100644
--- a/series
+++ b/series
@@ -1,9 +1,6 @@
#
l.patch
-iwlwifi-properly-check-debugfs-dentry-before-using-it.patch
-usb-line6.patch
-usb-usb.h-tweak-struct-urb-to-remove-wasted-space.patch
spdxcheck-print-out-files-without-any-spdx-lines.patch
p02
p04
diff --git a/usb-line6.patch b/usb-line6.patch
deleted file mode 100644
index 1056bf953bf254..00000000000000
--- a/usb-line6.patch
+++ /dev/null
@@ -1,283 +0,0 @@
-From e2c743d1f900135c3e560cd9ea1647e4a1ebce7a Mon Sep 17 00:00:00 2001
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Date: Wed, 23 Jan 2019 11:01:46 +0100
-Subject: [PATCH] sound: USB: line6: use dynamic buffers
-
-The line6 driver uses a lot of USB buffers off of the stack, which is
-not allowed on many systems. Fix this up by dynamically allocating the
-buffers with kmalloc() which allows for proper DMA-able memory.
-
-Tested-by: Christo Gouws <gouws.christo@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Cc: stable <stable@vger.kernel.org>
-
----
- sound/usb/line6/driver.c | 60 ++++++++++++++++++++++++++-------------------
- sound/usb/line6/podhd.c | 21 +++++++++------
- sound/usb/line6/toneport.c | 23 ++++++++++++-----
- 3 files changed, 64 insertions(+), 40 deletions(-)
-
---- a/sound/usb/line6/driver.c
-+++ b/sound/usb/line6/driver.c
-@@ -351,12 +351,16 @@ int line6_read_data(struct usb_line6 *li
- {
- struct usb_device *usbdev = line6->usbdev;
- int ret;
-- unsigned char len;
-+ unsigned char *len;
- unsigned count;
-
- if (address > 0xffff || datalen > 0xff)
- return -EINVAL;
-
-+ len = kmalloc(sizeof(*len), GFP_KERNEL);
-+ if (!len)
-+ return -ENOMEM;
-+
- /* query the serial number: */
- ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0), 0x67,
- USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-@@ -365,7 +369,7 @@ int line6_read_data(struct usb_line6 *li
-
- if (ret < 0) {
- dev_err(line6->ifcdev, "read request failed (error %d)\n", ret);
-- return ret;
-+ goto exit;
- }
-
- /* Wait for data length. We'll get 0xff until length arrives. */
-@@ -375,28 +379,29 @@ int line6_read_data(struct usb_line6 *li
- ret = usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), 0x67,
- USB_TYPE_VENDOR | USB_RECIP_DEVICE |
- USB_DIR_IN,
-- 0x0012, 0x0000, &len, 1,
-+ 0x0012, 0x0000, len, 1,
- LINE6_TIMEOUT * HZ);
- if (ret < 0) {
- dev_err(line6->ifcdev,
- "receive length failed (error %d)\n", ret);
-- return ret;
-+ goto exit;
- }
-
-- if (len != 0xff)
-+ if (*len != 0xff)
- break;
- }
-
-- if (len == 0xff) {
-+ ret = -EIO;
-+ if (*len == 0xff) {
- dev_err(line6->ifcdev, "read failed after %d retries\n",
- count);
-- return -EIO;
-- } else if (len != datalen) {
-+ goto exit;
-+ } else if (*len != datalen) {
- /* should be equal or something went wrong */
- dev_err(line6->ifcdev,
- "length mismatch (expected %d, got %d)\n",
-- (int)datalen, (int)len);
-- return -EIO;
-+ (int)datalen, (int)*len);
-+ goto exit;
- }
-
- /* receive the result: */
-@@ -405,12 +410,12 @@ int line6_read_data(struct usb_line6 *li
- 0x0013, 0x0000, data, datalen,
- LINE6_TIMEOUT * HZ);
-
-- if (ret < 0) {
-+ if (ret < 0)
- dev_err(line6->ifcdev, "read failed (error %d)\n", ret);
-- return ret;
-- }
-
-- return 0;
-+exit:
-+ kfree(len);
-+ return ret;
- }
- EXPORT_SYMBOL_GPL(line6_read_data);
-
-@@ -422,12 +427,16 @@ int line6_write_data(struct usb_line6 *l
- {
- struct usb_device *usbdev = line6->usbdev;
- int ret;
-- unsigned char status;
-+ unsigned char *status;
- int count;
-
- if (address > 0xffff || datalen > 0xffff)
- return -EINVAL;
-
-+ status = kmalloc(sizeof(*status), GFP_KERNEL);
-+ if (!status)
-+ return -ENOMEM;
-+
- ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0), 0x67,
- USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
- 0x0022, address, data, datalen,
-@@ -436,7 +445,7 @@ int line6_write_data(struct usb_line6 *l
- if (ret < 0) {
- dev_err(line6->ifcdev,
- "write request failed (error %d)\n", ret);
-- return ret;
-+ goto exit;
- }
-
- for (count = 0; count < LINE6_READ_WRITE_MAX_RETRIES; count++) {
-@@ -447,28 +456,29 @@ int line6_write_data(struct usb_line6 *l
- USB_TYPE_VENDOR | USB_RECIP_DEVICE |
- USB_DIR_IN,
- 0x0012, 0x0000,
-- &status, 1, LINE6_TIMEOUT * HZ);
-+ status, 1, LINE6_TIMEOUT * HZ);
-
- if (ret < 0) {
- dev_err(line6->ifcdev,
- "receiving status failed (error %d)\n", ret);
-- return ret;
-+ goto exit;
- }
-
-- if (status != 0xff)
-+ if (*status != 0xff)
- break;
- }
-
-- if (status == 0xff) {
-+ if (*status == 0xff) {
- dev_err(line6->ifcdev, "write failed after %d retries\n",
- count);
-- return -EIO;
-- } else if (status != 0) {
-+ ret = -EIO;
-+ } else if (*status != 0) {
- dev_err(line6->ifcdev, "write failed (error %d)\n", ret);
-- return -EIO;
-+ ret = -EIO;
- }
--
-- return 0;
-+exit:
-+ kfree(status);
-+ return ret;
- }
- EXPORT_SYMBOL_GPL(line6_write_data);
-
---- a/sound/usb/line6/podhd.c
-+++ b/sound/usb/line6/podhd.c
-@@ -225,28 +225,32 @@ static void podhd_startup_start_workqueu
- static int podhd_dev_start(struct usb_line6_podhd *pod)
- {
- int ret;
-- u8 init_bytes[8];
-+ u8 *init_bytes;
- int i;
- struct usb_device *usbdev = pod->line6.usbdev;
-
-+ init_bytes = kmalloc(8, GFP_KERNEL);
-+ if (!init_bytes)
-+ return -ENOMEM;
-+
- ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0),
- 0x67, USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
- 0x11, 0,
- NULL, 0, LINE6_TIMEOUT * HZ);
- if (ret < 0) {
- dev_err(pod->line6.ifcdev, "read request failed (error %d)\n", ret);
-- return ret;
-+ goto exit;
- }
-
- /* NOTE: looks like some kind of ping message */
- ret = usb_control_msg(usbdev, usb_rcvctrlpipe(usbdev, 0), 0x67,
- USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
- 0x11, 0x0,
-- &init_bytes, 3, LINE6_TIMEOUT * HZ);
-+ init_bytes, 3, LINE6_TIMEOUT * HZ);
- if (ret < 0) {
- dev_err(pod->line6.ifcdev,
- "receive length failed (error %d)\n", ret);
-- return ret;
-+ goto exit;
- }
-
- pod->firmware_version =
-@@ -255,7 +259,7 @@ static int podhd_dev_start(struct usb_li
- for (i = 0; i <= 16; i++) {
- ret = line6_read_data(&pod->line6, 0xf000 + 0x08 * i, init_bytes, 8);
- if (ret < 0)
-- return ret;
-+ goto exit;
- }
-
- ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0),
-@@ -263,10 +267,9 @@ static int podhd_dev_start(struct usb_li
- USB_TYPE_STANDARD | USB_RECIP_DEVICE | USB_DIR_OUT,
- 1, 0,
- NULL, 0, LINE6_TIMEOUT * HZ);
-- if (ret < 0)
-- return ret;
--
-- return 0;
-+exit:
-+ kfree(init_bytes);
-+ return ret;
- }
-
- static void podhd_startup_workqueue(struct work_struct *work)
---- a/sound/usb/line6/toneport.c
-+++ b/sound/usb/line6/toneport.c
-@@ -365,16 +365,21 @@ static bool toneport_has_source_select(s
- /*
- Setup Toneport device.
- */
--static void toneport_setup(struct usb_line6_toneport *toneport)
-+static int toneport_setup(struct usb_line6_toneport *toneport)
- {
-- u32 ticks;
-+ u32 *ticks;
- struct usb_line6 *line6 = &toneport->line6;
- struct usb_device *usbdev = line6->usbdev;
-
-+ ticks = kmalloc(sizeof(*ticks), GFP_KERNEL);
-+ if (!ticks)
-+ return -ENOMEM;
-+
- /* sync time on device with host: */
- /* note: 32-bit timestamps overflow in year 2106 */
-- ticks = (u32)ktime_get_real_seconds();
-- line6_write_data(line6, 0x80c6, &ticks, 4);
-+ *ticks = (u32)ktime_get_real_seconds();
-+ line6_write_data(line6, 0x80c6, ticks, 4);
-+ kfree(ticks);
-
- /* enable device: */
- toneport_send_cmd(usbdev, 0x0301, 0x0000);
-@@ -451,7 +456,9 @@ static int toneport_init(struct usb_line
- return err;
- }
-
-- toneport_setup(toneport);
-+ err = toneport_setup(toneport);
-+ if (err)
-+ return err;
-
- /* register audio system: */
- return snd_card_register(line6->card);
-@@ -463,7 +470,11 @@ static int toneport_init(struct usb_line
- */
- static int toneport_reset_resume(struct usb_interface *interface)
- {
-- toneport_setup(usb_get_intfdata(interface));
-+ int err;
-+
-+ err = toneport_setup(usb_get_intfdata(interface));
-+ if (err)
-+ return err;
- return line6_resume(interface);
- }
- #endif
diff --git a/usb-usb.h-tweak-struct-urb-to-remove-wasted-space.patch b/usb-usb.h-tweak-struct-urb-to-remove-wasted-space.patch
deleted file mode 100644
index 83641335d1f9b1..00000000000000
--- a/usb-usb.h-tweak-struct-urb-to-remove-wasted-space.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From cde8161f9ee466655588b66a106276044b2fc282 Mon Sep 17 00:00:00 2001
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Date: Fri, 1 Mar 2019 18:13:27 +0100
-Subject: [PATCH] USB: usb.h: tweak struct urb to remove wasted space
-
-By moving one field around in 'struct urb' we reduce the size of the
-structure by 8 bytes.
-
-Before the patch on x86_64 the overall size of the structure as reported
-by pahole was:
- /* size: 192, cachelines: 3, members: 30 */
- /* sum members: 184, holes: 2, sum holes: 8 */
-After the patch we now have:
- /* size: 184, cachelines: 3, members: 30 */
- /* last cacheline: 56 bytes */
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/linux/usb.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/include/linux/usb.h
-+++ b/include/linux/usb.h
-@@ -1545,10 +1545,10 @@ typedef void (*usb_complete_t)(struct ur
- struct urb {
- /* private: usb core and host controller only fields in the urb */
- struct kref kref; /* reference count of the URB */
-+ int unlinked; /* unlink error code */
- void *hcpriv; /* private data for host controller */
- atomic_t use_count; /* concurrent submissions counter */
- atomic_t reject; /* submissions will fail */
-- int unlinked; /* unlink error code */
-
- /* public: documented fields in the urb that can be used by drivers */
- struct list_head urb_list; /* list head for use by the urb's