4.9.280-rc1 review
Greg Kroah-Hartman
maintainercover 4.9.280-rc1 review
This is the start of the stable review cycle for the 4.9.280 release. There are 30 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 Sun, 15 Aug 2021 15:05:12 +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.9.280-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.9.280-rc1
Miklos Szeredi <[email protected]>
ovl: prevent private clone if bind mount is not allowed
YueHaibing <[email protected]>
net: xilinx_emaclite: Do not print real IOMEM pointer
Pali Rohár <[email protected]>
ppp: Fix generating ppp unit id when ifname is not specified
Longfang Liu <[email protected]>
USB:ehci:fix Kunpeng920 ehci hardware problem
Letu Ren <[email protected]>
net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset
Prarit Bhargava <[email protected]>
alpha: Send stop IPI to send to online CPUs
Shreyansh Chouhan <[email protected]>
reiserfs: check directory items on read from disk
Yu Kuai <[email protected]>
reiserfs: add check for root_inode in reiserfs_fill_super
Like Xu <[email protected]>
perf/x86/amd: Don't touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest
Zheyu Ma <[email protected]>
pcmcia: i82092: fix a null pointer dereference bug
Maciej W. Rozycki <[email protected]>
MIPS: Malta: Do not byte-swap accesses to the CBUS UART
Maciej W. Rozycki <[email protected]>
serial: 8250: Mask out floating 16/32-bit bus bits
Alex Xu (Hello71) <[email protected]>
pipe: increase minimum default pipe size to 2 pages
Johan Hovold <[email protected]>
media: rtl28xxu: fix zero-length control request
Hui Su <[email protected]>
scripts/tracing: fix the bug that can't parse raw_trace_func
Dmitry Osipenko <[email protected]>
usb: otg-fsm: Fix hrtimer list corruption
David Bauer <[email protected]>
USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2
Willy Tarreau <[email protected]>
USB: serial: ch341: fix character loss at high transfer rates
Daniele Palmas <[email protected]>
USB: serial: option: add Telit FD980 composition 0x1056
Qiang.zhang <[email protected]>
USB: usbtmc: Fix RCU stall warning
Tetsuo Handa <[email protected]>
Bluetooth: defer cleanup of resources in hci_unregister_dev()
Pavel Skripkin <[email protected]>
net: vxge: fix use-after-free in vxge_device_unregister
Pavel Skripkin <[email protected]>
net: fec: fix use-after-free in fec_drv_remove
Pavel Skripkin <[email protected]>
net: pegasus: fix uninit-value in get_interrupt_interval
Dan Carpenter <[email protected]>
bnx2x: fix an error code in bnx2x_nic_load()
H. Nikolaus Schaller <[email protected]>
mips: Fix non-POSIX regexp
Wang Hai <[email protected]>
net: natsemi: Fix missing pci_disable_device() in probe and remove
Hans Verkuil <[email protected]>
media: videobuf2-core: dequeue if start_streaming fails
Li Manyi <[email protected]>
scsi: sr: Return correct event when media event code is 3
Takashi Iwai <[email protected]>
ALSA: seq: Fix racy deletion of subscriber
-------------
Diffstat:
Makefile | 4 +- arch/alpha/kernel/smp.c | 2 +- arch/mips/Makefile | 2 +- arch/mips/mti-malta/malta-platform.c | 3 +- arch/x86/events/perf_event.h | 3 +- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 11 +++++- drivers/media/v4l2-core/videobuf2-core.c | 13 ++++++- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 +- drivers/net/ethernet/freescale/fec_main.c | 2 +- drivers/net/ethernet/natsemi/natsemi.c | 8 +--- drivers/net/ethernet/neterion/vxge/vxge-main.c | 6 +-- drivers/net/ethernet/qlogic/qla3xxx.c | 6 +-- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 5 +-- drivers/net/ppp/ppp_generic.c | 19 ++++++++-- drivers/net/usb/pegasus.c | 14 +++++-- drivers/pcmcia/i82092.c | 1 + drivers/scsi/sr.c | 2 +- drivers/tty/serial/8250/8250_port.c | 12 ++++-- drivers/usb/class/usbtmc.c | 8 +--- drivers/usb/common/usb-otg-fsm.c | 6 ++- drivers/usb/host/ehci-pci.c | 3 ++ drivers/usb/serial/ch341.c | 1 + drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 3 ++ drivers/usb/serial/option.c | 2 + fs/namespace.c | 42 +++++++++++++-------- fs/pipe.c | 19 +++++++++- fs/reiserfs/stree.c | 31 +++++++++++++--- fs/reiserfs/super.c | 8 ++++ include/linux/usb/otg-fsm.h | 1 + include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 16 ++++---- net/bluetooth/hci_sock.c | 49 +++++++++++++++++-------- net/bluetooth/hci_sysfs.c | 3 ++ scripts/tracing/draw_functrace.py | 6 +-- sound/core/seq/seq_ports.c | 39 ++++++++++++++------ 36 files changed, 250 insertions(+), 105 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/30 ALSA: seq: Fix racy deletion of subscriber
From: Takashi Iwai <[email protected]>
commit 97367c97226aab8b298ada954ce12659ee3ad2a4 upstream.
It turned out that the current implementation of the port subscription is racy. The subscription contains two linked lists, and we have to add to or delete from both lists. Since both connection and disconnection procedures perform the same order for those two lists (i.e. src list, then dest list), when a deletion happens during a connection procedure, the src list may be deleted before the dest list addition completes, and this may lead to a use-after-free or an Oops, even though the access to both lists are protected via mutex.
The simple workaround for this race is to change the access order for the disconnection, namely, dest list, then src list. This assures that the connection has been established when disconnecting, and also the concurrent deletion can be avoided.
--- sound/core/seq/seq_ports.c | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-)
sound/core/seq/seq_ports.c +27 -12
@@ -532,10 +532,11 @@ static int check_and_subscribe_port(strureturn err; } -static void delete_and_unsubscribe_port (struct snd_seq_client *client, -struct snd_seq_client_port *port, -struct snd_seq_subscribers *subs, -bool is_src,bool ack) +/* called with grp->list_mutex held */ +static void __delete_and_unsubscribe_port (struct snd_seq_client *client, +struct snd_seq_client_port *port, +struct snd_seq_subscribers *subs, +bool is_src,bool ack) {struct snd_seq_port_subs_info *grp;struct list_head *list;
@@ -543,7 +544,6 @@ static void delete_and_unsubscribe_port( grp = is_src ? &port->c_src : &port->c_dest; list = is_src ? &subs->src_list : &subs->dest_list; -down_write (&grp->list_mutex);write_lock_irq (&grp->list_lock); empty =list_empty (list);if (!empty)
@@ -553,6 +553,18 @@ static void delete_and_unsubscribe_port(if (!empty)unsubscribe_port (client, port, grp, &subs->info, ack); +} + +static void delete_and_unsubscribe_port (struct snd_seq_client *client, +struct snd_seq_client_port *port, +struct snd_seq_subscribers *subs, +bool is_src,bool ack) +{ +struct snd_seq_port_subs_info *grp; + + grp = is_src ? &port->c_src : &port->c_dest; +down_write (&grp->list_mutex); +__delete_and_unsubscribe_port (client, port, subs, is_src, ack);up_write (&grp->list_mutex); }
@@ -608,27 +620,30 @@ int snd_seq_port_disconnect(struct snd_sstruct snd_seq_client_port *dest_port, struct snd_seq_port_subscribe *info) { - struct snd_seq_port_subs_info *src = &src_port->c_src; + struct snd_seq_port_subs_info *dest = &dest_port->c_dest;struct snd_seq_subscribers *subs;int err = -ENOENT ; -down_write (&src->list_mutex); +/* always start from deleting the dest port for avoiding concurrent +* deletions +*/ +down_write (&dest->list_mutex);/* look for the connection */ -list_for_each_entry (subs, &src->list_head, src_list) { +list_for_each_entry (subs, &dest->list_head, dest_list) {if (match_subs_info (info, &subs->info)) { -atomic_dec (&subs->ref_count);/* mark as not ready */ +__delete_and_unsubscribe_port (dest_client, dest_port, + subs, false, + connector->number != dest_client->number); err =0 ;break ; } } -up_write (&src->list_mutex); +up_write (&dest->list_mutex);if (err <0 )return err;delete_and_unsubscribe_port (src_client, src_port, subs, true, connector->number != src_client->number); -delete_and_unsubscribe_port (dest_client, dest_port, subs, false, - connector->number != dest_client->number);kfree (subs);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 2/30 scsi: sr: Return correct event when media event code is 3
In reply to Greg Kroah-HartmanFrom: Li Manyi <[email protected]>
[ Upstream commit 5c04243a56a7977185b00400e59ca7e108004faf ]
Media event code 3 is defined in the MMC-6 spec as follows:
"MediaRemoval: The media has been removed from the specified slot, and
the Drive is unable to access the media without user intervention. This applies to media changers only."
This indicated that treating the condition as an EJECT_REQUEST was appropriate. However, doing so had the unfortunate side-effect of causing the drive tray to be physically ejected on resume. Instead treat the event as a MEDIA_CHANGE request.
--- drivers/scsi/sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sr.c +1 -1
@@ -217,7 +217,7 @@ static unsigned int sr_get_events(struct scsi_device *sdev)else if (med->media_event_code ==2 )return DISK_EVENT_MEDIA_CHANGE ;else if (med->media_event_code ==3 ) -return DISK_EVENT_EJECT_REQUEST ; +return DISK_EVENT_MEDIA_CHANGE ;return 0 ; }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 3/30 media: videobuf2-core: dequeue if start_streaming fails
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
[ Upstream commit c592b46907adbeb81243f7eb7a468c36692658b8 ]
If a vb2_queue sets q->min_buffers_needed then when the number of queued buffers reaches q->min_buffers_needed, vb2_core_qbuf() will call the start_streaming() callback. If start_streaming() returns an error, then that error was just returned by vb2_core_qbuf(), but the buffer was still queued. However, userspace expects that if VIDIOC_QBUF fails, the buffer is returned dequeued.
So if start_streaming() fails, then remove the buffer from the queue, thus avoiding this unwanted side-effect.
--- drivers/media/v4l2-core/videobuf2-core.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/media/v4l2-core/videobuf2-core.c +12 -1
@@ -1370,6 +1370,7 @@ static int vb2_start_streaming(struct vb2_queue *q)int vb2_core_qbuf (struct vb2_queue *q,unsigned int index,void *pb) {struct vb2_buffer *vb; +enum vb2_buffer_state orig_state;int ret;if (q->error) {
@@ -1399,6 +1400,7 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)* Add to the queued buffers list, a buffer will stay on it until * dequeued in dqbuf. */ + orig_state = vb->state;list_add_tail (&vb->queued_entry, &q->queued_list); q->queued_count++; q->waiting_for_buffers = false;
@@ -1429,8 +1431,17 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb)if (q->streaming && !q->start_streaming_called && q->queued_count >= q->min_buffers_needed) { ret =vb2_start_streaming (q); -if (ret) +if (ret) { +/* +* Since vb2_core_qbuf will return with an error, +* we should return it to state DEQUEUED since +* the error indicates that the buffer wasn't queued. +*/ +list_del (&vb->queued_entry); + q->queued_count--; + vb->state = orig_state;return ret; + } }dprintk (1 ,"qbuf of buffer %d succeeded\n" , vb->index);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 4/30 net: natsemi: Fix missing pci_disable_device() in probe and remove
In reply to Greg Kroah-HartmanFrom: Wang Hai <[email protected]>
[ Upstream commit 7fe74dfd41c428afb24e2e615470832fa997ff14 ]
Replace pci_enable_device() with pcim_enable_device(), pci_disable_device() and pci_release_regions() will be called in release automatically.
--- drivers/net/ethernet/natsemi/natsemi.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/net/ethernet/natsemi/natsemi.c +2 -6
@@ -817,7 +817,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)printk (version);#endif - i =pci_enable_device (pdev); + i =pcim_enable_device (pdev);if (i)return i;/* natsemi has a non-standard PM control register
@@ -850,7 +850,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) ioaddr =ioremap (iostart, iosize);if (!ioaddr) { i = -ENOMEM ; - goto err_ioremap; + goto err_pci_request_regions; }/* Work around the dropped serial bit. */
@@ -968,9 +968,6 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) err_register_netdev:iounmap (ioaddr); - err_ioremap: -pci_release_regions (pdev); - err_pci_request_regions:free_netdev (dev);return i;
@@ -3228,7 +3225,6 @@ static void natsemi_remove1(struct pci_dev *pdev)NATSEMI_REMOVE_FILE (pdev, dspcfg_workaround);unregister_netdev (dev); -pci_release_regions (pdev);iounmap (ioaddr);free_netdev (dev); }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 5/30 mips: Fix non-POSIX regexp
In reply to Greg Kroah-HartmanFrom: H. Nikolaus Schaller <[email protected]>
[ Upstream commit 28bbbb9875a35975904e46f9b06fa689d051b290 ]
When cross compiling a MIPS kernel on a BSD based HOSTCC leads to errors like
SYNC include/config/auto.conf.cmd - due to: .config
egrep: empty (sub)expression
UPD include/config/kernel.release
HOSTCC scripts/dtc/dtc.o - due to target missing
It turns out that egrep uses this egrep pattern:
(|MINOR_|PATCHLEVEL_)
This is not valid syntax or gives undefined results according to POSIX 9.5.3 ERE Grammar
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
It seems to be silently accepted by the Linux egrep implementation while a BSD host complains.
Such patterns can be replaced by a transformation like
"(|p1|p2)" -> "(p1|p2)?"
--- arch/mips/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/Makefile +1 -1
@@ -286,7 +286,7 @@ LDFLAGS += -m $(ld-emul) ifdef CONFIG_MIPS CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ - egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ + egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \ sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g') ifdef CONFIG_64BIT CHECKFLAGS += -m64
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 6/30 bnx2x: fix an error code in bnx2x_nic_load()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit fb653827c758725b149b5c924a5eb50ab4812750 ]
Set the error code if bnx2x_alloc_fw_stats_mem() fails. The current code returns success.
--- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +2 -1
@@ -2672,7 +2672,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode) }/* Allocated memory for FW statistics */ -if (bnx2x_alloc_fw_stats_mem (bp)) + rc =bnx2x_alloc_fw_stats_mem (bp); +if (rc)LOAD_ERROR_EXIT (bp, load_error0);/* request pf to initialize status blocks */
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 7/30 net: pegasus: fix uninit-value in get_interrupt_interval
In reply to Greg Kroah-HartmanFrom: Pavel Skripkin <[email protected]>
[ Upstream commit af35fc37354cda3c9c8cc4961b1d24bdc9d27903 ]
Syzbot reported uninit value pegasus_probe(). The problem was in missing error handling.
get_interrupt_interval() internally calls read_eprom_word() which can fail in some cases. For example: failed to receive usb control message. These cases should be handled to prevent uninit value bug, since read_eprom_word() will not initialize passed stack variable in case of internal failure.
Fail log:
BUG: KMSAN: uninit-value in get_interrupt_interval drivers/net/usb/pegasus.c:746 [inline] BUG: KMSAN: uninit-value in pegasus_probe+0x10e7/0x4080 drivers/net/usb/pegasus.c:1152 CPU: 1 PID: 825 Comm: kworker/1:1 Not tainted 5.12.0-rc6-syzkaller #0 ... Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x24c/0x2e0 lib/dump_stack.c:120 kmsan_report+0xfb/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x5c/0xa0 mm/kmsan/kmsan_instr.c:197 get_interrupt_interval drivers/net/usb/pegasus.c:746 [inline] pegasus_probe+0x10e7/0x4080 drivers/net/usb/pegasus.c:1152
....
Local variable ----data.i@pegasus_probe created at:
get_interrupt_interval drivers/net/usb/pegasus.c:1151 [inline] pegasus_probe+0xe57/0x4080 drivers/net/usb/pegasus.c:1152 get_interrupt_interval drivers/net/usb/pegasus.c:1151 [inline] pegasus_probe+0xe57/0x4080 drivers/net/usb/pegasus.c:1152
--- drivers/net/usb/pegasus.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-)
drivers/net/usb/pegasus.c +11 -3
@@ -755,12 +755,16 @@ static inline void disable_net_traffic(pegasus_t *pegasus)set_registers (pegasus, EthCtrl0,sizeof (tmp), &tmp); } -static inline void get_interrupt_interval (pegasus_t *pegasus) +static inline int get_interrupt_interval (pegasus_t *pegasus) {u16 data;u8 interval; +int ret; + + ret =read_eprom_word (pegasus,4 , &data); +if (ret <0 ) +return ret; -read_eprom_word (pegasus,4 , &data); interval = data >>8 ;if (pegasus->usb->speed !=USB_SPEED_HIGH ) {if (interval <0x80 ) {
@@ -775,6 +779,8 @@ static inline void get_interrupt_interval(pegasus_t *pegasus) } } pegasus->intr_interval = interval; + +return 0 ; }static void set_carrier (struct net_device *net)
@@ -1191,7 +1197,9 @@ static int pegasus_probe(struct usb_interface *intf, | NETIF_MSG_PROBE | NETIF_MSG_LINK); pegasus->features = usb_dev_id[dev_index].private; -get_interrupt_interval (pegasus); + res =get_interrupt_interval (pegasus); +if (res) + goto out2;if (reset_mac (pegasus)) {dev_err (&intf->dev,"can't reset MAC\n" ); res = -EIO ;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 8/30 net: fec: fix use-after-free in fec_drv_remove
In reply to Greg Kroah-HartmanFrom: Pavel Skripkin <[email protected]>
[ Upstream commit 44712965bf12ae1758cec4de53816ed4b914ca1a ]
Smatch says:
drivers/net/ethernet/freescale/fec_main.c:3994 fec_drv_remove() error: Using fep after free_{netdev,candev}(ndev);
drivers/net/ethernet/freescale/fec_main.c:3995 fec_drv_remove() error: Using fep after free_{netdev,candev}(ndev);Since fep pointer is netdev private data, accessing it after free_netdev() call can cause use-after-free bug. Fix it by moving free_netdev() call at the end of the function
--- drivers/net/ethernet/freescale/fec_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fec_main.c +1 -1
@@ -3546,13 +3546,13 @@ fec_drv_remove(struct platform_device *pdev)if (of_phy_is_fixed_link (np))of_phy_deregister_fixed_link (np);of_node_put (fep->phy_node); -free_netdev (ndev);clk_disable_unprepare (fep->clk_ahb);clk_disable_unprepare (fep->clk_ipg);pm_runtime_put_noidle (&pdev->dev);pm_runtime_disable (&pdev->dev); +free_netdev (ndev);return 0 ; }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 9/30 net: vxge: fix use-after-free in vxge_device_unregister
In reply to Greg Kroah-HartmanFrom: Pavel Skripkin <[email protected]>
[ Upstream commit 942e560a3d3862dd5dee1411dbdd7097d29b8416 ]
Smatch says:drivers/net/ethernet/neterion/vxge/vxge-main.c:3518 vxge_device_unregister() error: Using vdev after free_{netdev,candev}(dev); drivers/net/ethernet/neterion/vxge/vxge-main.c:3518 vxge_device_unregister() error: Using vdev after free_{netdev,candev}(dev); drivers/net/ethernet/neterion/vxge/vxge-main.c:3520 vxge_device_unregister() error: Using vdev after free_{netdev,candev}(dev); drivers/net/ethernet/neterion/vxge/vxge-main.c:3520 vxge_device_unregister() error: Using vdev after free_{netdev,candev}(dev);
Since vdev pointer is netdev private data accessing it after free_netdev() call can cause use-after-free bug. Fix it by moving free_netdev() call at the end of the function
--- drivers/net/ethernet/neterion/vxge/vxge-main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/neterion/vxge/vxge-main.c +3 -3
@@ -3539,13 +3539,13 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev)kfree (vdev->vpaths); -/* we are safe to free it now */ -free_netdev (dev); -vxge_debug_init (vdev->level_trace,"%s: ethernet device unregistered" , buf);vxge_debug_entryexit (vdev->level_trace,"%s: %s:%d Exiting..." , buf, __func__, __LINE__); + +/* we are safe to free it now */ +free_netdev (dev); }/*
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 10/30 Bluetooth: defer cleanup of resources in hci_unregister_dev()
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
[ Upstream commit e04480920d1eec9c061841399aa6f35b6f987d8b ]
syzbot is hitting might_sleep() warning at hci_sock_dev_event() due to calling lock_sock() with rw spinlock held [1].
It seems that history of this locking problem is a trial and error.
Commit b40df5743ee8 ("[PATCH] bluetooth: fix socket locking in hci_sock_dev_event()") in 2.6.21-rc4 changed bh_lock_sock() to lock_sock() as an attempt to fix lockdep warning.
Then, commit 4ce61d1c7a8e ("[BLUETOOTH]: Fix locking in hci_sock_dev_event().") in 2.6.22-rc2 changed lock_sock() to local_bh_disable() + bh_lock_sock_nested() as an attempt to fix the sleep in atomic context warning.
Then, commit 4b5dd696f81b ("Bluetooth: Remove local_bh_disable() from hci_sock.c") in 3.3-rc1 removed local_bh_disable().
Then, commit e305509e678b ("Bluetooth: use correct lock to prevent UAF of hdev object") in 5.13-rc5 again changed bh_lock_sock_nested() to lock_sock() as an attempt to fix CVE-2021-3573.
This difficulty comes from current implementation that hci_sock_dev_event(HCI_DEV_UNREG) is responsible for dropping all references from sockets because hci_unregister_dev() immediately reclaims resources as soon as returning from hci_sock_dev_event(HCI_DEV_UNREG).
But the history suggests that hci_sock_dev_event(HCI_DEV_UNREG) was not doing what it should do.
Therefore, instead of trying to detach sockets from device, let's accept not detaching sockets from device at hci_sock_dev_event(HCI_DEV_UNREG), by moving actual cleanup of resources from hci_unregister_dev() to hci_cleanup_dev() which is called by bt_host_release() when all references to this unregistered device (which is a kobject) are gone.
Since hci_sock_dev_event(HCI_DEV_UNREG) no longer resets hci_pi(sk)->hdev, we need to check whether this device was unregistered and return an error based on HCI_UNREGISTER flag. There might be subtle behavioral difference in "monitor the hdev" functionality; please report if you found something went wrong due to this patch.
--- include/net/bluetooth/hci_core.h | 1 + net/bluetooth/hci_core.c | 16 +++++------ net/bluetooth/hci_sock.c | 49 +++++++++++++++++++++----------- net/bluetooth/hci_sysfs.c | 3 ++ 4 files changed, 45 insertions(+), 24 deletions(-)
include/net/bluetooth/hci_core.h +1 -0
@@ -1028,6 +1028,7 @@ struct hci_dev *hci_alloc_dev(void);void hci_free_dev (struct hci_dev *hdev);int hci_register_dev (struct hci_dev *hdev);void hci_unregister_dev (struct hci_dev *hdev); +void hci_cleanup_dev (struct hci_dev *hdev);int hci_suspend_dev (struct hci_dev *hdev);int hci_resume_dev (struct hci_dev *hdev);int hci_reset_dev (struct hci_dev *hdev);
net/bluetooth/hci_core.c +8 -8
@@ -3146,14 +3146,10 @@ EXPORT_SYMBOL(hci_register_dev);/* Unregister HCI device */ void hci_unregister_dev (struct hci_dev *hdev) { -int id; -BT_DBG ("%p name %s bus %d" , hdev, hdev->name, hdev->bus);hci_dev_set_flag (hdev,HCI_UNREGISTER ); - id = hdev->id; -write_lock (&hci_dev_list_lock);list_del (&hdev->list);write_unlock (&hci_dev_list_lock);
@@ -3182,7 +3178,14 @@ void hci_unregister_dev(struct hci_dev *hdev) }device_del (&hdev->dev); +/* Actual cleanup is deferred until hci_cleanup_dev(). */ +hci_dev_put (hdev); +} +EXPORT_SYMBOL (hci_unregister_dev); +/* Cleanup HCI device */ +void hci_cleanup_dev (struct hci_dev *hdev) +{debugfs_remove_recursive (hdev->debugfs);kfree_const (hdev->hw_info);kfree_const (hdev->fw_info);
@@ -3204,11 +3207,8 @@ void hci_unregister_dev(struct hci_dev *hdev)hci_discovery_filter_clear (hdev);hci_dev_unlock (hdev); -hci_dev_put (hdev); - -ida_simple_remove (&hci_index_ida, id); +ida_simple_remove (&hci_index_ida, hdev->id); } -EXPORT_SYMBOL (hci_unregister_dev);/* Suspend HCI device */ int hci_suspend_dev (struct hci_dev *hdev)
net/bluetooth/hci_sock.c +33 -16
92 lines not on this page · raw message
net/bluetooth/hci_sysfs.c +3 -0
@@ -82,6 +82,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn)static void bt_host_release (struct device *dev) {struct hci_dev *hdev =to_hci_dev (dev); + +if (hci_dev_test_flag (hdev,HCI_UNREGISTER )) +hci_cleanup_dev (hdev);kfree (hdev);module_put (THIS_MODULE ); }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 11/30 USB: usbtmc: Fix RCU stall warning
In reply to Greg Kroah-HartmanFrom: Qiang.zhang <[email protected]>
commit 30fad76ce4e98263edfa8f885c81d5426c1bf169 upstream.
rcu: INFO: rcu_preempt self-detected stall on CPU
rcu: 1-...!: (2 ticks this GP) idle=d92/1/0x4000000000000000
softirq=25390/25392 fqs=3
(t=12164 jiffies g=31645 q=43226)
rcu: rcu_preempt kthread starved for 12162 jiffies! g31645 f0x0
RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=0rcu: Unless rcu_preempt kthread gets sufficient CPU time,
OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:R running task
...........
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: unknown status received: -71
usbtmc 3-1:0.0: usb_submit_urb failed: -19
The function usbtmc_interrupt() resubmits urbs when the error status of an urb is -EPROTO. In systems using the dummy_hcd usb controller this can result in endless interrupt loops when the usbtmc device is disconnected from the host system.
Since host controller drivers already try to recover from transmission errors, there is no need to resubmit the urb or try other solutions to repair the error situation.
In case of errors the INT pipe just stops to wait for further packets.
--- drivers/usb/class/usbtmc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/usb/class/usbtmc.c +1 -7
@@ -1342,16 +1342,10 @@ static void usbtmc_interrupt(struct urbcase -EOVERFLOW :dev_err (dev,"overflow with length %d, actual length is %d\n" , data->iin_wMaxPacketSize, urb->actual_length); -case -ECONNRESET : -case -ENOENT : -case -ESHUTDOWN : -case -EILSEQ : -case -ETIME : +default :/* urb terminated, clean up */ dev_dbg (dev,"urb terminated, status: %d\n" , status);return ; -default : -dev_err (dev,"unknown status received: %d\n" , status); } exit: rv =usb_submit_urb (urb,GFP_ATOMIC );
Greg Kroah-Hartman
maintainerPATCH 12/30 USB: serial: option: add Telit FD980 composition 0x1056
In reply to Greg Kroah-HartmanFrom: Daniele Palmas <[email protected]>
commit 5648c073c33d33a0a19d0cb1194a4eb88efe2b71 upstream.
Add the following Telit FD980 composition 0x1056:
Cfg #1: mass storage
Cfg #2: rndis, tty, adb, tty, tty, tty, tty
--- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/serial/option.c +2 -0
@@ -1185,6 +1185,8 @@ static const struct usb_device_id option .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980 (PCIe) */ .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ + .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
Greg Kroah-Hartman
maintainerPATCH 13/30 USB: serial: ch341: fix character loss at high transfer rates
In reply to Greg Kroah-HartmanFrom: Willy Tarreau <[email protected]>
commit 3c18e9baee0ef97510dcda78c82285f52626764b upstream.
The chip supports high transfer rates, but with the small default buffers (64 bytes read), some entire blocks are regularly lost. This typically happens at 1.5 Mbps (which is the default speed on Rockchip devices) when used as a console to access U-Boot where the output of the "help" command misses many lines and where "printenv" mangles the environment.
The FTDI driver doesn't suffer at all from this. One difference is that it uses 512 bytes rx buffers and 256 bytes tx buffers. Adopting these values completely resolved the issue, even the output of "dmesg" is reliable. I preferred to leave the Tx value unchanged as it is not involved in this issue, while a change could increase the risk of triggering the same issue with other devices having too small buffers.
I verified that it backports well (and works) at least to 5.4. It's of low importance enough to be dropped where it doesn't trivially apply anymore.
--- drivers/usb/serial/ch341.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/ch341.c +1 -0
@@ -585,6 +585,7 @@ static struct usb_serial_driver ch341_de .owner = THIS_MODULE, .name = "ch341-uart", }, + .bulk_in_size = 512, .id_table = id_table, .num_ports = 1, .open = ch341_open,
Greg Kroah-Hartman
maintainerPATCH 14/30 USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2
In reply to Greg Kroah-HartmanFrom: David Bauer <[email protected]>
commit 8da0e55c7988ef9f08a708c38e5c75ecd8862cf8 upstream.
The Auto-M3 OP-COM v2 is a OBD diagnostic device using a FTD232 for the USB connection.
--- drivers/usb/serial/ftdi_sio.c | 1 + drivers/usb/serial/ftdi_sio_ids.h | 3 +++ 2 files changed, 4 insertions(+)
drivers/usb/serial/ftdi_sio.c +1 -0
@@ -214,6 +214,7 @@ static const struct usb_device_id id_tab { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, { USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) }, { USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_AUTO_M3_OP_COM_V2_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) },
drivers/usb/serial/ftdi_sio_ids.h +3 -0
@@ -158,6 +158,9 @@/* Vardaan Enterprises Serial Interface VEUSB422R3 */ #define FTDI_VARDAAN_PID 0xF070 +/* Auto-M3 Ltd. - OP-COM USB V2 - OBD interface Adapter */ +#define FTDI_AUTO_M3_OP_COM_V2_PID 0x4f50 +/* * Xsens Technologies BV products (http://www.xsens.com). */
Greg Kroah-Hartman
maintainerPATCH 15/30 usb: otg-fsm: Fix hrtimer list corruption
In reply to Greg Kroah-HartmanFrom: Dmitry Osipenko <[email protected]>
commit bf88fef0b6f1488abeca594d377991171c00e52a upstream.
The HNP work can be re-scheduled while it's still in-fly. This results in re-initialization of the busy work, resetting the hrtimer's list node of the work and crashing kernel with null dereference within kernel/timer once work's timer is expired. It's very easy to trigger this problem by re-plugging USB cable quickly. Initialize HNP work only once to fix this trouble.
Unable to handle kernel NULL pointer dereference at virtual address 00000126) ... PC is at __run_timers.part.0+0x150/0x228 LR is at __next_timer_interrupt+0x51/0x9c ... (__run_timers.part.0) from [<c0187a2b>] (run_timer_softirq+0x2f/0x50) (run_timer_softirq) from [<c01013ad>] (__do_softirq+0xd5/0x2f0) (__do_softirq) from [<c012589b>] (irq_exit+0xab/0xb8) (irq_exit) from [<c0170341>] (handle_domain_irq+0x45/0x60) (handle_domain_irq) from [<c04c4a43>] (gic_handle_irq+0x6b/0x7c) (gic_handle_irq) from [<c0100b65>] (__irq_svc+0x65/0xac)
--- drivers/usb/common/usb-otg-fsm.c | 6 +++++- include/linux/usb/otg-fsm.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/usb/common/usb-otg-fsm.c +5 -1
@@ -199,7 +199,11 @@ static void otg_start_hnp_polling(structif (!fsm->host_req_flag)return ; -INIT_DELAYED_WORK (&fsm->hnp_polling_work, otg_hnp_polling_work); +if (!fsm->hnp_work_inited) { +INIT_DELAYED_WORK (&fsm->hnp_polling_work, otg_hnp_polling_work); + fsm->hnp_work_inited = true; + } +schedule_delayed_work (&fsm->hnp_polling_work,msecs_to_jiffies (T_HOST_REQ_POLL )); }
include/linux/usb/otg-fsm.h +1 -0
@@ -210,6 +210,7 @@ struct otg_fsm {struct mutex lock;u8 *host_req_flag;struct delayed_work hnp_polling_work; +bool hnp_work_inited;bool state_changed; };
Greg Kroah-Hartman
maintainerPATCH 16/30 scripts/tracing: fix the bug that cant parse raw_trace_func
In reply to Greg Kroah-HartmanFrom: Hui Su <[email protected]>
commit 1c0cec64a7cc545eb49f374a43e9f7190a14defa upstream.
Since commit 77271ce4b2c0 ("tracing: Add irq, preempt-count and need resched info to default trace output"), the default trace output format has been changed to:
<idle>-0 [009] d.h. 22420.068695: _raw_spin_lock_irqsave <-hrtimer_interrupt
<idle>-0 [000] ..s. 22420.068695: _nohz_idle_balance <-run_rebalance_domains
<idle>-0 [011] d.h. 22420.068695: account_process_tick <-update_process_timesorigin trace output format:(before v3.2.0)
# tracer: nop
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |
migration/0-6 [000] 50.025810: rcu_note_context_switch <-__schedule
migration/0-6 [000] 50.025812: trace_rcu_utilization <-rcu_note_context_switch
migration/0-6 [000] 50.025813: rcu_sched_qs <-rcu_note_context_switch
migration/0-6 [000] 50.025815: rcu_preempt_qs <-rcu_note_context_switch
migration/0-6 [000] 50.025817: trace_rcu_utilization <-rcu_note_context_switch
migration/0-6 [000] 50.025818: debug_lockdep_rcu_enabled <-__schedule
migration/0-6 [000] 50.025820: debug_lockdep_rcu_enabled <-__scheduleThe draw_functrace.py(introduced in v2.6.28) can't parse the new version format trace_func, So we need modify draw_functrace.py to adapt the new version trace output format.
--- scripts/tracing/draw_functrace.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
scripts/tracing/draw_functrace.py +3 -3
@@ -17,7 +17,7 @@ Usage: $ cat /sys/kernel/debug/tracing/trace_pipe > ~/raw_trace_func Wait some times but not too much, the script is a bit slow. Break the pipe (Ctrl + Z) - $ scripts/draw_functrace.py < raw_trace_func > draw_functrace + $ scripts/tracing/draw_functrace.py < ~/raw_trace_func > draw_functrace Then you have your drawn trace in draw_functrace """
@@ -103,10 +103,10 @@ def parseLine(line): line = line.strip() if line.startswith("#"): raise CommentLineException - m = re.match("[^]]+?\\] +([0-9.]+): (\\w+) <-(\\w+)", line) + m = re.match("[^]]+?\\] +([a-z.]+) +([0-9.]+): (\\w+) <-(\\w+)", line) if m is None: raise BrokenLineException - return (m.group(1), m.group(2), m.group(3)) + return (m.group(2), m.group(3), m.group(4)) def main():
Greg Kroah-Hartman
maintainerPATCH 17/30 media: rtl28xxu: fix zero-length control request
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
commit 76f22c93b209c811bd489950f17f8839adb31901 upstream.
The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation.
Control transfers without a data stage are treated as OUT requests by the USB stack and should be using usb_sndctrlpipe(). Failing to do so will now trigger a warning.
The driver uses a zero-length i2c-read request for type detection so update the control-request code to use usb_sndctrlpipe() in this case.
Note that actually trying to read the i2c register in question does not work as the register might not exist (e.g. depending on the demodulator) as reported by Eero Lehtinen <[email protected]>.
--- drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/media/usb/dvb-usb-v2/rtl28xxu.c +10 -1
@@ -50,7 +50,16 @@ static int rtl28xxu_ctrl_msg(struct dvb_ }else {/* read */ requesttype = (USB_TYPE_VENDOR |USB_DIR_IN ); - pipe =usb_rcvctrlpipe (d->udev,0 ); + +/* +* Zero-length transfers must use usb_sndctrlpipe() and +* rtl28xxu_identify_state() uses a zero-length i2c read +* command to determine the chip type. +*/ +if (req->size) + pipe =usb_rcvctrlpipe (d->udev,0 ); +else + pipe =usb_sndctrlpipe (d->udev,0 ); } ret = usb_control_msg(d->udev, pipe, 0, requesttype, req->value,
Greg Kroah-Hartman
maintainerPATCH 18/30 pipe: increase minimum default pipe size to 2 pages
In reply to Greg Kroah-HartmanFrom: Alex Xu (Hello71) <[email protected]>
commit 46c4c9d1beb7f5b4cec4dd90e7728720583ee348 upstream.
This program always prints 4096 and hangs before the patch, and always prints 8192 and exits successfully after:
int main()
{
int pipefd[2];
for (int i = 0; i < 1025; i++)
if (pipe(pipefd) == -1)
return 1;
size_t bufsz = fcntl(pipefd[1], F_GETPIPE_SZ);
printf("%zd\n", bufsz);
char *buf = calloc(bufsz, 1);
write(pipefd[1], buf, bufsz);
read(pipefd[0], buf, bufsz-1);
write(pipefd[1], buf, 1);
}Note that you may need to increase your RLIMIT_NOFILE before running the program.
--- fs/pipe.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
fs/pipe.c +17 -2
@@ -29,6 +29,21 @@#include "internal.h" /* +* New pipe buffers will be restricted to this size while the user is exceeding +* their pipe buffer quota. The general pipe use case needs at least two +* buffers: one for data yet to be read, and one for new data. If this is less +* than two, then a write to a non-empty pipe may block even if the pipe is not +* full. This can occur with GNU make jobserver or similar uses of pipes as +* semaphores: multiple processes may be waiting to write tokens back to the +* pipe before reading tokens: https://lore.kernel.org/lkml/1628086770.5rn8p04n6j.none@localhost/. +* +* Users can reduce their pipe buffers with F_SETPIPE_SZ below this at their +* own risk, namely: pipe writes to non-full pipes may block until the pipe is +* emptied. +*/ +#define PIPE_MIN_DEF_BUFFERS 2 + +/* * The max size that a non-root user is allowed to grow the pipe. Can * be set by root in /proc/sys/fs/pipe-max-size */
@@ -653,8 +668,8 @@ struct pipe_inode_info *alloc_pipe_info( user_bufs =account_pipe_buffers (user,0 , pipe_bufs);if (too_many_pipe_buffers_soft (user_bufs) &&is_unprivileged_user ()) { - user_bufs =account_pipe_buffers (user, pipe_bufs,1 ); - pipe_bufs =1 ; + user_bufs =account_pipe_buffers (user, pipe_bufs,PIPE_MIN_DEF_BUFFERS ); + pipe_bufs =PIPE_MIN_DEF_BUFFERS ; }if (too_many_pipe_buffers_hard (user_bufs) &&is_unprivileged_user ())
Greg Kroah-Hartman
maintainerPATCH 19/30 serial: 8250: Mask out floating 16/32-bit bus bits
In reply to Greg Kroah-HartmanFrom: Maciej W. Rozycki <[email protected]>
commit e5227c51090e165db4b48dcaa300605bfced7014 upstream.
Make sure only actual 8 bits of the IIR register are used in determining the port type in `autoconfig'.
The serial_in' port accessor returns the unsigned int' type, meaning that with UPIO_AU, UPIO_MEM16, UPIO_MEM32, and UPIO_MEM32BE access types more than 8 bits of data are returned, of which the high order bits will often come from bus lines that are left floating in the data phase. For example with the MIPS Malta board's CBUS UART, where the registers are aligned on 8-byte boundaries and which uses 32-bit accesses, data as follows is returned:
YAMON> dump -32 0xbf000900 0x40
BF000900: 1F000942 1F000942 1F000900 1F000900 ...B...B........
BF000910: 1F000901 1F000901 1F000900 1F000900 ................
BF000920: 1F000900 1F000900 1F000960 1F000960 ..............
BF000930: 1F000900 1F000900 1F0009FF 1F0009FF ................
YAMON>
Evidently high-order 24 bits return values previously driven in the address phase (the 3 highest order address bits used with the command above are masked out in the simple virtual address mapping used here and come out at zeros on the external bus), a common scenario with bus lines left floating, due to bus capacitance.
Consequently when the value of IIR, mapped at 0x1f000910, is retrieved in autoconfig', it comes out at 0x1f0009c1 and when it is right-shifted by 6 and then assigned to 8-bit scratch' variable, the value calculated is 0x27, not one of 0, 1, 2, 3 expected in port type determination.
Fix the issue then, by assigning the value returned from serial_in' to scratch' first, which masks out 24 high-order bits retrieved, and only then right-shift the resulting 8-bit data quantity, producing the value of 3 in this case, as expected. Fix the same issue in `serial_dl_read'.
The problem first appeared with Linux 2.6.9-rc3 which predates our repo history, but the origin could be identified with the old MIPS/Linux repo also at: <git://git.kernel.org/pub/scm/linux/kernel/git/ralf/linux.git>
as commit e0d2356c0777 ("Merge with Linux 2.6.9-rc3."), where code in `serial_in' was updated with this case:
+ case UPIO_MEM32:
+ return readl(up->port.membase + offset);
+
which made it produce results outside the unsigned 8-bit range for the first time, though obviously it is system dependent what actual values appear in the high order bits retrieved and it may well have been zeros in the relevant positions with the system the change originally was intended for. It is at that point that code in `autoconf' should have been updated accordingly, but clearly it was overlooked.
--- drivers/tty/serial/8250/8250_port.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
drivers/tty/serial/8250/8250_port.c +9 -3
@@ -277,7 +277,11 @@ static const struct serial8250_config ua/* Uart divisor latch read */ static int default_serial_dl_read (struct uart_8250_port *up) { -return serial_in (up,UART_DLL ) |serial_in (up,UART_DLM ) <<8 ; +/* Assign these in pieces to truncate any bits above 7. */ +unsigned char dll =serial_in (up,UART_DLL ); +unsigned char dlm =serial_in (up,UART_DLM ); + +return dll | dlm <<8 ; }/* Uart divisor latch write */
@@ -1262,9 +1266,11 @@ static void autoconfig(struct uart_8250_serial_out (up,UART_LCR ,0 );serial_out (up,UART_FCR ,UART_FCR_ENABLE_FIFO ); - scratch =serial_in (up,UART_IIR ) >>6 ; -switch (scratch) { +/* Assign this as it is to truncate any bits above 7. */ + scratch =serial_in (up,UART_IIR ); + +switch (scratch >>6 ) {case 0 :autoconfig_8250 (up);break ;
Greg Kroah-Hartman
maintainerPATCH 20/30 MIPS: Malta: Do not byte-swap accesses to the CBUS UART
In reply to Greg Kroah-HartmanFrom: Maciej W. Rozycki <[email protected]>
commit 9a936d6c3d3d6c33ecbadf72dccdb567b5cd3c72 upstream.
Correct big-endian accesses to the CBUS UART, a Malta on-board discrete TI16C550C part wired directly to the system controller's device bus, and do not use byte swapping with the 32-bit accesses to the device.
The CBUS is used for devices such as the boot flash memory needed early on in system bootstrap even before PCI has been initialised. Therefore it uses the system controller's device bus, which follows the endianness set with the CPU, which means no byte-swapping is ever required for data accesses to CBUS, unlike with PCI.
The CBUS UART uses the UPIO_MEM32 access method, that is the readl' and writel' MMIO accessors, which on the MIPS platform imply byte-swapping with PCI systems. Consequently the wrong byte lane is accessed with the big-endian configuration and the UART is not correctly accessed.
As it happens the UPIO_MEM32BE access method makes use of the ioread32' and iowrite32' MMIO accessors, which still use readl' and writel' respectively, however they byte-swap data passed, effectively cancelling swapping done with the accessors themselves and making it suitable for the CBUS UART.
Make the CBUS UART switch between UPIO_MEM32 and UPIO_MEM32BE then, based on the endianness selected. With this change in place the device is correctly recognised with big-endian Malta at boot, along with the Super I/O devices behind PCI:
Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
printk: console [ttyS0] disabled
serial8250.0: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
printk: console [ttyS0] enabled
printk: bootconsole [uart8250] disabled
serial8250.0: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A serial8250.0: ttyS2 at MMIO 0x1f000900 (irq = 20, base_baud = 230400) is a 16550A
--- arch/mips/mti-malta/malta-platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/mips/mti-malta/malta-platform.c +2 -1
@@ -48,7 +48,8 @@ static struct plat_serial8250_port uart8 .mapbase = 0x1f000900, /* The CBUS UART */ .irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2, .uartclk = 3686400, /* Twice the usual clk! */ - .iotype = UPIO_MEM32, + .iotype =IS_ENABLED (CONFIG_CPU_BIG_ENDIAN ) ? + UPIO_MEM32BE : UPIO_MEM32, .flags = CBUS_UART_FLAGS, .regshift = 3, },
Greg Kroah-Hartman
maintainerPATCH 21/30 pcmcia: i82092: fix a null pointer dereference bug
In reply to Greg Kroah-HartmanFrom: Zheyu Ma <[email protected]>
commit e39cdacf2f664b09029e7c1eb354c91a20c367af upstream.
During the driver loading process, the 'dev' field was not assigned, but the 'dev' field was referenced in the subsequent 'i82092aa_set_mem_map' function.
--- drivers/pcmcia/i82092.c | 1 + 1 file changed, 1 insertion(+)
drivers/pcmcia/i82092.c +1 -0
@@ -105,6 +105,7 @@ static int i82092aa_pci_probe(struct pcifor (i =0 ;i<socket_count;i++) { sockets[i].card_state =1 ;/* 1 = present but empty */ sockets[i].io_base =pci_resource_start (dev,0 ); + sockets[i].dev = dev; sockets[i].socket.features |=SS_CAP_PCCARD ; sockets[i].socket.map_size =0x1000 ; sockets[i].socket.irq_mask =0 ;
Greg Kroah-Hartman
maintainerPATCH 22/30 perf/x86/amd: Dont touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest
In reply to Greg Kroah-HartmanFrom: Like Xu <[email protected]>
commit df51fe7ea1c1c2c3bfdb81279712fdd2e4ea6c27 upstream.
If we use "perf record" in an AMD Milan guest, dmesg reports a #GP warning from an unchecked MSR access error on MSR_F15H_PERF_CTLx:
[] unchecked MSR access error: WRMSR to 0xc0010200 (tried to write 0x0000020000110076) at rIP: 0xffffffff8106ddb4 (native_write_msr+0x4/0x20) [] Call Trace:
[] amd_pmu_disable_event+0x22/0x90 [] x86_pmu_stop+0x4c/0xa0 [] x86_pmu_del+0x3a/0x140
The AMD64_EVENTSEL_HOSTONLY bit is defined and used on the host, while the guest perf driver should avoid such use.
--- arch/x86/events/perf_event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/events/perf_event.h +2 -1
@@ -771,9 +771,10 @@ void x86_pmu_stop(struct perf_event *evestatic inline void x86_pmu_disable_event (struct perf_event *event) { +u64 disable_mask =__this_cpu_read (cpu_hw_events.perf_ctr_virt_mask);struct hw_perf_event *hwc = &event->hw; -wrmsrl (hwc->config_base, hwc->config); +wrmsrl (hwc->config_base, hwc->config & ~disable_mask); }void x86_pmu_enable_event (struct perf_event *event);
Greg Kroah-Hartman
maintainerPATCH 23/30 reiserfs: add check for root_inode in reiserfs_fill_super
In reply to Greg Kroah-HartmanFrom: Yu Kuai <[email protected]>
[ Upstream commit 2acf15b94d5b8ea8392c4b6753a6ffac3135cd78 ]
Our syzcaller report a NULL pointer dereference:
BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 116e95067 P4D 116e95067 PUD 1080b5067 PMD 0 Oops: 0010 [#1] SMP KASAN CPU: 7 PID: 592 Comm: a.out Not tainted 5.13.0-next-20210629-dirty #67 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-p4 RIP: 0010:0x0 Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6. RSP: 0018:ffff888114e779b8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 1ffff110229cef39 RCX: ffffffffaa67e1aa RDX: 0000000000000000 RSI: ffff88810a58ee00 RDI: ffff8881233180b0 RBP: ffffffffac38e9c0 R08: ffffffffaa67e17e R09: 0000000000000001 R10: ffffffffb91c5557 R11: fffffbfff7238aaa R12: ffff88810a58ee00 R13: ffff888114e77aa0 R14: 0000000000000000 R15: ffff8881233180b0 FS: 00007f946163c480(0000) GS:ffff88839f1c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001099c1000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __lookup_slow+0x116/0x2d0 ? page_put_link+0x120/0x120 ? __d_lookup+0xfc/0x320 ? d_lookup+0x49/0x90 lookup_one_len+0x13c/0x170 ? __lookup_slow+0x2d0/0x2d0 ? reiserfs_schedule_old_flush+0x31/0x130 reiserfs_lookup_privroot+0x64/0x150 reiserfs_fill_super+0x158c/0x1b90 ? finish_unfinished+0xb10/0xb10 ? bprintf+0xe0/0xe0 ? __mutex_lock_slowpath+0x30/0x30 ? __kasan_check_write+0x20/0x30 ? up_write+0x51/0xb0 ? set_blocksize+0x9f/0x1f0 mount_bdev+0x27c/0x2d0 ? finish_unfinished+0xb10/0xb10 ? reiserfs_kill_sb+0x120/0x120 get_super_block+0x19/0x30 legacy_get_tree+0x76/0xf0 vfs_get_tree+0x49/0x160 ? capable+0x1d/0x30 path_mount+0xacc/0x1380 ? putname+0x97/0xd0 ? finish_automount+0x450/0x450 ? kmem_cache_free+0xf8/0x5a0 ? putname+0x97/0xd0 do_mount+0xe2/0x110 ? path_mount+0x1380/0x1380 ? copy_mount_options+0x69/0x140 __x64_sys_mount+0xf0/0x190 do_syscall_64+0x35/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae
This is because 'root_inode' is initialized with wrong mode, and it's i_op is set to 'reiserfs_special_inode_operations'. Thus add check for 'root_inode' to fix the problem.
--- fs/reiserfs/super.c | 8 ++++++++ 1 file changed, 8 insertions(+)
fs/reiserfs/super.c +8 -0
@@ -2059,6 +2059,14 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)unlock_new_inode (root_inode); } +if (!S_ISDIR (root_inode->i_mode) || !inode_get_bytes (root_inode) || + !root_inode->i_size) { +SWARN (silent, s,"" ,"corrupt root inode, run fsck" ); +iput (root_inode); + errval = -EUCLEAN ; + goto error; + } + s->s_root =d_make_root (root_inode);if (!s->s_root) goto error;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 24/30 reiserfs: check directory items on read from disk
In reply to Greg Kroah-HartmanFrom: Shreyansh Chouhan <[email protected]>
[ Upstream commit 13d257503c0930010ef9eed78b689cec417ab741 ]
While verifying the leaf item that we read from the disk, reiserfs doesn't check the directory items, this could cause a crash when we read a directory item from the disk that has an invalid deh_location.
This patch adds a check to the directory items read from the disk that does a bounds check on deh_location for the directory entries. Any directory entry header with a directory entry offset greater than the item length is considered invalid.
--- fs/reiserfs/stree.c | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-)
fs/reiserfs/stree.c +26 -5
@@ -386,6 +386,24 @@ void pathrelse(struct treepath *search_path) search_path->path_length =ILLEGAL_PATH_ELEMENT_OFFSET ; } +static int has_valid_deh_location (struct buffer_head *bh,struct item_head *ih) +{ +struct reiserfs_de_head *deh; +int i; + + deh =B_I_DEH (bh, ih); +for (i =0 ; i <ih_entry_count (ih); i++) { +if (deh_location (&deh[i]) >ih_item_len (ih)) { +reiserfs_warning (NULL ,"reiserfs-5094" , +"directory entry location seems wrong %h" , + &deh[i]); +return 0 ; + } + } + +return 1 ; +} +static int is_leaf (char *buf,int blocksize,struct buffer_head *bh) {struct block_head *blkh;
@@ -453,11 +471,14 @@ static int is_leaf(char *buf, int blocksize, struct buffer_head *bh) "(second one): %h", ih);return 0 ; } -if (is_direntry_le_ih (ih) && (ih_item_len (ih) < (ih_entry_count (ih) *IH_SIZE ))) { -reiserfs_warning (NULL ,"reiserfs-5093" , -"item entry count seems wrong %h" , - ih); -return 0 ; +if (is_direntry_le_ih (ih)) { +if (ih_item_len (ih) < (ih_entry_count (ih) *IH_SIZE )) { +reiserfs_warning (NULL ,"reiserfs-5093" , +"item entry count seems wrong %h" , + ih); +return 0 ; + } +return has_valid_deh_location (bh, ih); } prev_location =ih_location (ih); }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 25/30 alpha: Send stop IPI to send to online CPUs
In reply to Greg Kroah-HartmanFrom: Prarit Bhargava <[email protected]>
[ Upstream commit caace6ca4e06f09413fb8f8a63319594cfb7d47d ]
This issue was noticed while debugging a shutdown issue where some secondary CPUs are not being shutdown correctly. A fix for that [1] requires that secondary cpus be offlined using the cpu_online_mask so that the stop operation is a no-op if CPU HOTPLUG is disabled. I, like the author in
[1] looked at the architectures and found that alpha is one of two architectures that executes smp_send_stop() on all possible CPUs.
On alpha, smp_send_stop() sends an IPI to all possible CPUs but only needs to send them to online CPUs.
Send the stop IPI to only the online CPUs.
[1] https://lkml.org/lkml/2020/1/10/250
--- arch/alpha/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/alpha/kernel/smp.c +1 -1
@@ -584,7 +584,7 @@ voidsmp_send_stop (void) {cpumask_t to_whom; -cpumask_copy (&to_whom, cpu_possible_mask); +cpumask_copy (&to_whom, cpu_online_mask);cpumask_clear_cpu (smp_processor_id (), &to_whom);#ifdef DEBUG_IPI_MSG if (hard_smp_processor_id () != boot_cpu_id)
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 26/30 net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset
In reply to Greg Kroah-HartmanFrom: Letu Ren <[email protected]>
[ Upstream commit 92766c4628ea349c8ddab0cd7bd0488f36e5c4ce ]
When calling the 'ql_wait_for_drvr_lock' and 'ql_adapter_reset', the driver has already acquired the spin lock, so the driver should not call 'ssleep' in atomic context.
This bug can be fixed by using 'mdelay' instead of 'ssleep'.
--- drivers/net/ethernet/qlogic/qla3xxx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/qlogic/qla3xxx.c +3 -3
@@ -155,7 +155,7 @@ static int ql_wait_for_drvr_lock(struct "driver lock acquired\n");return 1 ; } -ssleep (1 ); +mdelay (1000 ); }while (++i <10 );netdev_err (qdev->ndev,"Timed out waiting for driver lock...\n" );
@@ -3287,7 +3287,7 @@ static int ql_adapter_reset(struct ql3_aif ((value &ISP_CONTROL_SR ) ==0 )break ; -ssleep (1 ); +mdelay (1000 ); }while ((--max_wait_time));/*
@@ -3323,7 +3323,7 @@ static int ql_adapter_reset(struct ql3_a ispControlStatus);if ((value &ISP_CONTROL_FSR ) ==0 )break ; -ssleep (1 ); +mdelay (1000 ); }while ((--max_wait_time)); }if (max_wait_time ==0 )
Greg Kroah-Hartman
maintainerPATCH 27/30 USB:ehci:fix Kunpeng920 ehci hardware problem
In reply to Greg Kroah-HartmanFrom: Longfang Liu <[email protected]>
commit 26b75952ca0b8b4b3050adb9582c8e2f44d49687 upstream.
Kunpeng920's EHCI controller does not have SBRN register. Reading the SBRN register when the controller driver is initialized will get 0.
When rebooting the EHCI driver, ehci_shutdown() will be called. if the sbrn flag is 0, ehci_shutdown() will return directly. The sbrn flag being 0 will cause the EHCI interrupt signal to not be turned off after reboot. this interrupt that is not closed will cause an exception to the device sharing the interrupt.
Therefore, the EHCI controller of Kunpeng920 needs to skip the read operation of the SBRN register.
--- drivers/usb/host/ehci-pci.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/host/ehci-pci.c +3 -0
@@ -312,6 +312,9 @@ static int ehci_pci_setup(struct usb_hcdif (pdev->vendor ==PCI_VENDOR_ID_STMICRO && pdev->device ==PCI_DEVICE_ID_STMICRO_USB_HOST ) ;/* ConneXT has no sbrn register */ +else if (pdev->vendor ==PCI_VENDOR_ID_HUAWEI + && pdev->device ==0xa239 ) + ;/* HUAWEI Kunpeng920 USB EHCI has no sbrn register */ else pci_read_config_byte (pdev,0x60 , &ehci->sbrn);
Greg Kroah-Hartman
maintainerPATCH 28/30 ppp: Fix generating ppp unit id when ifname is not specified
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
commit 3125f26c514826077f2a4490b75e9b1c7a644c42 upstream.
When registering new ppp interface via PPPIOCNEWUNIT ioctl then kernel has to choose interface name as this ioctl API does not support specifying it.
Kernel in this case register new interface with name "ppp<id>" where <id> is the ppp unit id, which can be obtained via PPPIOCGUNIT ioctl. This applies also in the case when registering new ppp interface via rtnl without supplying IFLA_IFNAME.
PPPIOCNEWUNIT ioctl allows to specify own ppp unit id which will kernel assign to ppp interface, in case this ppp id is not already used by other ppp interface.
In case user does not specify ppp unit id then kernel choose the first free ppp unit id. This applies also for case when creating ppp interface via rtnl method as it does not provide a way for specifying own ppp unit id.
If some network interface (does not have to be ppp) has name "ppp<id>" with this first free ppp id then PPPIOCNEWUNIT ioctl or rtnl call fails.
And registering new ppp interface is not possible anymore, until interface which holds conflicting name is renamed. Or when using rtnl method with custom interface name in IFLA_IFNAME.
As list of allocated / used ppp unit ids is not possible to retrieve from kernel to userspace, userspace has no idea what happens nor which interface is doing this conflict.
So change the algorithm how ppp unit id is generated. And choose the first number which is not neither used as ppp unit id nor in some network interface with pattern "ppp<id>".
This issue can be simply reproduced by following pppd call when there is no ppp interface registered and also no interface with name pattern "ppp<id>":
pppd ifname ppp1 +ipv6 noip noauth nolock local nodetach pty "pppd +ipv6 noip noauth nolock local nodetach notty"
Or by creating the one ppp interface (which gets assigned ppp unit id 0), renaming it to "ppp1" and then trying to create a new ppp interface (which will always fails as next free ppp unit id is 1, but network interface with name "ppp1" exists).
This patch fixes above described issue by generating new and new ppp unit id until some non-conflicting id with network interfaces is generated.
--- drivers/net/ppp/ppp_generic.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
drivers/net/ppp/ppp_generic.c +15 -4
@@ -285,7 +285,7 @@ static struct channel *ppp_find_channel(static int ppp_connect_channel (struct channel *pch,int unit);static int ppp_disconnect_channel (struct channel *pch);static void ppp_destroy_channel (struct channel *pch); -static int unit_get (struct idr *p,void *ptr); +static int unit_get (struct idr *p,void *ptr,int min);static int unit_set (struct idr *p,void *ptr,int n);static void unit_put (struct idr *p,int n);static void *unit_find (struct idr *p,int n);
@@ -976,9 +976,20 @@ static int ppp_unit_register(struct pppmutex_lock (&pn->all_ppp_mutex);if (unit <0 ) { - ret =unit_get (&pn->units_idr, ppp); + ret =unit_get (&pn->units_idr, ppp,0 );if (ret <0 ) goto err; +if (!ifname_is_set) { +while (1 ) { +snprintf (ppp->dev->name,IFNAMSIZ ,"ppp%i" , ret); +if (!__dev_get_by_name (ppp->ppp_net, ppp->dev->name)) +break ; +unit_put (&pn->units_idr, ret); + ret =unit_get (&pn->units_idr, ppp, ret +1 ); +if (ret <0 ) + goto err; + } + } }else {/* Caller asked for a specific unit number. Fail with -EEXIST * if unavailable. For backward compatibility, return -EEXIST
@@ -3265,9 +3276,9 @@ static int unit_set(struct idr *p, void }/* get new free unit number and associate pointer with it */ -static int unit_get (struct idr *p,void *ptr) +static int unit_get (struct idr *p,void *ptr,int min) { -return idr_alloc (p, ptr,0 ,0 ,GFP_KERNEL ); +return idr_alloc (p, ptr, min,0 ,GFP_KERNEL ); }/* put unit number back to a pool */
Greg Kroah-Hartman
maintainerPATCH 29/30 net: xilinx_emaclite: Do not print real IOMEM pointer
In reply to Greg Kroah-HartmanFrom: YueHaibing <[email protected]>
commit d0d62baa7f505bd4c59cd169692ff07ec49dde37 upstream.
Printing kernel pointers is discouraged because they might leak kernel memory layout. This fixes smatch warning:
drivers/net/ethernet/xilinx/xilinx_emaclite.c:1191 xemaclite_of_probe() warn:
argument 4 to %08lX specifier is cast from pointer
--- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/xilinx/xilinx_emaclite.c +2 -3
@@ -1179,9 +1179,8 @@ static int xemaclite_of_probe(struct pla }dev_info (dev, -"Xilinx EmacLite at 0x%08X mapped to 0x%08X, irq=%d\n" , - (unsigned int __force )ndev->mem_start, - (unsigned int __force )lp->base_addr, ndev->irq); +"Xilinx EmacLite at 0x%08X mapped to 0x%p, irq=%d\n" , + (unsigned int __force )ndev->mem_start, lp->base_addr, ndev->irq);return 0 ; error:
Greg Kroah-Hartman
maintainerPATCH 30/30 ovl: prevent private clone if bind mount is not allowed
In reply to Greg Kroah-HartmanFrom: Miklos Szeredi <[email protected]>
commit 427215d85e8d1476da1a86b8d67aceb485eb3631 upstream.
Add the following checks from __do_loopback() to clone_private_mount() as well:
- verify that the mount is in the current namespace
- verify that there are no locked children
--- fs/namespace.c | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-)
fs/namespace.c +27 -15
@@ -1853,6 +1853,20 @@ void drop_collected_mounts(struct vfsmounamespace_unlock (); } +static bool has_locked_children (struct mount *mnt,struct dentry *dentry) +{ +struct mount *child; + +list_for_each_entry (child, &mnt->mnt_mounts, mnt_child) { +if (!is_subdir (child->mnt_mountpoint, dentry)) +continue ; + +if (child->mnt.mnt_flags &MNT_LOCKED ) +return true; + } +return false; +} +/** * clone_private_mount - create a private clone of a path *
@@ -1867,16 +1881,27 @@ struct vfsmount *clone_private_mount(strstruct mount *old_mnt =real_mount (path->mnt);struct mount *new_mnt; +down_read (&namespace_sem);if (IS_MNT_UNBINDABLE (old_mnt)) -return ERR_PTR (-EINVAL ); + goto invalid; + +if (!check_mnt (old_mnt)) + goto invalid; + +if (has_locked_children (old_mnt, path->dentry)) + goto invalid; -down_read (&namespace_sem); new_mnt =clone_mnt (old_mnt, path->dentry,CL_PRIVATE );up_read (&namespace_sem); +if (IS_ERR (new_mnt))return ERR_CAST (new_mnt);return &new_mnt->mnt; + +invalid: +up_read (&namespace_sem); +return ERR_PTR (-EINVAL ); }EXPORT_SYMBOL_GPL (clone_private_mount);
@@ -2192,19 +2217,6 @@ static int do_change_type(struct path *preturn err; } -static bool has_locked_children (struct mount *mnt,struct dentry *dentry) -{ -struct mount *child; -list_for_each_entry (child, &mnt->mnt_mounts, mnt_child) { -if (!is_subdir (child->mnt_mountpoint, dentry)) -continue ; - -if (child->mnt.mnt_flags &MNT_LOCKED ) -return true; - } -return false; -} -/* * do loopback mount. */
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.280 release. There are 30 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 Sun, 15 Aug 2021 15:05:12 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.280-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.280 release. There are 30 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 Sun, 15 Aug 2021 15:05:12 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.280-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.9.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
## Build
* kernel: 4.9.280-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git branch: linux-4.9.y
* git commit: 5124b049250fa384487453ee2be70fbf82aea45c
* git describe: v4.9.279-31-g5124b049250f
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.9.y/build/v4.9.279-31-g5124b049250f
## No regressions (compared to v4.9.279-31-g58fff7715c9c)
## No fixes (compared to v4.9.279-31-g58fff7715c9c)
## Test result summary
total: 74784, pass: 58530, fail: 535, skip: 13533, xfail: 2186
## Build Summary
* arm: 98 total, 98 passed, 0 failed
* arm64: 25 total, 25 passed, 0 failed
* dragonboard-410c: 1 total, 1 passed, 0 failed
* hi6220-hikey: 1 total, 1 passed, 0 failed
* i386: 15 total, 15 passed, 0 failed
* juno-r2: 1 total, 1 passed, 0 failed
* mips: 36 total, 36 passed, 0 failed
* sparc: 9 total, 9 passed, 0 failed
* x15: 1 total, 1 passed, 0 failed
* x86: 1 total, 1 passed, 0 failed
* x86_64: 15 total, 15 passed, 0 failed
## Test suites summary
* fwts
* igt-gpu-tools
* install-android-platform-tools-r2600
* kselftest-android
* kselftest-arm64
* kselftest-bpf
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-firmware
* kselftest-fpu
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-kvm
* kselftest-lib
* kselftest-livepatch
* kselftest-lkdtm
* kselftest-membarrier
* kselftest-memfd
* kselftest-memory-hotplug
* kselftest-mincore
* kselftest-mount
* kselftest-mqueue
* kselftest-openat2
* kselftest-pid_namespace
* kselftest-pidfd
* kselftest-proc
* kselftest-pstore
* kselftest-ptrace
* kselftest-rseq
* kselftest-rtc
* kselftest-seccomp
* kselftest-sigaltstack
* kselftest-size
* kselftest-splice
* kselftest-static_keys
* kselftest-sync
* kselftest-sysctl
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-vm
* kselftest-x86
* kselftest-zram
* kvm-unit-tests
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-containers-tests
* ltp-controllers-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-open-posix-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-tracing-tests
* network-basic-tests
* packetdrill
* perf
* ssuite
* v4l2-compliance
--
Linaro LKFT
https://lkft.linaro.org
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.9.280 release. There are 30 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 Sun, 15 Aug 2021 15:05:12 +0000. Anything received after that time might be too late.
Build results:
total: 163 pass: 163 fail: 0 Qemu test results: total: 394 pass: 394 fail: 0
Guenter