4.14.320-rc1 review
Subsystems (2)
Greg Kroah-Hartman
maintainercover 4.14.320-rc1 review
This is the start of the stable review cycle for the 4.14.320 release. There are 26 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 Wed, 28 Jun 2023 18:07:23 +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.14.320-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.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.14.320-rc1
Clark Wang <[email protected]>
i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
Dheeraj Kumar Srivastava <[email protected]>
x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
Min Li <[email protected]>
drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
Min Li <[email protected]>
drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
Inki Dae <[email protected]>
drm/exynos: vidi: fix a wrong error return
Vineeth Vijayan <[email protected]>
s390/cio: unregister device when the only path is gone
Dan Carpenter <[email protected]>
usb: gadget: udc: fix NULL dereference in remove()
Helge Deller <[email protected]>
fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
Osama Muhammad <[email protected]>
nfcsim.c: Fix error checking for debugfs_create_dir
Marc Zyngier <[email protected]>
arm64: Add missing Set/Way CMO encodings
Denis Arefev <[email protected]>
HID: wacom: Add error check to wacom_parse_and_register()
Maurizio Lombardi <[email protected]>
scsi: target: iscsi: Prevent login threads from racing between each other
Pablo Neira Ayuso <[email protected]>
netfilter: nf_tables: disallow element updates of bound anonymous sets
Ross Lagerwall <[email protected]>
be2net: Extend xmit workaround to BE3 chip
Sergey Shtylyov <[email protected]>
mmc: usdhi60rol0: fix deferred probing
Sergey Shtylyov <[email protected]>
mmc: omap_hsmmc: fix deferred probing
Sergey Shtylyov <[email protected]>
mmc: omap: fix deferred probing
Sergey Shtylyov <[email protected]>
mmc: mtk-sd: fix deferred probing
Stefan Wahren <[email protected]>
net: qca_spi: Avoid high load if QCA7000 is not available
Sebastian Andrzej Siewior <[email protected]>
xfrm: Linearize the skb after offloading if needed.
Ryusuke Konishi <[email protected]>
nilfs2: prevent general protection fault in nilfs_clear_dirty_page()
Xiu Jianfeng <[email protected]>
cgroup: Do not corrupt task iteration when rebinding subsystem
Michael Kelley <[email protected]>
Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
Ryusuke Konishi <[email protected]>
nilfs2: fix buffer corruption due to concurrent device reads
Ryusuke Konishi <[email protected]>
nilfs2: reject devices with insufficient block count
Bernhard Seibold <[email protected]>
serial: lantiq: add missing interrupt ack
-------------
Diffstat:
Makefile | 4 +-- arch/arm64/include/asm/sysreg.h | 6 ++++ arch/x86/kernel/apic/x2apic_phys.c | 5 +++- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 -- drivers/gpu/drm/radeon/radeon_gem.c | 4 +-- drivers/hid/wacom_sys.c | 7 ++++- drivers/hv/channel_mgmt.c | 18 ++++++++++-- drivers/i2c/busses/i2c-imx-lpi2c.c | 4 +-- drivers/mmc/host/mtk-sd.c | 2 +- drivers/mmc/host/omap.c | 2 +- drivers/mmc/host/omap_hsmmc.c | 6 ++-- drivers/mmc/host/usdhi6rol0.c | 6 ++-- drivers/net/ethernet/emulex/benet/be_main.c | 4 +-- drivers/net/ethernet/qualcomm/qca_spi.c | 3 +- drivers/nfc/nfcsim.c | 4 --- drivers/s390/cio/device.c | 5 +++- drivers/target/iscsi/iscsi_target_nego.c | 4 ++- drivers/tty/serial/lantiq.c | 1 + drivers/usb/gadget/udc/amd5536udc_pci.c | 3 ++ drivers/video/fbdev/imsttfb.c | 6 +++- fs/nilfs2/page.c | 10 ++++++- fs/nilfs2/segbuf.c | 6 ++++ fs/nilfs2/segment.c | 7 +++++ fs/nilfs2/super.c | 25 ++++++++++++++-- fs/nilfs2/the_nilfs.c | 44 ++++++++++++++++++++++++++++- kernel/cgroup/cgroup.c | 20 +++++++++++-- net/ipv4/esp4_offload.c | 3 ++ net/ipv6/esp6_offload.c | 3 ++ net/netfilter/nf_tables_api.c | 7 +++-- 30 files changed, 183 insertions(+), 40 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/26 serial: lantiq: add missing interrupt ack
From: Bernhard Seibold <[email protected]>
commit 306320034e8fbe7ee1cc4f5269c55658b4612048 upstream.
Currently, the error interrupt is never acknowledged, so once active it will stay active indefinitely, causing the handler to be called in an infinite loop.
Message-ID: <[email protected]>
--- drivers/tty/serial/lantiq.c | 1 + 1 file changed, 1 insertion(+)
drivers/tty/serial/lantiq.c +1 -0
@@ -263,6 +263,7 @@ lqasc_err_int(int irq, void *_port)unsigned long flags;struct uart_port *port = (struct uart_port *)_port;spin_lock_irqsave (<q_asc_lock, flags); +ltq_w32 (ASC_IRNCR_EIR , port->membase +LTQ_ASC_IRNCR );/* clear any pending interrupts */ ltq_w32_mask (0 ,ASCWHBSTATE_CLRPE |ASCWHBSTATE_CLRFE |ASCWHBSTATE_CLRROE , port->membase +LTQ_ASC_WHBSTATE );
Greg Kroah-Hartman
maintainerPATCH 2/26 nilfs2: reject devices with insufficient block count
In reply to Greg Kroah-HartmanFrom: Ryusuke Konishi <[email protected]>
commit 92c5d1b860e9581d64baca76779576c0ab0d943d upstream.
The current sanity check for nilfs2 geometry information lacks checks for the number of segments stored in superblocks, so even for device images that have been destructively truncated or have an unusually high number of segments, the mount operation may succeed.
This causes out-of-bounds block I/O on file system block reads or log writes to the segments, the latter in particular causing "a_ops->writepages" to repeatedly fail, resulting in sync_inodes_sb() to hang.
Fix this issue by checking the number of segments stored in the superblock and avoiding mounting devices that can cause out-of-bounds accesses. To eliminate the possibility of overflow when calculating the number of blocks required for the device from the number of segments, this also adds a helper function to calculate the upper bound on the number of segments and inserts a check using it.
--- fs/nilfs2/the_nilfs.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-)
fs/nilfs2/the_nilfs.c +43 -1
@@ -384,6 +384,18 @@ unsigned long nilfs_nrsvsegs(struct the_ 100)); } +/** +* nilfs_max_segment_count - calculate the maximum number of segments +* @nilfs: nilfs object +*/ +static u64 nilfs_max_segment_count (struct the_nilfs *nilfs) +{ +u64 max_count =U64_MAX ; + +do_div (max_count, nilfs->ns_blocks_per_segment); +return min_t (u64, max_count,ULONG_MAX ); +} +void nilfs_set_nsegments (struct the_nilfs *nilfs,unsigned long nsegs) { nilfs->ns_nsegments = nsegs;
@@ -393,6 +405,8 @@ void nilfs_set_nsegments(struct the_nilfstatic int nilfs_store_disk_layout (struct the_nilfs *nilfs,struct nilfs_super_block *sbp) { +u64 nsegments, nblocks; +if (le32_to_cpu (sbp->s_rev_level) <NILFS_MIN_SUPP_REV ) { nilfs_msg(nilfs->ns_sb, KERN_ERR, "unsupported revision (superblock rev.=%d.%d, current rev.=%d.%d). Please check the version of mkfs.nilfs(2).",
@@ -439,7 +453,35 @@ static int nilfs_store_disk_layout(strucreturn -EINVAL ; } -nilfs_set_nsegments (nilfs,le64_to_cpu (sbp->s_nsegments)); + nsegments =le64_to_cpu (sbp->s_nsegments); +if (nsegments >nilfs_max_segment_count (nilfs)) { +nilfs_msg (nilfs->ns_sb,KERN_ERR , +"segment count %llu exceeds upper limit (%llu segments)" , + (unsigned long long )nsegments, + (unsigned long long )nilfs_max_segment_count (nilfs)); +return -EINVAL ; + } + + nblocks = (u64 )i_size_read (nilfs->ns_sb->s_bdev->bd_inode) >> + nilfs->ns_sb->s_blocksize_bits; +if (nblocks) { +u64 min_block_count = nsegments * nilfs->ns_blocks_per_segment; +/* +* To avoid failing to mount early device images without a +* second superblock, exclude that block count from the +* "min_block_count" calculation. +*/ + +if (nblocks < min_block_count) { +nilfs_msg (nilfs->ns_sb,KERN_ERR , +"total number of segment blocks %llu exceeds device size (%llu blocks)" , + (unsigned long long )min_block_count, + (unsigned long long )nblocks); +return -EINVAL ; + } + } + +nilfs_set_nsegments (nilfs, nsegments); nilfs->ns_crc_seed =le32_to_cpu (sbp->s_crc_seed);return 0 ; }
Greg Kroah-Hartman
maintainerPATCH 3/26 nilfs2: fix buffer corruption due to concurrent device reads
In reply to Greg Kroah-HartmanFrom: Ryusuke Konishi <[email protected]>
commit 679bd7ebdd315bf457a4740b306ae99f1d0a403d upstream.
As a result of analysis of a syzbot report, it turned out that in three cases where nilfs2 allocates block device buffers directly via sb_getblk, concurrent reads to the device can corrupt the allocated buffers.
Nilfs2 uses sb_getblk for segment summary blocks, that make up a log header, and the super root block, that is the trailer, and when moving and writing the second super block after fs resize.
In any of these, since the uptodate flag is not set when storing metadata to be written in the allocated buffers, the stored metadata will be overwritten if a device read of the same block occurs concurrently before the write. This causes metadata corruption and misbehavior in the log write itself, causing warnings in nilfs_btree_assign() as reported.
Fix these issues by setting an uptodate flag on the buffer head on the first or before modifying each buffer obtained with sb_getblk, and clearing the flag on failure.
When setting the uptodate flag, the lock_buffer/unlock_buffer pair is used to perform necessary exclusive control, and the buffer is filled to ensure that uninitialized bytes are not mixed into the data read from others. As for buffers for segment summary blocks, they are filled incrementally, so if the uptodate flag was unset on their allocation, set the flag and zero fill the buffer once at that point.
Also, regarding the superblock move routine, the starting point of the memset call to zerofill the block is incorrectly specified, which can cause a buffer overflow on file systems with block sizes greater than 4KiB. In addition, if the superblock is moved within a large block, it is necessary to assume the possibility that the data in the superblock will be destroyed by zero-filling before copying. So fix these potential issues as well.
--- fs/nilfs2/segbuf.c | 6 ++++++ fs/nilfs2/segment.c | 7 +++++++ fs/nilfs2/super.c | 23 ++++++++++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-)
fs/nilfs2/segbuf.c +6 -0
@@ -110,6 +110,12 @@ int nilfs_segbuf_extend_segsum(struct niif (unlikely (!bh))return -ENOMEM ; +lock_buffer (bh); +if (!buffer_uptodate (bh)) { +memset (bh->b_data,0 , bh->b_size); +set_buffer_uptodate (bh); + } +unlock_buffer (bh);nilfs_segbuf_add_segsum_buffer (segbuf, bh);return 0 ; }
fs/nilfs2/segment.c +7 -0
@@ -997,10 +997,13 @@ static void nilfs_segctor_fill_in_super_unsigned int isz, srsz; bh_sr =NILFS_LAST_SEGBUF (&sci->sc_segbufs)->sb_super_root; + +lock_buffer (bh_sr); raw_sr = (struct nilfs_super_root *)bh_sr->b_data; isz = nilfs->ns_inode_size; srsz =NILFS_SR_BYTES (isz); + raw_sr->sr_sum =0 ;/* Ensure initialization within this update */ raw_sr->sr_bytes =cpu_to_le16 (srsz); raw_sr->sr_nongc_ctime = cpu_to_le64(nilfs_doing_gc() ?
@@ -1014,6 +1017,8 @@ static void nilfs_segctor_fill_in_super_nilfs_write_inode_common (nilfs->ns_sufile, (void *)raw_sr +NILFS_SR_SUFILE_OFFSET (isz),1 );memset ((void *)raw_sr + srsz,0 , nilfs->ns_blocksize - srsz); +set_buffer_uptodate (bh_sr); +unlock_buffer (bh_sr); }static void nilfs_redirty_inodes (struct list_head *head)
@@ -1791,6 +1796,7 @@ static void nilfs_abort_logs(struct listlist_for_each_entry (segbuf, logs, sb_list) {list_for_each_entry (bh, &segbuf->sb_segsum_buffers, b_assoc_buffers) { +clear_buffer_uptodate (bh);if (bh->b_page != bd_page) {if (bd_page)end_page_writeback (bd_page);
@@ -1802,6 +1808,7 @@ static void nilfs_abort_logs(struct list b_assoc_buffers) {clear_buffer_async_write (bh);if (bh == segbuf->sb_super_root) { +clear_buffer_uptodate (bh);if (bh->b_page != bd_page) {end_page_writeback (bd_page); bd_page = bh->b_page;
fs/nilfs2/super.c +22 -1
@@ -384,10 +384,31 @@ static int nilfs_move_2nd_super(struct s goto out; } nsbp = (void *)nsbh->b_data + offset; -memset (nsbp,0 , nilfs->ns_blocksize); +lock_buffer (nsbh);if (sb2i >=0 ) { +/* +* The position of the second superblock only changes by 4KiB, +* which is larger than the maximum superblock data size +* (= 1KiB), so there is no need to use memmove() to allow +* overlap between source and destination. +*/ memcpy (nsbp, nilfs->ns_sbp[sb2i], nilfs->ns_sbsize); + +/* +* Zero fill after copy to avoid overwriting in case of move +* within the same block. +*/ +memset (nsbh->b_data,0 , offset); +memset ((void *)nsbp + nilfs->ns_sbsize,0 , + nsbh->b_size - offset - nilfs->ns_sbsize); + }else { +memset (nsbh->b_data,0 , nsbh->b_size); + } +set_buffer_uptodate (nsbh); +unlock_buffer (nsbh); + +if (sb2i >=0 ) {brelse (nilfs->ns_sbh[sb2i]); nilfs->ns_sbh[sb2i] = nsbh; nilfs->ns_sbp[sb2i] = nsbp;
Greg Kroah-Hartman
maintainerPATCH 4/26 Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
In reply to Greg Kroah-HartmanFrom: Michael Kelley <[email protected]>
commit 320805ab61e5f1e2a5729ae266e16bec2904050c upstream.
vmbus_wait_for_unload() may be called in the panic path after other CPUs are stopped. vmbus_wait_for_unload() currently loops through online CPUs looking for the UNLOAD response message. But the values of CONFIG_KEXEC_CORE and crash_kexec_post_notifiers affect the path used to stop the other CPUs, and in one of the paths the stopped CPUs are removed from cpu_online_mask. This removal happens in both x86/x64 and arm64 architectures. In such a case, vmbus_wait_for_unload() only checks the panic'ing CPU, and misses the UNLOAD response message except when the panic'ing CPU is CPU 0. vmbus_wait_for_unload() eventually times out, but only after waiting 100 seconds.
Fix this by looping through *present* CPUs in vmbus_wait_for_unload(). The cpu_present_mask is not modified by stopping the other CPUs in the panic path, nor should it be.
Also, in a CoCo VM the synic_message_page is not allocated in hv_synic_alloc(), but is set and cleared in hv_synic_enable_regs() and hv_synic_disable_regs() such that it is set only when the CPU is online. If not all present CPUs are online when vmbus_wait_for_unload() is called, the synic_message_page might be NULL. Add a check for this.
--- drivers/hv/channel_mgmt.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
drivers/hv/channel_mgmt.c +16 -2
@@ -803,11 +803,22 @@ static void vmbus_wait_for_unload(void)if (completion_done (&vmbus_connection.unload_event)) goto completed; -for_each_online_cpu (cpu) { +for_each_present_cpu (cpu) {struct hv_per_cpu_context *hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); +/* +* In a CoCo VM the synic_message_page is not allocated +* in hv_synic_alloc(). Instead it is set/cleared in +* hv_synic_enable_regs() and hv_synic_disable_regs() +* such that it is set only when the CPU is online. If +* not all present CPUs are online, the message page +* might be NULL, so skip such CPUs. +*/ page_addr = hv_cpu->synic_message_page; +if (!page_addr) +continue ; + msg = (struct hv_message *)page_addr +VMBUS_MESSAGE_SINT ;
@@ -841,11 +852,14 @@ completed:* maybe-pending messages on all CPUs to be able to receive new * messages after we reconnect. */ -for_each_online_cpu (cpu) { +for_each_present_cpu (cpu) {struct hv_per_cpu_context *hv_cpu =per_cpu_ptr (hv_context.cpu_context, cpu); page_addr = hv_cpu->synic_message_page; +if (!page_addr) +continue ; + msg = (struct hv_message *)page_addr +VMBUS_MESSAGE_SINT ; msg->header.message_type =HVMSG_NONE ; }
Greg Kroah-Hartman
maintainerPATCH 5/26 cgroup: Do not corrupt task iteration when rebinding subsystem
In reply to Greg Kroah-HartmanFrom: Xiu Jianfeng <[email protected]>
commit 6f363f5aa845561f7ea496d8b1175e3204470486 upstream.
We found a refcount UAF bug as follows:
refcount_t: addition on 0; use-after-free.
WARNING: CPU: 1 PID: 342 at lib/refcount.c:25 refcount_warn_saturate+0xa0/0x148 Workqueue: events cpuset_hotplug_workfn Call trace: refcount_warn_saturate+0xa0/0x148 __refcount_add.constprop.0+0x5c/0x80 css_task_iter_advance_css_set+0xd8/0x210 css_task_iter_advance+0xa8/0x120 css_task_iter_next+0x94/0x158 update_tasks_root_domain+0x58/0x98 rebuild_root_domains+0xa0/0x1b0 rebuild_sched_domains_locked+0x144/0x188 cpuset_hotplug_workfn+0x138/0x5a0 process_one_work+0x1e8/0x448 worker_thread+0x228/0x3e0 kthread+0xe0/0xf0 ret_from_fork+0x10/0x20
then a kernel panic will be triggered as below:
Unable to handle kernel paging request at virtual address 00000000c0000010 Call trace: cgroup_apply_control_disable+0xa4/0x16c rebind_subsystems+0x224/0x590 cgroup_destroy_root+0x64/0x2e0 css_free_rwork_fn+0x198/0x2a0 process_one_work+0x1d4/0x4bc worker_thread+0x158/0x410 kthread+0x108/0x13c ret_from_fork+0x10/0x18
The race that cause this bug can be shown as below:
(hotplug cpu) | (umount cpuset) mutex_lock(&cpuset_mutex) | mutex_lock(&cgroup_mutex) cpuset_hotplug_workfn | rebuild_root_domains | rebind_subsystems update_tasks_root_domain | spin_lock_irq(&css_set_lock) css_task_iter_start | list_move_tail(&cset->e_cset_node[ss->id] while(css_task_iter_next) | &dcgrp->e_csets[ss->id]); css_task_iter_end | spin_unlock_irq(&css_set_lock) mutex_unlock(&cpuset_mutex) | mutex_unlock(&cgroup_mutex)
Inside css_task_iter_start/next/end, css_set_lock is hold and then released, so when iterating task(left side), the css_set may be moved to another list(right side), then it->cset_head points to the old list head and it->cset_pos->next points to the head node of new list, which can't be used as struct css_set.
To fix this issue, switch from all css_sets to only scgrp's css_sets to patch in-flight iterators to preserve correct iteration, and then update it->cset_head as well.
--- kernel/cgroup/cgroup.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)
kernel/cgroup/cgroup.c +17 -3
@@ -1600,7 +1600,7 @@ int rebind_subsystems(struct cgroup_root {struct cgroup *dcgrp = &dst_root->cgrp;struct cgroup_subsys *ss; -int ssid, i, ret; +int ssid, ret;u16 dfl_disable_ss_mask =0 ;lockdep_assert_held (&cgroup_mutex);
@@ -1644,7 +1644,8 @@ int rebind_subsystems(struct cgroup_rootstruct cgroup_root *src_root = ss->root;struct cgroup *scgrp = &src_root->cgrp;struct cgroup_subsys_state *css =cgroup_css (scgrp, ss); -struct css_set *cset; +struct css_set *cset, *cset_pos; +struct css_task_iter *it;WARN_ON (!css ||cgroup_css (dcgrp, ss));
@@ -1662,9 +1663,22 @@ int rebind_subsystems(struct cgroup_root css->cgroup = dcgrp;spin_lock_irq (&css_set_lock); -hash_for_each (css_set_table, i, cset, hlist) +WARN_ON (!list_empty (&dcgrp->e_csets[ss->id])); +list_for_each_entry_safe (cset, cset_pos, &scgrp->e_csets[ss->id], + e_cset_node[ss->id]) {list_move_tail (&cset->e_cset_node[ss->id], &dcgrp->e_csets[ss->id]); +/* +* all css_sets of scgrp together in same order to dcgrp, +* patch in-flight iterators to preserve correct iteration. +* since the iterator is always advanced right away and +* finished when it->cset_pos meets it->cset_head, so only +* update it->cset_head is enough here. +*/ +list_for_each_entry (it, &cset->task_iters, iters_node) +if (it->cset_head == &scgrp->e_csets[ss->id]) + it->cset_head = &dcgrp->e_csets[ss->id]; + }spin_unlock_irq (&css_set_lock);/* default hierarchy doesn't enable controllers by default */
Greg Kroah-Hartman
maintainerPATCH 6/26 nilfs2: prevent general protection fault in nilfs_clear_dirty_page()
In reply to Greg Kroah-HartmanFrom: Ryusuke Konishi <[email protected]>
commit 782e53d0c14420858dbf0f8f797973c150d3b6d7 upstream.
In a syzbot stress test that deliberately causes file system errors on nilfs2 with a corrupted disk image, it has been reported that nilfs_clear_dirty_page() called from nilfs_clear_dirty_pages() can cause a
general protection fault.
In nilfs_clear_dirty_pages(), when looking up dirty pages from the page cache and calling nilfs_clear_dirty_page() for each dirty page/folio retrieved, the back reference from the argument page to "mapping" may have been changed to NULL (and possibly others). It is necessary to check this after locking the page/folio.
So, fix this issue by not calling nilfs_clear_dirty_page() on a page/folio after locking it in nilfs_clear_dirty_pages() if the back reference "mapping" from the page/folio is different from the "mapping" that held the page/folio just before.
--- fs/nilfs2/page.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
fs/nilfs2/page.c +9 -1
@@ -382,7 +382,15 @@ void nilfs_clear_dirty_pages(struct addrstruct page *page = pvec.pages[i];lock_page (page); -nilfs_clear_dirty_page (page, silent); + +/* +* This page may have been removed from the address +* space by truncation or invalidation when the lock +* was acquired. Skip processing in that case. +*/ +if (likely (page->mapping == mapping)) +nilfs_clear_dirty_page (page, silent); +unlock_page (page); }pagevec_release (&pvec);
Greg Kroah-Hartman
maintainerPATCH 7/26 xfrm: Linearize the skb after offloading if needed.
In reply to Greg Kroah-HartmanFrom: Sebastian Andrzej Siewior <[email protected]>
[ Upstream commit f015b900bc3285322029b4a7d132d6aeb0e51857 ]
With offloading enabled, esp_xmit() gets invoked very late, from within validate_xmit_xfrm() which is after validate_xmit_skb() validates and linearizes the skb if the underlying device does not support fragments.
esp_output_tail() may add a fragment to the skb while adding the auth tag/ IV. Devices without the proper support will then send skb->data points to with the correct length so the packet will have garbage at the end. A pcap sniffer will claim that the proper data has been sent since it parses the skb properly.
It is not affected with INET_ESP_OFFLOAD disabled.
Linearize the skb after offloading if the sending hardware requires it. It was tested on v4, v6 has been adopted.
--- net/ipv4/esp4_offload.c | 3 +++ net/ipv6/esp6_offload.c | 3 +++ 2 files changed, 6 insertions(+)
net/ipv4/esp4_offload.c +3 -0
@@ -268,6 +268,9 @@ static int esp_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_features_secpath_reset (skb); +if (skb_needs_linearize (skb, skb->dev->features) && +__skb_linearize (skb)) +return -ENOMEM ;return 0 ; }
net/ipv6/esp6_offload.c +3 -0
@@ -304,6 +304,9 @@ static int esp6_xmit(struct xfrm_state *x, struct sk_buff *skb, netdev_featuressecpath_reset (skb); +if (skb_needs_linearize (skb, skb->dev->features) && +__skb_linearize (skb)) +return -ENOMEM ;return 0 ; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 8/26 net: qca_spi: Avoid high load if QCA7000 is not available
In reply to Greg Kroah-HartmanFrom: Stefan Wahren <[email protected]>
[ Upstream commit 92717c2356cb62c89e8a3dc37cbbab2502562524 ]
In case the QCA7000 is not available via SPI (e.g. in reset), the driver will cause a high load. The reason for this is that the synchronization is never finished and schedule() is never called. Since the synchronization is not timing critical, it's safe to drop this from the scheduling condition.
--- drivers/net/ethernet/qualcomm/qca_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/qualcomm/qca_spi.c +1 -2
@@ -553,8 +553,7 @@ qcaspi_spi_thread(void *data)while (!kthread_should_stop ()) {set_current_state (TASK_INTERRUPTIBLE );if ((qca->intr_req == qca->intr_svc) && - (qca->txr.skb[qca->txr.head] ==NULL ) && - (qca->sync ==QCASPI_SYNC_READY )) + !qca->txr.skb[qca->txr.head])schedule ();set_current_state (TASK_RUNNING );
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 9/26 mmc: mtk-sd: fix deferred probing
In reply to Greg Kroah-HartmanFrom: Sergey Shtylyov <[email protected]>
[ Upstream commit 0c4dc0f054891a2cbde0426b0c0fdf232d89f47f ]
The driver overrides the error codes returned by platform_get_irq() to -EINVAL, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream.
--- drivers/mmc/host/mtk-sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/mtk-sd.c +1 -1
@@ -1663,7 +1663,7 @@ static int msdc_drv_probe(struct platform_device *pdev) host->irq =platform_get_irq (pdev,0 );if (host->irq <0 ) { - ret = -EINVAL ; + ret = host->irq; goto host_free; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 10/26 mmc: omap: fix deferred probing
In reply to Greg Kroah-HartmanFrom: Sergey Shtylyov <[email protected]>
[ Upstream commit aedf4ba1ad00aaa94c1b66c73ecaae95e2564b95 ]
The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream.
--- drivers/mmc/host/omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/omap.c +1 -1
@@ -1348,7 +1348,7 @@ static int mmc_omap_probe(struct platform_device *pdev) irq =platform_get_irq (pdev,0 );if (irq <0 ) -return -ENXIO ; +return irq; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); host->virt_base =devm_ioremap_resource (&pdev->dev, res);
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 11/26 mmc: omap_hsmmc: fix deferred probing
In reply to Greg Kroah-HartmanFrom: Sergey Shtylyov <[email protected]>
[ Upstream commit fb51b74a57859b707c3e8055ed0c25a7ca4f6a29 ]
The driver overrides the error codes returned by platform_get_irq() to -ENXIO, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating the error codes upstream.
--- drivers/mmc/host/omap_hsmmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/mmc/host/omap_hsmmc.c +4 -2
@@ -2023,9 +2023,11 @@ static int omap_hsmmc_probe(struct platform_device *pdev) } res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - irq =platform_get_irq (pdev,0 ); -if (res ==NULL || irq <0 ) +if (!res)return -ENXIO ; + irq =platform_get_irq (pdev,0 ); +if (irq <0 ) +return irq; base =devm_ioremap_resource (&pdev->dev, res);if (IS_ERR (base))
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 12/26 mmc: usdhi60rol0: fix deferred probing
In reply to Greg Kroah-HartmanFrom: Sergey Shtylyov <[email protected]>
[ Upstream commit 413db499730248431c1005b392e8ed82c4fa19bf ]
The driver overrides the error codes returned by platform_get_irq_byname() to -ENODEV, so if it returns -EPROBE_DEFER, the driver will fail the probe permanently instead of the deferred probing. Switch to propagating error codes upstream.
--- drivers/mmc/host/usdhi6rol0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/mmc/host/usdhi6rol0.c +4 -2
@@ -1749,8 +1749,10 @@ static int usdhi6_probe(struct platform_device *pdev) irq_cd =platform_get_irq_byname (pdev,"card detect" ); irq_sd =platform_get_irq_byname (pdev,"data" ); irq_sdio =platform_get_irq_byname (pdev,"SDIO" ); -if (irq_sd <0 || irq_sdio <0 ) -return -ENODEV ; +if (irq_sd <0 ) +return irq_sd; +if (irq_sdio <0 ) +return irq_sdio; mmc =mmc_alloc_host (sizeof (struct usdhi6_host ), dev);if (!mmc)
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 13/26 be2net: Extend xmit workaround to BE3 chip
In reply to Greg Kroah-HartmanFrom: Ross Lagerwall <[email protected]>
[ Upstream commit 7580e0a78eb29e7bb1a772eba4088250bbb70d41 ]
We have seen a bug where the NIC incorrectly changes the length in the IP header of a padded packet to include the padding bytes. The driver already has a workaround for this so do the workaround for this NIC too. This resolves the issue.
The NIC in question identifies itself as follows:
[ 8.828494] be2net 0000:02:00.0: FW version is 10.7.110.31 [ 8.834759] be2net 0000:02:00.0: Emulex OneConnect(be3): PF FLEX10 port 1
02:00.0 Ethernet controller: Emulex Corporation OneConnect 10Gb NIC (be3) (rev 01)
--- drivers/net/ethernet/emulex/benet/be_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/emulex/benet/be_main.c +2 -2
@@ -1129,8 +1129,8 @@ static struct sk_buff *be_lancer_xmit_workarounds(struct be_adapter *adapter, eth_hdr_len =ntohs (skb->protocol) ==ETH_P_8021Q ?VLAN_ETH_HLEN :ETH_HLEN ;if (skb->len <=60 && - (lancer_chip (adapter) ||skb_vlan_tag_present (skb)) && -is_ipv4_pkt (skb)) { + (lancer_chip (adapter) ||BE3_chip (adapter) || +skb_vlan_tag_present (skb)) &&is_ipv4_pkt (skb)) { ip = (struct iphdr *)ip_hdr (skb);pskb_trim (skb, eth_hdr_len +ntohs (ip->tot_len)); }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 14/26 netfilter: nf_tables: disallow element updates of bound anonymous sets
In reply to Greg Kroah-HartmanFrom: Pablo Neira Ayuso <[email protected]>
[ Upstream commit c88c535b592d3baeee74009f3eceeeaf0fdd5e1b ]
Anonymous sets come with NFT_SET_CONSTANT from userspace. Although API allows to create anonymous sets without NFT_SET_CONSTANT, it makes no sense to allow to add and to delete elements for bound anonymous sets.
--- net/netfilter/nf_tables_api.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
net/netfilter/nf_tables_api.c +5 -2
@@ -4220,7 +4220,8 @@ static int nf_tables_newsetelem(struct net *net, struct sock *nlsk,return PTR_ERR (set); } -if (!list_empty (&set->bindings) && set->flags &NFT_SET_CONSTANT ) +if (!list_empty (&set->bindings) && + (set->flags & (NFT_SET_CONSTANT |NFT_SET_ANONYMOUS )))return -EBUSY ;nla_for_each_nested (attr, nla[NFTA_SET_ELEM_LIST_ELEMENTS ], rem) {
@@ -4399,7 +4400,9 @@ static int nf_tables_delsetelem(struct net *net, struct sock *nlsk, genmask);if (IS_ERR (set))return PTR_ERR (set); -if (!list_empty (&set->bindings) && set->flags &NFT_SET_CONSTANT ) + +if (!list_empty (&set->bindings) && + (set->flags & (NFT_SET_CONSTANT |NFT_SET_ANONYMOUS )))return -EBUSY ;if (nla[NFTA_SET_ELEM_LIST_ELEMENTS ] ==NULL ) {
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 15/26 scsi: target: iscsi: Prevent login threads from racing between each other
In reply to Greg Kroah-HartmanFrom: Maurizio Lombardi <[email protected]>
[ Upstream commit 2a737d3b8c792400118d6cf94958f559de9c5e59 ]
The tpg->np_login_sem is a semaphore that is used to serialize the login process when multiple login threads run concurrently against the same target portal group.
The iscsi_target_locate_portal() function finds the tpg, calls iscsit_access_np() against the np_login_sem semaphore and saves the tpg pointer in conn->tpg;
If iscsi_target_locate_portal() fails, the caller will check for the conn->tpg pointer and, if it's not NULL, then it will assume that iscsi_target_locate_portal() called iscsit_access_np() on the semaphore.
Make sure that conn->tpg gets initialized only if iscsit_access_np() was successful, otherwise iscsit_deaccess_np() may end up being called against a semaphore we never took, allowing more than one thread to access the same tpg.
--- drivers/target/iscsi/iscsi_target_nego.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/target/iscsi/iscsi_target_nego.c +3 -1
@@ -1067,6 +1067,7 @@ int iscsi_target_locate_portal(iscsi_target_set_sock_callbacks (conn); login->np = np; + conn->tpg =NULL ; login_req = (struct iscsi_login_req *) login->req; payload_length =ntoh24 (login_req->dlength);
@@ -1136,7 +1137,6 @@ int iscsi_target_locate_portal(*/ sessiontype =strncmp (s_buf,DISCOVERY ,9 );if (!sessiontype) { - conn->tpg = iscsit_global->discovery_tpg;if (!login->leading_connection) goto get_target;
@@ -1153,9 +1153,11 @@ int iscsi_target_locate_portal(* Serialize access across the discovery struct iscsi_portal_group to * process login attempt. */ + conn->tpg = iscsit_global->discovery_tpg;if (iscsit_access_np (np, conn->tpg) <0 ) {iscsit_tx_login_rsp (conn,ISCSI_STATUS_CLS_TARGET_ERR ,ISCSI_LOGIN_STATUS_SVC_UNAVAILABLE ); + conn->tpg =NULL ; ret =-1 ; goto out; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 16/26 HID: wacom: Add error check to wacom_parse_and_register()
In reply to Greg Kroah-HartmanFrom: Denis Arefev <[email protected]>
[ Upstream commit 16a9c24f24fbe4564284eb575b18cc20586b9270 ]
Added a variable check and
transition in case of an error
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/hid/wacom_sys.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/hid/wacom_sys.c +6 -1
@@ -2251,8 +2251,13 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless) goto fail_quirks; } -if (features->device_type &WACOM_DEVICETYPE_WL_MONITOR ) +if (features->device_type &WACOM_DEVICETYPE_WL_MONITOR ) { error =hid_hw_open (hdev); +if (error) { +hid_err (hdev,"hw open failed\n" ); + goto fail_quirks; + } + }wacom_set_shared_values (wacom_wac);devres_close_group (&hdev->dev, wacom);
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 17/26 arm64: Add missing Set/Way CMO encodings
In reply to Greg Kroah-HartmanFrom: Marc Zyngier <[email protected]>
[ Upstream commit 8d0f019e4c4f2ee2de81efd9bf1c27e9fb3c0460 ]
Add the missing Set/Way CMOs that apply to tagged memory.
--- arch/arm64/include/asm/sysreg.h | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/include/asm/sysreg.h +6 -0
@@ -98,8 +98,14 @@ (!!x)<<8 | 0x1f)#define SYS_DC_ISW sys_insn(1, 0, 7, 6, 2) +#define SYS_DC_IGSW sys_insn(1, 0, 7, 6, 4) +#define SYS_DC_IGDSW sys_insn(1, 0, 7, 6, 6)#define SYS_DC_CSW sys_insn(1, 0, 7, 10, 2) +#define SYS_DC_CGSW sys_insn(1, 0, 7, 10, 4) +#define SYS_DC_CGDSW sys_insn(1, 0, 7, 10, 6)#define SYS_DC_CISW sys_insn(1, 0, 7, 14, 2) +#define SYS_DC_CIGSW sys_insn(1, 0, 7, 14, 4) +#define SYS_DC_CIGDSW sys_insn(1, 0, 7, 14, 6)#define SYS_OSDTRRX_EL1 sys_reg(2, 0, 0, 0, 2)#define SYS_MDCCINT_EL1 sys_reg(2, 0, 0, 2, 0)
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 18/26 nfcsim.c: Fix error checking for debugfs_create_dir
In reply to Greg Kroah-HartmanFrom: Osama Muhammad <[email protected]>
[ Upstream commit 9b9e46aa07273ceb96866b2e812b46f1ee0b8d2f ]
This patch fixes the error checking in nfcsim.c. The DebugFS kernel API is developed in
a way that the caller can safely ignore the errors that occur during the creation of DebugFS nodes.
--- drivers/nfc/nfcsim.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/nfc/nfcsim.c +0 -4
@@ -345,10 +345,6 @@ static struct dentry *nfcsim_debugfs_root;static void nfcsim_debugfs_init (void ) { nfcsim_debugfs_root =debugfs_create_dir ("nfcsim" ,NULL ); - -if (!nfcsim_debugfs_root) -pr_err ("Could not create debugfs entry\n" ); - }static void nfcsim_debugfs_remove (void )
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 19/26 fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
In reply to Greg Kroah-HartmanFrom: Helge Deller <[email protected]>
[ Upstream commit 5cf9a090a39c97f4506b7b53739d469b1c05a7e9 ]
Add missing cleanups in error path.
--- drivers/video/fbdev/imsttfb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/video/fbdev/imsttfb.c +5 -1
@@ -1452,9 +1452,13 @@ static void init_imstt(struct fb_info *info)FBINFO_HWACCEL_FILLRECT |FBINFO_HWACCEL_YPAN ; -fb_alloc_cmap (&info->cmap,0 ,0 ); +if (fb_alloc_cmap (&info->cmap,0 ,0 )) { +framebuffer_release (info); +return -ENODEV ; + }if (register_framebuffer (info) <0 ) { +fb_dealloc_cmap (&info->cmap);framebuffer_release (info);return ; }
Signature · 1 line
2.39.2
Re: [PATCH 4.14 19/26] fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
Hi Greg & Sasha,
The patch below landed in 4.14-stable and breaks build with this error:
drivers/video/fbdev/imsttfb.c:1457:3: error: void function 'init_imstt' should not return a value [-Wreturn-type]
return -ENODEV;
^ ~~~~~~~1 error generated.
I suggest to simply drop (revert) it again from the v4.14-stable tree. Shall I send a revert-patch, or can you do it manually?
Helge
Quoted 31 lines · Greg Kroah-Hartman
From: Helge Deller <[email protected]>
[ Upstream commit
5cf9a090a39c97f4506b7b53739d469b1c05a7e9]Add missing cleanups in error path.
Signed-off-by Helge Deller <[email protected]>Signed-off-by Sasha Levin <[email protected]>--- drivers/video/fbdev/imsttfb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/video/fbdev/imsttfb.c +5
-1@@ -1452,9 +1452,13 @@ static void init_imstt(struct fb_info *info)FBINFO_HWACCEL_FILLRECT |FBINFO_HWACCEL_YPAN ; -fb_alloc_cmap (&info->cmap,0 ,0 ); +if (fb_alloc_cmap (&info->cmap,0 ,0 )) { +framebuffer_release (info); +return -ENODEV ; + }if (register_framebuffer (info) <0 ) { +fb_dealloc_cmap (&info->cmap);framebuffer_release (info);return ; }
Greg Kroah-Hartman
maintainerRe: [PATCH 4.14 19/26] fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
Quoted 4 lines · Helge Deller
Hi Greg & Sasha,
The patch below landed in 4.14-stable and breaks build with this error:
Quoted 8 lines
drivers/video/fbdev/imsttfb.c:1457:3: error: void function 'init_imstt' should not return a value [-Wreturn-type]return -ENODEV; ^ ~~~~~~~1 error generated.
I suggest to simply drop (revert) it again from the v4.14-stable tree. Shall I send a revert-patch, or can you do it manually?
How about just fix it up by changing the line to "return;" instead?
thanks,
greg k-h
Re: [PATCH 4.14 19/26] fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
Quoted 11 lines · Greg Kroah-Hartman
Quoted 10 lines · Helge Deller
Hi Greg & Sasha,
The patch below landed in 4.14-stable and breaks build with this error:
drivers/video/fbdev/imsttfb.c:1457:3: error: void function 'init_imstt' should not return a value [-Wreturn-type]return -ENODEV; ^ ~~~~~~~ 1 error generated.
Quoted 4 lines
Quoted 2 lines
I suggest to simply drop (revert) it again from the v4.14-stable tree. Shall I send a revert-patch, or can you do it manually?
How about just fix it up by changing the line to "return;" instead?
Sure.
I'll send a patch.
Helge
Greg Kroah-Hartman
maintainerPATCH 20/26 usb: gadget: udc: fix NULL dereference in remove()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
[ Upstream commit 016da9c65fec9f0e78c4909ed9a0f2d567af6775 ]
The "udc" pointer was never set in the probe() function so it will lead to a NULL dereference in udc_pci_remove() when we do:
usb_del_gadget_udc(&udc->gadget);
--- drivers/usb/gadget/udc/amd5536udc_pci.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/usb/gadget/udc/amd5536udc_pci.c +3 -0
@@ -175,6 +175,9 @@ static int udc_pci_probe( retval = -ENODEV ; goto err_probe; } + + udc = dev; +return 0 ; err_probe:
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 21/26 s390/cio: unregister device when the only path is gone
In reply to Greg Kroah-HartmanFrom: Vineeth Vijayan <[email protected]>
[ Upstream commit 89c0c62e947a01e7a36b54582fd9c9e346170255 ]
Currently, if the device is offline and all the channel paths are either configured or varied offline, the associated subchannel gets unregistered. Don't unregister the subchannel, instead unregister offline device.
--- drivers/s390/cio/device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/s390/cio/device.c +4 -1
@@ -1357,6 +1357,7 @@ void ccw_device_set_notoper(struct ccw_device *cdev)enum io_sch_action {IO_SCH_UNREG ,IO_SCH_ORPH_UNREG , +IO_SCH_UNREG_CDEV ,IO_SCH_ATTACH ,IO_SCH_UNREG_ATTACH ,IO_SCH_ORPH_ATTACH ,
@@ -1389,7 +1390,7 @@ static enum io_sch_action sch_get_action(struct subchannel *sch) }if ((sch->schib.pmcw.pam & sch->opm) ==0 ) {if (ccw_device_notify (cdev,CIO_NO_PATH ) !=NOTIFY_OK ) -return IO_SCH_UNREG ; +return IO_SCH_UNREG_CDEV ;return IO_SCH_DISC ; }if (device_is_disconnected (cdev))
@@ -1451,6 +1452,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)case IO_SCH_ORPH_ATTACH :ccw_device_set_disconnected (cdev);break ; +case IO_SCH_UNREG_CDEV :case IO_SCH_UNREG_ATTACH :case IO_SCH_UNREG :if (!cdev)
@@ -1484,6 +1486,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)if (rc) goto out;break ; +case IO_SCH_UNREG_CDEV :case IO_SCH_UNREG_ATTACH :spin_lock_irqsave (sch->lock, flags);if (cdev->private->flags.resuming) {
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 22/26 drm/exynos: vidi: fix a wrong error return
In reply to Greg Kroah-HartmanFrom: Inki Dae <[email protected]>
[ Upstream commit 4a059559809fd1ddbf16f847c4d2237309c08edf ]
Fix a wrong error return by dropping an error return.
When vidi driver is remvoed, if ctx->raw_edid isn't same as fake_edid_info then only what we have to is to free ctx->raw_edid so that driver removing can work correctly - it's not an error case.
--- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_vidi.c +0 -2
@@ -480,8 +480,6 @@ static int vidi_remove(struct platform_device *pdev)if (ctx->raw_edid != (struct edid *)fake_edid_info) {kfree (ctx->raw_edid); ctx->raw_edid =NULL ; - -return -EINVAL ; }component_del (&pdev->dev, &vidi_component_ops);
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 23/26 drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
In reply to Greg Kroah-HartmanFrom: Min Li <[email protected]>
[ Upstream commit 48bfd02569f5db49cc033f259e66d57aa6efc9a3 ]
If it is async, runqueue_node is freed in g2d_runqueue_worker on another worker thread. So in extreme cases, if g2d_runqueue_worker runs first, and then executes the following if statement, there will be use-after-free.
--- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/exynos/exynos_drm_g2d.c +1 -1
@@ -1387,7 +1387,7 @@ int exynos_g2d_exec_ioctl(struct drm_device *drm_dev, void *data,/* Let the runqueue know that there is work to do. */ queue_work (g2d->g2d_workq, &g2d->runqueue_work); -if (runqueue_node->async) +if (req->async) goto out;wait_for_completion (&runqueue_node->complete);
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 24/26 drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
In reply to Greg Kroah-HartmanFrom: Min Li <[email protected]>
[ Upstream commit 982b173a6c6d9472730c3116051977e05d17c8c5 ]
Userspace can race to free the gobj(robj converted from), robj should not be accessed again after drm_gem_object_put, otherwith it will result in use-after-free.
--- drivers/gpu/drm/radeon/radeon_gem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_gem.c +1 -3
@@ -376,7 +376,6 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,struct radeon_device *rdev = dev->dev_private;struct drm_radeon_gem_set_domain *args = data;struct drm_gem_object *gobj; -struct radeon_bo *robj;int r;/* for now if someone requests domain CPU -
@@ -389,13 +388,12 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,up_read (&rdev->exclusive_lock);return -ENOENT ; } - robj =gem_to_radeon_bo (gobj); r =radeon_gem_set_domain (gobj, args->read_domains, args->write_domain);drm_gem_object_put_unlocked (gobj);up_read (&rdev->exclusive_lock); - r =radeon_gem_handle_lockup (robj->rdev, r); + r =radeon_gem_handle_lockup (rdev, r);return r; }
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 25/26 x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
In reply to Greg Kroah-HartmanFrom: Dheeraj Kumar Srivastava <[email protected]>
[ Upstream commit 85d38d5810e285d5aec7fb5283107d1da70c12a9 ]
When booting with "intremap=off" and "x2apic_phys" on the kernel command line, the physical x2APIC driver ends up being used even when x2APIC mode is disabled ("intremap=off" disables x2APIC mode). This happens because the first compound condition check in x2apic_phys_probe() is false due to x2apic_mode == 0 and so the following one returns true after default_acpi_madt_oem_check() having already selected the physical x2APIC driver.
This results in the following panic:
kernel BUG at arch/x86/kernel/apic/io_apic.c:2409! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-rc2-ver4.1rc2 #2
Hardware name: Dell Inc. PowerEdge R6515/07PXPY, BIOS 2.3.6 07/06/2021
RIP: 0010:setup_IO_APIC+0x9c/0xaf0
Call Trace:
<TASK>
? native_read_msr
apic_intr_mode_init
x86_late_time_init
start_kernel
x86_64_start_reservations
x86_64_start_kernel
secondary_startup_64_no_verify
</TASK>which is:
setup_IO_APIC:
apic_printk(APIC_VERBOSE, "ENABLING IO-APIC IRQs\n"); for_each_ioapic(ioapic)
BUG_ON(mp_irqdomain_create(ioapic));
Return 0 to denote that x2APIC has not been enabled when probing the physical x2APIC driver.
[ bp: Massage commit message heavily. ]
--- arch/x86/kernel/apic/x2apic_phys.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/x86/kernel/apic/x2apic_phys.c +4 -1
@@ -95,7 +95,10 @@ static void init_x2apic_ldr(void)static int x2apic_phys_probe (void ) { -if (x2apic_mode && (x2apic_phys ||x2apic_fadt_phys ())) +if (!x2apic_mode) +return 0 ; + +if (x2apic_phys ||x2apic_fadt_phys ())return 1 ;return apic == &apic_x2apic_phys;
Signature · 1 line
2.39.2
Greg Kroah-Hartman
maintainerPATCH 26/26 i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
In reply to Greg Kroah-HartmanFrom: Clark Wang <[email protected]>
[ Upstream commit e69b9bc170c6d93ee375a5cbfd15f74c0fb59bdd ]
Claim clkhi and clklo as integer type to avoid possible calculation errors caused by data overflow.
--- drivers/i2c/busses/i2c-imx-lpi2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-imx-lpi2c.c +2 -2
@@ -215,8 +215,8 @@ static void lpi2c_imx_stop(struct lpi2c_imx_struct *lpi2c_imx)/* CLKLO = I2C_CLK_RATIO * CLKHI, SETHOLD = CLKHI, DATAVD = CLKHI/2 */ static int lpi2c_imx_config (struct lpi2c_imx_struct *lpi2c_imx) { -u8 prescale, filt, sethold, clkhi, clklo, datavd; -unsigned int clk_rate, clk_cycle; +u8 prescale, filt, sethold, datavd; +unsigned int clk_rate, clk_cycle, clkhi, clklo;enum lpi2c_imx_pincfg pincfg;unsigned int temp;
Signature · 1 line
2.39.2
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.320 release. There are 26 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 Wed, 28 Jun 2023 18:07:23 +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.14.320-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.14.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v4.14:
8 builds: 8 pass, 0 fail
16 boots: 16 pass, 0 fail
32 tests: 32 pass, 0 failLinux version: 4.14.320-rc1-g11aa1c2697f5
Boards tested: tegra124-jetson-tk1, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04
Jon
Hello Greg,
Quoted 10 lines
From: Greg Kroah-Hartman <[email protected]>
Sent: Monday, June 26, 2023 7:11 PMThis is the start of the stable review cycle for the 4.14.320 release. There are 26 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 Wed, 28 Jun 2023 18:07:23 +0000. Anything received after that time might be too late.
Thank you for the release!
CIP configurations built and booted okay with Linux 4.14.320-rc1 (11aa1c2697f5):
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/pipelines/912373156
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/commits/linux-4.14.y
Kind regards, Chris
Hi Greg,
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.320 release. There are 26 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 Wed, 28 Jun 2023 18:07:23 +0000. Anything received after that time might be too late.
No problems seen on aarch64.
Thanks,
Harshit
Quoted 10 lines
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.320-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.14.y
and the diffstat can be found below.thanks,
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.320 release. There are 26 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 Wed, 28 Jun 2023 18:07:23 +0000. Anything received after that time might be too late.
Build results:
total: 166 pass: 166 fail: 0 Qemu test results: total: 430 pass: 430 fail: 0
Guenter
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.14.320 release. There are 26 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 Wed, 28 Jun 2023 18:07:23 +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.14.320-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.14.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.14.320-rc1
* git: https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc
* git branch: linux-4.14.y
* git commit: 11aa1c2697f51ec92ee0c9033b8bce9e13b71787
* git describe: v4.14.319-27-g11aa1c2697f5
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.14.y/build/v4.14.319-27-g11aa1c2697f5
## Test Regressions (compared to v4.14.314-117-g854d9237fbd3)
## Metric Regressions (compared to v4.14.314-117-g854d9237fbd3)
## Test Fixes (compared to v4.14.314-117-g854d9237fbd3)
## Metric Fixes (compared to v4.14.314-117-g854d9237fbd3)
## Test result summary
total: 61334, pass: 48370, fail: 2047, skip: 10872, xfail: 45
## Build Summary
* arc: 10 total, 10 passed, 0 failed
* arm: 108 total, 104 passed, 4 failed
* arm64: 35 total, 31 passed, 4 failed
* i386: 21 total, 18 passed, 3 failed
* mips: 21 total, 21 passed, 0 failed
* parisc: 3 total, 3 passed, 0 failed
* powerpc: 8 total, 7 passed, 1 failed
* s390: 6 total, 5 passed, 1 failed
* sh: 12 total, 12 passed, 0 failed
* sparc: 6 total, 6 passed, 0 failed
* x86_64: 27 total, 23 passed, 4 failed
## Test suites summary
* boot
* kselftest-android
* kselftest-arm64
* kselftest-breakpoints
* kselftest-capabilities
* kselftest-cgroup
* kselftest-clone3
* kselftest-core
* kselftest-cpu-hotplug
* kselftest-cpufreq
* kselftest-drivers-dma-buf
* kselftest-efivarfs
* kselftest-filesystems
* kselftest-filesystems-binderfs
* kselftest-firmware
* kselftest-fpu
* kselftest-ftrace
* kselftest-futex
* kselftest-gpio
* kselftest-intel_pstate
* kselftest-ipc
* kselftest-ir
* kselftest-kcmp
* kselftest-kexec
* kselftest-lib
* kselftest-livepatch
* kselftest-membarrier
* kselftest-net
* kselftest-net-forwarding
* kselftest-net-mptcp
* kselftest-netfilter
* kselftest-nsfs
* 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-tc-testing
* kselftest-timens
* kselftest-timers
* kselftest-tmpfs
* kselftest-tpm2
* kselftest-user
* kselftest-x86
* kselftest-zram
* kunit
* libhugetlbfs
* log-parser-boot
* log-parser-test
* ltp-cap_bounds
* ltp-commands
* ltp-containers
* ltp-controllers
* ltp-crypto
* ltp-cve
* ltp-fcntl-locktests
* ltp-filecaps
* ltp-fs
* ltp-fs_bind
* ltp-fs_perms_simple
* ltp-fsx
* ltp-hugetlb
* ltp-io
* ltp-ipc
* ltp-math
* ltp-mm
* ltp-nptl
* ltp-pty
* ltp-sched
* ltp-securebits
* ltp-smoke
* ltp-syscalls
* ltp-tracing
* rcutorture
* v4l2-compliance
--
Linaro LKFT
https://lkft.linaro.org
Known bad patches from AUTOSEL was Re: [PATCH 4.14 00/26] 4.14.320-rc1 review
In reply to Greg Kroah-HartmanHi!
Quoted 4 lines
This is the start of the stable review cycle for the 4.14.320 release. There are 26 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.
Yeah, so this one is known bad, and I pointed that out before. Why is it in stable now? (*) You can't return int from function returning void.
Quoted 2 lines
Helge Deller <[email protected]>
fbdev: imsttfb: Release framebuffer and dealloc cmap on error path
These don't belong to stable, either. Explantions went out as replies to them.
Quoted 4 lines
Marc Zyngier <[email protected]>
arm64: Add missing Set/Way CMO encodings
Osama Muhammad <[email protected]>
nfcsim.c: Fix error checking fordebugfs_create_dir
Best regards,
Pavel
(*) I even searched the archives to make sure my message went out. It seems it did. https://www.spinics.net/lists/stable/msg660667.html
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Erika Unter HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany