Linux 5.4.300
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.300 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 arch/x86/kvm/svm.c | 3 drivers/dma/qcom/bam_dma.c | 8 drivers/dma/ti/edma.c | 4 drivers/edac/altera_edac.c | 1 drivers/gpu/drm/gma500/oaktrail_hdmi.c | 2 drivers/infiniband/hw/mlx5/devx.c | 1 drivers/mmc/host/mvsdio.c | 2 drivers/mtd/nand/raw/atmel/nand-controller.c | 18 - drivers/mtd/nand/raw/stm32_fmc2_nand.c | 45 +- drivers/net/can/rcar/rcar_can.c | 8 drivers/net/can/spi/hi311x.c | 1 drivers/net/can/sun4i_can.c | 1 drivers/net/can/usb/mcba_usb.c | 1 drivers/net/can/usb/peak_usb/pcan_usb_core.c | 2 drivers/net/ethernet/broadcom/cnic.c | 3 drivers/net/ethernet/cavium/liquidio/request_manager.c | 2 drivers/net/ethernet/freescale/fec_main.c | 3 drivers/net/ethernet/intel/i40e/i40e.h | 1 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 25 + drivers/net/ethernet/intel/i40e/i40e_main.c | 10 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 46 ++ drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 3 drivers/net/ethernet/intel/igb/igb_ethtool.c | 5 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 drivers/net/ethernet/natsemi/ns83820.c | 13 drivers/pcmcia/omap_cf.c | 8 drivers/phy/ti/phy-ti-pipe3.c | 13 drivers/power/supply/bq27xxx_battery.c | 4 drivers/soc/qcom/mdt_loader.c | 12 drivers/tty/hvc/hvc_console.c | 6 drivers/tty/serial/sc16is7xx.c | 13 drivers/usb/core/hub.c | 21 - drivers/usb/core/hub.h | 1 drivers/usb/core/quirks.c | 2 drivers/usb/gadget/udc/dummy_hcd.c | 25 - drivers/usb/serial/option.c | 17 + drivers/video/fbdev/core/fbcon.c | 13 fs/fuse/file.c | 5 fs/hugetlbfs/inode.c | 14 fs/nfs/nfs4proc.c | 1 fs/nilfs2/sysfs.c | 4 fs/nilfs2/sysfs.h | 8 fs/ocfs2/extent_map.c | 10 include/linux/interrupt.h | 72 +++- include/net/sock.h | 40 ++ kernel/cgroup/cgroup.c | 43 ++ kernel/irq/manage.c | 111 ++++++ mm/khugepaged.c | 2 mm/memory-failure.c | 7 mm/migrate.c | 12 net/can/j1939/bus.c | 5 net/can/j1939/socket.c | 3 net/core/sock.c | 5 net/ipv4/tcp.c | 5 net/ipv4/tcp_bpf.c | 5 net/mac80211/driver-ops.h | 2 net/rds/ib_frmr.c | 20 - net/rfkill/rfkill-gpio.c | 22 + sound/firewire/motu/motu-hwdep.c | 2 sound/soc/codecs/wm8940.c | 2 sound/soc/codecs/wm8974.c | 8 sound/soc/sof/intel/hda-stream.c | 2 sound/usb/mixer_quirks.c | 279 ++++++++++++++++- 65 files changed, 816 insertions(+), 223 deletions(-)
Alan Stern (1):
USB: gadget: dummy-hcd: Fix locking bug in RT-enabled kernels
Alexander Dahl (1):
mtd: nand: raw: atmel: Fix comment in timings preparation
Alexander Sverdlin (1):
mtd: nand: raw: atmel: Respect tAR, tCLR in read setup timing
Alexey Nepomnyashih (1):
net: liquidio: fix overflow in octeon_init_instr_queue()
Anders Roxell (1):
dmaengine: ti: edma: Fix memory allocation size for queue_priority_map
Bjorn Andersson (1):
soc: qcom: mdt_loader: Deal with zero e_shentsize
Charles Keepax (2):
ASoC: wm8940: Correct typo in control name
ASoC: wm8974: Correct PLL rate rounding
Chen Ni (1):
ALSA: usb-audio: Convert comma to semicolon
Chen Ridong (1):
cgroup: split cgroup_destroy_wq into 3 workqueues
Christophe Kerello (2):
mtd: rawnand: stm32_fmc2: fix ECC overwrite
mtd: rawnand: stm32_fmc2: avoid overlapping mappings on ECC buffer
Colin Ian King (1):
ASoC: SOF: Intel: hda-stream: Fix incorrect variable used in error message
Cristian Ciocaltea (5):
ALSA: usb-audio: Fix block comments in mixer_quirks
ALSA: usb-audio: Avoid multiple assignments in mixer_quirks
ALSA: usb-audio: Simplify NULL comparison in mixer_quirks
ALSA: usb-audio: Remove unneeded wmb() in mixer_quirks
ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5
David Hildenbrand (1):
mm/migrate_device: don't add folio to be freed to LRU in migrate_device_finalize()
Duoming Zhou (1):
cnic: Fix use-after-free bugs in cnic_delete_task
Fabian Vogt (1):
tty: hvc_console: Call hvc_kick in hvc_write unconditionally
Fabio Porcedda (2):
USB: serial: option: add Telit Cinterion FN990A w/audio compositions
USB: serial: option: add Telit Cinterion LE910C4-WWX new compositions
Geert Uytterhoeven (2):
pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch
can: rcar_can: rcar_can_resume(): fix s2ram with PSCI
Greg Kroah-Hartman (1):
Linux 5.4.300
H. Nikolaus Schaller (2):
power: supply: bq27xxx: fix error return in case of no bq27000 hdq battery
power: supply: bq27xxx: restrict no-battery detection to bq27000
Hans de Goede (1):
net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer
Hugo Villeneuve (1):
serial: sc16is7xx: fix bug in flow control levels init
Håkon Bugge (1):
rds: ib: Increment i_fastreg_wrs before bailing out
Jakob Koschel (1):
usb: gadget: dummy_hcd: remove usage of list iterator past the loop body
Jiayi Li (1):
usb: core: Add 0x prefix to quirks debug output
Jinjiang Tu (1):
mm/hugetlb: fix folio is still mapped when deleted
Johan Hovold (1):
phy: ti-pipe3: fix device leak at unbind
John Garry (1):
genirq/affinity: Add irq_update_affinity_desc()
Justin Bronder (1):
i40e: increase max descriptors for XL710
Kohei Enju (1):
igb: fix link test skipping when interface is admin down
Kuniyuki Iwashima (3):
net: Fix null-ptr-deref by sock_lock_init_class_and_name() and rmmod.
tcp_bpf: Call sk_msg_free() when tcp_bpf_send_verdict() fails to allocate psock->cork.
tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().Liao Yuanhong (1):
wifi: mac80211: fix incorrect type for ret
Lukasz Czapnik (7):
i40e: fix idx validation in i40e_validate_queue_map
i40e: fix input validation logic for action_meta
i40e: add max boundary check for VF filters
i40e: add validation for ring_len param
i40e: fix idx validation in config queues msg
i40e: fix validation of VF state in get resources
i40e: add mask to apply valid bits for itr_idx
Maciej Fijalkowski (1):
i40e: remove redundant memory barrier when cleaning Tx descs
Maciej S. Szmigiero (1):
KVM: SVM: Sync TPR from LAPIC into VMCB::V_TPR even if AVIC is active
Mark Tinguely (1):
ocfs2: fix recursive semaphore deadlock in fiemap call
Mathias Nyman (1):
usb: hub: Fix flushing of delayed work used for post resume purposes
Miaohe Lin (1):
mm/memory-failure: fix VM_BUG_ON_PAGE(PagePoisoned(page)) when unpoison memory
Michal Schmidt (1):
i40e: fix IRQ freeing in i40e_vsi_request_irq_msix error path
Miklos Szeredi (2):
fuse: check if copy_file_range() returns larger than requested size
fuse: prevent overflow in copy_file_range return value
Nathan Chancellor (1):
nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/*
Nitesh Narayan Lal (1):
i40e: Use irq_update_affinity_hint()
Or Har-Toov (1):
IB/mlx5: Fix obj_type mismatch for SRQ event subscriptions
Philipp Zabel (1):
net: rfkill: gpio: add DT support
Salah Triki (1):
EDAC/altera: Delete an inappropriate dma_free_coherent() call
Samasth Norway Ananda (1):
fbcon: fix integer overflow in fbcon_do_set_font
Stefan Wahren (1):
net: fec: Fix possible NPD in fec_enet_phy_reset_after_clk_enable()
Stephan Gerhold (1):
dmaengine: qcom: bam_dma: Fix DT error handling for num-channels/ees
Stéphane Grosjean (1):
can: peak_usb: fix shift-out-of-bounds issue
Takashi Iwai (1):
ALSA: usb-audio: Fix build with CONFIG_INPUT=n
Takashi Sakamoto (1):
ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
Tariq Toukan (1):
Revert "net/mlx5e: Update and set Xon/Xoff upon port speed set"
Tetsuo Handa (2):
can: j1939: j1939_sk_bind(): call j1939_priv_put() immediately when j1939_local_ecu_get() failed
can: j1939: j1939_local_ecu_get(): undo increment when j1939_local_ecu_get() failsThomas Fourier (1):
mmc: mvsdio: Fix dma_unmap_sg() nents value
Thomas Gleixner (2):
genirq: Export affinity setter for modules
genirq: Provide new interfaces for affinity hints
Thomas Zimmermann (1):
fbcon: Fix OOB access in font allocation
Trond Myklebust (1):
NFSv4: Don't clear capabilities that won't be reset
Vincent Mailhol (3):
can: hi311x: populate ndo_change_mtu() to prevent buffer overflow
can: sun4i_can: populate ndo_change_mtu() to prevent buffer overflow
can: mcba_usb: populate ndo_change_mtu() to prevent buffer overflow
Wei Yang (1):
mm/khugepaged: fix the address passed to notifier on testing young
Yeounsu Moon (1):
net: natsemi: fix rx_dropped double accounting on netif_rx() failure
Zabelin Nikita (1):
drm/gma500: Fix null dereference in hdmi teardown
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 299 +SUBLEVEL = 300 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/x86/kvm/svm.c +1 -2
@@ -5580,8 +5580,7 @@ static inline void sync_lapic_to_cr8(struct kvm_vcpu *vcpu)struct vcpu_svm *svm =to_svm (vcpu);u64 cr8; -if (svm_nested_virtualize_tpr (vcpu) || -kvm_vcpu_apicv_active (vcpu)) +if (svm_nested_virtualize_tpr (vcpu))return ; cr8 =kvm_get_cr8 (vcpu);
drivers/dma/qcom/bam_dma.c +6 -2
@@ -1266,13 +1266,17 @@ static int bam_dma_probe(struct platform_device *pdev)if (bdev->controlled_remotely) { ret =of_property_read_u32 (pdev->dev.of_node,"num-channels" , &bdev->num_channels); -if (ret) +if (ret) {dev_err (bdev->dev,"num-channels unspecified in dt\n" ); +return ret; + } ret =of_property_read_u32 (pdev->dev.of_node,"qcom,num-ees" , &bdev->num_ees); -if (ret) +if (ret) {dev_err (bdev->dev,"num-ees unspecified in dt\n" ); +return ret; + } } bdev->bamclk =devm_clk_get (bdev->dev,"bam_clk" );
drivers/dma/ti/edma.c +2 -2
@@ -2029,8 +2029,8 @@ static int edma_setup_from_hw(struct device *dev, struct edma_soc_info *pdata,* priority. So Q0 is the highest priority queue and the last queue has * the lowest priority. */ - queue_priority_map =devm_kcalloc (dev, ecc->num_tc +1 ,sizeof (s8), -GFP_KERNEL ); + queue_priority_map =devm_kcalloc (dev, ecc->num_tc +1 , +sizeof (*queue_priority_map),GFP_KERNEL );if (!queue_priority_map)return -ENOMEM ;
drivers/edac/altera_edac.c +0 -1
@@ -125,7 +125,6 @@ static ssize_t altr_sdr_mc_err_inject_write(struct file *file, ptemp =dma_alloc_coherent (mci->pdev,16 , &dma_handle,GFP_KERNEL );if (!ptemp) { -dma_free_coherent (mci->pdev,16 , ptemp, dma_handle);edac_printk (KERN_ERR ,EDAC_MC ,"Inject: Buffer Allocation error\n" );return -ENOMEM ;
drivers/gpu/drm/gma500/oaktrail_hdmi.c +1 -1
@@ -741,8 +741,8 @@ void oaktrail_hdmi_teardown(struct drm_device *dev)if (hdmi_dev) { pdev = hdmi_dev->dev; -pci_set_drvdata (pdev,NULL );oaktrail_hdmi_i2c_exit (pdev); +pci_set_drvdata (pdev,NULL );iounmap (hdmi_dev->regs);kfree (hdmi_dev);pci_dev_put (pdev);
drivers/infiniband/hw/mlx5/devx.c +1 -0
@@ -245,6 +245,7 @@ static u16 get_legacy_obj_type(u16 opcode) {switch (opcode) {case MLX5_CMD_OP_CREATE_RQ : +case MLX5_CMD_OP_CREATE_RMP :return MLX5_EVENT_QUEUE_TYPE_RQ ;case MLX5_CMD_OP_CREATE_QP :return MLX5_EVENT_QUEUE_TYPE_QP ;
drivers/mmc/host/mvsdio.c +1 -1
@@ -292,7 +292,7 @@ static u32 mvsd_finish_data(struct mvsd_host *host, struct mmc_data *data, host->pio_ptr =NULL ; host->pio_size =0 ; }else { -dma_unmap_sg (mmc_dev (host->mmc), data->sg, host->sg_frags, +dma_unmap_sg (mmc_dev (host->mmc), data->sg, data->sg_len,mmc_get_dma_dir (data)); }
drivers/mtd/nand/raw/atmel/nand-controller.c +14 -4
@@ -1312,13 +1312,23 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand,return ret;/* -* The write cycle timing is directly matching tWC, but is also +* Read setup timing depends on the operation done on the NAND: +* +* NRD_SETUP = max(tAR, tCLR) +*/ + timeps =max (conf->timings.sdr.tAR_min, conf->timings.sdr.tCLR_min); + ncycles =DIV_ROUND_UP (timeps, mckperiodps); + totalcycles += ncycles; + ret =atmel_smc_cs_conf_set_setup (smcconf,ATMEL_SMC_NRD_SHIFT , ncycles); +if (ret) +return ret; + +/* +* The read cycle timing is directly matching tRC, but is also * dependent on the setup and hold timings we calculated earlier, * which gives: * -* NRD_CYCLE = max(tRC, NRD_PULSE + NRD_HOLD) -* -* NRD_SETUP is always 0. +* NRD_CYCLE = max(tRC, NRD_SETUP + NRD_PULSE + NRD_HOLD) */ ncycles =DIV_ROUND_UP (conf->timings.sdr.tRC_min, mckperiodps); ncycles =max (totalcycles, ncycles);
drivers/mtd/nand/raw/stm32_fmc2_nand.c +24 -21
96 lines not on this page · raw message
drivers/net/can/rcar/rcar_can.c +1 -7
@@ -869,7 +869,6 @@ static int __maybe_unused rcar_can_resume(struct device *dev) {struct net_device *ndev =dev_get_drvdata (dev);struct rcar_can_priv *priv =netdev_priv (ndev); -u16 ctlr;int err;if (!netif_running (ndev))
@@ -881,12 +880,7 @@ static int __maybe_unused rcar_can_resume(struct device *dev)return err; } - ctlr =readw (&priv->regs->ctlr); - ctlr &= ~RCAR_CAN_CTLR_SLPM ; -writew (ctlr, &priv->regs->ctlr); - ctlr &= ~RCAR_CAN_CTLR_CANM ; -writew (ctlr, &priv->regs->ctlr); - priv->can.state =CAN_STATE_ERROR_ACTIVE ; +rcar_can_start (ndev);netif_device_attach (ndev);netif_start_queue (ndev);
drivers/net/can/spi/hi311x.c +1 -0
@@ -807,6 +807,7 @@ static const struct net_device_ops hi3110_netdev_ops = { .ndo_open = hi3110_open, .ndo_stop = hi3110_stop, .ndo_start_xmit = hi3110_hard_start_xmit, + .ndo_change_mtu = can_change_mtu, };static const struct of_device_id hi3110_of_match[] = {
drivers/net/can/sun4i_can.c +1 -0
@@ -752,6 +752,7 @@ static const struct net_device_ops sun4ican_netdev_ops = { .ndo_open = sun4ican_open, .ndo_stop = sun4ican_close, .ndo_start_xmit = sun4ican_start_xmit, + .ndo_change_mtu = can_change_mtu, };static const struct of_device_id sun4ican_of_match[] = {
drivers/net/can/usb/mcba_usb.c +1 -0
@@ -769,6 +769,7 @@ static const struct net_device_ops mcba_netdev_ops = { .ndo_open = mcba_usb_open, .ndo_stop = mcba_usb_close, .ndo_start_xmit = mcba_usb_start_xmit, + .ndo_change_mtu = can_change_mtu, };/* Microchip CANBUS has hardcoded bittiming values by default.
drivers/net/can/usb/peak_usb/pcan_usb_core.c +1 -1
@@ -84,7 +84,7 @@ void peak_usb_update_ts_now(struct peak_time_ref *time_ref, u32 ts_now)u32 delta_ts = time_ref->ts_dev_2 - time_ref->ts_dev_1;if (time_ref->ts_dev_2 < time_ref->ts_dev_1) - delta_ts &= (1 << time_ref->adapter->ts_used_bits) -1 ; + delta_ts &= (1ULL << time_ref->adapter->ts_used_bits) -1 ; time_ref->ts_total += delta_ts; }
drivers/net/ethernet/broadcom/cnic.c +1 -2
@@ -4224,8 +4224,7 @@ static void cnic_cm_stop_bnx2x_hw(struct cnic_dev *dev)cnic_bnx2x_delete_wait (dev,0 ); -cancel_delayed_work (&cp->delete_task); -flush_workqueue (cnic_wq); +cancel_delayed_work_sync (&cp->delete_task);if (atomic_read (&cp->iscsi_conn) !=0 ) netdev_warn(dev->netdev, "%d iSCSI connections not destroyed\n",
drivers/net/ethernet/cavium/liquidio/request_manager.c +1 -1
@@ -139,7 +139,7 @@ int octeon_init_instr_queue(struct octeon_device *oct, oct->io_qmask.iq |=BIT_ULL (iq_no);/* Set the 32B/64B mode for each input queue */ - oct->io_qmask.iq64B |= ((conf->instr_type ==64 ) << iq_no); + oct->io_qmask.iq64B |= ((u64)(conf->instr_type ==64 ) << iq_no); iq->iqcmd_64B = (conf->instr_type ==64 ); oct->fn_list.setup_iq_regs (oct, iq_no);
drivers/net/ethernet/freescale/fec_main.c +2 -1
@@ -2018,7 +2018,8 @@ static void fec_enet_phy_reset_after_clk_enable(struct net_device *ndev)*/ phy_dev =of_phy_find_device (fep->phy_node);phy_reset_after_clk_enable (phy_dev); -put_device (&phy_dev->mdio.dev); +if (phy_dev) +put_device (&phy_dev->mdio.dev); } }
drivers/net/ethernet/intel/i40e/i40e.h +1 -0
@@ -48,6 +48,7 @@#define I40E_MAX_VEB 16#define I40E_MAX_NUM_DESCRIPTORS 4096 +#define I40E_MAX_NUM_DESCRIPTORS_XL710 8160#define I40E_MAX_CSR_SPACE (4 * 1024 * 1024 - 64 * 1024)#define I40E_DEFAULT_NUM_DESCRIPTORS 512#define I40E_REQ_DESCRIPTOR_MULTIPLE 32
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +19 -6
@@ -1914,6 +1914,18 @@ static void i40e_get_drvinfo(struct net_device *netdev, drvinfo->n_priv_flags +=I40E_GL_PRIV_FLAGS_STR_LEN ; } +static u32 i40e_get_max_num_descriptors (struct i40e_pf *pf) +{ +struct i40e_hw *hw = &pf->hw; + +switch (hw->mac.type) { +case I40E_MAC_XL710 : +return I40E_MAX_NUM_DESCRIPTORS_XL710 ; +default : +return I40E_MAX_NUM_DESCRIPTORS ; + } +} +static void i40e_get_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) {
@@ -1921,8 +1933,8 @@ static void i40e_get_ringparam(struct net_device *netdev,struct i40e_pf *pf = np->vsi->back;struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; - ring->rx_max_pending =I40E_MAX_NUM_DESCRIPTORS ; - ring->tx_max_pending =I40E_MAX_NUM_DESCRIPTORS ; + ring->rx_max_pending =i40e_get_max_num_descriptors (pf); + ring->tx_max_pending =i40e_get_max_num_descriptors (pf); ring->rx_mini_max_pending =0 ; ring->rx_jumbo_max_pending =0 ; ring->rx_pending = vsi->rx_rings[0 ]->count;
@@ -1945,12 +1957,12 @@ static bool i40e_active_tx_ring_index(struct i40e_vsi *vsi, u16 index)static int i40e_set_ringparam (struct net_device *netdev,struct ethtool_ringparam *ring) { +u32 new_rx_count, new_tx_count, max_num_descriptors;struct i40e_ring *tx_rings =NULL , *rx_rings =NULL ;struct i40e_netdev_priv *np =netdev_priv (netdev);struct i40e_hw *hw = &np->vsi->back->hw;struct i40e_vsi *vsi = np->vsi;struct i40e_pf *pf = vsi->back; -u32 new_rx_count, new_tx_count;u16 tx_alloc_queue_pairs;int timeout =50 ;int i, err =0 ;
@@ -1958,14 +1970,15 @@ static int i40e_set_ringparam(struct net_device *netdev,if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending))return -EINVAL ; -if (ring->tx_pending >I40E_MAX_NUM_DESCRIPTORS || + max_num_descriptors =i40e_get_max_num_descriptors (pf); +if (ring->tx_pending > max_num_descriptors || ring->tx_pending <I40E_MIN_NUM_DESCRIPTORS || - ring->rx_pending >I40E_MAX_NUM_DESCRIPTORS || + ring->rx_pending > max_num_descriptors || ring->rx_pending <I40E_MIN_NUM_DESCRIPTORS ) {netdev_info (netdev,"Descriptors requested (Tx: %d / Rx: %d) out of range [%d-%d]\n" , ring->tx_pending, ring->rx_pending, -I40E_MIN_NUM_DESCRIPTORS ,I40E_MAX_NUM_DESCRIPTORS ); +I40E_MIN_NUM_DESCRIPTORS , max_num_descriptors);return -EINVAL ; }
drivers/net/ethernet/intel/i40e/i40e_main.c +5 -5
@@ -3882,10 +3882,10 @@ static int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename)* * get_cpu_mask returns a static constant mask with * a permanent lifetime so it's ok to pass to -* irq_set_affinity_hint without making a copy. +* irq_update_affinity_hint without making a copy. */ cpu =cpumask_local_spread (q_vector->v_idx,-1 ); -irq_set_affinity_hint (irq_num,get_cpu_mask (cpu)); +irq_update_affinity_hint (irq_num,get_cpu_mask (cpu)); } vsi->irqs_ready = true;
@@ -3896,8 +3896,8 @@ static int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename) vector--; irq_num = pf->msix_entries[base + vector].vector;irq_set_affinity_notifier (irq_num,NULL ); -irq_set_affinity_hint (irq_num,NULL ); -free_irq (irq_num, &vsi->q_vectors[vector]); +irq_update_affinity_hint (irq_num,NULL ); +free_irq (irq_num, vsi->q_vectors[vector]); }return err; }
@@ -4714,7 +4714,7 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi)/* clear the affinity notifier in the IRQ descriptor */ irq_set_affinity_notifier (irq_num,NULL );/* remove our suggested affinity mask for this IRQ */ -irq_set_affinity_hint (irq_num,NULL ); +irq_update_affinity_hint (irq_num,NULL );synchronize_irq (irq_num);free_irq (irq_num, vsi->q_vectors[i]);
drivers/net/ethernet/intel/i40e/i40e_txrx.c +0 -3
@@ -794,9 +794,6 @@ static bool i40e_clean_tx_irq(struct i40e_vsi *vsi,if (!eop_desc)break ; -/* prevent any other reads prior to eop_desc */ -smp_rmb (); -i40e_trace (clean_tx_irq, tx_ring, tx_desc, tx_buf);/* we have caught up to head, no work left to do */ if (tx_head == tx_desc)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +39 -7
124 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +2 -1
@@ -41,7 +41,8 @@ enum i40e_vf_states {I40E_VF_STATE_MC_PROMISC ,I40E_VF_STATE_UC_PROMISC ,I40E_VF_STATE_PRE_ENABLE , - I40E_VF_STATE_RESETTING +I40E_VF_STATE_RESETTING , + I40E_VF_STATE_RESOURCES_LOADED, };/* VF capabilities */
drivers/net/ethernet/intel/igb/igb_ethtool.c +1 -4
@@ -2070,11 +2070,8 @@ static void igb_diag_test(struct net_device *netdev, }else {dev_info (&adapter->pdev->dev,"online testing starting\n" ); -/* PHY is powered down when interface is down */ -if (if_running &&igb_link_test (adapter, &data[TEST_LINK ])) +if (igb_link_test (adapter, &data[TEST_LINK ])) eth_test->flags |=ETH_TEST_FL_FAILED ; -else - data[TEST_LINK ] =0 ;/* Online tests aren't run; pass by default */ data[TEST_REG ] =0 ;
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +0 -2
@@ -141,8 +141,6 @@ void mlx5e_update_carrier(struct mlx5e_priv *priv)if (port_state ==VPORT_STATE_UP ) {netdev_info (priv->netdev,"Link up\n" );netif_carrier_on (priv->netdev); -mlx5e_port_manual_buffer_config (priv,0 , priv->netdev->mtu, -NULL ,NULL ,NULL ); }else {netdev_info (priv->netdev,"Link down\n" );netif_carrier_off (priv->netdev);
drivers/net/ethernet/natsemi/ns83820.c +6 -7
@@ -818,7 +818,7 @@ static void rx_irq(struct net_device *ndev)struct ns83820 *dev =PRIV (ndev);struct rx_info *info = &dev->rx_info;unsigned next_rx; -int rx_rc, len; +int len;u32 cmdsts;__le32 *desc;unsigned long flags;
@@ -879,8 +879,10 @@ static void rx_irq(struct net_device *ndev)if (likely (CMDSTS_OK & cmdsts)) {#endif skb_put (skb, len); -if (unlikely (!skb)) +if (unlikely (!skb)) { + ndev->stats.rx_dropped++; goto netdev_mangle_me_harder_failed; + }if (cmdsts &CMDSTS_DEST_MULTI ) ndev->stats.multicast++; ndev->stats.rx_packets++;
@@ -899,15 +901,12 @@ static void rx_irq(struct net_device *ndev) __vlan_hwaccel_put_tag(skb, htons(ETH_P_IPV6), tag); }#endif - rx_rc =netif_rx (skb); -if (NET_RX_DROP == rx_rc) { -netdev_mangle_me_harder_failed: - ndev->stats.rx_dropped++; - } +netif_rx (skb); }else {dev_kfree_skb_irq (skb); } +netdev_mangle_me_harder_failed: nr++; next_rx = info->next_rx; desc = info->descs + (DESC_SIZE * next_rx);
drivers/pcmcia/omap_cf.c +7 -1
@@ -327,7 +327,13 @@ static int __exit omap_cf_remove(struct platform_device *pdev)return 0 ; } -static struct platform_driver omap_cf_driver = { +/* +* omap_cf_remove() lives in .exit.text. For drivers registered via +* platform_driver_probe() this is ok because they cannot get unbound at +* runtime. So mark the driver struct with __refdata to prevent modpost +* triggering a section mismatch warning. +*/ +static struct platform_driver omap_cf_driver__refdata = { .driver = { .name = (char *) driver_name, },
drivers/phy/ti/phy-ti-pipe3.c +13 -0
@@ -667,12 +667,20 @@ static int ti_pipe3_get_clk(struct ti_pipe3 *phy)return 0 ; } +static void ti_pipe3_put_device (void *_dev) +{ +struct device *dev = _dev; + +put_device (dev); +} +static int ti_pipe3_get_sysctrl (struct ti_pipe3 *phy) {struct device *dev = phy->dev;struct device_node *node = dev->of_node;struct device_node *control_node;struct platform_device *control_pdev; +int ret; phy->phy_power_syscon =syscon_regmap_lookup_by_phandle (node,"syscon-phy-power" );
@@ -703,6 +711,11 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy) } phy->control_dev = &control_pdev->dev; + + ret =devm_add_action_or_reset (dev, ti_pipe3_put_device, + phy->control_dev); +if (ret) +return ret; }if (phy->mode ==PIPE3_MODE_PCIE ) {
drivers/power/supply/bq27xxx_battery.c +2 -2
@@ -1552,8 +1552,8 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)bool has_singe_flag = di->opts &BQ27XXX_O_ZERO ; cache.flags =bq27xxx_read (di,BQ27XXX_REG_FLAGS , has_singe_flag); -if ((cache.flags &0xff ) ==0xff ) - cache.flags =-1 ;/* read error */ +if (di->chip ==BQ27000 && (cache.flags &0xff ) ==0xff ) + cache.flags = -ENODEV ;/* bq27000 hdq read error */ if (cache.flags >=0 ) { cache.temperature =bq27xxx_battery_read_temperature (di);if (has_ci_flag && (cache.flags &BQ27000_FLAG_CI )) {
drivers/soc/qcom/mdt_loader.c +7 -5
@@ -39,12 +39,14 @@ static bool mdt_header_valid(const struct firmware *fw)if (phend > fw->size)return false; -if (ehdr->e_shentsize !=sizeof (struct elf32_shdr )) -return false; +if (ehdr->e_shentsize || ehdr->e_shnum) { +if (ehdr->e_shentsize !=sizeof (struct elf32_shdr )) +return false; - shend =size_add (size_mul (sizeof (struct elf32_shdr ), ehdr->e_shnum), ehdr->e_shoff); -if (shend > fw->size) -return false; + shend =size_add (size_mul (sizeof (struct elf32_shdr ), ehdr->e_shnum), ehdr->e_shoff); +if (shend > fw->size) +return false; + }return true; }
drivers/tty/hvc/hvc_console.c +3 -3
@@ -543,10 +543,10 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count }/* -* Racy, but harmless, kick thread if there is still pending data. +* Kick thread to flush if there's still pending data +* or to wakeup the write queue. */ -if (hp->n_outbuf) -hvc_kick (); +hvc_kick ();return written; }
drivers/tty/serial/sc16is7xx.c +2 -11
@@ -1032,16 +1032,6 @@ static int sc16is7xx_startup(struct uart_port *port)sc16is7xx_port_write (port,SC16IS7XX_FCR_REG ,SC16IS7XX_FCR_FIFO_BIT ); -/* Enable EFR */ -sc16is7xx_port_write (port,SC16IS7XX_LCR_REG , -SC16IS7XX_LCR_CONF_MODE_B ); - -regcache_cache_bypass (s->regmap, true); - -/* Enable write access to enhanced features and internal clock div */ -sc16is7xx_port_write (port,SC16IS7XX_EFR_REG , -SC16IS7XX_EFR_ENABLE_BIT ); -/* Enable TCR/TLR */ sc16is7xx_port_update(port, SC16IS7XX_MCR_REG, SC16IS7XX_MCR_TCRTLR_BIT,
@@ -1053,7 +1043,8 @@ static int sc16is7xx_startup(struct uart_port *port)SC16IS7XX_TCR_RX_RESUME (24 ) | SC16IS7XX_TCR_RX_HALT(48)); -regcache_cache_bypass (s->regmap, false); +/* Disable TCR/TLR access */ +sc16is7xx_port_update (port,SC16IS7XX_MCR_REG ,SC16IS7XX_MCR_TCRTLR_BIT ,0 );/* Now, initialize the UART */ sc16is7xx_port_write (port,SC16IS7XX_LCR_REG ,SC16IS7XX_LCR_WORD_LEN_8 );
drivers/usb/core/hub.c +8 -13
@@ -1030,12 +1030,11 @@ int usb_remove_device(struct usb_device *udev)enum hub_activation_type {HUB_INIT ,HUB_INIT2 ,HUB_INIT3 ,/* INITs must come first */ -HUB_POST_RESET ,HUB_RESUME ,HUB_RESET_RESUME ,HUB_POST_RESUME , +HUB_POST_RESET ,HUB_RESUME ,HUB_RESET_RESUME , };static void hub_init_func2 (struct work_struct *ws);static void hub_init_func3 (struct work_struct *ws); -static void hub_post_resume (struct work_struct *ws);static void hub_activate (struct usb_hub *hub,enum hub_activation_type type) {
@@ -1059,12 +1058,6 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) goto init3; } -if (type ==HUB_POST_RESUME ) { -usb_autopm_put_interface_async (to_usb_interface (hub->intfdev)); -kref_put (&hub->kref, hub_release); -return ; - } -kref_get (&hub->kref);/* The superspeed hub except for root hub has to use Hub Depth
@@ -1318,8 +1311,8 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)usb_autopm_get_interface_no_resume (to_usb_interface (hub->intfdev)); -INIT_DELAYED_WORK (&hub->init_work, hub_post_resume); -queue_delayed_work (system_power_efficient_wq, &hub->init_work, +queue_delayed_work (system_power_efficient_wq, + &hub->post_resume_work,msecs_to_jiffies (USB_SS_PORT_U0_WAKE_TIME ));return ; }
@@ -1344,9 +1337,10 @@ static void hub_init_func3(struct work_struct *ws)static void hub_post_resume (struct work_struct *ws) { - struct usb_hub *hub = container_of(ws, struct usb_hub, init_work.work); + struct usb_hub *hub = container_of(ws, struct usb_hub, post_resume_work.work); -hub_activate (hub,HUB_POST_RESUME ); +usb_autopm_put_interface_async (to_usb_interface (hub->intfdev)); +kref_put (&hub->kref, hub_release); }enum hub_quiescing_type {
@@ -1374,7 +1368,7 @@ static void hub_quiesce(struct usb_hub *hub, enum hub_quiescing_type type)/* Stop hub_wq and related activity */ del_timer_sync (&hub->irq_urb_retry); -flush_delayed_work (&hub->init_work); +flush_delayed_work (&hub->post_resume_work);usb_kill_urb (hub->urb);if (hub->has_indicators)cancel_delayed_work_sync (&hub->leds);
@@ -1921,6 +1915,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) hub->hdev = hdev;INIT_DELAYED_WORK (&hub->leds, led_work);INIT_DELAYED_WORK (&hub->init_work,NULL ); +INIT_DELAYED_WORK (&hub->post_resume_work, hub_post_resume);INIT_WORK (&hub->events, hub_event);spin_lock_init (&hub->irq_urb_lock);timer_setup (&hub->irq_urb_retry, hub_retry_irq_urb,0 );
drivers/usb/core/hub.h +1 -0
@@ -69,6 +69,7 @@ struct usb_hub {u8 indicator[USB_MAXCHILDREN ];struct delayed_work leds;struct delayed_work init_work; +struct delayed_work post_resume_work;struct work_struct events;spinlock_t irq_urb_lock;struct timer_list irq_urb_retry;
drivers/usb/core/quirks.c +1 -1
@@ -728,7 +728,7 @@ void usb_detect_quirks(struct usb_device *udev) udev->quirks ^=usb_detect_dynamic_quirks (udev);if (udev->quirks) -dev_dbg (&udev->dev,"USB quirks for this device: %x\n" , +dev_dbg (&udev->dev,"USB quirks for this device: 0x%x\n" , udev->quirks);#ifdef CONFIG_USB_DEFAULT_PERSIST
drivers/usb/gadget/udc/dummy_hcd.c +13 -12
@@ -748,7 +748,7 @@ static int dummy_dequeue(struct usb_ep *_ep, struct usb_request *_req)struct dummy *dum;int retval = -EINVAL ;unsigned long flags; -struct dummy_request *req =NULL ; +struct dummy_request *req =NULL , *iter;if (!_ep || !_req)return retval;
@@ -758,25 +758,26 @@ static int dummy_dequeue(struct usb_ep *_ep, struct usb_request *_req)if (!dum->driver)return -ESHUTDOWN ; -local_irq_save (flags); -spin_lock (&dum->lock); -list_for_each_entry (req, &ep->queue, queue) { -if (&req->req == _req) { -list_del_init (&req->queue); - _req->status = -ECONNRESET ; - retval =0 ; -break ; - } +spin_lock_irqsave (&dum->lock, flags); +list_for_each_entry (iter, &ep->queue, queue) { +if (&iter->req != _req) +continue ; +list_del_init (&iter->queue); + _req->status = -ECONNRESET ; + req = iter; + retval =0 ; +break ; } -spin_unlock (&dum->lock);if (retval ==0 ) {dev_dbg (udc_dev (dum),"dequeued req %p from %s, len %d buf %p\n" , req, _ep->name, _req->length, _req->buf); +spin_unlock (&dum->lock);usb_gadget_giveback_request (_ep, _req); +spin_lock (&dum->lock); } -local_irq_restore (flags); +spin_unlock_irqrestore (&dum->lock, flags);return retval; }
drivers/usb/serial/option.c +17 -0
@@ -1322,7 +1322,18 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1033, 0xff), /* Telit LE910C1-EUX (ECM) */ .driver_info = NCTRL(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1034, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1035, 0xff) }, /* Telit LE910C4-WWX (ECM) */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1036, 0xff) }, /* Telit LE910C4-WWX */ + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1037, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = NCTRL(0) | NCTRL(1) | RSVD(4) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1038, 0xff), /* Telit LE910C4-WWX (rmnet) */ + .driver_info = NCTRL(0) | RSVD(3) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x103b, 0xff), /* Telit LE910C4-WWX */ + .driver_info = NCTRL(0) | NCTRL(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x103c, 0xff), /* Telit LE910C4-WWX */ + .driver_info = NCTRL(0) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG0), .driver_info = RSVD(0) | RSVD(1) | NCTRL(2) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE922_USBCFG1),
@@ -1369,6 +1380,12 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(0) | RSVD(1) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1075, 0xff), /* Telit FN990A (PCIe) */ .driver_info = RSVD(0) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1077, 0xff), /* Telit FN990A (rmnet + audio) */ + .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1078, 0xff), /* Telit FN990A (MBIM + audio) */ + .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1079, 0xff), /* Telit FN990A (RNDIS + audio) */ + .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1080, 0xff), /* Telit FE990A (rmnet) */ .driver_info = NCTRL(0) | RSVD(1) | RSVD(2) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1081, 0xff), /* Telit FE990A (MBIM) */
drivers/video/fbdev/core/fbcon.c +10 -3
@@ -2482,7 +2482,7 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font,unsigned charcount = font->charcount;int w = font->width;int h = font->height; -int size; +int size, alloc_size;int i, csum;u8 *new_data, *data = font->data;int pitch =PITCH (font->width);
@@ -2509,9 +2509,16 @@ static int fbcon_set_font(struct vc_data *vc, struct console_font *font,if (fbcon_invalid_charcount (info, charcount))return -EINVAL ; - size =CALC_FONTSZ (h, pitch, charcount); +/* Check for integer overflow in font size calculation */ +if (check_mul_overflow (h, pitch, &size) || +check_mul_overflow (size, charcount, &size)) +return -EINVAL ; + +/* Check for overflow in allocation size calculation */ +if (check_add_overflow (FONT_EXTRA_WORDS *sizeof (int ), size, &alloc_size)) +return -EINVAL ; - new_data =kmalloc (FONT_EXTRA_WORDS *sizeof (int ) + size,GFP_USER ); + new_data =kmalloc (alloc_size,GFP_USER );if (!new_data)return -ENOMEM ;
fs/fuse/file.c +4 -1
@@ -3299,7 +3299,7 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, .nodeid_out = ff_out->nodeid, .fh_out = ff_out->fh, .off_out = pos_out, - .len = len, + .len = min_t(size_t, len, UINT_MAX & PAGE_MASK), .flags = flags };struct fuse_write_out outarg;
@@ -3365,6 +3365,9 @@ static ssize_t __fuse_copy_file_range(struct file *file_in, loff_t pos_in, fc->no_copy_file_range =1 ; err = -EOPNOTSUPP ; } +if (!err && outarg.size > len) + err = -EIO ; +if (err) goto out;
fs/hugetlbfs/inode.c +6 -8
@@ -502,13 +502,13 @@ static void remove_inode_hugepages(struct inode *inode, loff_t lstart,/* * If page is mapped, it was faulted in after being -* unmapped in caller. Unmap (again) now after taking -* the fault mutex. The mutex will prevent faults -* until we finish removing the page. -* -* This race can only happen in the hole punch case. -* Getting here in a truncate operation is a bug. +* unmapped in caller or hugetlb_vmdelete_list() skips +* unmapping it due to fail to grab lock. Unmap (again) +* while holding the fault mutex. The mutex will prevent +* faults until we finish removing the page. Hold page +* lock to guarantee no concurrent migration. */ +lock_page (page);if (unlikely (page_mapped (page))) {BUG_ON (truncate_op);
@@ -518,8 +518,6 @@ static void remove_inode_hugepages(struct inode *inode, loff_t lstart, (index + 1) * pages_per_huge_page(h));i_mmap_unlock_write (mapping); } - -lock_page (page);/* * We must free the huge page and remove from page * cache (remove_huge_page) BEFORE removing the
fs/nfs/nfs4proc.c +0 -1
@@ -3885,7 +3885,6 @@ int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle) };int err; -nfs_server_set_init_caps (server); do { err = nfs4_handle_exception(server, _nfs4_server_capabilities(server, fhandle),
fs/nilfs2/sysfs.c +2 -2
@@ -1081,7 +1081,7 @@ void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs)************************************************************************/ static ssize_t nilfs_feature_revision_show (struct kobject *kobj, -struct attribute *attr,char *buf) +struct kobj_attribute *attr,char *buf) {return sysfs_emit (buf,"%d.%d\n" ,NILFS_CURRENT_REV ,NILFS_MINOR_REV );
@@ -1093,7 +1093,7 @@ static const char features_readme_str[] ="(1) revision\n\tshow current revision of NILFS file system driver.\n" ;static ssize_t nilfs_feature_README_show (struct kobject *kobj, -struct attribute *attr, +struct kobj_attribute *attr,char *buf) {return sysfs_emit (buf, features_readme_str);
fs/nilfs2/sysfs.h +4 -4
@@ -50,16 +50,16 @@ struct nilfs_sysfs_dev_subgroups {struct completion sg_segments_kobj_unregister; }; -#define NILFS_COMMON_ATTR_STRUCT (name) \ +#define NILFS_KOBJ_ATTR_STRUCT (name) \ struct nilfs_##name##_attr { \ struct attribute attr; \ - ssize_t (*show)(struct kobject *, struct attribute *, \ + ssize_t (*show)(struct kobject *, struct kobj_attribute *, \ char *); \ - ssize_t (*store)(struct kobject *, struct attribute *, \ + ssize_t (*store)(struct kobject *, struct kobj_attribute *, \ const char *, size_t); \ } -NILFS_COMMON_ATTR_STRUCT (feature); +NILFS_KOBJ_ATTR_STRUCT (feature);#define NILFS_DEV_ATTR_STRUCT (name) \ struct nilfs_##name##_attr { \
fs/ocfs2/extent_map.c +9 -1
@@ -698,6 +698,8 @@ int ocfs2_extent_map_get_blocks(struct inode *inode, u64 v_blkno, u64 *p_blkno,* it not only handles the fiemap for inlined files, but also deals * with the fast symlink, cause they have no difference for extent * mapping per se. +* +* Must be called with ip_alloc_sem semaphore held. */ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh, struct fiemap_extent_info *fieinfo,
@@ -709,6 +711,7 @@ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh,u64 phys;u32 flags =FIEMAP_EXTENT_DATA_INLINE |FIEMAP_EXTENT_LAST ;struct ocfs2_inode_info *oi =OCFS2_I (inode); +lockdep_assert_held_read (&oi->ip_alloc_sem); di = (struct ocfs2_dinode *)di_bh->b_data;if (ocfs2_inode_is_fast_symlink (inode))
@@ -724,8 +727,11 @@ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh, phys += offsetof(struct ocfs2_dinode , id2.i_data.id_data); +/* Release the ip_alloc_sem to prevent deadlock on page fault */ +up_read (&OCFS2_I (inode)->ip_alloc_sem); ret =fiemap_fill_next_extent (fieinfo,0 , phys, id_count, flags); +down_read (&OCFS2_I (inode)->ip_alloc_sem);if (ret <0 )return ret; }
@@ -796,9 +802,11 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, len_bytes = (u64 )le16_to_cpu (rec.e_leaf_clusters) << osb->s_clustersize_bits; phys_bytes =le64_to_cpu (rec.e_blkno) << osb->sb->s_blocksize_bits; virt_bytes = (u64 )le32_to_cpu (rec.e_cpos) << osb->s_clustersize_bits; - +/* Release the ip_alloc_sem to prevent deadlock on page fault */ +up_read (&OCFS2_I (inode)->ip_alloc_sem); ret =fiemap_fill_next_extent (fieinfo, virt_bytes, phys_bytes, len_bytes, fe_flags); +down_read (&OCFS2_I (inode)->ip_alloc_sem);if (ret)break ;
include/linux/interrupt.h +50 -22
106 lines not on this page · raw message
include/net/sock.h +38 -2
@@ -321,6 +321,8 @@ struct bpf_sk_storage;* @sk_clockid: clockid used by time-based scheduling (SO_TXTIME) * @sk_txtime_deadline_mode: set deadline mode for SO_TXTIME * @sk_txtime_unused: unused txtime flags +* @sk_owner: reference to the real owner of the socket that calls +* sock_lock_init_class_and_name(). */ struct sock {/*
@@ -515,6 +517,10 @@ struct sock {struct bpf_sk_storage __rcu *sk_bpf_storage;#endif struct rcu_head sk_rcu; + +#if IS_ENABLED (CONFIG_PROVE_LOCKING ) &&IS_ENABLED (CONFIG_MODULES ) +struct module *sk_owner; +#endif };enum sk_pacing {
@@ -1525,6 +1531,35 @@ static inline void sock_release_ownership(struct sock *sk) } } +#if IS_ENABLED (CONFIG_PROVE_LOCKING ) &&IS_ENABLED (CONFIG_MODULES ) +static inline void sk_owner_set (struct sock *sk,struct module *owner) +{ +__module_get (owner); + sk->sk_owner = owner; +} + +static inline void sk_owner_clear (struct sock *sk) +{ + sk->sk_owner =NULL ; +} + +static inline void sk_owner_put (struct sock *sk) +{ +module_put (sk->sk_owner); +} +#else +static inline void sk_owner_set (struct sock *sk,struct module *owner) +{ +} + +static inline void sk_owner_clear (struct sock *sk) +{ +} + +static inline void sk_owner_put (struct sock *sk) +{ +} +#endif /* * Macro so as to not evaluate some arguments when * lockdep is not enabled.
@@ -1534,13 +1569,14 @@ static inline void sock_release_ownership(struct sock *sk)*/ #define sock_lock_init_class_and_name (sk, sname, skey, name, key) \ do { \ + sk_owner_set(sk, THIS_MODULE); \ sk->sk_lock.owned = 0; \ init_waitqueue_head(&sk->sk_lock.wq); \ spin_lock_init(&(sk)->sk_lock.slock); \ debug_check_no_locks_freed((void *)&(sk)->sk_lock, \ - sizeof((sk)->sk_lock)); \ + sizeof((sk)->sk_lock)); \ lockdep_set_class_and_name(&(sk)->sk_lock.slock, \ - (skey), (sname)); \ + (skey), (sname)); \ lockdep_init_map(&(sk)->sk_lock.dep_map, (name), (key), 0); \ } while (0)
kernel/cgroup/cgroup.c +36 -7
80 lines not on this page · raw message
kernel/irq/manage.c +106 -5
132 lines not on this page · raw message
mm/khugepaged.c +1 -1
@@ -1227,7 +1227,7 @@ static int khugepaged_scan_pmd(struct mm_struct *mm, }if (pte_young (pteval) ||page_is_young (page) ||PageReferenced (page) || -mmu_notifier_test_young (vma->vm_mm, address)) +mmu_notifier_test_young (vma->vm_mm, _address)) referenced++; }if (writable) {
mm/memory-failure.c +3 -4
@@ -1543,10 +1543,9 @@ int unpoison_memory(unsigned long pfn) static DEFINE_RATELIMIT_STATE(unpoison_rs, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST); -if (!pfn_valid (pfn)) -return -ENXIO ; - - p =pfn_to_page (pfn); + p =pfn_to_online_page (pfn); +if (!p) +return -EIO ; page =compound_head (p);if (!PageHWPoison (p)) {
mm/migrate.c +4 -8
@@ -2967,21 +2967,17 @@ void migrate_vma_finalize(struct migrate_vma *migrate) newpage = page; } +if (!is_zone_device_page (newpage)) +lru_cache_add (newpage);remove_migration_ptes (page, newpage, false);unlock_page (page); migrate->cpages--; -if (is_zone_device_page (page)) -put_page (page); -else -putback_lru_page (page); +put_page (page);if (newpage != page) {unlock_page (newpage); -if (is_zone_device_page (newpage)) -put_page (newpage); -else -putback_lru_page (newpage); +put_page (newpage); } } }
net/can/j1939/bus.c +4 -1
@@ -290,8 +290,11 @@ int j1939_local_ecu_get(struct j1939_priv *priv, name_t name, u8 sa)if (!ecu) ecu =j1939_ecu_create_locked (priv, name); err =PTR_ERR_OR_ZERO (ecu); -if (err) +if (err) { +if (j1939_address_is_unicast (sa)) + priv->ents[sa].nusers--; goto done; + } ecu->nusers++;/* TODO: do we care if ecu->addr != sa? */
net/can/j1939/socket.c +3 -0
@@ -520,6 +520,9 @@ static int j1939_sk_bind(struct socket *sock, struct sockaddr *uaddr, int len) ret =j1939_local_ecu_get (priv, jsk->addr.src_name, jsk->addr.sa);if (ret) {j1939_netdev_stop (priv); + jsk->priv =NULL ; +synchronize_rcu (); +j1939_priv_put (priv); goto out_release_sock; }
net/core/sock.c +5 -0
@@ -1567,6 +1567,8 @@ int sock_getsockopt(struct socket *sock, int level, int optname,*/ static inline void sock_lock_init (struct sock *sk) { +sk_owner_clear (sk); +if (sk->sk_kern_sock) sock_lock_init_class_and_name( sk,
@@ -1652,6 +1654,9 @@ static void sk_prot_free(struct proto *prot, struct sock *sk)cgroup_sk_free (&sk->sk_cgrp_data);mem_cgroup_sk_free (sk);security_sk_free (sk); + +sk_owner_put (sk); +if (slab !=NULL )kmem_cache_free (slab, sk);else
net/ipv4/tcp.c +5 -0
@@ -2593,6 +2593,7 @@ int tcp_disconnect(struct sock *sk, int flags)struct inet_connection_sock *icsk =inet_csk (sk);struct tcp_sock *tp =tcp_sk (sk);int old_state = sk->sk_state; +struct request_sock *req;u32 seq;/* Deny disconnect if other threads are blocked in sk_wait_event()
@@ -2711,6 +2712,10 @@ int tcp_disconnect(struct sock *sk, int flags)/* Clean up fastopen related fields */ + req =rcu_dereference_protected (tp->fastopen_rsk, +lockdep_sock_is_held (sk)); +if (req) +reqsk_fastopen_remove (sk, req, false);tcp_free_fastopen_req (tp); inet->defer_connect =0 ; tp->fastopen_client_fail =0 ;
net/ipv4/tcp_bpf.c +4 -1
@@ -336,8 +336,11 @@ static int tcp_bpf_send_verdict(struct sock *sk, struct sk_psock *psock,if (!psock->cork) { psock->cork =kzalloc (sizeof (*psock->cork),GFP_ATOMIC | __GFP_NOWARN); -if (!psock->cork) +if (!psock->cork) { +sk_msg_free (sk, msg); + *copied =0 ;return -ENOMEM ; + } }memcpy (psock->cork, msg,sizeof (*msg));return 0 ;
net/mac80211/driver-ops.h +1 -1
@@ -1237,7 +1237,7 @@ drv_get_ftm_responder_stats(struct ieee80211_local *local,struct ieee80211_sub_if_data *sdata, struct cfg80211_ftm_responder_stats *ftm_stats) { - u32 ret = -EOPNOTSUPP; + int ret = -EOPNOTSUPP; if (local->ops->get_ftm_responder_stats) ret = local->ops->get_ftm_responder_stats(&local->hw,
net/rds/ib_frmr.c +12 -8
@@ -133,12 +133,15 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr) ret =ib_map_mr_sg_zbva (frmr->mr, ibmr->sg, ibmr->sg_dma_len, &off,PAGE_SIZE ); -if (unlikely (ret != ibmr->sg_dma_len)) -return ret <0 ? ret : -EINVAL ; +if (unlikely (ret != ibmr->sg_dma_len)) { + ret = ret <0 ? ret : -EINVAL ; + goto out_inc; + } -if (cmpxchg (&frmr->fr_state, -FRMR_IS_FREE ,FRMR_IS_INUSE ) !=FRMR_IS_FREE ) -return -EBUSY ; +if (cmpxchg (&frmr->fr_state,FRMR_IS_FREE ,FRMR_IS_INUSE ) !=FRMR_IS_FREE ) { + ret = -EBUSY ; + goto out_inc; + }atomic_inc (&ibmr->ic->i_fastreg_inuse_count);
@@ -166,11 +169,10 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)/* Failure here can be because of -ENOMEM as well */ rds_transition_frwr_state (ibmr,FRMR_IS_INUSE ,FRMR_IS_STALE ); -atomic_inc (&ibmr->ic->i_fastreg_wrs);if (printk_ratelimit ())pr_warn ("RDS/IB: %s returned error(%d)\n" , __func__, ret); - goto out; + goto out_inc; }/* Wait for the registration to complete in order to prevent an invalid
@@ -179,8 +181,10 @@ static int rds_ib_post_reg_frmr(struct rds_ib_mr *ibmr)*/ wait_event (frmr->fr_reg_done, !frmr->fr_reg); -out: +return ret; +out_inc: +atomic_inc (&ibmr->ic->i_fastreg_wrs);return ret; }
net/rfkill/rfkill-gpio.c +19 -3
@@ -78,16 +78,25 @@ static int rfkill_gpio_acpi_probe(struct device *dev,static int rfkill_gpio_probe (struct platform_device *pdev) {struct rfkill_gpio_data *rfkill; +const char *type_name =NULL ; +const char *name_property; +const char *type_property;struct gpio_desc *gpio; -const char *type_name;int ret; rfkill =devm_kzalloc (&pdev->dev,sizeof (*rfkill),GFP_KERNEL );if (!rfkill)return -ENOMEM ; -device_property_read_string (&pdev->dev,"name" , &rfkill->name); -device_property_read_string (&pdev->dev,"type" , &type_name); +if (dev_of_node (&pdev->dev)) { + name_property ="label" ; + type_property ="radio-type" ; + }else { + name_property ="name" ; + type_property ="type" ; + } +device_property_read_string (&pdev->dev, name_property, &rfkill->name); +device_property_read_string (&pdev->dev, type_property, &type_name);if (!rfkill->name) rfkill->name =dev_name (&pdev->dev);
@@ -169,12 +178,19 @@ static const struct acpi_device_id rfkill_acpi_match[] = {MODULE_DEVICE_TABLE (acpi, rfkill_acpi_match);#endif +static const struct of_device_id rfkill_of_match[]__maybe_unused = { + { .compatible ="rfkill-gpio" , }, + { }, +}; +MODULE_DEVICE_TABLE (of, rfkill_of_match); +static struct platform_driver rfkill_gpio_driver = { .probe = rfkill_gpio_probe, .remove = rfkill_gpio_remove, .driver = { .name ="rfkill_gpio" , .acpi_match_table =ACPI_PTR (rfkill_acpi_match), + .of_match_table =of_match_ptr (rfkill_of_match), }, };
sound/firewire/motu/motu-hwdep.c +1 -1
@@ -73,7 +73,7 @@ static __poll_t hwdep_poll(struct snd_hwdep *hwdep, struct file *file, events =0 ;spin_unlock_irq (&motu->lock); -return events |EPOLLOUT ; +return events; }static int hwdep_get_info (struct snd_motu *motu,void __user *arg)
sound/soc/codecs/wm8940.c +1 -1
@@ -218,7 +218,7 @@ static const struct snd_kcontrol_new wm8940_snd_controls[] = {SOC_SINGLE_TLV ("Digital Capture Volume" ,WM8940_ADCVOL ,0 ,255 ,0 , wm8940_adc_tlv),SOC_ENUM ("Mic Bias Level" , wm8940_mic_bias_level_enum), -SOC_SINGLE_TLV ("Capture Boost Volue" ,WM8940_ADCBOOST , +SOC_SINGLE_TLV ("Capture Boost Volume" ,WM8940_ADCBOOST ,8 ,1 ,0 , wm8940_capture_boost_vol_tlv),SOC_SINGLE_TLV ("Speaker Playback Volume" ,WM8940_SPKVOL , 0, 63, 0, wm8940_spk_vol_tlv),
sound/soc/codecs/wm8974.c +6 -2
@@ -427,10 +427,14 @@ static int wm8974_update_clocks(struct snd_soc_dai *dai) fs256 =256 * priv->fs; f =wm8974_get_mclkdiv (priv->mclk, fs256, &mclkdiv); -if (f != priv->mclk) {/* The PLL performs best around 90MHz */ - fpll =wm8974_get_mclkdiv (22500000 , fs256, &mclkdiv); +if (fs256 %8000 ) + f =22579200 ; +else + f =24576000 ; + + fpll =wm8974_get_mclkdiv (f, fs256, &mclkdiv); }wm8974_set_dai_pll (dai,0 ,0 , priv->mclk, fpll);
sound/soc/sof/intel/hda-stream.c +1 -1
@@ -655,7 +655,7 @@ int hda_dsp_stream_init(struct snd_sof_dev *sdev)if (num_capture >=SOF_HDA_CAPTURE_STREAMS ) {dev_err (sdev->dev,"error: too many capture streams %d\n" , - num_playback); + num_capture);return -EINVAL ; }
sound/usb/mixer_quirks.c +274 -5
327 lines not on this page · raw message