Linux 5.4.178
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 177 +SUBLEVEL = 178 EXTRAVERSION = NAME = Kleptomaniac Octopus
block/bio-integrity.c +1 -1
@@ -380,7 +380,7 @@ void bio_integrity_advance(struct bio *bio, unsigned int bytes_done)struct blk_integrity *bi =blk_get_integrity (bio->bi_disk);unsigned bytes =bio_integrity_bytes (bi, bytes_done >>9 ); - bip->bip_iter.bi_sector += bytes_done >>9 ; + bip->bip_iter.bi_sector +=bio_integrity_intervals (bi, bytes_done >>9 );bvec_iter_advance (bip->bip_vec, &bip->bip_iter, bytes); }
drivers/edac/altera_edac.c +1 -1
@@ -349,7 +349,7 @@ static int altr_sdram_probe(struct platform_device *pdev)if (irq <0 ) {edac_printk (KERN_ERR ,EDAC_MC ,"No irq %d in DT\n" , irq); -return -ENODEV ; +return irq; }/* Arria10 has a 2nd IRQ */
drivers/edac/xgene_edac.c +1 -1
@@ -1922,7 +1922,7 @@ static int xgene_edac_probe(struct platform_device *pdev) irq =platform_get_irq (pdev, i);if (irq <0 ) {dev_err (&pdev->dev,"No IRQ resource\n" ); - rc = -EINVAL ; + rc = irq; goto out_err; } rc = devm_request_irq(&pdev->dev, irq,
drivers/gpu/drm/i915/display/intel_overlay.c +3 -0
@@ -913,6 +913,9 @@ static int check_overlay_dst(struct intel_overlay *overlay,const struct intel_crtc_state *pipe_config = overlay->crtc->config; +if (rec->dst_height ==0 || rec->dst_width ==0 ) +return -EINVAL ; + if (rec->dst_x < pipe_config->pipe_src_w && rec->dst_x + rec->dst_width <= pipe_config->pipe_src_w && rec->dst_y < pipe_config->pipe_src_h &&
drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c +1 -1
@@ -38,7 +38,7 @@ nvbios_addr(struct nvkm_bios *bios, u32 *addr, u8 size) *addr += bios->imaged_addr; } -if (unlikely (*addr + size >= bios->size)) { +if (unlikely (*addr + size > bios->size)) {nvkm_error (&bios->subdev,"OOB %d %08x %08x\n" , size, p, *addr);return false; }
drivers/infiniband/hw/mlx4/main.c +1 -1
@@ -3291,7 +3291,7 @@ static void mlx4_ib_event(struct mlx4_dev *dev, void *ibdev_ptr,case MLX4_DEV_EVENT_PORT_MGMT_CHANGE : ew =kmalloc (sizeof *ew,GFP_ATOMIC );if (!ew) -break ; +return ;INIT_WORK (&ew->work, handle_port_mgmt_change_event);memcpy (&ew->ib_eqe, eqe,sizeof *eqe);
drivers/infiniband/sw/rdmavt/qp.c +2 -0
@@ -3110,6 +3110,8 @@ void rvt_ruc_loopback(struct rvt_qp *sqp)case IB_WR_ATOMIC_FETCH_AND_ADD :if (unlikely (!(qp->qp_access_flags &IB_ACCESS_REMOTE_ATOMIC ))) goto inv_err; +if (unlikely (wqe->atomic_wr.remote_addr & (sizeof (u64) -1 ))) + goto inv_err; if (unlikely(!rvt_rkey_ok(qp, &qp->r_sge.sge, sizeof(u64), wqe->atomic_wr.remote_addr, wqe->atomic_wr.rkey,
drivers/infiniband/sw/siw/siw.h +1 -6
@@ -658,14 +658,9 @@ static inline struct siw_sqe *orq_get_current(struct siw_qp *qp)return &qp->orq[qp->orq_get % qp->attrs.orq_size]; } -static inline struct siw_sqe *orq_get_tail (struct siw_qp *qp) -{ -return &qp->orq[qp->orq_put % qp->attrs.orq_size]; -} -static inline struct siw_sqe *orq_get_free (struct siw_qp *qp) { -struct siw_sqe *orq_e =orq_get_tail (qp); +struct siw_sqe *orq_e = &qp->orq[qp->orq_put % qp->attrs.orq_size];if (READ_ONCE (orq_e->flags) ==0 )return orq_e;
drivers/infiniband/sw/siw/siw_qp_rx.c +11 -9
@@ -1153,11 +1153,12 @@ static int siw_check_tx_fence(struct siw_qp *qp)spin_lock_irqsave (&qp->orq_lock, flags); - rreq =orq_get_current (qp); -/* free current orq entry */ + rreq =orq_get_current (qp);WRITE_ONCE (rreq->flags,0 ); + qp->orq_get++; +if (qp->tx_ctx.orq_fence) {if (unlikely (tx_waiting->wr_status !=SIW_WR_QUEUED )) { pr_warn("siw: [QP %u]: fence resume: bad status %d\n",
@@ -1165,10 +1166,12 @@ static int siw_check_tx_fence(struct siw_qp *qp) rv = -EPROTO ; goto out; } -/* resume SQ processing */ +/* resume SQ processing, if possible */ if (tx_waiting->sqe.opcode ==SIW_OP_READ || tx_waiting->sqe.opcode ==SIW_OP_READ_LOCAL_INV ) { - rreq =orq_get_tail (qp); + +/* SQ processing was stopped because of a full ORQ */ + rreq =orq_get_free (qp);if (unlikely (!rreq)) {pr_warn ("siw: [QP %u]: no ORQE\n" ,qp_id (qp)); rv = -EPROTO ;
@@ -1181,15 +1184,14 @@ static int siw_check_tx_fence(struct siw_qp *qp) resume_tx =1 ; }else if (siw_orq_empty (qp)) { +/* +* SQ processing was stopped by fenced work request. +* Resume since all previous Read's are now completed. +*/ qp->tx_ctx.orq_fence =0 ; resume_tx =1 ; - }else { -pr_warn ("siw: [QP %u]: fence resume: orq idx: %d:%d\n" , -qp_id (qp), qp->orq_get, qp->orq_put); - rv = -EPROTO ; } } - qp->orq_get++; out:spin_unlock_irqrestore (&qp->orq_lock, flags);
drivers/iommu/amd_iommu_init.c +2 -0
@@ -21,6 +21,7 @@#include <linux/iommu.h> #include <linux/kmemleak.h> #include <linux/mem_encrypt.h> +#include <linux/iopoll.h> #include <asm/pci-direct.h> #include <asm/iommu.h> #include <asm/apic.h>
@@ -759,6 +760,7 @@ static int iommu_ga_log_enable(struct amd_iommu *iommu) status =readl (iommu->mmio_base +MMIO_STATUS_OFFSET );if (status & (MMIO_STATUS_GALOG_RUN_MASK ))break ; +udelay (10 ); }if (i >=LOOP_TIMEOUT )
drivers/iommu/intel_irq_remapping.c +10 -3
@@ -570,9 +570,8 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu) fn, &intel_ir_domain_ops, iommu);if (!iommu->ir_domain) { -irq_domain_free_fwnode (fn);pr_err ("IR%d: failed to allocate irqdomain\n" , iommu->seq_id); - goto out_free_bitmap; + goto out_free_fwnode; } iommu->ir_msi_domain = arch_create_remap_msi_irq_domain(iommu->ir_domain,
@@ -596,7 +595,7 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)if (dmar_enable_qi (iommu)) {pr_err ("Failed to enable queued invalidation\n" ); - goto out_free_bitmap; + goto out_free_ir_domain; } }
@@ -620,6 +619,14 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu)return 0 ; +out_free_ir_domain: +if (iommu->ir_msi_domain) +irq_domain_remove (iommu->ir_msi_domain); + iommu->ir_msi_domain =NULL ; +irq_domain_remove (iommu->ir_domain); + iommu->ir_domain =NULL ; +out_free_fwnode: +irq_domain_free_fwnode (fn); out_free_bitmap:bitmap_free (bitmap); out_free_pages:
drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h +1 -0
@@ -128,6 +128,7 @@#define NUM_DWMAC100_DMA_REGS 9#define NUM_DWMAC1000_DMA_REGS 23 +#define NUM_DWMAC4_DMA_REGS 27void dwmac_enable_dma_transmission (void __iomem *ioaddr);void dwmac_enable_dma_irq (void __iomem *ioaddr,u32 chan);
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +17 -2
@@ -21,10 +21,18 @@#include "dwxgmac2.h" #define REG_SPACE_SIZE 0x1060 +#define GMAC4_REG_SPACE_SIZE 0x116C#define MAC100_ETHTOOL_NAME "st_mac100"#define GMAC_ETHTOOL_NAME "st_gmac"#define XGMAC_ETHTOOL_NAME "st_xgmac" +/* Same as DMA_CHAN_BASE_ADDR defined in dwmac4_dma.h +* +* It is here because dwmac_dma.h and dwmac4_dam.h can not be included at the +* same time due to the conflicting macro names. +*/ +#define GMAC4_DMA_CHAN_BASE_ADDR 0x00001100 +#define ETHTOOL_DMA_OFFSET 55struct stmmac_stats {
@@ -413,6 +421,8 @@ static int stmmac_ethtool_get_regs_len(struct net_device *dev)if (priv->plat->has_xgmac)return XGMAC_REGSIZE *4 ; +else if (priv->plat->has_gmac4) +return GMAC4_REG_SPACE_SIZE ;return REG_SPACE_SIZE ; }
@@ -425,8 +435,13 @@ static void stmmac_ethtool_gregs(struct net_device *dev,stmmac_dump_mac_regs (priv, priv->hw, reg_space);stmmac_dump_dma_regs (priv, priv->ioaddr, reg_space); -if (!priv->plat->has_xgmac) { -/* Copy DMA registers to where ethtool expects them */ +/* Copy DMA registers to where ethtool expects them */ +if (priv->plat->has_gmac4) { +/* GMAC4 dumps its DMA registers at its DMA_CHAN_BASE_ADDR */ +memcpy (®_space[ETHTOOL_DMA_OFFSET ], + ®_space[GMAC4_DMA_CHAN_BASE_ADDR /4 ], +NUM_DWMAC4_DMA_REGS *4 ); + }else if (!priv->plat->has_xgmac) {memcpy (®_space[ETHTOOL_DMA_OFFSET ], ®_space[DMA_BUS_MODE /4 ],NUM_DWMAC1000_DMA_REGS *4 );
drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c +12 -7
@@ -149,15 +149,20 @@ static int adjust_systime(void __iomem *ioaddr, u32 sec, u32 nsec,static void get_systime (void __iomem *ioaddr,u64 *systime) { -u64 ns; - -/* Get the TSSS value */ - ns =readl (ioaddr +PTP_STNSR ); -/* Get the TSS and convert sec time value to nanosecond */ - ns +=readl (ioaddr +PTP_STSR ) *1000000000ULL ; +u64 ns, sec0, sec1; + +/* Get the TSS value */ + sec1 =readl_relaxed (ioaddr +PTP_STSR ); +do { + sec0 = sec1; +/* Get the TSSS value */ + ns =readl_relaxed (ioaddr +PTP_STNSR ); +/* Get the TSS value */ + sec1 =readl_relaxed (ioaddr +PTP_STSR ); + }while (sec0 != sec1);if (systime) - *systime = ns; + *systime = ns + (sec1 *1000000000ULL ); }const struct stmmac_hwtimestamp stmmac_ptp = {
drivers/net/ieee802154/ca8210.c +1 -0
@@ -1770,6 +1770,7 @@ static int ca8210_async_xmit_complete(status );if (status !=MAC_TRANSACTION_OVERFLOW ) { +dev_kfree_skb_any (priv->tx_skb);ieee802154_wake_queue (priv->hw);return 0 ; }
drivers/net/ieee802154/mac802154_hwsim.c +1 -0
@@ -786,6 +786,7 @@ static int hwsim_add_one(struct genl_info *info, struct device *dev, goto err_pib; } + pib->channel =13 ;rcu_assign_pointer (phy->pib, pib); phy->idx = idx;INIT_LIST_HEAD (&phy->edges);
drivers/net/ieee802154/mcr20a.c +2 -2
@@ -976,8 +976,8 @@ static void mcr20a_hw_setup(struct mcr20a_local *lp)dev_dbg (printdev (lp),"%s\n" , __func__); phy->symbol_duration =16 ; - phy->lifs_period =40 ; - phy->sifs_period =12 ; + phy->lifs_period =40 * phy->symbol_duration; + phy->sifs_period =12 * phy->symbol_duration; hw->flags =IEEE802154_HW_TX_OMIT_CKSUM | IEEE802154_HW_AFILT |
drivers/net/macsec.c +9 -0
@@ -3247,6 +3247,15 @@ static int macsec_newlink(struct net *net, struct net_device *dev, macsec->real_dev = real_dev; +/* send_sci must be set to true when transmit sci explicitly is set */ +if ((data && data[IFLA_MACSEC_SCI ]) && + (data && data[IFLA_MACSEC_INC_SCI ])) { +u8 send_sci = !!nla_get_u8 (data[IFLA_MACSEC_INC_SCI ]); + +if (!send_sci) +return -EINVAL ; + } +if (data && data[IFLA_MACSEC_ICV_LEN ]) icv_len =nla_get_u8 (data[IFLA_MACSEC_ICV_LEN ]); mtu = real_dev->mtu - icv_len -macsec_extra_len (true);
drivers/pinctrl/bcm/pinctrl-bcm2835.c +15 -8
@@ -1261,16 +1261,18 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev)sizeof (*girq->parents), GFP_KERNEL);if (!girq->parents) { -pinctrl_remove_gpio_range (pc->pctl_dev, &pc->gpio_range); -return -ENOMEM ; + err = -ENOMEM ; + goto out_remove; }if (is_7211) { pc->wake_irq =devm_kcalloc (dev,BCM2835_NUM_IRQS ,sizeof (*pc->wake_irq),GFP_KERNEL ); -if (!pc->wake_irq) -return -ENOMEM ; +if (!pc->wake_irq) { + err = -ENOMEM ; + goto out_remove; + } }/*
@@ -1294,8 +1296,10 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) len =strlen (dev_name (pc->dev)) +16 ; name =devm_kzalloc (pc->dev, len,GFP_KERNEL ); -if (!name) -return -ENOMEM ; +if (!name) { + err = -ENOMEM ; + goto out_remove; + }snprintf (name, len,"%s:bank%d" ,dev_name (pc->dev), i);
@@ -1314,11 +1318,14 @@ static int bcm2835_pinctrl_probe(struct platform_device *pdev) err =gpiochip_add_data (&pc->gpio_chip, pc);if (err) {dev_err (dev,"could not add GPIO chip\n" ); -pinctrl_remove_gpio_range (pc->pctl_dev, &pc->gpio_range); -return err; + goto out_remove; }return 0 ; + +out_remove: +pinctrl_remove_gpio_range (pc->pctl_dev, &pc->gpio_range); +return err; }static struct platform_driver bcm2835_pinctrl_driver = {
drivers/rtc/rtc-mc146818-lib.c +1 -1
@@ -83,7 +83,7 @@ unsigned int mc146818_get_time(struct rtc_time *time) time->tm_year += real_year -72 ;#endif -if (century >20 ) +if (century >19 ) time->tm_year += (century -19 ) *100 ;/*
drivers/scsi/bnx2fc/bnx2fc_fcoe.c +13 -8
@@ -506,7 +506,8 @@ static int bnx2fc_l2_rcv_thread(void *arg)static void bnx2fc_recv_frame (struct sk_buff *skb) { -u32 fr_len; +u64 crc_err; +u32 fr_len, fr_crc;struct fc_lport *lport;struct fcoe_rcv_info *fr;struct fc_stats *stats;
@@ -540,6 +541,11 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)skb_pull (skb,sizeof (struct fcoe_hdr )); fr_len = skb->len -sizeof (struct fcoe_crc_eof ); + stats =per_cpu_ptr (lport->stats,get_cpu ()); + stats->RxFrames++; + stats->RxWords += fr_len /FCOE_WORD_TO_BYTE ; +put_cpu (); + fp = (struct fc_frame *)skb;fc_frame_init (fp);fr_dev (fp) = lport;
@@ -622,16 +628,15 @@ static void bnx2fc_recv_frame(struct sk_buff *skb)return ; } - stats =per_cpu_ptr (lport->stats,smp_processor_id ()); - stats->RxFrames++; - stats->RxWords += fr_len /FCOE_WORD_TO_BYTE ; + fr_crc =le32_to_cpu (fr_crc (fp)); -if (le32_to_cpu (fr_crc (fp)) != - ~crc32 (~0 , skb->data, fr_len)) { -if (stats->InvalidCRCCount <5 ) +if (unlikely (fr_crc != ~crc32 (~0 , skb->data, fr_len))) { + stats =per_cpu_ptr (lport->stats,get_cpu ()); + crc_err = (stats->InvalidCRCCount++); +put_cpu (); +if (crc_err <5 ) printk(KERN_WARNING PFX "dropping frame with ""CRC error\n" ); - stats->InvalidCRCCount++;kfree_skb (skb);return ; }
drivers/soc/mediatek/mtk-scpsys.c +4 -11
@@ -333,17 +333,12 @@ static int scpsys_power_off(struct generic_pm_domain *genpd)return ret; } -static int init_clks (struct platform_device *pdev,struct clk **clk) +static void init_clks (struct platform_device *pdev,struct clk **clk) {int i; -for (i =CLK_NONE +1 ; i <CLK_MAX ; i++) { +for (i =CLK_NONE +1 ; i <CLK_MAX ; i++) clk[i] =devm_clk_get (&pdev->dev, clk_names[i]); -if (IS_ERR (clk[i])) -return PTR_ERR (clk[i]); - } - -return 0 ; } static struct scp *init_scp(struct platform_device *pdev,
@@ -353,7 +348,7 @@ static struct scp *init_scp(struct platform_device *pdev, {struct genpd_onecell_data *pd_data;struct resource *res; -int i, j, ret; +int i, j;struct scp *scp;struct clk *clk[CLK_MAX ];
@@ -408,9 +403,7 @@ static struct scp *init_scp(struct platform_device *pdev, pd_data->num_domains = num; - ret =init_clks (pdev, clk); -if (ret) -return ERR_PTR (ret); +init_clks (pdev, clk);for (i =0 ; i < num; i++) {struct scp_domain *scpd = &scp->domains[i];
drivers/spi/spi-bcm-qspi.c +1 -1
@@ -509,7 +509,7 @@ static void bcm_qspi_chip_select(struct bcm_qspi *qspi, int cs)u32 rd =0 ;u32 wr =0 ; -if (qspi->base[CHIP_SELECT ]) { +if (cs >=0 && qspi->base[CHIP_SELECT ]) { rd =bcm_qspi_read (qspi,CHIP_SELECT ,0 ); wr = (rd & ~0xff ) | (1 << cs);if (rd == wr)
drivers/spi/spi-meson-spicc.c +5 -0
@@ -527,6 +527,11 @@ static int meson_spicc_probe(struct platform_device *pdev)writel_relaxed (0 , spicc->base +SPICC_INTREG ); irq =platform_get_irq (pdev,0 ); +if (irq <0 ) { + ret = irq; + goto out_master; + } + ret =devm_request_irq (&pdev->dev, irq, meson_spicc_irq,0 ,NULL , spicc);if (ret) {
drivers/spi/spi-mt65xx.c +1 -1
@@ -533,7 +533,7 @@ static irqreturn_t mtk_spi_interrupt(int irq, void *dev_id)else mdata->state =MTK_SPI_IDLE ; -if (!master->can_dma (master, master->cur_msg->spi, trans)) { +if (!master->can_dma (master,NULL , trans)) {if (trans->rx_buf) { cnt = mdata->xfer_len /4 ; ioread32_rep(mdata->base + SPI_RX_DATA_REG,
fs/btrfs/qgroup.c +19 -2
@@ -1105,9 +1105,24 @@ int btrfs_quota_disable(struct btrfs_fs_info *fs_info)struct btrfs_trans_handle *trans =NULL ;int ret =0 ; +/* +* We need to have subvol_sem write locked, to prevent races between +* concurrent tasks trying to disable quotas, because we will unlock +* and relock qgroup_ioctl_lock across BTRFS_FS_QUOTA_ENABLED changes. +*/ +lockdep_assert_held_write (&fs_info->subvol_sem); +mutex_lock (&fs_info->qgroup_ioctl_lock);if (!fs_info->quota_root) goto out; + +/* +* Request qgroup rescan worker to complete and wait for it. This wait +* must be done before transaction start for quota disable since it may +* deadlock with transaction by the qgroup rescan worker. +*/ +clear_bit (BTRFS_FS_QUOTA_ENABLED , &fs_info->flags); +btrfs_qgroup_wait_for_completion (fs_info, false);mutex_unlock (&fs_info->qgroup_ioctl_lock);/*
@@ -1125,14 +1140,13 @@ int btrfs_quota_disable(struct btrfs_fs_info *fs_info)if (IS_ERR (trans)) { ret =PTR_ERR (trans); trans =NULL ; +set_bit (BTRFS_FS_QUOTA_ENABLED , &fs_info->flags); goto out; }if (!fs_info->quota_root) goto out; -clear_bit (BTRFS_FS_QUOTA_ENABLED , &fs_info->flags); -btrfs_qgroup_wait_for_completion (fs_info, false);spin_lock (&fs_info->qgroup_lock); quota_root = fs_info->quota_root; fs_info->quota_root =NULL ;
@@ -3304,6 +3318,9 @@ qgroup_rescan_init(struct btrfs_fs_info *fs_info, u64 progress_objectid,btrfs_warn (fs_info,"qgroup rescan init failed, qgroup is not enabled" ); ret = -EINVAL ; + }else if (!test_bit (BTRFS_FS_QUOTA_ENABLED , &fs_info->flags)) { +/* Quota disable is in progress */ + ret = -EBUSY ; }if (ret) {
fs/ext4/inline.c +9 -1
@@ -1120,7 +1120,15 @@ static void ext4_restore_inline_data(handle_t *handle, struct inode *inode,struct ext4_iloc *iloc, void *buf, int inline_size) { -ext4_create_inline_data (handle ,inode ,inline_size ); + int ret; + + ret =ext4_create_inline_data (handle, inode, inline_size); +if (ret) { +ext4_msg (inode->i_sb,KERN_EMERG , +"error restoring inline_data for inode -- potential data loss! (inode %lu, error %d)" , + inode->i_ino, ret); +return ; + }ext4_write_inline_data (inode, iloc, buf,0 , inline_size);ext4_set_inode_state (inode,EXT4_STATE_MAY_INLINE_DATA ); }
fs/fs_context.c +2 -2
@@ -258,7 +258,7 @@ static struct fs_context *alloc_fs_context(struct file_system_type *fs_type,struct fs_context *fc;int ret = -ENOMEM ; - fc =kzalloc (sizeof (struct fs_context ),GFP_KERNEL ); + fc =kzalloc (sizeof (struct fs_context ),GFP_KERNEL_ACCOUNT );if (!fc)return ERR_PTR (-ENOMEM );
@@ -686,7 +686,7 @@ const struct fs_context_operations legacy_fs_context_ops = {*/ static int legacy_init_fs_context (struct fs_context *fc) { - fc->fs_private =kzalloc (sizeof (struct legacy_fs_context ),GFP_KERNEL ); + fc->fs_private =kzalloc (sizeof (struct legacy_fs_context ),GFP_KERNEL_ACCOUNT );if (!fc->fs_private)return -ENOMEM ; fc->ops = &legacy_fs_context_ops;
fs/nfsd/nfs4state.c +3 -1
@@ -3941,8 +3941,10 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, status = nfserr_clid_inuse;if (client_has_state (old) && !same_creds (&unconf->cl_cred, - &old->cl_cred)) + &old->cl_cred)) { + old =NULL ; goto out; + } status =mark_client_expired_locked (old);if (status) { old =NULL ;
kernel/audit.c +43 -19
143 lines not on this page · raw message
kernel/cgroup/cpuset.c +10 -0
@@ -1473,10 +1473,15 @@ static void update_sibling_cpumasks(struct cpuset *parent, struct cpuset *cs,struct cpuset *sibling;struct cgroup_subsys_state *pos_css; +percpu_rwsem_assert_held (&cpuset_rwsem); +/* * Check all its siblings and call update_cpumasks_hier() * if their use_parent_ecpus flag is set in order for them * to use the right effective_cpus value. +* +* The update_cpumasks_hier() function may sleep. So we have to +* release the RCU read lock before calling it. */ rcu_read_lock ();cpuset_for_each_child (sibling, pos_css, parent) {
@@ -1484,8 +1489,13 @@ static void update_sibling_cpumasks(struct cpuset *parent, struct cpuset *cs,continue ;if (!sibling->use_parent_ecpus)continue ; +if (!css_tryget_online (&sibling->css)) +continue ; +rcu_read_unlock ();update_cpumasks_hier (sibling, tmp); +rcu_read_lock (); +css_put (&sibling->css); }rcu_read_unlock (); }
mm/kmemleak.c +7 -6
@@ -1399,7 +1399,8 @@ static void kmemleak_scan(void) {unsigned long flags;struct kmemleak_object *object; -int i; +struct zone *zone; +int __maybe_unused i;int new_leaks =0 ; jiffies_last_scan = jiffies;
@@ -1439,9 +1440,9 @@ static void kmemleak_scan(void)* Struct page scanning for each node. */ get_online_mems (); -for_each_online_node (i) { -unsigned long start_pfn =node_start_pfn (i); -unsigned long end_pfn =node_end_pfn (i); +for_each_populated_zone (zone) { +unsigned long start_pfn = zone->zone_start_pfn; +unsigned long end_pfn =zone_end_pfn (zone);unsigned long pfn;for (pfn = start_pfn; pfn < end_pfn; pfn++) {
@@ -1450,8 +1451,8 @@ static void kmemleak_scan(void)if (!page)continue ; -/* only scan pages belonging to this node */ -if (page_to_nid (page) != i) +/* only scan pages belonging to this zone */ +if (page_zone (page) != zone)continue ;/* only scan if page is in use */ if (page_count (page) ==0 )
net/ieee802154/nl802154.c +4 -4
@@ -1457,7 +1457,7 @@ static int nl802154_send_key(struct sk_buff *msg, u32 cmd, u32 portid, hdr =nl802154hdr_put (msg, portid, seq, flags, cmd);if (!hdr) -return -1 ; +return -ENOBUFS ;if (nla_put_u32 (msg,NL802154_ATTR_IFINDEX , dev->ifindex)) goto nla_put_failure;
@@ -1650,7 +1650,7 @@ static int nl802154_send_device(struct sk_buff *msg, u32 cmd, u32 portid, hdr =nl802154hdr_put (msg, portid, seq, flags, cmd);if (!hdr) -return -1 ; +return -ENOBUFS ;if (nla_put_u32 (msg,NL802154_ATTR_IFINDEX , dev->ifindex)) goto nla_put_failure;
@@ -1828,7 +1828,7 @@ static int nl802154_send_devkey(struct sk_buff *msg, u32 cmd, u32 portid, hdr =nl802154hdr_put (msg, portid, seq, flags, cmd);if (!hdr) -return -1 ; +return -ENOBUFS ;if (nla_put_u32 (msg,NL802154_ATTR_IFINDEX , dev->ifindex)) goto nla_put_failure;
@@ -2004,7 +2004,7 @@ static int nl802154_send_seclevel(struct sk_buff *msg, u32 cmd, u32 portid, hdr =nl802154hdr_put (msg, portid, seq, flags, cmd);if (!hdr) -return -1 ; +return -ENOBUFS ;if (nla_put_u32 (msg,NL802154_ATTR_IFINDEX , dev->ifindex)) goto nla_put_failure;
sound/pci/hda/patch_realtek.c +5 -1
@@ -2122,6 +2122,7 @@ static void alc1220_fixup_gb_x570(struct hda_codec *codec, {static const hda_nid_t conn1[] = {0x0c };static const struct coef_fw gb_x570_coefs[] = { +WRITE_COEF (0x07 ,0x03c0 ),WRITE_COEF (0x1a ,0x01c1 ),WRITE_COEF (0x1b ,0x0202 ),WRITE_COEF (0x43 ,0x3005 ),
@@ -2548,7 +2549,8 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {SND_PCI_QUIRK (0x1458 ,0xa002 ,"Gigabyte EP45-DS3/Z87X-UD3H" ,ALC889_FIXUP_FRONT_HP_NO_PRESENCE ),SND_PCI_QUIRK (0x1458 ,0xa0b8 ,"Gigabyte AZ370-Gaming" ,ALC1220_FIXUP_GB_DUAL_CODECS ),SND_PCI_QUIRK (0x1458 ,0xa0cd ,"Gigabyte X570 Aorus Master" ,ALC1220_FIXUP_GB_X570 ), -SND_PCI_QUIRK (0x1458 ,0xa0ce ,"Gigabyte X570 Aorus Xtreme" ,ALC1220_FIXUP_CLEVO_P950 ), +SND_PCI_QUIRK (0x1458 ,0xa0ce ,"Gigabyte X570 Aorus Xtreme" ,ALC1220_FIXUP_GB_X570 ), +SND_PCI_QUIRK (0x1458 ,0xa0d5 ,"Gigabyte X570S Aorus Master" ,ALC1220_FIXUP_GB_X570 ),SND_PCI_QUIRK (0x1462 ,0x11f7 ,"MSI-GE63" ,ALC1220_FIXUP_CLEVO_P950 ),SND_PCI_QUIRK (0x1462 ,0x1228 ,"MSI-GP63" ,ALC1220_FIXUP_CLEVO_P950 ), SND_PCI_QUIRK(0x1462, 0x1229, "MSI-GP73", ALC1220_FIXUP_CLEVO_P950),
@@ -2623,6 +2625,7 @@ static const struct hda_model_fixup alc882_fixup_models[] = { {.id = ALC882_FIXUP_NO_PRIMARY_HP, .name = "no-primary-hp"}, {.id = ALC887_FIXUP_ASUS_BASS, .name = "asus-bass"}, {.id = ALC1220_FIXUP_GB_DUAL_CODECS, .name = "dual-codecs"}, + {.id = ALC1220_FIXUP_GB_X570, .name = "gb-x570"}, {.id = ALC1220_FIXUP_CLEVO_P950, .name = "clevo-p950"}, {} };
@@ -8180,6 +8183,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1043 ,0x1e51 ,"ASUS Zephyrus M15" ,ALC294_FIXUP_ASUS_GU502_PINS ),SND_PCI_QUIRK (0x1043 ,0x1e8e ,"ASUS Zephyrus G15" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x1f11 ,"ASUS Zephyrus G14" ,ALC289_FIXUP_ASUS_GA401 ), +SND_PCI_QUIRK (0x1043 ,0x16b2 ,"ASUS GU603" ,ALC289_FIXUP_ASUS_GA401 ),SND_PCI_QUIRK (0x1043 ,0x3030 ,"ASUS ZN270IE" ,ALC256_FIXUP_ASUS_AIO_GPIO2 ),SND_PCI_QUIRK (0x1043 ,0x831a ,"ASUS P901" ,ALC269_FIXUP_STEREO_DMIC ), SND_PCI_QUIRK(0x1043, 0x834a, "ASUS S101", ALC269_FIXUP_STEREO_DMIC),
sound/soc/codecs/cpcap.c +2 -0
@@ -1541,6 +1541,8 @@ static int cpcap_codec_probe(struct platform_device *pdev) {struct device_node *codec_node =of_get_child_by_name (pdev->dev.parent->of_node,"audio-codec" ); +if (!codec_node) +return -ENODEV ; pdev->dev.of_node = codec_node;
sound/soc/codecs/max9759.c +2 -1
@@ -64,7 +64,8 @@ static int speaker_gain_control_put(struct snd_kcontrol *kcontrol,struct snd_soc_component *c =snd_soc_kcontrol_component (kcontrol);struct max9759 *priv =snd_soc_component_get_drvdata (c); -if (ucontrol->value.integer.value[0 ] >3 ) +if (ucontrol->value.integer.value[0 ] <0 || + ucontrol->value.integer.value[0 ] >3 )return -EINVAL ; priv->gain = ucontrol->value.integer.value[0 ];
sound/soc/fsl/pcm030-audio-fabric.c +8 -3
@@ -93,16 +93,21 @@ static int pcm030_fabric_probe(struct platform_device *op)dev_err (&op->dev,"platform_device_alloc() failed\n" ); ret =platform_device_add (pdata->codec_device); -if (ret) +if (ret) {dev_err (&op->dev,"platform_device_add() failed: %d\n" , ret); +platform_device_put (pdata->codec_device); + } ret =snd_soc_register_card (card); -if (ret) +if (ret) {dev_err (&op->dev,"snd_soc_register_card() failed: %d\n" , ret); +platform_device_del (pdata->codec_device); +platform_device_put (pdata->codec_device); + }platform_set_drvdata (op, pdata); -return ret; + }static int pcm030_fabric_remove (struct platform_device *op)
sound/soc/soc-ops.c +26 -3
@@ -322,13 +322,27 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,if (sign_bit) mask =BIT (sign_bit +1 ) -1 ; - val = ((ucontrol->value.integer.value[0 ] + min) & mask); + val = ucontrol->value.integer.value[0 ]; +if (mc->platform_max && val > mc->platform_max) +return -EINVAL ; +if (val > max - min) +return -EINVAL ; +if (val <0 ) +return -EINVAL ; + val = (val + min) & mask;if (invert) val = max - val; val_mask = mask << shift; val = val << shift;if (snd_soc_volsw_is_stereo (mc)) { - val2 = ((ucontrol->value.integer.value[1 ] + min) & mask); + val2 = ucontrol->value.integer.value[1 ]; +if (mc->platform_max && val2 > mc->platform_max) +return -EINVAL ; +if (val2 > max - min) +return -EINVAL ; +if (val2 <0 ) +return -EINVAL ; + val2 = (val2 + min) & mask;if (invert) val2 = max - val2;if (reg == reg2) {
@@ -422,8 +436,15 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,int err =0 ;unsigned int val, val_mask, val2 =0 ; + val = ucontrol->value.integer.value[0 ]; +if (mc->platform_max && val > mc->platform_max) +return -EINVAL ; +if (val > max - min) +return -EINVAL ; +if (val <0 ) +return -EINVAL ; val_mask = mask << shift; - val = (ucontrol->value.integer.value[0 ] + min) & mask; + val = (val + min) & mask; val = val << shift; err =snd_soc_component_update_bits (component, reg, val_mask, val);
@@ -889,6 +910,8 @@ int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol,unsigned int i, regval, regmask;int err; +if (val < mc->min || val > mc->max) +return -EINVAL ;if (invert) val = max - val; val &= mask;
sound/soc/xilinx/xlnx_formatter_pcm.c +24 -3
@@ -37,6 +37,7 @@#define XLNX_AUD_XFER_COUNT 0x28#define XLNX_AUD_CH_STS_START 0x2C#define XLNX_BYTES_PER_CH 0x44 +#define XLNX_AUD_ALIGN_BYTES 64#define AUD_STS_IOC_IRQ_MASK BIT(31)#define AUD_STS_CH_STS_MASK BIT(29)
@@ -370,12 +371,32 @@ static int xlnx_formatter_pcm_open(struct snd_pcm_substream *substream)snd_soc_set_runtime_hwparams (substream, &xlnx_pcm_hardware); runtime->private_data = stream_data; -/* Resize the period size divisible by 64 */ +/* Resize the period bytes as divisible by 64 */ err =snd_pcm_hw_constraint_step (runtime,0 , -SNDRV_PCM_HW_PARAM_PERIOD_BYTES ,64 ); +SNDRV_PCM_HW_PARAM_PERIOD_BYTES , +XLNX_AUD_ALIGN_BYTES );if (err) {dev_err (component->dev, -"unable to set constraint on period bytes\n" ); +"Unable to set constraint on period bytes\n" ); +return err; + } + +/* Resize the buffer bytes as divisible by 64 */ + err =snd_pcm_hw_constraint_step (runtime,0 , +SNDRV_PCM_HW_PARAM_BUFFER_BYTES , +XLNX_AUD_ALIGN_BYTES ); +if (err) { +dev_err (component->dev, +"Unable to set constraint on buffer bytes\n" ); +return err; + } + +/* Set periods as integer multiple */ + err =snd_pcm_hw_constraint_integer (runtime, +SNDRV_PCM_HW_PARAM_PERIODS ); +if (err <0 ) { +dev_err (component->dev, +"Unable to set constraint on periods to be integer\n" );return err; }
sound/usb/quirks-table.h +10 -0
@@ -25,6 +25,16 @@ .idProduct = prod, \ .bInterfaceClass = USB_CLASS_VENDOR_SPEC +/* A standard entry matching with vid/pid and the audio class/subclass */ +#define USB_AUDIO_DEVICE (vend, prod) \ + .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ + USB_DEVICE_ID_MATCH_INT_CLASS | \ + USB_DEVICE_ID_MATCH_INT_SUBCLASS, \ + .idVendor = vend, \ + .idProduct = prod, \ + .bInterfaceClass = USB_CLASS_AUDIO, \ + .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL +/* HP Thunderbolt Dock Audio Headset */ { USB_DEVICE(0x03f0, 0x0269),
tools/testing/selftests/futex/Makefile +2 -2
@@ -11,7 +11,7 @@ all: @for DIR in $(SUBDIRS); do \ BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ - make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ + $(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ if [ -e $$DIR/$(TEST_PROGS) ]; then \ rsync -a $$DIR/$(TEST_PROGS) $$BUILD_TARGET/; \ fi \
@@ -32,6 +32,6 @@ override define CLEAN @for DIR in $(SUBDIRS); do \ BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ - make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ + $(MAKE) OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ done endef
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.178 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 block/bio-integrity.c | 2 drivers/edac/altera_edac.c | 2 drivers/edac/xgene_edac.c | 2 drivers/gpu/drm/i915/display/intel_overlay.c | 3 drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c | 2 drivers/infiniband/hw/mlx4/main.c | 2 drivers/infiniband/sw/rdmavt/qp.c | 2 drivers/infiniband/sw/siw/siw.h | 7 -- drivers/infiniband/sw/siw/siw_qp_rx.c | 20 +++-- drivers/iommu/amd_iommu_init.c | 2 drivers/iommu/intel_irq_remapping.c | 13 ++- drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h | 1 drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 19 ++++- drivers/net/ethernet/stmicro/stmmac/stmmac_hwtstamp.c | 19 +++-- drivers/net/ieee802154/ca8210.c | 1 drivers/net/ieee802154/mac802154_hwsim.c | 1 drivers/net/ieee802154/mcr20a.c | 4 - drivers/net/macsec.c | 9 ++ drivers/pinctrl/bcm/pinctrl-bcm2835.c | 23 ++++-- drivers/rtc/rtc-mc146818-lib.c | 2 drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 21 +++--- drivers/soc/mediatek/mtk-scpsys.c | 15 +--- drivers/spi/spi-bcm-qspi.c | 2 drivers/spi/spi-meson-spicc.c | 5 + drivers/spi/spi-mt65xx.c | 2 fs/btrfs/qgroup.c | 21 +++++- fs/ext4/inline.c | 10 ++ fs/fs_context.c | 4 - fs/nfsd/nfs4state.c | 4 - kernel/audit.c | 62 ++++++++++++------ kernel/cgroup/cpuset.c | 10 ++ mm/kmemleak.c | 13 ++- net/ieee802154/nl802154.c | 8 +- sound/pci/hda/patch_realtek.c | 6 + sound/soc/codecs/cpcap.c | 2 sound/soc/codecs/max9759.c | 3 sound/soc/fsl/pcm030-audio-fabric.c | 11 ++- sound/soc/soc-ops.c | 29 +++++++- sound/soc/xilinx/xlnx_formatter_pcm.c | 27 ++++++- sound/usb/quirks-table.h | 10 ++ tools/testing/selftests/futex/Makefile | 4 - 42 files changed, 294 insertions(+), 113 deletions(-)
Albert Geantă (1):
ALSA: hda/realtek: Add quirk for ASUS GU603
Benjamin Gaignard (1):
spi: mediatek: Avoid NULL pointer crash in interrupt
Bernard Metzler (1):
RDMA/siw: Fix broken RDMA Read Fence/Resume logic.
Camel Guo (1):
net: stmmac: dump gmac4 DMA registers correctly
Christian Lachner (3):
ALSA: hda/realtek: Add missing fixup-model entry for Gigabyte X570 ALC1220 quirks
ALSA: hda/realtek: Fix silent output on Gigabyte X570S Aorus Master (newer chipset)
ALSA: hda/realtek: Fix silent output on Gigabyte X570 Aorus Xtreme after reboot from Windows
Dai Ngo (1):
nfsd: nfsd4_setclientid_confirm mistakenly expires confirmed client.
Dan Carpenter (2):
drm/i915/overlay: Prevent divide by zero bugs in scaling
ASoC: max9759: fix underflow in speaker_gain_control_put()
Florian Fainelli (1):
pinctrl: bcm2835: Fix a few error paths
Greg Kroah-Hartman (1):
Linux 5.4.178
Guenter Roeck (1):
Revert "ASoC: mediatek: Check for error clk pointer"
Guoqing Jiang (1):
iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping()
Jiasheng Jiang (1):
ASoC: cpcap: Check for NULL pointer after calling of_get_child_by_name
Joerg Roedel (1):
iommu/amd: Fix loop timeout issue in iommu_ga_log_enable()
John Meneghini (1):
scsi: bnx2fc: Make bnx2fc_recv_frame() mp safe
Kamal Dasu (1):
spi: bcm-qspi: check for valid cs before applying chip select
Lang Yu (1):
mm/kmemleak: avoid scanning potential huge holes
Leon Romanovsky (1):
RDMA/mlx4: Don't continue event handler after memory allocation failure
Lior Nahmanson (1):
net: macsec: Verify that send_sci is on when setting Tx sci explicitly
Mark Brown (3):
ASoC: ops: Reject out of bounds values in snd_soc_put_volsw()
ASoC: ops: Reject out of bounds values in snd_soc_put_volsw_sx()
ASoC: ops: Reject out of bounds values in snd_soc_put_xr_sx()
Martin K. Petersen (1):
block: bio-integrity: Advance seed correctly for larger interval sizes
Miaoqian Lin (2):
spi: meson-spicc: add IRQ check in meson_spicc_probe
ASoC: fsl: Add missing error handling in pcm030_fabric_probe
Mike Marciniszyn (1):
IB/rdmavt: Validate remote_addr during loopback atomic tests
Miquel Raynal (4):
net: ieee802154: hwsim: Ensure proper channel selection at probe time
net: ieee802154: mcr20a: Fix lifs/sifs periods
net: ieee802154: ca8210: Stop leaking skb's
net: ieee802154: Return meaningful error codes from the netlink helpers
Muhammad Usama Anjum (1):
selftests: futex: Use variable MAKE instead of make
Nick Lopez (1):
drm/nouveau: fix off by one in BIOS boundary checking
Paul Moore (1):
audit: improve audit queue handling when "audit=1" on cmdline
Ritesh Harjani (1):
ext4: fix error handling in ext4_restore_inline_data()
Riwen Lu (1):
rtc: cmos: Evaluate century appropriate
Robert Hancock (1):
ASoC: xilinx: xlnx_formatter_pcm: Make buffer bytes multiple of period bytes
Sergey Shtylyov (2):
EDAC/altera: Fix deferred probing
EDAC/xgene: Fix deferred probing
Shin'ichiro Kawasaki (1):
btrfs: fix deadlock between quota disable and qgroup rescan worker
Takashi Iwai (1):
ALSA: usb-audio: Simplify quirk entries with a macro
Waiman Long (1):
cgroup/cpuset: Fix "suspicious RCU usage" lockdep warning
Yannick Vignon (1):
net: stmmac: ensure PTP time register reads are consistent
Yutian Yang (1):
memcg: charge fs_context and legacy_fs_context