Linux 4.9.332
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.9.332 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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
------------
Documentation/arm64/silicon-errata.txt | 2 Makefile | 2 arch/arc/include/asm/io.h | 2 arch/arc/mm/ioremap.c | 2 arch/arm64/Kconfig | 16 +++++ arch/arm64/include/asm/cpucaps.h | 3 arch/arm64/kernel/cpu_errata.c | 16 +++++ arch/arm64/kernel/cpufeature.c | 13 +++- arch/s390/include/asm/futex.h | 3 drivers/acpi/video_detect.c | 64 +++++++++++++++++++++ drivers/ata/ahci.h | 2 drivers/ata/ahci_imx.c | 2 drivers/gpu/drm/msm/hdmi/hdmi.c | 5 + drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c | 5 - drivers/hid/hid-magicmouse.c | 2 drivers/media/platform/vivid/vivid-core.c | 22 +++++++ drivers/media/platform/vivid/vivid-core.h | 2 drivers/media/platform/vivid/vivid-vid-cap.c | 27 ++++++-- drivers/media/v4l2-core/v4l2-dv-timings.c | 14 ++++ drivers/mmc/core/sdio_bus.c | 3 drivers/net/can/mscan/mpc5xxx_can.c | 8 +- drivers/net/can/rcar/rcar_canfd.c | 6 + drivers/net/ethernet/hisilicon/hns/hnae.c | 4 - drivers/net/ethernet/ibm/ehea/ehea_main.c | 1 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 31 +++++++--- drivers/net/ethernet/intel/i40e/i40e_type.h | 4 + drivers/net/ethernet/lantiq_etop.c | 1 drivers/net/ethernet/micrel/ksz884x.c | 2 drivers/usb/core/quirks.c | 9 ++ drivers/usb/gadget/udc/bdc/bdc_udc.c | 1 drivers/usb/host/xhci-mem.c | 20 +++--- drivers/video/fbdev/smscufx.c | 55 +++++++++--------- drivers/xen/gntdev.c | 30 ++++++++- fs/kernfs/dir.c | 5 + fs/ocfs2/namei.c | 23 +++---- include/uapi/linux/videodev2.h | 3 mm/hugetlb.c | 2 net/atm/mpoa_proc.c | 3 net/ieee802154/socket.c | 4 - net/ipv4/tcp_input.c | 3 net/kcm/kcmsock.c | 23 ++++--- net/mac802154/rx.c | 5 - net/openvswitch/datapath.c | 3 sound/aoa/soundbus/i2sbus/core.c | 7 +- sound/pci/ac97/ac97_codec.c | 1 sound/pci/au88x0/au88x0.h | 6 - sound/pci/au88x0/au88x0_core.c | 2 sound/synth/emux/emux.c | 7 -- tools/iio/iio_utils.c | 4 + 49 files changed, 368 insertions(+), 112 deletions(-)
Aaron Conole (1):
openvswitch: switch from WARN to pr_warn
Alexander Stein (1):
ata: ahci-imx: Fix MODULE_ALIAS
Biju Das (1):
can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive
Christian A. Ehrhardt (1):
kernfs: fix use-after-free in __kernfs_remove
Dongliang Mu (1):
can: mscan: mpc5xxx: mpc5xxx_can_probe(): add missing put_clock() in error path
Eric Dumazet (2):
kcm: annotate data-races around kcm->rx_psock
kcm: annotate data-races around kcm->rx_waitGreg Kroah-Hartman (1):
Linux 4.9.332
Hannu Hartikainen (1):
USB: add RESET_RESUME quirk for NVIDIA Jetson devices in RCM
Hans Verkuil (4):
media: vivid: s_fbuf: add more sanity checks
media: vivid: dev->bitmap_cap wasn't freed in all cases
media: v4l2-dv-timings: add sanity checks for blanking values
media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced'
Heiko Carstens (1):
s390/futex: add missing EX_TABLE entry to __futex_atomic_op()
Hyunwoo Kim (1):
fbdev: smscufx: Fix several use-after-free bugs
James Morse (1):
arm64: errata: Remove AES hwcap for COMPAT tasks
Jan Beulich (1):
Xen/gntdev: don't ignore kernel unmapping error
Jason A. Donenfeld (1):
ALSA: au88x0: use explicitly signed char
Johan Hovold (1):
drm/msm/hdmi: fix memory corruption with too many bridges
Joseph Qi (2):
ocfs2: clear dinode links count in case of error
ocfs2: fix BUG when iput after ocfs2_mknod fails
José Expósito (1):
HID: magicmouse: Do not set BTN_MOUSE on double report
Justin Chen (1):
usb: bdc: change state when port disconnected
Kai-Heng Feng (1):
ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS
M. Vefa Bicakci (1):
xen/gntdev: Prevent leaking grants
Mathias Nyman (1):
xhci: Remove device endpoints from bandwidth list when freeing the device
Matthew Ma (1):
mmc: core: Fix kernel panic when remove non-standard SDIO card
Matti Vaittinen (1):
tools: iio: iio_utils: fix digit calculation
Miquel Raynal (1):
mac802154: Fix LQI recording
Nathan Huckleberry (1):
drm/msm: Fix return type of mdp4_lvds_connector_mode_valid
Neal Cardwell (1):
tcp: fix indefinite deferral of RTO with SACK reneging
Randy Dunlap (1):
arc: iounmap() arg is volatile
Rik van Riel (1):
mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages
Slawomir Laba (1):
i40e: Fix ethtool rx-flow-hash setting for X722
Steven Rostedt (Google) (1):
ALSA: Use del_timer_sync() before freeing timer
Takashi Iwai (1):
ALSA: aoa: Fix I2S device accounting
Wei Yongjun (1):
net: ieee802154: fix error return code in dgram_bind()
Werner Sembach (1):
ACPI: video: Force backlight native for more TongFang devices
Xiaobo Liu (1):
net/atm: fix proc_mpc_write incorrect return value
Yang Yingliang (5):
net: hns: fix possible memory leak in hnae_ae_register()
ALSA: ac97: fix possible memory leak in snd_ac97_dev_register()
net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()
ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev()
net: ehea: fix possible memory leak in ehea_register_port()
Zhang Changzhong (1):
net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY
Greg Kroah-Hartman
maintainerDocumentation/arm64/silicon-errata.txt +2 -0
@@ -53,7 +53,9 @@ stable kernels. | ARM | Cortex-A57 | #832075 | ARM64_ERRATUM_832075 | | ARM | Cortex-A57 | #852523 | N/A | | ARM | Cortex-A57 | #834220 | ARM64_ERRATUM_834220 | +| ARM | Cortex-A57 | #1742098 | ARM64_ERRATUM_1742098 | | ARM | Cortex-A72 | #853709 | N/A | +| ARM | Cortex-A72 | #1655431 | ARM64_ERRATUM_1742098 | | ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 | | ARM | Cortex-A76 | #1188873 | ARM64_ERRATUM_1188873 | | ARM | MMU-500 | #841119,#826419 | N/A |
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 331 +SUBLEVEL = 332 EXTRAVERSION = NAME = Roaring Lionus
arch/arc/include/asm/io.h +1 -1
@@ -35,7 +35,7 @@ static inline void ioport_unmap(void __iomem *addr) { } -extern void iounmap (const void __iomem *addr); +extern void iounmap (const volatile void __iomem *addr);#define ioremap_nocache (phy, sz) ioremap(phy, sz)#define ioremap_wc (phy, sz) ioremap(phy, sz)
arch/arc/mm/ioremap.c +1 -1
@@ -95,7 +95,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,EXPORT_SYMBOL (ioremap_prot); -void iounmap (const void __iomem *addr) +void iounmap (const volatile void __iomem *addr) {/* weird double cast to handle phys_addr_t > 32 bits */ if (arc_uncached_addr_space ((phys_addr_t )(u32 )addr))
arch/arm64/Kconfig +16 -0
@@ -455,6 +455,22 @@ config ARM64_ERRATUM_1188873 If unsure, say Y. +config ARM64_ERRATUM_1742098 + bool "Cortex-A57/A72: 1742098: ELR recorded incorrectly on interrupt taken between cryptographic instructions in a sequence" + depends on COMPAT + default y + help + This option removes the AES hwcap for aarch32 user-space to + workaround erratum 1742098 on Cortex-A57 and Cortex-A72. + + Affected parts may corrupt the AES state if an interrupt is + taken between a pair of AES instructions. These instructions + are only present if the cryptography extensions are present. + All software should have a fallback implementation for CPUs + that don't implement the cryptography extensions. + + If unsure, say Y. + config CAVIUM_ERRATUM_22375 bool "Cavium erratum 22375, 24313" default y
arch/arm64/include/asm/cpucaps.h +2 -1
@@ -40,7 +40,8 @@#define ARM64_MISMATCHED_CACHE_TYPE 19#define ARM64_WORKAROUND_1188873 20#define ARM64_SPECTRE_BHB 21 +#define ARM64_WORKAROUND_1742098 22 -#define ARM64_NCAPS 22 +#define ARM64_NCAPS 23#endif /* __ASM_CPUCAPS_H */
arch/arm64/kernel/cpu_errata.c +16 -0
@@ -448,6 +448,14 @@ static const struct midr_range arm64_bp_harden_smccc_cpus[] = {#endif +#ifdef CONFIG_ARM64_ERRATUM_1742098 +static struct midr_range broken_aarch32_aes[] = { +MIDR_RANGE (MIDR_CORTEX_A57 ,0 ,1 ,0xf ,0xf ), +MIDR_ALL_VERSIONS (MIDR_CORTEX_A72 ), + {}, +}; +#endif + const struct arm64_cpu_capabilities arm64_errata[] = { #if defined(CONFIG_ARM64_ERRATUM_826319) || \ defined(CONFIG_ARM64_ERRATUM_827319) || \
@@ -567,6 +575,14 @@ const struct arm64_cpu_capabilities arm64_errata[] = { .cpu_enable = spectre_bhb_enable_mitigation,#endif }, +#ifdef CONFIG_ARM64_ERRATUM_1742098 + { + .desc = "ARM erratum 1742098", + .capability = ARM64_WORKAROUND_1742098, + CAP_MIDR_RANGE_LIST(broken_aarch32_aes), + .type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM, + }, +#endif { } };
arch/arm64/kernel/cpufeature.c +12 -1
@@ -28,6 +28,7 @@#include <asm/cpu.h> #include <asm/cpufeature.h> #include <asm/cpu_ops.h> +#include <asm/hwcap.h> #include <asm/mmu_context.h> #include <asm/processor.h> #include <asm/sysreg.h>
@@ -885,6 +886,14 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused)write_sysreg (read_sysreg (tpidr_el1), tpidr_el2); } +static void elf_hwcap_fixup (void ) +{ +#ifdef CONFIG_ARM64_ERRATUM_1742098 +if (cpus_have_const_cap (ARM64_WORKAROUND_1742098 )) + compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES ; +#endif /* ARM64_ERRATUM_1742098 */ +} +static const struct arm64_cpu_capabilities arm64_features[] = { { .desc ="GIC system register CPU interface" ,
@@ -1304,8 +1313,10 @@ void __init setup_cpu_features(void)mark_const_caps_ready ();setup_elf_hwcaps (arm64_elf_hwcaps); -if (system_supports_32bit_el0 ()) +if (system_supports_32bit_el0 ()) {setup_elf_hwcaps (compat_elf_hwcaps); +elf_hwcap_fixup (); + }/* Advertise that we have computed the system capabilities */ set_sys_caps_initialised ();
arch/s390/include/asm/futex.h +2 -1
@@ -15,7 +15,8 @@"3: jl 1b\n" \" lhi %0,0\n" \"4: sacf 768\n" \ - EX_TABLE(0b,4b) EX_TABLE(2b,4b) EX_TABLE(3b,4b) \ + EX_TABLE(0b,4b) EX_TABLE(1b,4b) \ + EX_TABLE(2b,4b) EX_TABLE(3b,4b) \ : "=d" (ret), "=&d" (oldval), "=&d" (newval), \" =m" (*uaddr) \ : "0" (-EFAULT), "d" (oparg), "a" (uaddr), \
drivers/acpi/video_detect.c +64 -0
70 lines not on this page · raw message
drivers/ata/ahci.h +1 -1
@@ -257,7 +257,7 @@ enum {ICH_MAP =0x90 ,/* ICH MAP register */ /* em constants */ -EM_MAX_SLOTS =8 , +EM_MAX_SLOTS =SATA_PMP_MAX_PORTS , EM_MAX_RETRY = 5,/* em_ctl bits */
drivers/ata/ahci_imx.c +1 -1
@@ -691,4 +691,4 @@ module_platform_driver(imx_ahci_driver);MODULE_DESCRIPTION ("Freescale i.MX AHCI SATA platform driver" );MODULE_AUTHOR ("Richard Zhu <[email protected]>" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("ahci:imx" ); +MODULE_ALIAS ("platform:" DRV_NAME );
drivers/gpu/drm/msm/hdmi/hdmi.c +5 -0
@@ -289,6 +289,11 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi,struct platform_device *pdev = hdmi->pdev;int ret; +if (priv->num_bridges ==ARRAY_SIZE (priv->bridges)) { +DRM_DEV_ERROR (dev->dev,"too many bridges\n" ); +return -ENOSPC ; + } + hdmi->dev = dev; hdmi->encoder = encoder;
drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_connector.c +3 -2
@@ -71,8 +71,9 @@ static int mdp4_lvds_connector_get_modes(struct drm_connector *connector)return ret; } -static int mdp4_lvds_connector_mode_valid (struct drm_connector *connector, -struct drm_display_mode *mode) +static enum drm_mode_status +mdp4_lvds_connector_mode_valid (struct drm_connector *connector, +struct drm_display_mode *mode) {struct mdp4_lvds_connector *mdp4_lvds_connector =to_mdp4_lvds_connector (connector);
drivers/hid/hid-magicmouse.c +1 -1
@@ -342,7 +342,7 @@ static int magicmouse_raw_event(struct hid_device *hdev,magicmouse_raw_event (hdev, report, data +2 , data[1 ]);magicmouse_raw_event (hdev, report, data +2 + data[1 ], size -2 - data[1 ]); -break ; +return 0 ;default :return 0 ; }
drivers/media/platform/vivid/vivid-core.c +22 -0
@@ -302,6 +302,28 @@ static int vidioc_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *areturn vivid_vid_out_g_fbuf (file, fh, a); } +/* +* Only support the framebuffer of one of the vivid instances. +* Anything else is rejected. +*/ +bool vivid_validate_fb (const struct v4l2_framebuffer *a) +{ +struct vivid_dev *dev; +int i; + +for (i =0 ; i < n_devs; i++) { + dev = vivid_devs[i]; +if (!dev || !dev->video_pbase) +continue ; +if ((unsigned long )a->base == dev->video_pbase && + a->fmt.width <= dev->display_width && + a->fmt.height <= dev->display_height && + a->fmt.bytesperline <= dev->display_byte_stride) +return true; + } +return false; +} +static int vidioc_s_fbuf (struct file *file,void *fh,const struct v4l2_framebuffer *a) {struct video_device *vdev =video_devdata (file);
drivers/media/platform/vivid/vivid-core.h +2 -0
@@ -561,4 +561,6 @@ static inline bool vivid_is_hdmi_out(const struct vivid_dev *dev) return dev->output_type[dev->output] == HDMI; } +bool vivid_validate_fb (const struct v4l2_framebuffer *a); +#endif
drivers/media/platform/vivid/vivid-vid-cap.c +21 -6
@@ -455,6 +455,12 @@ void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls)tpg_reset_source (&dev->tpg, dev->src_rect.width, dev->src_rect.height, dev->field_cap); dev->crop_cap = dev->src_rect; dev->crop_bounds_cap = dev->src_rect; +if (dev->bitmap_cap && + (dev->compose_cap.width != dev->crop_cap.width || + dev->compose_cap.height != dev->crop_cap.height)) { +vfree (dev->bitmap_cap); + dev->bitmap_cap =NULL ; + } dev->compose_cap = dev->crop_cap;if (V4L2_FIELD_HAS_T_OR_B (dev->field_cap)) dev->compose_cap.height /=2 ;
@@ -863,6 +869,8 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selectionstruct vivid_dev *dev =video_drvdata (file);struct v4l2_rect *crop = &dev->crop_cap;struct v4l2_rect *compose = &dev->compose_cap; +unsigned orig_compose_w = compose->width; +unsigned orig_compose_h = compose->height;unsigned factor =V4L2_FIELD_HAS_T_OR_B (dev->field_cap) ?2 :1 ;int ret;
@@ -979,17 +987,17 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection s->r.height /= factor; }v4l2_rect_map_inside (&s->r, &dev->fmt_cap_rect); -if (dev->bitmap_cap && (compose->width != s->r.width || - compose->height != s->r.height)) { -vfree (dev->bitmap_cap); - dev->bitmap_cap =NULL ; - } *compose = s->r;break ;default :return -EINVAL ; } +if (dev->bitmap_cap && (compose->width != orig_compose_w || + compose->height != orig_compose_h)) { +vfree (dev->bitmap_cap); + dev->bitmap_cap =NULL ; + }tpg_s_crop_compose (&dev->tpg, crop, compose);return 0 ; }
@@ -1232,7 +1240,14 @@ int vivid_vid_cap_s_fbuf(struct file *file, void *fh,return -EINVAL ;if (a->fmt.bytesperline < (a->fmt.width * fmt->bit_depth[0 ]) /8 )return -EINVAL ; -if (a->fmt.height * a->fmt.bytesperline < a->fmt.sizeimage) +if (a->fmt.bytesperline > a->fmt.sizeimage / a->fmt.height) +return -EINVAL ; + +/* +* Only support the framebuffer of one of the vivid instances. +* Anything else is rejected. +*/ +if (!vivid_validate_fb (a))return -EINVAL ; dev->fb_vbase_cap =phys_to_virt ((unsigned long )a->base);
drivers/media/v4l2-core/v4l2-dv-timings.c +14 -0
@@ -171,6 +171,20 @@ bool v4l2_valid_dv_timings(const struct v4l2_dv_timings *t, (bt->interlaced && !(caps &V4L2_DV_BT_CAP_INTERLACED )) || (!bt->interlaced && !(caps & V4L2_DV_BT_CAP_PROGRESSIVE))) return false; + +/* sanity checks for the blanking timings */ +if (!bt->interlaced && + (bt->il_vbackporch || bt->il_vsync || bt->il_vfrontporch)) +return false; +if (bt->hfrontporch >2 * bt->width || + bt->hsync >1024 || bt->hbackporch >1024 ) +return false; +if (bt->vfrontporch >4096 || + bt->vsync >128 || bt->vbackporch >4096 ) +return false; +if (bt->interlaced && (bt->il_vfrontporch >4096 || + bt->il_vsync >128 || bt->il_vbackporch >4096 )) +return false;return fnc ==NULL ||fnc (t, fnc_handle); }EXPORT_SYMBOL_GPL (v4l2_valid_dv_timings);
drivers/mmc/core/sdio_bus.c +2 -1
@@ -263,7 +263,8 @@ static void sdio_release_func(struct device *dev) {struct sdio_func *func =dev_to_sdio_func (dev); -sdio_free_func_cis (func); +if (!(func->card->quirks &MMC_QUIRK_NONSTD_SDIO )) +sdio_free_func_cis (func);kfree (func->info);kfree (func->tmpbuf);
drivers/net/can/mscan/mpc5xxx_can.c +5 -3
@@ -336,14 +336,14 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev) &mscan_clksrc);if (!priv->can.clock.freq) {dev_err (&ofdev->dev,"couldn't get MSCAN clock properties\n" ); - goto exit_free_mscan; + goto exit_put_clock; } err =register_mscandev (dev, mscan_clksrc);if (err) {dev_err (&ofdev->dev,"registering %s failed (err=%d)\n" ,DRV_NAME , err); - goto exit_free_mscan; + goto exit_put_clock; } dev_info(&ofdev->dev, "MSCAN at 0x%p, irq %d, clock %d Hz\n",
@@ -351,7 +351,9 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)return 0 ; -exit_free_mscan: +exit_put_clock: +if (data->put_clock) + data->put_clock (ofdev);free_candev (dev); exit_dispose_irq:irq_dispose_mapping (irq);
drivers/net/can/rcar/rcar_canfd.c +4 -2
@@ -1079,7 +1079,7 @@ static irqreturn_t rcar_canfd_global_interrupt(int irq, void *dev_id)struct rcar_canfd_global *gpriv = dev_id;struct net_device *ndev;struct rcar_canfd_channel *priv; -u32 sts, gerfl; +u32 sts, cc, gerfl;u32 ch, ridx;/* Global error interrupts still indicate a condition specific
@@ -1097,7 +1097,9 @@ static irqreturn_t rcar_canfd_global_interrupt(int irq, void *dev_id)/* Handle Rx interrupts */ sts =rcar_canfd_read (priv->base,RCANFD_RFSTS (ridx)); -if (likely (sts &RCANFD_RFSTS_RFIF )) { + cc =rcar_canfd_read (priv->base,RCANFD_RFCC (ridx)); +if (likely (sts &RCANFD_RFSTS_RFIF && + cc &RCANFD_RFCC_RFIE )) {if (napi_schedule_prep (&priv->napi)) {/* Disable Rx FIFO interrupts */ rcar_canfd_clear_bit(priv->base,
drivers/net/ethernet/hisilicon/hns/hnae.c +3 -1
@@ -418,8 +418,10 @@ int hnae_ae_register(struct hnae_ae_dev *hdev, struct module *owner) hdev->cls_dev.release = hnae_release; (void )dev_set_name (&hdev->cls_dev,"hnae%d" , hdev->id); ret =device_register (&hdev->cls_dev); -if (ret) +if (ret) { +put_device (&hdev->cls_dev);return ret; + }__module_get (THIS_MODULE );
drivers/net/ethernet/ibm/ehea/ehea_main.c +1 -0
@@ -2937,6 +2937,7 @@ static struct device *ehea_register_port(struct ehea_port *port, ret =of_device_register (&port->ofdev);if (ret) {pr_err ("failed to register device. ret=%d\n" , ret); +put_device (&port->ofdev.dev); goto out; }
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +23 -8
@@ -2263,10 +2263,17 @@ static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd)if (cmd->flow_type ==TCP_V4_FLOW || cmd->flow_type ==UDP_V4_FLOW ) { -if (i_set &I40E_L3_SRC_MASK ) - cmd->data |=RXH_IP_SRC ; -if (i_set &I40E_L3_DST_MASK ) - cmd->data |=RXH_IP_DST ; +if (hw->mac.type ==I40E_MAC_X722 ) { +if (i_set &I40E_X722_L3_SRC_MASK ) + cmd->data |=RXH_IP_SRC ; +if (i_set &I40E_X722_L3_DST_MASK ) + cmd->data |=RXH_IP_DST ; + }else { +if (i_set &I40E_L3_SRC_MASK ) + cmd->data |=RXH_IP_SRC ; +if (i_set &I40E_L3_DST_MASK ) + cmd->data |=RXH_IP_DST ; + } }else if (cmd->flow_type ==TCP_V6_FLOW || cmd->flow_type ==UDP_V6_FLOW ) {if (i_set &I40E_L3_V6_SRC_MASK )
@@ -2419,12 +2426,15 @@ static int i40e_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,/** * i40e_get_rss_hash_bits - Read RSS Hash bits from register +* @hw: hw structure * @nfc: pointer to user request * @i_setc bits currently set * * Returns value of bits to be set per user request **/ -static u64 i40e_get_rss_hash_bits (struct ethtool_rxnfc *nfc,u64 i_setc) +static u64 i40e_get_rss_hash_bits (struct i40e_hw *hw, +struct ethtool_rxnfc *nfc, +u64 i_setc) {u64 i_set = i_setc;u64 src_l3 =0 , dst_l3 =0 ;
@@ -2443,8 +2453,13 @@ static u64 i40e_get_rss_hash_bits(struct ethtool_rxnfc *nfc, u64 i_setc) dst_l3 =I40E_L3_V6_DST_MASK ; }else if (nfc->flow_type ==TCP_V4_FLOW || nfc->flow_type ==UDP_V4_FLOW ) { - src_l3 =I40E_L3_SRC_MASK ; - dst_l3 =I40E_L3_DST_MASK ; +if (hw->mac.type ==I40E_MAC_X722 ) { + src_l3 =I40E_X722_L3_SRC_MASK ; + dst_l3 =I40E_X722_L3_DST_MASK ; + }else { + src_l3 =I40E_L3_SRC_MASK ; + dst_l3 =I40E_L3_DST_MASK ; + } }else {/* Any other flow type are not supported here */ return i_set;
@@ -2553,7 +2568,7 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc) flow_pctype)) | ((u64 )i40e_read_rx_ctl (hw,I40E_GLQF_HASH_INSET (1 , flow_pctype)) <<32 ); - i_set =i40e_get_rss_hash_bits (nfc, i_setc); + i_set =i40e_get_rss_hash_bits (&pf->hw, nfc, i_setc);i40e_write_rx_ctl (hw,I40E_GLQF_HASH_INSET (0 , flow_pctype), (u32 )i_set); i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, flow_pctype),
drivers/net/ethernet/intel/i40e/i40e_type.h +4 -0
@@ -1542,6 +1542,10 @@ struct i40e_lldp_variables {#define I40E_PFQF_CTL_0_HASHLUTSIZE_512 0x00010000/* INPUT SET MASK for RSS, flow director, and flexible payload */ +#define I40E_X722_L3_SRC_SHIFT 49 +#define I40E_X722_L3_SRC_MASK (0x3ULL << I40E_X722_L3_SRC_SHIFT) +#define I40E_X722_L3_DST_SHIFT 41 +#define I40E_X722_L3_DST_MASK (0x3ULL << I40E_X722_L3_DST_SHIFT)#define I40E_L3_SRC_SHIFT 47#define I40E_L3_SRC_MASK (0x3ULL << I40E_L3_SRC_SHIFT)#define I40E_L3_V6_SRC_SHIFT 43
drivers/net/ethernet/lantiq_etop.c +0 -1
@@ -488,7 +488,6 @@ ltq_etop_tx(struct sk_buff *skb, struct net_device *dev) len = skb->len <ETH_ZLEN ?ETH_ZLEN : skb->len;if ((desc->ctl & (LTQ_DMA_OWN |LTQ_DMA_C )) || ch->skb[ch->dma.desc]) { -dev_kfree_skb_any (skb);netdev_err (dev,"tx ring full\n" );netif_tx_stop_queue (txq);return NETDEV_TX_BUSY ;
drivers/net/ethernet/micrel/ksz884x.c +1 -1
@@ -6932,7 +6932,7 @@ static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id)char banner[sizeof (version)];struct ksz_switch *sw =NULL ; - result =pci_enable_device (pdev); + result =pcim_enable_device (pdev);if (result)return result;
drivers/usb/core/quirks.c +9 -0
@@ -227,6 +227,15 @@ static const struct usb_device_id usb_quirk_list[] = {/* Kingston DataTraveler 3.0 */ { USB_DEVICE(0x0951, 0x1666), .driver_info = USB_QUIRK_NO_LPM }, + /* NVIDIA Jetson devices in Force Recovery mode */ + { USB_DEVICE(0x0955, 0x7018), .driver_info = USB_QUIRK_RESET_RESUME }, + { USB_DEVICE(0x0955, 0x7019), .driver_info = USB_QUIRK_RESET_RESUME }, + { USB_DEVICE(0x0955, 0x7418), .driver_info = USB_QUIRK_RESET_RESUME }, + { USB_DEVICE(0x0955, 0x7721), .driver_info = USB_QUIRK_RESET_RESUME }, + { USB_DEVICE(0x0955, 0x7c18), .driver_info = USB_QUIRK_RESET_RESUME }, + { USB_DEVICE(0x0955, 0x7e19), .driver_info = USB_QUIRK_RESET_RESUME }, + { USB_DEVICE(0x0955, 0x7f21), .driver_info = USB_QUIRK_RESET_RESUME }, + /* X-Rite/Gretag-Macbeth Eye-One Pro display colorimeter */ { USB_DEVICE(0x0971, 0x2000), .driver_info = USB_QUIRK_NO_SET_INTF },
drivers/usb/gadget/udc/bdc/bdc_udc.c +1 -0
@@ -156,6 +156,7 @@ static void bdc_uspc_disconnected(struct bdc *bdc, bool reinit) bdc->delayed_status = false; bdc->reinit = reinit; bdc->test_mode = false; +usb_gadget_set_state (&bdc->gadget,USB_STATE_NOTATTACHED ); }/* TNotify wkaeup timer */
drivers/usb/host/xhci-mem.c +12 -8
@@ -954,15 +954,19 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id)if (dev->eps[i].stream_info)xhci_free_stream_info (xhci, dev->eps[i].stream_info); -/* Endpoints on the TT/root port lists should have been removed -* when usb_disable_device() was called for the device. -* We can't drop them anyway, because the udev might have gone -* away by this point, and we can't tell what speed it was. +/* +* Endpoints are normally deleted from the bandwidth list when +* endpoints are dropped, before device is freed. +* If host is dying or being removed then endpoints aren't +* dropped cleanly, so delete the endpoint from list here. +* Only applicable for hosts with software bandwidth checking. */ -if (!list_empty (&dev->eps[i].bw_endpoint_list)) -xhci_warn (xhci,"Slot %u endpoint %u " -"not removed from BW list!\n" , - slot_id, i); + +if (!list_empty (&dev->eps[i].bw_endpoint_list)) { +list_del_init (&dev->eps[i].bw_endpoint_list); +xhci_dbg (xhci,"Slot %u endpoint %u not removed from BW list!\n" , + slot_id, i); + } }/* If this is a hub, free the TT(s) from the TT list */ xhci_free_tt_info (xhci, dev, slot_id);
drivers/video/fbdev/smscufx.c +30 -25
131 lines not on this page · raw message
drivers/xen/gntdev.c +25 -5
@@ -361,8 +361,7 @@ static int map_grant_pages(struct grant_map *map)for (i =0 ; i < map->count; i++) {if (map->map_ops[i].status == GNTST_okay) { map->unmap_ops[i].handle = map->map_ops[i].handle; -if (!use_ptemod) - alloced++; + alloced++; }else if (!err) err = -EINVAL ;
@@ -371,8 +370,7 @@ static int map_grant_pages(struct grant_map *map)if (use_ptemod) {if (map->kmap_ops[i].status == GNTST_okay) { -if (map->map_ops[i].status == GNTST_okay) - alloced++; + alloced++; map->kunmap_ops[i].handle = map->kmap_ops[i].handle; }else if (!err) err = -EINVAL ;
@@ -388,20 +386,42 @@ static void __unmap_grant_pages_done(int result,unsigned int i;struct grant_map *map = data->data;unsigned int offset = data->unmap_ops - map->unmap_ops; +int successful_unmaps =0 ; +int live_grants;for (i =0 ; i < data->count; i++) { +if (map->unmap_ops[offset + i].status == GNTST_okay && + map->unmap_ops[offset + i].handle !=-1 ) + successful_unmaps++; +WARN_ON (map->unmap_ops[offset+i].status && map->unmap_ops[offset+i].handle !=-1 );pr_debug ("unmap handle=%d st=%d\n" , map->unmap_ops[offset+i].handle, map->unmap_ops[offset+i].status); map->unmap_ops[offset+i].handle =-1 ; +if (use_ptemod) { +if (map->kunmap_ops[offset + i].status == GNTST_okay && + map->kunmap_ops[offset + i].handle !=-1 ) + successful_unmaps++; + +WARN_ON (map->kunmap_ops[offset+i].status && + map->kunmap_ops[offset+i].handle !=-1 ); +pr_debug ("kunmap handle=%u st=%d\n" , + map->kunmap_ops[offset+i].handle, + map->kunmap_ops[offset+i].status); + map->kunmap_ops[offset+i].handle =-1 ; + } } +/* * Decrease the live-grant counter. This must happen after the loop to * prevent premature reuse of the grants by gnttab_mmap(). */ -atomic_sub (data->count, &map->live_grants); + live_grants =atomic_sub_return (successful_unmaps, &map->live_grants); +if (WARN_ON (live_grants <0 )) +pr_err ("%s: live_grants became negative (%d) after unmapping %d pages!\n" , + __func__, live_grants, successful_unmaps);/* Release reference taken by unmap_grant_pages */ gntdev_put_map (NULL , map);
fs/kernfs/dir.c +4 -1
@@ -1410,8 +1410,11 @@ int kernfs_remove_by_name_ns(struct kernfs_node *parent, const char *name,mutex_lock (&kernfs_mutex); kn =kernfs_find_ns (parent, name, ns); -if (kn) +if (kn) { +kernfs_get (kn);__kernfs_remove (kn); +kernfs_put (kn); + }mutex_unlock (&kernfs_mutex);
fs/ocfs2/namei.c +11 -12
@@ -244,6 +244,7 @@ static int ocfs2_mknod(struct inode *dir,handle_t *handle =NULL ;struct ocfs2_super *osb;struct ocfs2_dinode *dirfe; +struct ocfs2_dinode *fe =NULL ;struct buffer_head *new_fe_bh =NULL ;struct inode *inode =NULL ;struct ocfs2_alloc_context *inode_ac =NULL ;
@@ -394,6 +395,7 @@ static int ocfs2_mknod(struct inode *dir, goto leave; } + fe = (struct ocfs2_dinode *) new_fe_bh->b_data;if (S_ISDIR (mode)) { status =ocfs2_fill_new_dir (osb, handle, dir, inode, new_fe_bh, data_ac, meta_ac);
@@ -459,8 +461,11 @@ static int ocfs2_mknod(struct inode *dir, leave:if (status <0 && did_quota_inode)dquot_free_inode (inode); -if (handle) +if (handle) { +if (status <0 && fe) +ocfs2_set_links_count (fe,0 );ocfs2_commit_trans (osb, handle); + }ocfs2_inode_unlock (dir,1 );if (did_block_signals)
@@ -636,18 +641,9 @@ static int ocfs2_mknod_locked(struct ocfs2_super *osb,return status; } - status =__ocfs2_mknod_locked (dir, inode, dev, new_fe_bh, +return __ocfs2_mknod_locked (dir, inode, dev, new_fe_bh, parent_fe_bh, handle, inode_ac, fe_blkno, suballoc_loc, suballoc_bit); -if (status <0 ) { -u64 bg_blkno =ocfs2_which_suballoc_group (fe_blkno, suballoc_bit); -int tmp =ocfs2_free_suballoc_bits (handle, inode_ac->ac_inode, - inode_ac->ac_bh, suballoc_bit, bg_blkno,1 ); -if (tmp) -mlog_errno (tmp); - } - -return status; } static int ocfs2_mkdir(struct inode *dir,
@@ -2028,8 +2024,11 @@ static int ocfs2_symlink(struct inode *dir, ocfs2_clusters_to_bytes(osb->sb, 1));if (status <0 && did_quota_inode)dquot_free_inode (inode); -if (handle) +if (handle) { +if (status <0 && fe) +ocfs2_set_links_count (fe,0 );ocfs2_commit_trans (osb, handle); + }ocfs2_inode_unlock (dir,1 );if (did_block_signals)
include/uapi/linux/videodev2.h +2 -1
@@ -1318,7 +1318,8 @@ struct v4l2_bt_timings { ((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt))#define V4L2_DV_BT_BLANKING_HEIGHT (bt) \ ((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \ - (bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) + ((bt)->interlaced ? \ + ((bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) : 0))#define V4L2_DV_BT_FRAME_HEIGHT (bt) \ ((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt))
mm/hugetlb.c +1 -1
@@ -2104,11 +2104,11 @@ struct page *alloc_huge_page(struct vm_area_struct *vma, page =__alloc_buddy_huge_page_with_mpol (h, vma, addr);if (!page) goto out_uncharge_cgroup; +spin_lock (&hugetlb_lock);if (!avoid_reserve &&vma_has_reserves (vma, gbl_chg)) {SetPagePrivate (page); h->resv_huge_pages--; } -spin_lock (&hugetlb_lock);list_move (&page->lru, &h->hugepage_activelist);/* Fall through */ }
net/atm/mpoa_proc.c +2 -1
@@ -219,11 +219,12 @@ static ssize_t proc_mpc_write(struct file *file, const char __user *buff,if (!page)return -ENOMEM ; -for (p = page, len =0 ; len < nbytes; p++, len++) { +for (p = page, len =0 ; len < nbytes; p++) {if (get_user (*p, buff++)) {free_page ((unsigned long )page);return -EFAULT ; } + len +=1 ;if (*p =='\0' || *p =='\n' )break ; }
net/ieee802154/socket.c +3 -1
@@ -516,8 +516,10 @@ static int dgram_bind(struct sock *sk, struct sockaddr *uaddr, int len)if (err <0 ) goto out; -if (addr->family !=AF_IEEE802154 ) +if (addr->family !=AF_IEEE802154 ) { + err = -EINVAL ; goto out; + }ieee802154_addr_from_sa (&haddr, &addr->addr); dev =ieee802154_get_dev (sock_net (sk), &haddr);
net/ipv4/tcp_input.c +2 -1
@@ -2053,7 +2053,8 @@ void tcp_enter_loss(struct sock *sk)*/ static bool tcp_check_sack_reneging (struct sock *sk,int flag) { -if (flag &FLAG_SACK_RENEGING ) { +if (flag &FLAG_SACK_RENEGING && + flag &FLAG_SND_UNA_ADVANCED ) {struct tcp_sock *tp =tcp_sk (sk);unsigned long delay =max (usecs_to_jiffies (tp->srtt_us >>4 ),msecs_to_jiffies (10 ));
net/kcm/kcmsock.c +15 -8
@@ -162,7 +162,8 @@ static void kcm_rcv_ready(struct kcm_sock *kcm)/* Buffer limit is okay now, add to ready list */ list_add_tail (&kcm->wait_rx_list, &kcm->mux->kcm_rx_waiters); - kcm->rx_wait = true; +/* paired with lockless reads in kcm_rfree() */ +WRITE_ONCE (kcm->rx_wait, true); }static void kcm_rfree (struct sk_buff *skb)
@@ -178,7 +179,7 @@ static void kcm_rfree(struct sk_buff *skb)/* For reading rx_wait and rx_psock without holding lock */ smp_mb__after_atomic (); -if (!kcm->rx_wait && !kcm->rx_psock && +if (!READ_ONCE (kcm->rx_wait) && !READ_ONCE (kcm->rx_psock) &&sk_rmem_alloc_get (sk) < sk->sk_rcvlowat) {spin_lock_bh (&mux->rx_lock);kcm_rcv_ready (kcm);
@@ -237,7 +238,8 @@ static void requeue_rx_msgs(struct kcm_mux *mux, struct sk_buff_head *head)if (kcm_queue_rcv_skb (&kcm->sk, skb)) {/* Should mean socket buffer full */ list_del (&kcm->wait_rx_list); - kcm->rx_wait = false; +/* paired with lockless reads in kcm_rfree() */ +WRITE_ONCE (kcm->rx_wait, false);/* Commit rx_wait to read in kcm_free */ smp_wmb ();
@@ -280,10 +282,12 @@ static struct kcm_sock *reserve_rx_kcm(struct kcm_psock *psock, kcm =list_first_entry (&mux->kcm_rx_waiters, struct kcm_sock, wait_rx_list);list_del (&kcm->wait_rx_list); - kcm->rx_wait = false; +/* paired with lockless reads in kcm_rfree() */ +WRITE_ONCE (kcm->rx_wait, false); psock->rx_kcm = kcm; - kcm->rx_psock = psock; +/* paired with lockless reads in kcm_rfree() */ +WRITE_ONCE (kcm->rx_psock, psock);spin_unlock_bh (&mux->rx_lock);
@@ -310,7 +314,8 @@ static void unreserve_rx_kcm(struct kcm_psock *psock,spin_lock_bh (&mux->rx_lock); psock->rx_kcm =NULL ; - kcm->rx_psock =NULL ; +/* paired with lockless reads in kcm_rfree() */ +WRITE_ONCE (kcm->rx_psock,NULL );/* Commit kcm->rx_psock before sk_rmem_alloc_get to sync with * kcm_rfree
@@ -1238,7 +1243,8 @@ static void kcm_recv_disable(struct kcm_sock *kcm)if (!kcm->rx_psock) {if (kcm->rx_wait) {list_del (&kcm->wait_rx_list); - kcm->rx_wait = false; +/* paired with lockless reads in kcm_rfree() */ +WRITE_ONCE (kcm->rx_wait, false); }requeue_rx_msgs (mux, &kcm->sk.sk_receive_queue);
@@ -1798,7 +1804,8 @@ static void kcm_done(struct kcm_sock *kcm)if (kcm->rx_wait) {list_del (&kcm->wait_rx_list); - kcm->rx_wait = false; +/* paired with lockless reads in kcm_rfree() */ +WRITE_ONCE (kcm->rx_wait, false); }/* Move any pending receive messages to other kcm sockets */ requeue_rx_msgs (mux, &sk->sk_receive_queue);
net/mac802154/rx.c +3 -2
@@ -140,7 +140,7 @@ static int ieee802154_parse_frame_start(struct sk_buff *skb, struct ieee802154_hdr *hdr) { int hlen; -struct ieee802154_mac_cb *cb =mac_cb_init (skb); +struct ieee802154_mac_cb *cb =mac_cb (skb);skb_reset_mac_header (skb);
@@ -302,8 +302,9 @@ void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi) { struct ieee802154_local *local = hw_to_local(hw); +struct ieee802154_mac_cb *cb =mac_cb_init (skb); -mac_cb (skb)->lqi = lqi; + cb->lqi = lqi; skb->pkt_type =IEEE802154_RX_MSG ;skb_queue_tail (&local->skb_queue, skb);tasklet_schedule (&local->tasklet);
net/openvswitch/datapath.c +2 -1
@@ -1556,7 +1556,8 @@ static void ovs_dp_reset_user_features(struct sk_buff *skb, struct genl_info *inif (IS_ERR (dp))return ; -WARN (dp->user_features,"Dropping previously announced user features\n" ); +pr_warn ("%s: Dropping previously announced user features\n" , +ovs_dp_name (dp)); dp->user_features =0 ; }
sound/aoa/soundbus/i2sbus/core.c +6 -1
@@ -148,6 +148,7 @@ static int i2sbus_get_and_fixup_rsrc(struct device_node *np, int index,return rc; } +/* Returns 1 if added, 0 for otherwise; don't return a negative value! */ /* FIXME: look at device node refcounting */ static int i2sbus_add_dev(struct macio_dev *macio, struct i2sbus_control *control,
@@ -213,7 +214,7 @@ static int i2sbus_add_dev(struct macio_dev *macio,* either as the second one in that case is just a modem. */ if (!ok) {kfree (dev); -return -ENODEV ; +return 0 ; }mutex_init (&dev->lock);
@@ -302,6 +303,10 @@ static int i2sbus_add_dev(struct macio_dev *macio,if (soundbus_add_one (&dev->sound)) {printk (KERN_DEBUG "i2sbus: device registration error!\n" ); +if (dev->sound.ofdev.dev.kobj.state_initialized) { +soundbus_dev_put (&dev->sound); +return 0 ; + } goto err; }
sound/pci/ac97/ac97_codec.c +1 -0
@@ -1965,6 +1965,7 @@ static int snd_ac97_dev_register(struct snd_device *device) snd_ac97_get_short_name(ac97));if ((err =device_register (&ac97->dev)) <0 ) {ac97_err (ac97,"Can't register ac97 bus\n" ); +put_device (&ac97->dev); ac97->dev.bus =NULL ;return err; }
sound/pci/au88x0/au88x0.h +3 -3
@@ -153,7 +153,7 @@ struct snd_vortex {#ifndef CHIP_AU8810 stream_t dma_wt[NR_WT ];wt_voice_t wt_voice[NR_WT ];/* WT register cache. */ -char mixwt[(NR_WT /NR_WTPB ) *6 ];/* WT mixin objects */ +s8 mixwt[(NR_WT /NR_WTPB ) *6 ];/* WT mixin objects */ #endif /* Global resources */
@@ -247,8 +247,8 @@ static int vortex_alsafmt_aspfmt(int alsafmt, vortex_t *v);static void vortex_connect_default (vortex_t * vortex,int en);static int vortex_adb_allocroute (vortex_t * vortex,int dma,int nr_ch,int dir,int type,int subdev); -static char vortex_adb_checkinout (vortex_t * vortex,int resmap[],int out, -int restype); +static int vortex_adb_checkinout (vortex_t * vortex,int resmap[],int out, +int restype);#ifndef CHIP_AU8810 static int vortex_wt_allocroute (vortex_t * vortex,int dma,int nr_ch);static void vortex_wt_connect (vortex_t * vortex,int en);
sound/pci/au88x0/au88x0_core.c +1 -1
@@ -2004,7 +2004,7 @@ static int resnum[VORTEX_RESOURCE_LAST] =out: Mean checkout if != 0. Else mean Checkin resource. restype: Indicates type of resource to be checked in or out. */ -static char +static int vortex_adb_checkinout (vortex_t * vortex,int resmap[],int out,int restype) {int i, qty = resnum[restype], resinuse =0 ;
sound/synth/emux/emux.c +1 -6
@@ -138,15 +138,10 @@ EXPORT_SYMBOL(snd_emux_register);*/ int snd_emux_free (struct snd_emux *emu) { -unsigned long flags; -if (! emu)return -EINVAL ; -spin_lock_irqsave (&emu->voice_lock, flags); -if (emu->timer_active) -del_timer (&emu->tlist); -spin_unlock_irqrestore (&emu->voice_lock, flags); +del_timer_sync (&emu->tlist);snd_emux_proc_free (emu);snd_emux_delete_virmidi (emu);
tools/iio/iio_utils.c +4 -0
@@ -546,6 +546,10 @@ static int calc_digits(int num) {int count =0 ; +/* It takes a digit to represent zero */ +if (!num) +return 1 ; +while (num !=0 ) { num /=10 ; count++;