Linux 5.4.138
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 137 +SUBLEVEL = 138 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/powerpc/platforms/pseries/setup.c +1 -1
@@ -75,7 +75,7 @@#include "../../../../drivers/pci/pci.h" DEFINE_STATIC_KEY_FALSE (shared_processor); -EXPORT_SYMBOL_GPL (shared_processor); +EXPORT_SYMBOL (shared_processor);int CMO_PrPSP =-1 ;int CMO_SecPSP =-1 ;
arch/x86/include/asm/proto.h +2 -0
@@ -4,6 +4,8 @@#include <asm/ldt.h> +struct task_struct ; +/* misc architecture specific prototypes */ void syscall_init (void );
arch/x86/kvm/ioapic.c +1 -1
@@ -91,7 +91,7 @@ static unsigned long ioapic_read_indirect(struct kvm_ioapic *ioapic,static void rtc_irq_eoi_tracking_reset (struct kvm_ioapic *ioapic) { ioapic->rtc_status.pending_eoi =0 ; -bitmap_zero (ioapic->rtc_status.dest_map.map,KVM_MAX_VCPU_ID ); +bitmap_zero (ioapic->rtc_status.dest_map.map,KVM_MAX_VCPU_ID +1 ); }static void kvm_rtc_eoi_tracking_restore_all (struct kvm_ioapic *ioapic);
arch/x86/kvm/ioapic.h +2 -2
@@ -43,13 +43,13 @@ struct kvm_vcpu;struct dest_map {/* vcpu bitmap where IRQ has been sent */ - DECLARE_BITMAP(map, KVM_MAX_VCPU_ID); + DECLARE_BITMAP(map, KVM_MAX_VCPU_ID + 1);/* * Vector sent to a given vcpu, only valid when * the vcpu's bit in map is set */ -u8 vectors[KVM_MAX_VCPU_ID ]; +u8 vectors[KVM_MAX_VCPU_ID +1 ]; };
drivers/acpi/resource.c +1 -8
@@ -430,13 +430,6 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi, } } -static bool irq_is_legacy (struct acpi_resource_irq *irq) -{ -return irq->triggering ==ACPI_EDGE_SENSITIVE && - irq->polarity ==ACPI_ACTIVE_HIGH && - irq->shareable ==ACPI_EXCLUSIVE ; -} -/** * acpi_dev_resource_interrupt - Extract ACPI interrupt resource information. * @ares: Input ACPI resource object.
@@ -475,7 +468,7 @@ bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, }acpi_dev_get_irqresource (res, irq->interrupts[index], irq->triggering, irq->polarity, - irq->shareable,irq_is_legacy (irq)); + irq->shareable, true);break ;case ACPI_RESOURCE_TYPE_EXTENDED_IRQ : ext_irq = &ares->data.extended_irq;
drivers/hid/wacom_wac.c +1 -1
@@ -3829,7 +3829,7 @@ int wacom_setup_touch_input_capabilities(struct input_dev *input_dev, wacom_wac->shared->touch->product == 0xF6) { input_dev->evbit[0 ] |=BIT_MASK (EV_SW );__set_bit (SW_MUTE_DEVICE , input_dev->swbit); - wacom_wac->shared->has_mute_touch_switch = true; + wacom_wac->has_mute_touch_switch = true; }/* fall through */
drivers/net/can/spi/hi311x.c +1 -1
@@ -218,7 +218,7 @@ static int hi3110_spi_trans(struct spi_device *spi, int len)return ret; } -static u8 hi3110_cmd (struct spi_device *spi,u8 command) +static int hi3110_cmd (struct spi_device *spi,u8 command) {struct hi3110_priv *priv =spi_get_drvdata (spi);
drivers/net/can/usb/ems_usb.c +13 -1
@@ -255,6 +255,8 @@ struct ems_usb {unsigned int free_slots;/* remember number of available slots */ struct ems_cpc_msg active_params;/* active controller parameters */ +void *rxbuf[MAX_RX_URBS ]; +dma_addr_t rxbuf_dma[MAX_RX_URBS ]; };static void ems_usb_read_interrupt_callback (struct urb *urb)
@@ -587,6 +589,7 @@ static int ems_usb_start(struct ems_usb *dev)for (i =0 ; i <MAX_RX_URBS ; i++) {struct urb *urb =NULL ;u8 *buf =NULL ; +dma_addr_t buf_dma;/* create a URB, and a buffer for it */ urb =usb_alloc_urb (0 ,GFP_KERNEL );
@@ -596,7 +599,7 @@ static int ems_usb_start(struct ems_usb *dev) } buf =usb_alloc_coherent (dev->udev,RX_BUFFER_SIZE ,GFP_KERNEL , - &urb->transfer_dma); + &buf_dma);if (!buf) {netdev_err (netdev,"No memory left for USB buffer\n" );usb_free_urb (urb);
@@ -604,6 +607,8 @@ static int ems_usb_start(struct ems_usb *dev)break ; } + urb->transfer_dma = buf_dma; +usb_fill_bulk_urb (urb, dev->udev,usb_rcvbulkpipe (dev->udev,2 ), buf,RX_BUFFER_SIZE , ems_usb_read_bulk_callback, dev);
@@ -619,6 +624,9 @@ static int ems_usb_start(struct ems_usb *dev)break ; } + dev->rxbuf[i] = buf; + dev->rxbuf_dma[i] = buf_dma; +/* Drop reference, USB core will take care of freeing it */ usb_free_urb (urb); }
@@ -684,6 +692,10 @@ static void unlink_all_urbs(struct ems_usb *dev)usb_kill_anchored_urbs (&dev->rx_submitted); +for (i =0 ; i <MAX_RX_URBS ; ++i) +usb_free_coherent (dev->udev,RX_BUFFER_SIZE , + dev->rxbuf[i], dev->rxbuf_dma[i]); +usb_kill_anchored_urbs (&dev->tx_submitted);atomic_set (&dev->active_tx_urbs,0 );
drivers/net/can/usb/esd_usb2.c +15 -1
@@ -195,6 +195,8 @@ struct esd_usb2 {int net_count;u32 version;int rxinitdone; +void *rxbuf[MAX_RX_URBS ]; +dma_addr_t rxbuf_dma[MAX_RX_URBS ]; };struct esd_usb2_net_priv {
@@ -544,6 +546,7 @@ static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev)for (i =0 ; i <MAX_RX_URBS ; i++) {struct urb *urb =NULL ;u8 *buf =NULL ; +dma_addr_t buf_dma;/* create a URB, and a buffer for it */ urb =usb_alloc_urb (0 ,GFP_KERNEL );
@@ -553,7 +556,7 @@ static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev) } buf =usb_alloc_coherent (dev->udev,RX_BUFFER_SIZE ,GFP_KERNEL , - &urb->transfer_dma); + &buf_dma);if (!buf) {dev_warn (dev->udev->dev.parent,"No memory left for USB buffer\n" );
@@ -561,6 +564,8 @@ static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev) goto freeurb; } + urb->transfer_dma = buf_dma; + usb_fill_bulk_urb(urb, dev->udev, usb_rcvbulkpipe(dev->udev, 1), buf, RX_BUFFER_SIZE,
@@ -573,8 +578,12 @@ static int esd_usb2_setup_rx_urbs(struct esd_usb2 *dev)usb_unanchor_urb (urb);usb_free_coherent (dev->udev,RX_BUFFER_SIZE , buf, urb->transfer_dma); + goto freeurb; } + dev->rxbuf[i] = buf; + dev->rxbuf_dma[i] = buf_dma; + freeurb:/* Drop reference, USB core will take care of freeing it */ usb_free_urb (urb);
@@ -662,6 +671,11 @@ static void unlink_all_urbs(struct esd_usb2 *dev)int i, j;usb_kill_anchored_urbs (&dev->rx_submitted); + +for (i =0 ; i <MAX_RX_URBS ; ++i) +usb_free_coherent (dev->udev,RX_BUFFER_SIZE , + dev->rxbuf[i], dev->rxbuf_dma[i]); +for (i =0 ; i < dev->net_count; i++) { priv = dev->nets[i];if (priv) {
drivers/net/can/usb/mcba_usb.c +2 -0
@@ -653,6 +653,8 @@ static int mcba_usb_start(struct mcba_priv *priv)break ; } + urb->transfer_dma = buf_dma; + usb_fill_bulk_urb(urb, priv->udev, usb_rcvbulkpipe(priv->udev, MCBA_USB_EP_IN), buf, MCBA_USB_RX_BUFF_SIZE,
drivers/net/can/usb/usb_8dev.c +13 -2
@@ -137,7 +137,8 @@ struct usb_8dev_priv {u8 *cmd_msg_buffer;struct mutex usb_8dev_cmd_lock; - +void *rxbuf[MAX_RX_URBS ]; +dma_addr_t rxbuf_dma[MAX_RX_URBS ]; };/* tx frame */
@@ -733,6 +734,7 @@ static int usb_8dev_start(struct usb_8dev_priv *priv)for (i =0 ; i <MAX_RX_URBS ; i++) {struct urb *urb =NULL ;u8 *buf; +dma_addr_t buf_dma;/* create a URB, and a buffer for it */ urb =usb_alloc_urb (0 ,GFP_KERNEL );
@@ -742,7 +744,7 @@ static int usb_8dev_start(struct usb_8dev_priv *priv) } buf =usb_alloc_coherent (priv->udev,RX_BUFFER_SIZE ,GFP_KERNEL , - &urb->transfer_dma); + &buf_dma);if (!buf) {netdev_err (netdev,"No memory left for USB buffer\n" );usb_free_urb (urb);
@@ -750,6 +752,8 @@ static int usb_8dev_start(struct usb_8dev_priv *priv)break ; } + urb->transfer_dma = buf_dma; + usb_fill_bulk_urb(urb, priv->udev, usb_rcvbulkpipe(priv->udev, USB_8DEV_ENDP_DATA_RX),
@@ -767,6 +771,9 @@ static int usb_8dev_start(struct usb_8dev_priv *priv)break ; } + priv->rxbuf[i] = buf; + priv->rxbuf_dma[i] = buf_dma; +/* Drop reference, USB core will take care of freeing it */ usb_free_urb (urb); }
@@ -836,6 +843,10 @@ static void unlink_all_urbs(struct usb_8dev_priv *priv)usb_kill_anchored_urbs (&priv->rx_submitted); +for (i =0 ; i <MAX_RX_URBS ; ++i) +usb_free_coherent (priv->udev,RX_BUFFER_SIZE , + priv->rxbuf[i], priv->rxbuf_dma[i]); +usb_kill_anchored_urbs (&priv->tx_submitted);atomic_set (&priv->active_tx_urbs,0 );
drivers/net/ethernet/dec/tulip/winbond-840.c +2 -5
@@ -367,7 +367,7 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)int i, option = find_cnt <MAX_UNITS ? options[find_cnt] :0 ;void __iomem *ioaddr; - i =pci_enable_device (pdev); + i =pcim_enable_device (pdev);if (i)return i;pci_set_master (pdev);
@@ -389,7 +389,7 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) ioaddr =pci_iomap (pdev,TULIP_BAR , netdev_res_size);if (!ioaddr) - goto err_out_free_res; + goto err_out_netdev;for (i =0 ; i <3 ; i++) ((__le16 *)dev->dev_addr)[i] =cpu_to_le16 (eeprom_read (ioaddr, i));
@@ -468,8 +468,6 @@ static int w840_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) err_out_cleardev:pci_iounmap (pdev, ioaddr); -err_out_free_res: -pci_release_regions (pdev); err_out_netdev:free_netdev (dev);return -ENODEV ;
@@ -1535,7 +1533,6 @@ static void w840_remove1(struct pci_dev *pdev)if (dev) {struct netdev_private *np =netdev_priv (dev);unregister_netdev (dev); -pci_release_regions (pdev);pci_iounmap (pdev, np->base_addr);free_netdev (dev); }
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +5 -1
@@ -977,7 +977,7 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,default :/* if we got here and link is up something bad is afoot */ netdev_info (netdev, -"WARNING: Link is up but PHY type 0x%x is not recognized.\n" , +"WARNING: Link is up but PHY type 0x%x is not recognized, or incorrect cable is in use\n" , hw_link_info->phy_type); }
@@ -5087,6 +5087,10 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)dev_warn (&pf->pdev->dev,"Device configuration forbids SW from starting the LLDP agent.\n" );return -EINVAL ; +case I40E_AQ_RC_EAGAIN : +dev_warn (&pf->pdev->dev, +"Stop FW LLDP agent command is still being processed, please try again in a second.\n" ); +return -EBUSY ;default : dev_warn(&pf->pdev->dev, "Starting FW LLDP agent failed: error: %s, %s\n",
drivers/net/ethernet/intel/i40e/i40e_main.c +37 -24
135 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_txrx.c +50 -0
56 lines not on this page · raw message
drivers/net/ethernet/intel/i40e/i40e_txrx.h +2 -0
@@ -481,6 +481,8 @@ static inline unsigned int i40e_rx_pg_order(struct i40e_ring *ring)bool i40e_alloc_rx_buffers (struct i40e_ring *rxr,u16 cleaned_count);netdev_tx_t i40e_lan_xmit_frame (struct sk_buff *skb,struct net_device *netdev); +u16 i40e_lan_select_queue (struct net_device *netdev,struct sk_buff *skb, +struct net_device *sb_dev);void i40e_clean_tx_ring (struct i40e_ring *tx_ring);void i40e_clean_rx_ring (struct i40e_ring *rx_ring);int i40e_setup_tx_descriptors (struct i40e_ring *tx_ring);
drivers/net/ethernet/mellanox/mlx4/main.c +1 -0
@@ -3526,6 +3526,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data,if (!SRIOV_VALID_STATE (dev->flags)) {mlx4_err (dev,"Invalid SRIOV state\n" ); + err = -EINVAL ; goto err_close; } }
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +31 -2
@@ -444,12 +444,32 @@ static void mlx5e_detach_mod_hdr(struct mlx5e_priv *priv,static struct mlx5_core_dev *mlx5e_hairpin_get_mdev (struct net *net,int ifindex) { +struct mlx5_core_dev *mdev;struct net_device *netdev;struct mlx5e_priv *priv; - netdev =__dev_get_by_index (net, ifindex); + netdev =dev_get_by_index (net, ifindex); +if (!netdev) +return ERR_PTR (-ENODEV ); + priv =netdev_priv (netdev); -return priv->mdev; + mdev = priv->mdev; +dev_put (netdev); + +/* Mirred tc action holds a refcount on the ifindex net_device (see +* net/sched/act_mirred.c:tcf_mirred_get_dev). So, it's okay to continue using mdev +* after dev_put(netdev), while we're in the context of adding a tc flow. +* +* The mdev pointer corresponds to the peer/out net_device of a hairpin. It is then +* stored in a hairpin object, which exists until all flows, that refer to it, get +* removed. +* +* On the other hand, after a hairpin object has been created, the peer net_device may +* be removed/unbound while there are still some hairpin flows that are using it. This +* case is handled by mlx5e_tc_hairpin_update_dead_peer, which is hooked to +* NETDEV_UNREGISTER event of the peer net_device. +*/ +return mdev; }static int mlx5e_hairpin_create_transport (struct mlx5e_hairpin *hp)
@@ -648,6 +668,10 @@ mlx5e_hairpin_create(struct mlx5e_priv *priv, struct mlx5_hairpin_params *params func_mdev = priv->mdev; peer_mdev =mlx5e_hairpin_get_mdev (dev_net (priv->netdev), peer_ifindex); +if (IS_ERR (peer_mdev)) { + err =PTR_ERR (peer_mdev); + goto create_pair_err; + } pair =mlx5_core_hairpin_create (func_mdev, peer_mdev, params);if (IS_ERR (pair)) {
@@ -786,6 +810,11 @@ static int mlx5e_hairpin_flow_add(struct mlx5e_priv *priv,int err; peer_mdev =mlx5e_hairpin_get_mdev (dev_net (priv->netdev), peer_ifindex); +if (IS_ERR (peer_mdev)) { +NL_SET_ERR_MSG_MOD (extack,"invalid ifindex of mirred device" ); +return PTR_ERR (peer_mdev); + } +if (!MLX5_CAP_GEN (priv->mdev, hairpin) || !MLX5_CAP_GEN (peer_mdev, hairpin)) {NL_SET_ERR_MSG_MOD (extack,"hairpin is not supported" );return -EOPNOTSUPP ;
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +6 -4
@@ -968,17 +968,19 @@ static int connect_fwd_rules(struct mlx5_core_dev *dev,static int connect_flow_table (struct mlx5_core_dev *dev,struct mlx5_flow_table *ft,struct fs_prio *prio) { -struct mlx5_flow_table *next_ft; +struct mlx5_flow_table *next_ft, *first_ft;int err =0 ;/* Connect_prev_fts and update_root_ft_create are mutually exclusive */ -if (list_empty (&prio->node.children)) { + first_ft =list_first_entry_or_null (&prio->node.children, + struct mlx5_flow_table, node.list); +if (!first_ft || first_ft->level > ft->level) { err =connect_prev_fts (dev, ft, prio);if (err)return err; - next_ft =find_next_chained_ft (prio); + next_ft = first_ft ? first_ft :find_next_chained_ft (prio); err =connect_fwd_rules (dev, ft, next_ft);if (err)return err;
@@ -2026,7 +2028,7 @@ static int disconnect_flow_table(struct mlx5_flow_table *ft) node.list) == ft))return 0 ; - next_ft =find_next_chained_ft (prio); + next_ft =find_next_ft (ft); err =connect_fwd_rules (dev, next_ft, ft);if (err)return err;
drivers/net/ethernet/sis/sis900.c +2 -5
@@ -443,7 +443,7 @@ static int sis900_probe(struct pci_dev *pci_dev,#endif /* setup various bits in PCI command register */ - ret =pci_enable_device (pci_dev); + ret =pcim_enable_device (pci_dev);if (ret)return ret; i =pci_set_dma_mask (pci_dev,DMA_BIT_MASK (32 ));
@@ -469,7 +469,7 @@ static int sis900_probe(struct pci_dev *pci_dev, ioaddr =pci_iomap (pci_dev,0 ,0 );if (!ioaddr) { ret = -ENOMEM ; - goto err_out_cleardev; + goto err_out; } sis_priv =netdev_priv (net_dev);
@@ -579,8 +579,6 @@ static int sis900_probe(struct pci_dev *pci_dev, sis_priv->tx_ring_dma); err_out_unmap:pci_iounmap (pci_dev, ioaddr); -err_out_cleardev: -pci_release_regions (pci_dev); err_out:free_netdev (net_dev);return ret;
@@ -2489,7 +2487,6 @@ static void sis900_remove(struct pci_dev *pci_dev) sis_priv->tx_ring_dma);pci_iounmap (pci_dev, sis_priv->ioaddr);free_netdev (net_dev); -pci_release_regions (pci_dev); }#ifdef CONFIG_PM
drivers/net/ethernet/sun/niu.c +2 -1
@@ -8191,8 +8191,9 @@ static int niu_pci_vpd_fetch(struct niu *np, u32 start) err =niu_pci_vpd_scan_props (np, here, end);if (err <0 )return err; +/* ret == 1 is not an error */ if (err ==1 ) -return -EINVAL ; +return 0 ; }return 0 ; }
drivers/nfc/nfcsim.c +1 -2
@@ -192,8 +192,7 @@ static void nfcsim_recv_wq(struct work_struct *work)if (!IS_ERR (skb))dev_kfree_skb (skb); - - skb =ERR_PTR (-ENODEV ); +return ; } dev->cb (dev->nfc_digital_dev, dev->arg, skb);
drivers/pci/controller/pci-mvebu.c +12 -4
@@ -105,6 +105,7 @@ struct mvebu_pcie_port {struct mvebu_pcie_window memwin;struct mvebu_pcie_window iowin;u32 saved_pcie_stat; +struct resource regs; };static inline void mvebu_writel (struct mvebu_pcie_port *port,u32 val,u32 reg)
@@ -149,7 +150,9 @@ static void mvebu_pcie_set_local_dev_nr(struct mvebu_pcie_port *port, int nr)/* * Setup PCIE BARs and Address Decode Wins: -* BAR[0,2] -> disabled, BAR[1] -> covers all DRAM banks +* BAR[0] -> internal registers (needed for MSI) +* BAR[1] -> covers all DRAM banks +* BAR[2] -> Disabled * WIN[0-3] -> DRAM bank[0-3] */ static void mvebu_pcie_setup_wins (struct mvebu_pcie_port *port)
@@ -203,6 +206,12 @@ static void mvebu_pcie_setup_wins(struct mvebu_pcie_port *port)mvebu_writel (port,0 ,PCIE_BAR_HI_OFF (1 ));mvebu_writel (port, ((size -1 ) &0xffff0000 ) |1 ,PCIE_BAR_CTRL_OFF (1 )); + +/* +* Point BAR[0] to the device's internal registers. +*/ +mvebu_writel (port,round_down (port->regs.start,SZ_1M ),PCIE_BAR_LO_OFF (0 )); +mvebu_writel (port,0 ,PCIE_BAR_HI_OFF (0 )); }static void mvebu_pcie_setup_hw (struct mvebu_pcie_port *port)
@@ -708,14 +717,13 @@ static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,struct device_node *np, struct mvebu_pcie_port *port) { - struct resource regs; int ret = 0; - ret =of_address_to_resource (np,0 , ®s); + ret =of_address_to_resource (np,0 , &port->regs);if (ret)return ERR_PTR (ret); -return devm_ioremap_resource (&pdev->dev, ®s); +return devm_ioremap_resource (&pdev->dev, &port->regs); }#define DT_FLAGS_TO_TYPE (flags) (((flags) >> 24) & 0x03)
fs/btrfs/compression.c +1 -1
@@ -273,7 +273,7 @@ static void end_compressed_bio_write(struct bio *bio) cb->compressed_pages[0 ]->mapping = cb->inode->i_mapping;btrfs_writepage_endio_finish_ordered (cb->compressed_pages[0 ], cb->start, cb->start + cb->len -1 , - bio->bi_status ==BLK_STS_OK ); + !cb->errors); cb->compressed_pages[0 ]->mapping =NULL ;end_compressed_writeback (inode, cb);
fs/btrfs/volumes.c +1 -0
@@ -1266,6 +1266,7 @@ void btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step)if (test_bit (BTRFS_DEV_STATE_WRITEABLE , &device->dev_state)) {list_del_init (&device->dev_alloc_list);clear_bit (BTRFS_DEV_STATE_WRITEABLE , &device->dev_state); + fs_devices->rw_devices--; }list_del_init (&device->dev_list); fs_devices->num_devices--;
fs/ocfs2/file.c +62 -41
145 lines not on this page · raw message
include/net/llc_pdu.h +23 -8
@@ -15,9 +15,11 @@#include <linux/if_ether.h> /* Lengths of frame formats */ -#define LLC_PDU_LEN_I 4/* header and 2 control bytes */ -#define LLC_PDU_LEN_S 4 -#define LLC_PDU_LEN_U 3/* header and 1 control byte */ +#define LLC_PDU_LEN_I 4/* header and 2 control bytes */ +#define LLC_PDU_LEN_S 4 +#define LLC_PDU_LEN_U 3/* header and 1 control byte */ +/* header and 1 control byte and XID info */ +#define LLC_PDU_LEN_U_XID (LLC_PDU_LEN_U + sizeof(struct llc_xid_info))/* Known SAP addresses */ #define LLC_GLOBAL_SAP 0xFF#define LLC_NULL_SAP 0x00/* not network-layer visible */
@@ -50,9 +52,10 @@#define LLC_PDU_TYPE_U_MASK 0x03/* 8-bit control field */ #define LLC_PDU_TYPE_MASK 0x03 -#define LLC_PDU_TYPE_I 0/* first bit */ -#define LLC_PDU_TYPE_S 1/* first two bits */ -#define LLC_PDU_TYPE_U 3/* first two bits */ +#define LLC_PDU_TYPE_I 0/* first bit */ +#define LLC_PDU_TYPE_S 1/* first two bits */ +#define LLC_PDU_TYPE_U 3/* first two bits */ +#define LLC_PDU_TYPE_U_XID 4/* private type for detecting XID commands */ #define LLC_PDU_TYPE_IS_I (pdu) \ ((!(pdu->ctrl_1 & LLC_PDU_TYPE_I_MASK)) ? 1 : 0)
@@ -230,9 +233,18 @@ static inline struct llc_pdu_un *llc_pdu_un_hdr(struct sk_buff *skb)static inline void llc_pdu_header_init (struct sk_buff *skb,u8 type,u8 ssap,u8 dsap,u8 cr) { -const int hlen = type ==LLC_PDU_TYPE_U ?3 :4 ; +int hlen =4 ;/* default value for I and S types */ struct llc_pdu_un *pdu; +switch (type) { +case LLC_PDU_TYPE_U : + hlen =3 ; +break ; +case LLC_PDU_TYPE_U_XID : + hlen =6 ; +break ; + } +skb_push (skb, hlen);skb_reset_network_header (skb); pdu =llc_pdu_un_hdr (skb);
@@ -374,7 +386,10 @@ static inline void llc_pdu_init_as_xid_cmd(struct sk_buff *skb, xid_info->fmt_id =LLC_XID_FMT_ID ;/* 0x81 */ xid_info->type = svcs_supported; xid_info->rw = rx_window <<1 ;/* size of receive window */ -skb_put (skb,sizeof (struct llc_xid_info )); + +/* no need to push/put since llc_pdu_header_init() has already +* pushed 3 + 3 bytes +*/ }/**
net/can/j1939/transport.c +8 -3
@@ -1075,11 +1075,16 @@ static bool j1939_session_deactivate_locked(struct j1939_session *session)static bool j1939_session_deactivate (struct j1939_session *session) { +struct j1939_priv *priv = session->priv;bool active; -j1939_session_list_lock (session->priv); +j1939_session_list_lock (priv); +/* This function should be called with a session ref-count of at +* least 2. +*/ +WARN_ON_ONCE (kref_read (&session->kref) <2 ); active =j1939_session_deactivate_locked (session); -j1939_session_list_unlock (session->priv); +j1939_session_list_unlock (priv);return active; }
@@ -1869,7 +1874,7 @@ static void j1939_xtp_rx_dat_one(struct j1939_session *session,if (!session->transmission)j1939_tp_schedule_txtimer (session,0 ); }else { -j1939_tp_set_rxtimeout (session,250 ); +j1939_tp_set_rxtimeout (session,750 ); } session->last_cmd =0xff ;consume_skb (se_skb);
net/can/raw.c +18 -2
@@ -548,10 +548,18 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,return -EFAULT ; } +rtnl_lock ();lock_sock (sk); -if (ro->bound && ro->ifindex) +if (ro->bound && ro->ifindex) { dev =dev_get_by_index (sock_net (sk), ro->ifindex); +if (!dev) { +if (count >1 ) +kfree (filter); + err = -ENODEV ; + goto out_fil; + } + }if (ro->bound) {/* (try to) register the new filters */
@@ -590,6 +598,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,dev_put (dev);release_sock (sk); +rtnl_unlock ();break ;
@@ -602,10 +611,16 @@ static int raw_setsockopt(struct socket *sock, int level, int optname, err_mask &=CAN_ERR_MASK ; +rtnl_lock ();lock_sock (sk); -if (ro->bound && ro->ifindex) +if (ro->bound && ro->ifindex) { dev =dev_get_by_index (sock_net (sk), ro->ifindex); +if (!dev) { + err = -ENODEV ; + goto out_err; + } + }/* remove current error mask */ if (ro->bound) {
@@ -629,6 +644,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname,dev_put (dev);release_sock (sk); +rtnl_unlock ();break ;
net/ipv4/ip_tunnel.c +1 -1
@@ -391,7 +391,7 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb, tunnel->i_seqno =ntohl (tpi->seq) +1 ; } -skb_reset_network_header (skb); +skb_set_network_header (skb, (tunnel->dev->type ==ARPHRD_ETHER ) ?ETH_HLEN :0 ); err =IP_ECN_decapsulate (iph, skb);if (unlikely (err)) {
net/llc/af_llc.c +9 -1
@@ -98,8 +98,16 @@ static inline u8 llc_ui_header_len(struct sock *sk, struct sockaddr_llc *addr) {u8 rc =LLC_PDU_LEN_U ; -if (addr->sllc_test || addr->sllc_xid) +if (addr->sllc_test) rc =LLC_PDU_LEN_U ; +else if (addr->sllc_xid) +/* We need to expand header to sizeof(struct llc_xid_info) +* since llc_pdu_init_as_xid_cmd() sets 4,5,6 bytes of LLC header +* as XID PDU. In llc_ui_sendmsg() we reserved header size and then +* filled all other space with user data. If we won't reserve this +* bytes, llc_pdu_init_as_xid_cmd() will overwrite user data +*/ + rc =LLC_PDU_LEN_U_XID ;else if (sk->sk_type ==SOCK_STREAM ) rc =LLC_PDU_LEN_I ;return rc;
net/llc/llc_s_ac.c +1 -1
@@ -79,7 +79,7 @@ int llc_sap_action_send_xid_c(struct llc_sap *sap, struct sk_buff *skb)struct llc_sap_state_ev *ev =llc_sap_ev (skb);int rc; -llc_pdu_header_init (skb,LLC_PDU_TYPE_U , ev->saddr.lsap, +llc_pdu_header_init (skb,LLC_PDU_TYPE_U_XID , ev->saddr.lsap, ev->daddr.lsap,LLC_PDU_CMD );llc_pdu_init_as_xid_cmd (skb,LLC_XID_NULL_CLASS_2 ,0 ); rc =llc_mac_hdr_init (skb, ev->saddr.mac, ev->daddr.mac);
net/netfilter/nf_conntrack_core.c +6 -1
@@ -660,8 +660,13 @@ bool nf_ct_delete(struct nf_conn *ct, u32 portid, int report)return false; tstamp =nf_conn_tstamp_find (ct); -if (tstamp && tstamp->stop ==0 ) +if (tstamp) { +s32 timeout = ct->timeout - nfct_time_stamp; + tstamp->stop =ktime_get_real_ns (); +if (timeout <0 ) + tstamp->stop -=jiffies_to_nsecs (-timeout); + }if (nf_conntrack_event_report (IPCT_DESTROY , ct, portid, report) <0 ) {
net/netfilter/nft_nat.c +3 -1
@@ -147,7 +147,9 @@ static int nft_nat_init(const struct nft_ctx *ctx, const struct nft_expr *expr, alen = FIELD_SIZEOF(struct nf_nat_range, min_addr.ip6);break ;default : -return -EAFNOSUPPORT ; +if (tb[NFTA_NAT_REG_ADDR_MIN ]) +return -EAFNOSUPPORT ; +break ; } priv->family = family;
net/sched/act_api.c +2 -0
@@ -231,6 +231,8 @@ static int tcf_dump_walker(struct tcf_idrinfo *idrinfo, struct sk_buff *skb, index++;if (index < s_i)continue ; +if (IS_ERR (p)) +continue ;if (jiffy_since && time_after(jiffy_since,
net/sctp/input.c +1 -1
@@ -1175,7 +1175,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(if (unlikely (!af))return NULL ; -if (af->from_addr_param (&paddr, param, peer_port,0 )) +if (!af->from_addr_param (&paddr, param, peer_port,0 ))return NULL ;return __sctp_lookup_association (net, laddr, &paddr, transportp);
net/tipc/socket.c +4 -5
@@ -2501,7 +2501,7 @@ static int tipc_listen(struct socket *sock, int len)static int tipc_wait_for_accept (struct socket *sock,long timeo) {struct sock *sk = sock->sk; -DEFINE_WAIT (wait); +DEFINE_WAIT_FUNC (wait, woken_wake_function);int err;/* True wake-one mechanism for incoming connections: only
@@ -2510,12 +2510,12 @@ static int tipc_wait_for_accept(struct socket *sock, long timeo)* anymore, the common case will execute the loop only once. */ for (;;) { -prepare_to_wait_exclusive (sk_sleep (sk), &wait, -TASK_INTERRUPTIBLE );if (timeo &&skb_queue_empty (&sk->sk_receive_queue)) { +add_wait_queue (sk_sleep (sk), &wait);release_sock (sk); - timeo =schedule_timeout (timeo); + timeo =wait_woken (&wait,TASK_INTERRUPTIBLE , timeo);lock_sock (sk); +remove_wait_queue (sk_sleep (sk), &wait); } err =0 ;if (!skb_queue_empty (&sk->sk_receive_queue))
@@ -2527,7 +2527,6 @@ static int tipc_wait_for_accept(struct socket *sock, long timeo)if (signal_pending (current))break ; } -finish_wait (sk_sleep (sk), &wait);return err; }
net/wireless/scan.c +2 -4
@@ -1250,16 +1250,14 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev,* be grouped with this beacon for updates ... */ if (!cfg80211_combine_bsses (rdev, new)) { -kfree (new); +bss_ref_put (rdev, new); goto drop; } }if (rdev->bss_entries >= bss_entries_limit && !cfg80211_bss_expire_oldest (rdev)) { -if (!list_empty (&new->hidden_list)) -list_del (&new->hidden_list); -kfree (new); +bss_ref_put (rdev, new); goto drop; }
tools/perf/util/map.c +0 -2
@@ -214,8 +214,6 @@ struct map *map__new(struct machine *machine, u64 start, u64 len,if (!(prot &PROT_EXEC ))dso__set_loaded (dso); } - -nsinfo__put (dso->nsinfo); dso->nsinfo = nsi;dso__put (dso); }
virt/kvm/kvm_main.c +28 -0
@@ -3570,6 +3570,16 @@ struct compat_kvm_dirty_log { }; }; +struct compat_kvm_clear_dirty_log { +__u32 slot; +__u32 num_pages; +__u64 first_page; +union { +compat_uptr_t dirty_bitmap;/* one bit per page */ +__u64 padding2; + }; +}; +static long kvm_vm_compat_ioctl (struct file *filp,unsigned int ioctl,unsigned long arg) {
@@ -3579,6 +3589,24 @@ static long kvm_vm_compat_ioctl(struct file *filp,if (kvm->mm != current->mm)return -EIO ;switch (ioctl) { +#ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT +case KVM_CLEAR_DIRTY_LOG : { +struct compat_kvm_clear_dirty_log compat_log; +struct kvm_clear_dirty_log log; + +if (copy_from_user (&compat_log, (void __user *)arg, +sizeof (compat_log))) +return -EFAULT ; + log.slot = compat_log.slot; + log.num_pages = compat_log.num_pages; + log.first_page = compat_log.first_page; + log.padding2 = compat_log.padding2; + log.dirty_bitmap =compat_ptr (compat_log.dirty_bitmap); + + r =kvm_vm_ioctl_clear_dirty_log (kvm, &log); +break ; + } +#endif case KVM_GET_DIRTY_LOG : {struct compat_kvm_dirty_log compat_log;struct kvm_dirty_log log;
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.138 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/powerpc/platforms/pseries/setup.c | 2 arch/x86/include/asm/proto.h | 2 arch/x86/kvm/ioapic.c | 2 arch/x86/kvm/ioapic.h | 4 drivers/acpi/resource.c | 9 - drivers/hid/wacom_wac.c | 2 drivers/net/can/spi/hi311x.c | 2 drivers/net/can/usb/ems_usb.c | 14 ++ drivers/net/can/usb/esd_usb2.c | 16 +++ drivers/net/can/usb/mcba_usb.c | 2 drivers/net/can/usb/usb_8dev.c | 15 ++- drivers/net/ethernet/dec/tulip/winbond-840.c | 7 - drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 + drivers/net/ethernet/intel/i40e/i40e_main.c | 61 +++++++------ drivers/net/ethernet/intel/i40e/i40e_txrx.c | 50 ++++++++++ drivers/net/ethernet/intel/i40e/i40e_txrx.h | 2 drivers/net/ethernet/mellanox/mlx4/main.c | 1 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 33 ++++++- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 10 +- drivers/net/ethernet/sis/sis900.c | 7 - drivers/net/ethernet/sun/niu.c | 3 drivers/nfc/nfcsim.c | 3 drivers/pci/controller/pci-mvebu.c | 16 ++- fs/btrfs/compression.c | 2 fs/btrfs/volumes.c | 1 fs/ocfs2/file.c | 103 +++++++++++++--------- include/net/llc_pdu.h | 31 ++++-- net/can/j1939/transport.c | 11 +- net/can/raw.c | 20 +++- net/ipv4/ip_tunnel.c | 2 net/llc/af_llc.c | 10 +- net/llc/llc_s_ac.c | 2 net/netfilter/nf_conntrack_core.c | 7 + net/netfilter/nft_nat.c | 4 net/sched/act_api.c | 2 net/sctp/input.c | 2 net/tipc/socket.c | 9 - net/wireless/scan.c | 6 - tools/perf/util/map.c | 2 virt/kvm/kvm_main.c | 28 +++++ 41 files changed, 374 insertions(+), 139 deletions(-)
Arkadiusz Kubalewski (2):
i40e: Fix logic of disabling queues
i40e: Fix firmware LLDP agent related warning
Arnaldo Carvalho de Melo (1):
Revert "perf map: Fix dso->nsinfo refcounting"
Cong Wang (1):
net_sched: check error pointer in tcf_dump_walker()
Dan Carpenter (1):
can: hi311x: fix a signedness bug in hi3110_cmd()
Desmond Cheong Zhi Xi (1):
btrfs: fix rw device counting in __btrfs_free_extra_devids
Dima Chumak (1):
net/mlx5e: Fix nullptr in mlx5e_hairpin_get_mdev()
Florian Westphal (1):
netfilter: conntrack: adjust stop timestamp to real expiry value
Gilad Naaman (1):
net: Set true network header for ECN decapsulation
Goldwyn Rodrigues (1):
btrfs: mark compressed range uptodate only if all bio succeed
Greg Kroah-Hartman (1):
Linux 5.4.138
Hoang Le (1):
tipc: fix sleeping in tipc accept routine
Hui Wang (1):
Revert "ACPI: resources: Add checks for ACPI IRQ override"
Jan Kiszka (1):
x86/asm: Ensure asm/proto.h can be included stand-alone
Jason Gerecke (1):
HID: wacom: Re-enable touch by default for Cintiq 24HDT / 27QHDT
Jedrzej Jagielski (2):
i40e: Fix queue-to-TC mapping on Tx
i40e: Fix log TC creation failure when max num of queues is exceeded
Jiapeng Chong (1):
mlx4: Fix missing error code in mlx4_load_one()
Juergen Gross (1):
x86/kvm: fix vcpu-id indexed array sizes
Junxiao Bi (2):
ocfs2: fix zero out valid data
ocfs2: issue zeroout to EOF blocks
Krzysztof Kozlowski (1):
nfc: nfcsim: fix use after free during module unload
Lukasz Cieplicki (1):
i40e: Add additional info to PHY type error
Maor Gottlieb (1):
net/mlx5: Fix flow table chaining
Marcelo Ricardo Leitner (1):
sctp: fix return value check in __sctp_rcv_asconf_lookup
Nguyen Dinh Phi (1):
cfg80211: Fix possible memory leak in function cfg80211_bss_update
Oleksij Rempel (1):
can: j1939: j1939_session_deactivate(): clarify lifetime of session object
Pablo Neira Ayuso (1):
netfilter: nft_nat: allow to specify layer 4 protocol NAT only
Paolo Bonzini (1):
KVM: add missing compat KVM_CLEAR_DIRTY_LOG
Paul Jakma (1):
NIU: fix incorrect error return, missed in previous revert
Pavel Skripkin (5):
can: mcba_usb_start(): add missing urb->transfer_dma initialization
can: usb_8dev: fix memory leak
can: ems_usb: fix memory leak
can: esd_usb2: fix memory leak
net: llc: fix skb_over_panic
Shmuel Hazan (1):
PCI: mvebu: Setup BAR0 in order to fix MSI
Srikar Dronamraju (1):
powerpc/pseries: Fix regression while building external modules
Wang Hai (2):
tulip: windbond-840: Fix missing pci_disable_device() in probe and remove
sis900: Fix missing pci_disable_device() in probe and remove
Zhang Changzhong (1):
can: j1939: j1939_xtp_rx_dat_one(): fix rxtimer value between consecutive TP.DT to 750ms
Ziyang Xuan (1):
can: raw: raw_setsockopt(): fix raw_rcv panic for sock UAF