Linux 5.4.225
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.225 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/process/code-of-conduct-interpretation.rst | 2 Makefile | 2 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 4 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 2 arch/arm64/kernel/efi.c | 52 ++- arch/mips/kernel/jump_label.c | 2 arch/riscv/kernel/process.c | 2 arch/x86/include/asm/msr-index.h | 8 arch/x86/kernel/cpu/amd.c | 6 arch/x86/kernel/cpu/hygon.c | 4 arch/x86/kvm/svm.c | 10 arch/x86/kvm/x86.c | 2 arch/x86/power/cpu.c | 1 block/sed-opal.c | 32 + drivers/ata/libata-transport.c | 1 drivers/block/drbd/drbd_main.c | 4 drivers/dma/at_hdmac.c | 34 -- drivers/dma/at_hdmac_regs.h | 10 drivers/dma/mv_xor_v2.c | 1 drivers/dma/pxa_dma.c | 4 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 4 drivers/gpu/drm/imx/imx-tve.c | 5 drivers/gpu/drm/vc4/vc4_drv.c | 7 drivers/hid/hid-hyperv.c | 2 drivers/i2c/busses/i2c-i801.c | 1 drivers/iio/adc/at91_adc.c | 4 drivers/iio/pressure/ms5611_spi.c | 2 drivers/iio/trigger/iio-trig-sysfs.c | 6 drivers/input/joystick/iforce/iforce-main.c | 8 drivers/input/serio/i8042.c | 4 drivers/isdn/mISDN/core.c | 2 drivers/isdn/mISDN/dsp_pipeline.c | 3 drivers/md/dm-ioctl.c | 4 drivers/misc/vmw_vmci/vmci_queue_pair.c | 2 drivers/mmc/core/core.c | 8 drivers/mmc/host/sdhci-cqhci.h | 24 + drivers/mmc/host/sdhci-of-arasan.c | 3 drivers/mmc/host/sdhci-pci-core.c | 2 drivers/mmc/host/sdhci-pci-o2micro.c | 7 drivers/mmc/host/sdhci-tegra.c | 3 drivers/mtd/spi-nor/intel-spi.c | 2 drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 4 drivers/net/ethernet/broadcom/bgmac.c | 1 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 12 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 2 drivers/net/ethernet/cavium/liquidio/lio_main.c | 34 +- drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 1 drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c | 2 drivers/net/ethernet/freescale/fman/mac.c | 9 drivers/net/ethernet/marvell/mv643xx_eth.c | 1 drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 11 drivers/net/ethernet/neterion/s2io.c | 29 + drivers/net/ethernet/ni/nixge.c | 1 drivers/net/ethernet/ti/cpsw.c | 2 drivers/net/ethernet/tundra/tsi108_eth.c | 5 drivers/net/hamradio/bpqether.c | 2 drivers/net/macvlan.c | 10 drivers/net/thunderbolt.c | 19 - drivers/net/tun.c | 18 - drivers/net/wan/lapbether.c | 2 drivers/parport/parport_pc.c | 2 drivers/phy/st/phy-stm32-usbphyc.c | 2 drivers/pinctrl/devicetree.c | 2 drivers/platform/x86/hp-wmi.c | 12 drivers/platform/x86/intel_pmc_core_pltdrv.c | 9 drivers/s390/scsi/zfcp_fsf.c | 2 drivers/siox/siox-core.c | 2 drivers/slimbus/stream.c | 8 drivers/spi/spi-stm32.c | 1 drivers/staging/speakup/main.c | 2 drivers/target/loopback/tcm_loop.c | 3 drivers/tty/n_gsm.c | 2 drivers/tty/serial/8250/8250_lpss.c | 15 drivers/tty/serial/8250/8250_omap.c | 23 - drivers/tty/serial/8250/8250_port.c | 7 drivers/tty/serial/imx.c | 1 drivers/usb/chipidea/otg_fsm.c | 2 drivers/usb/core/quirks.c | 3 drivers/usb/dwc3/host.c | 10 drivers/usb/serial/option.c | 19 + drivers/xen/pcpu.c | 2 fs/btrfs/tests/btrfs-tests.c | 2 fs/btrfs/tests/qgroup-tests.c | 16 fs/buffer.c | 4 fs/cifs/ioctl.c | 4 fs/cifs/smb2ops.c | 2 fs/gfs2/ops_fstype.c | 17 - fs/namei.c | 2 fs/nfs/nfs4proc.c | 6 fs/nilfs2/segment.c | 15 fs/nilfs2/super.c | 2 fs/nilfs2/the_nilfs.c | 2 fs/ntfs/attrib.c | 28 + fs/ntfs/inode.c | 7 fs/udf/namei.c | 2 fs/xfs/libxfs/xfs_bmap.h | 15 fs/xfs/libxfs/xfs_rtbitmap.c | 2 fs/xfs/libxfs/xfs_shared.h | 1 fs/xfs/xfs_bmap_util.c | 18 - fs/xfs/xfs_file.c | 15 fs/xfs/xfs_reflink.c | 244 ++++++++------- fs/xfs/xfs_super.c | 4 fs/xfs/xfs_trace.h | 52 --- fs/xfs/xfs_trans.c | 19 + fs/xfs/xfs_trans_ail.c | 16 include/asm-generic/vmlinux.lds.h | 2 include/uapi/linux/capability.h | 2 kernel/kprobes.c | 8 kernel/trace/ftrace.c | 5 kernel/trace/ring_buffer.c | 16 mm/filemap.c | 2 net/9p/trans_fd.c | 6 net/bluetooth/l2cap_core.c | 2 net/bpf/test_run.c | 1 net/caif/chnl_net.c | 3 net/can/af_can.c | 2 net/can/j1939/main.c | 3 net/core/skbuff.c | 36 +- net/ipv4/tcp_bpf.c | 8 net/ipv4/tcp_cdg.c | 2 net/ipv6/addrlabel.c | 1 net/kcm/kcmsock.c | 62 --- net/tipc/netlink_compat.c | 2 net/wireless/reg.c | 12 net/wireless/scan.c | 4 net/x25/x25_dev.c | 2 scripts/extract-cert.c | 7 scripts/sign-file.c | 7 sound/hda/hdac_sysfs.c | 4 sound/pci/hda/patch_ca0132.c | 1 sound/soc/codecs/jz4725b.c | 34 +- sound/soc/codecs/wm5102.c | 6 sound/soc/codecs/wm5110.c | 6 sound/soc/codecs/wm8962.c | 54 +++ sound/soc/codecs/wm8997.c | 6 sound/soc/soc-core.c | 17 - sound/soc/soc-utils.c | 2 sound/usb/midi.c | 4 sound/usb/quirks-table.h | 4 sound/usb/quirks.c | 1 tools/perf/util/stat-display.c | 2 tools/testing/selftests/futex/functional/Makefile | 6 tools/testing/selftests/intel_pstate/Makefile | 6 tools/testing/selftests/kvm/include/x86_64/processor.h | 8 144 files changed, 877 insertions(+), 554 deletions(-)
Alex Barba (1):
bnxt_en: fix potentially incorrect return value for ndo_rx_flow_steer
Alexander Potapenko (3):
ipv6: addrlabel: fix infoleak when sending struct ifaddrlblmsg to network misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram()
mm: fs: initialize fsdata passed to write_begin/write_end interface
Anastasia Belova (1):
cifs: add check for returning value of SMB2_set_info_init
Andreas Gruenbacher (1):
gfs2: Switch from strlcpy to strscpy
Andrew Price (1):
gfs2: Check sb_bsize_shift after reading superblock
Ard Biesheuvel (1):
arm64: efi: Fix handling of misaligned runtime regions and drop warning
Arend van Spriel (1):
wifi: cfg80211: fix memory leak in query_regdb_file()
Athira Rajeev (1):
perf stat: Fix printing os->prefix in CSV metrics output
Baisong Zhong (1):
bpf, test_run: Fix alignment problem in bpf_prog_test_run_skb()
Benjamin Block (1):
scsi: zfcp: Fix double free of FSF request when qdio send fails
Benjamin Coddington (1):
NFSv4: Retry LOCK on OLD_STATEID during delegation return
Benoît Monin (1):
USB: serial: option: add Sierra Wireless EM9191
Borislav Petkov (1):
x86/cpu: Restore AMD's DE_CFG MSR after resume
Brian Foster (2):
xfs: preserve rmapbt swapext block reservation from freed blocks
xfs: drain the buf delwri queue before xfsaild idles
Brian Norris (3):
mmc: cqhci: Provide helper for resetting both SDHCI and CQHCI
mmc: sdhci-of-arasan: Fix SDHCI_RESET_ALL for CQHCI
mmc: sdhci-tegra: Fix SDHCI_RESET_ALL for CQHCI
Chen Jun (1):
Input: i8042 - fix leaking of platform device on module removal
Chen Zhongjin (2):
ASoC: core: Fix use-after-free in snd_soc_exit()
ASoC: soc-utils: Remove __exit for snd_soc_util_exit()
Chevron Li (1):
mmc: sdhci-pci-o2micro: fix card detect fail issue caused by CD# debounce timeout
Christophe JAILLET (1):
dmaengine: mv_xor_v2: Fix a resource leak in mv_xor_v2_remove()
Chuang Wang (2):
net: macvlan: fix memory leaks of macvlan_common_newlink
net: macvlan: Use built-in RCU list checking
Colin Ian King (1):
ASoC: codecs: jz4725b: Fix spelling mistake "Sourc" -> "Source", "Routee" -> "Route"
Cong Wang (1):
kcm: close race conditions on sk_receive_queue
Dan Carpenter (2):
phy: stm32: fix an error code in probe
drbd: use after free in drbd_create_device()
Daniil Tatianin (1):
ring_buffer: Do not deactivate non-existant pages
Darrick J. Wong (2):
xfs: rename xfs_bmap_is_real_extent to is_written_extent
xfs: redesign the reflink remap loop to fix blkres depletion crash
Dave Chinner (1):
xfs: use MMAPLOCK around filemap_map_pages()
Davide Tronchin (3):
USB: serial: option: remove old LARA-R6 PID
USB: serial: option: add u-blox LARA-R6 00B modem
USB: serial: option: add u-blox LARA-L6 modem
Dominique Martinet (1):
9p: trans_fd/p9_conn_cancel: drop client lock earlier
Doug Brown (1):
dmaengine: pxa_dma: use platform_get_irq_optional
Duoming Zhou (2):
tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send
usb: chipidea: fix deadlock in ci_otg_del_timer
Eric Dumazet (4):
net: tun: call napi_schedule_prep() to ensure we own a napi
macvlan: enforce a consistent minimal mtu
tcp: cdg: allow tcp_cdg_release() to be called multiple times
kcm: avoid potential race in kcm_tx_work
Eric Sandeen (1):
xfs: preserve inode versioning across remounts
Filipe Manana (1):
btrfs: remove pointless and double ulist frees in error paths of qgroup tests
Gaosheng Cui (2):
capabilities: fix undefined behavior in bit shift for CAP_TO_MASK
bnxt_en: Remove debugfs when pci_register_driver failed
Greg Kroah-Hartman (1):
Linux 5.4.225
Hawkins Jiawei (3):
ntfs: fix use-after-free in ntfs_attr_find()
ntfs: fix out-of-bounds read in ntfs_attr_find()
ntfs: check overflow when iterating ATTR_RECORDs
Ilpo Järvinen (3):
serial: 8250: Fall back to non-DMA Rx if IIR_RDI occurs
serial: 8250_lpss: Configure DMA also w/o DMA filter
serial: 8250: Flush DMA Rx on RLSI
Jiaxun Yang (1):
MIPS: jump_label: Fix compat branch range check
Jiri Benc (1):
net: gso: fix panic on frag_list with mixed head alloc types
Jisheng Zhang (1):
riscv: process: fix kernel info leakage
Johan Hovold (1):
Revert "usb: dwc3: disable USB core PHY management"
Johannes Berg (1):
wifi: cfg80211: silence a sparse RCU warning
Jorge Lopez (1):
platform/x86: hp_wmi: Fix rfkill causing soft blocked wifi
Jussi Laako (1):
ALSA: usb-audio: Add DSD support for Accuphase DAC-60
Krzysztof Kozlowski (1):
slimbus: stream: correct presence rate frequencies
Li Huafei (1):
kprobes: Skip clearing aggrprobe's post_handler in kprobe-on-ftrace case
Linus Torvalds (1):
cert host tools: Stop complaining about deprecated OpenSSL functions
Luiz Augusto von Dentz (1):
Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm
Maciej W. Rozycki (1):
parport_pc: Avoid FIFO port location truncation
Marek Vasut (3):
spi: stm32: Print summary 'callbacks suppressed' message
arm64: dts: imx8mm: Fix NAND controller size-cells
arm64: dts: imx8mn: Fix NAND controller size-cells
Matthew Auld (1):
drm/i915/dmabuf: fix sg_table handling in map_dma_buf
Matthias Schiffer (1):
serial: 8250_omap: remove wait loop from Errata i202 workaround
Mauro Lima (1):
spi: intel: Fix the offset to get the 64K erase opcode
Michael Chan (1):
bnxt_en: Fix possible crash in bnxt_hwrm_set_coal()
Mikulas Patocka (1):
dm ioctl: fix misbehavior if list_versions races with module loading
Mitja Spes (1):
iio: pressure: ms5611: changed hardcoded SPI speed to value limited
Mushahid Hussain (1):
speakup: fix a segfault caused by switching consoles
Nam Cao (1):
i2c: i801: add lis3lv02d's I2C address for Vostro 5568
Nathan Chancellor (1):
vmlinux.lds.h: Fix placement of '.data..decrypted' section
Nathan Huckleberry (1):
drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid
Nicolas Dumazet (1):
usb: add NO_LPM quirk for Realforce 87U Keyboard
Oliver Hartkopp (1):
can: j1939: j1939_send_one(): fix missing CAN header initialization
Reinhard Speyerer (1):
USB: serial: option: add Fibocom FM160 0x0111 composition
Ricardo Cañuelo (2):
selftests/futex: fix build for clang selftests/intel_pstate: fix build for ARCH=x86_64
Roger Pau Monné (1):
platform/x86/intel: pmc: Don't unconditionally attach Intel PMC when virtualized
Roy Novich (1):
net/mlx5: Allow async trigger completion execution on single CPU systems
Ryusuke Konishi (2):
nilfs2: fix deadlock in nilfs_count_free_blocks()
nilfs2: fix use-after-free bug of ns_writer on remount
Sean Anderson (1):
net: fman: Unregister ethernet device on removal
Serge Semin (1):
block: sed-opal: kmalloc the cmd/resp buffers
Shawn Guo (1):
serial: imx: Add missing .thaw_noirq hook
Shuah Khan (1):
docs: update mediator contact information in CoC doc
Siarhei Volkau (4):
ASoC: codecs: jz4725b: add missed Line In power control bit
ASoC: codecs: jz4725b: fix reported volume for Master ctl
ASoC: codecs: jz4725b: use right control for Capture Volume
ASoC: codecs: jz4725b: fix capture selector naming
Steven Rostedt (Google) (1):
ring-buffer: Include dropped pages in counting dirty patches
Takashi Iwai (2):
ALSA: usb-audio: Add quirk entry for M-Audio Micro
ALSA: usb-audio: Drop snd_BUG_ON() from snd_usbmidi_output_open()
Tetsuo Handa (2):
Input: iforce - invert valid length check when fetching device IDs 9p/trans_fd: always use O_NONBLOCK read/write
Tony Lindgren (2):
serial: 8250: omap: Fix unpaired pm_runtime_put_sync() in omap8250_remove()
serial: 8250: omap: Flush PM QOS work on remove
Tudor Ambarus (6):
dmaengine: at_hdmac: Fix at_lli struct definition
dmaengine: at_hdmac: Don't start transactions at tx_submit level
dmaengine: at_hdmac: Fix completion of unissued descriptor in case of errors
dmaengine: at_hdmac: Don't allow CPU to reorder channel enable
dmaengine: at_hdmac: Fix impossible condition
dmaengine: at_hdmac: Check return code of dma_async_device_register
Wang ShaoBo (1):
mISDN: fix misuse of put_device() in mISDN_register_device()
Wang Wensheng (2):
ftrace: Fix the possible incorrect kernel message
ftrace: Optimize the allocation for mcount entries
Wang Yufen (2):
bpf, sockmap: Fix the sk->sk_forward_alloc warning of sk_stream_kill_queues
net: tun: Fix memory leaks of napi_get_frags
Wei Yongjun (2):
net: bgmac: Drop free_netdev() from bgmac_enet_remove() net/x25: Fix skb leak in x25_lapb_receive_frame()
Xian Wang (1):
ALSA: hda/ca0132: add quirk for EVGA Z390 DARK
Xiaolei Wang (1):
ASoC: wm8962: Add an event handler for TEMP_HP and TEMP_SPK
Xin Long (1):
tipc: fix the msg->req tlv len check in tipc_nl_compat_name_table_dump_header
Xiongfeng Wang (1):
mmc: sdhci-pci: Fix possible memory leak caused by missing pci_dev_put()
Xiu Jianfeng (1):
ftrace: Fix null pointer dereference in ftrace_add_mod()
Yang Yingliang (8):
HID: hyperv: fix possible memory leak in mousevsc_probe()
siox: fix possible memory leak in siox_device_add()
ata: libata-transport: fix double ata_host_put() in ata_tport_add()
mISDN: fix possible memory leak in mISDN_dsp_element_register() xen/pcpu: fix possible memory leak in register_pcpu()
iio: adc: at91_adc: fix possible memory leak in at91_adc_allocate_trigger()
iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init()
scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()
Yann Gautier (1):
mmc: core: properly select voltage range without power cycle
Ye Bin (1):
ALSA: hda: fix potential memleak in 'add_widget_node'
Yuan Can (2):
drm/vc4: Fix missing platform_unregister_drivers() call in vc4_drm_register()
net: thunderbolt: Fix error handling in tbnet_init()
Zeng Heng (1):
pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map
Zhang Qilong (3):
ASoC: wm5102: Revert "ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe"
ASoC: wm5110: Revert "ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe"
ASoC: wm8997: Revert "ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe"
Zhang Xiaoxu (2):
btrfs: selftests: fix wrong error check in btrfs_free_dummy_root()
cifs: Fix wrong return value checking when GETFLAGS
ZhangPeng (1):
udf: Fix a slab-out-of-bounds write bug in udf_find_entry()
Zhengchao Shao (13):
net: lapbether: fix issue of dev reference count leakage in lapbeth_device_event()
hamradio: fix issue of dev reference count leakage in bpq_device_event()
can: af_can: fix NULL pointer dereference in can_rx_register()
drivers: net: xgene: disable napi when register irq failed in xgene_enet_open()
net: nixge: disable napi when enable interrupts failed in nixge_open()
net: cpsw: disable napi in cpsw_ndo_open()
net: cxgb3_main: disable napi when bind qsets failed in cxgb_up()
cxgb4vf: shut down the adapter when t4vf_update_port_info() failed in cxgb4vf_open()
ethernet: s2io: disable napi when start nic failed in s2io_card_up()
net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open()
ethernet: tundra: free irq when alloc ring failed in tsi108_open()
net: liquidio: release resources when liquidio driver open failed
net: caif: fix double disconnect client in chnl_net_open()
Greg Kroah-Hartman
maintainerDocumentation/process/code-of-conduct-interpretation.rst +1 -1
@@ -51,7 +51,7 @@ the Technical Advisory Board (TAB) or other maintainers if you're uncertain how to handle situations that come up. It will not be considered a violation report unless you want it to be. If you are uncertain about approaching the TAB or any other maintainers, please -reach out to our conflict mediator, Joanna Lee <[email protected]>. +reach out to our conflict mediator, Joanna Lee <[email protected]>. In the end, "be kind to each other" is really what the end goal is for everybody. We know everyone is human and we all fail at times, but the
Makefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 224 +SUBLEVEL = 225 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm64/boot/dts/freescale/imx8mm.dtsi +2 -2
@@ -838,10 +838,10 @@ clocks = <&clk IMX8MM_CLK_NAND_USDHC_BUS_RAWNAND_CLK>; }; - gpmi: nand-controller@33002000{ + gpmi: nand-controller@33002000 { compatible = "fsl,imx8mm-gpmi-nand", "fsl,imx7d-gpmi-nand"; #address-cells = <1>; - #size-cells = <1>; + #size-cells = <0>; reg = <0x33002000 0x2000>, <0x33004000 0x4000>; reg-names = "gpmi-nand", "bch"; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/boot/dts/freescale/imx8mn.dtsi +1 -1
@@ -695,7 +695,7 @@ gpmi: nand-controller@33002000 { compatible = "fsl,imx8mn-gpmi-nand", "fsl,imx7d-gpmi-nand"; #address-cells = <1>; - #size-cells = <1>; + #size-cells = <0>; reg = <0x33002000 0x2000>, <0x33004000 0x4000>; reg-names = "gpmi-nand", "bch"; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
arch/arm64/kernel/efi.c +34 -18
79 lines not on this page · raw message
arch/mips/kernel/jump_label.c +1 -1
@@ -56,7 +56,7 @@ void arch_jump_label_transform(struct jump_entry *e,* The branch offset must fit in the instruction's 26 * bit field. */ -WARN_ON ((offset >=BIT (25 )) || +WARN_ON ((offset >= (long )BIT (25 )) || (offset < -(long )BIT (25 ))); insn.j_format.opcode = bc6_op;
arch/riscv/kernel/process.c +2 -0
@@ -104,6 +104,8 @@ int copy_thread_tls(unsigned long clone_flags, unsigned long usp, {struct pt_regs *childregs =task_pt_regs (p); +memset (&p->thread.s,0 ,sizeof (p->thread.s)); +/* p->thread holds context to be restored by __switch_to() */ if (unlikely (p->flags &PF_KTHREAD )) {/* Kernel thread */
arch/x86/include/asm/msr-index.h +5 -3
@@ -454,6 +454,11 @@#define MSR_AMD64_OSVW_STATUS 0xc0010141#define MSR_AMD64_LS_CFG 0xc0011020#define MSR_AMD64_DC_CFG 0xc0011022 + +#define MSR_AMD64_DE_CFG 0xc0011029 +#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT 1 +#define MSR_AMD64_DE_CFG_LFENCE_SERIALIZE BIT_ULL(MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT) +#define MSR_AMD64_BU_CFG2 0xc001102a#define MSR_AMD64_IBSFETCHCTL 0xc0011030#define MSR_AMD64_IBSFETCHLINAD 0xc0011031
@@ -522,9 +527,6 @@#define FAM10H_MMIO_CONF_BASE_MASK 0xfffffffULL#define FAM10H_MMIO_CONF_BASE_SHIFT 20#define MSR_FAM10H_NODE_ID 0xc001100c -#define MSR_F10H_DECFG 0xc0011029 -#define MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT 1 -#define MSR_F10H_DECFG_LFENCE_SERIALIZE BIT_ULL(MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT)/* K8 MSRs */ #define MSR_K8_TOP_MEM1 0xc001001a
arch/x86/kernel/cpu/amd.c +2 -4
@@ -794,8 +794,6 @@ static void init_amd_gh(struct cpuinfo_x86 *c)set_cpu_bug (c,X86_BUG_AMD_TLB_MMATCH ); } -#define MSR_AMD64_DE_CFG 0xC0011029 -static void init_amd_ln (struct cpuinfo_x86 *c) {/*
@@ -965,8 +963,8 @@ static void init_amd(struct cpuinfo_x86 *c)* msr_set_bit() uses the safe accessors, too, even if the MSR * is not present. */ -msr_set_bit (MSR_F10H_DECFG , -MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT ); +msr_set_bit (MSR_AMD64_DE_CFG , +MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT );/* A serializing LFENCE stops RDTSC speculation */ set_cpu_cap (c,X86_FEATURE_LFENCE_RDTSC );
arch/x86/kernel/cpu/hygon.c +2 -2
@@ -335,8 +335,8 @@ static void init_hygon(struct cpuinfo_x86 *c)* msr_set_bit() uses the safe accessors, too, even if the MSR * is not present. */ -msr_set_bit (MSR_F10H_DECFG , -MSR_F10H_DECFG_LFENCE_SERIALIZE_BIT ); +msr_set_bit (MSR_AMD64_DE_CFG , +MSR_AMD64_DE_CFG_LFENCE_SERIALIZE_BIT );/* A serializing LFENCE stops RDTSC speculation */ set_cpu_cap (c,X86_FEATURE_LFENCE_RDTSC );
arch/x86/kvm/svm.c +5 -5
@@ -4180,9 +4180,9 @@ static int svm_get_msr_feature(struct kvm_msr_entry *msr) msr->data =0 ;switch (msr->index) { -case MSR_F10H_DECFG : -if (boot_cpu_has (X86_FEATURE_LFENCE_RDTSC )) - msr->data |=MSR_F10H_DECFG_LFENCE_SERIALIZE ; +case MSR_AMD64_DE_CFG : +if (cpu_feature_enabled (X86_FEATURE_LFENCE_RDTSC )) + msr->data |=MSR_AMD64_DE_CFG_LFENCE_SERIALIZE ;break ;default :return 1 ;
@@ -4284,7 +4284,7 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info) msr_info->data =0x1E ; }break ; -case MSR_F10H_DECFG : +case MSR_AMD64_DE_CFG : msr_info->data = svm->msr_decfg;break ;default :
@@ -4451,7 +4451,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr)case MSR_VM_IGNNE :vcpu_unimpl (vcpu,"unimplemented wrmsr: 0x%x data 0x%llx\n" , ecx, data);break ; -case MSR_F10H_DECFG : { +case MSR_AMD64_DE_CFG : {struct kvm_msr_entry msr_entry; msr_entry.index = msr->index;
arch/x86/kvm/x86.c +1 -1
@@ -1337,7 +1337,7 @@ static const u32 msr_based_features_all[] = {MSR_IA32_VMX_EPT_VPID_CAP ,MSR_IA32_VMX_VMFUNC , -MSR_F10H_DECFG , +MSR_AMD64_DE_CFG ,MSR_IA32_UCODE_REV , MSR_IA32_ARCH_CAPABILITIES, };
arch/x86/power/cpu.c +1 -0
@@ -528,6 +528,7 @@ static void pm_save_spec_msr(void)MSR_TSX_FORCE_ABORT ,MSR_IA32_MCU_OPT_CTRL ,MSR_AMD64_LS_CFG , +MSR_AMD64_DE_CFG , };msr_build_context (spec_msr_id,ARRAY_SIZE (spec_msr_id));
block/sed-opal.c +28 -4
@@ -88,8 +88,8 @@ struct opal_dev {u64 lowest_lba;size_t pos; -u8 cmd[IO_BUFFER_LENGTH ]; -u8 resp[IO_BUFFER_LENGTH ]; +u8 *cmd; +u8 *resp;struct parsed_resp parsed;size_t prev_d_len;
@@ -2019,6 +2019,8 @@ void free_opal_dev(struct opal_dev *dev)return ;clean_opal_dev (dev); +kfree (dev->resp); +kfree (dev->cmd);kfree (dev); }EXPORT_SYMBOL (free_opal_dev);
@@ -2031,17 +2033,39 @@ struct opal_dev *init_opal_dev(void *data, sec_send_recv *send_recv)if (!dev)return NULL ; +/* +* Presumably DMA-able buffers must be cache-aligned. Kmalloc makes +* sure the allocated buffer is DMA-safe in that regard. +*/ + dev->cmd =kmalloc (IO_BUFFER_LENGTH ,GFP_KERNEL ); +if (!dev->cmd) + goto err_free_dev; + + dev->resp =kmalloc (IO_BUFFER_LENGTH ,GFP_KERNEL ); +if (!dev->resp) + goto err_free_cmd; +INIT_LIST_HEAD (&dev->unlk_lst);mutex_init (&dev->dev_lock); dev->data = data; dev->send_recv = send_recv;if (check_opal_support (dev) !=0 ) {pr_debug ("Opal is not supported on this device\n" ); -kfree (dev); -return NULL ; + goto err_free_resp; }return dev; + +err_free_resp: +kfree (dev->resp); + +err_free_cmd: +kfree (dev->cmd); + +err_free_dev: +kfree (dev); + +return NULL ; }EXPORT_SYMBOL (init_opal_dev);
drivers/ata/libata-transport.c +0 -1
@@ -317,7 +317,6 @@ int ata_tport_add(struct device *parent, tport_err:transport_destroy_device (dev);put_device (dev); -ata_host_put (ap->host);return error; }
drivers/block/drbd/drbd_main.c +2 -2
@@ -2778,7 +2778,7 @@ static int init_submitter(struct drbd_device *device)enum drbd_ret_code drbd_create_device (struct drbd_config_context *adm_ctx,unsigned int minor) {struct drbd_resource *resource = adm_ctx->resource; -struct drbd_connection *connection; +struct drbd_connection *connection, *n;struct drbd_device *device;struct drbd_peer_device *peer_device, *tmp_peer_device;struct gendisk *disk;
@@ -2906,7 +2906,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig out_idr_remove_vol:idr_remove (&connection->peer_devices, vnr); out_idr_remove_from_resource: -for_each_connection (connection, resource) { +for_each_connection_safe (connection, n, resource) { peer_device =idr_remove (&connection->peer_devices, vnr);if (peer_device)kref_put (&connection->kref, drbd_destroy_connection);
drivers/dma/at_hdmac.c +15 -19
@@ -246,6 +246,8 @@ static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first) ATC_SPIP_BOUNDARY(first->boundary));channel_writel (atchan,DPIP ,ATC_DPIP_HOLE (first->dst_hole) |ATC_DPIP_BOUNDARY (first->boundary)); +/* Don't allow CPU to reorder channel enable. */ +wmb ();dma_writel (atdma,CHER , atchan->mask);vdbg_dump_regs (atchan);
@@ -306,7 +308,8 @@ static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie)struct at_desc *desc_first =atc_first_active (atchan);struct at_desc *desc;int ret; -u32 ctrla, dscr, trials; +u32 ctrla, dscr; +unsigned int i;/* * If the cookie doesn't match to the currently running transfer then
@@ -376,7 +379,7 @@ static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie) dscr =channel_readl (atchan,DSCR );rmb ();/* ensure DSCR is read before CTRLA */ ctrla =channel_readl (atchan,CTRLA ); -for (trials =0 ; trials <ATC_MAX_DSCR_TRIALS ; ++trials) { +for (i =0 ; i <ATC_MAX_DSCR_TRIALS ; ++i) {u32 new_dscr;rmb ();/* ensure DSCR is read after CTRLA */
@@ -402,7 +405,7 @@ static int atc_get_bytes_left(struct dma_chan *chan, dma_cookie_t cookie)rmb ();/* ensure DSCR is read before CTRLA */ ctrla =channel_readl (atchan,CTRLA ); } -if (unlikely (trials >=ATC_MAX_DSCR_TRIALS )) +if (unlikely (i ==ATC_MAX_DSCR_TRIALS ))return -ETIMEDOUT ;/* for the first descriptor we can be more accurate */
@@ -550,10 +553,6 @@ static void atc_handle_error(struct at_dma_chan *atchan) bad_desc =atc_first_active (atchan);list_del_init (&bad_desc->desc_node); -/* As we are stopped, take advantage to push queued descriptors -* in active_list */ -list_splice_init (&atchan->queue, atchan->active_list.prev); -/* Try to restart the controller */ if (!list_empty (&atchan->active_list))atc_dostart (atchan,atc_first_active (atchan));
@@ -674,19 +673,11 @@ static dma_cookie_t atc_tx_submit(struct dma_async_tx_descriptor *tx)spin_lock_irqsave (&atchan->lock, flags); cookie =dma_cookie_assign (tx); -if (list_empty (&atchan->active_list)) { -dev_vdbg (chan2dev (tx->chan),"tx_submit: started %u\n" , - desc->txd.cookie); -atc_dostart (atchan, desc); -list_add_tail (&desc->desc_node, &atchan->active_list); - }else { -dev_vdbg (chan2dev (tx->chan),"tx_submit: queued %u\n" , - desc->txd.cookie); -list_add_tail (&desc->desc_node, &atchan->queue); - } - +list_add_tail (&desc->desc_node, &atchan->queue);spin_unlock_irqrestore (&atchan->lock, flags); +dev_vdbg (chan2dev (tx->chan),"tx_submit: queued %u\n" , + desc->txd.cookie);return cookie; }
@@ -1957,7 +1948,11 @@ static int __init at_dma_probe(struct platform_device *pdev)dma_has_cap (DMA_SLAVE , atdma->dma_common.cap_mask) ?"slave " :"" , plat_dat->nr_channels); -dma_async_device_register (&atdma->dma_common); + err =dma_async_device_register (&atdma->dma_common); +if (err) { +dev_err (&pdev->dev,"Unable to register: %d.\n" , err); + goto err_dma_async_device_register; + }/* * Do not return an error if the dmac node is not present in order to
@@ -1977,6 +1972,7 @@ static int __init at_dma_probe(struct platform_device *pdev) err_of_dma_controller_register:dma_async_device_unregister (&atdma->dma_common); +err_dma_async_device_register:dma_pool_destroy (atdma->memset_pool); err_memset_pool_create:dma_pool_destroy (atdma->dma_desc_pool);
drivers/dma/at_hdmac_regs.h +5 -5
@@ -164,13 +164,13 @@/* LLI == Linked List Item; aka DMA buffer descriptor */ struct at_lli {/* values that are not changed by hardware */ -dma_addr_t saddr; -dma_addr_t daddr; +u32 saddr; +u32 daddr;/* value that may get written back: */ -u32 ctrla; +u32 ctrla;/* more values that are not changed by hardware */ -u32 ctrlb; -dma_addr_t dscr;/* chain to next lli */ +u32 ctrlb; +u32 dscr;/* chain to next lli */ };/**
drivers/dma/mv_xor_v2.c +1 -0
@@ -895,6 +895,7 @@ static int mv_xor_v2_remove(struct platform_device *pdev)tasklet_kill (&xor_dev->irq_tasklet);clk_disable_unprepare (xor_dev->clk); +clk_disable_unprepare (xor_dev->reg_clk);return 0 ; }
drivers/dma/pxa_dma.c +2 -2
@@ -1249,14 +1249,14 @@ static int pxad_init_phys(struct platform_device *op,return -ENOMEM ;for (i =0 ; i < nb_phy_chans; i++) -if (platform_get_irq (op, i) >0 ) +if (platform_get_irq_optional (op, i) >0 ) nr_irq++;for (i =0 ; i < nb_phy_chans; i++) { phy = &pdev->phys[i]; phy->base = pdev->base; phy->idx = i; - irq =platform_get_irq (op, i); + irq =platform_get_irq_optional (op, i);if ((nr_irq >1 ) && (irq >0 )) ret = devm_request_irq(&op->dev, irq, pxad_chan_handler,
drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c +2 -2
@@ -36,13 +36,13 @@ static struct sg_table *i915_gem_map_dma_buf(struct dma_buf_attachment *attachme goto err_unpin_pages; } - ret =sg_alloc_table (st, obj->mm.pages->nents,GFP_KERNEL ); + ret =sg_alloc_table (st, obj->mm.pages->orig_nents,GFP_KERNEL );if (ret) goto err_free; src = obj->mm.pages->sgl; dst = st->sgl; -for (i =0 ; i < obj->mm.pages->nents; i++) { +for (i =0 ; i < obj->mm.pages->orig_nents; i++) {sg_set_page (dst,sg_page (src), src->length,0 ); dst =sg_next (dst); src =sg_next (src);
drivers/gpu/drm/imx/imx-tve.c +3 -2
@@ -237,8 +237,9 @@ static int imx_tve_connector_get_modes(struct drm_connector *connector)return ret; } -static int imx_tve_connector_mode_valid (struct drm_connector *connector, -struct drm_display_mode *mode) +static enum drm_mode_status +imx_tve_connector_mode_valid (struct drm_connector *connector, +struct drm_display_mode *mode) {struct imx_tve *tve =con_to_tve (connector);unsigned long rate;
drivers/gpu/drm/vc4/vc4_drv.c +6 -1
@@ -392,7 +392,12 @@ static int __init vc4_drm_register(void)if (ret)return ret; -return platform_driver_register (&vc4_platform_driver); + ret =platform_driver_register (&vc4_platform_driver); +if (ret) +platform_unregister_drivers (component_drivers, +ARRAY_SIZE (component_drivers)); + +return ret; } static void __exit vc4_drm_unregister(void)
drivers/hid/hid-hyperv.c +1 -1
@@ -492,7 +492,7 @@ static int mousevsc_probe(struct hv_device *device, ret =hid_add_device (hid_dev);if (ret) - goto probe_err1; + goto probe_err2; ret =hid_parse (hid_dev);
drivers/i2c/busses/i2c-i801.c +1 -0
@@ -1253,6 +1253,7 @@ static const struct {* Additional individual entries were added after verification. */ { "Vostro V131", 0x1d }, + { "Vostro 5568", 0x29 }, };static void register_dell_lis3lv02d_i2c_device (struct i801_priv *priv)
drivers/iio/adc/at91_adc.c +3 -1
@@ -616,8 +616,10 @@ static struct iio_trigger *at91_adc_allocate_trigger(struct iio_dev *idev, trig->ops = &at91_adc_trigger_ops; ret =iio_trigger_register (trig); -if (ret) +if (ret) { +iio_trigger_free (trig);return NULL ; + }return trig; }
drivers/iio/pressure/ms5611_spi.c +1 -1
@@ -92,7 +92,7 @@ static int ms5611_spi_probe(struct spi_device *spi)spi_set_drvdata (spi, indio_dev); spi->mode =SPI_MODE_0 ; - spi->max_speed_hz =20000000 ; + spi->max_speed_hz =min (spi->max_speed_hz,20000000U ); spi->bits_per_word =8 ; ret =spi_setup (spi);if (ret <0 )
drivers/iio/trigger/iio-trig-sysfs.c +5 -1
@@ -209,9 +209,13 @@ static int iio_sysfs_trigger_remove(int id)static int __init iio_sysfs_trig_init (void ) { +int ret;device_initialize (&iio_sysfs_trig_dev);dev_set_name (&iio_sysfs_trig_dev,"iio_sysfs_trigger" ); -return device_add (&iio_sysfs_trig_dev); + ret =device_add (&iio_sysfs_trig_dev); +if (ret) +put_device (&iio_sysfs_trig_dev); +return ret; }module_init (iio_sysfs_trig_init);
drivers/input/joystick/iforce/iforce-main.c +4 -4
@@ -273,22 +273,22 @@ int iforce_init_device(struct device *parent, u16 bustype,* Get device info. */ -if (!iforce_get_id_packet (iforce,'M' , buf, &len) || len <3 ) +if (!iforce_get_id_packet (iforce,'M' , buf, &len) && len >=3 ) input_dev->id.vendor =get_unaligned_le16 (buf +1 );else dev_warn (&iforce->dev->dev,"Device does not respond to id packet M\n" ); -if (!iforce_get_id_packet (iforce,'P' , buf, &len) || len <3 ) +if (!iforce_get_id_packet (iforce,'P' , buf, &len) && len >=3 ) input_dev->id.product =get_unaligned_le16 (buf +1 );else dev_warn (&iforce->dev->dev,"Device does not respond to id packet P\n" ); -if (!iforce_get_id_packet (iforce,'B' , buf, &len) || len <3 ) +if (!iforce_get_id_packet (iforce,'B' , buf, &len) && len >=3 ) iforce->device_memory.end =get_unaligned_le16 (buf +1 );else dev_warn (&iforce->dev->dev,"Device does not respond to id packet B\n" ); -if (!iforce_get_id_packet (iforce,'N' , buf, &len) || len <2 ) +if (!iforce_get_id_packet (iforce,'N' , buf, &len) && len >=2 ) ff_effects = buf[1 ];else dev_warn (&iforce->dev->dev,"Device does not respond to id packet N\n" );
drivers/input/serio/i8042.c +0 -4
@@ -1540,8 +1540,6 @@ static int i8042_probe(struct platform_device *dev) {int error; - i8042_platform_device = dev; -if (i8042_reset ==I8042_RESET_ALWAYS ) { error =i8042_controller_selftest ();if (error)
@@ -1579,7 +1577,6 @@ static int i8042_probe(struct platform_device *dev)i8042_free_aux_ports ();/* in case KBD failed but AUX not */ i8042_free_irqs ();i8042_controller_reset (false); - i8042_platform_device =NULL ;return error; }
@@ -1589,7 +1586,6 @@ static int i8042_remove(struct platform_device *dev)i8042_unregister_ports ();i8042_free_irqs ();i8042_controller_reset (false); - i8042_platform_device =NULL ;return 0 ; }
drivers/isdn/mISDN/core.c +1 -1
@@ -222,7 +222,7 @@ mISDN_register_device(struct mISDNdevice *dev, err =get_free_devid ();if (err <0 ) - goto error1; +return err; dev->id = err;device_initialize (&dev->dev);
drivers/isdn/mISDN/dsp_pipeline.c +2 -1
@@ -80,6 +80,7 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem)if (!entry)return -ENOMEM ; +INIT_LIST_HEAD (&entry->list); entry->elem = elem; entry->dev.class = elements_class;
@@ -114,7 +115,7 @@ int mISDN_dsp_element_register(struct mISDN_dsp_element *elem)device_unregister (&entry->dev);return ret; err1: -kfree (entry); +put_device (&entry->dev);return ret; }EXPORT_SYMBOL (mISDN_dsp_element_register);
drivers/md/dm-ioctl.c +2 -2
@@ -573,7 +573,7 @@ static void list_version_get_needed(struct target_type *tt, void *needed_param)size_t *needed = needed_param; *needed +=sizeof (struct dm_target_versions ); - *needed +=strlen (tt->name); + *needed +=strlen (tt->name) +1 ; *needed +=ALIGN_MASK ; }
@@ -638,7 +638,7 @@ static int __list_versions(struct dm_ioctl *param, size_t param_size, const char iter_info.old_vers =NULL ; iter_info.vers = vers; iter_info.flags =0 ; - iter_info.end = (char *)vers+len; + iter_info.end = (char *)vers + needed;/* * Now loop through filling out the names & versions.
drivers/misc/vmw_vmci/vmci_queue_pair.c +2 -0
@@ -852,6 +852,7 @@ static int qp_notify_peer_local(bool attach, struct vmci_handle handle)u32 context_id =vmci_get_context_id ();struct vmci_event_qp ev; +memset (&ev,0 ,sizeof (ev)); ev.msg.hdr.dst =vmci_make_handle (context_id,VMCI_EVENT_HANDLER ); ev.msg.hdr.src =vmci_make_handle (VMCI_HYPERVISOR_CONTEXT_ID ,VMCI_CONTEXT_RESOURCE_ID );
@@ -1465,6 +1466,7 @@ static int qp_notify_peer(bool attach,* kernel. */ +memset (&ev,0 ,sizeof (ev)); ev.msg.hdr.dst =vmci_make_handle (peer_id,VMCI_EVENT_HANDLER ); ev.msg.hdr.src =vmci_make_handle (VMCI_HYPERVISOR_CONTEXT_ID ,VMCI_CONTEXT_RESOURCE_ID );
drivers/mmc/core/core.c +7 -1
@@ -1145,7 +1145,13 @@ u32 mmc_select_voltage(struct mmc_host *host, u32 ocr)mmc_power_cycle (host, ocr); }else { bit =fls (ocr) -1 ; - ocr &=3 << bit; +/* +* The bit variable represents the highest voltage bit set in +* the OCR register. +* To keep a range of 2 values (e.g. 3.2V/3.3V and 3.3V/3.4V), +* we must shift the mask '3' with (bit - 1). +*/ + ocr &=3 << (bit -1 );if (bit != host->ios.vdd)dev_warn (mmc_dev (host),"exceeding card's volts\n" ); }
drivers/mmc/host/sdhci-cqhci.h new file +24 -0
@@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +* Copyright 2022 The Chromium OS Authors +* +* Support that applies to the combination of SDHCI and CQHCI, while not +* expressing a dependency between the two modules. +*/ + +#ifndef __MMC_HOST_SDHCI_CQHCI_H__ +#define __MMC_HOST_SDHCI_CQHCI_H__ + +#include "cqhci.h" +#include "sdhci.h" + +static inline void sdhci_and_cqhci_reset (struct sdhci_host *host,u8 mask) +{ +if ((host->mmc->caps2 &MMC_CAP2_CQE ) && (mask &SDHCI_RESET_ALL ) && + host->mmc->cqe_private) +cqhci_deactivate (host->mmc); + +sdhci_reset (host, mask); +} + +#endif /* __MMC_HOST_SDHCI_CQHCI_H__ */
drivers/mmc/host/sdhci-of-arasan.c +2 -1
@@ -24,6 +24,7 @@#include <linux/of.h> #include "cqhci.h" +#include "sdhci-cqhci.h" #include "sdhci-pltfm.h" #define SDHCI_ARASAN_VENDOR_REGISTER 0x78
@@ -264,7 +265,7 @@ static void sdhci_arasan_reset(struct sdhci_host *host, u8 mask)struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host);struct sdhci_arasan_data *sdhci_arasan =sdhci_pltfm_priv (pltfm_host); -sdhci_reset (host, mask); +sdhci_and_cqhci_reset (host, mask);if (sdhci_arasan->quirks &SDHCI_ARASAN_QUIRK_FORCE_CDTEST ) { ctrl =sdhci_readb (host,SDHCI_HOST_CONTROL );
drivers/mmc/host/sdhci-pci-core.c +2 -0
@@ -1795,6 +1795,8 @@ static int amd_probe(struct sdhci_pci_chip *chip) } } +pci_dev_put (smbus_dev); +if (gen ==AMD_CHIPSET_BEFORE_ML || gen ==AMD_CHIPSET_CZ ) chip->quirks2 |=SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD ;
drivers/mmc/host/sdhci-pci-o2micro.c +7 -0
@@ -31,6 +31,7 @@#define O2_SD_CAPS 0xE0#define O2_SD_ADMA1 0xE2#define O2_SD_ADMA2 0xE7 +#define O2_SD_MISC_CTRL2 0xF0#define O2_SD_INF_MOD 0xF1#define O2_SD_MISC_CTRL4 0xFC#define O2_SD_TUNING_CTRL 0x300
@@ -777,6 +778,12 @@ int sdhci_pci_o2_probe(struct sdhci_pci_chip *chip)/* Set Tuning Windows to 5 */ pci_write_config_byte (chip->pdev,O2_SD_TUNING_CTRL ,0x55 ); +//Adjust 1st and 2nd CD debounce time +pci_read_config_dword (chip->pdev,O2_SD_MISC_CTRL2 , &scratch_32); + scratch_32 &=0xFFE7FFFF ; + scratch_32 |=0x00180000 ; +pci_write_config_dword (chip->pdev,O2_SD_MISC_CTRL2 , scratch_32); +pci_write_config_dword (chip->pdev,O2_SD_DETECT_SETTING ,1 );/* Lock WP */ ret =pci_read_config_byte (chip->pdev,O2_SD_LOCK_WP , &scratch);
drivers/mmc/host/sdhci-tegra.c +2 -1
@@ -24,6 +24,7 @@#include <linux/gpio/consumer.h> #include <linux/ktime.h> +#include "sdhci-cqhci.h" #include "sdhci-pltfm.h" #include "cqhci.h"
@@ -347,7 +348,7 @@ static void tegra_sdhci_reset(struct sdhci_host *host, u8 mask)const struct sdhci_tegra_soc_data *soc_data = tegra_host->soc_data;u32 misc_ctrl, clk_ctrl, pad_ctrl; -sdhci_reset (host, mask); +sdhci_and_cqhci_reset (host, mask);if (!(mask &SDHCI_RESET_ALL ))return ;
drivers/mtd/spi-nor/intel-spi.c +1 -1
@@ -113,7 +113,7 @@#define ERASE_OPCODE_SHIFT 8#define ERASE_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT)#define ERASE_64K_OPCODE_SHIFT 16 -#define ERASE_64K_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT) +#define ERASE_64K_OPCODE_MASK (0xff << ERASE_64K_OPCODE_SHIFT)#define INTEL_SPI_TIMEOUT 5000/* ms */ #define INTEL_SPI_FIFO_SZ 64
drivers/net/ethernet/apm/xgene/xgene_enet_main.c +3 -1
@@ -1004,8 +1004,10 @@ static int xgene_enet_open(struct net_device *ndev)xgene_enet_napi_enable (pdata); ret =xgene_enet_register_irq (ndev); -if (ret) +if (ret) { +xgene_enet_napi_disable (pdata);return ret; + }if (ndev->phydev) {phy_start (ndev->phydev);
drivers/net/ethernet/broadcom/bgmac.c +0 -1
@@ -1564,7 +1564,6 @@ void bgmac_enet_remove(struct bgmac *bgmac)phy_disconnect (bgmac->net_dev->phydev);netif_napi_del (&bgmac->napi);bgmac_dma_free (bgmac); -free_netdev (bgmac->net_dev); }EXPORT_SYMBOL_GPL (bgmac_enet_remove);
drivers/net/ethernet/broadcom/bnxt/bnxt.c +10 -2
@@ -11182,8 +11182,8 @@ static int bnxt_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,rcu_read_lock ();hlist_for_each_entry_rcu (fltr, head, hash) {if (bnxt_fltr_match (fltr, new_fltr)) { + rc = fltr->sw_id;rcu_read_unlock (); - rc =0 ; goto err_free; } }
@@ -12232,8 +12232,16 @@ static struct pci_driver bnxt_pci_driver = {static int __init bnxt_init (void ) { +int err; +bnxt_debug_init (); -return pci_register_driver (&bnxt_pci_driver); + err =pci_register_driver (&bnxt_pci_driver); +if (err) { +bnxt_debug_exit (); +return err; + } + +return 0 ; } static void __exit bnxt_exit(void)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +1 -1
@@ -124,7 +124,7 @@ static int bnxt_set_coalesce(struct net_device *dev, } reset_coalesce: -if (netif_running (dev)) { +if (test_bit (BNXT_STATE_OPEN , &bp->state)) {if (update_stats) { rc =bnxt_close_nic (bp, true, false);if (!rc)
drivers/net/ethernet/cavium/liquidio/lio_main.c +26 -8
@@ -1836,13 +1836,10 @@ static int liquidio_open(struct net_device *netdev)ifstate_set (lio,LIO_IFSTATE_RUNNING ); -if (OCTEON_CN23XX_PF (oct)) { -if (!oct->msix_on) -if (setup_tx_poll_fn (netdev)) -return -1 ; - }else { -if (setup_tx_poll_fn (netdev)) -return -1 ; +if (!OCTEON_CN23XX_PF (oct) || (OCTEON_CN23XX_PF (oct) && !oct->msix_on)) { + ret =setup_tx_poll_fn (netdev); +if (ret) + goto err_poll; }netif_tx_start_all_queues (netdev);
@@ -1855,7 +1852,7 @@ static int liquidio_open(struct net_device *netdev)/* tell Octeon to start forwarding packets to host */ ret =send_rx_ctrl_cmd (lio,1 );if (ret) -return ret; + goto err_rx_ctrl;/* start periodical statistics fetch */ INIT_DELAYED_WORK (&lio->stats_wk.work, lio_fetch_stats);
@@ -1866,6 +1863,27 @@ static int liquidio_open(struct net_device *netdev)dev_info (&oct->pci_dev->dev,"%s interface is opened\n" , netdev->name); +return 0 ; + +err_rx_ctrl: +if (!OCTEON_CN23XX_PF (oct) || (OCTEON_CN23XX_PF (oct) && !oct->msix_on)) +cleanup_tx_poll_fn (netdev); +err_poll: +if (lio->ptp_clock) { +ptp_clock_unregister (lio->ptp_clock); + lio->ptp_clock =NULL ; + } + +if (oct->props[lio->ifidx].napi_enabled ==1 ) { +list_for_each_entry_safe (napi, n, &netdev->napi_list, dev_list) +napi_disable (napi); + + oct->props[lio->ifidx].napi_enabled =0 ; + +if (OCTEON_CN23XX_PF (oct)) + oct->droq[0 ]->ops.poll_mode =0 ; + } +return ret; }
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +1 -0
@@ -1303,6 +1303,7 @@ static int cxgb_up(struct adapter *adap)if (ret <0 ) {CH_ERR (adap,"failed to bind qsets, err %d\n" , ret);t3_intr_disable (adap); +quiesce_rx (adap);free_irq_resources (adap); err = ret; goto out;
drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c +1 -1
@@ -860,7 +860,7 @@ static int cxgb4vf_open(struct net_device *dev)*/ err =t4vf_update_port_info (pi);if (err <0 ) -return err; + goto err_unwind;/* * Note that this interface is up and start everything up ...
drivers/net/ethernet/freescale/fman/mac.c +9 -0
@@ -885,12 +885,21 @@ static int mac_probe(struct platform_device *_of_dev)return err; } +static int mac_remove (struct platform_device *pdev) +{ +struct mac_device *mac_dev =platform_get_drvdata (pdev); + +platform_device_unregister (mac_dev->priv->eth_dev); +return 0 ; +} +static struct platform_driver mac_driver = { .driver = { .name =KBUILD_MODNAME , .of_match_table = mac_match, }, .probe = mac_probe, + .remove = mac_remove, };builtin_platform_driver (mac_driver);
drivers/net/ethernet/marvell/mv643xx_eth.c +1 -0
@@ -2476,6 +2476,7 @@ static int mv643xx_eth_open(struct net_device *dev)for (i =0 ; i < mp->rxq_count; i++)rxq_deinit (mp->rxq + i); out: +napi_disable (&mp->napi);free_irq (dev->irq, dev);return err;
drivers/net/ethernet/mellanox/mlx5/core/cmd.c +8 -3
@@ -1682,12 +1682,17 @@ void mlx5_cmd_flush(struct mlx5_core_dev *dev)struct mlx5_cmd *cmd = &dev->cmd;int i; -for (i =0 ; i < cmd->max_reg_cmds; i++) -while (down_trylock (&cmd->sem)) +for (i =0 ; i < cmd->max_reg_cmds; i++) { +while (down_trylock (&cmd->sem)) {mlx5_cmd_trigger_completions (dev); +cond_resched (); + } + } -while (down_trylock (&cmd->pages_sem)) +while (down_trylock (&cmd->pages_sem)) {mlx5_cmd_trigger_completions (dev); +cond_resched (); + }/* Unlock cmdif */ up (&cmd->pages_sem);
drivers/net/ethernet/neterion/s2io.c +20 -9
@@ -7122,9 +7122,8 @@ static int s2io_card_up(struct s2io_nic *sp)if (ret) {DBG_PRINT (ERR_DBG ,"%s: Out of memory in Open\n" , dev->name); -s2io_reset (sp); -free_rx_buffers (sp); -return -ENOMEM ; + ret = -ENOMEM ; + goto err_fill_buff; }DBG_PRINT (INFO_DBG ,"Buf in ring:%d is %d:\n" , i, ring->rx_bufs_left);
@@ -7162,18 +7161,16 @@ static int s2io_card_up(struct s2io_nic *sp)/* Enable Rx Traffic and interrupts on the NIC */ if (start_nic (sp)) {DBG_PRINT (ERR_DBG ,"%s: Starting NIC failed\n" , dev->name); -s2io_reset (sp); -free_rx_buffers (sp); -return -ENODEV ; + ret = -ENODEV ; + goto err_out; }/* Add interrupt service routine */ if (s2io_add_isr (sp) !=0 ) {if (sp->config.intr_type ==MSI_X )s2io_rem_isr (sp); -s2io_reset (sp); -free_rx_buffers (sp); -return -ENODEV ; + ret = -ENODEV ; + goto err_out; }timer_setup (&sp->alarm_timer, s2io_alarm_handle,0 );
@@ -7193,6 +7190,20 @@ static int s2io_card_up(struct s2io_nic *sp) }return 0 ; + +err_out: +if (config->napi) { +if (config->intr_type ==MSI_X ) { +for (i =0 ; i < sp->config.rx_ring_num; i++) +napi_disable (&sp->mac_control.rings[i].napi); + }else { +napi_disable (&sp->napi); + } + } +err_fill_buff: +s2io_reset (sp); +free_rx_buffers (sp); +return ret; }/**
drivers/net/ethernet/ni/nixge.c +1 -0
@@ -899,6 +899,7 @@ static int nixge_open(struct net_device *ndev) err_rx_irq:free_irq (priv->tx_irq, ndev); err_tx_irq: +napi_disable (&priv->napi);phy_stop (phy);phy_disconnect (phy);tasklet_kill (&priv->dma_err_tasklet);
drivers/net/ethernet/ti/cpsw.c +2 -0
@@ -1753,6 +1753,8 @@ static int cpsw_ndo_open(struct net_device *ndev) err_cleanup:if (!cpsw->usage_count) { +napi_disable (&cpsw->napi_rx); +napi_disable (&cpsw->napi_tx);cpdma_ctlr_stop (cpsw->dma);cpsw_destroy_xdp_rxqs (cpsw); }
drivers/net/ethernet/tundra/tsi108_eth.c +4 -1
@@ -1302,12 +1302,15 @@ static int tsi108_open(struct net_device *dev) data->rxring =dma_alloc_coherent (&data->pdev->dev, rxring_size, &data->rxdma,GFP_KERNEL ); -if (!data->rxring) +if (!data->rxring) { +free_irq (data->irq_num, dev);return -ENOMEM ; + } data->txring =dma_alloc_coherent (&data->pdev->dev, txring_size, &data->txdma,GFP_KERNEL );if (!data->txring) { +free_irq (data->irq_num, dev);dma_free_coherent (&data->pdev->dev, rxring_size, data->rxring, data->rxdma);return -ENOMEM ;
drivers/net/hamradio/bpqether.c +1 -1
@@ -511,7 +511,7 @@ static int bpq_device_event(struct notifier_block *this,if (!net_eq (dev_net (dev), &init_net))return NOTIFY_DONE ; -if (!dev_is_ethdev (dev)) +if (!dev_is_ethdev (dev) && !bpq_get_ax25_dev (dev))return NOTIFY_DONE ;switch (event) {
drivers/net/macvlan.c +6 -4
@@ -138,7 +138,7 @@ static struct macvlan_source_entry *macvlan_hash_lookup_source(u32 idx =macvlan_eth_hash (addr);struct hlist_head *h = &vlan->port->vlan_source_hash[idx]; -hlist_for_each_entry_rcu (entry, h, hlist) { +hlist_for_each_entry_rcu (entry, h, hlist,lockdep_rtnl_is_held ()) {if (ether_addr_equal_64bits (entry->addr, addr) && entry->vlan == vlan)return entry;
@@ -1166,7 +1166,7 @@ void macvlan_common_setup(struct net_device *dev) {ether_setup (dev); - dev->min_mtu =0 ; +/* ether_setup() has set dev->min_mtu to ETH_MIN_MTU. */ dev->max_mtu =ETH_MAX_MTU ; dev->priv_flags &= ~IFF_TX_SKB_SHARING ;netif_keep_dst (dev);
@@ -1499,8 +1499,10 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,/* the macvlan port may be freed by macvlan_uninit when fail to register. * so we destroy the macvlan port only when it's valid. */ -if (create &&macvlan_port_get_rtnl (lowerdev)) +if (create &&macvlan_port_get_rtnl (lowerdev)) { +macvlan_flush_sources (port, vlan);macvlan_port_destroy (port->dev); + }return err; }EXPORT_SYMBOL_GPL (macvlan_common_newlink);
@@ -1602,7 +1604,7 @@ static int macvlan_fill_info_macaddr(struct sk_buff *skb,struct hlist_head *h = &vlan->port->vlan_source_hash[i];struct macvlan_source_entry *entry; -hlist_for_each_entry_rcu (entry, h, hlist) { +hlist_for_each_entry_rcu (entry, h, hlist,lockdep_rtnl_is_held ()) {if (entry->vlan != vlan)continue ;if (nla_put (skb,IFLA_MACVLAN_MACADDR ,ETH_ALEN , entry->addr))
drivers/net/thunderbolt.c +14 -5
@@ -1339,12 +1339,21 @@ static int __init tbnet_init(void) TBNET_MATCH_FRAGS_ID); ret =tb_register_property_dir ("network" , tbnet_dir); -if (ret) { -tb_property_free_dir (tbnet_dir); -return ret; - } +if (ret) + goto err_free_dir; + + ret =tb_register_service_driver (&tbnet_driver); +if (ret) + goto err_unregister; -return tb_register_service_driver (&tbnet_driver); +return 0 ; + +err_unregister: +tb_unregister_property_dir ("network" , tbnet_dir); +err_free_dir: +tb_property_free_dir (tbnet_dir); + +return ret; }module_init (tbnet_init);
drivers/net/tun.c +13 -5
@@ -2002,17 +2002,25 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile, skb_headlen(skb));if (unlikely (headlen >skb_headlen (skb))) { +WARN_ON_ONCE (1 ); + err = -ENOMEM ;this_cpu_inc (tun->pcpu_stats->rx_dropped); +napi_busy:napi_free_frags (&tfile->napi);rcu_read_unlock ();mutex_unlock (&tfile->napi_mutex); -WARN_ON (1 ); -return -ENOMEM ; +return err; } -local_bh_disable (); -napi_gro_frags (&tfile->napi); -local_bh_enable (); +if (likely (napi_schedule_prep (&tfile->napi))) { +local_bh_disable (); +napi_gro_frags (&tfile->napi); +napi_complete (&tfile->napi); +local_bh_enable (); + }else { + err = -EBUSY ; + goto napi_busy; + }mutex_unlock (&tfile->napi_mutex); }else if (tfile->napi_enabled) {struct sk_buff_head *queue = &tfile->sk.sk_write_queue;
drivers/net/wan/lapbether.c +1 -1
@@ -403,7 +403,7 @@ static int lapbeth_device_event(struct notifier_block *this,if (dev_net (dev) != &init_net)return NOTIFY_DONE ; -if (!dev_is_ethdev (dev)) +if (!dev_is_ethdev (dev) && !lapbeth_get_x25_dev (dev))return NOTIFY_DONE ;switch (event) {
drivers/parport/parport_pc.c +1 -1
@@ -475,7 +475,7 @@ static size_t parport_pc_fifo_write_block_pio(struct parport *port,const unsigned char *bufp = buf;size_t left = length;unsigned long expire = jiffies + port->physport->cad->timeout; -const int fifo =FIFO (port); +const unsigned long fifo =FIFO (port);int poll_for =8 ;/* 80 usecs */ const struct parport_pc_private *priv = port->physport->private_data;const int fifo_depth = priv->fifo_depth;
drivers/phy/st/phy-stm32-usbphyc.c +2 -0
@@ -393,6 +393,8 @@ static int stm32_usbphyc_probe(struct platform_device *pdev) ret =of_property_read_u32 (child,"reg" , &index);if (ret || index > usbphyc->nphys) {dev_err (&phy->dev,"invalid reg property: %d\n" , ret); +if (!ret) + ret = -EINVAL ; goto put_child; }
drivers/pinctrl/devicetree.c +2 -0
@@ -223,6 +223,8 @@ int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev)for (state =0 ; ; state++) {/* Retrieve the pinctrl-* property */ propname =kasprintf (GFP_KERNEL ,"pinctrl-%d" , state); +if (!propname) +return -ENOMEM ; prop =of_find_property (np, propname, &size);kfree (propname);if (!prop) {
drivers/platform/x86/hp-wmi.c +10 -2
@@ -880,8 +880,16 @@ static int __init hp_wmi_bios_setup(struct platform_device *device) wwan_rfkill =NULL ; rfkill2_count =0 ; -if (hp_wmi_rfkill_setup (device)) -hp_wmi_rfkill2_setup (device); +/* +* In pre-2009 BIOS, command 1Bh return 0x4 to indicate that +* BIOS no longer controls the power for the wireless +* devices. All features supported by this command will no +* longer be supported. +*/ +if (!hp_wmi_bios_2009_later ()) { +if (hp_wmi_rfkill_setup (device)) +hp_wmi_rfkill2_setup (device); + }return 0 ; }
drivers/platform/x86/intel_pmc_core_pltdrv.c +9 -0
@@ -18,6 +18,8 @@#include <asm/cpu_device_id.h> #include <asm/intel-family.h> +#include <xen/xen.h> +static void intel_pmc_core_release (struct device *dev) {/* Nothing to do. */
@@ -56,6 +58,13 @@ static int __init pmc_core_platform_init(void)if (acpi_dev_present ("INT33A1" ,NULL ,-1 ))return -ENODEV ; +/* +* Skip forcefully attaching the device for VMs. Make an exception for +* Xen dom0, which does have full hardware access. +*/ +if (cpu_feature_enabled (X86_FEATURE_HYPERVISOR ) && !xen_initial_domain ()) +return -ENODEV ; +if (!x86_match_cpu (intel_pmc_core_platform_ids))return -ENODEV ;
drivers/s390/scsi/zfcp_fsf.c +1 -1
@@ -755,7 +755,7 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *req)const bool is_srb =zfcp_fsf_req_is_status_read_buffer (req);struct zfcp_adapter *adapter = req->adapter;struct zfcp_qdio *qdio = adapter->qdio; -int req_id = req->req_id; +unsigned long req_id = req->req_id;zfcp_reqlist_add (adapter->req_list, req);
drivers/siox/siox-core.c +2 -0
@@ -835,6 +835,8 @@ static struct siox_device *siox_device_add(struct siox_master *smaster, err_device_register:/* don't care to make the buffer smaller again */ +put_device (&sdevice->dev); + sdevice =NULL ; err_buf_alloc:siox_master_unlock (smaster);
drivers/slimbus/stream.c +4 -4
@@ -67,10 +67,10 @@ static const int slim_presence_rate_table[] = {384000 ,768000 ,0 ,/* Reserved */ -110250 , -220500 , -441000 , -882000 , +11025 , +22050 , +44100 , +88200 ,176400 ,352800 , 705600,
drivers/spi/spi-stm32.c +1 -0
@@ -937,6 +937,7 @@ static irqreturn_t stm32h7_spi_irq_thread(int irq, void *dev_id) static DEFINE_RATELIMIT_STATE(rs, DEFAULT_RATELIMIT_INTERVAL * 10, 1); +ratelimit_set_flags (&rs,RATELIMIT_MSG_ON_RELEASE );if (__ratelimit (&rs))dev_dbg_ratelimited (spi->dev,"Communication suspended\n" );if (!spi->cur_usedma && (spi->rx_buf && (spi->rx_len >0 )))
drivers/staging/speakup/main.c +1 -1
@@ -1781,7 +1781,7 @@ static void speakup_con_update(struct vc_data *vc) {unsigned long flags; -if (!speakup_console[vc->vc_num] || spk_parked) +if (!speakup_console[vc->vc_num] || spk_parked || !synth)return ;if (!spin_trylock_irqsave (&speakup_info.spinlock, flags))/* Speakup output, discard */
drivers/target/loopback/tcm_loop.c +2 -1
@@ -394,6 +394,7 @@ static int tcm_loop_setup_hba_bus(struct tcm_loop_hba *tl_hba, int tcm_loop_host ret =device_register (&tl_hba->dev);if (ret) {pr_err ("device_register() failed for tl_hba->dev: %d\n" , ret); +put_device (&tl_hba->dev);return -ENODEV ; }
@@ -1072,7 +1073,7 @@ static struct se_wwn *tcm_loop_make_scsi_hba(*/ ret =tcm_loop_setup_hba_bus (tl_hba, tcm_loop_hba_no_cnt);if (ret) - goto out; +return ERR_PTR (ret); sh = tl_hba->sh; tcm_loop_hba_no_cnt++;
drivers/tty/n_gsm.c +1 -1
@@ -1413,7 +1413,7 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm, unsigned int command, u8 *data, int clen) { struct gsm_control *ctrl = kzalloc(sizeof(struct gsm_control), -GFP_KERNEL ); +GFP_ATOMIC );unsigned long flags;if (ctrl ==NULL )return NULL ;
drivers/tty/serial/8250/8250_lpss.c +11 -4
@@ -258,8 +258,13 @@ static int lpss8250_dma_setup(struct lpss8250 *lpss, struct uart_8250_port *portstruct dw_dma_slave *rx_param, *tx_param;struct device *dev = port->port.dev; -if (!lpss->dma_param.dma_dev) +if (!lpss->dma_param.dma_dev) { + dma = port->dma; +if (dma) + goto out_configuration_only; +return 0 ; + } rx_param =devm_kzalloc (dev,sizeof (*rx_param),GFP_KERNEL );if (!rx_param)
@@ -270,16 +275,18 @@ static int lpss8250_dma_setup(struct lpss8250 *lpss, struct uart_8250_port *portreturn -ENOMEM ; *rx_param = lpss->dma_param; - dma->rxconf.src_maxburst = lpss->dma_maxburst; - *tx_param = lpss->dma_param; - dma->txconf.dst_maxburst = lpss->dma_maxburst; dma->fn = lpss8250_dma_filter; dma->rx_param = rx_param; dma->tx_param = tx_param; port->dma = dma; + +out_configuration_only: + dma->rxconf.src_maxburst = lpss->dma_maxburst; + dma->txconf.dst_maxburst = lpss->dma_maxburst; +return 0 ; }
drivers/tty/serial/8250/8250_omap.c +6 -17
@@ -169,27 +169,10 @@ static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl)static void omap_8250_mdr1_errataset (struct uart_8250_port *up,struct omap8250_priv *priv) { -u8 timeout =255 ; -serial_out (up,UART_OMAP_MDR1 , priv->mdr1);udelay (2 );serial_out (up,UART_FCR , up->fcr |UART_FCR_CLEAR_XMIT |UART_FCR_CLEAR_RCVR ); -/* -* Wait for FIFO to empty: when empty, RX_FIFO_E bit is 0 and -* TX_FIFO_E bit is 1. -*/ -while (UART_LSR_THRE != (serial_in (up,UART_LSR ) & - (UART_LSR_THRE |UART_LSR_DR ))) { - timeout--; -if (!timeout) { -/* Should *never* happen. we warn and carry on */ -dev_crit (up->port.dev,"Errata i202: timedout %x\n" , -serial_in (up,UART_LSR )); -break ; - } -udelay (1 ); - } } static void omap_8250_get_divisor(struct uart_port *port, unsigned int baud,
@@ -1290,9 +1273,15 @@ static int omap8250_probe(struct platform_device *pdev)static int omap8250_remove (struct platform_device *pdev) {struct omap8250_priv *priv =platform_get_drvdata (pdev); +int err; + + err =pm_runtime_resume_and_get (&pdev->dev); +if (err) +return err;pm_runtime_dont_use_autosuspend (&pdev->dev);pm_runtime_put_sync (&pdev->dev); +flush_work (&priv->qos_work);pm_runtime_disable (&pdev->dev);serial8250_unregister_port (priv->line);pm_qos_remove_request (&priv->pm_qos_request);
drivers/tty/serial/8250/8250_port.c +5 -2
@@ -1820,10 +1820,13 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status);static bool handle_rx_dma (struct uart_8250_port *up,unsigned int iir) {switch (iir &0x3f ) { +case UART_IIR_RDI : +if (!up->dma->rx_running) +break ; + fallthrough; +case UART_IIR_RLSI :case UART_IIR_RX_TIMEOUT :serial8250_rx_dma_flush (up); -/* fall-through */ -case UART_IIR_RLSI :return true; }return up->dma->rx_dma (up);
drivers/tty/serial/imx.c +1 -0
@@ -2551,6 +2551,7 @@ static const struct dev_pm_ops imx_uart_pm_ops = { .suspend_noirq = imx_uart_suspend_noirq, .resume_noirq = imx_uart_resume_noirq, .freeze_noirq = imx_uart_suspend_noirq, + .thaw_noirq = imx_uart_resume_noirq, .restore_noirq = imx_uart_resume_noirq, .suspend = imx_uart_suspend, .resume = imx_uart_resume,
drivers/usb/chipidea/otg_fsm.c +2 -0
@@ -256,8 +256,10 @@ static void ci_otg_del_timer(struct ci_hdrc *ci, enum otg_fsm_timer t) ci->enabled_otg_timer_bits &= ~(1 << t);if (ci->next_otg_timer == t) {if (ci->enabled_otg_timer_bits ==0 ) { +spin_unlock_irqrestore (&ci->lock, flags);/* No enabled timers after delete it */ hrtimer_cancel (&ci->otg_fsm_hrtimer); +spin_lock_irqsave (&ci->lock, flags); ci->next_otg_timer =NUM_OTG_FSM_TIMERS ; }else {/* Find the next timer */
drivers/usb/core/quirks.c +3 -0
@@ -362,6 +362,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x0781, 0x5583), .driver_info = USB_QUIRK_NO_LPM }, { USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM }, + /* Realforce 87U Keyboard */ + { USB_DEVICE(0x0853, 0x011b), .driver_info = USB_QUIRK_NO_LPM }, + /* M-Systems Flash Disk Pioneers */ { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
drivers/usb/dwc3/host.c +0 -10
@@ -9,13 +9,8 @@#include <linux/platform_device.h> -#include "../host/xhci-plat.h" #include "core.h" -static const struct xhci_plat_priv dwc3_xhci_plat_priv = { - .quirks =XHCI_SKIP_PHY_INIT , -}; -static int dwc3_host_get_irq (struct dwc3 *dwc) {struct platform_device *dwc3_pdev =to_platform_device (dwc->dev);
@@ -90,11 +85,6 @@ int dwc3_host_init(struct dwc3 *dwc) goto err; } - ret =platform_device_add_data (xhci, &dwc3_xhci_plat_priv, -sizeof (dwc3_xhci_plat_priv)); -if (ret) - goto err; -memset (props,0 ,sizeof (struct property_entry ) *ARRAY_SIZE (props));if (dwc->usb3_lpm_capable)
drivers/usb/serial/option.c +17 -2
@@ -162,6 +162,8 @@ static void option_instat_callback(struct urb *urb);#define NOVATELWIRELESS_PRODUCT_G2 0xA010#define NOVATELWIRELESS_PRODUCT_MC551 0xB001 +#define UBLOX_VENDOR_ID 0x1546 +/* AMOI PRODUCTS */ #define AMOI_VENDOR_ID 0x1614#define AMOI_PRODUCT_H01 0x0800
@@ -240,7 +242,6 @@ static void option_instat_callback(struct urb *urb);#define QUECTEL_PRODUCT_UC15 0x9090/* These u-blox products use Qualcomm's vendor ID */ #define UBLOX_PRODUCT_R410M 0x90b2 -#define UBLOX_PRODUCT_R6XX 0x90fa/* These Yuga products use Qualcomm's vendor ID */ #define YUGA_PRODUCT_CLM920_NC5 0x9625
@@ -581,6 +582,9 @@ static void option_instat_callback(struct urb *urb);#define OPPO_VENDOR_ID 0x22d9#define OPPO_PRODUCT_R11 0x276c +/* Sierra Wireless products */ +#define SIERRA_VENDOR_ID 0x1199 +#define SIERRA_PRODUCT_EM9191 0x90d3/* Device flags */
@@ -1124,8 +1128,16 @@ static const struct usb_device_id option_ids[] = {/* u-blox products using Qualcomm vendor ID */ { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M), .driver_info = RSVD(1) | RSVD(3) }, - { USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R6XX), + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x908b), /* u-blox LARA-R6 00B */ + .driver_info = RSVD(4) }, + { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x90fa), .driver_info = RSVD(3) }, +/* u-blox products */ + { USB_DEVICE(UBLOX_VENDOR_ID, 0x1341) }, /* u-blox LARA-L6 */ + { USB_DEVICE(UBLOX_VENDOR_ID, 0x1342), /* u-blox LARA-L6 (RMNET) */ + .driver_info = RSVD(4) }, + { USB_DEVICE(UBLOX_VENDOR_ID, 0x1343), /* u-blox LARA-L6 (ECM) */ + .driver_info = RSVD(4) },/* Quectel products using Quectel vendor ID */ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21, 0xff, 0xff, 0xff), .driver_info = NUMEP2 },
@@ -2167,6 +2179,7 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x010a, 0xff) }, /* Fibocom MA510 (ECM mode) */ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) }, /* Fibocom FG150 Diag */ { USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) }, /* Fibocom FG150 AT */ + { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0111, 0xff) }, /* Fibocom FM160 (MBIM mode) */ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) }, /* Fibocom NL668-AM/NL652-EU (laptop MBIM) */ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a2, 0xff) }, /* Fibocom FM101-GL (laptop MBIM) */ { USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a4, 0xff), /* Fibocom FM101-GL (laptop MBIM) */
@@ -2176,6 +2189,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */ { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) }, + { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) }, { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
drivers/xen/pcpu.c +1 -1
@@ -228,7 +228,7 @@ static int register_pcpu(struct pcpu *pcpu) err =device_register (dev);if (err) { -pcpu_release (dev); +put_device (dev);return err; }
fs/btrfs/tests/btrfs-tests.c +1 -1
@@ -189,7 +189,7 @@ void btrfs_free_dummy_fs_info(struct btrfs_fs_info *fs_info)void btrfs_free_dummy_root (struct btrfs_root *root) { -if (!root) +if (IS_ERR_OR_NULL (root))return ;/* Will be freed by btrfs_free_fs_roots */ if (WARN_ON (test_bit (BTRFS_ROOT_IN_RADIX , &root->state)))
fs/btrfs/tests/qgroup-tests.c +4 -12
@@ -230,7 +230,6 @@ static int test_no_shared_qgroup(struct btrfs_root *root, ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &old_roots, false);if (ret) { -ulist_free (old_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -246,7 +245,6 @@ static int test_no_shared_qgroup(struct btrfs_root *root, false);if (ret) {ulist_free (old_roots); -ulist_free (new_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -258,18 +256,19 @@ static int test_no_shared_qgroup(struct btrfs_root *root,return ret; } +/* btrfs_qgroup_account_extent() always frees the ulists passed to it. */ + old_roots =NULL ; + new_roots =NULL ; +if (btrfs_verify_qgroup_counts (fs_info,BTRFS_FS_TREE_OBJECTID , nodesize, nodesize)) {test_err ("qgroup counts didn't match expected values" );return -EINVAL ; } - old_roots =NULL ; - new_roots =NULL ; ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &old_roots, false);if (ret) { -ulist_free (old_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -284,7 +283,6 @@ static int test_no_shared_qgroup(struct btrfs_root *root, false);if (ret) {ulist_free (old_roots); -ulist_free (new_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -335,7 +333,6 @@ static int test_multiple_refs(struct btrfs_root *root, ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &old_roots, false);if (ret) { -ulist_free (old_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -351,7 +348,6 @@ static int test_multiple_refs(struct btrfs_root *root, false);if (ret) {ulist_free (old_roots); -ulist_free (new_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -372,7 +368,6 @@ static int test_multiple_refs(struct btrfs_root *root, ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &old_roots, false);if (ret) { -ulist_free (old_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -388,7 +383,6 @@ static int test_multiple_refs(struct btrfs_root *root, false);if (ret) {ulist_free (old_roots); -ulist_free (new_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -415,7 +409,6 @@ static int test_multiple_refs(struct btrfs_root *root, ret =btrfs_find_all_roots (&trans, fs_info, nodesize,0 , &old_roots, false);if (ret) { -ulist_free (old_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
@@ -431,7 +424,6 @@ static int test_multiple_refs(struct btrfs_root *root, false);if (ret) {ulist_free (old_roots); -ulist_free (new_roots);test_err ("couldn't find old roots: %d" , ret);return ret; }
fs/buffer.c +2 -2
@@ -2318,7 +2318,7 @@ int generic_cont_expand_simple(struct inode *inode, loff_t size) {struct address_space *mapping = inode->i_mapping;struct page *page; -void *fsdata; +void *fsdata =NULL ;int err; err =inode_newsize_ok (inode, size);
@@ -2344,7 +2344,7 @@ static int cont_expand_zero(struct file *file, struct address_space *mapping,struct inode *inode = mapping->host;unsigned int blocksize =i_blocksize (inode);struct page *page; -void *fsdata; +void *fsdata =NULL ;pgoff_t index, curidx;loff_t curpos;unsigned zerofrom, offset, len;
fs/cifs/ioctl.c +2 -2
@@ -191,7 +191,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) rc =put_user (ExtAttrBits &FS_FL_USER_VISIBLE , (int __user *)arg); -if (rc !=EOPNOTSUPP ) +if (rc != -EOPNOTSUPP ) break; }#endif /* CONFIG_CIFS_POSIX */
@@ -220,7 +220,7 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg)* pSMBFile->fid.netfid, * extAttrBits, * &ExtAttrMask); -* if (rc != EOPNOTSUPP) +* if (rc != -EOPNOTSUPP) * break; */
fs/cifs/smb2ops.c +2 -0
@@ -1216,6 +1216,8 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,COMPOUND_FID , current->tgid,FILE_FULL_EA_INFORMATION , SMB2_O_INFO_FILE, 0, data, size); +if (rc) + goto sea_exit;smb2_set_next_command (tcon, &rqst[1 ]);smb2_set_related (&rqst[1 ]);
fs/gfs2/ops_fstype.c +11 -6
@@ -180,7 +180,10 @@ static int gfs2_check_sb(struct gfs2_sbd *sdp, int silent)pr_warn ("Invalid superblock size\n" );return -EINVAL ; } - +if (sb->sb_bsize_shift !=ffs (sb->sb_bsize) -1 ) { +pr_warn ("Invalid block size shift\n" ); +return -EINVAL ; + }return 0 ; }
@@ -377,8 +380,10 @@ static int init_names(struct gfs2_sbd *sdp, int silent)if (!table[0 ]) table = sdp->sd_vfs->s_id; -strlcpy (sdp->sd_proto_name, proto,GFS2_FSNAME_LEN ); -strlcpy (sdp->sd_table_name, table,GFS2_FSNAME_LEN ); +BUILD_BUG_ON (GFS2_LOCKNAME_LEN >GFS2_FSNAME_LEN ); + +strscpy (sdp->sd_proto_name, proto,GFS2_LOCKNAME_LEN ); +strscpy (sdp->sd_table_name, table,GFS2_LOCKNAME_LEN ); table = sdp->sd_table_name;while ((table =strchr (table,'/' )))
@@ -1349,13 +1354,13 @@ static int gfs2_parse_param(struct fs_context *fc, struct fs_parameter *param)switch (o) {case Opt_lockproto: -strlcpy (args->ar_lockproto, param->string,GFS2_LOCKNAME_LEN ); +strscpy (args->ar_lockproto, param->string,GFS2_LOCKNAME_LEN );break ;case Opt_locktable: -strlcpy (args->ar_locktable, param->string,GFS2_LOCKNAME_LEN ); +strscpy (args->ar_locktable, param->string,GFS2_LOCKNAME_LEN );break ;case Opt_hostdata: -strlcpy (args->ar_hostdata, param->string,GFS2_LOCKNAME_LEN ); +strscpy (args->ar_hostdata, param->string,GFS2_LOCKNAME_LEN );break ;case Opt_spectator: args->ar_spectator =1 ;
fs/namei.c +1 -1
@@ -4819,7 +4819,7 @@ int __page_symlink(struct inode *inode, const char *symname, int len, int nofs) {struct address_space *mapping = inode->i_mapping;struct page *page; -void *fsdata; +void *fsdata =NULL ;int err;unsigned int flags =0 ;if (nofs)
fs/nfs/nfs4proc.c +4 -2
@@ -6854,6 +6854,7 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) {struct nfs4_lockdata *data = calldata;struct nfs4_lock_state *lsp = data->lsp; +struct nfs_server *server =NFS_SERVER (d_inode (data->ctx->dentry));dprintk ("%s: begin!\n" , __func__);
@@ -6863,8 +6864,7 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata) data->rpc_status = task->tk_status;switch (task->tk_status) {case 0 : -renew_lease (NFS_SERVER (d_inode (data->ctx->dentry)), - data->timestamp); +renew_lease (server, data->timestamp);if (data->arg.new_lock && !data->cancelled) { data->fl.fl_flags &= ~(FL_SLEEP |FL_ACCESS );if (locks_lock_inode_wait (lsp->ls_state->inode, &data->fl) <0 )
@@ -6885,6 +6885,8 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata)if (!nfs4_stateid_match (&data->arg.open_stateid, &lsp->ls_state->open_stateid)) goto out_restart; +else if (nfs4_async_handle_error (task, server, lsp->ls_state,NULL ) == -EAGAIN ) + goto out_restart; }else if (!nfs4_stateid_match (&data->arg.lock_stateid, &lsp->ls_stateid)) goto out_restart;
fs/nilfs2/segment.c +8 -7
@@ -322,7 +322,7 @@ void nilfs_relax_pressure_in_lock(struct super_block *sb)struct the_nilfs *nilfs = sb->s_fs_info;struct nilfs_sc_info *sci = nilfs->ns_writer; -if (!sci || !sci->sc_flush_request) +if (sb_rdonly (sb) ||unlikely (!sci) || !sci->sc_flush_request)return ;set_bit (NILFS_SC_PRIOR_FLUSH , &sci->sc_flags);
@@ -2243,7 +2243,7 @@ int nilfs_construct_segment(struct super_block *sb)struct nilfs_transaction_info *ti;int err; -if (!sci) +if (sb_rdonly (sb) ||unlikely (!sci))return -EROFS ;/* A call inside transactions causes a deadlock. */
@@ -2282,7 +2282,7 @@ int nilfs_construct_dsync_segment(struct super_block *sb, struct inode *inode,struct nilfs_transaction_info ti;int err =0 ; -if (!sci) +if (sb_rdonly (sb) ||unlikely (!sci))return -EROFS ;nilfs_transaction_lock (sb, &ti,0 );
@@ -2778,11 +2778,12 @@ int nilfs_attach_log_writer(struct super_block *sb, struct nilfs_root *root)if (nilfs->ns_writer) {/* -* This happens if the filesystem was remounted -* read/write after nilfs_error degenerated it into a -* read-only mount. +* This happens if the filesystem is made read-only by +* __nilfs_error or nilfs_remount and then remounted +* read/write. In these cases, reuse the existing +* writer. */ -nilfs_detach_log_writer (sb); +return 0 ; } nilfs->ns_writer =nilfs_segctor_new (sb, root);
fs/nilfs2/super.c +0 -2
@@ -1131,8 +1131,6 @@ static int nilfs_remount(struct super_block *sb, int *flags, char *data)if ((bool )(*flags &SB_RDONLY ) ==sb_rdonly (sb)) goto out;if (*flags &SB_RDONLY ) { -/* Shutting down log writer */ -nilfs_detach_log_writer (sb); sb->s_flags |=SB_RDONLY ;/*
fs/nilfs2/the_nilfs.c +0 -2
@@ -695,9 +695,7 @@ int nilfs_count_free_blocks(struct the_nilfs *nilfs, sector_t *nblocks) {unsigned long ncleansegs; -down_read (&NILFS_MDT (nilfs->ns_dat)->mi_sem); ncleansegs =nilfs_sufile_get_ncleansegs (nilfs->ns_sufile); -up_read (&NILFS_MDT (nilfs->ns_dat)->mi_sem); *nblocks = (sector_t )ncleansegs * nilfs->ns_blocks_per_segment;return 0 ; }
fs/ntfs/attrib.c +24 -4
@@ -594,17 +594,37 @@ static int ntfs_attr_find(const ATTR_TYPE type, const ntfschar *name,for (;; a = (ATTR_RECORD *)((u8 *)a +le32_to_cpu (a->length))) {u8 *mrec_end = (u8 *)ctx->mrec +le32_to_cpu (ctx->mrec->bytes_allocated); -u8 *name_end = (u8 *)a +le16_to_cpu (a->name_offset) + - a->name_length *sizeof (ntfschar); -if ((u8 *)a < (u8 *)ctx->mrec || (u8 *)a > mrec_end || - name_end > mrec_end) +u8 *name_end; + +/* check whether ATTR_RECORD wrap */ +if ((u8 *)a < (u8 *)ctx->mrec) +break ; + +/* check whether Attribute Record Header is within bounds */ +if ((u8 *)a > mrec_end || + (u8 *)a +sizeof (ATTR_RECORD ) > mrec_end) +break ; + +/* check whether ATTR_RECORD's name is within bounds */ + name_end = (u8 *)a +le16_to_cpu (a->name_offset) + + a->name_length *sizeof (ntfschar); +if (name_end > mrec_end)break ; + ctx->attr = a;if (unlikely (le32_to_cpu (a->type) >le32_to_cpu (type) || a->type ==AT_END ))return -ENOENT ;if (unlikely (!a->length))break ; + +/* check whether ATTR_RECORD's length wrap */ +if ((u8 *)a +le32_to_cpu (a->length) < (u8 *)a) +break ; +/* check whether ATTR_RECORD's length is within bounds */ +if ((u8 *)a +le32_to_cpu (a->length) > mrec_end) +break ; +if (a->type != type)continue ;/*
fs/ntfs/inode.c +7 -0
@@ -1829,6 +1829,13 @@ int ntfs_read_inode_mount(struct inode *vi) goto err_out; } +/* Sanity check offset to the first attribute */ +if (le16_to_cpu (m->attrs_offset) >=le32_to_cpu (m->bytes_allocated)) { +ntfs_error (sb,"Incorrect mft offset to the first attribute %u in superblock." , +le16_to_cpu (m->attrs_offset)); + goto err_out; + } +/* Need this to sanity check attribute list references to $MFT. */ vi->i_generation = ni->seq_no =le16_to_cpu (m->sequence_number);
fs/udf/namei.c +1 -1
@@ -241,7 +241,7 @@ static struct fileIdentDesc *udf_find_entry(struct inode *dir, poffset - lfi); else {if (!copy_name) { - copy_name =kmalloc (UDF_NAME_LEN , + copy_name =kmalloc (UDF_NAME_LEN_CS0 ,GFP_NOFS );if (!copy_name) { fi =ERR_PTR (-ENOMEM );
fs/xfs/libxfs/xfs_bmap.h +10 -5
@@ -158,17 +158,22 @@ static inline int xfs_bmapi_whichfork(int bmapi_flags) { BMAP_ATTRFORK, "ATTR" }, \ { BMAP_COWFORK, "COW" } +/* Return true if the extent is an allocated extent, written or not. */ +static inline bool xfs_bmap_is_real_extent (struct xfs_bmbt_irec *irec) +{ +return irec->br_startblock !=HOLESTARTBLOCK && + irec->br_startblock !=DELAYSTARTBLOCK && + !isnullstartblock (irec->br_startblock); +}/* * Return true if the extent is a real, allocated extent, or false if it is a * delayed allocation, and unwritten extent or a hole. */ -static inline bool xfs_bmap_is_real_extent (struct xfs_bmbt_irec *irec) +static inline bool xfs_bmap_is_written_extent (struct xfs_bmbt_irec *irec) { -return irec->br_state !=XFS_EXT_UNWRITTEN && - irec->br_startblock !=HOLESTARTBLOCK && - irec->br_startblock !=DELAYSTARTBLOCK && - !isnullstartblock (irec->br_startblock); +return xfs_bmap_is_real_extent (irec) && + irec->br_state !=XFS_EXT_UNWRITTEN ; }/*
fs/xfs/libxfs/xfs_rtbitmap.c +1 -1
@@ -70,7 +70,7 @@ xfs_rtbuf_get(if (error)return error; -if (nmap ==0 || !xfs_bmap_is_real_extent (&map)) { +if (nmap ==0 || !xfs_bmap_is_written_extent (&map)) {XFS_ERROR_REPORT (__func__,XFS_ERRLEVEL_LOW , mp);return -EFSCORRUPTED ; }
fs/xfs/libxfs/xfs_shared.h +1 -0
@@ -65,6 +65,7 @@ void xfs_log_get_max_trans_res(struct xfs_mount *mp,#define XFS_TRANS_DQ_DIRTY 0x10/* at least one dquot in trx dirty */ #define XFS_TRANS_RESERVE 0x20/* OK to use reserved data blocks */ #define XFS_TRANS_NO_WRITECOUNT 0x40/* do not elevate SB writecount */ +#define XFS_TRANS_RES_FDBLKS 0x80/* reserve newly freed blocks */ /* * LOWMODE is used by the allocator to activate the lowspace algorithm - when * free space is running low the extent allocator may choose to allocate an
fs/xfs/xfs_bmap_util.c +9 -9
@@ -1740,6 +1740,7 @@ xfs_swap_extents(int lock_flags;uint64_t f;int resblks =0 ; +unsigned int flags =0 ;/* * Lock the inodes against other IO, page faults and truncate to
@@ -1795,17 +1796,16 @@ xfs_swap_extents( resblks +=XFS_SWAP_RMAP_SPACE_RES (mp, tipnext, w);/* -* Handle the corner case where either inode might straddle the -* btree format boundary. If so, the inode could bounce between -* btree <-> extent format on unmap -> remap cycles, freeing and -* allocating a bmapbt block each time. +* If either inode straddles a bmapbt block allocation boundary, +* the rmapbt algorithm triggers repeated allocs and frees as +* extents are remapped. This can exhaust the block reservation +* prematurely and cause shutdown. Return freed blocks to the +* transaction reservation to counter this behavior. */ -if (ipnext == (XFS_IFORK_MAXEXT (ip, w) +1 )) - resblks +=XFS_IFORK_MAXEXT (ip, w); -if (tipnext == (XFS_IFORK_MAXEXT (tip, w) +1 )) - resblks +=XFS_IFORK_MAXEXT (tip, w); + flags |=XFS_TRANS_RES_FDBLKS ; } - error =xfs_trans_alloc (mp, &M_RES (mp)->tr_write, resblks,0 ,0 , &tp); + error =xfs_trans_alloc (mp, &M_RES (mp)->tr_write, resblks,0 , flags, + &tp);if (error) goto out_unlock;
fs/xfs/xfs_file.c +14 -1
@@ -1267,10 +1267,23 @@ xfs_filemap_pfn_mkwrite(return __xfs_filemap_fault (vmf,PE_SIZE_PTE , true); } +static void +xfs_filemap_map_pages ( +struct vm_fault *vmf, +pgoff_t start_pgoff, +pgoff_t end_pgoff) +{ +struct inode *inode =file_inode (vmf->vma->vm_file); + +xfs_ilock (XFS_I (inode),XFS_MMAPLOCK_SHARED ); +filemap_map_pages (vmf, start_pgoff, end_pgoff); +xfs_iunlock (XFS_I (inode),XFS_MMAPLOCK_SHARED ); +} +static const struct vm_operations_struct xfs_file_vm_ops = { .fault = xfs_filemap_fault, .huge_fault = xfs_filemap_huge_fault, - .map_pages = filemap_map_pages, + .map_pages = xfs_filemap_map_pages, .page_mkwrite = xfs_filemap_page_mkwrite, .pfn_mkwrite = xfs_filemap_pfn_mkwrite, };
fs/xfs/xfs_reflink.c +132 -112
339 lines not on this page · raw message
fs/xfs/xfs_super.c +4 -0
@@ -1228,6 +1228,10 @@ xfs_fs_remount(char *p;int error; +/* version 5 superblocks always support version counters. */ +if (XFS_SB_VERSION_NUM (&mp->m_sb) ==XFS_SB_VERSION_5 ) + *flags |=SB_I_VERSION ; +/* First, check for complete junk; i.e. invalid options */ error =xfs_test_remount_options (sb, options);if (error)
fs/xfs/xfs_trace.h +3 -49
70 lines not on this page · raw message
fs/xfs/xfs_trans.c +18 -1
@@ -107,7 +107,8 @@ xfs_trans_dup( ntp->t_flags =XFS_TRANS_PERM_LOG_RES | (tp->t_flags &XFS_TRANS_RESERVE ) | - (tp->t_flags &XFS_TRANS_NO_WRITECOUNT ); + (tp->t_flags &XFS_TRANS_NO_WRITECOUNT ) | + (tp->t_flags &XFS_TRANS_RES_FDBLKS );/* We gave our writer reference to the new transaction */ tp->t_flags |=XFS_TRANS_NO_WRITECOUNT ; ntp->t_ticket =xfs_log_ticket_get (tp->t_ticket);
@@ -273,6 +274,8 @@ xfs_trans_alloc(*/ WARN_ON (resp->tr_logres >0 && mp->m_super->s_writers.frozen ==SB_FREEZE_COMPLETE ); +ASSERT (!(flags &XFS_TRANS_RES_FDBLKS ) || +xfs_sb_version_haslazysbcount (&mp->m_sb));atomic_inc (&mp->m_active_trans); tp->t_magic =XFS_TRANS_HEADER_MAGIC ;
@@ -368,6 +371,20 @@ xfs_trans_mod_sb( tp->t_blk_res_used += (uint)-delta;if (tp->t_blk_res_used > tp->t_blk_res)xfs_force_shutdown (mp,SHUTDOWN_CORRUPT_INCORE ); + }else if (delta >0 && (tp->t_flags &XFS_TRANS_RES_FDBLKS )) { +int64_t blkres_delta; + +/* +* Return freed blocks directly to the reservation +* instead of the global pool, being careful not to +* overflow the trans counter. This is used to preserve +* reservation across chains of transaction rolls that +* repeatedly free and allocate blocks. +*/ + blkres_delta =min_t (int64_t, delta, +UINT_MAX - tp->t_blk_res); + tp->t_blk_res += blkres_delta; + delta -= blkres_delta; } tp->t_fdblocks_delta += delta;if (xfs_sb_version_haslazysbcount (&mp->m_sb))
fs/xfs/xfs_trans_ail.c +6 -10
@@ -402,16 +402,10 @@ xfsaild_push( target = ailp->ail_target; ailp->ail_target_prev = target; +/* we're done if the AIL is empty or our push has reached the end */ lip =xfs_trans_ail_cursor_first (ailp, &cur, ailp->ail_last_pushed_lsn); -if (!lip) { -/* -* If the AIL is empty or our push has reached the end we are -* done now. -*/ -xfs_trans_ail_cursor_done (&cur); -spin_unlock (&ailp->ail_lock); +if (!lip) goto out_done; - }XFS_STATS_INC (mp, xs_push_ail);
@@ -493,6 +487,8 @@ xfsaild_push(break ; lsn = lip->li_lsn; } + +out_done:xfs_trans_ail_cursor_done (&cur);spin_unlock (&ailp->ail_lock);
@@ -500,7 +496,6 @@ xfsaild_push( ailp->ail_log_flush++;if (!count ||XFS_LSN_CMP (lsn, target) >=0 ) { -out_done:/* * We reached the target or the AIL is empty, so wait a bit * longer for I/O to complete and remove pushed items from the
@@ -592,7 +587,8 @@ xfsaild(*/ smp_rmb ();if (!xfs_ail_min (ailp) && - ailp->ail_target == ailp->ail_target_prev) { + ailp->ail_target == ailp->ail_target_prev && +list_empty (&ailp->ail_buf_list)) {spin_unlock (&ailp->ail_lock);freezable_schedule (); tout =0 ;
include/asm-generic/vmlinux.lds.h +1 -1
@@ -273,6 +273,7 @@#define DATA_DATA \ *(.xiptext) \ *(DATA_MAIN) \ + *(.data..decrypted) \ *(.ref.data) \ *(.data..shared_aligned)/* percpu related */ \ MEM_KEEP(init.data*) \
@@ -883,7 +884,6 @@#ifdef CONFIG_AMD_MEM_ENCRYPT #define PERCPU_DECRYPTED_SECTION \ . = ALIGN(PAGE_SIZE); \ - *(.data..decrypted) \ *(.data..percpu..decrypted) \ . = ALIGN(PAGE_SIZE);#else
include/uapi/linux/capability.h +1 -1
@@ -376,7 +376,7 @@ struct vfs_ns_cap_data {*/ #define CAP_TO_INDEX (x) ((x) >> 5)/* 1 << 5 == bits in __u32 */ -#define CAP_TO_MASK (x) (1 << ((x) & 31))/* mask for indexed __u32 */ +#define CAP_TO_MASK (x) (1U << ((x) & 31))/* mask for indexed __u32 */ #endif /* _UAPI_LINUX_CAPABILITY_H */
kernel/kprobes.c +7 -1
@@ -1792,7 +1792,13 @@ static int __unregister_kprobe_top(struct kprobe *p)if ((list_p != p) && (list_p->post_handler)) goto noclean; } - ap->post_handler =NULL ; +/* +* For the kprobe-on-ftrace case, we keep the +* post_handler setting to identify this aggrprobe +* armed with kprobe_ipmodify_ops. +*/ +if (!kprobe_ftrace (ap)) + ap->post_handler =NULL ; } noclean:/*
kernel/trace/ftrace.c +3 -2
@@ -1307,6 +1307,7 @@ static int ftrace_add_mod(struct trace_array *tr,if (!ftrace_mod)return -ENOMEM ; +INIT_LIST_HEAD (&ftrace_mod->list); ftrace_mod->func =kstrdup (func,GFP_KERNEL ); ftrace_mod->module =kstrdup (module,GFP_KERNEL ); ftrace_mod->enable = enable;
@@ -3017,7 +3018,7 @@ static int ftrace_allocate_records(struct ftrace_page *pg, int count)/* if we can't allocate this size, try something smaller */ if (!order)return -ENOMEM ; - order >>=1 ; + order--; goto again; }
@@ -6259,7 +6260,7 @@ void __init ftrace_init(void) }pr_info ("ftrace: allocating %ld entries in %ld pages\n" , - count, count /ENTRIES_PER_PAGE +1 ); + count,DIV_ROUND_UP (count,ENTRIES_PER_PAGE )); last_ftrace_enabled = ftrace_enabled =1 ;
kernel/trace/ring_buffer.c +14 -2
@@ -477,6 +477,7 @@ struct ring_buffer_per_cpu {local_t committing;local_t commits;local_t pages_touched; +local_t pages_lost;local_t pages_read;long last_pages_touch;size_t shortest_full;
@@ -544,10 +545,18 @@ size_t ring_buffer_nr_pages(struct ring_buffer *buffer, int cpu)size_t ring_buffer_nr_dirty_pages (struct ring_buffer *buffer,int cpu) {size_t read; +size_t lost;size_t cnt; read =local_read (&buffer->buffers[cpu]->pages_read); + lost =local_read (&buffer->buffers[cpu]->pages_lost); cnt =local_read (&buffer->buffers[cpu]->pages_touched); + +if (WARN_ON_ONCE (cnt < lost)) +return 0 ; + + cnt -= lost; +/* The reader can read an empty page, but not more than that */ if (cnt < read) {WARN_ON_ONCE (read > cnt +1 );
@@ -1362,9 +1371,9 @@ static void rb_free_cpu_buffer(struct ring_buffer_per_cpu *cpu_buffer)free_buffer_page (cpu_buffer->reader_page); -rb_head_page_deactivate (cpu_buffer); -if (head) { +rb_head_page_deactivate (cpu_buffer); +list_for_each_entry_safe (bpage, tmp, head, list) {list_del_init (&bpage->list);free_buffer_page (bpage);
@@ -1599,6 +1608,7 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned long nr_pages)*/ local_add (page_entries, &cpu_buffer->overrun);local_sub (BUF_PAGE_SIZE , &cpu_buffer->entries_bytes); +local_inc (&cpu_buffer->pages_lost); }/*
@@ -2023,6 +2033,7 @@ rb_handle_head_page(struct ring_buffer_per_cpu *cpu_buffer,*/ local_add (entries, &cpu_buffer->overrun);local_sub (BUF_PAGE_SIZE , &cpu_buffer->entries_bytes); +local_inc (&cpu_buffer->pages_lost);/* * The entries will be zeroed out when we move the
@@ -4475,6 +4486,7 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer)local_set (&cpu_buffer->committing,0 );local_set (&cpu_buffer->commits,0 );local_set (&cpu_buffer->pages_touched,0 ); +local_set (&cpu_buffer->pages_lost,0 );local_set (&cpu_buffer->pages_read,0 ); cpu_buffer->last_pages_touch =0 ; cpu_buffer->shortest_full =0 ;
mm/filemap.c +1 -1
@@ -3281,7 +3281,7 @@ ssize_t generic_perform_write(struct file *file,unsigned long offset;/* Offset into pagecache page */ unsigned long bytes;/* Bytes to write to page */ size_t copied;/* Bytes copied from user */ -void *fsdata; +void *fsdata =NULL ; offset = (pos & (PAGE_SIZE -1 )); bytes = min_t(unsigned long, PAGE_SIZE - offset,
net/9p/trans_fd.c +5 -1
@@ -205,6 +205,8 @@ static void p9_conn_cancel(struct p9_conn *m, int err)list_move (&req->req_list, &cancel_list); } +spin_unlock (&m->client->lock); +list_for_each_entry_safe (req, rtmp, &cancel_list, req_list) {p9_debug (P9_DEBUG_ERROR ,"call back req %p\n" , req);list_del (&req->req_list);
@@ -212,7 +214,6 @@ static void p9_conn_cancel(struct p9_conn *m, int err) req->t_err = err;p9_client_cb (m->client, req,REQ_STATUS_ERROR ); } -spin_unlock (&m->client->lock); } static __poll_t
@@ -820,11 +821,14 @@ static int p9_fd_open(struct p9_client *client, int rfd, int wfd) goto out_free_ts;if (!(ts->rd->f_mode &FMODE_READ )) goto out_put_rd; +/* prevent workers from hanging on IO when fd is a pipe */ + ts->rd->f_flags |=O_NONBLOCK ; ts->wr =fget (wfd);if (!ts->wr) goto out_put_rd;if (!(ts->wr->f_mode &FMODE_WRITE )) goto out_put_wr; + ts->wr->f_flags |=O_NONBLOCK ; client->trans = ts; client->status = Connected;
net/bluetooth/l2cap_core.c +1 -1
@@ -1833,7 +1833,7 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm,if (link_type ==LE_LINK && c->src_type ==BDADDR_BREDR )continue ; -if (c->psm == psm) { +if (c->chan_type !=L2CAP_CHAN_FIXED && c->psm == psm) {int src_match, dst_match;int src_any, dst_any;
net/bpf/test_run.c +1 -0
@@ -114,6 +114,7 @@ static void *bpf_test_init(const union bpf_attr *kattr, u32 size,if (size <ETH_HLEN || size >PAGE_SIZE - headroom - tailroom)return ERR_PTR (-EINVAL ); + size =SKB_DATA_ALIGN (size); data =kzalloc (size + headroom + tailroom,GFP_USER );if (!data)return ERR_PTR (-ENOMEM );
net/caif/chnl_net.c +0 -3
@@ -314,9 +314,6 @@ static int chnl_net_open(struct net_device *dev)if (result ==0 ) {pr_debug ("connect timeout\n" ); -caif_disconnect_client (dev_net (dev), &priv->chnl); - priv->state =CAIF_DISCONNECTED ; -pr_debug ("state disconnected\n" ); result = -ETIMEDOUT ; goto error; }
net/can/af_can.c +1 -1
@@ -450,7 +450,7 @@ int can_rx_register(struct net *net, struct net_device *dev, canid_t can_id,/* insert new receiver (dev,canid,mask) -> (func,data) */ -if (dev && dev->type !=ARPHRD_CAN ) +if (dev && (dev->type !=ARPHRD_CAN || !can_get_ml_priv (dev)))return -ENODEV ;if (dev && !net_eq (net,dev_net (dev)))
net/can/j1939/main.c +3 -0
@@ -332,6 +332,9 @@ int j1939_send_one(struct j1939_priv *priv, struct sk_buff *skb)/* re-claim the CAN_HDR from the SKB */ cf =skb_push (skb,J1939_CAN_HDR ); +/* initialize header structure */ +memset (cf,0 ,J1939_CAN_HDR ); +/* make it a full can frame again */ skb_put (skb,J1939_CAN_FTR + (8 - dlc));
net/core/skbuff.c +19 -17
@@ -3700,23 +3700,25 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,int pos;int dummy; -if (list_skb && !list_skb->head_frag &&skb_headlen (list_skb) && - (skb_shinfo (head_skb)->gso_type &SKB_GSO_DODGY )) { -/* gso_size is untrusted, and we have a frag_list with a linear -* non head_frag head. -* -* (we assume checking the first list_skb member suffices; -* i.e if either of the list_skb members have non head_frag -* head, then the first one has too). -* -* If head_skb's headlen does not fit requested gso_size, it -* means that the frag_list members do NOT terminate on exact -* gso_size boundaries. Hence we cannot perform skb_frag_t page -* sharing. Therefore we must fallback to copying the frag_list -* skbs; we do so by disabling SG. -*/ -if (mss !=GSO_BY_FRAGS && mss !=skb_headlen (head_skb)) - features &= ~NETIF_F_SG ; +if ((skb_shinfo (head_skb)->gso_type &SKB_GSO_DODGY ) && + mss !=GSO_BY_FRAGS && mss !=skb_headlen (head_skb)) { +struct sk_buff *check_skb; + +for (check_skb = list_skb; check_skb; check_skb = check_skb->next) { +if (skb_headlen (check_skb) && !check_skb->head_frag) { +/* gso_size is untrusted, and we have a frag_list with +* a linear non head_frag item. +* +* If head_skb's headlen does not fit requested gso_size, +* it means that the frag_list members do NOT terminate +* on exact gso_size boundaries. Hence we cannot perform +* skb_frag_t page sharing. Therefore we must fallback to +* copying the frag_list skbs; we do so by disabling SG. +*/ + features &= ~NETIF_F_SG ; +break ; + } + } }__skb_push (head_skb, doffset);
net/ipv4/tcp_bpf.c +5 -3
@@ -311,7 +311,7 @@ static int tcp_bpf_send_verdict(struct sock *sk, struct sk_psock *psock, {bool cork = false, enospc =sk_msg_full (msg);struct sock *sk_redir; -u32 tosend, delta =0 ; +u32 tosend, origsize, sent, delta =0 ;u32 eval = __SK_NONE;int ret;
@@ -366,10 +366,12 @@ static int tcp_bpf_send_verdict(struct sock *sk, struct sk_psock *psock, cork = true; psock->cork =NULL ; } -sk_msg_return (sk, msg, msg->sg.size); +sk_msg_return (sk, msg, tosend);release_sock (sk); + origsize = msg->sg.size; ret =tcp_bpf_sendmsg_redir (sk_redir, msg, tosend, flags); + sent = origsize - msg->sg.size;if (eval == __SK_REDIRECT)sock_put (sk_redir);
@@ -408,7 +410,7 @@ static int tcp_bpf_send_verdict(struct sock *sk, struct sk_psock *psock, msg->sg.data[msg->sg.start].page_link && msg->sg.data[msg->sg.start].length) {if (eval == __SK_REDIRECT) -sk_mem_charge (sk, msg->sg.size); +sk_mem_charge (sk, tosend - sent); goto more_data; } }
net/ipv4/tcp_cdg.c +2 -0
@@ -375,6 +375,7 @@ static void tcp_cdg_init(struct sock *sk)struct cdg *ca =inet_csk_ca (sk);struct tcp_sock *tp =tcp_sk (sk); + ca->gradients =NULL ;/* We silently fall back to window = 1 if allocation fails. */ if (window >1 ) ca->gradients = kcalloc(window, sizeof(ca->gradients[0]),
@@ -388,6 +389,7 @@ static void tcp_cdg_release(struct sock *sk)struct cdg *ca =inet_csk_ca (sk);kfree (ca->gradients); + ca->gradients =NULL ; }static struct tcp_congestion_ops tcp_cdg__read_mostly = {
net/ipv6/addrlabel.c +1 -0
@@ -437,6 +437,7 @@ static void ip6addrlbl_putmsg(struct nlmsghdr *nlh, {struct ifaddrlblmsg *ifal =nlmsg_data (nlh); ifal->ifal_family =AF_INET6 ; + ifal->__ifal_reserved =0 ; ifal->ifal_prefixlen = prefixlen; ifal->ifal_flags =0 ; ifal->ifal_index = ifindex;
net/kcm/kcmsock.c +9 -53
126 lines not on this page · raw message
net/tipc/netlink_compat.c +1 -1
@@ -857,7 +857,7 @@ static int tipc_nl_compat_name_table_dump_header(struct tipc_nl_compat_msg *msg) }; ntq = (struct tipc_name_table_query *)TLV_DATA (msg->req); -if (TLV_GET_DATA_LEN (msg->req) <sizeof (struct tipc_name_table_query )) +if (TLV_GET_DATA_LEN (msg->req) < (int )sizeof (struct tipc_name_table_query ))return -EINVAL ; depth =ntohl (ntq->depth);
net/wireless/reg.c +9 -3
@@ -1060,6 +1060,8 @@ static void regdb_fw_cb(const struct firmware *fw, void *context)static int query_regdb_file (const char *alpha2) { +int err; +ASSERT_RTNL ();if (regdb)
@@ -1069,9 +1071,13 @@ static int query_regdb_file(const char *alpha2)if (!alpha2)return -ENOMEM ; -return request_firmware_nowait (THIS_MODULE , true,"regulatory.db" , - ®_pdev->dev,GFP_KERNEL , - (void *)alpha2, regdb_fw_cb); + err =request_firmware_nowait (THIS_MODULE , true,"regulatory.db" , + ®_pdev->dev,GFP_KERNEL , + (void *)alpha2, regdb_fw_cb); +if (err) +kfree (alpha2); + +return err; }int reg_reload_regdb (void )
net/wireless/scan.c +3 -1
@@ -1166,7 +1166,9 @@ cfg80211_update_known_bss(struct cfg80211_registered_device *rdev,if (old ==rcu_access_pointer (known->pub.ies))rcu_assign_pointer (known->pub.ies, new->pub.beacon_ies); -cfg80211_update_hidden_bsses (known, new->pub.beacon_ies, old); +cfg80211_update_hidden_bsses (known, +rcu_access_pointer (new->pub.beacon_ies), + old);if (old)kfree_rcu ((struct cfg80211_bss_ies *)old, rcu_head);
net/x25/x25_dev.c +1 -1
@@ -117,7 +117,7 @@ int x25_lapb_receive_frame(struct sk_buff *skb, struct net_device *dev,if (!pskb_may_pull (skb,1 )) {x25_neigh_put (nb); -return 0 ; + goto drop; }switch (skb->data[0 ]) {
scripts/extract-cert.c +7 -0
@@ -23,6 +23,13 @@#include <openssl/err.h> #include <openssl/engine.h> +/* +* OpenSSL 3.0 deprecates the OpenSSL's ENGINE API. +* +* Remove this if/when that API is no longer used +*/ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#define PKEY_ID_PKCS7 2 static __attribute__((noreturn))
scripts/sign-file.c +7 -0
@@ -29,6 +29,13 @@#include <openssl/err.h> #include <openssl/engine.h> +/* +* OpenSSL 3.0 deprecates the OpenSSL's ENGINE API. +* +* Remove this if/when that API is no longer used +*/ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +/* * Use CMS if we have openssl-1.0.0 or newer available - otherwise we have to * assume that it's not available and its header file is missing and that we
sound/hda/hdac_sysfs.c +3 -1
@@ -346,8 +346,10 @@ static int add_widget_node(struct kobject *parent, hda_nid_t nid,return -ENOMEM ;kobject_init (kobj, &widget_ktype); err =kobject_add (kobj, parent,"%02x" , nid); -if (err <0 ) +if (err <0 ) { +kobject_put (kobj);return err; + } err =sysfs_create_group (kobj, group);if (err <0 ) {kobject_put (kobj);
sound/pci/hda/patch_ca0132.c +1 -0
@@ -1182,6 +1182,7 @@ static const struct snd_pci_quirk ca0132_quirks[] = {SND_PCI_QUIRK (0x1458 ,0xA026 ,"Gigabyte G1.Sniper Z97" ,QUIRK_R3DI ),SND_PCI_QUIRK (0x1458 ,0xA036 ,"Gigabyte GA-Z170X-Gaming 7" ,QUIRK_R3DI ),SND_PCI_QUIRK (0x3842 ,0x1038 ,"EVGA X99 Classified" ,QUIRK_R3DI ), +SND_PCI_QUIRK (0x3842 ,0x1055 ,"EVGA Z390 DARK" ,QUIRK_R3DI ),SND_PCI_QUIRK (0x1102 ,0x0013 ,"Recon3D" ,QUIRK_R3D ),SND_PCI_QUIRK (0x1102 ,0x0018 ,"Recon3D" ,QUIRK_R3D ), SND_PCI_QUIRK(0x1102, 0x0051, "Sound Blaster AE-5", QUIRK_AE5),
sound/soc/codecs/jz4725b.c +19 -15
@@ -136,14 +136,17 @@ enum {#define REG_CGR3_GO1L_OFFSET 0#define REG_CGR3_GO1L_MASK (0x1f << REG_CGR3_GO1L_OFFSET) +#define REG_CGR10_GIL_OFFSET 0 +#define REG_CGR10_GIR_OFFSET 4 +struct jz_icdc {struct regmap *regmap;void __iomem *base;struct clk *clk; }; -static const SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(jz4725b_dac_tlv, -2250, 0); -static const SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(jz4725b_line_tlv, -1500, 600); +static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(jz4725b_adc_tlv, 0, 150, 0); +static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(jz4725b_dac_tlv, -2250, 150, 0);static const struct snd_kcontrol_new jz4725b_codec_controls[] = { SOC_DOUBLE_TLV("Master Playback Volume",
@@ -151,11 +154,11 @@ static const struct snd_kcontrol_new jz4725b_codec_controls[] = { REG_CGR1_GODL_OFFSET, REG_CGR1_GODR_OFFSET, 0xf, 1, jz4725b_dac_tlv), -SOC_DOUBLE_R_TLV ("Master Capture Volume" , -JZ4725B_CODEC_REG_CGR3 , -JZ4725B_CODEC_REG_CGR2 , -REG_CGR2_GO1R_OFFSET , -0x1f ,1 , jz4725b_line_tlv), +SOC_DOUBLE_TLV ("Master Capture Volume" , +JZ4725B_CODEC_REG_CGR10 , +REG_CGR10_GIL_OFFSET , +REG_CGR10_GIR_OFFSET , +0xf ,0 , jz4725b_adc_tlv),SOC_SINGLE ("Master Playback Switch" ,JZ4725B_CODEC_REG_CR1 , REG_CR1_DAC_MUTE_OFFSET, 1, 1),
@@ -180,7 +183,7 @@ static SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum, jz4725b_codec_adc_src_texts, jz4725b_codec_adc_src_values);static const struct snd_kcontrol_new jz4725b_codec_adc_src_ctrl = -SOC_DAPM_ENUM ("Route" , jz4725b_codec_adc_src_enum); +SOC_DAPM_ENUM ("ADC Source Capture Route" , jz4725b_codec_adc_src_enum);static const struct snd_kcontrol_new jz4725b_codec_mixer_controls[] = { SOC_DAPM_SINGLE("Line In Bypass", JZ4725B_CODEC_REG_CR1,
@@ -225,7 +228,7 @@ static const struct snd_soc_dapm_widget jz4725b_codec_dapm_widgets[] = {SND_SOC_DAPM_ADC ("ADC" ,"Capture" ,JZ4725B_CODEC_REG_PMR1 ,REG_PMR1_SB_ADC_OFFSET ,1 ), -SND_SOC_DAPM_MUX ("ADC Source" ,SND_SOC_NOPM ,0 ,0 , +SND_SOC_DAPM_MUX ("ADC Source Capture Route" ,SND_SOC_NOPM ,0 ,0 , &jz4725b_codec_adc_src_ctrl),/* Mixer */
@@ -236,7 +239,8 @@ static const struct snd_soc_dapm_widget jz4725b_codec_dapm_widgets[] = {SND_SOC_DAPM_MIXER ("DAC to Mixer" ,JZ4725B_CODEC_REG_CR1 ,REG_CR1_DACSEL_OFFSET ,0 ,NULL ,0 ), -SND_SOC_DAPM_MIXER ("Line In" ,SND_SOC_NOPM ,0 ,0 ,NULL ,0 ), +SND_SOC_DAPM_MIXER ("Line In" ,JZ4725B_CODEC_REG_PMR1 , +REG_PMR1_SB_LIN_OFFSET ,1 ,NULL ,0 ),SND_SOC_DAPM_MIXER ("HP Out" ,JZ4725B_CODEC_REG_CR1 , REG_CR1_HP_DIS_OFFSET, 1, NULL, 0),
@@ -283,11 +287,11 @@ static const struct snd_soc_dapm_route jz4725b_codec_dapm_routes[] = { {"Mixer", NULL, "DAC to Mixer"}, {"Mixer to ADC", NULL, "Mixer"}, - {"ADC Source", "Mixer", "Mixer to ADC"}, - {"ADC Source", "Line In", "Line In"}, - {"ADC Source", "Mic 1", "Mic 1"}, - {"ADC Source", "Mic 2", "Mic 2"}, - {"ADC", NULL, "ADC Source"}, + {"ADC Source Capture Route", "Mixer", "Mixer to ADC"}, + {"ADC Source Capture Route", "Line In", "Line In"}, + {"ADC Source Capture Route", "Mic 1", "Mic 1"}, + {"ADC Source Capture Route", "Mic 2", "Mic 2"}, + {"ADC", NULL, "ADC Source Capture Route"}, {"Out Stage", NULL, "Mixer"}, {"HP Out", NULL, "Out Stage"},
sound/soc/codecs/wm5102.c +3 -3
@@ -2084,6 +2084,9 @@ static int wm5102_probe(struct platform_device *pdev)regmap_update_bits (arizona->regmap, wm5102_digital_vu[i],WM5102_DIG_VU ,WM5102_DIG_VU ); +pm_runtime_enable (&pdev->dev); +pm_runtime_idle (&pdev->dev); + ret =arizona_request_irq (arizona,ARIZONA_IRQ_DSP_IRQ1 ,"ADSP2 Compressed IRQ" , wm5102_adsp2_irq, wm5102);
@@ -2116,9 +2119,6 @@ static int wm5102_probe(struct platform_device *pdev) goto err_spk_irqs; } -pm_runtime_enable (&pdev->dev); -pm_runtime_idle (&pdev->dev); -return ret; err_spk_irqs:
sound/soc/codecs/wm5110.c +3 -3
@@ -2452,6 +2452,9 @@ static int wm5110_probe(struct platform_device *pdev)regmap_update_bits (arizona->regmap, wm5110_digital_vu[i],WM5110_DIG_VU ,WM5110_DIG_VU ); +pm_runtime_enable (&pdev->dev); +pm_runtime_idle (&pdev->dev); + ret =arizona_request_irq (arizona,ARIZONA_IRQ_DSP_IRQ1 ,"ADSP2 Compressed IRQ" , wm5110_adsp2_irq, wm5110);
@@ -2484,9 +2487,6 @@ static int wm5110_probe(struct platform_device *pdev) goto err_spk_irqs; } -pm_runtime_enable (&pdev->dev); -pm_runtime_idle (&pdev->dev); -return ret; err_spk_irqs:
sound/soc/codecs/wm8962.c +52 -2
48 lines not on this page · raw message
tools/testing/selftests/futex/functional/Makefile +2 -4
Lines of this file are not shown. View the raw message.
tools/testing/selftests/intel_pstate/Makefile +3 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/kvm/include/x86_64/processor.h +5 -3
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.