4.19.202-rc1 review
Subsystems (3)
Greg Kroah-Hartman
maintainercover 4.19.202-rc1 review
This is the start of the stable review cycle for the 4.19.202 release. There are 16 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, 08 Aug 2021 08:11:03 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.202-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.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.19.202-rc1
Daniel Jordan <[email protected]>
padata: add separate cpuhp node for CPUHP_PADATA_DEAD
Daniel Jordan <[email protected]>
padata: validate cpumask without removed CPU during offline
Greg Kroah-Hartman <[email protected]>
Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout"
Sudeep Holla <[email protected]>
firmware: arm_scmi: Ensure drivers provide a probe function
Jani Nikula <[email protected]>
drm/i915: Ensure intel_engine_init_execlist() builds with Clang
Greg Kroah-Hartman <[email protected]>
Revert "Bluetooth: Shutdown controller after workqueues are flushed or cancelled"
Greg Kroah-Hartman <[email protected]>
Revert "spi: mediatek: fix fifo rx mode"
Christoph Hellwig <[email protected]>
bdi: add a ->dev_name field to struct backing_dev_info
Yufen Yu <[email protected]>
bdi: use bdi_dev_name() to get device name
Christoph Hellwig <[email protected]>
bdi: move bdi_dev_name out of line
Pravin B Shelar <[email protected]>
net: Fix zero-copy head len calculation.
Jia He <[email protected]>
qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
Takashi Iwai <[email protected]>
r8152: Fix potential PM refcount imbalance
Kyle Russell <[email protected]>
ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits
Axel Lin <[email protected]>
regulator: rt5033: Fix n_voltages settings for BUCK and LDO
Goldwyn Rodrigues <[email protected]>
btrfs: mark compressed range uptodate only if all bio succeed
-------------
Diffstat:
Makefile | 4 ++-- block/bfq-iosched.c | 6 ++++-- block/blk-cgroup.c | 2 +- drivers/firmware/arm_scmi/bus.c | 3 +++ drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 23 +++++++++++++++++------ drivers/net/usb/r8152.c | 3 ++- drivers/spi/spi-mt65xx.c | 16 +++------------- drivers/watchdog/iTCO_wdt.c | 12 +++--------- fs/btrfs/compression.c | 3 +-- fs/ceph/debugfs.c | 2 +- include/linux/backing-dev-defs.h | 1 + include/linux/backing-dev.h | 9 +-------- include/linux/cpuhotplug.h | 1 + include/linux/mfd/rt5033-private.h | 4 ++-- include/linux/padata.h | 6 ++++-- include/trace/events/wbt.h | 8 ++++---- kernel/padata.c | 28 ++++++++++++++++++++-------- mm/backing-dev.c | 13 +++++++++++-- net/bluetooth/hci_core.c | 16 ++++++++-------- net/core/skbuff.c | 5 ++++- sound/soc/codecs/tlv320aic31xx.h | 4 ++-- 22 files changed, 96 insertions(+), 75 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 1/16 btrfs: mark compressed range uptodate only if all bio succeed
From: Goldwyn Rodrigues <[email protected]>
[ Upstream commit 240246f6b913b0c23733cfd2def1d283f8cc9bbe ]
In compression write endio sequence, the range which the compressed_bio writes is marked as uptodate if the last bio of the compressed (sub)bios is completed successfully. There could be previous bio which may have failed which is recorded in cb->errors.
Set the writeback range as uptodate only if cb->errors is zero, as opposed to checking only the last bio's status.
Backporting notes: in all versions up to 4.4 the last argument is always replaced by "!cb->errors".
--- fs/btrfs/compression.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/btrfs/compression.c +1 -2
@@ -270,8 +270,7 @@ static void end_compressed_bio_write(struct bio *bio) cb->start, cb->start + cb->len -1 ,NULL , - bio->bi_status ? - BLK_STS_OK : BLK_STS_NOTSUPP); + !cb->errors); cb->compressed_pages[0 ]->mapping =NULL ;end_compressed_writeback (inode, cb);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 2/16 regulator: rt5033: Fix n_voltages settings for BUCK and LDO
In reply to Greg Kroah-HartmanFrom: Axel Lin <[email protected]>
[ Upstream commit 6549c46af8551b346bcc0b9043f93848319acd5c ]
For linear regulators, the n_voltages should be (max - min) / step + 1.
Buck voltage from 1v to 3V, per step 100mV, and vout mask is 0x1f. If value is from 20 to 31, the voltage will all be fixed to 3V. And LDO also, just vout range is different from 1.2v to 3v, step is the same. If value is from 18 to 31, the voltage will also be fixed to 3v.
--- include/linux/mfd/rt5033-private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/mfd/rt5033-private.h +2 -2
@@ -203,13 +203,13 @@ enum rt5033_reg {#define RT5033_REGULATOR_BUCK_VOLTAGE_MIN 1000000U#define RT5033_REGULATOR_BUCK_VOLTAGE_MAX 3000000U#define RT5033_REGULATOR_BUCK_VOLTAGE_STEP 100000U -#define RT5033_REGULATOR_BUCK_VOLTAGE_STEP_NUM 32 +#define RT5033_REGULATOR_BUCK_VOLTAGE_STEP_NUM 21/* RT5033 regulator LDO output voltage uV */ #define RT5033_REGULATOR_LDO_VOLTAGE_MIN 1200000U#define RT5033_REGULATOR_LDO_VOLTAGE_MAX 3000000U#define RT5033_REGULATOR_LDO_VOLTAGE_STEP 100000U -#define RT5033_REGULATOR_LDO_VOLTAGE_STEP_NUM 32 +#define RT5033_REGULATOR_LDO_VOLTAGE_STEP_NUM 19/* RT5033 regulator SAFE LDO output voltage uV */ #define RT5033_REGULATOR_SAFE_LDO_VOLTAGE 4900000U
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 3/16 ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits
In reply to Greg Kroah-HartmanFrom: Kyle Russell <[email protected]>
[ Upstream commit 9cf76a72af6ab81030dea6481b1d7bdd814fbdaf ]
These are backwards from Table 7-71 of the TLV320AIC3100 spec [1].
This was broken in 12eb4d66ba2e when BCLK_MASTER and WCLK_MASTER were converted from 0x08 and 0x04 to BIT(2) and BIT(3), respectively.
-#define AIC31XX_BCLK_MASTER 0x08
-#define AIC31XX_WCLK_MASTER 0x04
+#define AIC31XX_BCLK_MASTER BIT(2)
+#define AIC31XX_WCLK_MASTER BIT(3)
Probably just a typo since the defines were not listed in bit order.
[1] https://www.ti.com/lit/gpn/tlv320aic3100
--- sound/soc/codecs/tlv320aic31xx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/tlv320aic31xx.h +2 -2
@@ -147,8 +147,8 @@ struct aic31xx_pdata {#define AIC31XX_WORD_LEN_24BITS 0x02#define AIC31XX_WORD_LEN_32BITS 0x03#define AIC31XX_IFACE1_MASTER_MASK GENMASK(3, 2) -#define AIC31XX_BCLK_MASTER BIT(2) -#define AIC31XX_WCLK_MASTER BIT(3) +#define AIC31XX_BCLK_MASTER BIT(3) +#define AIC31XX_WCLK_MASTER BIT(2)/* AIC31XX_DATA_OFFSET */ #define AIC31XX_DATA_OFFSET_MASK GENMASK(7, 0)
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 4/16 r8152: Fix potential PM refcount imbalance
In reply to Greg Kroah-HartmanFrom: Takashi Iwai <[email protected]>
[ Upstream commit 9c23aa51477a37f8b56c3c40192248db0663c196 ]
rtl8152_close() takes the refcount via usb_autopm_get_interface() but it doesn't release when RTL8152_UNPLUG test hits. This may lead to the imbalance of PM refcount. This patch addresses it.
--- drivers/net/usb/r8152.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/usb/r8152.c +2 -1
@@ -3960,9 +3960,10 @@ static int rtl8152_close(struct net_device *netdev) tp->rtl_ops.down (tp);mutex_unlock (&tp->control); + } +if (!res)usb_autopm_put_interface (tp->intf); - }free_all_mem (tp);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 5/16 qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union()
In reply to Greg Kroah-HartmanFrom: Jia He <[email protected]>
[ Upstream commit 6206b7981a36476f4695d661ae139f7db36a802d ]
Liajian reported a bug_on hit on a ThunderX2 arm64 server with FastLinQ QL41000 ethernet controller:
BUG: scheduling while atomic: kworker/0:4/531/0x00000200 [qed_probe:488()]hw prepare failed kernel BUG at mm/vmalloc.c:2355! Internal error: Oops - BUG: 0 [#1] SMP CPU: 0 PID: 531 Comm: kworker/0:4 Tainted: G W 5.4.0-77-generic #86-Ubuntu pstate: 00400009 (nzcv daif +PAN -UAO) Call trace: vunmap+0x4c/0x50 iounmap+0x48/0x58 qed_free_pci+0x60/0x80 [qed] qed_probe+0x35c/0x688 [qed] __qede_probe+0x88/0x5c8 [qede] qede_probe+0x60/0xe0 [qede] local_pci_probe+0x48/0xa0 work_for_cpu_fn+0x24/0x38 process_one_work+0x1d0/0x468 worker_thread+0x238/0x4e0 kthread+0xf0/0x118 ret_from_fork+0x10/0x18
In this case, qed_hw_prepare() returns error due to hw/fw error, but in theory work queue should be in process context instead of interrupt.
The root cause might be the unpaired spin_{un}lock_bh() in _qed_mcp_cmd_and_union(), which causes botton half is disabled incorrectly.
--- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-)
drivers/net/ethernet/qlogic/qed/qed_mcp.c +17 -6
@@ -498,14 +498,18 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,spin_lock_bh (&p_hwfn->mcp_info->cmd_lock); -if (!qed_mcp_has_pending_cmd (p_hwfn)) +if (!qed_mcp_has_pending_cmd (p_hwfn)) { +spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);break ; + } rc =qed_mcp_update_pending_cmd (p_hwfn, p_ptt); -if (!rc) +if (!rc) { +spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);break ; -else if (rc != -EAGAIN ) + }else if (rc != -EAGAIN ) { goto err; + }spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);
@@ -522,6 +526,8 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,return -EAGAIN ; } +spin_lock_bh (&p_hwfn->mcp_info->cmd_lock); +/* Send the mailbox command */ qed_mcp_reread_offsets (p_hwfn, p_ptt); seq_num = ++p_hwfn->mcp_info->drv_mb_seq;
@@ -548,14 +554,18 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,spin_lock_bh (&p_hwfn->mcp_info->cmd_lock); -if (p_cmd_elem->b_is_completed) +if (p_cmd_elem->b_is_completed) { +spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);break ; + } rc =qed_mcp_update_pending_cmd (p_hwfn, p_ptt); -if (!rc) +if (!rc) { +spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);break ; -else if (rc != -EAGAIN ) + }else if (rc != -EAGAIN ) { goto err; + }spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock); }while (++cnt < max_retries);
@@ -576,6 +586,7 @@ _qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,return -EAGAIN ; } +spin_lock_bh (&p_hwfn->mcp_info->cmd_lock);qed_mcp_cmd_del_elem (p_hwfn, p_cmd_elem);spin_unlock_bh (&p_hwfn->mcp_info->cmd_lock);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 6/16 net: Fix zero-copy head len calculation.
In reply to Greg Kroah-HartmanFrom: Pravin B Shelar <[email protected]>
[ Upstream commit a17ad0961706244dce48ec941f7e476a38c0e727 ]
In some cases skb head could be locked and entire header data is pulled from skb. When skb_zerocopy() called in such cases, following BUG is triggered. This patch fixes it by copying entire skb in such cases.
This could be optimized incase this is performance bottleneck.
---8<---
kernel BUG at net/core/skbuff.c:2961!
invalid opcode: 0000 [#1] SMP PTI
CPU: 2 PID: 0 Comm: swapper/2 Tainted: G OE 5.4.0-77-generic #86-Ubuntu Hardware name: OpenStack Foundation OpenStack Nova, BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:skb_zerocopy+0x37a/0x3a0 RSP: 0018:ffffbcc70013ca38 EFLAGS: 00010246 Call Trace: <IRQ> queue_userspace_packet+0x2af/0x5e0 [openvswitch] ovs_dp_upcall+0x3d/0x60 [openvswitch] ovs_dp_process_packet+0x125/0x150 [openvswitch] ovs_vport_receive+0x77/0xd0 [openvswitch] netdev_port_receive+0x87/0x130 [openvswitch] netdev_frame_hook+0x4b/0x60 [openvswitch] __netif_receive_skb_core+0x2b4/0xc90 __netif_receive_skb_one_core+0x3f/0xa0 __netif_receive_skb+0x18/0x60 process_backlog+0xa9/0x160 net_rx_action+0x142/0x390 __do_softirq+0xe1/0x2d6 irq_exit+0xae/0xb0 do_IRQ+0x5a/0xf0 common_interrupt+0xf/0xf
Code that triggered BUG:
intskb_zerocopy(struct sk_buff *to, struct sk_buff *from, int len, int hlen)
{
int i, j = 0;
int plen = 0; /* length of skb->head fragment */
int ret;
struct page *page;
unsigned int offset;
BUG_ON(!from->head_frag && !hlen);--- net/core/skbuff.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/core/skbuff.c +4 -1
@@ -2705,8 +2705,11 @@ skb_zerocopy_headlen(const struct sk_buff *from)if (!from->head_frag ||skb_headlen (from) <L1_CACHE_BYTES || -skb_shinfo (from)->nr_frags >=MAX_SKB_FRAGS ) +skb_shinfo (from)->nr_frags >=MAX_SKB_FRAGS ) { hlen =skb_headlen (from); +if (!hlen) + hlen = from->len; + }if (skb_has_frag_list (from)) hlen = from->len;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 7/16 bdi: move bdi_dev_name out of line
In reply to Greg Kroah-HartmanFrom: Christoph Hellwig <[email protected]>
[ Upstream commit eb7ae5e06bb6e6ac6bb86872d27c43ebab92f6b2 ]
bdi_dev_name is not a fast path function, move it out of line. This prepares for using it from modular callers without having to export an implementation detail like bdi_unknown_name.
--- include/linux/backing-dev.h | 9 +-------- mm/backing-dev.c | 10 +++++++++- 2 files changed, 10 insertions(+), 9 deletions(-)
include/linux/backing-dev.h +1 -8
@@ -499,13 +499,6 @@ static inline int bdi_rw_congested(struct backing_dev_info *bdi) (1 << WB_async_congested)); } -extern const char *bdi_unknown_name; - -static inline const char *bdi_dev_name (struct backing_dev_info *bdi) -{ -if (!bdi || !bdi->dev) -return bdi_unknown_name; -return dev_name (bdi->dev); -} +const char *bdi_dev_name (struct backing_dev_info *bdi);#endif /* _LINUX_BACKING_DEV_H */
mm/backing-dev.c +9 -1
@@ -19,7 +19,7 @@ struct backing_dev_info noop_backing_dev_info = {EXPORT_SYMBOL_GPL (noop_backing_dev_info);static struct class *bdi_class; -const char *bdi_unknown_name ="(unknown)" ; +static const char *bdi_unknown_name ="(unknown)" ;/* * bdi_lock protects updates to bdi_list. bdi_list has RCU reader side
@@ -976,6 +976,14 @@ void bdi_put(struct backing_dev_info *bdi) }EXPORT_SYMBOL (bdi_put); +const char *bdi_dev_name (struct backing_dev_info *bdi) +{ +if (!bdi || !bdi->dev) +return bdi_unknown_name; +return dev_name (bdi->dev); +} +EXPORT_SYMBOL_GPL (bdi_dev_name); +static wait_queue_head_t congestion_wqh[2 ] = {__WAIT_QUEUE_HEAD_INITIALIZER (congestion_wqh[0 ]),__WAIT_QUEUE_HEAD_INITIALIZER (congestion_wqh[1 ])
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 8/16 bdi: use bdi_dev_name() to get device name
In reply to Greg Kroah-HartmanFrom: Yufen Yu <[email protected]>
[ Upstream commit d51cfc53ade3189455a1b88ec7a2ff0c24597cf8 ]
Use the common interface bdi_dev_name() to get device name.
Add missing <linux/backing-dev.h> include BFQ
--- block/bfq-iosched.c | 6 ++++-- block/blk-cgroup.c | 2 +- fs/ceph/debugfs.c | 2 +- include/trace/events/wbt.h | 8 ++++---- 4 files changed, 10 insertions(+), 8 deletions(-)
block/bfq-iosched.c +4 -2
@@ -132,6 +132,7 @@#include <linux/ioprio.h> #include <linux/sbitmap.h> #include <linux/delay.h> +#include <linux/backing-dev.h> #include "blk.h" #include "blk-mq.h"
@@ -4212,8 +4213,9 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic) ioprio_class =IOPRIO_PRIO_CLASS (bic->ioprio);switch (ioprio_class) {default : -dev_err (bfqq->bfqd->queue->backing_dev_info->dev, -"bfq: bad prio class %d\n" , ioprio_class); +pr_err ("bdi %s: bfq: bad prio class %d\n" , +bdi_dev_name (bfqq->bfqd->queue->backing_dev_info), + ioprio_class);/* fall through */ case IOPRIO_CLASS_NONE :/*
block/blk-cgroup.c +1 -1
@@ -474,7 +474,7 @@ const char *blkg_dev_name(struct blkcg_gq *blkg) {/* some drivers (floppy) instantiate a queue w/o disk registered */ if (blkg->q->backing_dev_info->dev) -return dev_name (blkg->q->backing_dev_info->dev); +return bdi_dev_name (blkg->q->backing_dev_info);return NULL ; }EXPORT_SYMBOL_GPL (blkg_dev_name);
fs/ceph/debugfs.c +1 -1
@@ -251,7 +251,7 @@ int ceph_fs_debugfs_init(struct ceph_fs_client *fsc) goto out;snprintf (name,sizeof (name),"../../bdi/%s" , -dev_name (fsc->sb->s_bdi->dev)); +bdi_dev_name (fsc->sb->s_bdi)); fsc->debugfs_bdi = debugfs_create_symlink("bdi", fsc->client->debugfs_dir,
include/trace/events/wbt.h +4 -4
@@ -33,7 +33,7 @@ TRACE_EVENT(wbt_stat, ),TP_fast_assign ( -strlcpy (__entry->name,dev_name (bdi->dev), +strlcpy (__entry->name,bdi_dev_name (bdi), ARRAY_SIZE(__entry->name)); __entry->rmean = stat[0 ].mean; __entry->rmin = stat[0 ].min;
@@ -68,7 +68,7 @@ TRACE_EVENT(wbt_lat, ),TP_fast_assign ( -strlcpy (__entry->name,dev_name (bdi->dev), +strlcpy (__entry->name,bdi_dev_name (bdi), ARRAY_SIZE(__entry->name)); __entry->lat =div_u64 (lat,1000 ); ),
@@ -105,7 +105,7 @@ TRACE_EVENT(wbt_step, ),TP_fast_assign ( -strlcpy (__entry->name,dev_name (bdi->dev), +strlcpy (__entry->name,bdi_dev_name (bdi), ARRAY_SIZE(__entry->name)); __entry->msg = msg; __entry->step = step;
@@ -141,7 +141,7 @@ TRACE_EVENT(wbt_timer, ),TP_fast_assign ( -strlcpy (__entry->name,dev_name (bdi->dev), +strlcpy (__entry->name,bdi_dev_name (bdi), ARRAY_SIZE(__entry->name)); __entry->status = status; __entry->step = step;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 9/16 bdi: add a ->dev_name field to struct backing_dev_info
In reply to Greg Kroah-HartmanFrom: Christoph Hellwig <[email protected]>
[ Upstream commit 6bd87eec23cbc9ed222bed0f5b5b02bf300e9a8d ]
Cache a copy of the name for the life time of the backing_dev_info structure so that we can reference it even after unregistering.
--- include/linux/backing-dev-defs.h | 1 + mm/backing-dev.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-)
include/linux/backing-dev-defs.h +1 -0
@@ -197,6 +197,7 @@ struct backing_dev_info {wait_queue_head_t wb_waitq;struct device *dev; +char dev_name[64 ];struct device *owner;struct timer_list laptop_mode_wb_timer;
mm/backing-dev.c +3 -2
@@ -880,7 +880,8 @@ int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args)if (bdi->dev)/* The driver needs to use separate queues per device */ return 0 ; - dev =device_create_vargs (bdi_class,NULL ,MKDEV (0 ,0 ), bdi, fmt, args); +vsnprintf (bdi->dev_name,sizeof (bdi->dev_name), fmt, args); + dev =device_create (bdi_class,NULL ,MKDEV (0 ,0 ), bdi, bdi->dev_name);if (IS_ERR (dev))return PTR_ERR (dev);
@@ -980,7 +981,7 @@ const char *bdi_dev_name(struct backing_dev_info *bdi) {if (!bdi || !bdi->dev)return bdi_unknown_name; -return dev_name (bdi->dev); +return bdi->dev_name; }EXPORT_SYMBOL_GPL (bdi_dev_name);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 10/16 Revert "spi: mediatek: fix fifo rx mode"
In reply to Greg Kroah-HartmanFrom: Greg Kroah-Hartman <[email protected]>
This reverts commit bd0447f72de0963129612bf18202204d5b25e133 which is commit 3a70dd2d050331ee4cf5ad9d5c0a32d83ead9a43 upstream.
It has been found to have problems.
--- drivers/spi/spi-mt65xx.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-)
drivers/spi/spi-mt65xx.c +3 -13
@@ -392,23 +392,13 @@ static int mtk_spi_fifo_transfer(structmtk_spi_setup_packet (master); cnt = xfer->len /4 ; -if (xfer->tx_buf) -iowrite32_rep (mdata->base +SPI_TX_DATA_REG , xfer->tx_buf, cnt); - -if (xfer->rx_buf) -ioread32_rep (mdata->base +SPI_RX_DATA_REG , xfer->rx_buf, cnt); +iowrite32_rep (mdata->base +SPI_TX_DATA_REG , xfer->tx_buf, cnt); remainder = xfer->len %4 ;if (remainder >0 ) { reg_val =0 ; -if (xfer->tx_buf) { -memcpy (®_val, xfer->tx_buf + (cnt *4 ), remainder); -writel (reg_val, mdata->base +SPI_TX_DATA_REG ); - } -if (xfer->rx_buf) { - reg_val =readl (mdata->base +SPI_RX_DATA_REG ); -memcpy (xfer->rx_buf + (cnt *4 ), ®_val, remainder); - } +memcpy (®_val, xfer->tx_buf + (cnt *4 ), remainder); +writel (reg_val, mdata->base +SPI_TX_DATA_REG ); }mtk_spi_enable_transfer (master);
Greg Kroah-Hartman
maintainerPATCH 11/16 Revert "Bluetooth: Shutdown controller after workqueues are flushed or cancelled"
In reply to Greg Kroah-HartmanFrom: Greg Kroah-Hartman <[email protected]>
This reverts commit 78b03389d2773255ceaf051f2dca134b816d96f2 which is commit 0ea9fd001a14ebc294f112b0361a4e601551d508 upstream.
It has been reported to have problems:
https://lore.kernel.org/linux-bluetooth/[email protected]/
--- net/bluetooth/hci_core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
net/bluetooth/hci_core.c +8 -8
@@ -1609,6 +1609,14 @@ int hci_dev_do_close(struct hci_dev *hdeBT_DBG ("%s %p" , hdev->name, hdev); +if (!hci_dev_test_flag (hdev,HCI_UNREGISTER ) && + !hci_dev_test_flag (hdev,HCI_USER_CHANNEL ) && +test_bit (HCI_UP , &hdev->flags)) { +/* Execute vendor specific shutdown routine */ +if (hdev->shutdown) + hdev->shutdown (hdev); + } +cancel_delayed_work (&hdev->power_off);hci_request_cancel_all (hdev);
@@ -1682,14 +1690,6 @@ int hci_dev_do_close(struct hci_dev *hdeclear_bit (HCI_INIT , &hdev->flags); } -if (!hci_dev_test_flag (hdev,HCI_UNREGISTER ) && - !hci_dev_test_flag (hdev,HCI_USER_CHANNEL ) && -test_bit (HCI_UP , &hdev->flags)) { -/* Execute vendor specific shutdown routine */ -if (hdev->shutdown) - hdev->shutdown (hdev); - } -/* flush cmd work */ flush_work (&hdev->cmd_work);
Greg Kroah-Hartman
maintainerPATCH 12/16 drm/i915: Ensure intel_engine_init_execlist() builds with Clang
In reply to Greg Kroah-HartmanFrom: Jani Nikula <[email protected]>
commit 410ed5731a6566498a3aa904420aa2e49ba0ba90 upstream.
Clang build with UBSAN enabled leads to the following build error:
drivers/gpu/drm/i915/intel_engine_cs.o: In function `intel_engine_init_execlist':drivers/gpu/drm/i915/intel_engine_cs.c:411: undefined reference to `__compiletime_assert_411'
Again, for this to work the code would first need to be inlined and then constant folded, which doesn't work for Clang because semantic analysis happens before optimization/inlining.
Use GEM_BUG_ON() instead of BUILD_BUG_ON().
v2: Use is_power_of_2() from log2.h (Chris)
--- drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_engine_cs.c +1 -1
@@ -463,7 +463,7 @@ static void intel_engine_init_execlist(sstruct intel_engine_execlists *const execlists = &engine->execlists; execlists->port_mask =1 ; -BUILD_BUG_ON_NOT_POWER_OF_2 (execlists_num_ports (execlists)); +GEM_BUG_ON (!is_power_of_2 (execlists_num_ports (execlists)));GEM_BUG_ON (execlists_num_ports (execlists) >EXECLIST_MAX_PORTS ); execlists->queue_priority =INT_MIN ;
Greg Kroah-Hartman
maintainerPATCH 13/16 firmware: arm_scmi: Ensure drivers provide a probe function
In reply to Greg Kroah-HartmanFrom: Sudeep Holla <[email protected]>
commit 5e469dac326555d2038d199a6329458cc82a34e5 upstream.
The bus probe callback calls the driver callback without further checking. Better be safe than sorry and refuse registration of a driver without a probe function to prevent a NULL pointer exception.
--- drivers/firmware/arm_scmi/bus.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/firmware/arm_scmi/bus.c +3 -0
@@ -100,6 +100,9 @@ int scmi_driver_register(struct scmi_dri {int retval; +if (!driver->probe) +return -EINVAL ; + driver->driver.bus = &scmi_bus_type; driver->driver.name = driver->name; driver->driver.owner = owner;
Greg Kroah-Hartman
maintainerPATCH 14/16 Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout"
In reply to Greg Kroah-HartmanFrom: Greg Kroah-Hartman <[email protected]>
This reverts commit 5bfbacfeadf864cb23dfe66c610ed036d5e48879 which is commit cb011044e34c293e139570ce5c01aed66a34345c upstream.
It is reported to cause problems with systems and probably should not have been backported in the first place :(
--- drivers/watchdog/iTCO_wdt.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/watchdog/iTCO_wdt.c +3 -9
@@ -75,8 +75,6 @@#define TCOBASE (p) ((p)->tco_res->start)/* SMI Control and Enable Register */ #define SMI_EN (p) ((p)->smi_res->start) -#define TCO_EN (1 << 13) -#define GBL_SMI_EN (1 << 0)#define TCO_RLD (p) (TCOBASE(p) + 0x00)/* TCO Timer Reload/Curr. Value */ #define TCOv1_TMR (p) (TCOBASE(p) + 0x01)/* TCOv1 Timer Initial Value*/
@@ -332,12 +330,8 @@ static int iTCO_wdt_set_timeout(struct w tmrval =seconds_to_ticks (p, t); -/* -* If TCO SMIs are off, the timer counts down twice before rebooting. -* Otherwise, the BIOS generally reboots when the SMI triggers. -*/ -if (p->smi_res && - (SMI_EN (p) & (TCO_EN |GBL_SMI_EN )) != (TCO_EN |GBL_SMI_EN )) +/* For TCO v1 the timer counts down twice before rebooting */ +if (p->iTCO_version ==1 ) tmrval /=2 ;/* from the specs: */
@@ -499,7 +493,7 @@ static int iTCO_wdt_probe(struct platfor* Disables TCO logic generating an SMI# */ val32 =inl (SMI_EN (p)); - val32 &= ~TCO_EN ;/* Turn off SMI clearing watchdog */ + val32 &=0xffffdfff ;/* Turn off SMI clearing watchdog */ outl (val32,SMI_EN (p)); }
Greg Kroah-Hartman
maintainerPATCH 15/16 padata: validate cpumask without removed CPU during offline
In reply to Greg Kroah-HartmanFrom: Daniel Jordan <[email protected]>
commit 894c9ef9780c5cf2f143415e867ee39a33ecb75d upstream.
Configuring an instance's parallel mask without any online CPUs...
echo 2 > /sys/kernel/pcrypt/pencrypt/parallel_cpumask echo 0 > /sys/devices/system/cpu/cpu1/online
...makes tcrypt mode=215 crash like this:
divide error: 0000 [#1] SMP PTI
CPU: 4 PID: 283 Comm: modprobe Not tainted 5.4.0-rc8-padata-doc-v2+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20191013_105130-anatol 04/01/2014 RIP: 0010:padata_do_parallel+0x114/0x300 Call Trace: pcrypt_aead_encrypt+0xc0/0xd0 [pcrypt] crypto_aead_encrypt+0x1f/0x30 do_mult_aead_op+0x4e/0xdf [tcrypt] test_mb_aead_speed.constprop.0.cold+0x226/0x564 [tcrypt] do_test+0x28c2/0x4d49 [tcrypt] tcrypt_mod_init+0x55/0x1000 [tcrypt] ...
cpumask_weight() in padata_cpu_hash() returns 0 because the mask has no CPUs. The problem is __padata_remove_cpu() checks for valid masks too early and so doesn't mark the instance PADATA_INVALID as expected, which would have made padata_do_parallel() return error before doing the division.
Fix by introducing a second padata CPU hotplug state before CPUHP_BRINGUP_CPU so that __padata_remove_cpu() sees the online mask without @cpu. No need for the second argument to padata_replace() since @cpu is now already missing from the online mask.
--- include/linux/cpuhotplug.h | 1 + kernel/padata.c | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-)
include/linux/cpuhotplug.h +1 -0
@@ -59,6 +59,7 @@ enum cpuhp_state {CPUHP_IOMMU_INTEL_DEAD ,CPUHP_LUSTRE_CFS_DEAD ,CPUHP_AP_ARM_CACHE_B15_RAC_DEAD , +CPUHP_PADATA_DEAD ,CPUHP_WORKQUEUE_PREP ,CPUHP_POWER_NUMA_PREPARE , CPUHP_HRTIMERS_PREPARE,
kernel/padata.c +14 -4
@@ -682,7 +682,7 @@ static int __padata_remove_cpu(struct pa {struct parallel_data *pd =NULL ; -if (cpumask_test_cpu (cpu, cpu_online_mask)) { +if (!cpumask_test_cpu (cpu, cpu_online_mask)) {if (!padata_validate_cpumask (pinst, pinst->cpumask.pcpu) || !padata_validate_cpumask (pinst, pinst->cpumask.cbcpu))
@@ -758,7 +758,7 @@ static int padata_cpu_online(unsigned inreturn ret; } -static int padata_cpu_prep_down (unsigned int cpu,struct hlist_node *node) +static int padata_cpu_dead (unsigned int cpu,struct hlist_node *node) {struct padata_instance *pinst;int ret;
@@ -779,6 +779,7 @@ static enum cpuhp_state hp_online;static void __padata_free (struct padata_instance *pinst) {#ifdef CONFIG_HOTPLUG_CPU +cpuhp_state_remove_instance_nocalls (CPUHP_PADATA_DEAD , &pinst->node);cpuhp_state_remove_instance_nocalls (hp_online, &pinst->node);#endif
@@ -964,6 +965,8 @@ static struct padata_instance *padata_al#ifdef CONFIG_HOTPLUG_CPU cpuhp_state_add_instance_nocalls_cpuslocked (hp_online, &pinst->node); +cpuhp_state_add_instance_nocalls_cpuslocked (CPUHP_PADATA_DEAD , + &pinst->node);#endif return pinst;
@@ -1010,17 +1013,24 @@ static __init int padata_driver_init(voiint ret; ret =cpuhp_setup_state_multi (CPUHP_AP_ONLINE_DYN ,"padata:online" , - padata_cpu_online, - padata_cpu_prep_down); + padata_cpu_online,NULL );if (ret <0 )return ret; hp_online = ret; + + ret =cpuhp_setup_state_multi (CPUHP_PADATA_DEAD ,"padata:dead" , +NULL , padata_cpu_dead); +if (ret <0 ) { +cpuhp_remove_multi_state (hp_online); +return ret; + }return 0 ; }module_init (padata_driver_init); static __exit void padata_driver_exit(void) { +cpuhp_remove_multi_state (CPUHP_PADATA_DEAD );cpuhp_remove_multi_state (hp_online); }module_exit (padata_driver_exit);
Greg Kroah-Hartman
maintainerPATCH 16/16 padata: add separate cpuhp node for CPUHP_PADATA_DEAD
In reply to Greg Kroah-HartmanFrom: Daniel Jordan <[email protected]>
commit 3c2214b6027ff37945799de717c417212e1a8c54 upstream.
Removing the pcrypt module triggers this:
general protection fault, probably for non-canonical
address 0xdead000000000122
CPU: 5 PID: 264 Comm: modprobe Not tainted 5.6.0+ #2
Hardware name: QEMU Standard PC
RIP: 0010:__cpuhp_state_remove_instance+0xcc/0x120
Call Trace:
padata_sysfs_release+0x74/0xce
kobject_put+0x81/0xd0
padata_free+0x12/0x20
pcrypt_exit+0x43/0x8ee [pcrypt]padata instances wrongly use the same hlist node for the online and dead states, so __padata_free()'s second cpuhp remove call chokes on the node that the first poisoned.
cpuhp multi-instance callbacks only walk forward in cpuhp_step->list and the same node is linked in both the online and dead lists, so the list corruption that results from padata_alloc() adding the node to a second list without removing it from the first doesn't cause problems as long as no instances are freed.
Avoid the issue by giving each state its own node.
--- include/linux/padata.h | 6 ++++-- kernel/padata.c | 14 ++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-)
include/linux/padata.h +4 -2
@@ -138,7 +138,8 @@ struct parallel_data {/** * struct padata_instance - The overall control structure. * -* @cpu_notifier: cpu hotplug notifier. +* @cpu_online_node: Linkage for CPU online callback. +* @cpu_dead_node: Linkage for CPU offline callback. * @wq: The workqueue in use. * @pd: The internal control structure. * @cpumask: User supplied cpumasks for parallel and serial works.
@@ -150,7 +151,8 @@ struct parallel_data {* @flags: padata flags. */ struct padata_instance { -struct hlist_node node; +struct hlist_node cpu_online_node; +struct hlist_node cpu_dead_node;struct workqueue_struct *wq;struct parallel_data *pd;struct padata_cpumask cpumask;
kernel/padata.c +8 -6
@@ -748,7 +748,7 @@ static int padata_cpu_online(unsigned instruct padata_instance *pinst;int ret; - pinst = hlist_entry_safe(node, struct padata_instance, node); + pinst = hlist_entry_safe(node, struct padata_instance, cpu_online_node);if (!pinst_has_cpu (pinst, cpu))return 0 ;
@@ -763,7 +763,7 @@ static int padata_cpu_dead(unsigned intstruct padata_instance *pinst;int ret; - pinst = hlist_entry_safe(node, struct padata_instance, node); + pinst = hlist_entry_safe(node, struct padata_instance, cpu_dead_node);if (!pinst_has_cpu (pinst, cpu))return 0 ;
@@ -779,8 +779,9 @@ static enum cpuhp_state hp_online;static void __padata_free (struct padata_instance *pinst) {#ifdef CONFIG_HOTPLUG_CPU -cpuhp_state_remove_instance_nocalls (CPUHP_PADATA_DEAD , &pinst->node); -cpuhp_state_remove_instance_nocalls (hp_online, &pinst->node); +cpuhp_state_remove_instance_nocalls (CPUHP_PADATA_DEAD , + &pinst->cpu_dead_node); +cpuhp_state_remove_instance_nocalls (hp_online, &pinst->cpu_online_node);#endif padata_stop (pinst);
@@ -964,9 +965,10 @@ static struct padata_instance *padata_almutex_init (&pinst->lock);#ifdef CONFIG_HOTPLUG_CPU -cpuhp_state_add_instance_nocalls_cpuslocked (hp_online, &pinst->node); +cpuhp_state_add_instance_nocalls_cpuslocked (hp_online, + &pinst->cpu_online_node);cpuhp_state_add_instance_nocalls_cpuslocked (CPUHP_PADATA_DEAD , - &pinst->node); + &pinst->cpu_dead_node);#endif return pinst;
Hi!
Quoted 4 lines
This is the start of the stable review cycle for the 4.19.202 release. There are 16 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.
CIP testing did not find any problems here:
https://gitlab.com/cip-project/cip-testing/linux-stable-rc-ci/-/tree/linux-4.19.y
Best regards,
Pavel
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.202 release. There are 16 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, 08 Aug 2021 08:11:03 +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.19.202-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v4.19:
10 builds: 10 pass, 0 fail
22 boots: 22 pass, 0 fail
40 tests: 40 pass, 0 failLinux version: 4.19.202-rc1-g9c68cf432f4c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra30-cardhu-a04Jon
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.202 release. There are 16 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, 08 Aug 2021 08:11:03 +0000. Anything received after that time might be too late.
Build results:
total: 155 pass: 155 fail: 0 Qemu test results: total: 440 pass: 440 fail: 0
Guenter
Hi Greg,
Quoted 7 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.202 release. There are 16 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, 08 Aug 2021 08:11:03 +0000. Anything received after that time might be too late.
Build test:
mips (gcc version 11.1.1 20210723): 63 configs -> no failure arm (gcc version 11.1.1 20210723): 116 configs -> no new failure arm64 (gcc version 11.1.1 20210723): 2 configs -> no failure x86_64 (gcc version 10.2.1 20210110): 4 configs -> no failure
Boot test:x86_64: Booted on my test laptop. No regression.x86_64: Booted on qemu. No regression. [1]
[1]. https://openqa.qa.codethink.co.uk/tests/9
--
Regards
Sudip
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.19.202 release. There are 16 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, 08 Aug 2021 08:11:03 +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.19.202-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.19.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.19.202-rc1
* git: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
* git branch: linux-4.19.y
* git commit: 9c68cf432f4cb6091ecc834b0e3a729892247335
* git describe: v4.19.201-17-g9c68cf432f4c
* test details:
https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-4.19.y/build/v4.19.201-17-g9c68cf432f4c
## No regressions (compared to v4.19.201)
## No fixes (compared to v4.19.201)
## Test result summary
total: 76501, pass: 59304, fail: 1758, skip: 13148, xfail: 2291
## Build Summary
* arm: 97 total, 97 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: 14 total, 14 passed, 0 failed
* juno-r2: 1 total, 1 passed, 0 failed
* mips: 39 total, 39 passed, 0 failed
* s390: 9 total, 9 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-
* kselftest-android
* 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-net
* 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-vm
* kselftest-vsyscall-mode-native-
* kselftest-vsyscall-mode-none-
* 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
* rcutorture
* ssuite
* v4l2-compliance
--
Linaro LKFT
https://lkft.linaro.org