Linux 4.19.320
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.320 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.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 | 18 Documentation/hwmon/hwmon-kernel-api.txt | 24 Makefile | 2 arch/arm64/Kconfig | 38 + arch/arm64/boot/dts/rockchip/rk3328.dtsi | 4 arch/arm64/include/asm/assembler.h | 13 arch/arm64/include/asm/barrier.h | 4 arch/arm64/include/asm/cpucaps.h | 4 arch/arm64/include/asm/cputype.h | 16 arch/arm64/include/asm/sysreg.h | 6 arch/arm64/include/asm/uaccess.h | 3 arch/arm64/include/uapi/asm/hwcap.h | 1 arch/arm64/kernel/cpu_errata.c | 43 + arch/arm64/kernel/cpufeature.c | 103 +++ arch/arm64/kernel/cpuinfo.c | 1 arch/m68k/amiga/config.c | 9 arch/m68k/atari/ataints.c | 6 arch/m68k/include/asm/cmpxchg.h | 2 arch/mips/include/asm/mips-cm.h | 4 arch/mips/kernel/smp-cps.c | 5 arch/powerpc/xmon/ppc-dis.c | 33 - arch/sparc/include/asm/oplib_64.h | 1 arch/sparc/prom/init_64.c | 3 arch/sparc/prom/p1275.c | 2 arch/x86/events/intel/pt.c | 157 +++-- arch/x86/events/intel/pt.h | 25 arch/x86/include/asm/intel_pt.h | 23 arch/x86/kernel/cpu/mtrr/mtrr.c | 2 arch/x86/kernel/devicetree.c | 2 arch/x86/mm/pti.c | 6 arch/x86/pci/intel_mid_pci.c | 4 arch/x86/pci/xen.c | 4 arch/x86/platform/intel/iosf_mbi.c | 4 arch/x86/xen/p2m.c | 4 drivers/android/binder.c | 4 drivers/base/core.c | 13 drivers/base/devres.c | 8 drivers/base/module.c | 4 drivers/char/hw_random/amd-rng.c | 4 drivers/char/tpm/eventlog/common.c | 2 drivers/clk/davinci/da8xx-cfgchip.c | 4 drivers/clocksource/sh_cmt.c | 13 drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 5 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 6 drivers/gpu/drm/gma500/cdv_intel_lvds.c | 3 drivers/gpu/drm/gma500/psb_intel_lvds.c | 3 drivers/gpu/drm/i915/i915_gem.c | 47 + drivers/gpu/drm/mgag200/mgag200_i2c.c | 2 drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c | 2 drivers/hwmon/adt7475.c | 2 drivers/hwmon/max6697.c | 145 ++--- drivers/i2c/i2c-smbus.c | 69 +- drivers/infiniband/core/iwcm.c | 11 drivers/infiniband/hw/bnxt_re/ib_verbs.c | 8 drivers/infiniband/hw/bnxt_re/qplib_fp.h | 6 drivers/infiniband/hw/mlx4/alias_GUID.c | 2 drivers/infiniband/hw/mlx4/mad.c | 2 drivers/infiniband/sw/rxe/rxe_req.c | 7 drivers/input/mouse/elan_i2c_core.c | 2 drivers/irqchip/irq-mbigen.c | 20 drivers/isdn/hardware/mISDN/hfcmulti.c | 7 drivers/leds/led-triggers.c | 2 drivers/leds/leds-ss4200.c | 7 drivers/macintosh/therm_windtunnel.c | 2 drivers/md/raid5.c | 20 drivers/media/pci/saa7134/saa7134-dvb.c | 8 drivers/media/platform/qcom/venus/vdec.c | 1 drivers/media/platform/vsp1/vsp1_histo.c | 20 drivers/media/platform/vsp1/vsp1_pipe.h | 2 drivers/media/platform/vsp1/vsp1_rpf.c | 8 drivers/media/rc/imon.c | 5 drivers/media/usb/uvc/uvc_ctrl.c | 90 ++- drivers/media/usb/uvc/uvc_video.c | 37 + drivers/media/usb/uvc/uvcvideo.h | 5 drivers/mfd/omap-usb-tll.c | 3 drivers/mtd/tests/Makefile | 34 - drivers/mtd/tests/mtd_test.c | 9 drivers/mtd/ubi/eba.c | 3 drivers/net/bonding/bond_main.c | 7 drivers/net/ethernet/brocade/bna/bna_types.h | 2 drivers/net/ethernet/brocade/bna/bnad.c | 11 drivers/net/ethernet/freescale/fec_main.c | 52 + drivers/net/ethernet/freescale/fec_ptp.c | 3 drivers/net/ethernet/intel/ice/ice_common.c | 102 ++- drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 24 drivers/net/netconsole.c | 2 drivers/net/usb/qmi_wwan.c | 1 drivers/net/usb/sr9700.c | 11 drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c | 18 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 drivers/nvme/host/pci.c | 7 drivers/parport/daisy.c | 6 drivers/parport/ieee1284.c | 4 drivers/parport/ieee1284_ops.c | 3 drivers/parport/parport_amiga.c | 2 drivers/parport/parport_atari.c | 2 drivers/parport/parport_cs.c | 6 drivers/parport/parport_gsc.c | 15 drivers/parport/parport_ip32.c | 25 drivers/parport/parport_mfc3.c | 2 drivers/parport/parport_pc.c | 180 ++---- drivers/parport/parport_sunbpp.c | 2 drivers/parport/probe.c | 7 drivers/parport/procfs.c | 28 drivers/parport/share.c | 24 drivers/pci/controller/pci-hyperv.c | 4 drivers/pci/controller/pcie-rockchip.c | 12 drivers/pci/setup-bus.c | 32 - drivers/pinctrl/core.c | 12 drivers/pinctrl/freescale/pinctrl-mxs.c | 4 drivers/pinctrl/pinctrl-single.c | 7 drivers/pinctrl/ti/pinctrl-ti-iodelay.c | 14 drivers/platform/chrome/cros_ec_debugfs.c | 1 drivers/platform/mips/cpu_hwmon.c | 3 drivers/power/supply/axp288_charger.c | 22 drivers/pwm/pwm-stm32.c | 5 drivers/remoteproc/imx_rproc.c | 5 drivers/rtc/rtc-cmos.c | 10 drivers/s390/char/sclp_sd.c | 10 drivers/scsi/qla2xxx/qla_bsg.c | 2 drivers/scsi/qla2xxx/qla_mid.c | 2 drivers/scsi/qla2xxx/qla_nvme.c | 5 drivers/scsi/ufs/ufshcd.c | 11 drivers/spi/spi-fsl-lpspi.c | 281 ++++++---- drivers/tty/serial/serial_core.c | 8 drivers/usb/gadget/udc/core.c | 10 drivers/usb/serial/usb_debug.c | 7 drivers/usb/usbip/vhci_hcd.c | 9 fs/btrfs/free-space-cache.c | 1 fs/exec.c | 8 fs/ext4/mballoc.c | 3 fs/ext4/namei.c | 73 ++ fs/ext4/xattr.c | 6 fs/f2fs/inode.c | 3 fs/file.c | 1 fs/hfs/inode.c | 3 fs/hfsplus/bfind.c | 15 fs/hfsplus/extents.c | 9 fs/hfsplus/hfsplus_fs.h | 21 fs/jbd2/journal.c | 1 fs/jfs/jfs_imap.c | 5 fs/nilfs2/btnode.c | 25 fs/nilfs2/btree.c | 4 fs/nilfs2/segment.c | 7 fs/udf/balloc.c | 36 - include/linux/hwmon-sysfs.h | 39 + include/linux/pci_ids.h | 2 include/linux/trace_events.h | 1 include/net/netfilter/nf_tables.h | 21 include/uapi/linux/zorro_ids.h | 3 kernel/debug/kdb/kdb_io.c | 8 kernel/dma/mapping.c | 2 kernel/events/core.c | 2 kernel/events/internal.h | 2 kernel/time/ntp.c | 9 kernel/time/tick-broadcast.c | 24 kernel/trace/tracing_map.c | 6 kernel/watchdog_hld.c | 11 lib/decompress_bunzip2.c | 3 lib/kobject_uevent.c | 17 mm/page-writeback.c | 30 - net/bluetooth/l2cap_core.c | 1 net/core/link_watch.c | 4 net/ipv4/route.c | 21 net/ipv6/addrconf.c | 3 net/ipv6/ndisc.c | 34 - net/iucv/af_iucv.c | 4 net/netfilter/ipvs/ip_vs_proto_sctp.c | 4 net/netfilter/nf_conntrack_netlink.c | 3 net/netfilter/nf_tables_api.c | 128 ---- net/netfilter/nft_set_hash.c | 8 net/netfilter/nft_set_rbtree.c | 6 net/packet/af_packet.c | 86 ++- net/smc/smc_core.c | 32 - net/sunrpc/sched.c | 4 net/tipc/udp_media.c | 5 net/wireless/nl80211.c | 10 net/wireless/util.c | 8 scripts/gcc-x86_32-has-stack-protector.sh | 2 scripts/gcc-x86_64-has-stack-protector.sh | 2 sound/usb/line6/driver.c | 5 sound/usb/stream.c | 4 tools/memory-model/lock.cat | 20 tools/perf/util/sort.c | 2 tools/testing/selftests/bpf/test_sockmap.c | 3 tools/testing/selftests/net/forwarding/devlink_lib.sh | 2 tools/testing/selftests/sigaltstack/current_stack_pointer.h | 2 187 files changed, 1974 insertions(+), 1087 deletions(-)
Adrian Hunter (3):
perf: Fix perf_aux_size() for greater-than 32-bit size
perf: Prevent passing zero nr_pages to rb_alloc_aux() perf/x86/intel/pt: Fix a topa_entry base address calculation
Al Viro (1):
protect the fetch of ->fd[fd] in do_dup2() from mispredictions
Alan Stern (1):
tools/memory-model: Fix bug in lock.cat
Aleksandr Burakov (1):
saa7134: Unchecked i2c_transfer function result fixed
Aleksandr Mishin (1):
remoteproc: imx_rproc: Skip over memory region when node value is NULL
Alex Shi (1):
fs/nilfs2: remove some unused macros to tame gcc
Alexander Shishkin (3):
perf/x86/intel/pt: Use helpers to obtain ToPA entry size perf/x86/intel/pt: Use pointer arithmetics instead in ToPA entry calculation perf/x86/intel/pt: Split ToPA metadata and page layout
Alexandra Winter (1):
net/iucv: fix use after free in iucv_sock_close()
Alexey Kodanev (1):
bna: adjust 'name' buf size of bna_tcb and bna_ccb structures
Amit Cohen (1):
selftests: forwarding: devlink_lib: Wait for udev events after reloading
Amit Daniel Kachhap (1):
arm64: cpufeature: Fix the visibility of compat hwcaps
Andi Kleen (1):
x86/mtrr: Check if fixed MTRRs exist before saving them
Andi Shyti (1):
drm/i915/gem: Fix Virtual Memory mapping boundaries calculation
Andreas Larsson (1):
sparc64: Fix incorrect function signature and add prototype for prom_cif_init
Andy Shevchenko (1):
driver core: Cast to (void *) with __force for __percpu pointer
Anirudh Venkataramanan (1):
ice: Rework flex descriptor programming
Arnd Bergmann (2):
mtd: make mtd_test.c a separate module
kdb: address -Wformat-security warnings
Baochen Qiang (2):
wifi: cfg80211: fix typo in cfg80211_calculate_bitrate_he()
wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he()Baokun Li (2):
ext4: check dot and dotdot of dx_root before making dir indexed
ext4: make sure the first directory block is not a hole
Bart Van Assche (1):
RDMA/iwcm: Fix a use-after-free related to destroying CM IDs
Bastien Curutchet (1):
clk: davinci: da8xx-cfgchip: Initialize clk_init_data before use
Benjamin Coddington (1):
SUNRPC: Fix a race to wake a sync task
Besar Wicaksono (1):
arm64: Add Neoverse-V2 part
Breno Leitao (1):
net: netconsole: Disable target before netpoll cleanup
Carlos Llamas (1):
binder: fix hang of unregistered readers
Chao Peng (1):
perf/x86/intel/pt: Export pt_cap_get()
Chao Yu (3):
hfsplus: fix to avoid false alarm of circular locking
hfs: fix to initialize fields of hfs_inode_info after hfs_alloc_inode()
f2fs: fix to don't dirty inode for readonly filesystem
Chen Ni (1):
x86/xen: Convert comma to semicolon
Chen-Yu Tsai (1):
PCI: rockchip: Make 'ep-gpios' DT property optional
Chengen Du (1):
af_packet: Handle outgoing VLAN packets without hardware offloading
Chris Wulff (1):
usb: gadget: core: Check for unset descriptor
Clark Wang (5):
spi: lpspi: Replace all "master" with "controller"
spi: lpspi: Add slave mode support
spi: lpspi: Let watermark change with send data length
spi: lpspi: Add i.MX8 boards support for lpspi
spi: lpspi: add the error info of transfer speed setting
Corey Minyard (1):
i2c: smbus: Don't filter out duplicate alerts
Csókás Bence (1):
net: fec: Refactor: #define magic constants
Csókás, Bence (2):
net: fec: Fix FEC_ECR_EN1588 being cleared on link-down
net: fec: Stop PPS on driver remove
Dan Carpenter (1):
mISDN: Fix a use after free in hfcmulti_tx()
Dan Williams (1):
driver core: Fix uevent_show() vs driver detach race
Daniel Schaefer (1):
media: uvcvideo: Override default flags
Daniele Palmas (1):
net: usb: qmi_wwan: fix memory leak for not ip packets
Dikshita Agarwal (1):
media: venus: fix use after free in vdec_close
Dmitry Antipov (1):
Bluetooth: l2cap: always unlock channel in l2cap_conless_channel()
Dmitry Torokhov (1):
Input: elan_i2c - do not leave interrupt disabled on suspend failure
Dominique Martinet (1):
MIPS: Octeron: remove source file executable bit
Dong Aisheng (1):
remoteproc: imx_rproc: Fix ignoring mapping vdev regions
Douglas Anderson (1):
kdb: Use the passed prompt in kdb_position_cursor()
Eero Tamminen (1):
m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages
Eric Dumazet (1):
net: linkwatch: use system_unbound_wq
FUJITA Tomonori (1):
PCI: Add Edimax Vendor ID to pci_ids.h
Fedor Pchelkin (1):
ubi: eba: properly rollback inside self_check_eba
Filipe Manana (1):
btrfs: fix bitmap leak when loading free space cache on duplicate entry
Florian Westphal (1):
netfilter: nf_tables: prefer nft_chain_validate
Geliang Tang (1):
selftests/bpf: Check length of recv in test_sockmap
George Kennedy (1):
serial: core: check uartclk for zero to avoid divide by zero
Greg Kroah-Hartman (1):
Linux 4.19.320
Gregory CLEMENT (1):
MIPS: SMP-CPS: Fix address for GCR_ACCESS register for CM3 and later
Guangguan Wang (1):
net/smc: set rmb's SG_MAX_SINGLE_ALLOC limitation only when CONFIG_ARCH_NO_SG_CHAIN is defined
Guenter Roeck (6):
hwmon: (max6697) Fix underflow when writing limit attributes
hwmon: Introduce SENSOR_DEVICE_ATTR_{RO, RW, WO} and variants
hwmon: (max6697) Auto-convert to use SENSOR_DEVICE_ATTR_{RO, RW, WO}
hwmon: (max6697) Fix swapped temp{1,8} critical alarms
i2c: smbus: Improve handling of stuck alerts
i2c: smbus: Send alert notifications to all devices if source not found
Gustavo A. R. Silva (1):
parport: parport_pc: Mark expected switch fall-through
Hans de Goede (3):
leds: trigger: Unregister sysfs attributes before calling deactivate()
power: supply: axp288_charger: Fix constant_charge_voltage writes
power: supply: axp288_charger: Round constant_charge_voltage writes down
Honggang LI (1):
RDMA/rxe: Don't set BTH_ACK_MASK for UC or UD QPs
Ian Forbes (1):
drm/vmwgfx: Fix overlay when using Screen Targets
Ido Schimmel (1):
ipv4: Fix incorrect source address in Record Route option
Ilpo Järvinen (7):
x86/of: Return consistent error type from x86_of_pci_irq_enable() x86/pci/intel_mid_pci: Fix PCIBIOS_* return code handling x86/pci/xen: Fix PCIBIOS_* return code handling x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos
PCI: Fix resource double counting on remove & rescan
leds: ss4200: Convert PCIBIOS_* return codes to errnos
hwrng: amd - Convert PCIBIOS_* return codes to errnos
Ismael Luceno (1):
ipvs: Avoid unnecessary calls to skb_is_gso_sctp
Jack Wang (1):
bnxt_re: Fix imm_data endianness
James Morse (1):
arm64: cpufeature: Force HWCAP to be based on the sysreg visible to user-space
Jan Kara (2):
ext4: avoid writing unitialized memory to disk in EA inodes
mm: avoid overflows in dirty throttling logic
Javier Carrasco (1):
mfd: omap-usb-tll: Use struct_size to allocate tll
Jeongjun Park (1):
jfs: Fix array-index-out-of-bounds in diFree
Jiaxun Yang (1):
platform: mips: cpu_hwmon: Disable driver on unsupported hardware
Joe Hattori (1):
char: tpm: Fix possible memory leak in tpm_bios_measurements_open()
Joe Perches (2):
parport: Convert printk(KERN_<LEVEL> to pr_<level>(
parport: Standardize use of printmode
Johannes Berg (2):
net: bonding: correctly annotate RCU in bond_should_notify_peers()
wifi: nl80211: don't give key data to userspace
Jon Derrick (1):
PCI: Equalize hotplug memory and io for occupied and empty slots
Jonas Karlman (1):
arm64: dts: rockchip: Increase VOP clk rate on RK3328
Joy Chakraborty (1):
rtc: cmos: Fix return value of nvmem callbacks
Justin Stitt (2):
ntp: Clamp maxerror and esterror to operating range
ntp: Safeguard against time_constant overflow
Kees Cook (1):
exec: Fix ToCToU between perm check and set-uid/gid usage
Kemeng Shi (2):
jbd2: avoid memleak in jbd2_journal_write_metadata_buffer
ext4: fix wrong unit use in ext4_mb_find_by_goal
Lance Richardson (1):
dma: fix call order in dmam_free_coherent
Laurent Pinchart (2):
media: renesas: vsp1: Fix _irqsave and _irq mix
media: renesas: vsp1: Store RPF partition configuration per RPF instance
Leon Romanovsky (2):
RDMA/mlx4: Fix truncated output warning in mad.c RDMA/mlx4: Fix truncated output warning in alias_GUID.c
Lucas Stach (2):
drm/etnaviv: fix DMA direction handling for cached RW buffers drm/bridge: analogix_dp: properly handle zero sized AUX transactions
Ma Ke (3):
drm/gma500: fix null pointer dereference in cdv_intel_lvds_get_modes drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes
net: usb: sr9700: fix uninitialized variable use in sr_mdio_read
Maciej Żenczykowski (2):
net: ip_rt_get_source() - use new style struct initializer instead of memset
ipv6: fix ndisc_is_useropt() handling for PIO
Manish Rangankar (1):
scsi: qla2xxx: During vport delete send async logout explicitly
Manivannan Sadhasivam (1):
PCI: rockchip: Use GPIOD_OUT_LOW flag while requesting ep_gpio
Marco Cavenati (1):
perf/x86/intel/pt: Fix topa_entry base length
Marek Marczykowski-Górecki (1):
USB: serial: debug: do not echo input by default
Mark Rutland (11):
arm64: cputype: Add Cortex-X4 definitions
arm64: cputype: Add Neoverse-V3 definitions
arm64: errata: Add workaround for Arm errata 3194386 and 3312417
arm64: cputype: Add Cortex-X3 definitions
arm64: cputype: Add Cortex-A720 definitions
arm64: cputype: Add Cortex-X925 definitions
arm64: errata: Unify speculative SSBS errata logic
arm64: errata: Expand speculative SSBS workaround
arm64: cputype: Add Cortex-X1C definitions
arm64: cputype: Add Cortex-A725 definitions
arm64: errata: Expand speculative SSBS workaround (again)
Menglong Dong (1):
bpf: kprobe: remove unused declaring of bpf_kprobe_override
Michael Ellerman (2):
powerpc/xmon: Fix disassembly CPU feature checks selftests/sigaltstack: Fix ppc64 GCC build
Michal Pecio (1):
media: uvcvideo: Fix the bandwdith quirk on USB 3.x
Namhyung Kim (1):
perf report: Fix condition in sort__sym_cmp()
Nathan Chancellor (1):
kbuild: Fix '-S -c' in x86 stack protector scripts
Nick Bowler (1):
macintosh/therm_windtunnel: fix module unload.
Nicolas Dichtel (1):
ipv6: take care of scope when choosing the src addr
Niklas Söderlund (1):
clocksource/drivers/sh_cmt: Address race condition for clock events
Nilesh Javali (1):
scsi: qla2xxx: validate nvme_local_port correctly
Oleksandr Suvorov (1):
spi: fsl-lpspi: remove unneeded array
Oliver Neukum (1):
usb: vhci-hcd: Do not drop references before new references are gained
Pablo Neira Ayuso (3):
netfilter: ctnetlink: use helper function to calculate expect ID
netfilter: nf_tables: set element extended ACK reporting support
netfilter: nf_tables: use timestamp to check for set element timeout
Paolo Pisati (1):
m68k: amiga: Turn off Warp1260 interrupts during boot
Peng Fan (2):
pinctrl: freescale: mxs: Fix refcount of child
remoteproc: imx_rproc: ignore mapping vdev regions
Peter Oberparleiter (1):
s390/sclp: Prevent release of buffer in I/O
Peter Zijlstra (1):
x86/mm: Fix pti_clone_pgtable() alignment assumption
Rafael Beims (1):
wifi: mwifiex: Fix interface type change
Ricardo Ribalda (3):
media: imon: Fix race getting ictx->lock
media: uvcvideo: Allow entity-defined get_info and get_cur
media: uvcvideo: Ignore empty TS packets
Roman Smirnov (1):
udf: prevent integer overflow in udf_bitmap_free_blocks()
Ross Lagerwall (1):
decompress_bunzip2: fix rare decompression failure
Ryusuke Konishi (2):
nilfs2: avoid undefined behavior in nilfs_cnt32_ge macro
nilfs2: handle inconsistent state in nilfs_btnode_create_block()
Samasth Norway Ananda (1):
wifi: brcmsmac: LCN PHY code is used for BCM4313 2G-only device
Saurav Kashyap (1):
scsi: qla2xxx: Return ENOBUFS if sg_cnt is more than one for ELS cmds
Shigeru Yoshida (1):
tipc: Return non-zero value from tipc_udp_addr2str() on error
Stefan Raspl (1):
net/smc: Allow SMC-D 1MB DMB allocations
Stefan Wahren (1):
spi: spi-fsl-lpspi: Fix scldiv calculation
Takashi Iwai (2):
ALSA: usb-audio: Correct surround channels in UAC1 channel map
ALSA: line6: Fix racy access to midibuf
Thomas Gleixner (2):
watchdog/perf: properly initialize the turbo mode timestamp and rearm counter tick/broadcast: Move per CPU pointer access into the atomic section
Thomas Zimmermann (1):
drm/mgag200: Set DDC timeout in milliseconds
Thorsten Blum (1):
m68k: cmpxchg: Fix return value for default case in __arch_xchg()
Tze-nan Wu (1):
tracing: Fix overflow in get_free_elt()
Tzung-Bi Shih (1):
platform/chrome: cros_ec_debugfs: fix wrong EC message version
Uwe Kleine-König (2):
pwm: stm32: Always do lazy disabling
pinctrl: ti: ti-iodelay: Drop if block with always false condition
Vamshi Gajjela (1):
scsi: ufs: core: Fix hba->last_dme_cmd_tstamp timestamp updating logic
WangYuli (1):
nvme/pci: Add APST quirk for Lenovo N60z laptop
Wayne Tung (1):
hwmon: (adt7475) Fix default duty on fan is disabled
Wei Liu (1):
PCI: hv: Return zero, not garbage, when reading PCI_INTERRUPT_PIN
Wenlin Kang (1):
kdb: Fix bound check compiler warning
Will Deacon (1):
arm64: Add support for SB barrier and patch in over DSB; ISB sequences
Yang Yingliang (3):
pinctrl: core: fix possible memory leak when pinctrl_enable() fails
pinctrl: single: fix possible memory leak when pinctrl_enable() fails
pinctrl: ti: ti-iodelay: fix possible memory leak when pinctrl_enable() fails
Yipeng Zou (1):
irqchip/mbigen: Fix mbigen node address layout
Yu Kuai (1):
md/raid5: avoid BUG_ON() while continue reshape after reassembling
Yu Liao (1):
tick/broadcast: Make takeover of broadcast hrtimer reliable
Yunke Cao (1):
media: uvcvideo: Use entity get_cur in uvc_ctrl_set
Zijun Hu (2):
kobject_uevent: Fix OOB access within zap_modalias_env()
devres: Fix memory leakage caused by driver API devm_free_percpu()
tuhaowen (1):
dev/parport: fix the array out-of-bounds risk
Greg Kroah-Hartman
maintainerDocumentation/arm64/silicon-errata.txt +18 -0
@@ -61,7 +61,25 @@ stable kernels. | ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 | | ARM | Cortex-A55 | #1024718 | ARM64_ERRATUM_1024718 | | ARM | Cortex-A76 | #1463225 | ARM64_ERRATUM_1463225 | +| ARM | Cortex-A76 | #3324349 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-A77 | #3324348 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-A78 | #3324344 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-A78C | #3324346,3324347| ARM64_ERRATUM_3194386 | +| ARM | Cortex-A710 | #3324338 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-A720 | #3456091 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-A725 | #3456106 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-X1 | #3324344 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-X1C | #3324346 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-X2 | #3324338 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-X3 | #3324335 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-X4 | #3194386 | ARM64_ERRATUM_3194386 | +| ARM | Cortex-X925 | #3324334 | ARM64_ERRATUM_3194386 | | ARM | Neoverse-N1 | #1542419 | ARM64_ERRATUM_1542419 | +| ARM | Neoverse-N1 | #3324349 | ARM64_ERRATUM_3194386 | +| ARM | Neoverse-N2 | #3324339 | ARM64_ERRATUM_3194386 | +| ARM | Neoverse-V1 | #3324341 | ARM64_ERRATUM_3194386 | +| ARM | Neoverse-V2 | #3324336 | ARM64_ERRATUM_3194386 | +| ARM | Neoverse-V3 | #3312417 | ARM64_ERRATUM_3194386 | | ARM | MMU-500 | #841119,#826419 | N/A | | | | | | | Cavium | ThunderX ITS | #22375, #24313 | CAVIUM_ERRATUM_22375 |
Documentation/hwmon/hwmon-kernel-api.txt +16 -8
@@ -299,17 +299,25 @@ functions is used. The header file linux/hwmon-sysfs.h provides a number of useful macros to declare and use hardware monitoring sysfs attributes. -In many cases, you can use the exsting define DEVICE_ATTR to declare such -attributes. This is feasible if an attribute has no additional context. However, -in many cases there will be additional information such as a sensor index which -will need to be passed to the sysfs attribute handling function. +In many cases, you can use the exsting define DEVICE_ATTR or its variants +DEVICE_ATTR_{RW,RO,WO} to declare such attributes. This is feasible if an +attribute has no additional context. However, in many cases there will be +additional information such as a sensor index which will need to be passed +to the sysfs attribute handling function. SENSOR_DEVICE_ATTR and SENSOR_DEVICE_ATTR_2 can be used to define attributes which need such additional context information. SENSOR_DEVICE_ATTR requires one additional argument, SENSOR_DEVICE_ATTR_2 requires two. -SENSOR_DEVICE_ATTR defines a struct sensor_device_attribute variable. -This structure has the following fields. +Simplified variants of SENSOR_DEVICE_ATTR and SENSOR_DEVICE_ATTR_2 are available +and should be used if standard attribute permissions and function names are +feasible. Standard permissions are 0644 for SENSOR_DEVICE_ATTR[_2]_RW, +0444 for SENSOR_DEVICE_ATTR[_2]_RO, and 0200 for SENSOR_DEVICE_ATTR[_2]_WO. +Standard functions, similar to DEVICE_ATTR_{RW,RO,WO}, have _show and _store +appended to the provided function name. + +SENSOR_DEVICE_ATTR and its variants define a struct sensor_device_attribute +variable. This structure has the following fields. struct sensor_device_attribute { struct device_attribute dev_attr;
@@ -320,8 +328,8 @@ You can use to_sensor_dev_attr to get the pointer to this structure from the attribute read or write function. Its parameter is the device to which the attribute is attached. -SENSOR_DEVICE_ATTR_2 defines a struct sensor_device_attribute_2 variable, -which is defined as follows. +SENSOR_DEVICE_ATTR_2 and its variants define a struct sensor_device_attribute_2 +variable, which is defined as follows. struct sensor_device_attribute_2 { struct device_attribute dev_attr;
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 319 +SUBLEVEL = 320 EXTRAVERSION = NAME = "People's Front"
arch/arm64/Kconfig +38 -0
@@ -531,6 +531,44 @@ config ARM64_ERRATUM_1742098 If unsure, say Y. +config ARM64_ERRATUM_3194386 + bool "Cortex-*/Neoverse-*: workaround for MSR SSBS not self-synchronizing" + default y + help + This option adds the workaround for the following errata: + + * ARM Cortex-A76 erratum 3324349 + * ARM Cortex-A77 erratum 3324348 + * ARM Cortex-A78 erratum 3324344 + * ARM Cortex-A78C erratum 3324346 + * ARM Cortex-A78C erratum 3324347 + * ARM Cortex-A710 erratam 3324338 + * ARM Cortex-A720 erratum 3456091 + * ARM Cortex-A725 erratum 3456106 + * ARM Cortex-X1 erratum 3324344 + * ARM Cortex-X1C erratum 3324346 + * ARM Cortex-X2 erratum 3324338 + * ARM Cortex-X3 erratum 3324335 + * ARM Cortex-X4 erratum 3194386 + * ARM Cortex-X925 erratum 3324334 + * ARM Neoverse-N1 erratum 3324349 + * ARM Neoverse N2 erratum 3324339 + * ARM Neoverse-V1 erratum 3324341 + * ARM Neoverse V2 erratum 3324336 + * ARM Neoverse-V3 erratum 3312417 + + On affected cores "MSR SSBS, #0" instructions may not affect + subsequent speculative instructions, which may permit unexepected + speculative store bypassing. + + Work around this problem by placing a Speculation Barrier (SB) or + Instruction Synchronization Barrier (ISB) after kernel changes to + SSBS. The presence of the SSBS special-purpose register is hidden + from hwcaps and EL0 reads of ID_AA64PFR1_EL1, such that userspace + will use the PR_SPEC_STORE_BYPASS prctl to change SSBS. + + If unsure, say Y. + config CAVIUM_ERRATUM_22375 bool "Cavium erratum 22375, 24313" default y
arch/arm64/boot/dts/rockchip/rk3328.dtsi +2 -2
@@ -649,8 +649,8 @@ <0>, <24000000>, <24000000>, <24000000>, <15000000>, <15000000>, - <100000000>, <100000000>, - <100000000>, <100000000>, + <300000000>, <100000000>, + <400000000>, <100000000>, <50000000>, <100000000>, <100000000>, <100000000>, <50000000>, <50000000>,
arch/arm64/include/asm/assembler.h +13 -0
@@ -133,6 +133,19 @@ hint #22 .endm +/* + * Speculation barrier + */ + .macro sb +alternative_if_not ARM64_HAS_SB + dsb nsh +isb +alternative_else +SB_BARRIER_INSN + nop +alternative_endif + .endm +/* * Sanitise a 64-bit bounded index wrt speculation, returning zero if out * of bounds.
arch/arm64/include/asm/barrier.h +4 -0
@@ -34,6 +34,10 @@#define psb_csync () asm volatile("hint #17" : : : "memory")#define csdb () asm volatile("hint #20" : : : "memory") +#define spec_bar () asm volatile(ALTERNATIVE("dsb nsh\nisb\n", \ + SB_BARRIER_INSN"nop\n", \ + ARM64_HAS_SB)) +#define mb () dsb(sy)#define rmb () dsb(ld)#define wmb () dsb(st)
arch/arm64/include/asm/cpucaps.h +3 -1
@@ -56,7 +56,9 @@#define ARM64_WORKAROUND_1542419 35#define ARM64_SPECTRE_BHB 36#define ARM64_WORKAROUND_1742098 37 +#define ARM64_HAS_SB 38 +#define ARM64_WORKAROUND_SPECULATIVE_SSBS 39 -#define ARM64_NCAPS 38 +#define ARM64_NCAPS 40#endif /* __ASM_CPUCAPS_H */
arch/arm64/include/asm/cputype.h +16 -0
@@ -89,6 +89,14 @@#define ARM_CPU_PART_CORTEX_X2 0xD48#define ARM_CPU_PART_NEOVERSE_N2 0xD49#define ARM_CPU_PART_CORTEX_A78C 0xD4B +#define ARM_CPU_PART_CORTEX_X1C 0xD4C +#define ARM_CPU_PART_CORTEX_X3 0xD4E +#define ARM_CPU_PART_NEOVERSE_V2 0xD4F +#define ARM_CPU_PART_CORTEX_A720 0xD81 +#define ARM_CPU_PART_CORTEX_X4 0xD82 +#define ARM_CPU_PART_NEOVERSE_V3 0xD84 +#define ARM_CPU_PART_CORTEX_X925 0xD85 +#define ARM_CPU_PART_CORTEX_A725 0xD87#define APM_CPU_PART_POTENZA 0x000
@@ -125,6 +133,14 @@#define MIDR_CORTEX_X2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X2)#define MIDR_NEOVERSE_N2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N2)#define MIDR_CORTEX_A78C MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78C) +#define MIDR_CORTEX_X1C MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X1C) +#define MIDR_CORTEX_X3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X3) +#define MIDR_NEOVERSE_V2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V2) +#define MIDR_CORTEX_A720 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A720) +#define MIDR_CORTEX_X4 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X4) +#define MIDR_NEOVERSE_V3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3) +#define MIDR_CORTEX_X925 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X925) +#define MIDR_CORTEX_A725 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A725)#define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX)#define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX)#define MIDR_THUNDERX_83XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_83XX)
arch/arm64/include/asm/sysreg.h +6 -0
@@ -97,6 +97,11 @@#define SET_PSTATE_SSBS (x) __emit_inst(0xd5000000 | REG_PSTATE_SSBS_IMM | \ (!!x)<<8 | 0x1f) +#define __SYS_BARRIER_INSN (CRm, op2, Rt) \ + __emit_inst(0xd5000000 | sys_insn(0, 3, 3, (CRm), (op2)) | ((Rt) & 0x1f)) + +#define SB_BARRIER_INSN __SYS_BARRIER_INSN(0, 7, 31) +#define SYS_DC_ISW sys_insn(1, 0, 7, 6, 2)#define SYS_DC_IGSW sys_insn(1, 0, 7, 6, 4)#define SYS_DC_IGDSW sys_insn(1, 0, 7, 6, 6)
@@ -528,6 +533,7 @@#define ID_AA64ISAR0_AES_SHIFT 4/* id_aa64isar1 */ +#define ID_AA64ISAR1_SB_SHIFT 36#define ID_AA64ISAR1_LRCPC_SHIFT 20#define ID_AA64ISAR1_FCMA_SHIFT 16#define ID_AA64ISAR1_JSCVT_SHIFT 12
arch/arm64/include/asm/uaccess.h +1 -2
@@ -46,8 +46,7 @@ static inline void set_fs(mm_segment_t fs)* Prevent a mispredicted conditional call to set_fs from forwarding * the wrong address limit to access_ok under speculation. */ -dsb (nsh); -isb (); +spec_bar ();/* On user-mode return, check fs is correct */ set_thread_flag (TIF_FSCHECK );
arch/arm64/include/uapi/asm/hwcap.h +1 -0
@@ -49,5 +49,6 @@#define HWCAP_ILRCPC (1 << 26)#define HWCAP_FLAGM (1 << 27)#define HWCAP_SSBS (1 << 28) +#define HWCAP_SB (1 << 29)#endif /* _UAPI__ASM_HWCAP_H */
arch/arm64/kernel/cpu_errata.c +43 -0
61 lines not on this page · raw message
arch/arm64/kernel/cpufeature.c +86 -17
187 lines not on this page · raw message
arch/arm64/kernel/cpuinfo.c +1 -0
@@ -82,6 +82,7 @@ static const char *const hwcap_str[] = {"ilrcpc" ,"flagm" ,"ssbs" , +"sb" , NULL };
arch/m68k/amiga/config.c +9 -0
@@ -181,6 +181,15 @@ int __init amiga_parse_bootinfo(const struct bi_record *record) dev->slotsize =be16_to_cpu (cd->cd_SlotSize); dev->boardaddr =be32_to_cpu (cd->cd_BoardAddr); dev->boardsize =be32_to_cpu (cd->cd_BoardSize); + +/* CS-LAB Warp 1260 workaround */ +if (be16_to_cpu (dev->rom.er_Manufacturer) ==ZORRO_MANUF (ZORRO_PROD_CSLAB_WARP_1260 ) && + dev->rom.er_Product ==ZORRO_PROD (ZORRO_PROD_CSLAB_WARP_1260 )) { + +/* turn off all interrupts */ +pr_info ("Warp 1260 card detected: applying interrupt storm workaround\n" ); + *(uint32_t *)(dev->boardaddr +0x1000 ) =0xfff ; + } }else pr_warn ("amiga_parse_bootinfo: too many AutoConfig devices\n" );#endif /* CONFIG_ZORRO */
arch/m68k/atari/ataints.c +1 -5
@@ -302,11 +302,7 @@ void __init atari_init_IRQ(void)if (ATARIHW_PRESENT (SCU )) {/* init the SCU if present */ - tt_scu.sys_mask =0x10 ;/* enable VBL (for the cursor) and -* disable HSYNC interrupts (who -* needs them?) MFP and SCC are -* enabled in VME mask -*/ + tt_scu.sys_mask =0x0 ;/* disable all interrupts */ tt_scu.vme_mask =0x60 ;/* enable MFP and SCC ints */ }else {/* If no SCU and no Hades, the HSYNC interrupt needs to be
arch/m68k/include/asm/cmpxchg.h +1 -1
@@ -33,7 +33,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz x = tmp;break ;default : - tmp =__invalid_xchg_size (x, ptr, size); + x =__invalid_xchg_size (x, ptr, size);break ; }
arch/mips/include/asm/mips-cm.h +4 -0
@@ -232,6 +232,10 @@ GCR_ACCESSOR_RO(32, 0x0d0, gic_status) GCR_ACCESSOR_RO(32, 0x0f0, cpc_status)#define CM_GCR_CPC_STATUS_EX BIT(0) +/* GCR_ACCESS - Controls core/IOCU access to GCRs */ +GCR_ACCESSOR_RW(32, 0x120, access_cm3) +#define CM_GCR_ACCESS_ACCESSEN GENMASK(7, 0) +/* GCR_L2_CONFIG - Indicates L2 cache configuration when Config5.L2C=1 */ GCR_ACCESSOR_RW(32, 0x130, l2_config)#define CM_GCR_L2_CONFIG_BYPASS BIT(20)
arch/mips/kernel/smp-cps.c +4 -1
@@ -233,7 +233,10 @@ static void boot_core(unsigned int core, unsigned int vpe_id)write_gcr_co_reset_ext_base (CM_GCR_Cx_RESET_EXT_BASE_UEB);/* Ensure the core can access the GCRs */ -set_gcr_access (1 << core); +if (mips_cm_revision () <CM_REV_CM3 ) +set_gcr_access (1 << core); +else +set_gcr_access_cm3 (1 << core);if (mips_cpc_present ()) {/* Reset the core */
arch/mips/pci/pcie-octeon.c +0 -0
arch/powerpc/xmon/ppc-dis.c +11 -22
@@ -133,32 +133,21 @@ int print_insn_powerpc (unsigned long insn, unsigned long memaddr)bool insn_is_short;ppc_cpu_t dialect; - dialect =PPC_OPCODE_PPC |PPC_OPCODE_COMMON - |PPC_OPCODE_64 |PPC_OPCODE_POWER4 |PPC_OPCODE_ALTIVEC ; + dialect =PPC_OPCODE_PPC |PPC_OPCODE_COMMON ; -if (cpu_has_feature (CPU_FTRS_POWER5 )) - dialect |=PPC_OPCODE_POWER5 ; +if (IS_ENABLED (CONFIG_PPC64 )) + dialect |=PPC_OPCODE_64 |PPC_OPCODE_POWER4 |PPC_OPCODE_CELL | +PPC_OPCODE_POWER5 |PPC_OPCODE_POWER6 |PPC_OPCODE_POWER7 |PPC_OPCODE_POWER8 | +PPC_OPCODE_POWER9 ; -if (cpu_has_feature (CPU_FTRS_CELL )) - dialect |= (PPC_OPCODE_CELL |PPC_OPCODE_ALTIVEC ); +if (cpu_has_feature (CPU_FTR_TM )) + dialect |=PPC_OPCODE_HTM ; -if (cpu_has_feature (CPU_FTRS_POWER6 )) - dialect |= (PPC_OPCODE_POWER5 |PPC_OPCODE_POWER6 |PPC_OPCODE_ALTIVEC ); +if (cpu_has_feature (CPU_FTR_ALTIVEC )) + dialect |=PPC_OPCODE_ALTIVEC |PPC_OPCODE_ALTIVEC2 ; -if (cpu_has_feature (CPU_FTRS_POWER7 )) - dialect |= (PPC_OPCODE_POWER5 |PPC_OPCODE_POWER6 |PPC_OPCODE_POWER7 - |PPC_OPCODE_ALTIVEC |PPC_OPCODE_VSX ); - -if (cpu_has_feature (CPU_FTRS_POWER8 )) - dialect |= (PPC_OPCODE_POWER5 |PPC_OPCODE_POWER6 |PPC_OPCODE_POWER7 - |PPC_OPCODE_POWER8 |PPC_OPCODE_HTM - |PPC_OPCODE_ALTIVEC |PPC_OPCODE_ALTIVEC2 |PPC_OPCODE_VSX ); - -if (cpu_has_feature (CPU_FTRS_POWER9 )) - dialect |= (PPC_OPCODE_POWER5 |PPC_OPCODE_POWER6 |PPC_OPCODE_POWER7 - |PPC_OPCODE_POWER8 |PPC_OPCODE_POWER9 |PPC_OPCODE_HTM - |PPC_OPCODE_ALTIVEC |PPC_OPCODE_ALTIVEC2 - |PPC_OPCODE_VSX |PPC_OPCODE_VSX3 ); +if (cpu_has_feature (CPU_FTR_VSX )) + dialect |=PPC_OPCODE_VSX |PPC_OPCODE_VSX3 ;/* Get the major opcode of the insn. */ opcode =NULL ;
arch/sparc/include/asm/oplib_64.h +1 -0
@@ -247,6 +247,7 @@ void prom_sun4v_guest_soft_state(void);int prom_ihandle2path (int handle,char *buffer,int bufsize);/* Client interface level routines. */ +void prom_cif_init (void *cif_handler);void p1275_cmd_direct (unsigned long *);#endif /* !(__SPARC64_OPLIB_H) */
arch/sparc/prom/init_64.c +0 -3
@@ -26,9 +26,6 @@ phandle prom_chosen_node;* routines in the prom library. * It gets passed the pointer to the PROM vector. */ - -extern void prom_cif_init (void *); -void __init prom_init (void *cif_handler) {phandle node;
arch/sparc/prom/p1275.c +1 -1
@@ -49,7 +49,7 @@ void p1275_cmd_direct(unsigned long *args)local_irq_restore (flags); } -void prom_cif_init (void *cif_handler,void *cif_stack) +void prom_cif_init (void *cif_handler) { p1275buf.prom_cif_handler = (void (*)(long *))cif_handler; }
arch/x86/events/intel/pt.c +93 -64
381 lines not on this page · raw message
arch/x86/events/intel/pt.h +2 -23
@@ -78,34 +78,13 @@ struct topa_entry { u64 rsvd2 : 1; u64 size : 4; u64 rsvd3 : 2; - u64 base : 36; - u64 rsvd4 : 16; + u64 base : 40; + u64 rsvd4 : 12; }; -#define PT_CPUID_LEAVES 2 -#define PT_CPUID_REGS_NUM 4/* number of regsters (eax, ebx, ecx, edx) */ -/* TSC to Core Crystal Clock Ratio */ #define CPUID_TSC_LEAF 0x15 -enum pt_capabilities { - PT_CAP_max_subleaf =0 , - PT_CAP_cr3_filtering, - PT_CAP_psb_cyc, - PT_CAP_ip_filtering, - PT_CAP_mtc, - PT_CAP_ptwrite, - PT_CAP_power_event_trace, - PT_CAP_topa_output, - PT_CAP_topa_multiple_entries, - PT_CAP_single_range_output, - PT_CAP_payloads_lip, - PT_CAP_num_address_ranges, - PT_CAP_mtc_periods, - PT_CAP_cycle_thresholds, - PT_CAP_psb_periods, -}; -struct pt_pmu {struct pmu pmu;u32 caps[PT_CPUID_REGS_NUM *PT_CPUID_LEAVES ];
arch/x86/include/asm/intel_pt.h +23 -0
@@ -2,10 +2,33 @@#ifndef _ASM_X86_INTEL_PT_H#define _ASM_X86_INTEL_PT_H +#define PT_CPUID_LEAVES 2 +#define PT_CPUID_REGS_NUM 4/* number of regsters (eax, ebx, ecx, edx) */ + +enum pt_capabilities { + PT_CAP_max_subleaf =0 , + PT_CAP_cr3_filtering, + PT_CAP_psb_cyc, + PT_CAP_ip_filtering, + PT_CAP_mtc, + PT_CAP_ptwrite, + PT_CAP_power_event_trace, + PT_CAP_topa_output, + PT_CAP_topa_multiple_entries, + PT_CAP_single_range_output, + PT_CAP_payloads_lip, + PT_CAP_num_address_ranges, + PT_CAP_mtc_periods, + PT_CAP_cycle_thresholds, + PT_CAP_psb_periods, +}; +#if defined(CONFIG_PERF_EVENTS ) && defined(CONFIG_CPU_SUP_INTEL )void cpu_emergency_stop_pt (void ); +extern u32 intel_pt_validate_hw_cap (enum pt_capabilities cap);#else static inline void cpu_emergency_stop_pt (void ) {} +static inline u32 intel_pt_validate_hw_cap (enum pt_capabilities cap) {return 0 ; }#endif #endif /* _ASM_X86_INTEL_PT_H */
arch/x86/kernel/cpu/mtrr/mtrr.c +1 -1
@@ -819,7 +819,7 @@ void mtrr_save_state(void) {int first_cpu; -if (!mtrr_enabled ()) +if (!mtrr_enabled () || !mtrr_state.have_fixed)return ; first_cpu =cpumask_first (cpu_online_mask);
arch/x86/kernel/devicetree.c +1 -1
@@ -90,7 +90,7 @@ static int x86_of_pci_irq_enable(struct pci_dev *dev) ret =pci_read_config_byte (dev,PCI_INTERRUPT_PIN , &pin);if (ret) -return ret; +return pcibios_err_to_errno (ret);if (!pin)return 0 ;
arch/x86/mm/pti.c +3 -3
@@ -383,14 +383,14 @@ pti_clone_pgtable(unsigned long start, unsigned long end,*/ *target_pmd = *pmd; - addr +=PMD_SIZE ; + addr =round_up (addr +1 ,PMD_SIZE ); }else if (level ==PTI_CLONE_PTE ) {/* Walk the page-table down to the pte level */ pte =pte_offset_kernel (pmd, addr);if (pte_none (*pte)) { - addr +=PAGE_SIZE ; + addr =round_up (addr +1 ,PAGE_SIZE );continue ; }
@@ -410,7 +410,7 @@ pti_clone_pgtable(unsigned long start, unsigned long end,/* Clone the PTE */ *target_pte = *pte; - addr +=PAGE_SIZE ; + addr =round_up (addr +1 ,PAGE_SIZE ); }else {BUG ();
arch/x86/pci/intel_mid_pci.c +2 -2
@@ -223,9 +223,9 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)return 0 ; ret =pci_read_config_byte (dev,PCI_INTERRUPT_LINE , &gsi); -if (ret <0 ) { +if (ret) {dev_warn (&dev->dev,"Failed to read interrupt line: %d\n" , ret); -return ret; +return pcibios_err_to_errno (ret); }switch (intel_mid_identify_cpu ()) {
arch/x86/pci/xen.c +2 -2
@@ -36,10 +36,10 @@ static int xen_pcifront_enable_irq(struct pci_dev *dev)u8 gsi; rc =pci_read_config_byte (dev,PCI_INTERRUPT_LINE , &gsi); -if (rc <0 ) { +if (rc) {dev_warn (&dev->dev,"Xen PCI: failed to read interrupt line: %d\n" , rc); -return rc; +return pcibios_err_to_errno (rc); }/* In PV DomU the Xen PCI backend puts the PIRQ in the interrupt line.*/ pirq = gsi;
arch/x86/platform/intel/iosf_mbi.c +2 -2
@@ -68,7 +68,7 @@ static int iosf_mbi_pci_read_mdr(u32 mcrx, u32 mcr, u32 *mdr) fail_read:dev_err (&mbi_pdev->dev,"PCI config access failed with %d\n" , result); -return result; +return pcibios_err_to_errno (result); }static int iosf_mbi_pci_write_mdr (u32 mcrx,u32 mcr,u32 mdr)
@@ -97,7 +97,7 @@ static int iosf_mbi_pci_write_mdr(u32 mcrx, u32 mcr, u32 mdr) fail_write:dev_err (&mbi_pdev->dev,"PCI config access failed with %d\n" , result); -return result; +return pcibios_err_to_errno (result); }int iosf_mbi_read (u8 port,u8 opcode,u32 offset,u32 *mdr)
arch/x86/xen/p2m.c +2 -2
@@ -733,7 +733,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,* immediate unmapping. */ map_ops[i].status = GNTST_general_error; - unmap[0 ].host_addr = map_ops[i].host_addr, + unmap[0 ].host_addr = map_ops[i].host_addr; unmap[0 ].handle = map_ops[i].handle; map_ops[i].handle = ~0 ;if (map_ops[i].flags & GNTMAP_device_map)
@@ -743,7 +743,7 @@ int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,if (kmap_ops) { kmap_ops[i].status = GNTST_general_error; - unmap[1 ].host_addr = kmap_ops[i].host_addr, + unmap[1 ].host_addr = kmap_ops[i].host_addr; unmap[1 ].handle = kmap_ops[i].handle; kmap_ops[i].handle = ~0 ;if (kmap_ops[i].flags & GNTMAP_device_map)
drivers/android/binder.c +1 -3
@@ -998,9 +998,7 @@ static bool binder_has_work(struct binder_thread *thread, bool do_proc_work)static bool binder_available_for_proc_work_ilocked (struct binder_thread *thread) {return !thread->transaction_stack && -binder_worklist_empty_ilocked (&thread->todo) && - (thread->looper & (BINDER_LOOPER_STATE_ENTERED | -BINDER_LOOPER_STATE_REGISTERED )); +binder_worklist_empty_ilocked (&thread->todo); } static void binder_wakeup_poll_threads_ilocked(struct binder_proc *proc,
drivers/base/core.c +8 -5
@@ -24,6 +24,7 @@#include <linux/mutex.h> #include <linux/pm_runtime.h> #include <linux/netdevice.h> +#include <linux/rcupdate.h> #include <linux/sched/signal.h> #include <linux/sysfs.h>
@@ -1137,6 +1138,7 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj, struct kobj_uevent_env *env) {struct device *dev =kobj_to_dev (kobj); +struct device_driver *driver;int retval =0 ;/* add device node properties if present */
@@ -1165,8 +1167,12 @@ static int dev_uevent(struct kset *kset, struct kobject *kobj,if (dev->type && dev->type->name)add_uevent_var (env,"DEVTYPE=%s" , dev->type->name); -if (dev->driver) -add_uevent_var (env,"DRIVER=%s" , dev->driver->name); +/* Synchronize with module_remove_driver() */ +rcu_read_lock (); + driver =READ_ONCE (dev->driver); +if (driver) +add_uevent_var (env,"DRIVER=%s" , driver->name); +rcu_read_unlock ();/* Add common DT information about the device */ of_device_uevent (dev, env);
@@ -1236,11 +1242,8 @@ static ssize_t uevent_show(struct device *dev, struct device_attribute *attr,if (!env)return -ENOMEM ; -/* Synchronize with really_probe() */ -device_lock (dev);/* let the kset specific function add its keys */ retval = kset->uevent_ops->uevent (kset, &dev->kobj, env); -device_unlock (dev);if (retval) goto out;
drivers/base/devres.c +6 -2
@@ -1057,7 +1057,11 @@ EXPORT_SYMBOL_GPL(__devm_alloc_percpu);*/ void devm_free_percpu (struct device *dev,void __percpu *pdata) { -WARN_ON (devres_destroy (dev, devm_percpu_release, devm_percpu_match, - (void *)pdata)); +/* +* Use devres_release() to prevent memory leakage as +* devm_free_pages() does. +*/ +WARN_ON (devres_release (dev, devm_percpu_release, devm_percpu_match, + (__force void *)pdata)); }EXPORT_SYMBOL_GPL (devm_free_percpu);
drivers/base/module.c +4 -0
@@ -7,6 +7,7 @@#include <linux/errno.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/rcupdate.h> #include "base.h" static char *make_driver_name (struct device_driver *drv)
@@ -77,6 +78,9 @@ void module_remove_driver(struct device_driver *drv)if (!drv)return ; +/* Synchronize with dev_uevent() */ +synchronize_rcu (); +sysfs_remove_link (&drv->p->kobj,"module" );if (drv->owner)
drivers/char/hw_random/amd-rng.c +3 -1
@@ -142,8 +142,10 @@ static int __init mod_init(void) found: err =pci_read_config_dword (pdev,0x58 , &pmbase); -if (err) +if (err) { + err =pcibios_err_to_errno (err); goto put_dev; + } pmbase &=0x0000FF00 ;if (pmbase ==0 ) {
drivers/char/tpm/eventlog/common.c +2 -0
@@ -52,6 +52,8 @@ static int tpm_bios_measurements_open(struct inode *inode,if (!err) { seq = file->private_data; seq->private = chip; + }else { +put_device (&chip->dev); }return err;
drivers/clk/davinci/da8xx-cfgchip.c +2 -2
@@ -507,7 +507,7 @@ da8xx_cfgchip_register_usb0_clk48(struct device *dev,const char *const parent_names[] = {"usb_refclkin" ,"pll0_auxclk" };struct clk *fck_clk;struct da8xx_usb0_clk48 *usb0; -struct clk_init_data init; +struct clk_init_data init = {};int ret; fck_clk =devm_clk_get (dev,"fck" );
@@ -581,7 +581,7 @@ da8xx_cfgchip_register_usb1_clk48(struct device *dev, {const char *const parent_names[] = {"usb0_clk48" ,"usb_refclkin" };struct da8xx_usb1_clk48 *usb1; -struct clk_init_data init; +struct clk_init_data init = {};int ret; usb1 =devm_kzalloc (dev,sizeof (*usb1),GFP_KERNEL );
drivers/clocksource/sh_cmt.c +12 -1
@@ -518,6 +518,7 @@ static void sh_cmt_set_next(struct sh_cmt_channel *ch, unsigned long delta)static irqreturn_t sh_cmt_interrupt (int irq,void *dev_id) {struct sh_cmt_channel *ch = dev_id; +unsigned long flags;/* clear flags */ sh_cmt_write_cmcsr(ch, sh_cmt_read_cmcsr(ch) &
@@ -548,6 +549,8 @@ static irqreturn_t sh_cmt_interrupt(int irq, void *dev_id) ch->flags &= ~FLAG_SKIPEVENT ; +raw_spin_lock_irqsave (&ch->lock, flags); +if (ch->flags &FLAG_REPROGRAM ) { ch->flags &= ~FLAG_REPROGRAM ;sh_cmt_clock_event_program_verify (ch,1 );
@@ -560,6 +563,8 @@ static irqreturn_t sh_cmt_interrupt(int irq, void *dev_id) ch->flags &= ~FLAG_IRQCONTEXT ; +raw_spin_unlock_irqrestore (&ch->lock, flags); +return IRQ_HANDLED ; }
@@ -758,12 +763,18 @@ static int sh_cmt_clock_event_next(unsigned long delta, struct clock_event_device *ced) {struct sh_cmt_channel *ch =ced_to_sh_cmt (ced); +unsigned long flags;BUG_ON (!clockevent_state_oneshot (ced)); + +raw_spin_lock_irqsave (&ch->lock, flags); +if (likely (ch->flags &FLAG_IRQCONTEXT )) ch->next_match_value = delta -1 ;else -sh_cmt_set_next (ch, delta -1 ); +__sh_cmt_set_next (ch, delta -1 ); + +raw_spin_unlock_irqrestore (&ch->lock, flags);return 0 ; }
drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c +1 -4
@@ -1109,7 +1109,6 @@ ssize_t analogix_dp_transfer(struct analogix_dp_device *dp,u32 status_reg;u8 *buffer = msg->buffer;unsigned int i; -int num_transferred =0 ;int ret;/* Buffer size of AUX CH is 16 bytes */
@@ -1161,7 +1160,6 @@ ssize_t analogix_dp_transfer(struct analogix_dp_device *dp, reg = buffer[i];writel (reg, dp->reg_base +ANALOGIX_DP_BUF_DATA_0 +4 * i); - num_transferred++; } }
@@ -1209,7 +1207,6 @@ ssize_t analogix_dp_transfer(struct analogix_dp_device *dp, reg =readl (dp->reg_base +ANALOGIX_DP_BUF_DATA_0 +4 * i); buffer[i] = (unsigned char )reg; - num_transferred++; } }
@@ -1226,7 +1223,7 @@ ssize_t analogix_dp_transfer(struct analogix_dp_device *dp, (msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_NATIVE_READ) msg->reply = DP_AUX_NATIVE_REPLY_ACK; -return num_transferred >0 ? num_transferred : -EBUSY ; +return msg->size; aux_error:/* if aux err happen, reset aux */
drivers/gpu/drm/etnaviv/etnaviv_gem.c +4 -2
@@ -370,9 +370,11 @@ static void *etnaviv_gem_vmap_impl(struct etnaviv_gem_object *obj)static inline enum dma_data_direction etnaviv_op_to_dma_dir (u32 op) { -if (op &ETNA_PREP_READ ) + op &=ETNA_PREP_READ |ETNA_PREP_WRITE ; + +if (op ==ETNA_PREP_READ )return DMA_FROM_DEVICE ; -else if (op &ETNA_PREP_WRITE ) +else if (op ==ETNA_PREP_WRITE )return DMA_TO_DEVICE ;else return DMA_BIDIRECTIONAL ;
drivers/gpu/drm/gma500/cdv_intel_lvds.c +3 -0
@@ -404,6 +404,9 @@ static int cdv_intel_lvds_get_modes(struct drm_connector *connector)if (mode_dev->panel_fixed_mode !=NULL ) {struct drm_display_mode *mode =drm_mode_duplicate (dev, mode_dev->panel_fixed_mode); +if (!mode) +return 0 ; +drm_mode_probed_add (connector, mode);return 1 ; }
drivers/gpu/drm/gma500/psb_intel_lvds.c +3 -0
@@ -519,6 +519,9 @@ static int psb_intel_lvds_get_modes(struct drm_connector *connector)if (mode_dev->panel_fixed_mode !=NULL ) {struct drm_display_mode *mode =drm_mode_duplicate (dev, mode_dev->panel_fixed_mode); +if (!mode) +return 0 ; +drm_mode_probed_add (connector, mode);return 1 ; }
drivers/gpu/drm/i915/i915_gem.c +42 -5
68 lines not on this page · raw message
drivers/gpu/drm/mgag200/mgag200_i2c.c +1 -1
@@ -133,7 +133,7 @@ struct mga_i2c_chan *mgag200_i2c_create(struct drm_device *dev) i2c->adapter.algo_data = &i2c->bit; i2c->bit.udelay =10 ; - i2c->bit.timeout =2 ; + i2c->bit.timeout =usecs_to_jiffies (2200 ); i2c->bit.data = i2c; i2c->bit.setsda = mga_gpio_setsda; i2c->bit.setscl = mga_gpio_setscl;
drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c +1 -1
@@ -100,7 +100,7 @@ static int vmw_overlay_send_put(struct vmw_private *dev_priv, {struct vmw_escape_video_flush *flush;size_t fifo_size; -bool have_so = (dev_priv->active_display_unit == vmw_du_screen_object); +bool have_so = (dev_priv->active_display_unit != vmw_du_legacy);int i, num_items;SVGAGuestPtr ptr;
drivers/hwmon/adt7475.c +1 -1
@@ -1785,7 +1785,7 @@ static void adt7475_read_pwm(struct i2c_client *client, int index) data->pwm[CONTROL ][index] &= ~0xE0 ; data->pwm[CONTROL ][index] |= (7 <<5 ); -i2c_smbus_write_byte_data (client,PWM_CONFIG_REG (index), +i2c_smbus_write_byte_data (client,PWM_REG (index), data->pwm[INPUT ][index]); i2c_smbus_write_byte_data(client, PWM_CONFIG_REG(index),
drivers/hwmon/max6697.c +65 -80
181 lines not on this page · raw message
drivers/i2c/i2c-smbus.c +56 -13
102 lines not on this page · raw message
drivers/infiniband/core/iwcm.c +7 -4
@@ -369,8 +369,10 @@ EXPORT_SYMBOL(iw_cm_disconnect);* * Clean up all resources associated with the connection and release * the initial reference taken by iw_create_cm_id. +* +* Returns true if and only if the last cm_id_priv reference has been dropped. */ -static void destroy_cm_id (struct iw_cm_id *cm_id) +static bool destroy_cm_id (struct iw_cm_id *cm_id) {struct iwcm_id_private *cm_id_priv;unsigned long flags;
@@ -438,7 +440,7 @@ static void destroy_cm_id(struct iw_cm_id *cm_id)iwpm_remove_mapping (&cm_id->local_addr,RDMA_NL_IWCM ); } - (void )iwcm_deref_id (cm_id_priv); +return iwcm_deref_id (cm_id_priv); }/*
@@ -449,7 +451,8 @@ static void destroy_cm_id(struct iw_cm_id *cm_id)*/ void iw_destroy_cm_id (struct iw_cm_id *cm_id) { -destroy_cm_id (cm_id); +if (!destroy_cm_id (cm_id)) +flush_workqueue (iwcm_wq); }EXPORT_SYMBOL (iw_destroy_cm_id);
@@ -1022,7 +1025,7 @@ static void cm_work_handler(struct work_struct *_work)if (!test_bit (IWCM_F_DROP_EVENTS , &cm_id_priv->flags)) { ret =process_event (cm_id_priv, &levent);if (ret) -destroy_cm_id (&cm_id_priv->id); +WARN_ON_ONCE (destroy_cm_id (&cm_id_priv->id)); }else pr_debug ("dropping event %d\n" , levent.event);if (iwcm_deref_id (cm_id_priv))
drivers/infiniband/hw/bnxt_re/ib_verbs.c +4 -4
@@ -2112,7 +2112,7 @@ static int bnxt_re_build_send_wqe(struct bnxt_re_qp *qp,break ;case IB_WR_SEND_WITH_IMM : wqe->type =BNXT_QPLIB_SWQE_TYPE_SEND_WITH_IMM ; - wqe->send.imm_data = wr->ex.imm_data; + wqe->send.imm_data =be32_to_cpu (wr->ex.imm_data);break ;case IB_WR_SEND_WITH_INV : wqe->type =BNXT_QPLIB_SWQE_TYPE_SEND_WITH_INV ;
@@ -2142,7 +2142,7 @@ static int bnxt_re_build_rdma_wqe(const struct ib_send_wr *wr,break ;case IB_WR_RDMA_WRITE_WITH_IMM : wqe->type =BNXT_QPLIB_SWQE_TYPE_RDMA_WRITE_WITH_IMM ; - wqe->rdma.imm_data = wr->ex.imm_data; + wqe->rdma.imm_data =be32_to_cpu (wr->ex.imm_data);break ;case IB_WR_RDMA_READ : wqe->type =BNXT_QPLIB_SWQE_TYPE_RDMA_READ ;
@@ -3110,7 +3110,7 @@ static void bnxt_re_process_res_shadow_qp_wc(struct bnxt_re_qp *qp, wc->byte_len = orig_cqe->length; wc->qp = &qp1_qp->ib_qp; - wc->ex.imm_data = orig_cqe->immdata; + wc->ex.imm_data =cpu_to_be32 (le32_to_cpu (orig_cqe->immdata)); wc->src_qp = orig_cqe->src_qp;memcpy (wc->smac, orig_cqe->smac,ETH_ALEN );if (bnxt_re_is_vlan_pkt (orig_cqe, &vlan_id, &sl)) {
@@ -3231,7 +3231,7 @@ int bnxt_re_poll_cq(struct ib_cq *ib_cq, int num_entries, struct ib_wc *wc)continue ; } wc->qp = &qp->ib_qp; - wc->ex.imm_data = cqe->immdata; + wc->ex.imm_data =cpu_to_be32 (le32_to_cpu (cqe->immdata)); wc->src_qp = cqe->src_qp;memcpy (wc->smac, cqe->smac,ETH_ALEN ); wc->port_num =1 ;
drivers/infiniband/hw/bnxt_re/qplib_fp.h +3 -3
@@ -145,7 +145,7 @@ struct bnxt_qplib_swqe {/* Send, with imm, inval key */ struct {union { -__be32 imm_data; +u32 imm_data;u32 inv_key; };u32 q_key;
@@ -163,7 +163,7 @@ struct bnxt_qplib_swqe {/* RDMA write, with imm, read */ struct {union { -__be32 imm_data; +u32 imm_data;u32 inv_key; };u64 remote_va;
@@ -349,7 +349,7 @@ struct bnxt_qplib_cqe {u32 length;u64 wr_id;union { -__be32 immdata; +__le32 immdata;u32 invrkey; };u64 qp_handle;
drivers/infiniband/hw/mlx4/alias_GUID.c +1 -1
@@ -832,7 +832,7 @@ void mlx4_ib_destroy_alias_guid_service(struct mlx4_ib_dev *dev)int mlx4_ib_init_alias_guid_service (struct mlx4_ib_dev *dev) { -char alias_wq_name[15 ]; +char alias_wq_name[22 ];int ret =0 ;int i, j;union ib_gid gid;
drivers/infiniband/hw/mlx4/mad.c +1 -1
@@ -2158,7 +2158,7 @@ static int mlx4_ib_alloc_demux_ctx(struct mlx4_ib_dev *dev,struct mlx4_ib_demux_ctx *ctx, int port) { - char name[12]; + char name[21];int ret =0 ;int i;
drivers/infiniband/sw/rxe/rxe_req.c +4 -3
@@ -390,7 +390,7 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp,int solicited;u16 pkey;u32 qp_num; -int ack_req; +int ack_req =0 ;/* length from start of bth to end of icrc */ paylen = rxe_opcode[opcode].length + payload + pad +RXE_ICRC_SIZE ;
@@ -426,8 +426,9 @@ static struct sk_buff *init_req_packet(struct rxe_qp *qp, qp_num = (pkt->mask &RXE_DETH_MASK ) ? ibwr->wr.ud.remote_qpn : qp->attr.dest_qp_num; - ack_req = ((pkt->mask &RXE_END_MASK ) || - (qp->req.noack_pkts++ >RXE_MAX_PKT_PER_ACK )); +if (qp_type (qp) !=IB_QPT_UD &&qp_type (qp) !=IB_QPT_UC ) + ack_req = ((pkt->mask &RXE_END_MASK ) || + (qp->req.noack_pkts++ >RXE_MAX_PKT_PER_ACK ));if (ack_req) qp->req.noack_pkts =0 ;
drivers/input/mouse/elan_i2c_core.c +2 -0
@@ -1270,6 +1270,8 @@ static int __maybe_unused elan_suspend(struct device *dev) } err: +if (ret) +enable_irq (client->irq);mutex_unlock (&data->sysfs_mutex);return ret; }
drivers/irqchip/irq-mbigen.c +16 -4
@@ -75,6 +75,20 @@ struct mbigen_device {void __iomem *base; }; +static inline unsigned int get_mbigen_node_offset (unsigned int nid) +{ +unsigned int offset = nid *MBIGEN_NODE_OFFSET ; + +/* +* To avoid touched clear register in unexpected way, we need to directly +* skip clear register when access to more than 10 mbigen nodes. +*/ +if (nid >= (REG_MBIGEN_CLEAR_OFFSET /MBIGEN_NODE_OFFSET )) + offset +=MBIGEN_NODE_OFFSET ; + +return offset; +} +static inline unsigned int get_mbigen_vec_reg (irq_hw_number_t hwirq) {unsigned int nid, pin;
@@ -83,8 +97,7 @@ static inline unsigned int get_mbigen_vec_reg(irq_hw_number_t hwirq) nid = hwirq /IRQS_PER_MBIGEN_NODE +1 ; pin = hwirq %IRQS_PER_MBIGEN_NODE ; -return pin *4 + nid *MBIGEN_NODE_OFFSET - +REG_MBIGEN_VEC_OFFSET ; +return pin *4 +get_mbigen_node_offset (nid) +REG_MBIGEN_VEC_OFFSET ; } static inline void get_mbigen_type_reg(irq_hw_number_t hwirq,
@@ -99,8 +112,7 @@ static inline void get_mbigen_type_reg(irq_hw_number_t hwirq, *mask =1 << (irq_ofst %32 ); ofst = irq_ofst /32 *4 ; - *addr = ofst + nid *MBIGEN_NODE_OFFSET - +REG_MBIGEN_TYPE_OFFSET ; + *addr = ofst +get_mbigen_node_offset (nid) +REG_MBIGEN_TYPE_OFFSET ; } static inline void get_mbigen_clear_reg(irq_hw_number_t hwirq,
drivers/isdn/hardware/mISDN/hfcmulti.c +4 -3
@@ -1945,7 +1945,7 @@ hfcmulti_dtmf(struct hfc_multi *hc)static void hfcmulti_tx (struct hfc_multi *hc,int ch) { -int i, ii, temp, len =0 ; +int i, ii, temp, tmp_len, len =0 ;int Zspace, z1, z2;/* must be int for calculation */ int Fspace, f1, f2;u_char *d;
@@ -2166,14 +2166,15 @@ hfcmulti_tx(struct hfc_multi *hc, int ch)HFC_wait_nodebug (hc); } + tmp_len = (*sp)->len;dev_kfree_skb (*sp);/* check for next frame */ if (bch &&get_next_bframe (bch)) { - len = (*sp)->len; + len = tmp_len; goto next_frame; }if (dch &&get_next_dframe (dch)) { - len = (*sp)->len; + len = tmp_len; goto next_frame; }
drivers/leds/led-triggers.c +1 -1
@@ -125,9 +125,9 @@ int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig) flags);cancel_work_sync (&led_cdev->set_brightness_work);led_stop_software_blink (led_cdev); +device_remove_groups (led_cdev->dev, led_cdev->trigger->groups);if (led_cdev->trigger->deactivate) led_cdev->trigger->deactivate (led_cdev); -device_remove_groups (led_cdev->dev, led_cdev->trigger->groups); led_cdev->trigger =NULL ; led_cdev->trigger_data =NULL ; led_cdev->activated = false;
drivers/leds/leds-ss4200.c +5 -2
@@ -368,8 +368,10 @@ static int ich7_lpc_probe(struct pci_dev *dev, nas_gpio_pci_dev = dev; status =pci_read_config_dword (dev,PMBASE , &g_pm_io_base); -if (status) +if (status) { + status =pcibios_err_to_errno (status); goto out; + } g_pm_io_base &=0x00000ff80 ; status =pci_read_config_dword (dev,GPIO_CTRL , &gc);
@@ -381,8 +383,9 @@ static int ich7_lpc_probe(struct pci_dev *dev, } status =pci_read_config_dword (dev,GPIO_BASE , &nas_gpio_io_base); -if (0 > status) { +if (status) {dev_info (&dev->dev,"Unable to read GPIOBASE.\n" ); + status =pcibios_err_to_errno (status); goto out; }dev_dbg (&dev->dev,": GPIOBASE = 0x%08x\n" , nas_gpio_io_base);
drivers/macintosh/therm_windtunnel.c +1 -1
@@ -549,7 +549,7 @@ g4fan_exit( void )platform_driver_unregister ( &therm_of_driver );if ( x.of_dev ) -of_device_unregister ( x.of_dev ); +of_platform_device_destroy (&x.of_dev->dev,NULL ); }module_init (g4fan_init);
drivers/md/raid5.c +13 -7
@@ -5818,7 +5818,9 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, int *sk safepos = conf->reshape_safe;sector_div (safepos, data_disks);if (mddev->reshape_backwards) { -BUG_ON (writepos < reshape_sectors); +if (WARN_ON (writepos < reshape_sectors)) +return MaxSector; + writepos -= reshape_sectors; readpos += reshape_sectors; safepos += reshape_sectors;
@@ -5836,14 +5838,18 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, int *sk* to set 'stripe_addr' which is where we will write to. */ if (mddev->reshape_backwards) { -BUG_ON (conf->reshape_progress ==0 ); +if (WARN_ON (conf->reshape_progress ==0 )) +return MaxSector; + stripe_addr = writepos; -BUG_ON ((mddev->dev_sectors & - ~((sector_t )reshape_sectors -1 )) - - reshape_sectors - stripe_addr - != sector_nr); +if (WARN_ON ((mddev->dev_sectors & + ~((sector_t )reshape_sectors -1 )) - + reshape_sectors - stripe_addr != sector_nr)) +return MaxSector; }else { -BUG_ON (writepos != sector_nr + reshape_sectors); +if (WARN_ON (writepos != sector_nr + reshape_sectors)) +return MaxSector; + stripe_addr = sector_nr; }
drivers/media/pci/saa7134/saa7134-dvb.c +6 -2
@@ -475,7 +475,9 @@ static int philips_europa_tuner_sleep(struct dvb_frontend *fe)/* switch the board to analog mode */ if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl (fe,1 ); -i2c_transfer (&dev->i2c_adap, &analog_msg,1 ); +if (i2c_transfer (&dev->i2c_adap, &analog_msg,1 ) !=1 ) +return -EIO ; +return 0 ; }
@@ -1027,7 +1029,9 @@ static int md8800_set_voltage2(struct dvb_frontend *fe,else wbuf[1 ] = rbuf &0xef ; msg[0 ].len =2 ; -i2c_transfer (&dev->i2c_adap, msg,1 ); +if (i2c_transfer (&dev->i2c_adap, msg,1 ) !=1 ) +return -EIO ; +return 0 ; }
drivers/media/platform/qcom/venus/vdec.c +1 -0
@@ -1096,6 +1096,7 @@ static int vdec_close(struct file *file) {struct venus_inst *inst =to_inst (file); +cancel_work_sync (&inst->delayed_process_work);v4l2_m2m_ctx_release (inst->m2m_ctx);v4l2_m2m_release (inst->m2m_dev);vdec_ctrl_deinit (inst);
drivers/media/platform/vsp1/vsp1_histo.c +8 -12
@@ -36,9 +36,8 @@ struct vsp1_histogram_buffer * vsp1_histogram_buffer_get(struct vsp1_histogram *histo) {struct vsp1_histogram_buffer *buf =NULL ; -unsigned long flags; -spin_lock_irqsave (&histo->irqlock, flags); +spin_lock (&histo->irqlock);if (list_empty (&histo->irqqueue)) goto done;
@@ -49,7 +48,7 @@ vsp1_histogram_buffer_get(struct vsp1_histogram *histo) histo->readout = true; done: -spin_unlock_irqrestore (&histo->irqlock, flags); +spin_unlock (&histo->irqlock);return buf; }
@@ -58,7 +57,6 @@ void vsp1_histogram_buffer_complete(struct vsp1_histogram *histo, size_t size) {struct vsp1_pipeline *pipe = histo->entity.pipe; -unsigned long flags;/* * The pipeline pointer is guaranteed to be valid as this function is
@@ -70,10 +68,10 @@ void vsp1_histogram_buffer_complete(struct vsp1_histogram *histo,vb2_set_plane_payload (&buf->buf.vb2_buf,0 , size);vb2_buffer_done (&buf->buf.vb2_buf,VB2_BUF_STATE_DONE ); -spin_lock_irqsave (&histo->irqlock, flags); +spin_lock (&histo->irqlock); histo->readout = false;wake_up (&histo->wait_queue); -spin_unlock_irqrestore (&histo->irqlock, flags); +spin_unlock (&histo->irqlock); }/* -----------------------------------------------------------------------------
@@ -124,11 +122,10 @@ static void histo_buffer_queue(struct vb2_buffer *vb)struct vb2_v4l2_buffer *vbuf =to_vb2_v4l2_buffer (vb);struct vsp1_histogram *histo =vb2_get_drv_priv (vb->vb2_queue);struct vsp1_histogram_buffer *buf =to_vsp1_histogram_buffer (vbuf); -unsigned long flags; -spin_lock_irqsave (&histo->irqlock, flags); +spin_lock_irq (&histo->irqlock);list_add_tail (&buf->queue, &histo->irqqueue); -spin_unlock_irqrestore (&histo->irqlock, flags); +spin_unlock_irq (&histo->irqlock); }static int histo_start_streaming (struct vb2_queue *vq,unsigned int count)
@@ -140,9 +137,8 @@ static void histo_stop_streaming(struct vb2_queue *vq) {struct vsp1_histogram *histo =vb2_get_drv_priv (vq);struct vsp1_histogram_buffer *buffer; -unsigned long flags; -spin_lock_irqsave (&histo->irqlock, flags); +spin_lock_irq (&histo->irqlock);/* Remove all buffers from the IRQ queue. */ list_for_each_entry (buffer, &histo->irqqueue, queue)
@@ -152,7 +148,7 @@ static void histo_stop_streaming(struct vb2_queue *vq)/* Wait for the buffer being read out (if any) to complete. */ wait_event_lock_irq (histo->wait_queue, !histo->readout, histo->irqlock); -spin_unlock_irqrestore (&histo->irqlock, flags); +spin_unlock_irq (&histo->irqlock); }static const struct vb2_ops histo_video_queue_qops = {
drivers/media/platform/vsp1/vsp1_pipe.h +1 -1
@@ -73,7 +73,7 @@ struct vsp1_partition_window {* @wpf: The WPF partition window configuration */ struct vsp1_partition { -struct vsp1_partition_window rpf; +struct vsp1_partition_window rpf[VSP1_MAX_RPF ];struct vsp1_partition_window uds_sink;struct vsp1_partition_window uds_source;struct vsp1_partition_window sru;
drivers/media/platform/vsp1/vsp1_rpf.c +5 -3
@@ -270,8 +270,8 @@ static void rpf_configure_partition(struct vsp1_entity *entity,* 'width' need to be adjusted. */ if (pipe->partitions >1 ) { - crop.width = pipe->partition->rpf.width; - crop.left += pipe->partition->rpf.left; + crop.width = pipe->partition->rpf[rpf->entity.index].width; + crop.left += pipe->partition->rpf[rpf->entity.index].left; }if (pipe->interlaced) {
@@ -326,7 +326,9 @@ static void rpf_partition(struct vsp1_entity *entity,unsigned int partition_idx, struct vsp1_partition_window *window) { - partition->rpf = *window; + struct vsp1_rwpf *rpf = to_rwpf(&entity->subdev); + + partition->rpf[rpf->entity.index] = *window; } static const struct vsp1_entity_operations rpf_entity_ops = {
drivers/media/rc/imon.c +1 -4
@@ -1126,10 +1126,7 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 *rc_proto)memcpy (ictx->usb_tx_buf, &ir_proto_packet,sizeof (ir_proto_packet)); -if (!mutex_is_locked (&ictx->lock)) { - unlock = true; -mutex_lock (&ictx->lock); - } + unlock =mutex_trylock (&ictx->lock); retval =send_packet (ictx);if (retval)
drivers/media/usb/uvc/uvc_ctrl.c +60 -30
122 lines not on this page · raw message
drivers/media/usb/uvc/uvc_video.c +33 -4
@@ -212,13 +212,13 @@ static void uvc_fixup_video_ctrl(struct uvc_streaming *stream,/* Compute a bandwidth estimation by multiplying the frame * size by the number of video frames per second, divide the * result by the number of USB frames (or micro-frames for -* high-speed devices) per second and add the UVC header size -* (assumed to be 12 bytes long). +* high- and super-speed devices) per second and add the UVC +* header size (assumed to be 12 bytes long). */ bandwidth = frame->wWidth * frame->wHeight /8 * format->bpp; bandwidth *=10000000 / interval +1 ; bandwidth /=1000 ; -if (stream->dev->udev->speed ==USB_SPEED_HIGH ) +if (stream->dev->udev->speed >=USB_SPEED_HIGH ) bandwidth /=8 ; bandwidth +=12 ;
@@ -473,6 +473,7 @@ uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *buf,ktime_t time;u16 host_sof;u16 dev_sof; +u32 dev_stc;switch (data[1 ] & (UVC_STREAM_PTS |UVC_STREAM_SCR )) {case UVC_STREAM_PTS |UVC_STREAM_SCR :
@@ -517,6 +518,34 @@ uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *buf,if (dev_sof == stream->clock.last_sof)return ; + dev_stc =get_unaligned_le32 (&data[header_size -6 ]); + +/* +* STC (Source Time Clock) is the clock used by the camera. The UVC 1.5 +* standard states that it "must be captured when the first video data +* of a video frame is put on the USB bus". This is generally understood +* as requiring devices to clear the payload header's SCR bit before +* the first packet containing video data. +* +* Most vendors follow that interpretation, but some (namely SunplusIT +* on some devices) always set the `UVC_STREAM_SCR` bit, fill the SCR +* field with 0's,and expect that the driver only processes the SCR if +* there is data in the packet. +* +* Ignore all the hardware timestamp information if we haven't received +* any data for this frame yet, the packet contains no data, and both +* STC and SOF are zero. This heuristics should be safe on compliant +* devices. This should be safe with compliant devices, as in the very +* unlikely case where a UVC 1.1 device would send timing information +* only before the first packet containing data, and both STC and SOF +* happen to be zero for a particular frame, we would only miss one +* clock sample from many and the clock recovery algorithm wouldn't +* suffer from this condition. +*/ +if (buf && buf->bytesused ==0 && len == header_size && + dev_stc ==0 && dev_sof ==0 ) +return ; + stream->clock.last_sof = dev_sof; host_sof =usb_get_current_frame_number (stream->dev->udev);
@@ -554,7 +583,7 @@ uvc_video_clock_decode(struct uvc_streaming *stream, struct uvc_buffer *buf,spin_lock_irqsave (&stream->clock.lock, flags); sample = &stream->clock.samples[stream->clock.head]; - sample->dev_stc =get_unaligned_le32 (&data[header_size -6 ]); + sample->dev_stc = dev_stc; sample->dev_sof = dev_sof; sample->host_sof = host_sof; sample->host_time = time;
drivers/media/usb/uvc/uvcvideo.h +5 -0
@@ -345,6 +345,11 @@ struct uvc_entity {u8 bNrInPins;u8 *baSourceID; +int (*get_info)(struct uvc_device *dev,struct uvc_entity *entity, +u8 cs,u8 *caps); +int (*get_cur)(struct uvc_device *dev,struct uvc_entity *entity, +u8 cs,void *data,u16 size); +unsigned int ncontrols;struct uvc_control *controls; };
drivers/mfd/omap-usb-tll.c +1 -2
@@ -246,8 +246,7 @@ static int usbtll_omap_probe(struct platform_device *pdev)break ; } - tll =devm_kzalloc (dev,sizeof (*tll) +sizeof (tll->ch_clk[nch]), -GFP_KERNEL ); + tll =devm_kzalloc (dev,struct_size (tll, ch_clk, nch),GFP_KERNEL );if (!tll) {pm_runtime_put_sync (dev);pm_runtime_disable (dev);
drivers/mtd/tests/Makefile +17 -17
@@ -1,19 +1,19 @@ # SPDX-License-Identifier: GPL-2.0 -obj-$(CONFIG_MTD_TESTS) += mtd_oobtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_pagetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_readtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_speedtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_stresstest.o -obj-$(CONFIG_MTD_TESTS) += mtd_subpagetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_torturetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_nandecctest.o -obj-$(CONFIG_MTD_TESTS) += mtd_nandbiterrs.o +obj-$(CONFIG_MTD_TESTS) += mtd_oobtest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_pagetest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_readtest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_speedtest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_stresstest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_subpagetest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_torturetest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_nandecctest.o mtd_test.o +obj-$(CONFIG_MTD_TESTS) += mtd_nandbiterrs.o mtd_test.o -mtd_oobtest-objs := oobtest.o mtd_test.o -mtd_pagetest-objs := pagetest.o mtd_test.o -mtd_readtest-objs := readtest.o mtd_test.o -mtd_speedtest-objs := speedtest.o mtd_test.o -mtd_stresstest-objs := stresstest.o mtd_test.o -mtd_subpagetest-objs := subpagetest.o mtd_test.o -mtd_torturetest-objs := torturetest.o mtd_test.o -mtd_nandbiterrs-objs := nandbiterrs.o mtd_test.o +mtd_oobtest-objs := oobtest.o +mtd_pagetest-objs := pagetest.o +mtd_readtest-objs := readtest.o +mtd_speedtest-objs := speedtest.o +mtd_stresstest-objs := stresstest.o +mtd_subpagetest-objs := subpagetest.o +mtd_torturetest-objs := torturetest.o +mtd_nandbiterrs-objs := nandbiterrs.o
drivers/mtd/tests/mtd_test.c +9 -0
@@ -25,6 +25,7 @@ int mtdtest_erase_eraseblock(struct mtd_info *mtd, unsigned int ebnum)return 0 ; } +EXPORT_SYMBOL_GPL (mtdtest_erase_eraseblock);static int is_block_bad (struct mtd_info *mtd,unsigned int ebnum) {
@@ -57,6 +58,7 @@ int mtdtest_scan_for_bad_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,return 0 ; } +EXPORT_SYMBOL_GPL (mtdtest_scan_for_bad_eraseblocks);int mtdtest_erase_good_eraseblocks (struct mtd_info *mtd,unsigned char *bbt,unsigned int eb,int ebcnt)
@@ -75,6 +77,7 @@ int mtdtest_erase_good_eraseblocks(struct mtd_info *mtd, unsigned char *bbt,return 0 ; } +EXPORT_SYMBOL_GPL (mtdtest_erase_good_eraseblocks);int mtdtest_read (struct mtd_info *mtd,loff_t addr,size_t size,void *buf) {
@@ -92,6 +95,7 @@ int mtdtest_read(struct mtd_info *mtd, loff_t addr, size_t size, void *buf)return err; } +EXPORT_SYMBOL_GPL (mtdtest_read);int mtdtest_write (struct mtd_info *mtd,loff_t addr,size_t size,const void *buf)
@@ -107,3 +111,8 @@ int mtdtest_write(struct mtd_info *mtd, loff_t addr, size_t size,return err; } +EXPORT_SYMBOL_GPL (mtdtest_write); + +MODULE_LICENSE ("GPL" ); +MODULE_DESCRIPTION ("MTD function test helpers" ); +MODULE_AUTHOR ("Akinobu Mita" );
drivers/mtd/ubi/eba.c +2 -1
@@ -1573,6 +1573,7 @@ int self_check_eba(struct ubi_device *ubi, struct ubi_attach_info *ai_fastmap, GFP_KERNEL);if (!fm_eba[i]) { ret = -ENOMEM ; +kfree (scan_eba[i]); goto out_free; }
@@ -1608,7 +1609,7 @@ int self_check_eba(struct ubi_device *ubi, struct ubi_attach_info *ai_fastmap, } out_free: -for (i =0 ; i < num_volumes; i++) { +while (--i >=0 ) {if (!ubi->volumes[i])continue ;
drivers/net/bonding/bond_main.c +2 -5
@@ -774,13 +774,10 @@ static struct slave *bond_find_best_slave(struct bonding *bond)return bestslave; } +/* must be called in RCU critical section or with RTNL held */ static bool bond_should_notify_peers (struct bonding *bond) { -struct slave *slave; - -rcu_read_lock (); - slave =rcu_dereference (bond->curr_active_slave); -rcu_read_unlock (); +struct slave *slave =rcu_dereference_rtnl (bond->curr_active_slave); if (!slave || !bond->send_peer_notif || !netif_carrier_ok(bond->dev) ||
drivers/net/ethernet/brocade/bna/bna_types.h +1 -1
@@ -418,7 +418,7 @@ struct bna_ib {/* Tx object */ /* Tx datapath control structure */ -#define BNA_Q_NAME_SIZE 16 +#define BNA_Q_NAME_SIZE (IFNAMSIZ + 6)struct bna_tcb {/* Fast path */ void **sw_qpt;
drivers/net/ethernet/brocade/bna/bnad.c +6 -5
@@ -1543,8 +1543,9 @@ bnad_tx_msix_register(struct bnad *bnad, struct bnad_tx_info *tx_info,for (i =0 ; i < num_txqs; i++) { vector_num = tx_info->tcb[i]->intr_vector; -sprintf (tx_info->tcb[i]->name,"%s TXQ %d" , bnad->netdev->name, - tx_id + tx_info->tcb[i]->id); +snprintf (tx_info->tcb[i]->name,BNA_Q_NAME_SIZE ,"%s TXQ %d" , + bnad->netdev->name, + tx_id + tx_info->tcb[i]->id); err = request_irq(bnad->msix_table[vector_num].vector, (irq_handler_t)bnad_msix_tx, 0, tx_info->tcb[i]->name,
@@ -1594,9 +1595,9 @@ bnad_rx_msix_register(struct bnad *bnad, struct bnad_rx_info *rx_info,for (i =0 ; i < num_rxps; i++) { vector_num = rx_info->rx_ctrl[i].ccb->intr_vector; -sprintf (rx_info->rx_ctrl[i].ccb->name,"%s CQ %d" , - bnad->netdev->name, - rx_id + rx_info->rx_ctrl[i].ccb->id); +snprintf (rx_info->rx_ctrl[i].ccb->name,BNA_Q_NAME_SIZE , +"%s CQ %d" , bnad->netdev->name, + rx_id + rx_info->rx_ctrl[i].ccb->id); err = request_irq(bnad->msix_table[vector_num].vector, (irq_handler_t)bnad_msix_rx, 0, rx_info->rx_ctrl[i].ccb->name,
drivers/net/ethernet/freescale/fec_main.c +36 -16
115 lines not on this page · raw message
drivers/net/ethernet/freescale/fec_ptp.c +3 -0
@@ -635,6 +635,9 @@ void fec_ptp_stop(struct platform_device *pdev)struct net_device *ndev =platform_get_drvdata (pdev);struct fec_enet_private *fep =netdev_priv (ndev); +if (fep->pps_enable) +fec_ptp_enable_pps (fep,0 ); +cancel_delayed_work_sync (&fep->time_keep);if (fep->ptp_clock)ptp_clock_unregister (fep->ptp_clock);
drivers/net/ethernet/intel/ice/ice_common.c +79 -23
132 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h +13 -11
@@ -188,23 +188,25 @@ struct ice_32b_rx_flex_desc_nic {* with a specific metadata (profile 7 reserved for HW) */ enum ice_rxdid { -ICE_RXDID_START =0 , -ICE_RXDID_LEGACY_0 =ICE_RXDID_START , -ICE_RXDID_LEGACY_1 , -ICE_RXDID_FLX_START , -ICE_RXDID_FLEX_NIC =ICE_RXDID_FLX_START , -ICE_RXDID_FLX_LAST =63 , -ICE_RXDID_LAST =ICE_RXDID_FLX_LAST +ICE_RXDID_LEGACY_0 =0 , +ICE_RXDID_LEGACY_1 =1 , +ICE_RXDID_FLEX_NIC =2 , +ICE_RXDID_FLEX_NIC_2 =6 , +ICE_RXDID_HW =7 , +ICE_RXDID_LAST =63 , };/* Receive Flex Descriptor Rx opcode values */ #define ICE_RX_OPC_MDID 0x01/* Receive Descriptor MDID values */ -#define ICE_RX_MDID_FLOW_ID_LOWER 5 -#define ICE_RX_MDID_FLOW_ID_HIGH 6 -#define ICE_RX_MDID_HASH_LOW 56 -#define ICE_RX_MDID_HASH_HIGH 57 +enum ice_flex_rx_mdid { +ICE_RX_MDID_FLOW_ID_LOWER =5 , +ICE_RX_MDID_FLOW_ID_HIGH , +ICE_RX_MDID_SRC_VSI =19 , +ICE_RX_MDID_HASH_LOW =56 , +ICE_RX_MDID_HASH_HIGH , +};/* Rx Flag64 packet flag bits */ enum ice_rx_flg64_bits {
drivers/net/netconsole.c +1 -1
@@ -727,6 +727,7 @@ static int netconsole_netdev_event(struct notifier_block *this,/* rtnl_lock already held * we might sleep in __netpoll_cleanup() */ + nt->enabled = false;spin_unlock_irqrestore (&target_list_lock, flags);__netpoll_cleanup (&nt->np);
@@ -734,7 +735,6 @@ static int netconsole_netdev_event(struct notifier_block *this,spin_lock_irqsave (&target_list_lock, flags);dev_put (nt->np.dev); nt->np.dev =NULL ; - nt->enabled = false; stopped = true;netconsole_target_put (nt); goto restart;
drivers/net/usb/qmi_wwan.c +1 -0
@@ -241,6 +241,7 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)break ;default :/* not ip - do not know what to do */ +kfree_skb (skbn); goto skip; }
drivers/net/usb/sr9700.c +9 -2
@@ -178,6 +178,7 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)struct usbnet *dev =netdev_priv (netdev);__le16 res;int rc =0 ; +int err;if (phy_id) {netdev_dbg (netdev,"Only internal phy supported\n" );
@@ -188,11 +189,17 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)if (loc ==MII_BMSR ) {u8 value; -sr_read_reg (dev,SR_NSR , &value); + err =sr_read_reg (dev,SR_NSR , &value); +if (err <0 ) +return err; +if (value &NSR_LINKST ) rc =1 ; } -sr_share_read_word (dev,1 , loc, &res); + err =sr_share_read_word (dev,1 , loc, &res); +if (err <0 ) +return err; +if (rc ==1 ) res =le16_to_cpu (res) |BMSR_LSTATUS ;else
drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c +9 -9
@@ -2638,7 +2638,6 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi,struct lcnphy_txgains cal_gains, temp_gains;u16 hash; -u8 band_idx;int j;u16 ncorr_override[5 ];u16 syst_coeffs[] = {0x0000 ,0x0000 ,0x0000 ,0x0000 ,0x0000 ,0x0000 ,
@@ -2670,6 +2669,9 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi,u16 *values_to_save;struct brcms_phy_lcnphy *pi_lcn = pi->u.pi_lcnphy; +if (WARN_ON (CHSPEC_IS5G (pi->radio_chanspec))) +return ; + values_to_save =kmalloc_array (20 ,sizeof (u16),GFP_ATOMIC );if (NULL == values_to_save)return ;
@@ -2733,20 +2735,18 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi, hash = (target_gains->gm_gain <<8 ) | (target_gains->pga_gain <<4 ) | (target_gains->pad_gain); - band_idx = (CHSPEC_IS5G (pi->radio_chanspec) ?1 :0 ); - cal_gains = *target_gains;memset (ncorr_override,0 ,sizeof (ncorr_override)); -for (j =0 ; j < iqcal_gainparams_numgains_lcnphy[band_idx]; j++) { -if (hash == tbl_iqcal_gainparams_lcnphy[band_idx][j][0 ]) { +for (j =0 ; j < iqcal_gainparams_numgains_lcnphy[0 ]; j++) { +if (hash == tbl_iqcal_gainparams_lcnphy[0 ][j][0 ]) { cal_gains.gm_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][1 ]; + tbl_iqcal_gainparams_lcnphy[0 ][j][1 ]; cal_gains.pga_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][2 ]; + tbl_iqcal_gainparams_lcnphy[0 ][j][2 ]; cal_gains.pad_gain = - tbl_iqcal_gainparams_lcnphy[band_idx][j][3 ]; + tbl_iqcal_gainparams_lcnphy[0 ][j][3 ];memcpy (ncorr_override, - &tbl_iqcal_gainparams_lcnphy[band_idx][j][3 ], + &tbl_iqcal_gainparams_lcnphy[0 ][j][3 ],sizeof (ncorr_override));break ; }
drivers/net/wireless/marvell/mwifiex/cfg80211.c +2 -0
@@ -934,6 +934,8 @@ mwifiex_init_new_priv_params(struct mwifiex_private *priv,return -EOPNOTSUPP ; } + priv->bss_num =mwifiex_get_unused_bss_num (adapter, priv->bss_type); +spin_lock_irqsave (&adapter->main_proc_lock, flags); adapter->main_locked = false;spin_unlock_irqrestore (&adapter->main_proc_lock, flags);
drivers/nvme/host/pci.c +7 -0
@@ -2481,6 +2481,13 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)return NVME_QUIRK_NO_APST ; } +/* +* NVMe SSD drops off the PCIe bus after system idle +* for 10 hours on a Lenovo N60z board. +*/ +if (dmi_match (DMI_BOARD_NAME ,"LXKT-ZXEG-N6" )) +return NVME_QUIRK_NO_APST ; +return 0 ; }
drivers/parport/daisy.c +2 -4
@@ -109,8 +109,7 @@ int parport_daisy_init(struct parport *port) ((num_ports = num_mux_ports(port)) == 2 || num_ports == 4)) {/* Leave original as port zero. */ port->muxport =0 ; -printk (KERN_INFO -"%s: 1st (default) port of %d-way multiplexor\n" , +pr_info ("%s: 1st (default) port of %d-way multiplexor\n" , port->name, num_ports);for (i =1 ; i < num_ports; i++) {/* Clone the port. */
@@ -123,8 +122,7 @@ int parport_daisy_init(struct parport *port)continue ; } -printk (KERN_INFO -"%s: %d%s port of %d-way multiplexor on %s\n" , +pr_info ("%s: %d%s port of %d-way multiplexor on %s\n" , extra->name, i +1 , th[i +1 ], num_ports, port->name);
drivers/parport/ieee1284.c +2 -2
@@ -329,7 +329,7 @@ int parport_negotiate (struct parport *port, int mode)#ifndef CONFIG_PARPORT_1284 if (mode ==IEEE1284_MODE_COMPAT )return 0 ; -printk (KERN_ERR "parport: IEEE1284 not supported in this kernel\n" ); +pr_err ("parport: IEEE1284 not supported in this kernel\n" );return -1 ;#else int m = mode & ~IEEE1284_ADDR ;
@@ -694,7 +694,7 @@ ssize_t parport_write (struct parport *port, const void *buffer, size_t len)ssize_t parport_read (struct parport *port,void *buffer,size_t len) {#ifndef CONFIG_PARPORT_1284 -printk (KERN_ERR "parport: IEEE1284 not supported in this kernel\n" ); +pr_err ("parport: IEEE1284 not supported in this kernel\n" );return -ENODEV ;#else int mode = port->physport->ieee1284.mode;
drivers/parport/ieee1284_ops.c +1 -2
@@ -599,8 +599,7 @@ size_t parport_ieee1284_ecp_read_data (struct parport *port,DPRINTK (KERN_DEBUG "ECP read timed out at 45\n" );if (command) -printk (KERN_WARNING -"%s: command ignored (%02x)\n" , +pr_warn ("%s: command ignored (%02x)\n" , port->name, byte);break ;
drivers/parport/parport_amiga.c +1 -1
@@ -211,7 +211,7 @@ static int __init amiga_parallel_probe(struct platform_device *pdev)if (err) goto out_irq; -printk (KERN_INFO "%s: Amiga built-in port using irq\n" , p->name); +pr_info ("%s: Amiga built-in port using irq\n" , p->name);/* XXX: set operating mode */ parport_announce_port (p);
drivers/parport/parport_atari.c +1 -1
@@ -199,7 +199,7 @@ static int __init parport_atari_init(void) } this_port = p; -printk (KERN_INFO "%s: Atari built-in port using irq\n" , p->name); +pr_info ("%s: Atari built-in port using irq\n" , p->name);parport_announce_port (p);return 0 ;
drivers/parport/parport_cs.c +2 -4
@@ -142,10 +142,8 @@ static int parport_config(struct pcmcia_device *link) link->irq,PARPORT_DMA_NONE , &link->dev, IRQF_SHARED);if (p ==NULL ) { -printk (KERN_NOTICE "parport_cs: parport_pc_probe_port() at " -"0x%3x, irq %u failed\n" , - (unsigned int ) link->resource[0 ]->start, - link->irq); +pr_notice ("parport_cs: parport_pc_probe_port() at 0x%3x, irq %u failed\n" , + (unsigned int )link->resource[0 ]->start, link->irq); goto failed; }
drivers/parport/parport_gsc.c +9 -6
@@ -287,7 +287,7 @@ struct parport *parport_gsc_probe_port(unsigned long base, p->size = (p->modes &PARPORT_MODE_EPP )?8 :3 ; p->private_data = priv; -printk (KERN_INFO "%s: PC-style at 0x%lx" , p->name, p->base); +pr_info ("%s: PC-style at 0x%lx" , p->name, p->base); p->irq = irq;if (p->irq ==PARPORT_IRQ_AUTO ) { p->irq =PARPORT_IRQ_NONE ;
@@ -304,12 +304,16 @@ struct parport *parport_gsc_probe_port(unsigned long base, p->dma =PARPORT_DMA_NONE ;pr_cont (" [" ); -#define printmode (x) {if(p->modes&PARPORT_MODE_##x){pr_cont("%s%s",f?",":"",#x);f++;}} +#define printmode (x) \ +do { \ + if (p->modes & PARPORT_MODE_##x) \ + pr_cont("%s%s", f++ ? "," : "", #x); \ +} while (0) {int f =0 ;printmode (PCSPP );printmode (TRISTATE ); -printmode (COMPAT) +printmode (COMPAT );printmode (EPP );// printmode(ECP); // printmode(DMA);
@@ -320,8 +324,7 @@ struct parport *parport_gsc_probe_port(unsigned long base,if (p->irq !=PARPORT_IRQ_NONE ) {if (request_irq (p->irq, parport_irq_handler,0 , p->name, p)) { -printk (KERN_WARNING "%s: irq %d in use, " -"resorting to polled operation\n" , +pr_warn ("%s: irq %d in use, resorting to polled operation\n" , p->name, p->irq); p->irq =PARPORT_IRQ_NONE ; p->dma =PARPORT_DMA_NONE ;
@@ -352,7 +355,7 @@ static int __init parport_init_chip(struct parisc_device *dev)unsigned long port;if (!dev->irq) { -printk (KERN_WARNING "IRQ not found for parallel device at 0x%llx\n" , +pr_warn ("IRQ not found for parallel device at 0x%llx\n" , (unsigned long long )dev->hpa.start);
Lines of this file are not shown. View the raw message.
drivers/parport/parport_pc.c +76 -104
180 lines not on this page · raw message
drivers/pinctrl/freescale/pinctrl-mxs.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/pinctrl/ti/pinctrl-ti-iodelay.c +6 -8
Lines of this file are not shown. View the raw message.
drivers/platform/chrome/cros_ec_debugfs.c +1 -0
Lines of this file are not shown. View the raw message.
drivers/power/supply/axp288_charger.c +11 -11
Lines of this file are not shown. View the raw message.
drivers/spi/spi-fsl-lpspi.c +193 -88
281 lines not on this page · raw message
fs/ext4/namei.c +57 -16
73 lines not on this page · raw message
net/netfilter/nf_tables_api.c +23 -105
128 lines not on this page · raw message
net/packet/af_packet.c +84 -2
86 lines not on this page · raw message
scripts/gcc-x86_32-has-stack-protector.sh +1 -1
Lines of this file are not shown. View the raw message.
scripts/gcc-x86_64-has-stack-protector.sh +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/bpf/test_sockmap.c +2 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/forwarding/devlink_lib.sh +2 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/sigaltstack/current_stack_pointer.h +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
PATCH 1/1 ALSA: usb-audio: Sanity checks for pipes
In reply to Greg Kroah-HartmanWe back ported these two commits:
801ebf1043ae ("ALSA: usb-audio: Sanity checks for each pipe and EP types"). fcc2cc1f3561 ("USB: move snd_usb_pipe_sanity_check into the USB core")
However, some chunks were accidentally dropped. Backport those chunks as well.
---
This is from manual review. I checked 5.4.y and this was okay there.
sound/usb/helper.c +3 -0
@@ -88,6 +88,9 @@ int snd_usb_ctl_msg(struct usb_device *dev, unsigned int pipe, __u8 request,void *buf =NULL ;int timeout; +if (usb_pipe_type_check (dev, pipe)) +return -EINVAL ; +if (size >0 ) { buf =kmemdup (data, size,GFP_KERNEL );if (!buf)
sound/usb/quirks.c +11 -3
@@ -743,11 +743,13 @@ static int snd_usb_novation_boot_quirk(struct usb_device *dev)static int snd_usb_accessmusic_boot_quirk (struct usb_device *dev) {int err, actual_length; -/* "midi send" enable */ static const u8 seq[] = {0x4e ,0x73 ,0x52 ,0x01 }; +void *buf; -void *buf =kmemdup (seq,ARRAY_SIZE (seq),GFP_KERNEL ); +if (usb_pipe_type_check (dev,usb_sndintpipe (dev,0x05 ))) +return -EINVAL ; + buf =kmemdup (seq,ARRAY_SIZE (seq),GFP_KERNEL );if (!buf)return -ENOMEM ; err = usb_interrupt_msg(dev, usb_sndintpipe(dev, 0x05), buf,
@@ -772,7 +774,11 @@ static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev)static int snd_usb_nativeinstruments_boot_quirk (struct usb_device *dev) { -int ret =usb_control_msg (dev,usb_sndctrlpipe (dev,0 ), +int ret; + +if (usb_pipe_type_check (dev,usb_sndctrlpipe (dev,0 ))) +return -EINVAL ; + ret =usb_control_msg (dev,usb_sndctrlpipe (dev,0 ),0xaf ,USB_TYPE_VENDOR |USB_RECIP_DEVICE ,1 ,0 ,NULL ,0 ,1000 );
@@ -879,6 +885,8 @@ static int snd_usb_axefx3_boot_quirk(struct usb_device *dev)dev_dbg (&dev->dev,"Waiting for Axe-Fx III to boot up...\n" ); +if (usb_pipe_type_check (dev,usb_sndctrlpipe (dev,0 ))) +return -EINVAL ;/* If the Axe-Fx III has not fully booted, it will timeout when trying * to enable the audio streaming interface. A more generous timeout is * used here to detect when the Axe-Fx III has finished booting as the
Greg Kroah-Hartman
maintainerRe: [PATCH stable 4.19.y] ALSA: usb-audio: Sanity checks for pipes
Quoted 3 lines · Dan Carpenter
We back ported these two commits:
801ebf1043ae("ALSA: usb-audio: Sanity checks for each pipe and EP types").
That commit is not in 4.19.y, it only is in the 5.2.8 and 5.3 releases.
Quoted 1 line
fcc2cc1f3561("USB: movesnd_usb_pipe_sanity_checkinto the USB core")
Same here, not in 4.19.y, it's only in the 5.4.282 and 5.10 releases.
Quoted 2 lines
However, some chunks were accidentally dropped. Backport those chunks as well.
Perhaps those commits were never applied to 4.19.y and you should just backport them instead? :)
thanks,
greg k-h
Re: [PATCH stable 4.19.y] ALSA: usb-audio: Sanity checks for pipes
Quoted 9 lines · Greg Kroah-Hartman
Quoted 3 lines · Dan Carpenter
We back ported these two commits:
801ebf1043ae("ALSA: usb-audio: Sanity checks for each pipe and EP types").That commit is not in 4.19.y, it only is in the 5.2.8 and 5.3 releases.
Quoted 1 line
fcc2cc1f3561("USB: movesnd_usb_pipe_sanity_checkinto the USB core")
Quoted 7 lines
Same here, not in 4.19.y, it's only in the 5.4.282 and 5.10 releases.
Quoted 2 lines
However, some chunks were accidentally dropped. Backport those chunks as well.
Perhaps those commits were never applied to 4.19.y and you should just backport them instead? :)
Oh. Duh. :P
Sure, I can backport them.
regards,
dan carpenter