This is a note to let you know that I've just added the patch titled
USB: serial: iuu_phoenix: fix DMA from stack
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the
next -rc kernel release.
If you have any questions about this process, please let me know.
>From 54d0a3ab80f49f19ee916def62fe067596833403 Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan(a)kernel.org>
Date: Mon, 4 Jan 2021 15:50:07 +0100
Subject: USB: serial: iuu_phoenix: fix DMA from stack
Stack-allocated buffers cannot be used for DMA (on all architectures) so
allocate the flush command buffer using kmalloc().
Fixes: 60a8fc017103 ("USB: add iuu_phoenix driver")
Cc: stable <stable(a)vger.kernel.org> # 2.6.25
Reviewed-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Signed-off-by: Johan Hovold <johan(a)kernel.org>
---
drivers/usb/serial/iuu_phoenix.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index f1201d4de297..e8f06b41a503 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -532,23 +532,29 @@ static int iuu_uart_flush(struct usb_serial_port *port)
struct device *dev = &port->dev;
int i;
int status;
- u8 rxcmd = IUU_UART_RX;
+ u8 *rxcmd;
struct iuu_private *priv = usb_get_serial_port_data(port);
if (iuu_led(port, 0xF000, 0, 0, 0xFF) < 0)
return -EIO;
+ rxcmd = kmalloc(1, GFP_KERNEL);
+ if (!rxcmd)
+ return -ENOMEM;
+
+ rxcmd[0] = IUU_UART_RX;
+
for (i = 0; i < 2; i++) {
- status = bulk_immediate(port, &rxcmd, 1);
+ status = bulk_immediate(port, rxcmd, 1);
if (status != IUU_OPERATION_OK) {
dev_dbg(dev, "%s - uart_flush_write error\n", __func__);
- return status;
+ goto out_free;
}
status = read_immediate(port, &priv->len, 1);
if (status != IUU_OPERATION_OK) {
dev_dbg(dev, "%s - uart_flush_read error\n", __func__);
- return status;
+ goto out_free;
}
if (priv->len > 0) {
@@ -556,12 +562,16 @@ static int iuu_uart_flush(struct usb_serial_port *port)
status = read_immediate(port, priv->buf, priv->len);
if (status != IUU_OPERATION_OK) {
dev_dbg(dev, "%s - uart_flush_read error\n", __func__);
- return status;
+ goto out_free;
}
}
}
dev_dbg(dev, "%s - uart_flush_read OK!\n", __func__);
iuu_led(port, 0, 0xF000, 0, 0xFF);
+
+out_free:
+ kfree(rxcmd);
+
return status;
}
--
2.30.0
Hi Greg
Please consider adding
commit 71ac13457d9d1007effde65b54818106b2c2b525
Author: Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
Date: Fri Dec 18 11:10:54 2020 +0100
rtc: pcf2127: only use watchdog when explicitly available
to the 5.10 stable queue. You will need the preparatory refactoring patch
commit 5d78533a0c53af9659227c803df944ba27cd56e0
Author: Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
Date: Thu Sep 24 12:52:55 2020 +0200
rtc: pcf2127: move watchdog initialisation to a separate function
And if documentation is supposed to be kept up-to-date in the -stable
trees, you can pick
commit 320d159e2d63a97a40f24cd6dfda5a57eec65b91
Author: Rasmus Villemoes <rasmus.villemoes(a)prevas.dk>
Date: Fri Dec 18 11:10:53 2020 +0100
dt-bindings: rtc: add reset-source property
Thanks,
Rasmus
This is the start of the stable review cycle for the 4.19.165 release.
There are 29 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Thu, 07 Jan 2021 09:08:03 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.165-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.165-rc2
Hyeongseok Kim <hyeongseok(a)gmail.com>
dm verity: skip verity work if I/O error when system is shutting down
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Clear the full allocated memory at hw_params
Jessica Yu <jeyu(a)kernel.org>
module: delay kobject uevent until after module init call
Trond Myklebust <trond.myklebust(a)hammerspace.com>
NFSv4: Fix a pNFS layout related use-after-free race when freeing the inode
Qinglang Miao <miaoqinglang(a)huawei.com>
powerpc: sysdev: add missing iounmap() on error in mpic_msgr_probe()
Jan Kara <jack(a)suse.cz>
quota: Don't overflow quota file offsets
Miroslav Benes <mbenes(a)suse.cz>
module: set MODULE_STATE_GOING state when a module fails to load
Dinghao Liu <dinghao.liu(a)zju.edu.cn>
rtc: sun6i: Fix memleak in sun6i_rtc_clk_init
Boqun Feng <boqun.feng(a)gmail.com>
fcntl: Fix potential deadlock in send_sig{io, urg}()
Takashi Iwai <tiwai(a)suse.de>
ALSA: rawmidi: Access runtime->avail always in spinlock
Takashi Iwai <tiwai(a)suse.de>
ALSA: seq: Use bool for snd_seq_queue internal flags
Mauro Carvalho Chehab <mchehab+huawei(a)kernel.org>
media: gp8psk: initialize stats at power control logic
Anant Thazhemadam <anant.thazhemadam(a)gmail.com>
misc: vmw_vmci: fix kernel info-leak by initializing dbells in vmci_ctx_get_chkpt_doorbells()
Rustam Kovhaev <rkovhaev(a)gmail.com>
reiserfs: add check for an invalid ih_entry_count
Anant Thazhemadam <anant.thazhemadam(a)gmail.com>
Bluetooth: hci_h5: close serdev device and free hu in h5_close
Johan Hovold <johan(a)kernel.org>
of: fix linker-section match-table corruption
Damien Le Moal <damien.lemoal(a)wdc.com>
null_blk: Fix zone size initialization
Souptick Joarder <jrdr.linux(a)gmail.com>
xen/gntdev.c: Mark pages as dirty
Christophe Leroy <christophe.leroy(a)csgroup.eu>
powerpc/bitops: Fix possible undefined behaviour with fls() and fls64()
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits
Paolo Bonzini <pbonzini(a)redhat.com>
KVM: SVM: relax conditions for allowing MSR_IA32_SPEC_CTRL accesses
Petr Vorel <petr.vorel(a)gmail.com>
uapi: move constants from <linux/kernel.h> to <linux/const.h>
Jan Kara <jack(a)suse.cz>
ext4: don't remount read-only with errors=continue on reboot
Eric Auger <eric.auger(a)redhat.com>
vfio/pci: Move dummy_resources_list init in vfio_pci_probe()
Eric Biggers <ebiggers(a)google.com>
ubifs: prevent creating duplicate encrypted filenames
Eric Biggers <ebiggers(a)google.com>
f2fs: prevent creating duplicate encrypted filenames
Eric Biggers <ebiggers(a)google.com>
ext4: prevent creating duplicate encrypted filenames
Eric Biggers <ebiggers(a)google.com>
fscrypt: add fscrypt_is_nokey_name()
Kevin Vigor <kvigor(a)gmail.com>
md/raid10: initialize r10_bio->read_slot before use.
-------------
Diffstat:
Makefile | 4 +--
arch/powerpc/include/asm/bitops.h | 23 ++++++++++++++--
arch/powerpc/sysdev/mpic_msgr.c | 2 +-
arch/x86/kvm/cpuid.h | 14 ++++++++++
arch/x86/kvm/svm.c | 9 ++----
arch/x86/kvm/vmx.c | 6 ++--
drivers/block/null_blk_zoned.c | 20 +++++++++-----
drivers/bluetooth/hci_h5.c | 8 ++++--
drivers/md/dm-verity-target.c | 12 +++++++-
drivers/md/raid10.c | 3 +-
drivers/media/usb/dvb-usb/gp8psk.c | 2 +-
drivers/misc/vmw_vmci/vmci_context.c | 2 +-
drivers/rtc/rtc-sun6i.c | 8 ++++--
drivers/vfio/pci/vfio_pci.c | 3 +-
drivers/xen/gntdev.c | 17 ++++++++----
fs/crypto/hooks.c | 10 +++----
fs/ext4/namei.c | 3 ++
fs/ext4/super.c | 14 ++++------
fs/f2fs/f2fs.h | 2 ++
fs/fcntl.c | 10 ++++---
fs/nfs/nfs4super.c | 2 +-
fs/nfs/pnfs.c | 33 ++++++++++++++++++++--
fs/nfs/pnfs.h | 5 ++++
fs/quota/quota_tree.c | 8 +++---
fs/reiserfs/stree.c | 6 ++++
fs/ubifs/dir.c | 17 +++++++++---
include/linux/fscrypt_notsupp.h | 5 ++++
include/linux/fscrypt_supp.h | 29 +++++++++++++++++++
include/linux/of.h | 1 +
include/uapi/linux/const.h | 5 ++++
include/uapi/linux/ethtool.h | 2 +-
include/uapi/linux/kernel.h | 9 +-----
include/uapi/linux/lightnvm.h | 2 +-
include/uapi/linux/mroute6.h | 2 +-
include/uapi/linux/netfilter/x_tables.h | 2 +-
include/uapi/linux/netlink.h | 2 +-
include/uapi/linux/sysctl.h | 2 +-
kernel/module.c | 6 ++--
sound/core/pcm_native.c | 9 ++++--
sound/core/rawmidi.c | 49 +++++++++++++++++++++++----------
sound/core/seq/seq_queue.h | 8 +++---
41 files changed, 275 insertions(+), 101 deletions(-)