]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fixes for 4.9
authorSasha Levin <sashal@kernel.org>
Fri, 6 Sep 2019 11:18:05 +0000 (07:18 -0400)
committerSasha Levin <sashal@kernel.org>
Fri, 6 Sep 2019 11:19:02 +0000 (07:19 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
18 files changed:
queue-4.9/bluetooth-btqca-add-a-short-delay-before-downloading.patch [new file with mode: 0644]
queue-4.9/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-__.patch [new file with mode: 0644]
queue-4.9/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-fi.patch [new file with mode: 0644]
queue-4.9/cx82310_eth-fix-a-memory-leak-bug.patch [new file with mode: 0644]
queue-4.9/cxgb4-fix-a-memory-leak-bug.patch [new file with mode: 0644]
queue-4.9/gpio-fix-build-error-of-function-redefinition.patch [new file with mode: 0644]
queue-4.9/ib-mlx4-fix-memory-leaks.patch [new file with mode: 0644]
queue-4.9/ibmveth-convert-multicast-list-size-for-little-endia.patch [new file with mode: 0644]
queue-4.9/kvm-arm-arm64-only-skip-mmio-insn-once.patch [new file with mode: 0644]
queue-4.9/libceph-allow-ceph_buffer_put-to-receive-a-null-ceph.patch [new file with mode: 0644]
queue-4.9/net-kalmia-fix-memory-leaks.patch [new file with mode: 0644]
queue-4.9/net-myri10ge-fix-memory-leaks.patch [new file with mode: 0644]
queue-4.9/net-tc35815-explicitly-check-net_ip_align-is-not-zer.patch [new file with mode: 0644]
queue-4.9/net-tundra-tsi108-use-spin_lock_irqsave-instead-of-s.patch [new file with mode: 0644]
queue-4.9/ravb-fix-use-after-free-ravb_tstamp_skb.patch [new file with mode: 0644]
queue-4.9/series [new file with mode: 0644]
queue-4.9/tools-hv-kvp-eliminate-may-be-used-uninitialized-war.patch [new file with mode: 0644]
queue-4.9/wimax-i2400m-fix-a-memory-leak-bug.patch [new file with mode: 0644]

diff --git a/queue-4.9/bluetooth-btqca-add-a-short-delay-before-downloading.patch b/queue-4.9/bluetooth-btqca-add-a-short-delay-before-downloading.patch
new file mode 100644 (file)
index 0000000..d48fc12
--- /dev/null
@@ -0,0 +1,42 @@
+From 86362a3fb05adf1523c1f07c1dd83eb1848f79a9 Mon Sep 17 00:00:00 2001
+From: Matthias Kaehlcke <mka@chromium.org>
+Date: Tue, 9 Jul 2019 15:44:50 -0700
+Subject: Bluetooth: btqca: Add a short delay before downloading the NVM
+
+[ Upstream commit 8059ba0bd0e4694e51c2ee6438a77b325f06c0d5 ]
+
+On WCN3990 downloading the NVM sometimes fails with a "TLV response
+size mismatch" error:
+
+[  174.949955] Bluetooth: btqca.c:qca_download_firmware() hci0: QCA Downloading qca/crnv21.bin
+[  174.958718] Bluetooth: btqca.c:qca_tlv_send_segment() hci0: QCA TLV response size mismatch
+
+It seems the controller needs a short time after downloading the
+firmware before it is ready for the NVM. A delay as short as 1 ms
+seems sufficient, make it 10 ms just in case. No event is received
+during the delay, hence we don't just silently drop an extra event.
+
+Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/bluetooth/btqca.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
+index 28afd5d585f95..b7dfa4afd5169 100644
+--- a/drivers/bluetooth/btqca.c
++++ b/drivers/bluetooth/btqca.c
+@@ -363,6 +363,9 @@ int qca_uart_setup_rome(struct hci_dev *hdev, uint8_t baudrate)
+               return err;
+       }
++      /* Give the controller some time to get ready to receive the NVM */
++      msleep(10);
++
+       /* Download NVM configuration */
+       config.type = TLV_TYPE_NVM;
+       snprintf(config.fwname, sizeof(config.fwname), "qca/nvm_%08x.bin",
+-- 
+2.20.1
+
diff --git a/queue-4.9/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-__.patch b/queue-4.9/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-__.patch
new file mode 100644 (file)
index 0000000..8e6f131
--- /dev/null
@@ -0,0 +1,91 @@
+From 8ecae9ccfb2d7c4740c137f70e1e761fb383f55b Mon Sep 17 00:00:00 2001
+From: Luis Henriques <lhenriques@suse.com>
+Date: Fri, 19 Jul 2019 15:32:20 +0100
+Subject: ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
+
+[ Upstream commit 86968ef21596515958d5f0a40233d02be78ecec0 ]
+
+Calling ceph_buffer_put() in __ceph_setxattr() may end up freeing the
+i_xattrs.prealloc_blob buffer while holding the i_ceph_lock.  This can be
+fixed by postponing the call until later, when the lock is released.
+
+The following backtrace was triggered by fstests generic/117.
+
+  BUG: sleeping function called from invalid context at mm/vmalloc.c:2283
+  in_atomic(): 1, irqs_disabled(): 0, pid: 650, name: fsstress
+  3 locks held by fsstress/650:
+   #0: 00000000870a0fe8 (sb_writers#8){.+.+}, at: mnt_want_write+0x20/0x50
+   #1: 00000000ba0c4c74 (&type->i_mutex_dir_key#6){++++}, at: vfs_setxattr+0x55/0xa0
+   #2: 000000008dfbb3f2 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: __ceph_setxattr+0x297/0x810
+  CPU: 1 PID: 650 Comm: fsstress Not tainted 5.2.0+ #437
+  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
+  Call Trace:
+   dump_stack+0x67/0x90
+   ___might_sleep.cold+0x9f/0xb1
+   vfree+0x4b/0x60
+   ceph_buffer_release+0x1b/0x60
+   __ceph_setxattr+0x2b4/0x810
+   __vfs_setxattr+0x66/0x80
+   __vfs_setxattr_noperm+0x59/0xf0
+   vfs_setxattr+0x81/0xa0
+   setxattr+0x115/0x230
+   ? filename_lookup+0xc9/0x140
+   ? rcu_read_lock_sched_held+0x74/0x80
+   ? rcu_sync_lockdep_assert+0x2e/0x60
+   ? __sb_start_write+0x142/0x1a0
+   ? mnt_want_write+0x20/0x50
+   path_setxattr+0xba/0xd0
+   __x64_sys_lsetxattr+0x24/0x30
+   do_syscall_64+0x50/0x1c0
+   entry_SYSCALL_64_after_hwframe+0x49/0xbe
+  RIP: 0033:0x7ff23514359a
+
+Signed-off-by: Luis Henriques <lhenriques@suse.com>
+Reviewed-by: Jeff Layton <jlayton@kernel.org>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/ceph/xattr.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
+index 81144a8c09275..18b999deed03b 100644
+--- a/fs/ceph/xattr.c
++++ b/fs/ceph/xattr.c
+@@ -951,6 +951,7 @@ int __ceph_setxattr(struct inode *inode, const char *name,
+       struct ceph_inode_info *ci = ceph_inode(inode);
+       struct ceph_mds_client *mdsc = ceph_sb_to_client(inode->i_sb)->mdsc;
+       struct ceph_cap_flush *prealloc_cf = NULL;
++      struct ceph_buffer *old_blob = NULL;
+       int issued;
+       int err;
+       int dirty = 0;
+@@ -1019,13 +1020,15 @@ retry:
+               struct ceph_buffer *blob;
+               spin_unlock(&ci->i_ceph_lock);
+-              dout(" preaallocating new blob size=%d\n", required_blob_size);
++              ceph_buffer_put(old_blob); /* Shouldn't be required */
++              dout(" pre-allocating new blob size=%d\n", required_blob_size);
+               blob = ceph_buffer_new(required_blob_size, GFP_NOFS);
+               if (!blob)
+                       goto do_sync_unlocked;
+               spin_lock(&ci->i_ceph_lock);
++              /* prealloc_blob can't be released while holding i_ceph_lock */
+               if (ci->i_xattrs.prealloc_blob)
+-                      ceph_buffer_put(ci->i_xattrs.prealloc_blob);
++                      old_blob = ci->i_xattrs.prealloc_blob;
+               ci->i_xattrs.prealloc_blob = blob;
+               goto retry;
+       }
+@@ -1041,6 +1044,7 @@ retry:
+       }
+       spin_unlock(&ci->i_ceph_lock);
++      ceph_buffer_put(old_blob);
+       if (lock_snap_rwsem)
+               up_read(&mdsc->snap_rwsem);
+       if (dirty)
+-- 
+2.20.1
+
diff --git a/queue-4.9/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-fi.patch b/queue-4.9/ceph-fix-buffer-free-while-holding-i_ceph_lock-in-fi.patch
new file mode 100644 (file)
index 0000000..5a4b2fc
--- /dev/null
@@ -0,0 +1,87 @@
+From 7f1ff41b5decb6e11692d20e1eaba6bb46530b9e Mon Sep 17 00:00:00 2001
+From: Luis Henriques <lhenriques@suse.com>
+Date: Fri, 19 Jul 2019 15:32:22 +0100
+Subject: ceph: fix buffer free while holding i_ceph_lock in fill_inode()
+
+[ Upstream commit af8a85a41734f37b67ba8ce69d56b685bee4ac48 ]
+
+Calling ceph_buffer_put() in fill_inode() may result in freeing the
+i_xattrs.blob buffer while holding the i_ceph_lock.  This can be fixed by
+postponing the call until later, when the lock is released.
+
+The following backtrace was triggered by fstests generic/070.
+
+  BUG: sleeping function called from invalid context at mm/vmalloc.c:2283
+  in_atomic(): 1, irqs_disabled(): 0, pid: 3852, name: kworker/0:4
+  6 locks held by kworker/0:4/3852:
+   #0: 000000004270f6bb ((wq_completion)ceph-msgr){+.+.}, at: process_one_work+0x1b8/0x5f0
+   #1: 00000000eb420803 ((work_completion)(&(&con->work)->work)){+.+.}, at: process_one_work+0x1b8/0x5f0
+   #2: 00000000be1c53a4 (&s->s_mutex){+.+.}, at: dispatch+0x288/0x1476
+   #3: 00000000559cb958 (&mdsc->snap_rwsem){++++}, at: dispatch+0x2eb/0x1476
+   #4: 000000000d5ebbae (&req->r_fill_mutex){+.+.}, at: dispatch+0x2fc/0x1476
+   #5: 00000000a83d0514 (&(&ci->i_ceph_lock)->rlock){+.+.}, at: fill_inode.isra.0+0xf8/0xf70
+  CPU: 0 PID: 3852 Comm: kworker/0:4 Not tainted 5.2.0+ #441
+  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58-prebuilt.qemu.org 04/01/2014
+  Workqueue: ceph-msgr ceph_con_workfn
+  Call Trace:
+   dump_stack+0x67/0x90
+   ___might_sleep.cold+0x9f/0xb1
+   vfree+0x4b/0x60
+   ceph_buffer_release+0x1b/0x60
+   fill_inode.isra.0+0xa9b/0xf70
+   ceph_fill_trace+0x13b/0xc70
+   ? dispatch+0x2eb/0x1476
+   dispatch+0x320/0x1476
+   ? __mutex_unlock_slowpath+0x4d/0x2a0
+   ceph_con_workfn+0xc97/0x2ec0
+   ? process_one_work+0x1b8/0x5f0
+   process_one_work+0x244/0x5f0
+   worker_thread+0x4d/0x3e0
+   kthread+0x105/0x140
+   ? process_one_work+0x5f0/0x5f0
+   ? kthread_park+0x90/0x90
+   ret_from_fork+0x3a/0x50
+
+Signed-off-by: Luis Henriques <lhenriques@suse.com>
+Reviewed-by: Jeff Layton <jlayton@kernel.org>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ fs/ceph/inode.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
+index 7a4052501866d..339fdf6355df7 100644
+--- a/fs/ceph/inode.c
++++ b/fs/ceph/inode.c
+@@ -741,6 +741,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
+       int issued = 0, implemented, new_issued;
+       struct timespec mtime, atime, ctime;
+       struct ceph_buffer *xattr_blob = NULL;
++      struct ceph_buffer *old_blob = NULL;
+       struct ceph_string *pool_ns = NULL;
+       struct ceph_cap *new_cap = NULL;
+       int err = 0;
+@@ -858,7 +859,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
+       if ((ci->i_xattrs.version == 0 || !(issued & CEPH_CAP_XATTR_EXCL))  &&
+           le64_to_cpu(info->xattr_version) > ci->i_xattrs.version) {
+               if (ci->i_xattrs.blob)
+-                      ceph_buffer_put(ci->i_xattrs.blob);
++                      old_blob = ci->i_xattrs.blob;
+               ci->i_xattrs.blob = xattr_blob;
+               if (xattr_blob)
+                       memcpy(ci->i_xattrs.blob->vec.iov_base,
+@@ -1004,8 +1005,8 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
+ out:
+       if (new_cap)
+               ceph_put_cap(mdsc, new_cap);
+-      if (xattr_blob)
+-              ceph_buffer_put(xattr_blob);
++      ceph_buffer_put(old_blob);
++      ceph_buffer_put(xattr_blob);
+       ceph_put_string(pool_ns);
+       return err;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/cx82310_eth-fix-a-memory-leak-bug.patch b/queue-4.9/cx82310_eth-fix-a-memory-leak-bug.patch
new file mode 100644 (file)
index 0000000..1997cf1
--- /dev/null
@@ -0,0 +1,38 @@
+From e59abe778f5f6eb18ce39d3020bf727d62fb89c3 Mon Sep 17 00:00:00 2001
+From: Wenwen Wang <wenwen@cs.uga.edu>
+Date: Wed, 14 Aug 2019 13:03:38 -0500
+Subject: cx82310_eth: fix a memory leak bug
+
+[ Upstream commit 1eca92eef18719027d394bf1a2d276f43e7cf886 ]
+
+In cx82310_bind(), 'dev->partial_data' is allocated through kmalloc().
+Then, the execution waits for the firmware to become ready. If the firmware
+is not ready in time, the execution is terminated. However, the allocated
+'dev->partial_data' is not deallocated on this path, leading to a memory
+leak bug. To fix this issue, free 'dev->partial_data' before returning the
+error.
+
+Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/usb/cx82310_eth.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c
+index 947bea81d9241..dfbdea22fbad9 100644
+--- a/drivers/net/usb/cx82310_eth.c
++++ b/drivers/net/usb/cx82310_eth.c
+@@ -175,7 +175,8 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf)
+       }
+       if (!timeout) {
+               dev_err(&udev->dev, "firmware not ready in time\n");
+-              return -ETIMEDOUT;
++              ret = -ETIMEDOUT;
++              goto err;
+       }
+       /* enable ethernet mode (?) */
+-- 
+2.20.1
+
diff --git a/queue-4.9/cxgb4-fix-a-memory-leak-bug.patch b/queue-4.9/cxgb4-fix-a-memory-leak-bug.patch
new file mode 100644 (file)
index 0000000..590ed18
--- /dev/null
@@ -0,0 +1,37 @@
+From 83f32e4c32cf137a577963128bb023a2defa01cf Mon Sep 17 00:00:00 2001
+From: Wenwen Wang <wenwen@cs.uga.edu>
+Date: Tue, 13 Aug 2019 04:18:52 -0500
+Subject: cxgb4: fix a memory leak bug
+
+[ Upstream commit c554336efa9bbc28d6ec14efbee3c7d63c61a34f ]
+
+In blocked_fl_write(), 't' is not deallocated if bitmap_parse_user() fails,
+leading to a memory leak bug. To fix this issue, free t before returning
+the error.
+
+Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
+index 20455d082cb80..61c55621b9589 100644
+--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
++++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_debugfs.c
+@@ -2781,8 +2781,10 @@ static ssize_t blocked_fl_write(struct file *filp, const char __user *ubuf,
+               return -ENOMEM;
+       err = bitmap_parse_user(ubuf, count, t, adap->sge.egr_sz);
+-      if (err)
++      if (err) {
++              kvfree(t);
+               return err;
++      }
+       bitmap_copy(adap->sge.blocked_fl, t, adap->sge.egr_sz);
+       t4_free_mem(t);
+-- 
+2.20.1
+
diff --git a/queue-4.9/gpio-fix-build-error-of-function-redefinition.patch b/queue-4.9/gpio-fix-build-error-of-function-redefinition.patch
new file mode 100644 (file)
index 0000000..07055c7
--- /dev/null
@@ -0,0 +1,66 @@
+From e4a0377a0d4a22497b6344ccd28bc9e6b6b1820a Mon Sep 17 00:00:00 2001
+From: YueHaibing <yuehaibing@huawei.com>
+Date: Wed, 31 Jul 2019 20:38:14 +0800
+Subject: gpio: Fix build error of function redefinition
+
+[ Upstream commit 68e03b85474a51ec1921b4d13204782594ef7223 ]
+
+when do randbuilding, I got this error:
+
+In file included from drivers/hwmon/pmbus/ucd9000.c:19:0:
+./include/linux/gpio/driver.h:576:1: error: redefinition of gpiochip_add_pin_range
+ gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
+ ^~~~~~~~~~~~~~~~~~~~~~
+In file included from drivers/hwmon/pmbus/ucd9000.c:18:0:
+./include/linux/gpio.h:245:1: note: previous definition of gpiochip_add_pin_range was here
+ gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
+ ^~~~~~~~~~~~~~~~~~~~~~
+
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Fixes: 964cb341882f ("gpio: move pincontrol calls to <linux/gpio/driver.h>")
+Signed-off-by: YueHaibing <yuehaibing@huawei.com>
+Link: https://lore.kernel.org/r/20190731123814.46624-1-yuehaibing@huawei.com
+Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/gpio.h | 24 ------------------------
+ 1 file changed, 24 deletions(-)
+
+diff --git a/include/linux/gpio.h b/include/linux/gpio.h
+index d12b5d566e4b1..11555bd821b73 100644
+--- a/include/linux/gpio.h
++++ b/include/linux/gpio.h
+@@ -229,30 +229,6 @@ static inline int irq_to_gpio(unsigned irq)
+       return -EINVAL;
+ }
+-static inline int
+-gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
+-                     unsigned int gpio_offset, unsigned int pin_offset,
+-                     unsigned int npins)
+-{
+-      WARN_ON(1);
+-      return -EINVAL;
+-}
+-
+-static inline int
+-gpiochip_add_pingroup_range(struct gpio_chip *chip,
+-                      struct pinctrl_dev *pctldev,
+-                      unsigned int gpio_offset, const char *pin_group)
+-{
+-      WARN_ON(1);
+-      return -EINVAL;
+-}
+-
+-static inline void
+-gpiochip_remove_pin_ranges(struct gpio_chip *chip)
+-{
+-      WARN_ON(1);
+-}
+-
+ static inline int devm_gpio_request(struct device *dev, unsigned gpio,
+                                   const char *label)
+ {
+-- 
+2.20.1
+
diff --git a/queue-4.9/ib-mlx4-fix-memory-leaks.patch b/queue-4.9/ib-mlx4-fix-memory-leaks.patch
new file mode 100644 (file)
index 0000000..4045abc
--- /dev/null
@@ -0,0 +1,46 @@
+From d260e5fc3031312fdb5cdbeb7894ec4cd2a67a6d Mon Sep 17 00:00:00 2001
+From: Wenwen Wang <wenwen@cs.uga.edu>
+Date: Sun, 18 Aug 2019 15:23:01 -0500
+Subject: IB/mlx4: Fix memory leaks
+
+[ Upstream commit 5c1baaa82cea2c815a5180ded402a7cd455d1810 ]
+
+In mlx4_ib_alloc_pv_bufs(), 'tun_qp->tx_ring' is allocated through
+kcalloc(). However, it is not always deallocated in the following execution
+if an error occurs, leading to memory leaks. To fix this issue, free
+'tun_qp->tx_ring' whenever an error occurs.
+
+Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
+Acked-by: Leon Romanovsky <leonro@mellanox.com>
+Link: https://lore.kernel.org/r/1566159781-4642-1-git-send-email-wenwen@cs.uga.edu
+Signed-off-by: Doug Ledford <dledford@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/infiniband/hw/mlx4/mad.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
+index d9323d7c479c3..f32ffd74ec476 100644
+--- a/drivers/infiniband/hw/mlx4/mad.c
++++ b/drivers/infiniband/hw/mlx4/mad.c
+@@ -1643,8 +1643,6 @@ tx_err:
+                                   tx_buf_size, DMA_TO_DEVICE);
+               kfree(tun_qp->tx_ring[i].buf.addr);
+       }
+-      kfree(tun_qp->tx_ring);
+-      tun_qp->tx_ring = NULL;
+       i = MLX4_NUM_TUNNEL_BUFS;
+ err:
+       while (i > 0) {
+@@ -1653,6 +1651,8 @@ err:
+                                   rx_buf_size, DMA_FROM_DEVICE);
+               kfree(tun_qp->ring[i].addr);
+       }
++      kfree(tun_qp->tx_ring);
++      tun_qp->tx_ring = NULL;
+       kfree(tun_qp->ring);
+       tun_qp->ring = NULL;
+       return -ENOMEM;
+-- 
+2.20.1
+
diff --git a/queue-4.9/ibmveth-convert-multicast-list-size-for-little-endia.patch b/queue-4.9/ibmveth-convert-multicast-list-size-for-little-endia.patch
new file mode 100644 (file)
index 0000000..906eccb
--- /dev/null
@@ -0,0 +1,59 @@
+From d4df467aaa75fb0022eee5f2cef7ca9ef1b83e53 Mon Sep 17 00:00:00 2001
+From: Thomas Falcon <tlfalcon@linux.ibm.com>
+Date: Mon, 12 Aug 2019 16:13:06 -0500
+Subject: ibmveth: Convert multicast list size for little-endian system
+
+[ Upstream commit 66cf4710b23ab2adda11155684a2c8826f4fe732 ]
+
+The ibm,mac-address-filters property defines the maximum number of
+addresses the hypervisor's multicast filter list can support. It is
+encoded as a big-endian integer in the OF device tree, but the virtual
+ethernet driver does not convert it for use by little-endian systems.
+As a result, the driver is not behaving as it should on affected systems
+when a large number of multicast addresses are assigned to the device.
+
+Reported-by: Hangbin Liu <liuhangbin@gmail.com>
+Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
+Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/ibm/ibmveth.c | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
+index 955f658f3b65f..de9897c8e9331 100644
+--- a/drivers/net/ethernet/ibm/ibmveth.c
++++ b/drivers/net/ethernet/ibm/ibmveth.c
+@@ -1557,7 +1557,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
+       struct net_device *netdev;
+       struct ibmveth_adapter *adapter;
+       unsigned char *mac_addr_p;
+-      unsigned int *mcastFilterSize_p;
++      __be32 *mcastFilterSize_p;
+       long ret;
+       unsigned long ret_attr;
+@@ -1579,8 +1579,9 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
+               return -EINVAL;
+       }
+-      mcastFilterSize_p = (unsigned int *)vio_get_attribute(dev,
+-                                              VETH_MCAST_FILTER_SIZE, NULL);
++      mcastFilterSize_p = (__be32 *)vio_get_attribute(dev,
++                                                      VETH_MCAST_FILTER_SIZE,
++                                                      NULL);
+       if (!mcastFilterSize_p) {
+               dev_err(&dev->dev, "Can't find VETH_MCAST_FILTER_SIZE "
+                       "attribute\n");
+@@ -1597,7 +1598,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
+       adapter->vdev = dev;
+       adapter->netdev = netdev;
+-      adapter->mcastFilterSize = *mcastFilterSize_p;
++      adapter->mcastFilterSize = be32_to_cpu(*mcastFilterSize_p);
+       adapter->pool_config = 0;
+       netif_napi_add(netdev, &adapter->napi, ibmveth_poll, 16);
+-- 
+2.20.1
+
diff --git a/queue-4.9/kvm-arm-arm64-only-skip-mmio-insn-once.patch b/queue-4.9/kvm-arm-arm64-only-skip-mmio-insn-once.patch
new file mode 100644 (file)
index 0000000..c5ec211
--- /dev/null
@@ -0,0 +1,56 @@
+From 6de69ca89936a084fcb076f9b3b01f05c7b50638 Mon Sep 17 00:00:00 2001
+From: Andrew Jones <drjones@redhat.com>
+Date: Thu, 22 Aug 2019 13:03:05 +0200
+Subject: KVM: arm/arm64: Only skip MMIO insn once
+
+[ Upstream commit 2113c5f62b7423e4a72b890bd479704aa85c81ba ]
+
+If after an MMIO exit to userspace a VCPU is immediately run with an
+immediate_exit request, such as when a signal is delivered or an MMIO
+emulation completion is needed, then the VCPU completes the MMIO
+emulation and immediately returns to userspace. As the exit_reason
+does not get changed from KVM_EXIT_MMIO in these cases we have to
+be careful not to complete the MMIO emulation again, when the VCPU is
+eventually run again, because the emulation does an instruction skip
+(and doing too many skips would be a waste of guest code :-) We need
+to use additional VCPU state to track if the emulation is complete.
+As luck would have it, we already have 'mmio_needed', which even
+appears to be used in this way by other architectures already.
+
+Fixes: 0d640732dbeb ("arm64: KVM: Skip MMIO insn after emulation")
+Acked-by: Mark Rutland <mark.rutland@arm.com>
+Signed-off-by: Andrew Jones <drjones@redhat.com>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm/kvm/mmio.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/arch/arm/kvm/mmio.c b/arch/arm/kvm/mmio.c
+index 08443a15e6be8..3caee91bca089 100644
+--- a/arch/arm/kvm/mmio.c
++++ b/arch/arm/kvm/mmio.c
+@@ -98,6 +98,12 @@ int kvm_handle_mmio_return(struct kvm_vcpu *vcpu, struct kvm_run *run)
+       unsigned int len;
+       int mask;
++      /* Detect an already handled MMIO return */
++      if (unlikely(!vcpu->mmio_needed))
++              return 0;
++
++      vcpu->mmio_needed = 0;
++
+       if (!run->mmio.is_write) {
+               len = run->mmio.len;
+               if (len > sizeof(unsigned long))
+@@ -200,6 +206,7 @@ int io_mem_abort(struct kvm_vcpu *vcpu, struct kvm_run *run,
+       run->mmio.is_write      = is_write;
+       run->mmio.phys_addr     = fault_ipa;
+       run->mmio.len           = len;
++      vcpu->mmio_needed       = 1;
+       if (!ret) {
+               /* We handled the access successfully in the kernel. */
+-- 
+2.20.1
+
diff --git a/queue-4.9/libceph-allow-ceph_buffer_put-to-receive-a-null-ceph.patch b/queue-4.9/libceph-allow-ceph_buffer_put-to-receive-a-null-ceph.patch
new file mode 100644 (file)
index 0000000..8586e29
--- /dev/null
@@ -0,0 +1,32 @@
+From bbf11f1e6c511eed84384bfcf14323750bda551a Mon Sep 17 00:00:00 2001
+From: Luis Henriques <lhenriques@suse.com>
+Date: Fri, 19 Jul 2019 15:32:19 +0100
+Subject: libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
+
+[ Upstream commit 5c498950f730aa17c5f8a2cdcb903524e4002ed2 ]
+
+Signed-off-by: Luis Henriques <lhenriques@suse.com>
+Reviewed-by: Jeff Layton <jlayton@kernel.org>
+Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ include/linux/ceph/buffer.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/include/linux/ceph/buffer.h b/include/linux/ceph/buffer.h
+index 07ca15e761001..dada47a4360ff 100644
+--- a/include/linux/ceph/buffer.h
++++ b/include/linux/ceph/buffer.h
+@@ -29,7 +29,8 @@ static inline struct ceph_buffer *ceph_buffer_get(struct ceph_buffer *b)
+ static inline void ceph_buffer_put(struct ceph_buffer *b)
+ {
+-      kref_put(&b->kref, ceph_buffer_release);
++      if (b)
++              kref_put(&b->kref, ceph_buffer_release);
+ }
+ extern int ceph_decode_buffer(struct ceph_buffer **b, void **p, void *end);
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-kalmia-fix-memory-leaks.patch b/queue-4.9/net-kalmia-fix-memory-leaks.patch
new file mode 100644 (file)
index 0000000..d6440f5
--- /dev/null
@@ -0,0 +1,46 @@
+From 0bcefe6f2556c24a4d7138295af91f9c249a4eef Mon Sep 17 00:00:00 2001
+From: Wenwen Wang <wenwen@cs.uga.edu>
+Date: Wed, 14 Aug 2019 13:56:43 -0500
+Subject: net: kalmia: fix memory leaks
+
+[ Upstream commit f1472cb09f11ddb41d4be84f0650835cb65a9073 ]
+
+In kalmia_init_and_get_ethernet_addr(), 'usb_buf' is allocated through
+kmalloc(). In the following execution, if the 'status' returned by
+kalmia_send_init_packet() is not 0, 'usb_buf' is not deallocated, leading
+to memory leaks. To fix this issue, add the 'out' label to free 'usb_buf'.
+
+Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/usb/kalmia.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/usb/kalmia.c b/drivers/net/usb/kalmia.c
+index 3e37724d30ae7..0c4f4190c58ee 100644
+--- a/drivers/net/usb/kalmia.c
++++ b/drivers/net/usb/kalmia.c
+@@ -117,16 +117,16 @@ kalmia_init_and_get_ethernet_addr(struct usbnet *dev, u8 *ethernet_addr)
+       status = kalmia_send_init_packet(dev, usb_buf, sizeof(init_msg_1)
+               / sizeof(init_msg_1[0]), usb_buf, 24);
+       if (status != 0)
+-              return status;
++              goto out;
+       memcpy(usb_buf, init_msg_2, 12);
+       status = kalmia_send_init_packet(dev, usb_buf, sizeof(init_msg_2)
+               / sizeof(init_msg_2[0]), usb_buf, 28);
+       if (status != 0)
+-              return status;
++              goto out;
+       memcpy(ethernet_addr, usb_buf + 10, ETH_ALEN);
+-
++out:
+       kfree(usb_buf);
+       return status;
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-myri10ge-fix-memory-leaks.patch b/queue-4.9/net-myri10ge-fix-memory-leaks.patch
new file mode 100644 (file)
index 0000000..e4e3a0e
--- /dev/null
@@ -0,0 +1,36 @@
+From 8f0caf30272d1791c64fd5f5d7fe74b92db2cb6d Mon Sep 17 00:00:00 2001
+From: Wenwen Wang <wenwen@cs.uga.edu>
+Date: Wed, 14 Aug 2019 01:38:39 -0500
+Subject: net: myri10ge: fix memory leaks
+
+[ Upstream commit 20fb7c7a39b5c719e2e619673b5f5729ee7d2306 ]
+
+In myri10ge_probe(), myri10ge_alloc_slices() is invoked to allocate slices
+related structures. Later on, myri10ge_request_irq() is used to get an irq.
+However, if this process fails, the allocated slices related structures are
+not deallocated, leading to memory leaks. To fix this issue, revise the
+target label of the goto statement to 'abort_with_slices'.
+
+Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/myricom/myri10ge/myri10ge.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+index 6d1a956e3f779..02ec326cb1293 100644
+--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
++++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+@@ -4113,7 +4113,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+        * setup (if available). */
+       status = myri10ge_request_irq(mgp);
+       if (status != 0)
+-              goto abort_with_firmware;
++              goto abort_with_slices;
+       myri10ge_free_irq(mgp);
+       /* Save configuration space to be restored if the
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-tc35815-explicitly-check-net_ip_align-is-not-zer.patch b/queue-4.9/net-tc35815-explicitly-check-net_ip_align-is-not-zer.patch
new file mode 100644 (file)
index 0000000..b2b572d
--- /dev/null
@@ -0,0 +1,54 @@
+From cc1aec461c10e8e3cfd403ad71a942b098571220 Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Sun, 11 Aug 2019 20:13:45 -0700
+Subject: net: tc35815: Explicitly check NET_IP_ALIGN is not zero in tc35815_rx
+
+[ Upstream commit 125b7e0949d4e72b15c2b1a1590f8cece985a918 ]
+
+clang warns:
+
+drivers/net/ethernet/toshiba/tc35815.c:1507:30: warning: use of logical
+'&&' with constant operand [-Wconstant-logical-operand]
+                        if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN)
+                                                  ^  ~~~~~~~~~~~~
+drivers/net/ethernet/toshiba/tc35815.c:1507:30: note: use '&' for a
+bitwise operation
+                        if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN)
+                                                  ^~
+                                                  &
+drivers/net/ethernet/toshiba/tc35815.c:1507:30: note: remove constant to
+silence this warning
+                        if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN)
+                                                 ~^~~~~~~~~~~~~~~
+1 warning generated.
+
+Explicitly check that NET_IP_ALIGN is not zero, which matches how this
+is checked in other parts of the tree. Because NET_IP_ALIGN is a build
+time constant, this check will be constant folded away during
+optimization.
+
+Fixes: 82a9928db560 ("tc35815: Enable StripCRC feature")
+Link: https://github.com/ClangBuiltLinux/linux/issues/608
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/toshiba/tc35815.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c
+index 5b01b3fa9fec9..47ebac456ae57 100644
+--- a/drivers/net/ethernet/toshiba/tc35815.c
++++ b/drivers/net/ethernet/toshiba/tc35815.c
+@@ -1498,7 +1498,7 @@ tc35815_rx(struct net_device *dev, int limit)
+                       pci_unmap_single(lp->pci_dev,
+                                        lp->rx_skbs[cur_bd].skb_dma,
+                                        RX_BUF_SIZE, PCI_DMA_FROMDEVICE);
+-                      if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN)
++                      if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN != 0)
+                               memmove(skb->data, skb->data - NET_IP_ALIGN,
+                                       pkt_len);
+                       data = skb_put(skb, pkt_len);
+-- 
+2.20.1
+
diff --git a/queue-4.9/net-tundra-tsi108-use-spin_lock_irqsave-instead-of-s.patch b/queue-4.9/net-tundra-tsi108-use-spin_lock_irqsave-instead-of-s.patch
new file mode 100644 (file)
index 0000000..6c38ba7
--- /dev/null
@@ -0,0 +1,49 @@
+From 7ae298c8de0e401388a616f5482a1116d232beb9 Mon Sep 17 00:00:00 2001
+From: Fuqian Huang <huangfq.daxian@gmail.com>
+Date: Fri, 9 Aug 2019 13:35:39 +0800
+Subject: net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq
+ in IRQ context
+
+[ Upstream commit 8c25d0887a8bd0e1ca2074ac0c6dff173787a83b ]
+
+As spin_unlock_irq will enable interrupts.
+Function tsi108_stat_carry is called from interrupt handler tsi108_irq.
+Interrupts are enabled in interrupt handler.
+Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq
+in IRQ context to avoid this.
+
+Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/tundra/tsi108_eth.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c
+index 8fd131207ee10..499abe9108fa6 100644
+--- a/drivers/net/ethernet/tundra/tsi108_eth.c
++++ b/drivers/net/ethernet/tundra/tsi108_eth.c
+@@ -381,9 +381,10 @@ tsi108_stat_carry_one(int carry, int carry_bit, int carry_shift,
+ static void tsi108_stat_carry(struct net_device *dev)
+ {
+       struct tsi108_prv_data *data = netdev_priv(dev);
++      unsigned long flags;
+       u32 carry1, carry2;
+-      spin_lock_irq(&data->misclock);
++      spin_lock_irqsave(&data->misclock, flags);
+       carry1 = TSI_READ(TSI108_STAT_CARRY1);
+       carry2 = TSI_READ(TSI108_STAT_CARRY2);
+@@ -451,7 +452,7 @@ static void tsi108_stat_carry(struct net_device *dev)
+                             TSI108_STAT_TXPAUSEDROP_CARRY,
+                             &data->tx_pause_drop);
+-      spin_unlock_irq(&data->misclock);
++      spin_unlock_irqrestore(&data->misclock, flags);
+ }
+ /* Read a stat counter atomically with respect to carries.
+-- 
+2.20.1
+
diff --git a/queue-4.9/ravb-fix-use-after-free-ravb_tstamp_skb.patch b/queue-4.9/ravb-fix-use-after-free-ravb_tstamp_skb.patch
new file mode 100644 (file)
index 0000000..b1b74ec
--- /dev/null
@@ -0,0 +1,69 @@
+From 8455539a12ada82eb4f13ed7261630a5aa177ba3 Mon Sep 17 00:00:00 2001
+From: Tho Vu <tho.vu.wh@rvc.renesas.com>
+Date: Fri, 16 Aug 2019 17:17:02 +0200
+Subject: ravb: Fix use-after-free ravb_tstamp_skb
+
+[ Upstream commit cfef46d692efd852a0da6803f920cc756eea2855 ]
+
+When a Tx timestamp is requested, a pointer to the skb is stored in the
+ravb_tstamp_skb struct. This was done without an skb_get. There exists
+the possibility that the skb could be freed by ravb_tx_free (when
+ravb_tx_free is called from ravb_start_xmit) before the timestamp was
+processed, leading to a use-after-free bug.
+
+Use skb_get when filling a ravb_tstamp_skb struct, and add appropriate
+frees/consumes when a ravb_tstamp_skb struct is freed.
+
+Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper")
+Signed-off-by: Tho Vu <tho.vu.wh@rvc.renesas.com>
+Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
+Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/renesas/ravb_main.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
+index 480883a7a3e5e..545cb6262cffd 100644
+--- a/drivers/net/ethernet/renesas/ravb_main.c
++++ b/drivers/net/ethernet/renesas/ravb_main.c
+@@ -1,6 +1,6 @@
+ /* Renesas Ethernet AVB device driver
+  *
+- * Copyright (C) 2014-2015 Renesas Electronics Corporation
++ * Copyright (C) 2014-2019 Renesas Electronics Corporation
+  * Copyright (C) 2015 Renesas Solutions Corp.
+  * Copyright (C) 2015-2016 Cogent Embedded, Inc. <source@cogentembedded.com>
+  *
+@@ -512,7 +512,10 @@ static void ravb_get_tx_tstamp(struct net_device *ndev)
+                       kfree(ts_skb);
+                       if (tag == tfa_tag) {
+                               skb_tstamp_tx(skb, &shhwtstamps);
++                              dev_consume_skb_any(skb);
+                               break;
++                      } else {
++                              dev_kfree_skb_any(skb);
+                       }
+               }
+               ravb_modify(ndev, TCCR, TCCR_TFR, TCCR_TFR);
+@@ -1537,7 +1540,7 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev)
+                                        DMA_TO_DEVICE);
+                       goto unmap;
+               }
+-              ts_skb->skb = skb;
++              ts_skb->skb = skb_get(skb);
+               ts_skb->tag = priv->ts_skb_tag++;
+               priv->ts_skb_tag &= 0x3ff;
+               list_add_tail(&ts_skb->list, &priv->ts_skb_list);
+@@ -1665,6 +1668,7 @@ static int ravb_close(struct net_device *ndev)
+       /* Clear the timestamp list */
+       list_for_each_entry_safe(ts_skb, ts_skb2, &priv->ts_skb_list, list) {
+               list_del(&ts_skb->list);
++              kfree_skb(ts_skb->skb);
+               kfree(ts_skb);
+       }
+-- 
+2.20.1
+
diff --git a/queue-4.9/series b/queue-4.9/series
new file mode 100644 (file)
index 0000000..ceb950d
--- /dev/null
@@ -0,0 +1,17 @@
+net-tundra-tsi108-use-spin_lock_irqsave-instead-of-s.patch
+net-tc35815-explicitly-check-net_ip_align-is-not-zer.patch
+bluetooth-btqca-add-a-short-delay-before-downloading.patch
+ibmveth-convert-multicast-list-size-for-little-endia.patch
+gpio-fix-build-error-of-function-redefinition.patch
+cxgb4-fix-a-memory-leak-bug.patch
+net-myri10ge-fix-memory-leaks.patch
+cx82310_eth-fix-a-memory-leak-bug.patch
+net-kalmia-fix-memory-leaks.patch
+wimax-i2400m-fix-a-memory-leak-bug.patch
+ravb-fix-use-after-free-ravb_tstamp_skb.patch
+tools-hv-kvp-eliminate-may-be-used-uninitialized-war.patch
+ib-mlx4-fix-memory-leaks.patch
+ceph-fix-buffer-free-while-holding-i_ceph_lock-in-__.patch
+ceph-fix-buffer-free-while-holding-i_ceph_lock-in-fi.patch
+kvm-arm-arm64-only-skip-mmio-insn-once.patch
+libceph-allow-ceph_buffer_put-to-receive-a-null-ceph.patch
diff --git a/queue-4.9/tools-hv-kvp-eliminate-may-be-used-uninitialized-war.patch b/queue-4.9/tools-hv-kvp-eliminate-may-be-used-uninitialized-war.patch
new file mode 100644 (file)
index 0000000..bf116a3
--- /dev/null
@@ -0,0 +1,43 @@
+From 8146f818f30ce4d56d0f07b5e173fe0fc5b5c1e1 Mon Sep 17 00:00:00 2001
+From: Vitaly Kuznetsov <vkuznets@redhat.com>
+Date: Mon, 19 Aug 2019 16:44:09 +0200
+Subject: Tools: hv: kvp: eliminate 'may be used uninitialized' warning
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[ Upstream commit 89eb4d8d25722a0a0194cf7fa47ba602e32a6da7 ]
+
+When building hv_kvp_daemon GCC-8.3 complains:
+
+hv_kvp_daemon.c: In function ‘kvp_get_ip_info.constprop’:
+hv_kvp_daemon.c:812:30: warning: ‘ip_buffer’ may be used uninitialized in this function [-Wmaybe-uninitialized]
+  struct hv_kvp_ipaddr_value *ip_buffer;
+
+this seems to be a false positive: we only use ip_buffer when
+op == KVP_OP_GET_IP_INFO and it is only unset when op == KVP_OP_ENUMERATE.
+
+Silence the warning by initializing ip_buffer to NULL.
+
+Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ tools/hv/hv_kvp_daemon.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
+index fffc7c4184599..834008639c4bb 100644
+--- a/tools/hv/hv_kvp_daemon.c
++++ b/tools/hv/hv_kvp_daemon.c
+@@ -878,7 +878,7 @@ kvp_get_ip_info(int family, char *if_name, int op,
+       int sn_offset = 0;
+       int error = 0;
+       char *buffer;
+-      struct hv_kvp_ipaddr_value *ip_buffer;
++      struct hv_kvp_ipaddr_value *ip_buffer = NULL;
+       char cidr_mask[5]; /* /xyz */
+       int weight;
+       int i;
+-- 
+2.20.1
+
diff --git a/queue-4.9/wimax-i2400m-fix-a-memory-leak-bug.patch b/queue-4.9/wimax-i2400m-fix-a-memory-leak-bug.patch
new file mode 100644 (file)
index 0000000..077f7c5
--- /dev/null
@@ -0,0 +1,44 @@
+From 83a989c0a4c1675d22afc9d03cc1dce354aab53c Mon Sep 17 00:00:00 2001
+From: Wenwen Wang <wenwen@cs.uga.edu>
+Date: Thu, 15 Aug 2019 15:29:51 -0500
+Subject: wimax/i2400m: fix a memory leak bug
+
+[ Upstream commit 44ef3a03252844a8753479b0cea7f29e4a804bdc ]
+
+In i2400m_barker_db_init(), 'options_orig' is allocated through kstrdup()
+to hold the original command line options. Then, the options are parsed.
+However, if an error occurs during the parsing process, 'options_orig' is
+not deallocated, leading to a memory leak bug. To fix this issue, free
+'options_orig' before returning the error.
+
+Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wimax/i2400m/fw.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c
+index c9c711dcd0e6b..0e6c665a4de82 100644
+--- a/drivers/net/wimax/i2400m/fw.c
++++ b/drivers/net/wimax/i2400m/fw.c
+@@ -351,13 +351,15 @@ int i2400m_barker_db_init(const char *_options)
+                       }
+                       result = i2400m_barker_db_add(barker);
+                       if (result < 0)
+-                              goto error_add;
++                              goto error_parse_add;
+               }
+               kfree(options_orig);
+       }
+       return 0;
++error_parse_add:
+ error_parse:
++      kfree(options_orig);
+ error_add:
+       kfree(i2400m_barker_db);
+       return result;
+-- 
+2.20.1
+