Linux 4.9.137
Greg KH
maintainerI'm announcing the release of the 4.9.137 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/boot/dts/exynos3250.dtsi | 16 + arch/arm/boot/dts/exynos4210.dtsi | 15 + arch/arm/boot/dts/exynos4412.dtsi | 2 arch/arm/boot/dts/exynos5250.dtsi | 116 +++++++--- arch/arm/boot/dts/exynos5420-cpus.dtsi | 16 - arch/arm/boot/dts/exynos5422-cpus.dtsi | 16 - arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 2 arch/arm64/lib/Makefile | 2 arch/mips/cavium-octeon/executive/cvmx-helper.c | 2 arch/parisc/kernel/entry.S | 2 arch/parisc/kernel/traps.c | 3 arch/parisc/mm/init.c | 8 arch/powerpc/include/asm/mpic.h | 7 arch/s390/kvm/sthyi.c | 8 arch/sparc/include/asm/cpudata_64.h | 2 arch/sparc/kernel/perf_event.c | 17 + arch/x86/boot/tools/build.c | 7 arch/x86/include/asm/cpufeatures.h | 1 arch/x86/include/asm/nospec-branch.h | 1 arch/x86/kernel/check.c | 15 + arch/x86/kernel/cpu/bugs.c | 77 +++++- arch/x86/kernel/cpu/common.c | 3 arch/x86/kernel/fpu/signal.c | 1 arch/x86/platform/olpc/olpc-xo1-rtc.c | 3 arch/x86/xen/spinlock.c | 35 +-- crypto/lrw.c | 7 crypto/tcrypt.c | 3 drivers/acpi/acpi_lpss.c | 2 drivers/block/ataflop.c | 25 +- drivers/block/swim.c | 13 - drivers/block/xen-blkfront.c | 3 drivers/bluetooth/btbcm.c | 1 drivers/char/ipmi/ipmi_ssif.c | 10 drivers/char/tpm/tpm-interface.c | 3 drivers/char/tpm/xen-tpmfront.c | 2 drivers/cpufreq/cpufreq-dt.c | 34 +- drivers/crypto/caam/regs.h | 28 +- drivers/dma/dma-jz4780.c | 5 drivers/dma/ioat/init.c | 9 drivers/edac/i7core_edac.c | 1 drivers/edac/sb_edac.c | 1 drivers/edac/skx_edac.c | 3 drivers/hid/usbhid/hiddev.c | 18 + drivers/hwmon/pmbus/pmbus.c | 2 drivers/hwmon/pmbus/pmbus_core.c | 5 drivers/hwmon/pwm-fan.c | 12 - drivers/hwtracing/coresight/coresight-etb10.c | 4 drivers/i2c/busses/i2c-rcar.c | 6 drivers/iio/adc/at91_adc.c | 6 drivers/iio/adc/fsl-imx25-gcq.c | 6 drivers/iio/dac/ad5064.c | 53 +++- drivers/infiniband/core/sysfs.c | 19 + drivers/infiniband/ulp/ipoib/ipoib_cm.c | 8 drivers/md/bcache/btree.c | 2 drivers/md/dm-ioctl.c | 18 - drivers/md/raid1.c | 1 drivers/md/raid10.c | 1 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c | 2 drivers/media/i2c/tvp5150.c | 2 drivers/media/usb/em28xx/em28xx-cards.c | 4 drivers/media/usb/em28xx/em28xx-video.c | 8 drivers/misc/genwqe/card_base.h | 2 drivers/misc/genwqe/card_dev.c | 9 drivers/misc/vmw_vmci/vmci_driver.c | 2 drivers/misc/vmw_vmci/vmci_resource.c | 3 drivers/mmc/host/sdhci-pci-o2micro.c | 3 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 drivers/net/ethernet/qlogic/qla3xxx.c | 2 drivers/net/tun.c | 2 drivers/net/wireless/ath/ath10k/wmi.c | 6 drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c | 34 ++ drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h | 2 drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 24 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 32 +- drivers/net/wireless/marvell/libertas/if_usb.c | 2 drivers/nvdimm/bus.c | 4 drivers/pci/msi.c | 9 drivers/pci/quirks.c | 4 drivers/pcmcia/ricoh.h | 35 +++ drivers/pcmcia/yenta_socket.c | 3 drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 27 +- drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 28 +- drivers/rpmsg/qcom_smd.c | 7 drivers/scsi/esp_scsi.c | 1 drivers/scsi/esp_scsi.h | 2 drivers/scsi/lpfc/lpfc_sli.c | 7 drivers/scsi/mac_esp.c | 2 drivers/scsi/megaraid/megaraid_sas_base.c | 3 drivers/soc/tegra/pmc.c | 2 drivers/tc/tc.c | 8 drivers/tty/serial/kgdboc.c | 5 drivers/uio/uio.c | 9 drivers/usb/chipidea/otg.h | 3 drivers/usb/gadget/udc/atmel_usba_udc.c | 2 drivers/usb/usbip/vudc_main.c | 10 drivers/w1/masters/omap_hdq.c | 2 drivers/xen/swiotlb-xen.c | 6 fs/btrfs/extent-tree.c | 47 +++- fs/btrfs/free-space-cache.c | 32 +- fs/btrfs/inode.c | 1 fs/btrfs/qgroup.c | 1 fs/btrfs/relocation.c | 2 fs/btrfs/tree-log.c | 39 ++- fs/cifs/cifs_debug.c | 3 fs/cifs/cifs_spnego.c | 6 fs/cifs/inode.c | 10 fs/cramfs/inode.c | 3 fs/ext4/inline.c | 2 fs/ext4/ioctl.c | 4 fs/ext4/move_extent.c | 8 fs/gfs2/ops_fstype.c | 3 fs/jbd2/checkpoint.c | 4 fs/jffs2/super.c | 4 fs/lockd/host.c | 2 fs/nfs/nfs4client.c | 16 - include/linux/tc.h | 1 kernel/bounds.c | 4 kernel/cpu.c | 11 kernel/irq/manage.c | 8 kernel/kprobes.c | 27 +- kernel/locking/lockdep.c | 4 kernel/printk/printk.c | 7 kernel/sched/fair.c | 2 kernel/signal.c | 2 lib/debug_locks.c | 2 mm/hugetlb.c | 6 net/core/netclassid_cgroup.c | 1 net/ipv4/cipso_ipv4.c | 11 net/sunrpc/svc_xprt.c | 2 net/xfrm/xfrm_policy.c | 8 security/integrity/ima/ima_fs.c | 6 sound/pci/ca0106/ca0106.h | 2 sound/pci/hda/hda_controller.h | 1 sound/pci/hda/hda_intel.c | 11 sound/pci/hda/patch_conexant.c | 1 sound/pci/hda/patch_realtek.c | 20 + sound/soc/intel/skylake/skl-topology.c | 1 tools/perf/util/event.c | 1 tools/perf/util/pmu.c | 13 - tools/perf/util/strbuf.c | 10 tools/perf/util/trace-event-info.c | 2 tools/perf/util/trace-event-read.c | 5 tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-event-syntax.tc | 80 ++++++ tools/testing/selftests/net/reuseport_bpf.c | 13 - 145 files changed, 1102 insertions(+), 359 deletions(-)
Aaro Koskinen (1):
MIPS: OCTEON: fix out of bounds array access on CN68XX
Al Viro (1):
gfs2_meta: ->mount() can get NULL dev_name
Alex Stanoev (1):
ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops
Alexander Duyck (1):
libnvdimm: Hold reference on parent while scheduling async init
Alexandre Belloni (2):
usb: gadget: udc: atmel: handle at91sam9rl PMC
uio: ensure class is registered before devices
Alexey Khoroshilov (1):
iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()
Amir Goldstein (1):
lockd: fix access beyond unterminated strings in prints
Andreas Kemnade (1):
w1: omap-hdq: fix missing bus unregister at removal
Arend van Spriel (1):
brcmfmac: fix for proper support of 160MHz bandwidth
Arnd Bergmann (1):
kbuild: fix kernel/bounds.c 'W=1' warning
Ben Hutchings (1):
x86: boot: Fix EFI stub alignment
Bin Meng (1):
PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk
Breno Leitao (1):
HID: hiddev: fix potential Spectre v1
Christian Hewitt (1):
Bluetooth: btbcm: Add entry for BCM4335C0 UART bluetooth
Christophe Leroy (1):
powerpc/msi: Fix compile error on mpc83xx
Colin Ian King (1):
rpmsg: smd: fix memory leak on channel create
David Miller (1):
perf cpu_map: Align cpu map synthesized events properly.
David S. Miller (2):
sparc: Fix single-pcr perf event counter management.
sparc64: Make proc_id signed.
Denis Drozdov (1):
IB/ipoib: Clear IPCB before icmp_send
Dmitry Bazhenov (1):
hwmon: (pmbus) Fix page count auto-detection.
Douglas Anderson (2):
pinctrl: spmi-mpp: Fix pmic_mpp_config_get() to be compliant
pinctrl: ssbi-gpio: Fix pm8xxx_pin_config_get() to be compliant
Dr. Greg Wettstein (1):
tpm: Restore functionality to xen vtpm driver.
Eric Biggers (1):
ima: fix showing large 'violations' or 'runtime_measurements_count'
Eric Dumazet (1):
bpf: do not blindly change rlimit in reuseport net selftest
Eric W. Biederman (2):
signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init signal/GenWQE: Fix sending of SIGKILL
Eugen Hristev (2):
iio: adc: at91: fix acking DRDY irq on simple conversions
iio: adc: at91: fix wrong channel number in triggered buffer mode
Filipe Manana (2):
Btrfs: fix wrong dentries after fsync of file that got its parent replaced
Btrfs: fix null pointer dereference on compressed write path error
Finn Thain (1):
scsi: esp_scsi: Track residual for PIO transfers
Florian Westphal (1):
xfrm: policy: use hlist rcu variants on insert
Greg Kroah-Hartman (1):
Linux 4.9.137
Hans Verkuil (1):
media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD
Hans de Goede (1):
ACPI / LPSS: Add alternative ACPI HIDs for Cherry Trail DMA controllers
He Zhe (3):
x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided
printk: Fix panic caused by passing log_buf_len to command line
kgdboc: Passing ekgdboc to command line causes panic
Helge Deller (1):
parisc: Fix map_pages() to not overwrite existing pte entries
Horia Geantă (2):
crypto: caam - fix implicit casts in endianness helpers
crypto: tcrypt - fix ghash-generic speed test
Hou Tao (1):
jffs2: free jffs2_sb_info through jffs2_kill_sb()
James Smart (1):
scsi: lpfc: Correct soft lockup when running mds diagnostics
Jan Glauber (1):
ipmi: Fix timer race with module unload
Jan Kara (1):
jbd2: fix use after free in jbd2_log_do_checkpoint()
Janosch Frank (1):
s390/sthyi: Fix machine name validity indication
Javier Martinez Canillas (1):
tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated
Jeff Mahoney (3):
btrfs: fix error handling in free_log_tree
btrfs: iterate all devices during trim, instead of fs_devices::alloc_list
btrfs: don't attempt to trim devices that don't support it
Jeremy Cline (1):
ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)
Jiri Kosina (1):
x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation
Jiri Olsa (1):
Revert "perf tools: Fix PMU term format max value calculation"
Joe Jin (1):
xen-swiotlb: use actually allocated size on check physical continuous
Johan Hovold (1):
soc/tegra: pmc: Fix child-node lookup
John David Anglin (1):
parisc: Fix address in HPMC IVA
Jorgen Hansen (1):
VMCI: Resource wildcard match fixed
Josef Bacik (4):
btrfs: wait on caching when putting the bg cache
btrfs: reset max_extent_size on clear in a bitmap
btrfs: make sure we create all new block groups
btrfs: set max_extent_size properly
Juergen Gross (3):
xen: fix race in xen_qlock_wait()
xen: make xen_qlock_wait() nestable
xen: fix xen_qlock_wait()
Lars-Peter Clausen (1):
iio: ad5064: Fix regulator handling
Loic Poulain (1):
usb: chipidea: Prevent unbalanced IRQ disable
Lubomir Rintel (2):
x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC
libertas: don't set URB_ZERO_PACKET on IN USB transfer
Luca Coelho (1):
iwlwifi: mvm: check return value of rs_rate_from_ucode_rate()
Lukas Czerner (1):
ext4: initialize retries variable in ext4_da_write_inline_data_begin()
Lukas Wunner (1):
genirq: Fix race on spurious interrupt detection
Maciej S. Szmigiero (1):
pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges
Maciej W. Rozycki (1):
TC: Set DMA masks for devices
Marek Szyprowski (2):
ARM: dts: exynos: Convert exynos5250.dtsi to opp-v2 bindings
ARM: dts: exynos: Mark 1 GHz CPU OPP as suspend OPP on Exynos5250
Martin Willi (1):
ath10k: schedule hardware restart if WMI command times out
Masami Hiramatsu (2):
selftests: ftrace: Add synthetic event syntax testcase
kprobes: Return error if we fail to reuse kprobe instead of BUG_ON()
Mauro Carvalho Chehab (4):
media: em28xx: use a default format if TRY_FMT fails
media: tvp5150: avoid going past array on v4l2_querymenu()
media: em28xx: fix input name for Terratec AV 350
media: em28xx: make v4l2-compliance happier by starting sequence on zero
Michal Hocko (1):
cgroup, netclassid: add a preemption point to write_classid
Mike Kravetz (1):
hugetlbfs: dirty pages as they are added to pagecache
Nathan Chancellor (1):
net: qla3xxx: Remove overflowing shift statement
Nicolas Pitre (1):
Cramfs: fix abad comparison when wrap-arounds occur
Omar Sandoval (2):
ataflop: fix error handling during setup
swim: fix cleanup on setup error
Ondrej Mosnacek (1):
crypto: lrw - Fix out-of bounds access on counter overflow
Parav Pandit (1):
RDMA/core: Do not expose unsupported counters
Paul Cercueil (1):
dmaengine: dma-jz4780: Return error if not probed from DT
Qiuxu Zhuo (1):
EDAC, skx_edac: Fix logical channel intermediate decoding
Qu Wenruo (3):
btrfs: Handle owner mismatch gracefully when walking up tree
btrfs: locking: Add extra check in btrfs_init_new_buffer() to avoid deadlock
btrfs: qgroup: Dirty all qgroups before rescan
Sai Praneeth (1):
x86/speculation: Support Enhanced IBRS on future CPUs
Sanskriti Sharma (3):
perf tools: Free temporary 'sys' string in read_event_files() perf tools: Cleanup trace-event-info 'tdata' leak perf strbuf: Match va_{add,copy} with va_end
Sebastian Andrzej Siewior (1):
x86/fpu: Remove second definition of fpu in __fpu__restore_sig()
Sebastian Basierski (1):
ixgbevf: VF2VF TCP RSS
Serhey Popovych (1):
tun: Consistently configure generic netdev params via rtnetlink
Shaohua Li (2):
MD: fix invalid stored role for a disk
MD: fix invalid stored role for a disk - try2
Shaul Triebitz (1):
iwlwifi: pcie: avoid empty free RB queue
Shuah Khan (Samsung OSG) (1):
usbip:vudc: BUG kmalloc-2048 (Not tainted): Poison overwritten
Song Muchun (1):
sched/fair: Fix the min_vruntime update logic in dequeue_entity()
Stefan Nuernberger (1):
net/ipv4: defensive cipso option parsing
Stephen Boyd (1):
pinctrl: qcom: spmi-mpp: Fix drive strength setting
Steve French (3):
smb3: allow stats which track session and share reconnects to be reset
smb3: do not attempt cifs operation in smb3 query info error path
smb3: on kerberos mount if server doesn't specify auth type use krb5
Suzuki K Poulose (1):
coresight: etb10: Fix handling of perf mode
Takashi Iwai (4):
ALSA: hda - Add quirk for ASUS G751 laptop
ALSA: hda - Fix headphone pin config for ASUS G751
ALSA: hda: Check the non-cached stream buffers more explicitly
ASoC: intel: skylake: Add missing break in skl_tplg_get_token()
Tang Junhui (1):
bcache: fix miss key refill->end in writeback
Theodore Ts'o (1):
ext4: fix argument checking in EXT4_IOC_MOVE_EXT
Thierry Reding (1):
hwmon: (pwm-fan) Set fan speed to 0 on suspend
Thor Thayer (1):
arm64: dts: stratix10: Correct System Manager register size
Tonghao Zhang (1):
PCI/MSI: Warn and return error if driver enables MSI/MSI-X twice
Tony Luck (1):
EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting
Tri Vo (1):
arm64: lse: remove -fcall-used-x0 flag
Trond Myklebust (2):
NFSv4.1: Fix the r/wsize checking
nfsd: Fix an Oops in free_session()
Vasilis Liaskovitis (1):
xen/blkfront: avoid NULL blkfront_info dereference on device removal
Viresh Kumar (3):
cpufreq: dt: Try freeing static OPPs only if we have added them
ARM: dts: exynos: Remove "cooling-{min|max}-level" for CPU nodes
arm: dts: exynos: Add missing cooling device properties for CPUs
Waiman Long (2):
locking/lockdep: Fix debug_locks off performance problem driver/dma/ioat: Call del_timer_sync() without holding prep_lock
Wang Shilong (1):
ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR
Wenwen Wang (2):
scsi: megaraid_sas: fix a missing-check bug
dm ioctl: harden copy_params()'s copy_from_user() from malicious users
Wolfram Sang (1):
i2c: rcar: cleanup DMA for all kinds of failure
Yu Zhao (1):
mmc: sdhci-pci-o2micro: Add quirk for O2 Micro dev 0x8620 rev 0x01
YueHaibing (1):
pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 136 +SUBLEVEL = 137 EXTRAVERSION = NAME = Roaring Lionus
arch/arm/boot/dts/exynos3250.dtsi +16 -0
@@ -80,6 +80,22 @@ compatible = "arm,cortex-a7"; reg = <1>; clock-frequency = <1000000000>; + clocks = <&cmu CLK_ARM_CLK>; + clock-names = "cpu"; + #cooling-cells = <2>; + + operating-points = < + 1000000 1150000 + 900000 1112500 + 800000 1075000 + 700000 1037500 + 600000 1000000 + 500000 962500 + 400000 925000 + 300000 887500 + 200000 850000 + 100000 850000 + >; }; };
arch/arm/boot/dts/exynos4210.dtsi +13 -2
@@ -52,8 +52,6 @@ 400000 975000 200000 950000 >; - cooling-min-level = <4>; - cooling-max-level = <2>; #cooling-cells = <2>; /* min followed by max */ };
@@ -61,6 +59,19 @@ device_type = "cpu"; compatible = "arm,cortex-a9"; reg = <0x901>; + clocks = <&clock CLK_ARM_CLK>; + clock-names = "cpu"; + clock-latency = <160000>; + + operating-points = < + 1200000 1250000 + 1000000 1150000 + 800000 1075000 + 500000 975000 + 400000 975000 + 200000 950000 + >; + #cooling-cells = <2>; /* min followed by max */ }; };
arch/arm/boot/dts/exynos4412.dtsi +0 -2
@@ -33,8 +33,6 @@ clocks = <&clock CLK_ARM_CLK>; clock-names = "cpu"; operating-points-v2 = <&cpu0_opp_table>; - cooling-min-level = <13>; - cooling-max-level = <7>; #cooling-cells = <2>; /* min followed by max */ };
arch/arm/boot/dts/exynos5250.dtsi +92 -24
130 lines not on this page · raw message
arch/arm/boot/dts/exynos5420-cpus.dtsi +0 -16
@@ -33,8 +33,6 @@ clock-frequency = <1800000000>; cci-control-port = <&cci_control1>; operating-points-v2 = <&cluster_a15_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <11>; #cooling-cells = <2>; /* min followed by max */ };
@@ -45,8 +43,6 @@ clock-frequency = <1800000000>; cci-control-port = <&cci_control1>; operating-points-v2 = <&cluster_a15_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <11>; #cooling-cells = <2>; /* min followed by max */ };
@@ -57,8 +53,6 @@ clock-frequency = <1800000000>; cci-control-port = <&cci_control1>; operating-points-v2 = <&cluster_a15_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <11>; #cooling-cells = <2>; /* min followed by max */ };
@@ -69,8 +63,6 @@ clock-frequency = <1800000000>; cci-control-port = <&cci_control1>; operating-points-v2 = <&cluster_a15_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <11>; #cooling-cells = <2>; /* min followed by max */ };
@@ -82,8 +74,6 @@ clock-frequency = <1000000000>; cci-control-port = <&cci_control0>; operating-points-v2 = <&cluster_a7_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <7>; #cooling-cells = <2>; /* min followed by max */ };
@@ -94,8 +84,6 @@ clock-frequency = <1000000000>; cci-control-port = <&cci_control0>; operating-points-v2 = <&cluster_a7_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <7>; #cooling-cells = <2>; /* min followed by max */ };
@@ -106,8 +94,6 @@ clock-frequency = <1000000000>; cci-control-port = <&cci_control0>; operating-points-v2 = <&cluster_a7_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <7>; #cooling-cells = <2>; /* min followed by max */ };
@@ -118,8 +104,6 @@ clock-frequency = <1000000000>; cci-control-port = <&cci_control0>; operating-points-v2 = <&cluster_a7_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <7>; #cooling-cells = <2>; /* min followed by max */ }; };
arch/arm/boot/dts/exynos5422-cpus.dtsi +0 -16
@@ -32,8 +32,6 @@ clock-frequency = <1000000000>; cci-control-port = <&cci_control0>; operating-points-v2 = <&cluster_a7_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <11>; #cooling-cells = <2>; /* min followed by max */ };
@@ -44,8 +42,6 @@ clock-frequency = <1000000000>; cci-control-port = <&cci_control0>; operating-points-v2 = <&cluster_a7_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <11>; #cooling-cells = <2>; /* min followed by max */ };
@@ -56,8 +52,6 @@ clock-frequency = <1000000000>; cci-control-port = <&cci_control0>; operating-points-v2 = <&cluster_a7_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <11>; #cooling-cells = <2>; /* min followed by max */ };
@@ -68,8 +62,6 @@ clock-frequency = <1000000000>; cci-control-port = <&cci_control0>; operating-points-v2 = <&cluster_a7_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <11>; #cooling-cells = <2>; /* min followed by max */ };
@@ -81,8 +73,6 @@ clock-frequency = <1800000000>; cci-control-port = <&cci_control1>; operating-points-v2 = <&cluster_a15_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <15>; #cooling-cells = <2>; /* min followed by max */ };
@@ -93,8 +83,6 @@ clock-frequency = <1800000000>; cci-control-port = <&cci_control1>; operating-points-v2 = <&cluster_a15_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <15>; #cooling-cells = <2>; /* min followed by max */ };
@@ -105,8 +93,6 @@ clock-frequency = <1800000000>; cci-control-port = <&cci_control1>; operating-points-v2 = <&cluster_a15_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <15>; #cooling-cells = <2>; /* min followed by max */ };
@@ -117,8 +103,6 @@ clock-frequency = <1800000000>; cci-control-port = <&cci_control1>; operating-points-v2 = <&cluster_a15_opp_table>; - cooling-min-level = <0>; - cooling-max-level = <15>; #cooling-cells = <2>; /* min followed by max */ }; };
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi +1 -1
@@ -249,7 +249,7 @@ sysmgr: sysmgr@ffd12000 { compatible = "altr,sys-mgr", "syscon"; - reg = <0xffd12000 0x1000>; + reg = <0xffd12000 0x228>; }; /* Local timer */
arch/arm64/lib/Makefile +1 -1
@@ -11,7 +11,7 @@ lib-y := bitops.o clear_user.o delay.o copy_from_user.o \ # when supported by the CPU. Result and argument registers are handled # correctly, based on the function prototype. lib-$(CONFIG_ARM64_LSE_ATOMICS) += atomic_ll_sc.o -CFLAGS_atomic_ll_sc.o := -fcall-used-x0 -ffixed-x1 -ffixed-x2 \ +CFLAGS_atomic_ll_sc.o := -ffixed-x1 -ffixed-x2 \ -ffixed-x3 -ffixed-x4 -ffixed-x5 -ffixed-x6 \ -ffixed-x7 -fcall-saved-x8 -fcall-saved-x9 \ -fcall-saved-x10 -fcall-saved-x11 -fcall-saved-x12 \
arch/mips/cavium-octeon/executive/cvmx-helper.c +1 -1
@@ -67,7 +67,7 @@ void (*cvmx_override_pko_queue_priority) (int pko_port,void (*cvmx_override_ipd_port_setup) (int ipd_port);/* Port count per interface */ -static int interface_port_count[5 ]; +static int interface_port_count[9 ];/* Port last configured link info index by IPD/PKO port */ static cvmx_helper_link_info_t
arch/parisc/kernel/entry.S +1 -1
@@ -185,7 +185,7 @@ bv,n 0(%r3) nop .word 0 /* checksum (will be patched) */ - .word PA(os_hpmc) /* address of handler */ + .word 0 /* address of handler */ .word 0 /* length of handler */ .endm
arch/parisc/kernel/traps.c +2 -1
@@ -826,7 +826,8 @@ void __init initialize_ivt(const void *iva)for (i =0 ; i <8 ; i++) *ivap++ =0 ; -/* Compute Checksum for HPMC handler */ +/* Setup IVA and compute checksum for HPMC handler */ + ivap[6 ] = (u32 )__pa (os_hpmc); length = os_hpmc_size; ivap[7 ] = length;
arch/parisc/mm/init.c +2 -6
@@ -491,12 +491,8 @@ static void __init map_pages(unsigned long start_vaddr, pte =pte_mkhuge (pte); } -if (address >= end_paddr) { -if (force) -break ; -else -pte_val (pte) =0 ; - } +if (address >= end_paddr) +break ;set_pte (pg_table, pte);
arch/powerpc/include/asm/mpic.h +7 -0
@@ -392,7 +392,14 @@ extern struct bus_type mpic_subsys;#define MPIC_REGSET_TSI108 MPIC_REGSET(1)/* Tsi108/109 PIC */ /* Get the version of primary MPIC */ +#ifdef CONFIG_MPIC extern u32 fsl_mpic_primary_get_version (void ); +#else +static inline u32 fsl_mpic_primary_get_version (void ) +{ +return 0 ; +} +#endif /* Allocate the controller structure and setup the linux irq descs * for the range if interrupts passed in. No HW initialization is
arch/s390/kvm/sthyi.c +5 -3
@@ -174,17 +174,19 @@ static void fill_hdr(struct sthyi_sctns *sctns)static void fill_stsi_mac (struct sthyi_sctns *sctns,struct sysinfo_1_1_1 *sysinfo) { +sclp_ocf_cpc_name_copy (sctns->mac.infmname); +if (*(u64 *)sctns->mac.infmname !=0 ) + sctns->mac.infmval1 |=MAC_NAME_VLD ; +if (stsi (sysinfo,1 ,1 ,1 ))return ; -sclp_ocf_cpc_name_copy (sctns->mac.infmname); -memcpy (sctns->mac.infmtype, sysinfo->type,sizeof (sctns->mac.infmtype));memcpy (sctns->mac.infmmanu, sysinfo->manufacturer,sizeof (sctns->mac.infmmanu));memcpy (sctns->mac.infmpman, sysinfo->plant,sizeof (sctns->mac.infmpman));memcpy (sctns->mac.infmseq, sysinfo->sequence,sizeof (sctns->mac.infmseq)); - sctns->mac.infmval1 |=MAC_ID_VLD |MAC_NAME_VLD ; + sctns->mac.infmval1 |=MAC_ID_VLD ; } static void fill_stsi_par(struct sthyi_sctns *sctns,
arch/sparc/include/asm/cpudata_64.h +1 -1
@@ -27,7 +27,7 @@ typedef struct {unsigned short sock_id;/* physical package */ unsigned short core_id;unsigned short max_cache_id;/* groupings of highest shared cache */ -unsigned short proc_id;/* strand (aka HW thread) id */ +signed short proc_id;/* strand (aka HW thread) id */ } cpuinfo_sparc;DECLARE_PER_CPU (cpuinfo_sparc, __cpu_data);
arch/sparc/kernel/perf_event.c +13 -4
@@ -926,6 +926,8 @@ static void read_in_all_counters(struct cpu_hw_events *cpuc)sparc_perf_event_update (cp, &cp->hw, cpuc->current_idx[i]); cpuc->current_idx[i] =PIC_NO_INDEX ; +if (cp->hw.state &PERF_HES_STOPPED ) + cp->hw.state |=PERF_HES_ARCH ; } } }
@@ -958,10 +960,12 @@ static void calculate_single_pcr(struct cpu_hw_events *cpuc) enc =perf_event_get_enc (cpuc->events[i]); cpuc->pcr[0 ] &= ~mask_for_index (idx); -if (hwc->state &PERF_HES_STOPPED ) +if (hwc->state &PERF_HES_ARCH ) { cpuc->pcr[0 ] |=nop_for_index (idx); -else + }else { cpuc->pcr[0 ] |=event_encoding (enc, idx); + hwc->state =0 ; + } } out: cpuc->pcr[0 ] |= cpuc->event[0 ]->hw.config_base;
@@ -987,6 +991,9 @@ static void calculate_multiple_pcrs(struct cpu_hw_events *cpuc) cpuc->current_idx[i] = idx; +if (cp->hw.state &PERF_HES_ARCH ) +continue ; +sparc_pmu_start (cp,PERF_EF_RELOAD ); } out:
@@ -1078,6 +1085,8 @@ static void sparc_pmu_start(struct perf_event *event, int flags) event->hw.state =0 ;sparc_pmu_enable_event (cpuc, &event->hw, idx); + +perf_event_update_userpage (event); }static void sparc_pmu_stop (struct perf_event *event,int flags)
@@ -1370,9 +1379,9 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags) cpuc->events[n0] = event->hw.event_base; cpuc->current_idx[n0] =PIC_NO_INDEX ; - event->hw.state =PERF_HES_UPTODATE ; + event->hw.state =PERF_HES_UPTODATE |PERF_HES_STOPPED ;if (!(ef_flags &PERF_EF_START )) - event->hw.state |=PERF_HES_STOPPED ; + event->hw.state |=PERF_HES_ARCH ;/* * If group events scheduling transaction was started,
arch/x86/boot/tools/build.c +7 -0
@@ -390,6 +390,13 @@ int main(int argc, char ** argv)die ("Unable to mmap '%s': %m" , argv[2 ]);/* Number of 16-byte paragraphs, including space for a 4-byte CRC */ sys_size = (sz +15 +4 ) /16 ; +#ifdef CONFIG_EFI_STUB +/* +* COFF requires minimum 32-byte alignment of sections, and +* adding a signature is problematic without that alignment. +*/ + sys_size = (sys_size +1 ) & ~1 ; +#endif /* Patch the setup code with the appropriate size parameters */ buf[0x1f1 ] = setup_sectors-1 ;
arch/x86/include/asm/cpufeatures.h +1 -0
@@ -213,6 +213,7 @@#define X86_FEATURE_STIBP ( 7*32+27)/* Single Thread Indirect Branch Predictors */ #define X86_FEATURE_ZEN ( 7*32+28)/* "" CPU is AMD family 0x17 (Zen) */ #define X86_FEATURE_L1TF_PTEINV ( 7*32+29)/* "" L1TF workaround PTE inversion */ +#define X86_FEATURE_IBRS_ENHANCED ( 7*32+30)/* Enhanced IBRS */ /* Virtualization flags: Linux defined, word 8 */ #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0)/* Intel TPR Shadow */
arch/x86/include/asm/nospec-branch.h +1 -0
@@ -215,6 +215,7 @@ enum spectre_v2_mitigation {SPECTRE_V2_RETPOLINE_GENERIC ,SPECTRE_V2_RETPOLINE_AMD ,SPECTRE_V2_IBRS , + SPECTRE_V2_IBRS_ENHANCED, };/* The Speculative Store Bypass disable variants */
arch/x86/kernel/check.c +15 -0
@@ -30,6 +30,11 @@ static __init int set_corruption_check(char *arg)ssize_t ret;unsigned long val; +if (!arg) { +pr_err ("memory_corruption_check config string not provided\n" ); +return -EINVAL ; + } + ret =kstrtoul (arg,10 , &val);if (ret)return ret;
@@ -44,6 +49,11 @@ static __init int set_corruption_check_period(char *arg)ssize_t ret;unsigned long val; +if (!arg) { +pr_err ("memory_corruption_check_period config string not provided\n" ); +return -EINVAL ; + } + ret =kstrtoul (arg,10 , &val);if (ret)return ret;
@@ -58,6 +68,11 @@ static __init int set_corruption_check_size(char *arg)char *end;unsigned size; +if (!arg) { +pr_err ("memory_corruption_check_size config string not provided\n" ); +return -EINVAL ; + } + size =memparse (arg, &end);if (*end =='\0' )
arch/x86/kernel/cpu/bugs.c +69 -8
133 lines not on this page · raw message
arch/x86/kernel/cpu/common.c +3 -0
@@ -959,6 +959,9 @@ static void __init cpu_set_bug_bits(struct cpuinfo_x86 *c)setup_force_cpu_bug (X86_BUG_SPECTRE_V1 );setup_force_cpu_bug (X86_BUG_SPECTRE_V2 ); +if (ia32_cap &ARCH_CAP_IBRS_ALL ) +setup_force_cpu_cap (X86_FEATURE_IBRS_ENHANCED ); +if (x86_match_cpu (cpu_no_meltdown))return ;
arch/x86/kernel/fpu/signal.c +0 -1
@@ -309,7 +309,6 @@ static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size)* thread's fpu state, reconstruct fxstate from the fsave * header. Sanitize the copied state etc. */ -struct fpu *fpu = &tsk->thread.fpu;struct user_i387_ia32_struct env;int err =0 ;
arch/x86/platform/olpc/olpc-xo1-rtc.c +3 -0
@@ -16,6 +16,7 @@#include <asm/msr.h> #include <asm/olpc.h> +#include <asm/x86_init.h> static void rtc_wake_on (struct device *dev) {
@@ -75,6 +76,8 @@ static int __init xo1_rtc_init(void)if (r)return r; + x86_platform.legacy.rtc =0 ; +device_init_wakeup (&xo1_rtc_device.dev,1 );return 0 ; }
arch/x86/xen/spinlock.c +14 -21
@@ -8,6 +8,7 @@#include <linux/log2.h> #include <linux/gfp.h> #include <linux/slab.h> +#include <linux/atomic.h> #include <asm/paravirt.h>
@@ -19,6 +20,7 @@ static DEFINE_PER_CPU(int, lock_kicker_irq) = -1; static DEFINE_PER_CPU(char *, irq_name); +static DEFINE_PER_CPU(atomic_t, xen_qlock_wait_nest);static bool xen_pvspin = true;#include <asm/qspinlock.h>
@@ -40,33 +42,24 @@ static void xen_qlock_kick(int cpu)static void xen_qlock_wait (u8 *byte,u8 val) {int irq =__this_cpu_read (lock_kicker_irq); +atomic_t *nest_cnt =this_cpu_ptr (&xen_qlock_wait_nest);/* If kicker interrupts not initialized yet, just spin */ -if (irq ==-1 ) +if (irq ==-1 ||in_nmi ())return ; -/* clear pending */ -xen_clear_irq_pending (irq); -barrier (); - -/* -* We check the byte value after clearing pending IRQ to make sure -* that we won't miss a wakeup event because of the clearing. -* -* The sync_clear_bit() call in xen_clear_irq_pending() is atomic. -* So it is effectively a memory barrier for x86. -*/ -if (READ_ONCE (*byte) != val) -return ; +/* Detect reentry. */ +atomic_inc (nest_cnt); -/* -* If an interrupt happens here, it will leave the wakeup irq -* pending, which will cause xen_poll_irq() to return -* immediately. -*/ +/* If irq pending already and no nested call clear it. */ +if (atomic_read (nest_cnt) ==1 &&xen_test_irq_pending (irq)) { +xen_clear_irq_pending (irq); + }else if (READ_ONCE (*byte) == val) { +/* Block until irq becomes pending (or a spurious wakeup) */ +xen_poll_irq (irq); + } -/* Block until irq becomes pending (or perhaps a spurious wakeup) */ -xen_poll_irq (irq); +atomic_dec (nest_cnt); }static irqreturn_t dummy_handler (int irq,void *dev_id)
crypto/lrw.c +6 -1
@@ -132,7 +132,12 @@ static inline int get_index128(be128 *block)return x +ffz (val); } -return x; +/* +* If we get here, then x == 128 and we are incrementing the counter +* from all ones to all zeros. This means we must return index 127, i.e. +* the one corresponding to key2*{ 1,...,1 }. +*/ +return 127 ; } static int crypt(struct blkcipher_desc *d,
crypto/tcrypt.c +3 -0
@@ -729,6 +729,9 @@ static void test_ahash_speed_common(const char *algo, unsigned int secs,break ; } +if (speed[i].klen) +crypto_ahash_setkey (tfm, tvmem[0 ], speed[i].klen); +pr_info ("test%3u " "(%5u byte blocks,%5u bytes per update,%4u updates): " , i, speed[i].blen, speed[i].plen, speed[i].blen / speed[i].plen);
drivers/acpi/acpi_lpss.c +2 -0
@@ -278,9 +278,11 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = { { "INT33FC", }, /* Braswell LPSS devices */ + { "80862286", LPSS_ADDR(lpss_dma_desc) }, { "80862288", LPSS_ADDR(bsw_pwm_dev_desc) }, { "8086228A", LPSS_ADDR(bsw_uart_dev_desc) }, { "8086228E", LPSS_ADDR(bsw_spi_dev_desc) }, + { "808622C0", LPSS_ADDR(lpss_dma_desc) }, { "808622C1", LPSS_ADDR(bsw_i2c_dev_desc) }, /* Broadwell LPSS devices */
drivers/block/ataflop.c +15 -10
@@ -1933,6 +1933,11 @@ static int __init atari_floppy_init (void) unit[i].disk =alloc_disk (1 );if (!unit[i].disk) goto Enomem; + + unit[i].disk->queue =blk_init_queue (do_fd_request, + &ataflop_lock); +if (!unit[i].disk->queue) + goto Enomem; }if (UseTrackbuffer <0 )
@@ -1964,10 +1969,6 @@ static int __init atari_floppy_init (void)sprintf (unit[i].disk->disk_name,"fd%d" , i); unit[i].disk->fops = &floppy_fops; unit[i].disk->private_data = &unit[i]; - unit[i].disk->queue =blk_init_queue (do_fd_request, - &ataflop_lock); -if (!unit[i].disk->queue) - goto Enomem;set_capacity (unit[i].disk,MAX_DISK_SIZE *2 );add_disk (unit[i].disk); }
@@ -1982,13 +1983,17 @@ static int __init atari_floppy_init (void)return 0 ; Enomem: -while (i--) { -struct request_queue *q = unit[i].disk->queue; +do { +struct gendisk *disk = unit[i].disk; -put_disk (unit[i].disk); -if (q) -blk_cleanup_queue (q); - } +if (disk) { +if (disk->queue) { +blk_cleanup_queue (disk->queue); + disk->queue =NULL ; + } +put_disk (unit[i].disk); + } + }while (i--);unregister_blkdev (FLOPPY_MAJOR ,"fd" );return -ENOMEM ;
drivers/block/swim.c +11 -2
@@ -868,8 +868,17 @@ static int swim_floppy_init(struct swim_priv *swd) exit_put_disks:unregister_blkdev (FLOPPY_MAJOR ,"fd" ); -while (drive--) -put_disk (swd->unit[drive].disk); +do { +struct gendisk *disk = swd->unit[drive].disk; + +if (disk) { +if (disk->queue) { +blk_cleanup_queue (disk->queue); + disk->queue =NULL ; + } +put_disk (disk); + } + }while (drive--);return err; }
drivers/block/xen-blkfront.c +3 -0
@@ -2524,6 +2524,9 @@ static int blkfront_remove(struct xenbus_device *xbdev)dev_dbg (&xbdev->dev,"%s removed" , xbdev->nodename); +if (!info) +return 0 ; +blkif_free (info,0 );mutex_lock (&info->mutex);
drivers/bluetooth/btbcm.c +1 -0
@@ -270,6 +270,7 @@ static const struct { { 0x4103, "BCM4330B1" }, /* 002.001.003 */ { 0x410e, "BCM43341B0" }, /* 002.001.014 */ { 0x4406, "BCM4324B3" }, /* 002.004.006 */ + { 0x6109, "BCM4335C0" }, /* 003.001.009 */ { 0x610c, "BCM4354" }, /* 003.001.012 */ { } };
drivers/char/ipmi/ipmi_ssif.c +6 -4
@@ -617,8 +617,9 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, flags =ipmi_ssif_lock_cond (ssif_info, &oflags); ssif_info->waiting_alert = true; ssif_info->rtc_us_timer =SSIF_MSG_USEC ; -mod_timer (&ssif_info->retry_timer, - jiffies +SSIF_MSG_JIFFIES ); +if (!ssif_info->stopping) +mod_timer (&ssif_info->retry_timer, + jiffies +SSIF_MSG_JIFFIES );ipmi_ssif_unlock_cond (ssif_info, flags);return ; }
@@ -950,8 +951,9 @@ static void msg_written_handler(struct ssif_info *ssif_info, int result, ssif_info->waiting_alert = true; ssif_info->retries_left =SSIF_RECV_RETRIES ; ssif_info->rtc_us_timer =SSIF_MSG_PART_USEC ; -mod_timer (&ssif_info->retry_timer, - jiffies +SSIF_MSG_PART_JIFFIES ); +if (!ssif_info->stopping) +mod_timer (&ssif_info->retry_timer, + jiffies +SSIF_MSG_PART_JIFFIES );ipmi_ssif_unlock_cond (ssif_info, flags); } }
drivers/char/tpm/tpm-interface.c +2 -1
@@ -420,7 +420,8 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, const void *cmd, header = cmd; err =be32_to_cpu (header->return_code); -if (err !=0 && desc) +if (err !=0 && err !=TPM_ERR_DISABLED && err !=TPM_ERR_DEACTIVATED + && desc)dev_err (&chip->dev,"A TPM error (%d) occurred %s\n" , err, desc);
drivers/char/tpm/xen-tpmfront.c +1 -1
@@ -203,7 +203,7 @@ static int setup_ring(struct xenbus_device *dev, struct tpm_private *priv)return -ENOMEM ; } - rv =xenbus_grant_ring (dev, &priv->shr,1 , &gref); + rv =xenbus_grant_ring (dev, priv->shr,1 , &gref);if (rv <0 )return rv;
drivers/cpufreq/cpufreq-dt.c +19 -15
@@ -32,6 +32,7 @@ struct private_data {struct device *cpu_dev;struct thermal_cooling_device *cdev;const char *reg_name; +bool have_static_opps; };static struct freq_attr *cpufreq_dt_attr[] = {
@@ -197,6 +198,15 @@ static int cpufreq_init(struct cpufreq_policy *policy) } } + priv =kzalloc (sizeof (*priv),GFP_KERNEL ); +if (!priv) { + ret = -ENOMEM ; + goto out_put_regulator; + } + + priv->reg_name = name; + priv->opp_table = opp_table; +/* * Initialize OPP tables for all policy->cpus. They will be shared by * all CPUs which have marked their CPUs shared with OPP bindings.
@@ -207,7 +217,8 @@ static int cpufreq_init(struct cpufreq_policy *policy)* * OPPs might be populated at runtime, don't check for error here */ -dev_pm_opp_of_cpumask_add_table (policy->cpus); +if (!dev_pm_opp_of_cpumask_add_table (policy->cpus)) + priv->have_static_opps = true;/* * But we need OPP table to function so if it is not there let's
@@ -233,19 +244,10 @@ static int cpufreq_init(struct cpufreq_policy *policy) __func__, ret); } - priv =kzalloc (sizeof (*priv),GFP_KERNEL ); -if (!priv) { - ret = -ENOMEM ; - goto out_free_opp; - } - - priv->reg_name = name; - priv->opp_table = opp_table; - ret =dev_pm_opp_init_cpufreq_table (cpu_dev, &freq_table);if (ret) {dev_err (cpu_dev,"failed to init cpufreq table: %d\n" , ret); - goto out_free_priv; + goto out_free_opp; } priv->cpu_dev = cpu_dev;
@@ -284,10 +286,11 @@ static int cpufreq_init(struct cpufreq_policy *policy) out_free_cpufreq_table:dev_pm_opp_free_cpufreq_table (cpu_dev, &freq_table); -out_free_priv: -kfree (priv); out_free_opp: -dev_pm_opp_of_cpumask_remove_table (policy->cpus); +if (priv->have_static_opps) +dev_pm_opp_of_cpumask_remove_table (policy->cpus); +kfree (priv); +out_put_regulator:if (name)dev_pm_opp_put_regulator (opp_table); out_put_clk:
@@ -302,7 +305,8 @@ static int cpufreq_exit(struct cpufreq_policy *policy)cpufreq_cooling_unregister (priv->cdev);dev_pm_opp_free_cpufreq_table (priv->cpu_dev, &policy->freq_table); -dev_pm_opp_of_cpumask_remove_table (policy->related_cpus); +if (priv->have_static_opps) +dev_pm_opp_of_cpumask_remove_table (policy->related_cpus);if (priv->reg_name)dev_pm_opp_put_regulator (priv->opp_table);
drivers/crypto/caam/regs.h +14 -14
@@ -68,22 +68,22 @@extern bool caam_little_end; -#define caam_to_cpu (len) \ -static inline u##len caam##len ## _to_cpu(u##len val) \ -{ \ - if (caam_little_end) \ - return le##len ## _to_cpu(val); \ - else \ - return be##len ## _to_cpu(val); \ +#define caam_to_cpu (len) \ +static inline u##len caam##len ## _to_cpu(u##len val) \ +{ \ + if (caam_little_end) \ + return le##len ## _to_cpu((__force __le##len)val); \ + else \ + return be##len ## _to_cpu((__force __be##len)val); \ } -#define cpu_to_caam (len) \ -static inline u##len cpu_to_caam##len(u##len val) \ -{ \ - if (caam_little_end) \ - return cpu_to_le##len(val); \ - else \ - return cpu_to_be##len(val); \ +#define cpu_to_caam (len) \ +static inline u##len cpu_to_caam##len(u##len val) \ +{ \ + if (caam_little_end) \ + return (__force u##len)cpu_to_le##len(val); \ + else \ + return (__force u##len)cpu_to_be##len(val); \ }caam_to_cpu (16 )
drivers/dma/dma-jz4780.c +5 -0
@@ -754,6 +754,11 @@ static int jz4780_dma_probe(struct platform_device *pdev)struct resource *res;int i, ret; +if (!dev->of_node) { +dev_err (dev,"This driver must be probed from devicetree\n" ); +return -EINVAL ; + } + jzdma =devm_kzalloc (dev,sizeof (*jzdma),GFP_KERNEL );if (!jzdma)return -ENOMEM ;
drivers/dma/ioat/init.c +8 -1
@@ -1210,8 +1210,15 @@ static void ioat_shutdown(struct pci_dev *pdev)spin_lock_bh (&ioat_chan->prep_lock);set_bit (IOAT_CHAN_DOWN , &ioat_chan->state); -del_timer_sync (&ioat_chan->timer);spin_unlock_bh (&ioat_chan->prep_lock); +/* +* Synchronization rule for del_timer_sync(): +* - The caller must not hold locks which would prevent +* completion of the timer's handler. +* So prep_lock cannot be held before calling it. +*/ +del_timer_sync (&ioat_chan->timer); +/* this should quiesce then reset */ ioat_reset_hw (ioat_chan); }
drivers/edac/i7core_edac.c +1 -0
@@ -1711,6 +1711,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,u32 errnum =find_first_bit (&error,32 );if (uncorrected_error) { + core_err_cnt =1 ;if (ripv) tp_event =HW_EVENT_ERR_FATAL ;else
drivers/edac/sb_edac.c +1 -0
@@ -2934,6 +2934,7 @@ static void sbridge_mce_output_error(struct mem_ctl_info *mci, recoverable =GET_BITFIELD (m->status,56 ,56 );if (uncorrected_error) { + core_err_cnt =1 ;if (ripv) { type ="FATAL" ; tp_event =HW_EVENT_ERR_FATAL ;
drivers/edac/skx_edac.c +2 -1
@@ -606,7 +606,7 @@ static bool skx_sad_decode(struct decoded_addr *res)break ;case 2 : lchan = (addr >> shift) %2 ; - lchan = (lchan <<1 ) | ~lchan; + lchan = (lchan <<1 ) | !lchan;break ;case 3 : lchan = ((addr >> shift) %2 ) <<1 ;
@@ -897,6 +897,7 @@ static void skx_mce_output_error(struct mem_ctl_info *mci, recoverable =GET_BITFIELD (m->status,56 ,56 );if (uncorrected_error) { + core_err_cnt =1 ;if (ripv) { type ="FATAL" ; tp_event =HW_EVENT_ERR_FATAL ;
drivers/hid/usbhid/hiddev.c +14 -4
@@ -521,14 +521,24 @@ static noinline int hiddev_ioctl_usage(struct hiddev *hiddev, unsigned int cmd,if (cmd ==HIDIOCGCOLLECTIONINDEX ) {if (uref->usage_index >= field->maxusage) goto inval; + uref->usage_index = +array_index_nospec (uref->usage_index, + field->maxusage); }else if (uref->usage_index >= field->report_count) goto inval; } -if ((cmd ==HIDIOCGUSAGES || cmd ==HIDIOCSUSAGES ) && - (uref_multi->num_values >HID_MAX_MULTI_USAGES || - uref->usage_index + uref_multi->num_values > field->report_count)) - goto inval; +if (cmd ==HIDIOCGUSAGES || cmd ==HIDIOCSUSAGES ) { +if (uref_multi->num_values >HID_MAX_MULTI_USAGES || + uref->usage_index + uref_multi->num_values > + field->report_count) + goto inval; + + uref->usage_index = +array_index_nospec (uref->usage_index, + field->report_count - + uref_multi->num_values); + }switch (cmd) {case HIDIOCGUSAGE :
drivers/hwmon/pmbus/pmbus.c +2 -0
@@ -118,6 +118,8 @@ static int pmbus_identify(struct i2c_client *client, }else { info->pages =1 ; } + +pmbus_clear_faults (client); }if (pmbus_check_byte_register (client,0 ,PMBUS_VOUT_MODE )) {
drivers/hwmon/pmbus/pmbus_core.c +4 -1
@@ -1759,7 +1759,10 @@ static int pmbus_init_common(struct i2c_client *client, struct pmbus_data *data,if (ret >=0 && (ret &PB_CAPABILITY_ERROR_CHECK )) client->flags |=I2C_CLIENT_PEC ; -pmbus_clear_faults (client); +if (data->info->pages) +pmbus_clear_faults (client); +else +pmbus_clear_fault_page (client,-1 );if (info->identify) { ret = (*info->identify)(client, info);
drivers/hwmon/pwm-fan.c +11 -1
@@ -306,9 +306,19 @@ static int pwm_fan_remove(struct platform_device *pdev)static int pwm_fan_suspend (struct device *dev) {struct pwm_fan_ctx *ctx =dev_get_drvdata (dev); +struct pwm_args args; +int ret; + +pwm_get_args (ctx->pwm, &args); + +if (ctx->pwm_value) { + ret =pwm_config (ctx->pwm,0 , args.period); +if (ret <0 ) +return ret; -if (ctx->pwm_value)pwm_disable (ctx->pwm); + } +return 0 ; }
drivers/hwtracing/coresight/coresight-etb10.c +4 -0
@@ -155,6 +155,10 @@ static int etb_enable(struct coresight_device *csdev, u32 mode)if (val ==CS_MODE_PERF )return -EBUSY ; +/* Don't let perf disturb sysFS sessions */ +if (val ==CS_MODE_SYSFS && mode ==CS_MODE_PERF ) +return -EBUSY ; +/* Nothing to do, the tracer is already enabled. */ if (val ==CS_MODE_SYSFS ) goto out;
drivers/i2c/busses/i2c-rcar.c +5 -1
@@ -723,8 +723,12 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap, time_left =wait_event_timeout (priv->wait, priv->flags &ID_DONE , num * adap->timeout); -if (!time_left) { + +/* cleanup DMA if it couldn't complete properly due to an error */ +if (priv->dma_direction !=DMA_NONE )rcar_i2c_cleanup_dma (priv); + +if (!time_left) {rcar_i2c_init (priv); ret = -ETIMEDOUT ; }else if (priv->flags &ID_NACK ) {
drivers/iio/adc/at91_adc.c +5 -1
@@ -247,12 +247,14 @@ static irqreturn_t at91_adc_trigger_handler(int irq, void *p)struct iio_poll_func *pf = p;struct iio_dev *idev = pf->indio_dev;struct at91_adc_state *st =iio_priv (idev); +struct iio_chan_spec const *chan;int i, j =0 ;for (i =0 ; i < idev->masklength; i++) {if (!test_bit (i, idev->active_scan_mask))continue ; - st->buffer[j] =at91_adc_readl (st,AT91_ADC_CHAN (st, i)); + chan = idev->channels + i; + st->buffer[j] =at91_adc_readl (st,AT91_ADC_CHAN (st, chan->channel)); j++; }
@@ -278,6 +280,8 @@ static void handle_adc_eoc_trigger(int irq, struct iio_dev *idev)iio_trigger_poll (idev->trig); }else { st->last_value =at91_adc_readl (st,AT91_ADC_CHAN (st, st->chnb)); +/* Needed to ACK the DRDY interruption */ +at91_adc_readl (st,AT91_ADC_LCDR ); st->done = true;wake_up_interruptible (&st->wq_data_avail); }
drivers/iio/adc/fsl-imx25-gcq.c +6 -0
@@ -209,12 +209,14 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev, ret =of_property_read_u32 (child,"reg" , ®);if (ret) {dev_err (dev,"Failed to get reg property\n" ); +of_node_put (child);return ret; }if (reg >=MX25_NUM_CFGS ) {dev_err (dev,"reg value is greater than the number of available configuration registers\n" ); +of_node_put (child);return -EINVAL ; }
@@ -228,6 +230,7 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,if (IS_ERR (priv->vref[refp])) {dev_err (dev,"Error, trying to use external voltage reference without a vref-%s regulator." , mx25_gcq_refp_names[refp]); +of_node_put (child);return PTR_ERR (priv->vref[refp]); } priv->channel_vref_mv[reg] =
@@ -240,6 +243,7 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,break ;default :dev_err (dev,"Invalid positive reference %d\n" , refp); +of_node_put (child);return -EINVAL ; }
@@ -254,10 +258,12 @@ static int mx25_gcq_setup_cfgs(struct platform_device *pdev,if ((refp &MX25_ADCQ_CFG_REFP_MASK ) != refp) {dev_err (dev,"Invalid fsl,adc-refp property value\n" ); +of_node_put (child);return -EINVAL ; }if ((refn &MX25_ADCQ_CFG_REFN_MASK ) != refn) {dev_err (dev,"Invalid fsl,adc-refn property value\n" ); +of_node_put (child);return -EINVAL ; }
drivers/iio/dac/ad5064.c +38 -15
66 lines not on this page · raw message
drivers/infiniband/core/sysfs.c +12 -7
@@ -485,7 +485,7 @@ static ssize_t show_pma_counter(struct ib_port *p, struct port_attribute *attr, ret =get_perf_mad (p->ibdev, p->port_num, tab_attr->attr_id, &data,40 + offset /8 ,sizeof (data));if (ret <0 ) -return sprintf (buf,"N/A (no PMA)\n" ); +return ret;switch (width) {case 4 :
@@ -1008,10 +1008,12 @@ static int add_port(struct ib_device *device, int port_num, goto err_put; } - p->pma_table =get_counter_table (device, port_num); - ret =sysfs_create_group (&p->kobj, p->pma_table); -if (ret) - goto err_put_gid_attrs; +if (device->process_mad) { + p->pma_table =get_counter_table (device, port_num); + ret =sysfs_create_group (&p->kobj, p->pma_table); +if (ret) + goto err_put_gid_attrs; + } p->gid_group.name ="gids" ; p->gid_group.attrs =alloc_group_attrs (show_port_gid, attr.gid_tbl_len);
@@ -1124,7 +1126,8 @@ static int add_port(struct ib_device *device, int port_num, p->gid_group.attrs =NULL ; err_remove_pma: -sysfs_remove_group (&p->kobj, p->pma_table); +if (p->pma_table) +sysfs_remove_group (&p->kobj, p->pma_table); err_put_gid_attrs:kobject_put (&p->gid_attr_group->kobj);
@@ -1236,7 +1239,9 @@ static void free_port_list_attributes(struct ib_device *device)kfree (port->hw_stats);free_hsag (&port->kobj, port->hw_stats_ag); } -sysfs_remove_group (p, port->pma_table); + +if (port->pma_table) +sysfs_remove_group (p, port->pma_table);sysfs_remove_group (p, &port->pkey_group);sysfs_remove_group (p, &port->gid_group); sysfs_remove_group(&port->gid_attr_group->kobj,
drivers/infiniband/ulp/ipoib/ipoib_cm.c +6 -2
@@ -1422,11 +1422,15 @@ static void ipoib_cm_skb_reap(struct work_struct *work)spin_unlock_irqrestore (&priv->lock, flags);netif_tx_unlock_bh (dev); -if (skb->protocol ==htons (ETH_P_IP )) +if (skb->protocol ==htons (ETH_P_IP )) { +memset (IPCB (skb),0 ,sizeof (*IPCB (skb)));icmp_send (skb,ICMP_DEST_UNREACH ,ICMP_FRAG_NEEDED ,htonl (mtu)); + }#if IS_ENABLED (CONFIG_IPV6 ) - else if (skb->protocol == htons(ETH_P_IPV6)) + else if (skb->protocol == htons(ETH_P_IPV6)) { +memset (IP6CB (skb),0 ,sizeof (*IP6CB (skb)));icmpv6_send (skb,ICMPV6_PKT_TOOBIG ,0 , mtu); + }#endif dev_kfree_skb_any (skb);
drivers/md/bcache/btree.c +1 -1
@@ -2367,7 +2367,7 @@ static int refill_keybuf_fn(struct btree_op *op, struct btree *b,struct keybuf *buf = refill->buf;int ret =MAP_CONTINUE ; -if (bkey_cmp (k, refill->end) >=0 ) { +if (bkey_cmp (k, refill->end) >0 ) { ret =MAP_DONE ; goto out; }
drivers/md/dm-ioctl.c +6 -12
@@ -1692,8 +1692,7 @@ static void free_params(struct dm_ioctl *param, size_t param_size, int param_fla }static int copy_params (struct dm_ioctl __user *user,struct dm_ioctl *param_kernel, -int ioctl_flags, -struct dm_ioctl **param,int *param_flags) +int ioctl_flags,struct dm_ioctl **param,int *param_flags) {struct dm_ioctl *dmi;int secure_data;
@@ -1738,18 +1737,13 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl *param_kern *param_flags |=DM_PARAMS_MALLOC ; -if (copy_from_user (dmi, user, param_kernel->data_size)) - goto bad; +/* Copy from param_kernel (which was already copied from user) */ +memcpy (dmi, param_kernel, minimum_data_size); -data_copied: -/* -* Abort if something changed the ioctl data while it was being copied. -*/ -if (dmi->data_size != param_kernel->data_size) { -DMERR ("rejecting ioctl: data size modified while processing parameters" ); +if (copy_from_user (&dmi->data, (char __user *)user + minimum_data_size, + param_kernel->data_size - minimum_data_size)) goto bad; - } - +data_copied:/* Wipe the user buffer so we do not return it to userspace */ if (secure_data &&clear_user (user, param_kernel->data_size)) goto bad;
drivers/md/raid1.c +1 -0
@@ -1589,6 +1589,7 @@ static int raid1_add_disk(struct mddev *mddev, struct md_rdev *rdev)*/ if (rdev->saved_raid_disk >=0 && rdev->saved_raid_disk >= first && + rdev->saved_raid_disk < conf->raid_disks && conf->mirrors[rdev->saved_raid_disk].rdev ==NULL ) first = last = rdev->saved_raid_disk;
drivers/md/raid10.c +1 -0
@@ -1734,6 +1734,7 @@ static int raid10_add_disk(struct mddev *mddev, struct md_rdev *rdev) first = last = rdev->raid_disk;if (rdev->saved_raid_disk >= first && + rdev->saved_raid_disk < conf->geo.raid_disks && conf->mirrors[rdev->saved_raid_disk].rdev ==NULL ) mirror = rdev->saved_raid_disk;else
drivers/media/common/v4l2-tpg/v4l2-tpg-core.c +1 -1
@@ -1650,7 +1650,7 @@ typedef struct { u16 __; u8 _; } __packed x24; pos[7 ] = (chr & (0x01 <<0 ) ? fg : bg); \ } \ \ - pos += (tpg->hflip ?-8 :8 ) / hdiv; \ + pos += (tpg->hflip ?-8 :8 ) / (int )hdiv; \ } \ } \ }while (0 )
drivers/media/i2c/tvp5150.c +1 -1
@@ -1527,7 +1527,7 @@ static int tvp5150_probe(struct i2c_client *c, 27000000, 1, 27000000);v4l2_ctrl_new_std_menu_items (&core->hdl, &tvp5150_ctrl_ops,V4L2_CID_TEST_PATTERN , -ARRAY_SIZE (tvp5150_test_patterns), +ARRAY_SIZE (tvp5150_test_patterns) -1 ,0 ,0 , tvp5150_test_patterns); sd->ctrl_handler = &core->hdl;if (core->hdl.error) {
drivers/media/usb/em28xx/em28xx-cards.c +2 -2
@@ -2093,13 +2093,13 @@ struct em28xx_board em28xx_boards[] = { .input = { { .type = EM28XX_VMUX_COMPOSITE, .vmux = TVP5150_COMPOSITE1, - .amux = EM28XX_AUDIO_SRC_LINE, + .amux = EM28XX_AMUX_LINE_IN, .gpio = terratec_av350_unmute_gpio, }, { .type = EM28XX_VMUX_SVIDEO, .vmux = TVP5150_SVIDEO, - .amux = EM28XX_AUDIO_SRC_LINE, + .amux = EM28XX_AMUX_LINE_IN, .gpio = terratec_av350_unmute_gpio, } }, },
drivers/media/usb/em28xx/em28xx-video.c +5 -3
@@ -1290,6 +1290,8 @@ static void em28xx_ctrl_notify(struct v4l2_ctrl *ctrl, void *priv) {struct em28xx *dev = priv; + dev->v4l2->field_count =0 ; +/* * In the case of non-AC97 volume controls, we still need * to do some setups at em28xx, in order to mute/unmute
@@ -1435,9 +1437,9 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, fmt =format_by_fourcc (f->fmt.pix.pixelformat);if (!fmt) { -em28xx_videodbg ("Fourcc format (%08x) invalid.\n" , - f->fmt.pix.pixelformat); -return -EINVAL ; + fmt = &format[0 ]; +em28xx_videodbg ("Fourcc format (%08x) invalid. Using default (%08x).\n" , + f->fmt.pix.pixelformat, fmt->fourcc); }if (dev->board.is_em2800) {
drivers/misc/genwqe/card_base.h +1 -1
@@ -404,7 +404,7 @@ struct genwqe_file {struct file *filp;struct fasync_struct *async_queue; -struct task_struct *owner; +struct pid *opener;struct list_head list;/* entry in list of open files */ spinlock_t map_lock;/* lock for dma_mappings */
drivers/misc/genwqe/card_dev.c +5 -4
@@ -52,7 +52,7 @@ static void genwqe_add_file(struct genwqe_dev *cd, struct genwqe_file *cfile) {unsigned long flags; - cfile->owner = current; + cfile->opener =get_pid (task_tgid (current));spin_lock_irqsave (&cd->file_lock, flags);list_add (&cfile->list, &cd->file_list);spin_unlock_irqrestore (&cd->file_lock, flags);
@@ -65,6 +65,7 @@ static int genwqe_del_file(struct genwqe_dev *cd, struct genwqe_file *cfile)spin_lock_irqsave (&cd->file_lock, flags);list_del (&cfile->list);spin_unlock_irqrestore (&cd->file_lock, flags); +put_pid (cfile->opener);return 0 ; }
@@ -275,7 +276,7 @@ static int genwqe_kill_fasync(struct genwqe_dev *cd, int sig)return files; } -static int genwqe_force_sig (struct genwqe_dev *cd,int sig) +static int genwqe_terminate (struct genwqe_dev *cd) {unsigned int files =0 ;unsigned long flags;
@@ -283,7 +284,7 @@ static int genwqe_force_sig(struct genwqe_dev *cd, int sig)spin_lock_irqsave (&cd->file_lock, flags);list_for_each_entry (cfile, &cd->file_list, list) { -force_sig (sig, cfile->owner); +kill_pid (cfile->opener,SIGKILL ,1 ); files++; }spin_unlock_irqrestore (&cd->file_lock, flags);
@@ -1356,7 +1357,7 @@ static int genwqe_inform_and_stop_processes(struct genwqe_dev *cd)dev_warn (&pci_dev->dev,"[%s] send SIGKILL and wait ...\n" , __func__); - rc =genwqe_force_sig (cd,SIGKILL );/* force terminate */ + rc =genwqe_terminate (cd);if (rc) {/* Give kill_timout more seconds to end processes */ for (i = 0; (i < genwqe_kill_timeout) &&
drivers/misc/vmw_vmci/vmci_driver.c +1 -1
@@ -113,5 +113,5 @@ module_exit(vmci_drv_exit);MODULE_AUTHOR ("VMware, Inc." );MODULE_DESCRIPTION ("VMware Virtual Machine Communication Interface." ); -MODULE_VERSION ("1.1.5.0-k" ); +MODULE_VERSION ("1.1.6.0-k" );MODULE_LICENSE ("GPL v2" );
drivers/misc/vmw_vmci/vmci_resource.c +2 -1
@@ -56,7 +56,8 @@ static struct vmci_resource *vmci_resource_lookup(struct vmci_handle handle,if (r->type == type && rid == handle.resource && - (cid == handle.context || cid ==VMCI_INVALID_ID )) { + (cid == handle.context || cid ==VMCI_INVALID_ID || + handle.context ==VMCI_INVALID_ID )) { resource = r;break ; }
drivers/mmc/host/sdhci-pci-o2micro.c +3 -0
@@ -334,6 +334,9 @@ int sdhci_pci_o2_probe(struct sdhci_pci_chip *chip)pci_write_config_byte (chip->pdev,O2_SD_LOCK_WP , scratch);break ;case PCI_DEVICE_ID_O2_SEABIRD0 : +if (chip->pdev->revision ==0x01 ) + chip->quirks |=SDHCI_QUIRK_DELAY_AFTER_POWER ; +/* fall through */ case PCI_DEVICE_ID_O2_SEABIRD1 :/* UnLock WP */ ret = pci_read_config_byte(chip->pdev,
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +4 -0
@@ -3419,6 +3419,10 @@ static void ixgbevf_tx_csum(struct ixgbevf_ring *tx_ring,skb_checksum_help (skb); goto no_csum; } + +if (first->protocol ==htons (ETH_P_IP )) + type_tucmd |=IXGBE_ADVTXD_TUCMD_IPV4 ; +/* update TX checksum flag */ first->tx_flags |=IXGBE_TX_FLAGS_CSUM ; vlan_macip_lens = skb_checksum_start_offset(skb) -
drivers/net/ethernet/qlogic/qla3xxx.c +0 -2
@@ -380,8 +380,6 @@ static void fm93c56a_select(struct ql3_adapter *qdev) qdev->eeprom_cmd_data =AUBURN_EEPROM_CS_1 ;ql_write_nvram_reg (qdev, spir,ISP_NVRAM_MASK | qdev->eeprom_cmd_data); -ql_write_nvram_reg (qdev, spir, - ((ISP_NVRAM_MASK <<16 ) | qdev->eeprom_cmd_data)); }/*
drivers/net/tun.c +2 -0
@@ -1570,6 +1570,8 @@ static void tun_setup(struct net_device *dev)*/ static int tun_validate (struct nlattr *tb[],struct nlattr *data[]) { +if (!data) +return 0 ;return -EINVAL ; }
drivers/net/wireless/ath/ath10k/wmi.c +6 -0
@@ -1822,6 +1822,12 @@ int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id)if (ret)dev_kfree_skb_any (skb); +if (ret == -EAGAIN ) { +ath10k_warn (ar,"wmi command %d timeout, restarting hardware\n" , + cmd_id); +queue_work (ar->workqueue, &ar->restart_work); + } +return ret; }
drivers/net/wireless/broadcom/brcm80211/brcmutil/d11.c +33 -1
@@ -77,6 +77,8 @@ static u16 d11ac_bw(enum brcmu_chan_bw bw)return BRCMU_CHSPEC_D11AC_BW_40 ;case BRCMU_CHAN_BW_80 :return BRCMU_CHSPEC_D11AC_BW_80 ; +case BRCMU_CHAN_BW_160 : +return BRCMU_CHSPEC_D11AC_BW_160 ;default :WARN_ON (1 ); }
@@ -190,8 +192,38 @@ static void brcmu_d11ac_decchspec(struct brcmu_chan *ch)break ; }break ; -case BRCMU_CHSPEC_D11AC_BW_8080 :case BRCMU_CHSPEC_D11AC_BW_160 : +switch (ch->sb) { +case BRCMU_CHAN_SB_LLL : + ch->control_ch_num -=CH_70MHZ_APART ; +break ; +case BRCMU_CHAN_SB_LLU : + ch->control_ch_num -=CH_50MHZ_APART ; +break ; +case BRCMU_CHAN_SB_LUL : + ch->control_ch_num -=CH_30MHZ_APART ; +break ; +case BRCMU_CHAN_SB_LUU : + ch->control_ch_num -=CH_10MHZ_APART ; +break ; +case BRCMU_CHAN_SB_ULL : + ch->control_ch_num +=CH_10MHZ_APART ; +break ; +case BRCMU_CHAN_SB_ULU : + ch->control_ch_num +=CH_30MHZ_APART ; +break ; +case BRCMU_CHAN_SB_UUL : + ch->control_ch_num +=CH_50MHZ_APART ; +break ; +case BRCMU_CHAN_SB_UUU : + ch->control_ch_num +=CH_70MHZ_APART ; +break ; +default : +WARN_ON_ONCE (1 ); +break ; + } +break ; +case BRCMU_CHSPEC_D11AC_BW_8080 :default :WARN_ON_ONCE (1 );break ;
drivers/net/wireless/broadcom/brcm80211/include/brcmu_wifi.h +2 -0
@@ -29,6 +29,8 @@#define CH_UPPER_SB 0x01#define CH_LOWER_SB 0x02#define CH_EWA_VALID 0x04 +#define CH_70MHZ_APART 14 +#define CH_50MHZ_APART 10#define CH_30MHZ_APART 6#define CH_20MHZ_APART 4#define CH_10MHZ_APART 2
drivers/net/wireless/intel/iwlwifi/mvm/rs.c +19 -5
@@ -1207,7 +1207,11 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, !(info->flags & IEEE80211_TX_STAT_AMPDU)) return; -rs_rate_from_ucode_rate (tx_resp_hwrate, info->band, &tx_resp_rate); +if (rs_rate_from_ucode_rate (tx_resp_hwrate, info->band, + &tx_resp_rate)) { +WARN_ON_ONCE (1 ); +return ; + }#ifdef CONFIG_MAC80211_DEBUGFS /* Disable last tx check if we are debugging with fixed rate but
@@ -1263,7 +1267,10 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,*/ table = &lq_sta->lq; lq_hwrate =le32_to_cpu (table->rs_table[0 ]); -rs_rate_from_ucode_rate (lq_hwrate, info->band, &lq_rate); +if (rs_rate_from_ucode_rate (lq_hwrate, info->band, &lq_rate)) { +WARN_ON_ONCE (1 ); +return ; + }/* Here we actually compare this rate to the latest LQ command */ if (!rs_rate_equal (&tx_resp_rate, &lq_rate, allow_ant_mismatch)) {
@@ -1365,8 +1372,12 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,/* Collect data for each rate used during failed TX attempts */ for (i =0 ; i <= retries; ++i) { lq_hwrate =le32_to_cpu (table->rs_table[i]); -rs_rate_from_ucode_rate (lq_hwrate, info->band, - &lq_rate); +if (rs_rate_from_ucode_rate (lq_hwrate, info->band, + &lq_rate)) { +WARN_ON_ONCE (1 ); +return ; + } +/* * Only collect stats if retried rate is in the same RS * table as active/search.
@@ -3261,7 +3272,10 @@ static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm,for (i =0 ; i < num_rates; i++) lq_cmd->rs_table[i] = ucode_rate_le32; -rs_rate_from_ucode_rate (ucode_rate, band, &rate); +if (rs_rate_from_ucode_rate (ucode_rate, band, &rate)) { +WARN_ON_ONCE (1 ); +return ; + }if (is_mimo (&rate)) lq_cmd->mimo_delim = num_rates -1 ;
drivers/net/wireless/intel/iwlwifi/pcie/rx.c +21 -11
@@ -1030,6 +1030,14 @@ void iwl_pcie_rx_free(struct iwl_trans *trans)kfree (trans_pcie->rxq); } +static void iwl_pcie_rx_move_to_allocator (struct iwl_rxq *rxq, +struct iwl_rb_allocator *rba) +{ +spin_lock (&rba->lock); +list_splice_tail_init (&rxq->rx_used, &rba->rbd_empty); +spin_unlock (&rba->lock); +} +/* * iwl_pcie_rx_reuse_rbd - Recycle used RBDs *
@@ -1061,9 +1069,7 @@ static void iwl_pcie_rx_reuse_rbd(struct iwl_trans *trans,if ((rxq->used_count %RX_CLAIM_REQ_ALLOC ) ==RX_POST_REQ_ALLOC ) {/* Move the 2 RBDs to the allocator ownership. Allocator has another 6 from pool for the request completion*/ -spin_lock (&rba->lock); -list_splice_tail_init (&rxq->rx_used, &rba->rbd_empty); -spin_unlock (&rba->lock); +iwl_pcie_rx_move_to_allocator (rxq, rba);atomic_inc (&rba->req_pending);queue_work (rba->alloc_wq, &rba->rx_alloc);
@@ -1233,10 +1239,18 @@ static void iwl_pcie_rx_handle(struct iwl_trans *trans, int queue)IWL_DEBUG_RX (trans,"Q %d: HW = SW = %d\n" , rxq->id, r);while (i != r) { +struct iwl_rb_allocator *rba = &trans_pcie->rba;struct iwl_rx_mem_buffer *rxb; - -if (unlikely (rxq->used_count == rxq->queue_size /2 )) +/* number of RBDs still waiting for page allocation */ +u32 rb_pending_alloc = +atomic_read (&trans_pcie->rba.req_pending) * +RX_CLAIM_REQ_ALLOC ; + +if (unlikely (rb_pending_alloc >= rxq->queue_size /2 && + !emergency)) { +iwl_pcie_rx_move_to_allocator (rxq, rba); emergency = true; + }if (trans->cfg->mq_rx_supported) {/*
@@ -1279,17 +1293,13 @@ static void iwl_pcie_rx_handle(struct iwl_trans *trans, int queue)iwl_pcie_rx_allocator_get (trans, rxq);if (rxq->used_count %RX_CLAIM_REQ_ALLOC ==0 && !emergency) { -struct iwl_rb_allocator *rba = &trans_pcie->rba; -/* Add the remaining empty RBDs for allocator use */ -spin_lock (&rba->lock); -list_splice_tail_init (&rxq->rx_used, &rba->rbd_empty); -spin_unlock (&rba->lock); +iwl_pcie_rx_move_to_allocator (rxq, rba); }else if (emergency) { count++;if (count ==8 ) { count =0 ; -if (rxq->used_count < rxq->queue_size /3 ) +if (rb_pending_alloc < rxq->queue_size /3 ) emergency = false; rxq->read = i;
drivers/net/wireless/marvell/libertas/if_usb.c +0 -2
@@ -468,8 +468,6 @@ static int __if_usb_submit_rx_urb(struct if_usb_card *cardp,MRVDRV_ETH_RX_PACKET_BUFFER_SIZE , callbackfn, cardp); - cardp->rx_urb->transfer_flags |=URB_ZERO_PACKET ; -lbs_deb_usb2 (&cardp->udev->dev,"Pointer for rx_urb %p\n" , cardp->rx_urb);if ((ret =usb_submit_urb (cardp->rx_urb,GFP_ATOMIC ))) {lbs_deb_usbd (&cardp->udev->dev,"Submit Rx URB failed: %d\n" , ret);
drivers/nvdimm/bus.c +4 -0
@@ -424,6 +424,8 @@ static void nd_async_device_register(void *d, async_cookie_t cookie)put_device (dev); }put_device (dev); +if (dev->parent) +put_device (dev->parent); }static void nd_async_device_unregister (void *d,async_cookie_t cookie)
@@ -443,6 +445,8 @@ void __nd_device_register(struct device *dev)if (!dev)return ; dev->bus = &nvdimm_bus_type; +if (dev->parent) +get_device (dev->parent);get_device (dev);async_schedule_domain (nd_async_device_register, dev, &nd_async_domain);
drivers/pci/msi.c +6 -3
@@ -981,7 +981,6 @@ static int __pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, } } } -WARN_ON (!!dev->msix_enabled);/* Check whether driver already requested for MSI irq */ if (dev->msi_enabled) {
@@ -1068,8 +1067,6 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,if (!pci_msi_supported (dev, minvec))return -EINVAL ; -WARN_ON (!!dev->msi_enabled); -/* Check whether driver already requested MSI-X irqs */ if (dev->msix_enabled) { dev_info(&dev->dev,
@@ -1080,6 +1077,9 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec,if (maxvec < minvec)return -ERANGE ; +if (WARN_ON_ONCE (dev->msi_enabled)) +return -EINVAL ; + nvec =pci_msi_vec_count (dev);if (nvec <0 )return nvec;
@@ -1138,6 +1138,9 @@ static int __pci_enable_msix_range(struct pci_dev *dev,if (maxvec < minvec)return -ERANGE ; +if (WARN_ON_ONCE (dev->msix_enabled)) +return -EINVAL ; +for (;;) {if (affinity) { nvec = irq_calc_affinity_vectors(dev->irq_affinity,
drivers/pci/quirks.c +4 -0
@@ -3124,7 +3124,11 @@ static void disable_igfx_irq(struct pci_dev *dev)pci_iounmap (dev, regs); } +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0042 , disable_igfx_irq); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0046 , disable_igfx_irq); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x004a , disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0102 , disable_igfx_irq); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0106 , disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x010a , disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0152 , disable_igfx_irq);
drivers/pcmcia/ricoh.h +35 -0
@@ -119,6 +119,10 @@#define RL5C4XX_MISC_CONTROL 0x2F/* 8 bit */ #define RL5C4XX_ZV_ENABLE 0x08 +/* Misc Control 3 Register */ +#define RL5C4XX_MISC3 0x00A2/* 16 bit */ +#define RL5C47X_MISC3_CB_CLKRUN_DIS BIT(1) +#ifdef __YENTA_H#define rl_misc (socket) ((socket)->private[0])
@@ -156,6 +160,35 @@ static void ricoh_set_zv(struct yenta_socket *socket) } } +static void ricoh_set_clkrun (struct yenta_socket *socket,bool quiet) +{ +u16 misc3; + +/* +* RL5C475II likely has this setting, too, however no datasheet +* is publicly available for this chip +*/ +if (socket->dev->device !=PCI_DEVICE_ID_RICOH_RL5C476 && + socket->dev->device !=PCI_DEVICE_ID_RICOH_RL5C478 ) +return ; + +if (socket->dev->revision <0x80 ) +return ; + + misc3 =config_readw (socket,RL5C4XX_MISC3 ); +if (misc3 &RL5C47X_MISC3_CB_CLKRUN_DIS ) { +if (!quiet) +dev_dbg (&socket->dev->dev, +"CLKRUN feature already disabled\n" ); + }else if (disable_clkrun) { +if (!quiet) +dev_info (&socket->dev->dev, +"Disabling CLKRUN feature\n" ); + misc3 |=RL5C47X_MISC3_CB_CLKRUN_DIS ; +config_writew (socket,RL5C4XX_MISC3 , misc3); + } +} +static void ricoh_save_state (struct yenta_socket *socket) {rl_misc (socket) =config_readw (socket,RL5C4XX_MISC );
@@ -172,6 +205,7 @@ static void ricoh_restore_state(struct yenta_socket *socket)config_writew (socket,RL5C4XX_16BIT_IO_0 ,rl_io (socket));config_writew (socket,RL5C4XX_16BIT_MEM_0 ,rl_mem (socket));config_writew (socket,RL5C4XX_CONFIG ,rl_config (socket)); +ricoh_set_clkrun (socket, true); }
@@ -197,6 +231,7 @@ static int ricoh_override(struct yenta_socket *socket)config_writew (socket,RL5C4XX_CONFIG , config);ricoh_set_zv (socket); +ricoh_set_clkrun (socket, false);return 0 ; }
drivers/pcmcia/yenta_socket.c +2 -1
@@ -26,7 +26,8 @@static bool disable_clkrun;module_param (disable_clkrun, bool,0444 ); -MODULE_PARM_DESC (disable_clkrun,"If PC card doesn't function properly, please try this option" ); +MODULE_PARM_DESC (disable_clkrun, +"If PC card doesn't function properly, please try this option (TI and Ricoh bridges only)" );static bool isa_probe =1 ;module_param (isa_probe, bool,0444 );
drivers/pinctrl/qcom/pinctrl-spmi-mpp.c +19 -8
@@ -319,6 +319,8 @@ static int pmic_mpp_set_mux(struct pinctrl_dev *pctldev, unsigned function, pad->function = function; ret =pmic_mpp_write_mode_ctl (state, pad); +if (ret <0 ) +return ret; val = pad->is_enabled <<PMIC_MPP_REG_MASTER_EN_SHIFT ;
@@ -343,13 +345,12 @@ static int pmic_mpp_config_get(struct pinctrl_dev *pctldev,switch (param) {case PIN_CONFIG_BIAS_DISABLE : - arg = pad->pullup ==PMIC_MPP_PULL_UP_OPEN ; +if (pad->pullup !=PMIC_MPP_PULL_UP_OPEN ) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_BIAS_PULL_UP :switch (pad->pullup) { -case PMIC_MPP_PULL_UP_OPEN : - arg =0 ; -break ;case PMIC_MPP_PULL_UP_0P6KOHM : arg =600 ;break ;
@@ -364,13 +365,17 @@ static int pmic_mpp_config_get(struct pinctrl_dev *pctldev, }break ;case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : - arg = !pad->is_enabled; +if (pad->is_enabled) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_POWER_SOURCE : arg = pad->power_source;break ;case PIN_CONFIG_INPUT_ENABLE : - arg = pad->input_enabled; +if (!pad->input_enabled) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_OUTPUT : arg = pad->out_value;
@@ -382,7 +387,9 @@ static int pmic_mpp_config_get(struct pinctrl_dev *pctldev, arg = pad->amux_input;break ;case PMIC_MPP_CONF_PAIRED : - arg = pad->paired; +if (!pad->paired) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_DRIVE_STRENGTH : arg = pad->drive_strength;
@@ -455,7 +462,7 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin, pad->dtest = arg;break ;case PIN_CONFIG_DRIVE_STRENGTH : - arg = pad->drive_strength; + pad->drive_strength = arg;break ;case PMIC_MPP_CONF_AMUX_ROUTE :if (arg >=PMIC_MPP_AMUX_ROUTE_ABUS4 )
@@ -502,6 +509,10 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin,if (ret <0 )return ret; + ret =pmic_mpp_write (state, pad,PMIC_MPP_REG_SINK_CTL , pad->drive_strength); +if (ret <0 ) +return ret; + val = pad->is_enabled <<PMIC_MPP_REG_MASTER_EN_SHIFT ;return pmic_mpp_write (state, pad,PMIC_MPP_REG_EN_CTL , val);
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c +21 -7
@@ -260,22 +260,32 @@ static int pm8xxx_pin_config_get(struct pinctrl_dev *pctldev,switch (param) {case PIN_CONFIG_BIAS_DISABLE : - arg = pin->bias ==PM8XXX_GPIO_BIAS_NP ; +if (pin->bias !=PM8XXX_GPIO_BIAS_NP ) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_BIAS_PULL_DOWN : - arg = pin->bias ==PM8XXX_GPIO_BIAS_PD ; +if (pin->bias !=PM8XXX_GPIO_BIAS_PD ) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_BIAS_PULL_UP : - arg = pin->bias <=PM8XXX_GPIO_BIAS_PU_1P5_30 ; +if (pin->bias >PM8XXX_GPIO_BIAS_PU_1P5_30 ) +return -EINVAL ; + arg =1 ;break ;case PM8XXX_QCOM_PULL_UP_STRENGTH : arg = pin->pull_up_strength;break ;case PIN_CONFIG_BIAS_HIGH_IMPEDANCE : - arg = pin->disable; +if (!pin->disable) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_INPUT_ENABLE : - arg = pin->mode ==PM8XXX_GPIO_MODE_INPUT ; +if (pin->mode !=PM8XXX_GPIO_MODE_INPUT ) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_OUTPUT :if (pin->mode &PM8XXX_GPIO_MODE_OUTPUT )
@@ -290,10 +300,14 @@ static int pm8xxx_pin_config_get(struct pinctrl_dev *pctldev, arg = pin->output_strength;break ;case PIN_CONFIG_DRIVE_PUSH_PULL : - arg = !pin->open_drain; +if (pin->open_drain) +return -EINVAL ; + arg =1 ;break ;case PIN_CONFIG_DRIVE_OPEN_DRAIN : - arg = pin->open_drain; +if (!pin->open_drain) +return -EINVAL ; + arg =1 ;break ;default :return -EINVAL ;
drivers/rpmsg/qcom_smd.c +5 -2
@@ -1012,8 +1012,10 @@ static struct qcom_smd_channel *qcom_smd_create_channel(struct qcom_smd_edge *ed channel->edge = edge; channel->name =kstrdup (name,GFP_KERNEL ); -if (!channel->name) -return ERR_PTR (-ENOMEM ); +if (!channel->name) { + ret = -ENOMEM ; + goto free_channel; + }mutex_init (&channel->tx_lock);spin_lock_init (&channel->recv_lock);
@@ -1062,6 +1064,7 @@ static struct qcom_smd_channel *qcom_smd_create_channel(struct qcom_smd_edge *ed free_name_and_channel:kfree (channel->name); +free_channel:kfree (channel);return ERR_PTR (ret);
drivers/scsi/esp_scsi.c +1 -0
@@ -1349,6 +1349,7 @@ static int esp_data_bytes_sent(struct esp *esp, struct esp_cmd_entry *ent, bytes_sent = esp->data_dma_len; bytes_sent -= ecount; + bytes_sent -= esp->send_cmd_residual;/* * The am53c974 has a DMA 'pecularity'. The doc states:
drivers/scsi/esp_scsi.h +2 -0
@@ -540,6 +540,8 @@ struct esp {void *dma;int dmarev; + +u32 send_cmd_residual; };/* A front-end driver for the ESP chip should do the following in
drivers/scsi/lpfc/lpfc_sli.c +7 -0
@@ -3512,6 +3512,7 @@ lpfc_sli_handle_slow_ring_event_s4(struct lpfc_hba *phba,struct hbq_dmabuf *dmabuf;struct lpfc_cq_event *cq_event;unsigned long iflag; +int count =0 ;spin_lock_irqsave (&phba->hbalock, iflag); phba->hba_flag &= ~HBA_SP_QUEUE_EVT ;
@@ -3533,16 +3534,22 @@ lpfc_sli_handle_slow_ring_event_s4(struct lpfc_hba *phba,if (irspiocbq)lpfc_sli_sp_handle_rspiocb (phba, pring, irspiocbq); + count++;break ;case CQE_CODE_RECEIVE :case CQE_CODE_RECEIVE_V1 : dmabuf = container_of(cq_event, struct hbq_dmabuf, cq_event);lpfc_sli4_handle_received_buffer (phba, dmabuf); + count++;break ;default :break ; } + +/* Limit the number of events to 64 to avoid soft lockups */ +if (count ==64 ) +break ; } }
drivers/scsi/mac_esp.c +2 -0
@@ -426,6 +426,8 @@ static void mac_esp_send_pio_cmd(struct esp *esp, u32 addr, u32 esp_count,scsi_esp_cmd (esp,ESP_CMD_TI ); } } + + esp->send_cmd_residual = esp_count; }static int mac_esp_irq_pending (struct esp *esp)
drivers/scsi/megaraid/megaraid_sas_base.c +3 -0
@@ -6901,6 +6901,9 @@ static int megasas_mgmt_compat_ioctl_fw(struct file *file, unsigned long arg) get_user(user_sense_off, &cioc->sense_off))return -EFAULT ; +if (local_sense_off != user_sense_off) +return -EINVAL ; +if (local_sense_len) {void __user **sense_ioc_ptr = (void __user **)((u8 *)((unsigned long )&ioc->frame.raw) + local_sense_off);
drivers/soc/tegra/pmc.c +1 -1
@@ -1189,7 +1189,7 @@ static void tegra_pmc_init_tsense_reset(struct tegra_pmc *pmc)if (!pmc->soc->has_tsense_reset)return ; - np =of_find_node_by_name (pmc->dev->of_node,"i2c-thermtrip" ); + np =of_get_child_by_name (pmc->dev->of_node,"i2c-thermtrip" );if (!np) {dev_warn (dev,"i2c-thermtrip node not found, %s.\n" , disabled);return ;
drivers/tc/tc.c +7 -1
@@ -2,7 +2,7 @@* TURBOchannel bus services. * * Copyright (c) Harald Koerfgen, 1998 -* Copyright (c) 2001, 2003, 2005, 2006 Maciej W. Rozycki +* Copyright (c) 2001, 2003, 2005, 2006, 2018 Maciej W. Rozycki * Copyright (c) 2005 James Simmons * * This file is subject to the terms and conditions of the GNU
@@ -10,6 +10,7 @@* directory of this archive for more details. */ #include <linux/compiler.h> +#include <linux/dma-mapping.h> #include <linux/errno.h> #include <linux/init.h> #include <linux/ioport.h>
@@ -92,6 +93,11 @@ static void __init tc_bus_add_devices(struct tc_bus *tbus) tdev->dev.bus = &tc_bus_type; tdev->slot = slot; +/* TURBOchannel has 34-bit DMA addressing (16GiB space). */ + tdev->dma_mask =DMA_BIT_MASK (34 ); + tdev->dev.dma_mask = &tdev->dma_mask; + tdev->dev.coherent_dma_mask =DMA_BIT_MASK (34 ); +for (i =0 ; i <8 ; i++) { tdev->firmware[i] =readb (module + offset +TC_FIRM_VER +4 * i);
drivers/tty/serial/kgdboc.c +5 -0
@@ -133,6 +133,11 @@ static void kgdboc_unregister_kbd(void)static int kgdboc_option_setup (char *opt) { +if (!opt) { +pr_err ("kgdboc: config string not provided\n" ); +return -EINVAL ; + } +if (strlen (opt) >=MAX_CONFIG_LEN ) {printk (KERN_ERR "kgdboc: config string too long\n" );return -ENOSPC ;
drivers/uio/uio.c +9 -0
@@ -249,6 +249,8 @@ static struct class uio_class = { .dev_groups = uio_groups, }; +bool uio_class_registered; +/* * device functions */
@@ -780,6 +782,9 @@ static int init_uio_class(void)printk (KERN_ERR "class_register failed for uio\n" ); goto err_class_register; } + + uio_class_registered = true; +return 0 ; err_class_register:
@@ -790,6 +795,7 @@ static int init_uio_class(void)static void release_uio_class (void ) { + uio_class_registered = false;class_unregister (&uio_class);uio_major_cleanup (); }
@@ -809,6 +815,9 @@ int __uio_register_device(struct module *owner,struct uio_device *idev;int ret =0 ; +if (!uio_class_registered) +return -EPROBE_DEFER ; +if (!parent || !info || !info->name || !info->version)return -EINVAL ;
drivers/usb/chipidea/otg.h +2 -1
@@ -20,7 +20,8 @@ void ci_handle_vbus_change(struct ci_hdrc *ci);static inline void ci_otg_queue_work (struct ci_hdrc *ci) {disable_irq_nosync (ci->irq); -queue_work (ci->wq, &ci->work); +if (queue_work (ci->wq, &ci->work) == false) +enable_irq (ci->irq); }#endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */
drivers/usb/gadget/udc/atmel_usba_udc.c +2 -0
@@ -1922,6 +1922,8 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev, udc->errata = match->data; udc->pmc =syscon_regmap_lookup_by_compatible ("atmel,at91sam9g45-pmc" ); +if (IS_ERR (udc->pmc)) + udc->pmc =syscon_regmap_lookup_by_compatible ("atmel,at91sam9rl-pmc" );if (IS_ERR (udc->pmc)) udc->pmc =syscon_regmap_lookup_by_compatible ("atmel,at91sam9x5-pmc" );if (udc->errata &&IS_ERR (udc->pmc))
drivers/usb/usbip/vudc_main.c +9 -1
@@ -85,6 +85,10 @@ static int __init init(void) cleanup:list_for_each_entry_safe (udc_dev, udc_dev2, &vudc_devices, dev_entry) {list_del (&udc_dev->dev_entry); +/* +* Just do platform_device_del() here, put_vudc_device() +* calls the platform_device_put() +*/ platform_device_del (udc_dev->pdev);put_vudc_device (udc_dev); }
@@ -101,7 +105,11 @@ static void __exit cleanup(void)list_for_each_entry_safe (udc_dev, udc_dev2, &vudc_devices, dev_entry) {list_del (&udc_dev->dev_entry); -platform_device_unregister (udc_dev->pdev); +/* +* Just do platform_device_del() here, put_vudc_device() +* calls the platform_device_put() +*/ +platform_device_del (udc_dev->pdev);put_vudc_device (udc_dev); }platform_driver_unregister (&vudc_driver);
drivers/w1/masters/omap_hdq.c +2 -0
@@ -784,6 +784,8 @@ static int omap_hdq_remove(struct platform_device *pdev)/* remove module dependency */ pm_runtime_disable (&pdev->dev); +w1_remove_master_device (&omap_w1_master); +return 0 ; }
drivers/xen/swiotlb-xen.c +6 -0
@@ -310,6 +310,9 @@ xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,*/ flags &= ~(__GFP_DMA | __GFP_HIGHMEM); +/* Convert the size to actually allocated. */ + size =1UL << (order +XEN_PAGE_SHIFT ); +/* On ARM this function returns an ioremap'ped virtual address for * which virt_to_phys doesn't return the corresponding physical * address. In fact on ARM virt_to_phys only works for kernel direct
@@ -359,6 +362,9 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,* physical address */ phys =xen_bus_to_phys (dev_addr); +/* Convert the size to actually allocated. */ + size =1UL << (order +XEN_PAGE_SHIFT ); +if (((dev_addr + size -1 <= dma_mask)) ||range_straddles_page_boundary (phys, size))xen_destroy_contiguous_region (phys, order);
fs/btrfs/extent-tree.c +37 -10
104 lines not on this page · raw message
fs/btrfs/free-space-cache.c +22 -10
@@ -1693,6 +1693,8 @@ static inline void __bitmap_clear_bits(struct btrfs_free_space_ctl *ctl,bitmap_clear (info->bitmap, start, count); info->bytes -= bytes; +if (info->max_extent_size > ctl->unit) + info->max_extent_size =0 ; } static void bitmap_clear_bits(struct btrfs_free_space_ctl *ctl,
@@ -1776,6 +1778,13 @@ static int search_bitmap(struct btrfs_free_space_ctl *ctl,return -1 ; } +static inline u64 get_max_extent_size (struct btrfs_free_space *entry) +{ +if (entry->bitmap) +return entry->max_extent_size; +return entry->bytes; +} +/* Cache the size of the max extent in bytes */ static struct btrfs_free_space * find_free_space(struct btrfs_free_space_ctl *ctl, u64 *offset, u64 *bytes,
@@ -1797,8 +1806,8 @@ find_free_space(struct btrfs_free_space_ctl *ctl, u64 *offset, u64 *bytes,for (node = &entry->offset_index; node; node =rb_next (node)) { entry = rb_entry(node, struct btrfs_free_space, offset_index);if (entry->bytes < *bytes) { -if (entry->bytes > *max_extent_size) - *max_extent_size = entry->bytes; + *max_extent_size =max (get_max_extent_size (entry), + *max_extent_size);continue ; }
@@ -1816,8 +1825,8 @@ find_free_space(struct btrfs_free_space_ctl *ctl, u64 *offset, u64 *bytes, }if (entry->bytes < *bytes + align_off) { -if (entry->bytes > *max_extent_size) - *max_extent_size = entry->bytes; + *max_extent_size =max (get_max_extent_size (entry), + *max_extent_size);continue ; }
@@ -1829,8 +1838,10 @@ find_free_space(struct btrfs_free_space_ctl *ctl, u64 *offset, u64 *bytes, *offset = tmp; *bytes = size;return entry; - }else if (size > *max_extent_size) { - *max_extent_size = size; + }else { + *max_extent_size = +max (get_max_extent_size (entry), + *max_extent_size); }continue ; }
@@ -2689,8 +2700,8 @@ static u64 btrfs_alloc_from_bitmap(struct btrfs_block_group_cache *block_group, err =search_bitmap (ctl, entry, &search_start, &search_bytes, true);if (err) { -if (search_bytes > *max_extent_size) - *max_extent_size = search_bytes; + *max_extent_size =max (get_max_extent_size (entry), + *max_extent_size);return 0 ; }
@@ -2727,8 +2738,9 @@ u64 btrfs_alloc_from_cluster(struct btrfs_block_group_cache *block_group, entry = rb_entry(node, struct btrfs_free_space, offset_index);while (1 ) { -if (entry->bytes < bytes && entry->bytes > *max_extent_size) - *max_extent_size = entry->bytes; +if (entry->bytes < bytes) + *max_extent_size =max (get_max_extent_size (entry), + *max_extent_size);if (entry->bytes < bytes || (!entry->bitmap && entry->offset < min_start)) {
fs/btrfs/inode.c +1 -0
@@ -489,6 +489,7 @@ static noinline void compress_file_range(struct inode *inode, pages =kcalloc (nr_pages,sizeof (struct page *),GFP_NOFS );if (!pages) {/* just bail out to the uncompressed code */ + nr_pages =0 ; goto cont; }
fs/btrfs/qgroup.c +1 -0
@@ -2498,6 +2498,7 @@ qgroup_rescan_zero_tracking(struct btrfs_fs_info *fs_info) qgroup->rfer_cmpr =0 ; qgroup->excl =0 ; qgroup->excl_cmpr =0 ; +qgroup_dirty (fs_info, qgroup); }spin_unlock (&fs_info->qgroup_lock); }
fs/btrfs/relocation.c +1 -1
@@ -1325,7 +1325,7 @@ static void __del_reloc_root(struct btrfs_root *root)struct mapping_node *node =NULL ;struct reloc_control *rc = root->fs_info->reloc_ctl; -if (rc) { +if (rc && root->node) {spin_lock (&rc->reloc_root_tree.lock); rb_node =tree_search (&rc->reloc_root_tree.rb_root, root->node->start);
fs/btrfs/tree-log.c +33 -6
@@ -3016,9 +3016,12 @@ static void free_log_tree(struct btrfs_trans_handle *trans, }; ret =walk_log_tree (trans, log, &wc); -/* I don't think this can happen but just in case */ -if (ret) -btrfs_abort_transaction (trans, ret); +if (ret) { +if (trans) +btrfs_abort_transaction (trans, ret); +else +btrfs_handle_fs_error (log->fs_info, ret,NULL ); + }while (1 ) { ret = find_first_extent_bit(&log->dirty_log_pages,
@@ -5370,9 +5373,33 @@ static int btrfs_log_all_parents(struct btrfs_trans_handle *trans, dir_inode =btrfs_iget (root->fs_info->sb, &inode_key, root,NULL ); -/* If parent inode was deleted, skip it. */ -if (IS_ERR (dir_inode)) -continue ; +/* +* If the parent inode was deleted, return an error to +* fallback to a transaction commit. This is to prevent +* getting an inode that was moved from one parent A to +* a parent B, got its former parent A deleted and then +* it got fsync'ed, from existing at both parents after +* a log replay (and the old parent still existing). +* Example: +* +* mkdir /mnt/A +* mkdir /mnt/B +* touch /mnt/B/bar +* sync +* mv /mnt/B/bar /mnt/A/bar +* mv -T /mnt/A /mnt/B +* fsync /mnt/B/bar +* <power fail> +* +* If we ignore the old parent B which got deleted, +* after a log replay we would have file bar linked +* at both parents and the old parent B would still +* exist. +*/ +if (IS_ERR (dir_inode)) { + ret =PTR_ERR (dir_inode); + goto out; + }if (ctx) ctx->log_new_dentries = false;
fs/cifs/cifs_debug.c +3 -0
@@ -284,6 +284,9 @@ static ssize_t cifs_stats_proc_write(struct file *file,atomic_set (&totBufAllocCount,0 );atomic_set (&totSmBufAllocCount,0 );#endif /* CONFIG_CIFS_STATS2 */ +atomic_set (&tcpSesReconnectCount,0 ); +atomic_set (&tconInfoReconnectCount,0 ); +spin_lock (&GlobalMid_Lock); GlobalMaxActiveXid =0 ; GlobalCurrentXid =0 ;
fs/cifs/cifs_spnego.c +4 -2
@@ -147,8 +147,10 @@ cifs_get_spnego_key(struct cifs_ses *sesInfo)sprintf (dp,";sec=krb5" ); else if (server->sec_mskerberos) sprintf(dp, ";sec=mskrb5"); - else - goto out; + else { +cifs_dbg (VFS ,"unknown or missing server auth type, use krb5\n" ); +sprintf (dp,";sec=krb5" ); + } dp = description +strlen (description); sprintf(dp, ";uid=0x%x",
fs/cifs/inode.c +9 -1
@@ -768,7 +768,15 @@ cifs_get_inode_info(struct inode **inode, const char *full_path, }else if (rc == -EREMOTE ) {cifs_create_dfs_fattr (&fattr, sb); rc =0 ; - }else if (rc == -EACCES &&backup_cred (cifs_sb)) { + }else if ((rc == -EACCES ) &&backup_cred (cifs_sb) && + (strcmp (server->vals->version_string,SMB1_VERSION_STRING ) + ==0 )) { +/* +* For SMB2 and later the backup intent flag is already +* sent if needed on open and there is no path based +* FindFirst operation to use to retry with +*/ + srchinf =kzalloc (sizeof (struct cifs_search_info ),GFP_KERNEL );if (srchinf ==NULL ) {
fs/cramfs/inode.c +2 -1
@@ -186,7 +186,8 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned icontinue ; blk_offset = (blocknr - buffer_blocknr[i]) <<PAGE_SHIFT ; blk_offset += offset; -if (blk_offset + len >BUFFER_SIZE ) +if (blk_offset >BUFFER_SIZE || + blk_offset + len >BUFFER_SIZE )continue ;return read_buffers[i] + blk_offset; }
fs/ext4/inline.c +1 -1
@@ -860,7 +860,7 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,handle_t *handle;struct page *page;struct ext4_iloc iloc; -int retries; +int retries =0 ; ret =ext4_get_inode_loc (inode, &iloc);if (ret)
fs/ext4/ioctl.c +3 -1
@@ -345,7 +345,9 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid) }brelse (iloc.bh); -dquot_initialize (inode); + err =dquot_initialize (inode); +if (err) +return err; handle = ext4_journal_start(inode, EXT4_HT_QUOTA, EXT4_QUOTA_INIT_BLOCKS(sb) +
fs/ext4/move_extent.c +6 -2
@@ -526,9 +526,13 @@ mext_check_arguments(struct inode *orig_inode, orig_inode->i_ino, donor_inode->i_ino);return -EINVAL ; } -if (orig_eof < orig_start + *len -1 ) +if (orig_eof <= orig_start) + *len =0 ; +else if (orig_eof < orig_start + *len -1 ) *len = orig_eof - orig_start; -if (donor_eof < donor_start + *len -1 ) +if (donor_eof <= donor_start) + *len =0 ; +else if (donor_eof < donor_start + *len -1 ) *len = donor_eof - donor_start;if (!*len) { ext4_debug("ext4 move extent: len should not be 0 "
fs/gfs2/ops_fstype.c +3 -0
@@ -1355,6 +1355,9 @@ static struct dentry *gfs2_mount_meta(struct file_system_type *fs_type,struct path path;int error; +if (!dev_name || !*dev_name) +return ERR_PTR (-EINVAL ); + error =kern_path (dev_name,LOOKUP_FOLLOW , &path);if (error) { pr_warn("path_lookup on %s returned error %d\n",
fs/jbd2/checkpoint.c +2 -2
@@ -254,8 +254,8 @@ int jbd2_log_do_checkpoint(journal_t *journal) bh =jh2bh (jh);if (buffer_locked (bh)) { -spin_unlock (&journal->j_list_lock);get_bh (bh); +spin_unlock (&journal->j_list_lock);wait_on_buffer (bh);/* the journal_head may have gone by now */ BUFFER_TRACE (bh,"brelse" );
@@ -336,8 +336,8 @@ int jbd2_log_do_checkpoint(journal_t *journal) jh = transaction->t_checkpoint_io_list; bh =jh2bh (jh);if (buffer_locked (bh)) { -spin_unlock (&journal->j_list_lock);get_bh (bh); +spin_unlock (&journal->j_list_lock);wait_on_buffer (bh);/* the journal_head may have gone by now */ BUFFER_TRACE (bh,"brelse" );
fs/jffs2/super.c +1 -3
@@ -285,10 +285,8 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent) sb->s_fs_info = c; ret =jffs2_parse_options (c, data); -if (ret) { -kfree (c); +if (ret)return -EINVAL ; - }/* Initialize JFFS2 superblock locks, the further initialization will * be done later */
fs/lockd/host.c +1 -1
@@ -340,7 +340,7 @@ struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp, };struct lockd_net *ln =net_generic (net, lockd_net_id); -dprintk ("lockd: %s(host='%*s', vers=%u, proto=%s)\n" , __func__, +dprintk ("lockd: %s(host='%.*s', vers=%u, proto=%s)\n" , __func__, (int )hostname_len, hostname, rqstp->rq_vers, (rqstp->rq_prot ==IPPROTO_UDP ?"udp" :"tcp" ));
fs/nfs/nfs4client.c +9 -7
@@ -988,10 +988,10 @@ EXPORT_SYMBOL_GPL(nfs4_set_ds_client);/* * Session has been established, and the client marked ready. -* Set the mount rsize and wsize with negotiated fore channel -* attributes which will be bound checked in nfs_server_set_fsinfo. +* Limit the mount rsize, wsize and dtsize using negotiated fore +* channel attributes. */ -static void nfs4_session_set_rwsize (struct nfs_server *server) +static void nfs4_session_limit_rwsize (struct nfs_server *server) {#ifdef CONFIG_NFS_V4_1 struct nfs4_session *sess;
@@ -1004,9 +1004,11 @@ static void nfs4_session_set_rwsize(struct nfs_server *server) server_resp_sz = sess->fc_attrs.max_resp_sz - nfs41_maxread_overhead; server_rqst_sz = sess->fc_attrs.max_rqst_sz - nfs41_maxwrite_overhead; -if (!server->rsize || server->rsize > server_resp_sz) +if (server->dtsize > server_resp_sz) + server->dtsize = server_resp_sz; +if (server->rsize > server_resp_sz) server->rsize = server_resp_sz; -if (!server->wsize || server->wsize > server_rqst_sz) +if (server->wsize > server_rqst_sz) server->wsize = server_rqst_sz;#endif /* CONFIG_NFS_V4_1 */ }
@@ -1053,12 +1055,12 @@ static int nfs4_server_common_setup(struct nfs_server *server, (unsigned long long) server->fsid.minor);nfs_display_fhandle (mntfh,"Pseudo-fs root FH" ); -nfs4_session_set_rwsize (server); - error =nfs_probe_fsinfo (server, mntfh, fattr);if (error <0 ) goto out; +nfs4_session_limit_rwsize (server); +if (server->namelen ==0 || server->namelen >NFS4_MAXNAMLEN ) server->namelen =NFS4_MAXNAMLEN ;
include/linux/tc.h +1 -0
@@ -84,6 +84,7 @@ struct tc_dev {device. */ struct device dev;/* Generic device interface. */ struct resource resource;/* Address space of this device. */ +u64 dma_mask;/* DMA addressable range. */ char vendor[9 ];char name[9 ];char firmware[9 ];
kernel/bounds.c +3 -1
@@ -12,7 +12,7 @@#include <linux/log2.h> #include <linux/spinlock_types.h> -void foo (void ) +int main (void ) {/* The enum constants to put into include/generated/bounds.h */ DEFINE (NR_PAGEFLAGS , __NR_PAGEFLAGS);
@@ -22,4 +22,6 @@ void foo(void)#endif DEFINE (SPINLOCK_SIZE ,sizeof (spinlock_t));/* End of constants */ + +return 0 ; }
kernel/cpu.c +10 -1
@@ -1970,6 +1970,12 @@ static void cpuhp_online_cpu_device(unsigned int cpu)kobject_uevent (&dev->kobj,KOBJ_ONLINE ); } +/* +* Architectures that need SMT-specific errata handling during SMT hotplug +* should override this. +*/ +void __weak arch_smt_update (void ) { }; +static int cpuhp_smt_disable (enum cpuhp_smt_control ctrlval) {int cpu, ret =0 ;
@@ -1996,8 +2002,10 @@ static int cpuhp_smt_disable(enum cpuhp_smt_control ctrlval)*/ cpuhp_offline_cpu_device (cpu); } -if (!ret) +if (!ret) { cpu_smt_control = ctrlval; +arch_smt_update (); + }cpu_maps_update_done ();return ret; }
@@ -2008,6 +2016,7 @@ static int cpuhp_smt_enable(void)cpu_maps_update_begin (); cpu_smt_control =CPU_SMT_ENABLED ; +arch_smt_update ();for_each_present_cpu (cpu) {/* Skip online CPUs and CPUs on offline nodes */ if (cpu_online (cpu) || !node_online (cpu_to_node (cpu)))
kernel/irq/manage.c +6 -2
@@ -878,6 +878,9 @@ irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action)local_bh_disable (); ret = action->thread_fn (action->irq, action->dev_id); +if (ret ==IRQ_HANDLED ) +atomic_inc (&desc->threads_handled); +irq_finalize_oneshot (desc, action);local_bh_enable ();return ret;
@@ -894,6 +897,9 @@ static irqreturn_t irq_thread_fn(struct irq_desc *desc,irqreturn_t ret; ret = action->thread_fn (action->irq, action->dev_id); +if (ret ==IRQ_HANDLED ) +atomic_inc (&desc->threads_handled); +irq_finalize_oneshot (desc, action);return ret; }
@@ -971,8 +977,6 @@ static int irq_thread(void *data)irq_thread_check_affinity (desc, action); action_ret =handler_fn (desc, action); -if (action_ret ==IRQ_HANDLED ) -atomic_inc (&desc->threads_handled);if (action_ret ==IRQ_WAKE_THREAD )irq_wake_secondary (desc, action);
kernel/kprobes.c +20 -7
@@ -665,9 +665,10 @@ static void unoptimize_kprobe(struct kprobe *p, bool force) }/* Cancel unoptimizing for reusing */ -static void reuse_unused_kprobe (struct kprobe *ap) +static int reuse_unused_kprobe (struct kprobe *ap) {struct optimized_kprobe *op; +int ret;BUG_ON (!kprobe_unused (ap));/*
@@ -681,8 +682,12 @@ static void reuse_unused_kprobe(struct kprobe *ap)/* Enable the probe again */ ap->flags &= ~KPROBE_FLAG_DISABLED ;/* Optimize it again (remove from op->list) */ -BUG_ON (!kprobe_optready (ap)); + ret =kprobe_optready (ap); +if (ret) +return ret; +optimize_kprobe (ap); +return 0 ; }/* Remove optimized instructions */
@@ -894,11 +899,16 @@ static void __disarm_kprobe(struct kprobe *p, bool reopt)#define kprobe_disarmed (p) kprobe_disabled(p)#define wait_for_kprobe_optimizer () do {} while (0) -/* There should be no unused kprobes can be reused without optimization */ -static void reuse_unused_kprobe (struct kprobe *ap) +static int reuse_unused_kprobe (struct kprobe *ap) { +/* +* If the optimized kprobe is NOT supported, the aggr kprobe is +* released at the same time that the last aggregated kprobe is +* unregistered. +* Thus there should be no chance to reuse unused kprobe. +*/ printk (KERN_ERR "Error: There should be no unused kprobe here.\n" ); -BUG_ON (kprobe_unused (ap)); +return -EINVAL ; }static void free_aggr_kprobe (struct kprobe *p)
@@ -1276,9 +1286,12 @@ static int register_aggr_kprobe(struct kprobe *orig_p, struct kprobe *p) goto out; }init_aggr_kprobe (ap, orig_p); - }else if (kprobe_unused (ap)) + }else if (kprobe_unused (ap)) {/* This probe is going to die. Rescue it */ -reuse_unused_kprobe (ap); + ret =reuse_unused_kprobe (ap); +if (ret) + goto out; + }if (kprobe_gone (ap)) {/*
kernel/locking/lockdep.c +2 -2
@@ -4010,7 +4010,7 @@ void lock_contended(struct lockdep_map *lock, unsigned long ip) {unsigned long flags; -if (unlikely (!lock_stat)) +if (unlikely (!lock_stat || !debug_locks))return ;if (unlikely (current->lockdep_recursion))
@@ -4030,7 +4030,7 @@ void lock_acquired(struct lockdep_map *lock, unsigned long ip) {unsigned long flags; -if (unlikely (!lock_stat)) +if (unlikely (!lock_stat || !debug_locks))return ;if (unlikely (current->lockdep_recursion))
kernel/printk/printk.c +6 -1
@@ -1010,7 +1010,12 @@ static void __init log_buf_len_update(unsigned size)/* save requested log_buf_len since it's too early to process it */ static int __init log_buf_len_setup (char *str) { -unsigned size =memparse (str, &str); +unsigned int size; + +if (!str) +return -EINVAL ; + + size =memparse (str, &str);log_buf_len_update (size);
kernel/sched/fair.c +1 -1
@@ -3502,7 +3502,7 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)* put back on, and if we advance min_vruntime, we'll be placed back * further than we started -- ie. we'll be penalized. */ -if ((flags & (DEQUEUE_SAVE |DEQUEUE_MOVE )) ==DEQUEUE_SAVE ) +if ((flags & (DEQUEUE_SAVE |DEQUEUE_MOVE )) !=DEQUEUE_SAVE )update_min_vruntime (cfs_rq); }
kernel/signal.c +1 -1
@@ -991,7 +991,7 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t, result =TRACE_SIGNAL_IGNORED ;if (!prepare_signal (sig, t, - from_ancestor_ns || (info ==SEND_SIG_FORCED ))) + from_ancestor_ns || (info ==SEND_SIG_PRIV ) || (info ==SEND_SIG_FORCED ))) goto ret; pending = group ? &t->signal->shared_pending : &t->pending;
lib/debug_locks.c +1 -1
@@ -37,7 +37,7 @@ EXPORT_SYMBOL_GPL(debug_locks_silent);*/ int debug_locks_off (void ) { -if (__debug_locks_off ()) { +if (debug_locks &&__debug_locks_off ()) {if (!debug_locks_silent) {console_verbose ();return 1 ;
mm/hugetlb.c +6 -0
@@ -3645,6 +3645,12 @@ int huge_add_to_page_cache(struct page *page, struct address_space *mapping,return err;ClearPagePrivate (page); +/* +* set page dirty so that it will not be removed from cache/file +* by non-hugetlbfs specific code paths. +*/ +set_page_dirty (page); +spin_lock (&inode->i_lock); inode->i_blocks +=blocks_per_huge_page (h);spin_unlock (&inode->i_lock);
net/core/netclassid_cgroup.c +1 -0
@@ -104,6 +104,7 @@ static int write_classid(struct cgroup_subsys_state *css, struct cftype *cft,iterate_fd (p->files,0 , update_classid_sock, (void *)(unsigned long )cs->classid);task_unlock (p); +cond_resched (); }css_task_iter_end (&it);
net/ipv4/cipso_ipv4.c +7 -4
@@ -1512,7 +1512,7 @@ static int cipso_v4_parsetag_loc(const struct cipso_v4_doi *doi_def,* * Description: * Parse the packet's IP header looking for a CIPSO option. Returns a pointer -* to the start of the CIPSO option on success, NULL if one if not found. +* to the start of the CIPSO option on success, NULL if one is not found. * */ unsigned char *cipso_v4_optptr (const struct sk_buff *skb)
@@ -1522,10 +1522,8 @@ unsigned char *cipso_v4_optptr(const struct sk_buff *skb)int optlen;int taglen; -for (optlen = iph->ihl*4 -sizeof (struct iphdr ); optlen >0 ; ) { +for (optlen = iph->ihl*4 -sizeof (struct iphdr ); optlen >1 ; ) {switch (optptr[0 ]) { -case IPOPT_CIPSO : -return optptr;case IPOPT_END :return NULL ;case IPOPT_NOOP :
@@ -1534,6 +1532,11 @@ unsigned char *cipso_v4_optptr(const struct sk_buff *skb)default : taglen = optptr[1 ]; } +if (!taglen || taglen > optlen) +return NULL ; +if (optptr[0 ] ==IPOPT_CIPSO ) +return optptr; + optlen -= taglen; optptr += taglen; }
net/sunrpc/svc_xprt.c +1 -1
@@ -1038,7 +1038,7 @@ static void call_xpt_users(struct svc_xprt *xprt)spin_lock (&xprt->xpt_lock);while (!list_empty (&xprt->xpt_users)) { u = list_first_entry(&xprt->xpt_users, struct svc_xpt_user, list); -list_del (&u->list); +list_del_init (&u->list); u->callback (u); }spin_unlock (&xprt->xpt_lock);
net/xfrm/xfrm_policy.c +4 -4
@@ -659,9 +659,9 @@ static void xfrm_hash_rebuild(struct work_struct *work)break ; }if (newpos) -hlist_add_behind (&policy->bydst, newpos); +hlist_add_behind_rcu (&policy->bydst, newpos);else -hlist_add_head (&policy->bydst, chain); +hlist_add_head_rcu (&policy->bydst, chain); }spin_unlock_bh (&net->xfrm.xfrm_policy_lock);
@@ -800,9 +800,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)break ; }if (newpos) -hlist_add_behind (&policy->bydst, newpos); +hlist_add_behind_rcu (&policy->bydst, newpos);else -hlist_add_head (&policy->bydst, chain); +hlist_add_head_rcu (&policy->bydst, chain);__xfrm_policy_link (policy, dir);atomic_inc (&net->xfrm.flow_cache_genid);
security/integrity/ima/ima_fs.c +3 -3
@@ -29,14 +29,14 @@static DEFINE_MUTEX (ima_write_mutex);static int valid_policy =1 ; -#define TMPBUFLEN 12 +static ssize_t ima_show_htable_value (char __user *buf,size_t count,loff_t *ppos,atomic_long_t *val) { -char tmpbuf[TMPBUFLEN ]; +char tmpbuf[32 ];/* greater than largest 'long' string value */ ssize_t len; - len =scnprintf (tmpbuf,TMPBUFLEN ,"%li\n" ,atomic_long_read (val)); + len =scnprintf (tmpbuf,sizeof (tmpbuf),"%li\n" ,atomic_long_read (val));return simple_read_from_buffer (buf, count, ppos, tmpbuf, len); }
sound/pci/ca0106/ca0106.h +1 -1
@@ -582,7 +582,7 @@#define SPI_PL_BIT_R_R (2<<7)/* right channel = right */ #define SPI_PL_BIT_R_C (3<<7)/* right channel = (L+R)/2 */ #define SPI_IZD_REG 2 -#define SPI_IZD_BIT (1<<4)/* infinite zero detect */ +#define SPI_IZD_BIT (0<<4)/* infinite zero detect */ #define SPI_FMT_REG 3#define SPI_FMT_BIT_RJ (0<<0)/* right justified mode */
sound/pci/hda/hda_controller.h +1 -0
@@ -155,6 +155,7 @@ struct azx { unsigned int msi:1; unsigned int probing:1; /* codec probing phase */ unsigned int snoop:1; + unsigned int uc_buffer:1; /* non-cached pages for stream buffers */ unsigned int align_buffer_size:1; unsigned int region_requested:1; unsigned int disabled:1; /* disabled by vga_switcheroo */
sound/pci/hda/hda_intel.c +8 -3
@@ -410,7 +410,7 @@ static void __mark_pages_wc(struct azx *chip, struct snd_dma_buffer *dmab, bool#ifdef CONFIG_SND_DMA_SGBUF if (dmab->dev.type ==SNDRV_DMA_TYPE_DEV_SG ) {struct snd_sg_buf *sgbuf = dmab->private_data; -if (chip->driver_type ==AZX_DRIVER_CMEDIA ) +if (!chip->uc_buffer)return ;/* deal with only CORB/RIRB buffers */ if (on)set_pages_array_wc (sgbuf->page_table, sgbuf->pages);
@@ -1503,6 +1503,7 @@ static void azx_check_snoop_available(struct azx *chip)dev_info (chip->card->dev,"Force to %s mode by module option\n" , snoop ?"snoop" :"non-snoop" ); chip->snoop = snoop; + chip->uc_buffer = !snoop;return ; }
@@ -1523,8 +1524,12 @@ static void azx_check_snoop_available(struct azx *chip) snoop = false; chip->snoop = snoop; -if (!snoop) +if (!snoop) {dev_info (chip->card->dev,"Force to non-snoop mode\n" ); +/* C-Media requires non-cached pages only for CORB/RIRB */ +if (chip->driver_type !=AZX_DRIVER_CMEDIA ) + chip->uc_buffer = true; + } }static void azx_probe_work (struct work_struct *work)
@@ -1947,7 +1952,7 @@ static void pcm_mmap_prepare(struct snd_pcm_substream *substream,#ifdef CONFIG_X86 struct azx_pcm *apcm =snd_pcm_substream_chip (substream);struct azx *chip = apcm->chip; -if (!azx_snoop (chip) && chip->driver_type !=AZX_DRIVER_CMEDIA ) +if (chip->uc_buffer) area->vm_page_prot =pgprot_writecombine (area->vm_page_prot);#endif }
sound/pci/hda/patch_conexant.c +1 -0
@@ -867,6 +867,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {SND_PCI_QUIRK (0x17aa ,0x21da ,"Lenovo X220" ,CXT_PINCFG_LENOVO_TP410 ),SND_PCI_QUIRK (0x17aa ,0x21db ,"Lenovo X220-tablet" ,CXT_PINCFG_LENOVO_TP410 ),SND_PCI_QUIRK (0x17aa ,0x38af ,"Lenovo IdeaPad Z560" ,CXT_FIXUP_MUTE_LED_EAPD ), +SND_PCI_QUIRK (0x17aa ,0x3905 ,"Lenovo G50-30" ,CXT_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x17aa ,0x390b ,"Lenovo G50-80" ,CXT_FIXUP_STEREO_DMIC ),SND_PCI_QUIRK (0x17aa ,0x3975 ,"Lenovo U300s" ,CXT_FIXUP_STEREO_DMIC ), SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
sound/pci/hda/patch_realtek.c +20 -0
@@ -6811,6 +6811,8 @@ enum { ALC662_FIXUP_ASUS_Nx50, ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE, ALC668_FIXUP_ASUS_Nx51, +ALC668_FIXUP_MIC_COEF , +ALC668_FIXUP_ASUS_G751 ,ALC891_FIXUP_HEADSET_MODE ,ALC891_FIXUP_DELL_MIC_NO_PRESENCE , ALC662_FIXUP_ACER_VERITON,
@@ -7077,6 +7079,23 @@ static const struct hda_fixup alc662_fixups[] = { .chained = true, .chain_id = ALC668_FIXUP_ASUS_Nx51_HEADSET_MODE, }, + [ALC668_FIXUP_MIC_COEF] = { + .type = HDA_FIXUP_VERBS, + .v.verbs = (const struct hda_verb []) { + {0x20 ,AC_VERB_SET_COEF_INDEX ,0xc3 }, + {0x20 ,AC_VERB_SET_PROC_COEF ,0x4000 }, + {} + }, + }, + [ALC668_FIXUP_ASUS_G751] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl []) { + {0x16 ,0x0421101f },/* HP */ + {} + }, + .chained = true, + .chain_id =ALC668_FIXUP_MIC_COEF + }, [ALC891_FIXUP_HEADSET_MODE] = { .type = HDA_FIXUP_FUNC,
Lines of this file are not shown. View the raw message.
tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-event-syntax.tc new file +80 -0
80 lines not on this page · raw message
tools/testing/selftests/net/reuseport_bpf.c +9 -4
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.