Linux 4.4.179
Greg KH
maintainerI'm announcing the release of the 4.4.179 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.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
------------
Documentation/arm/kernel_mode_neon.txt | 4 Makefile | 6 arch/arm/boot/dts/sama5d2-pinfunc.h | 2 arch/arm/crypto/sha256-armv4.pl | 3 arch/arm/crypto/sha256-core.S_shipped | 3 arch/arm/crypto/sha512-armv4.pl | 3 arch/arm/crypto/sha512-core.S_shipped | 3 arch/arm/include/asm/barrier.h | 2 arch/arm/include/asm/processor.h | 6 arch/arm/kernel/machine_kexec.c | 5 arch/arm/kernel/patch.c | 6 arch/arm/kernel/smp.c | 4 arch/arm/kernel/unwind.c | 14 +- arch/arm/lib/Makefile | 2 arch/arm/lib/xor-neon.c | 2 arch/arm/mach-omap2/prm_common.c | 4 arch/arm/plat-samsung/Kconfig | 2 arch/arm64/include/asm/futex.h | 14 +- arch/arm64/kernel/kgdb.c | 15 +- arch/arm64/mm/fault.c | 9 - arch/h8300/Makefile | 2 arch/x86/boot/Makefile | 2 arch/x86/crypto/poly1305-avx2-x86_64.S | 14 +- arch/x86/crypto/poly1305-sse2-x86_64.S | 22 ++- arch/x86/entry/vdso/Makefile | 22 +-- arch/x86/include/asm/xen/hypercall.h | 3 arch/x86/kernel/cpu/cyrix.c | 14 +- arch/x86/kernel/hpet.c | 2 arch/x86/kernel/hw_breakpoint.c | 1 arch/x86/kernel/kprobes/core.c | 26 ++++ arch/x86/kernel/vmlinux.lds.S | 2 arch/x86/kvm/emulate.c | 21 +-- arch/x86/realmode/rm/Makefile | 2 arch/xtensa/kernel/stacktrace.c | 6 block/bio.c | 5 crypto/testmgr.h | 44 ++++++ drivers/acpi/sbs.c | 8 - drivers/cdrom/cdrom.c | 7 - drivers/char/Kconfig | 2 drivers/char/hpet.c | 2 drivers/char/hw_random/virtio-rng.c | 2 drivers/char/tpm/tpm_crb.c | 22 ++- drivers/char/tpm/tpm_i2c_atmel.c | 10 + drivers/crypto/amcc/crypto4xx_alg.c | 3 drivers/crypto/amcc/crypto4xx_core.c | 9 + drivers/dma/imx-dma.c | 2 drivers/dma/tegra20-apb-dma.c | 5 drivers/gpio/gpio-omap.c | 14 +- drivers/gpu/drm/drm_dp_mst_topology.c | 1 drivers/hwtracing/coresight/coresight-etm4x.c | 3 drivers/i2c/i2c-core.c | 12 - drivers/iio/accel/kxcjk-1013.c | 2 drivers/iio/adc/ad_sigma_delta.c | 1 drivers/iio/adc/at91_adc.c | 28 ++-- drivers/iio/gyro/bmg160_core.c | 6 drivers/infiniband/hw/mlx4/alias_GUID.c | 2 drivers/infiniband/hw/mlx4/cm.c | 2 drivers/iommu/dmar.c | 2 drivers/iommu/intel-iommu.c | 3 drivers/leds/leds-lp55xx-common.c | 4 drivers/md/bcache/sysfs.c | 17 ++ drivers/md/bcache/sysfs.h | 13 +- drivers/md/dm-thin.c | 13 ++ drivers/media/i2c/soc_camera/mt9m111.c | 2 drivers/media/platform/mx2_emmaprp.c | 6 drivers/media/platform/s5p-g2d/g2d.c | 6 drivers/media/platform/s5p-jpeg/jpeg-core.c | 57 ++++---- drivers/media/platform/sh_veu.c | 4 drivers/mmc/host/davinci_mmc.c | 2 drivers/mmc/host/omap.c | 2 drivers/net/bonding/bond_main.c | 6 drivers/net/ethernet/cisco/enic/enic_main.c | 6 drivers/net/ethernet/intel/e1000e/netdev.c | 4 drivers/net/usb/qmi_wwan.c | 1 drivers/net/wireless/mediatek/mt7601u/eeprom.h | 2 drivers/net/wireless/rsi/rsi_common.h | 1 drivers/net/wireless/ti/wlcore/main.c | 7 - drivers/pci/quirks.c | 2 drivers/regulator/act8865-regulator.c | 5 drivers/scsi/megaraid/megaraid_sas_base.c | 1 drivers/scsi/scsi_scan.c | 6 drivers/soc/qcom/qcom_gsbi.c | 7 - drivers/soc/tegra/fuse/fuse-tegra.c | 12 + drivers/staging/comedi/drivers/ni_usb6501.c | 10 - drivers/staging/comedi/drivers/vmk80xx.c | 8 - drivers/thermal/int340x_thermal/int3400_thermal.c | 21 ++- drivers/tty/Kconfig | 23 +++ drivers/tty/serial/atmel_serial.c | 43 ++++-- drivers/tty/serial/xilinx_uartps.c | 2 drivers/tty/tty_buffer.c | 2 drivers/tty/tty_io.c | 3 drivers/tty/tty_ldisc.c | 47 +++++++ drivers/usb/chipidea/core.c | 9 + drivers/video/fbdev/core/fbmem.c | 3 fs/9p/v9fs.c | 21 +++ fs/9p/v9fs.h | 1 fs/9p/vfs_dir.c | 8 - fs/9p/vfs_file.c | 6 fs/binfmt_elf.c | 2 fs/buffer.c | 7 + fs/cifs/cifs_dfs_ref.c | 4 fs/cifs/connect.c | 5 fs/cifs/file.c | 14 ++ fs/cifs/inode.c | 69 +++++----- fs/cifs/smb1ops.c | 2 fs/cifs/smb2maperror.c | 3 fs/ext4/indirect.c | 47 +++---- fs/ext4/ioctl.c | 7 + fs/ext4/resize.c | 17 ++ fs/f2fs/super.c | 34 +++++ fs/f2fs/trace.c | 8 + fs/file.c | 1 fs/ocfs2/cluster/nodemanager.c | 14 +- fs/overlayfs/dir.c | 13 +- include/linux/atalk.h | 20 ++- include/linux/bitrev.h | 36 ++--- include/linux/kprobes.h | 1 include/linux/ring_buffer.h | 2 include/linux/string.h | 3 include/linux/swap.h | 4 include/net/net_namespace.h | 1 include/net/netfilter/br_netfilter.h | 1 include/net/netns/hash.h | 15 -- kernel/events/core.c | 2 kernel/irq/chip.c | 4 kernel/kprobes.c | 6 kernel/locking/lockdep.c | 3 kernel/sched/fair.c | 31 ++++ kernel/sysctl.c | 4 kernel/trace/ftrace.c | 6 kernel/trace/ring_buffer.c | 5 kernel/trace/trace.c | 6 kernel/trace/trace_kdb.c | 6 lib/bsearch.c | 2 lib/div64.c | 4 lib/int_sqrt.c | 6 lib/raid6/Makefile | 2 lib/string.c | 20 +++ mm/cma.c | 4 mm/mempolicy.c | 8 - mm/page_ext.c | 1 mm/slab.c | 17 +- mm/vmalloc.c | 6 mm/vmstat.c | 5 net/9p/protocol.c | 3 net/appletalk/atalk_proc.c | 2 net/appletalk/ddp.c | 37 ++++- net/appletalk/sysctl_net_atalk.c | 5 net/atm/lec.c | 6 net/bluetooth/hci_sock.c | 3 net/bridge/br_multicast.c | 4 net/bridge/br_netfilter_hooks.c | 5 net/core/ethtool.c | 29 ++-- net/core/net_namespace.c | 1 net/ipv4/fou.c | 4 net/ipv4/route.c | 16 ++ net/ipv4/tcp_dctcp.c | 36 ++--- net/ipv4/tcp_input.c | 10 - net/ipv6/ip6_output.c | 4 net/ipv6/ip6_tunnel.c | 4 net/ipv6/sit.c | 4 net/mac80211/driver-ops.h | 3 net/netfilter/xt_physdev.c | 9 + net/openvswitch/flow_netlink.c | 4 net/rds/tcp.c | 2 net/sctp/protocol.c | 1 scripts/mod/file2alias.c | 141 +++++++--------------- security/device_cgroup.c | 2 sound/core/info.c | 12 + sound/core/init.c | 18 +- sound/core/pcm_native.c | 8 + sound/core/seq/seq_clientmgr.c | 6 sound/drivers/opl3/opl3_voice.h | 2 sound/isa/sb/sb8.c | 4 sound/pci/echoaudio/echoaudio.c | 5 sound/soc/fsl/fsl-asoc-card.c | 1 sound/soc/fsl/fsl_esai.c | 47 +++++-- sound/soc/fsl/imx-sgtl5000.c | 1 tools/lib/traceevent/event-parse.c | 2 tools/perf/builtin-top.c | 5 tools/perf/tests/evsel-tp-sched.c | 7 - tools/perf/tests/openat-syscall-all-cpus.c | 4 tools/perf/util/evsel.c | 1 tools/power/x86/turbostat/turbostat.c | 3 184 files changed, 1194 insertions(+), 583 deletions(-)
Aaro Koskinen (1):
mmc: omap: fix the maximum timeout setting
Aditya Pakki (1):
x86/hpet: Prevent potential NULL pointer dereference
Akinobu Mita (1):
media: mt9m111: set initial frame size other than 0x0
Alexey Khoroshilov (1):
soc: qcom: gsbi: Fix error handling in gsbi_probe()
Alistair Strachan (1):
x86: vdso: Use $LD instead of $CC to link
Anders Roxell (1):
dmaengine: imx-dma: fix warning comparison of distinct pointer types
Andre Przywara (1):
PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller
Andrea Righi (2):
kprobes: Prohibit probing on bsearch()
openvswitch: fix flow actions reallocation
Ard Biesheuvel (2):
crypto: sha256/arm - fix crash bug in Thumb2 build
crypto: sha512/arm - fix crash bug in Thumb2 build
Arnaldo Carvalho de Melo (1):
perf evsel: Free evsel->counts in perf_evsel__exit()
Arnd Bergmann (4):
enic: fix build warning without CONFIG_CPUMASK_OFFSTACK include/linux/bitrev.h: fix constant bitrev
mmc: davinci: remove extraneous __init annotation
appletalk: Fix compile regression
Aurelien Aptel (1):
CIFS: fix POSIX lock leak and invalid ptr deref
Axel Lin (1):
regulator: act8865: Fix act8600_sudcdc_voltage_ranges setting
Bartlomiej Zolnierkiewicz (1):
ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms
Ben Dooks (1):
dmaengine: tegra: avoid overflow of byte tracking
Benjamin Block (1):
scsi: core: replace GFP_ATOMIC with GFP_KERNEL in scsi_scan.c
Bjørn Mork (1):
qmi_wwan: add Olicard 600
Buland Singh (1):
hpet: Fix missing '=' character in the __setup() code of hpet_mmap_enable
Carlos Maiolino (1):
fs: fix guard_bio_eod to check for real EOD errors
Changbin Du (3):
perf top: Fix error handling in cmd_top()
perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test()
Chao Yu (1):
f2fs: fix to do sanity check with current segment number
Christian Brauner (1):
sysctl: handle overflow for file-max
Christian Lamparter (1):
crypto: crypto4xx - properly set IV after de- and encrypt
Colin Ian King (1):
ALSA: opl3: fix mismatch between snd_opl3_drum_switch definition and declaration
Coly Li (3):
bcache: fix input overflow to cache set sysfs file io_error_halflife
bcache: fix input overflow to sequential_cutoff
bcache: improve sysfs_strtoul_clamp()
Dan Carpenter (1):
xen: Prevent buffer overflow in privcmd ioctl
Darrick J. Wong (1):
ext4: prohibit fstrim in norecovery mode
David Arcari (1):
tools/power turbostat: return the exit status of a command
David Engraf (1):
ARM: dts: at91: Fix typo in ISC_D0 on PC9
David Tolnay (1):
hwrng: virtio - Avoid repeated init of completion
Dinu-Razvan Chis-Serban (1):
9p locks: add mount option for lock retry interval
Douglas Anderson (1):
tracing: kdb: Fix ftdump to not sleep
Dragos Bogdan (1):
iio: ad_sigma_delta: select channel when reading register
Eric Biggers (1):
crypto: x86/poly1305 - fix overflow during partial reduction
Eric Dumazet (3):
netns: provide pure entropy for net_hash_mix()
tcp: tcp_grow_window() needs to respect tcp_space()
ipv4: ensure rcu_read_lock() in ipv4_link_failure()
Ezequiel Garcia (4):
media: sh_veu: Correct return type for mem2mem buffer helpers
media: s5p-jpeg: Correct return type for mem2mem buffer helpers
media: s5p-g2d: Correct return type for mem2mem buffer helpers
media: mx2_emmaprp: Correct return type for mem2mem buffer helpers
Felix Fietkau (1):
mac80211: do not call driver wake_tx_queue op during reconfig
Florian Fainelli (1):
e1000e: Fix -Wformat-truncation warnings
Florian Westphal (1):
netfilter: physdev: relax br_netfilter dependency
Georg Ottinger (1):
iio: adc: at91: disable adc channel interrupt in timeout case
George Rimar (1):
x86/build: Specify elf_i386 linker emulation explicitly for i386 objects
Gertjan Halkes (1):
9p: do not trust pdu content for stat item size
Greg Kroah-Hartman (4):
tty: mark Siemens R3964 line discipline as BROKEN
tty: ldisc: add sysctl to prevent autoloading of ldiscs Revert "locking/lockdep: Add debug_locks check in __lock_downgrade()" Linux 4.4.179
Guenter Roeck (1):
cdrom: Fix race condition in cdrom_sysctl_register
Gustavo A. R. Silva (1):
net: atm: Fix potential Spectre v1 vulnerabilities
Håkon Bugge (1):
IB/mlx4: Increase the timeout for CM cache
Ian Abbott (4):
staging: comedi: vmk80xx: Fix use of uninitialized semaphore
staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf
staging: comedi: ni_usb6501: Fix use of uninitialized mutex
staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_bufJack Morgenstein (1):
IB/mlx4: Fix race condition between catas error reset and aliasguid flows
Jann Horn (1):
device_cgroup: fix RCU imbalance in error case
Jarkko Sakkinen (2):
tpm/tpm_crb: Avoid unaligned reads in crb_recv() tpm/tpm_i2c_atmel: Return -E2BIG when the transfer is incomplete
Jason Cai (Xiang Feng) (1):
dm thin: add sanity checks to thin-pool and external snapshot creation
Jason Yan (1):
scsi: megaraid_sas: return error when create DMA pool failed
Jeremy Compostella (1):
i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA
Jia Guo (1):
ocfs2: fix a panic problem caused by o2cb_ctl
Julia Cartwright (1):
iommu/dmar: Fix buffer overflow during PCI bus notification
Junwei Hu (1):
ipv6: Fix dangling pointer when ipv6 fragment
Jérôme Glisse (1):
block: do not leak memory in bio_copy_user_iov()
Kangjie Lu (2):
ALSA: echoaudio: add a check for ioremap_nocache
ALSA: sb8: add a check for request_region
Koen De Schepper (1):
tcp: Ensure DCTCP reacts to losses
Konstantin Khlebnikov (1):
mm/vmstat.c: fix /proc/vmstat format for CONFIG_DEBUG_TLBFLUSH=y CONFIG_SMP=n
Li RongQing (1):
net: ethtool: not call vzalloc for zero sized memory request
Linus Torvalds (1):
binfmt_elf: switch to new creds when switching to new mm
Lorenzo Bianconi (2):
ipv6: sit: reset ip header pointer in ipip6_rcv
net: fou: do not use guehdr after iptunnel_pull_offloads in gue_udp_recv
Louis Taylor (1):
cifs: use correct format characters
Lu Baolu (1):
iommu/vt-d: Check capability before disabling protected memory
Lukas Czerner (2):
ext4: add missing brelse() in add_new_gdb_meta_bg()
ext4: report real fs size after failed resize
Manfred Schlaegl (2):
fbdev: fbmem: fix memory access if logo is bigger than the screen
tty: increase the default flip buffer limit to 2*640K
Mao Wenan (1):
net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock().
Masahiro Yamada (3):
h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
modpost: file2alias: go back to simple devtable lookup
modpost: file2alias: check prototype of handler
Masami Hiramatsu (3):
x86/kprobes: Verify stack frame on kretprobe
kprobes: Mark ftrace mcount handler functions nokprobe
kprobes: Fix error check when reusing optimized probes
Matthew Garrett (2):
thermal/int340x_thermal: Add additional UUIDs
thermal/int340x_thermal: fix mode settingMatthew Whitehead (1):
x86/cpu/cyrix: Use correct macros for Cyrix calls on Geode processors
Matthias Kaehlcke (1):
Revert "kbuild: use -Oz instead of -Os when using clang"
Max Filippov (1):
xtensa: fix return_address
Mel Gorman (1):
sched/fair: Do not re-read ->h_load_next during hierarchical load calculation
Michal Kazior (1):
leds: lp55xx: fix null deref on firmware load failure
Michal Simek (1):
serial: uartps: console_setup() can't be placed to init section
Mike Looijmans (1):
iio/gyro/bmg160: Use millidegrees for temperature scale
Miklos Szeredi (1):
ovl: fix uid/gid when creating over whiteout
Myungho Jung (1):
Bluetooth: Fix decrementing reference count twice in releasing socket
Nathan Chancellor (3):
ARM: 8833/1: Ensure that NEON code always compiles with Clang x86/hw_breakpoints: Make default case in hw_breakpoint_arch_parse() return an error
arm64: futex: Restore oldval initialization to work around buggy compilers
Nick Desaulniers (3):
kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD x86/vdso: Drop implicit common-page-size linker flag lib/string.c: implement a basic bcmp
Nikolay Aleksandrov (1):
net: bridge: multicast: use rcu to access port list from br_multicast_start_querier
Paul Kocialkowski (1):
usb: chipidea: Grab the (legacy) USB PHY by phandle first
Pawe? Chmiel (1):
media: s5p-jpeg: Check for fmt_ver_flag when doing fmt enumeration
Peng Fan (1):
mm/cma.c: cma_declare_contiguous: correct err handling
Peter Zijlstra (1):
lib/int_sqrt: optimize initial value compute
Phil Auld (1):
sched/fair: Limit sched_cfs_period_timer() loop to avoid hard lockup
Pi-Hsun Shih (1):
include/linux/swap.h: use offsetof() instead of custom __swapoffset macro
Qian Cai (2):
mm/page_ext.c: fix an imbalance with kmemleak mm/slab.c: kmemleak no scan alien caches
Rafael Ávila de Espíndola (1):
x86/build: Mark per-CPU symbols as absolute explicitly for LLD
Ranjani Sridharan (1):
ALSA: PCM: check if ops are defined before suspending PCM
Razvan Stefanescu (2):
tty/serial: atmel: Add is_half_duplex helper tty/serial: atmel: RS485 HD w/DMA: enable RX after TX is stopped
Ronald Tschalär (1):
ACPI / SBS: Fix GPE storm on recent MacBookPro's
Russell King (2):
gpio: gpio-omap: fix level interrupt idling
ARM: avoid Cortex-A9 livelock on tight dmb loops
S.j. Wang (1):
ASoC: fsl_esai: fix channel swap issue when stream starts
Sabrina Dubroca (1):
bonding: fix event handling for stacked bonds
Sahitya Tummala (1):
f2fs: do not use mutex lock in atomic context
Sai Prakash Ranjan (1):
coresight: etm4x: Add support to enable ETMv4.2
Sean Christopherson (1):
KVM: x86: Don't clear EFER during SMM transitions for 32-bit vCPU
Sebastian Andrzej Siewior (1):
ARM: 8840/1: use a raw_spinlock_t in unwind
Sheena Mira-ato (1):
ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
Shuriyc Chu (1):
fs/file.c: initialize init_files.resize_wait
Siva Rebbagondla (1):
rsi: improve kernel thread handling to fix kernel panic
Stanislaw Gruszka (2):
mt7601u: bump supported EEPROM version
lib/div64.c: off by one in shift
Stephane Eranian (1):
perf/core: Restore mmap record type correctly
Stephen Boyd (1):
genirq: Respect IRQCHIP_SKIP_SET_WAKE in irq_chip_set_wake_parent()
Stephen Suryaputra (1):
ipv4: recompile ip options in ipv4_link_failure
Steve French (2):
fix incorrect error code mapping for OBJECTID_NOT_FOUND
cifs: fallback to older infolevels on findfirst queryinfo retry
Takashi Iwai (2):
ALSA: core: Fix card races between register and disconnect
ALSA: info: Fix racy addition/deletion of nodes
Thomas Richter (1):
perf test: Fix failure of 'evsel-tp-sched' test on s390
Timo Alho (1):
soc/tegra: fuse: Fix illegal free of IO base address
Tony Jones (1):
tools lib traceevent: Fix buffer overflow in arg_eval
Uladzislau Rezki (Sony) (1):
mm/vmalloc.c: fix kernel BUG at mm/vmalloc.c:512!
Ville Syrjälä (1):
drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers
Wen Yang (1):
SoC: imx-sgtl5000: add missing put_device()
Will Deacon (4):
arm64: debug: Don't propagate UNKNOWN FAR into si_code for debug signals
arm64: debug: Ensure debug handlers check triggering exception level
arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value kernel/sysctl.c: fix out-of-bounds access when setting file-max
Xin Long (1):
sctp: initialize _pad of sockaddr_in before copying to user memory
Yang Shi (2):
mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified
ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t
Yao Liu (1):
cifs: Fix NULL pointer dereference of devname
YueHaibing (1):
appletalk: Fix use-after-free in atalk_proc_exit
Zubin Mithra (1):
ALSA: seq: Fix OOB-reads from strlcpy
Zumeng Chen (1):
wlcore: Fix memory leak in case wl12xx_fetch_firmware failure
he, bo (1):
io: accel: kxcjk1013: restore the range after resume.
wen yang (1):
ASoC: fsl-asoc-card: fix object reference leaks in fsl_asoc_card_probe
zhangyi (F) (1):
ext4: cleanup bh release code in ext4_ind_remove_space()
Greg KH
maintainerDocumentation/arm/kernel_mode_neon.txt +2 -2
@@ -6,7 +6,7 @@ TL;DR summary * Use only NEON instructions, or VFP instructions that don't rely on support code * Isolate your NEON code in a separate compilation unit, and compile it with - '-mfpu=neon -mfloat-abi=softfp' + '-march=armv7-a -mfpu=neon -mfloat-abi=softfp' * Put kernel_neon_begin() and kernel_neon_end() calls around the calls into your NEON code * Don't sleep in your NEON code, and be aware that it will be executed with
@@ -87,7 +87,7 @@ instructions appearing in unexpected places if no special care is taken. Therefore, the recommended and only supported way of using NEON/VFP in the kernel is by adhering to the following rules: * isolate the NEON code in a separate compilation unit and compile it with - '-mfpu=neon -mfloat-abi=softfp'; + '-march=armv7-a -mfpu=neon -mfloat-abi=softfp'; * issue the calls to kernel_neon_begin(), kernel_neon_end() as well as the calls into the unit containing the NEON code from a compilation unit which is *not* built with the GCC flag '-mfpu=neon' set.
Makefile +3 -3
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 178 +SUBLEVEL = 179 EXTRAVERSION = NAME = Blurry Fish Butt
@@ -610,7 +610,7 @@ all: vmlinux ifeq ($(cc-name),clang) ifneq ($(CROSS_COMPILE),) CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%)) -GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) +GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) CLANG_PREFIX := --prefix=$(GCC_TOOLCHAIN_DIR) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) endif
@@ -639,7 +639,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context) KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias) ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -KBUILD_CFLAGS += $(call cc-option,-Oz,-Os) +KBUILD_CFLAGS += -Os else ifdef CONFIG_PROFILE_ALL_BRANCHES KBUILD_CFLAGS += -O2
arch/arm/boot/dts/sama5d2-pinfunc.h +1 -1
@@ -517,7 +517,7 @@#define PIN_PC9__GPIO PINMUX_PIN(PIN_PC9, 0, 0)#define PIN_PC9__FIQ PINMUX_PIN(PIN_PC9, 1, 3)#define PIN_PC9__GTSUCOMP PINMUX_PIN(PIN_PC9, 2, 1) -#define PIN_PC9__ISC_D0 PINMUX_PIN(PIN_PC9, 2, 1) +#define PIN_PC9__ISC_D0 PINMUX_PIN(PIN_PC9, 3, 1)#define PIN_PC9__TIOA4 PINMUX_PIN(PIN_PC9, 4, 2)#define PIN_PC10 74#define PIN_PC10__GPIO PINMUX_PIN(PIN_PC10, 0, 0)
arch/arm/crypto/sha256-armv4.pl +2 -1
@@ -205,10 +205,11 @@ K256: .global sha256_block_data_order .type sha256_block_data_order,%function sha256_block_data_order: +.Lsha256_block_data_order: #if __ARM_ARCH__<7 sub r3,pc,#8 @ sha256_block_data_order #else - adr r3,sha256_block_data_order + adr r3,.Lsha256_block_data_order #endif #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) ldr r12,.LOPENSSL_armcap
arch/arm/crypto/sha256-core.S_shipped +2 -1
@@ -86,10 +86,11 @@ K256: .global sha256_block_data_order .type sha256_block_data_order,%function sha256_block_data_order: +.Lsha256_block_data_order: #if __ARM_ARCH__<7 sub r3,pc,#8 @ sha256_block_data_order #else - adr r3,sha256_block_data_order + adr r3,.Lsha256_block_data_order #endif #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) ldr r12,.LOPENSSL_armcap
arch/arm/crypto/sha512-armv4.pl +2 -1
@@ -267,10 +267,11 @@ WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817) .global sha512_block_data_order .type sha512_block_data_order,%function sha512_block_data_order: +.Lsha512_block_data_order: #if __ARM_ARCH__<7 sub r3,pc,#8 @ sha512_block_data_order #else - adr r3,sha512_block_data_order + adr r3,.Lsha512_block_data_order #endif #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) ldr r12,.LOPENSSL_armcap
arch/arm/crypto/sha512-core.S_shipped +2 -1
@@ -134,10 +134,11 @@ WORD64(0x5fcb6fab,0x3ad6faec, 0x6c44198c,0x4a475817) .global sha512_block_data_order .type sha512_block_data_order,%function sha512_block_data_order: +.Lsha512_block_data_order: #if __ARM_ARCH__<7 sub r3,pc,#8 @ sha512_block_data_order #else - adr r3,sha512_block_data_order + adr r3,.Lsha512_block_data_order #endif #if __ARM_MAX_ARCH__>=7 && !defined(__KERNEL__) ldr r12,.LOPENSSL_armcap
arch/arm/include/asm/barrier.h +2 -0
@@ -10,6 +10,8 @@#define sev () __asm__ __volatile__ ("sev" : : : "memory")#define wfe () __asm__ __volatile__ ("wfe" : : : "memory")#define wfi () __asm__ __volatile__ ("wfi" : : : "memory") +#else +#define wfe () do { } while (0)#endif #if __LINUX_ARM_ARCH__ >=7
arch/arm/include/asm/processor.h +5 -1
@@ -77,7 +77,11 @@ extern void release_thread(struct task_struct *);unsigned long get_wchan (struct task_struct *p);#if __LINUX_ARM_ARCH__ ==6 || defined(CONFIG_ARM_ERRATA_754327 ) -#define cpu_relax () smp_mb() +#define cpu_relax () \ + do { \ + smp_mb(); \ + __asm__ __volatile__("nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;"); \ + } while (0)#else #define cpu_relax () barrier()#endif
arch/arm/kernel/machine_kexec.c +4 -1
@@ -87,8 +87,11 @@ void machine_crash_nonpanic_core(void *unused)set_cpu_online (smp_processor_id (), false);atomic_dec (&waiting_for_crash_ipi); -while (1 ) + +while (1 ) {cpu_relax (); +wfe (); + } }static void machine_kexec_mask_interrupts (void )
arch/arm/kernel/patch.c +3 -3
@@ -15,7 +15,7 @@ struct patch {unsigned int insn; }; -static DEFINE_SPINLOCK (patch_lock); +static DEFINE_RAW_SPINLOCK (patch_lock);static void __kprobes *patch_map (void *addr,int fixmap,unsigned long *flags) __acquires(&patch_lock)
@@ -32,7 +32,7 @@ static void __kprobes *patch_map(void *addr, int fixmap, unsigned long *flags)return addr;if (flags) -spin_lock_irqsave (&patch_lock, *flags); +raw_spin_lock_irqsave (&patch_lock, *flags);else __acquire (&patch_lock);
@@ -47,7 +47,7 @@ static void __kprobes patch_unmap(int fixmap, unsigned long *flags)clear_fixmap (fixmap);if (flags) -spin_unlock_irqrestore (&patch_lock, *flags); +raw_spin_unlock_irqrestore (&patch_lock, *flags);else __release (&patch_lock); }
arch/arm/kernel/smp.c +3 -1
@@ -563,8 +563,10 @@ static void ipi_cpu_stop(unsigned int cpu)local_fiq_disable ();local_irq_disable (); -while (1 ) +while (1 ) {cpu_relax (); +wfe (); + } } static DEFINE_PER_CPU(struct completion *, cpu_completion);
arch/arm/kernel/unwind.c +7 -7
@@ -93,7 +93,7 @@ extern const struct unwind_idx __start_unwind_idx[];static const struct unwind_idx *__origin_unwind_idx;extern const struct unwind_idx __stop_unwind_idx[]; -static DEFINE_SPINLOCK (unwind_lock); +static DEFINE_RAW_SPINLOCK (unwind_lock);static LIST_HEAD (unwind_tables);/* Convert a prel31 symbol to an absolute address */
@@ -201,7 +201,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)/* module unwind tables */ struct unwind_table *table; -spin_lock_irqsave (&unwind_lock, flags); +raw_spin_lock_irqsave (&unwind_lock, flags);list_for_each_entry (table, &unwind_tables, list) {if (addr >= table->begin_addr && addr < table->end_addr) {
@@ -213,7 +213,7 @@ static const struct unwind_idx *unwind_find_idx(unsigned long addr)break ; } } -spin_unlock_irqrestore (&unwind_lock, flags); +raw_spin_unlock_irqrestore (&unwind_lock, flags); }pr_debug ("%s: idx = %p\n" , __func__, idx);
@@ -529,9 +529,9 @@ struct unwind_table *unwind_table_add(unsigned long start, unsigned long size, tab->begin_addr = text_addr; tab->end_addr = text_addr + text_size; -spin_lock_irqsave (&unwind_lock, flags); +raw_spin_lock_irqsave (&unwind_lock, flags);list_add_tail (&tab->list, &unwind_tables); -spin_unlock_irqrestore (&unwind_lock, flags); +raw_spin_unlock_irqrestore (&unwind_lock, flags);return tab; }
@@ -543,9 +543,9 @@ void unwind_table_del(struct unwind_table *tab)if (!tab)return ; -spin_lock_irqsave (&unwind_lock, flags); +raw_spin_lock_irqsave (&unwind_lock, flags);list_del (&tab->list); -spin_unlock_irqrestore (&unwind_lock, flags); +raw_spin_unlock_irqrestore (&unwind_lock, flags);kfree (tab); }
arch/arm/lib/Makefile +1 -1
@@ -35,7 +35,7 @@ $(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S $(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S ifeq ($(CONFIG_KERNEL_MODE_NEON),y) - NEON_FLAGS := -mfloat-abi=softfp -mfpu=neon + NEON_FLAGS := -march=armv7-a -mfloat-abi=softfp -mfpu=neon CFLAGS_xor-neon.o += $(NEON_FLAGS) obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o endif
arch/arm/lib/xor-neon.c +1 -1
@@ -14,7 +14,7 @@MODULE_LICENSE ("GPL" );#ifndef __ARM_NEON__ -#error You should compile this file with '-mfloat-abi=softfp -mfpu=neon' +#error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon'#endif /*
arch/arm/mach-omap2/prm_common.c +3 -1
@@ -533,8 +533,10 @@ void omap_prm_reset_system(void) prm_ll_data->reset_system (); -while (1 ) +while (1 ) {cpu_relax (); +wfe (); + } }/**
arch/arm/plat-samsung/Kconfig +1 -1
@@ -255,7 +255,7 @@ config S3C_PM_DEBUG_LED_SMDK config SAMSUNG_PM_CHECK bool "S3C2410 PM Suspend Memory CRC" - depends on PM + depends on PM && (PLAT_S3C24XX || ARCH_S3C64XX || ARCH_S5PV210) select CRC32 help Enable the PM code's memory area checksum over sleep. This option
arch/arm64/include/asm/futex.h +7 -7
@@ -33,8 +33,8 @@" prfm pstl1strm, %2\n" \"1: ldxr %w1, %2\n" \ insn"\n" \ -"2: stlxr %w3, %w0, %2\n" \ -" cbnz %w3, 1b\n" \ +"2: stlxr %w0, %w3, %2\n" \ +" cbnz %w0, 1b\n" \" dmb ish\n" \"3:\n" \" .pushsection .fixup,\"ax\"\n" \
@@ -61,23 +61,23 @@ arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr)switch (op) {case FUTEX_OP_SET : -__futex_atomic_op ("mov %w0, %w4" , +__futex_atomic_op ("mov %w3, %w4" , ret, oldval, uaddr, tmp, oparg);break ;case FUTEX_OP_ADD : -__futex_atomic_op ("add %w0, %w1, %w4" , +__futex_atomic_op ("add %w3, %w1, %w4" , ret, oldval, uaddr, tmp, oparg);break ;case FUTEX_OP_OR : -__futex_atomic_op ("orr %w0, %w1, %w4" , +__futex_atomic_op ("orr %w3, %w1, %w4" , ret, oldval, uaddr, tmp, oparg);break ;case FUTEX_OP_ANDN : -__futex_atomic_op ("and %w0, %w1, %w4" , +__futex_atomic_op ("and %w3, %w1, %w4" , ret, oldval, uaddr, tmp, ~oparg);break ;case FUTEX_OP_XOR : -__futex_atomic_op ("eor %w0, %w1, %w4" , +__futex_atomic_op ("eor %w3, %w1, %w4" , ret, oldval, uaddr, tmp, oparg);break ;default :
arch/arm64/kernel/kgdb.c +12 -3
@@ -215,22 +215,31 @@ int kgdb_arch_handle_exception(int exception_vector, int signo,static int kgdb_brk_fn (struct pt_regs *regs,unsigned int esr) { +if (user_mode (regs)) +return DBG_HOOK_ERROR ; +kgdb_handle_exception (1 ,SIGTRAP ,0 , regs); -return 0 ; +return DBG_HOOK_HANDLED ; }static int kgdb_compiled_brk_fn (struct pt_regs *regs,unsigned int esr) { +if (user_mode (regs)) +return DBG_HOOK_ERROR ; + compiled_break =1 ;kgdb_handle_exception (1 ,SIGTRAP ,0 , regs); -return 0 ; +return DBG_HOOK_HANDLED ; }static int kgdb_step_brk_fn (struct pt_regs *regs,unsigned int esr) { +if (user_mode (regs)) +return DBG_HOOK_ERROR ; +kgdb_handle_exception (1 ,SIGTRAP ,0 , regs); -return 0 ; +return DBG_HOOK_HANDLED ; }static struct break_hook kgdb_brkpt_hook = {
arch/arm64/mm/fault.c +5 -4
@@ -589,11 +589,12 @@ void __init hook_debug_fault_code(int nr, debug_fault_info[nr].name = name; } -asmlinkage int __exception do_debug_exception(unsigned long addr, +asmlinkage int __exception do_debug_exception(unsigned long addr_if_watchpoint,unsigned int esr,struct pt_regs *regs) {const struct fault_info *inf = debug_fault_info +DBG_ESR_EVT (esr); +unsigned long pc =instruction_pointer (regs);struct siginfo info;int rv;
@@ -604,16 +605,16 @@ asmlinkage int __exception do_debug_exception(unsigned long addr,if (interrupts_enabled (regs))trace_hardirqs_off (); -if (!inf->fn (addr, esr, regs)) { +if (!inf->fn (addr_if_watchpoint, esr, regs)) { rv =1 ; }else {pr_alert ("Unhandled debug exception: %s (0x%08x) at 0x%016lx\n" , - inf->name, esr, addr); + inf->name, esr, pc); info.si_signo = inf->sig; info.si_errno =0 ; info.si_code = inf->code; - info.si_addr = (void __user *)addr; + info.si_addr = (void __user *)pc;arm64_notify_die ("" , regs, &info,0 ); rv =0 ; }
arch/h8300/Makefile +1 -1
@@ -23,7 +23,7 @@ KBUILD_AFLAGS += $(aflags-y) LDFLAGS += $(ldflags-y) ifeq ($(CROSS_COMPILE),) -CROSS_COMPILE := h8300-unknown-linux- +CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-) endif core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
arch/x86/boot/Makefile +1 -1
@@ -100,7 +100,7 @@ $(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE AFLAGS_header.o += -I$(obj) $(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h -LDFLAGS_setup.elf := -T +LDFLAGS_setup.elf := -m elf_i386 -T $(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE $(call if_changed,ld)
arch/x86/crypto/poly1305-avx2-x86_64.S +10 -4
@@ -321,6 +321,12 @@ ENTRY(poly1305_4block_avx2) vpaddq t2,t1,t1 vmovq t1x,d4 + # Now do a partial reduction mod (2^130)-5, carrying h0 -> h1 -> h2 -> + # h3 -> h4 -> h0 -> h1 to get h0,h2,h3,h4 < 2^26 and h1 < 2^26 + a small + # amount. Careful: we must not assume the carry bits 'd0 >> 26', + # 'd1 >> 26', 'd2 >> 26', 'd3 >> 26', and '(d4 >> 26) * 5' fit in 32-bit + # integers. It's true in a single-block implementation, but not here. + # d1 += d0 >> 26 mov d0,%rax shr $26,%rax
@@ -359,16 +365,16 @@ ENTRY(poly1305_4block_avx2) # h0 += (d4 >> 26) * 5 mov d4,%rax shr $26,%rax - lea (%eax,%eax,4),%eax - add %eax,%ebx + lea (%rax,%rax,4),%rax + add %rax,%rbx # h4 = d4 & 0x3ffffff mov d4,%rax and $0x3ffffff,%eax mov %eax,h4 # h1 += h0 >> 26 - mov %ebx,%eax - shr $26,%eax + mov %rbx,%rax + shr $26,%rax add %eax,h1 # h0 = h0 & 0x3ffffff andl $0x3ffffff,%ebx
arch/x86/crypto/poly1305-sse2-x86_64.S +14 -8
@@ -251,16 +251,16 @@ ENTRY(poly1305_block_sse2) # h0 += (d4 >> 26) * 5 mov d4,%rax shr $26,%rax - lea (%eax,%eax,4),%eax - add %eax,%ebx + lea (%rax,%rax,4),%rax + add %rax,%rbx # h4 = d4 & 0x3ffffff mov d4,%rax and $0x3ffffff,%eax mov %eax,h4 # h1 += h0 >> 26 - mov %ebx,%eax - shr $26,%eax + mov %rbx,%rax + shr $26,%rax add %eax,h1 # h0 = h0 & 0x3ffffff andl $0x3ffffff,%ebx
@@ -518,6 +518,12 @@ ENTRY(poly1305_2block_sse2) paddq t2,t1 movq t1,d4 + # Now do a partial reduction mod (2^130)-5, carrying h0 -> h1 -> h2 -> + # h3 -> h4 -> h0 -> h1 to get h0,h2,h3,h4 < 2^26 and h1 < 2^26 + a small + # amount. Careful: we must not assume the carry bits 'd0 >> 26', + # 'd1 >> 26', 'd2 >> 26', 'd3 >> 26', and '(d4 >> 26) * 5' fit in 32-bit + # integers. It's true in a single-block implementation, but not here. + # d1 += d0 >> 26 mov d0,%rax shr $26,%rax
@@ -556,16 +562,16 @@ ENTRY(poly1305_2block_sse2) # h0 += (d4 >> 26) * 5 mov d4,%rax shr $26,%rax - lea (%eax,%eax,4),%eax - add %eax,%ebx + lea (%rax,%rax,4),%rax + add %rax,%rbx # h4 = d4 & 0x3ffffff mov d4,%rax and $0x3ffffff,%eax mov %eax,h4 # h1 += h0 >> 26 - mov %ebx,%eax - shr $26,%eax + mov %rbx,%rax + shr $26,%rax add %eax,h1 # h0 = h0 & 0x3ffffff andl $0x3ffffff,%ebx
arch/x86/entry/vdso/Makefile +9 -13
@@ -41,10 +41,8 @@ targets += $(vdso_img_sodbg) export CPPFLAGS_vdso.lds += -P -C -VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ - -Wl,--no-undefined \ - -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 \ - $(DISABLE_LTO) +VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \ + -z max-page-size=4096 $(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE $(call if_changed,vdso)
@@ -90,10 +88,8 @@ CFLAGS_REMOVE_vvar.o = -pg # CPPFLAGS_vdsox32.lds = $(CPPFLAGS_vdso.lds) -VDSO_LDFLAGS_vdsox32.lds = -Wl,-m,elf32_x86_64 \ - -Wl,-soname=linux-vdso.so.1 \ - -Wl,-z,max-page-size=4096 \ - -Wl,-z,common-page-size=4096 +VDSO_LDFLAGS_vdsox32.lds = -m elf32_x86_64 -soname linux-vdso.so.1 \ + -z max-page-size=4096 # 64-bit objects to re-brand as x32 vobjs64-for-x32 := $(filter-out $(vobjs-nox32),$(vobjs-y))
@@ -121,7 +117,7 @@ $(obj)/vdsox32.so.dbg: $(src)/vdsox32.lds $(vobjx32s) FORCE $(call if_changed,vdso) CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) -VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-m,elf_i386 -Wl,-soname=linux-gate.so.1 +VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -soname linux-gate.so.1 # This makes sure the $(obj) subdirectory exists even though vdso32/ # is not a kbuild sub-make subdirectory.
@@ -157,13 +153,13 @@ $(obj)/vdso32.so.dbg: FORCE \ # The DSO images are built using a special linker script. # quiet_cmd_vdso = VDSO $@ - cmd_vdso = $(CC) -nostdlib -o $@ \ + cmd_vdso = $(LD) -nostdlib -o $@ \ $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ - -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ + -T $(filter %.lds,$^) $(filter %.o,$^) && \ sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' -VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=both) \ - $(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS) +VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \ + $(call ld-option, --build-id) -Bsymbolic GCOV_PROFILE := n #
arch/x86/include/asm/xen/hypercall.h +3 -0
@@ -215,6 +215,9 @@ privcmd_call(unsigned call, __HYPERCALL_DECLS;__HYPERCALL_5ARG (a1, a2, a3, a4, a5); +if (call >=PAGE_SIZE /sizeof (hypercall_page[0 ])) +return -EINVAL ; +stac (); asm volatile(CALL_NOSPEC : __HYPERCALL_5PARAM
arch/x86/kernel/cpu/cyrix.c +7 -7
@@ -121,7 +121,7 @@ static void set_cx86_reorder(void)setCx86 (CX86_CCR3 , (ccr3 &0x0f ) |0x10 );/* enable MAPEN */ /* Load/Store Serialize to mem access disable (=reorder it) */ -setCx86_old (CX86_PCR0 ,getCx86_old (CX86_PCR0 ) & ~0x80 ); +setCx86 (CX86_PCR0 ,getCx86 (CX86_PCR0 ) & ~0x80 );/* set load/store serialize from 1GB to 4GB */ ccr3 |=0xe0 ;setCx86 (CX86_CCR3 , ccr3);
@@ -132,11 +132,11 @@ static void set_cx86_memwb(void)printk (KERN_INFO "Enable Memory-Write-back mode on Cyrix/NSC processor.\n" );/* CCR2 bit 2: unlock NW bit */ -setCx86_old (CX86_CCR2 ,getCx86_old (CX86_CCR2 ) & ~0x04 ); +setCx86 (CX86_CCR2 ,getCx86 (CX86_CCR2 ) & ~0x04 );/* set 'Not Write-through' */ write_cr0 (read_cr0 () |X86_CR0_NW );/* CCR2 bit 2: lock NW bit and set WT1 */ -setCx86_old (CX86_CCR2 ,getCx86_old (CX86_CCR2 ) |0x14 ); +setCx86 (CX86_CCR2 ,getCx86 (CX86_CCR2 ) |0x14 ); }/*
@@ -150,14 +150,14 @@ static void geode_configure(void)local_irq_save (flags);/* Suspend on halt power saving and enable #SUSP pin */ -setCx86_old (CX86_CCR2 ,getCx86_old (CX86_CCR2 ) |0x88 ); +setCx86 (CX86_CCR2 ,getCx86 (CX86_CCR2 ) |0x88 ); ccr3 =getCx86 (CX86_CCR3 );setCx86 (CX86_CCR3 , (ccr3 &0x0f ) |0x10 );/* enable MAPEN */ /* FPU fast, DTE cache, Mem bypass */ -setCx86_old (CX86_CCR4 ,getCx86_old (CX86_CCR4 ) |0x38 ); +setCx86 (CX86_CCR4 ,getCx86 (CX86_CCR4 ) |0x38 );setCx86 (CX86_CCR3 , ccr3);/* disable MAPEN */ set_cx86_memwb ();
@@ -292,7 +292,7 @@ static void init_cyrix(struct cpuinfo_x86 *c)/* GXm supports extended cpuid levels 'ala' AMD */ if (c->cpuid_level ==2 ) {/* Enable cxMMX extensions (GX1 Datasheet 54) */ -setCx86_old (CX86_CCR7 ,getCx86_old (CX86_CCR7 ) |1 ); +setCx86 (CX86_CCR7 ,getCx86 (CX86_CCR7 ) |1 );/* * GXm : 0x30 ... 0x5f GXm datasheet 51
@@ -315,7 +315,7 @@ static void init_cyrix(struct cpuinfo_x86 *c)if (dir1 >7 ) { dir0_msn++;/* M II */ /* Enable MMX extensions (App note 108) */ -setCx86_old (CX86_CCR7 ,getCx86_old (CX86_CCR7 )|1 ); +setCx86 (CX86_CCR7 ,getCx86 (CX86_CCR7 )|1 ); }else {/* A 6x86MX - it has the bug. */ set_cpu_bug (c,X86_BUG_COMA );
arch/x86/kernel/hpet.c +2 -0
@@ -825,6 +825,8 @@ int __init hpet_enable(void)return 0 ;hpet_set_mapping (); +if (!hpet_virt_address) +return 0 ;/* * Read the period and check for a sane value:
arch/x86/kernel/hw_breakpoint.c +1 -0
@@ -351,6 +351,7 @@ int arch_validate_hwbkpt_settings(struct perf_event *bp)#endif default :WARN_ON_ONCE (1 ); +return -EINVAL ; }/*
arch/x86/kernel/kprobes/core.c +26 -0
@@ -541,6 +541,7 @@ void arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs)unsigned long *sara =stack_addr (regs); ri->ret_addr = (kprobe_opcode_t *) *sara; + ri->fp = sara;/* Replace the return addr with trampoline addr */ *sara = (unsigned long ) &kretprobe_trampoline;
@@ -742,15 +743,21 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)unsigned long flags, orig_ret_address =0 ;unsigned long trampoline_address = (unsigned long )&kretprobe_trampoline;kprobe_opcode_t *correct_ret_addr =NULL ; +void *frame_pointer; +bool skipped = false;INIT_HLIST_HEAD (&empty_rp);kretprobe_hash_lock (current, &head, &flags);/* fixup registers */ #ifdef CONFIG_X86_64 regs->cs = __KERNEL_CS; +/* On x86-64, we use pt_regs->sp for return address holder. */ + frame_pointer = ®s->sp;#else regs->cs = __KERNEL_CS |get_kernel_rpl (); regs->gs =0 ; +/* On x86-32, we use pt_regs->flags for return address holder. */ + frame_pointer = ®s->flags;#endif regs->ip = trampoline_address; regs->orig_ax = ~0UL ;
@@ -772,8 +779,25 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)if (ri->task != current)/* another task is sharing our hash bucket */ continue ; +/* +* Return probes must be pushed on this hash list correct +* order (same as return order) so that it can be poped +* correctly. However, if we find it is pushed it incorrect +* order, this means we find a function which should not be +* probed, because the wrong order entry is pushed on the +* path of processing other kretprobe itself. +*/ +if (ri->fp != frame_pointer) { +if (!skipped) +pr_warn ("kretprobe is stacked incorrectly. Trying to fixup.\n" ); + skipped = true; +continue ; + } orig_ret_address = (unsigned long )ri->ret_addr; +if (skipped) +pr_warn ("%ps must be blacklisted because of incorrect kretprobe order\n" , + ri->rp->kp.addr);if (orig_ret_address != trampoline_address)/*
@@ -791,6 +815,8 @@ __visible __used void *trampoline_handler(struct pt_regs *regs)if (ri->task != current)/* another task is sharing our hash bucket */ continue ; +if (ri->fp != frame_pointer) +continue ; orig_ret_address = (unsigned long )ri->ret_addr;if (ri->rp && ri->rp->handler) {
arch/x86/kernel/vmlinux.lds.S +1 -1
@@ -365,7 +365,7 @@ SECTIONS * Per-cpu symbols which need to be offset from __per_cpu_load * for the boot processor. */ -#define INIT_PER_CPU(x) init_per_cpu__##x = x + __per_cpu_load +#define INIT_PER_CPU(x) init_per_cpu__##x = ABSOLUTE(x) + __per_cpu_load INIT_PER_CPU(gdt_page); INIT_PER_CPU(irq_stack_union);
arch/x86/kvm/emulate.c +11 -10
@@ -2567,15 +2567,13 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)* CR0/CR3/CR4/EFER. It's all a bit more complicated if the vCPU * supports long mode. */ - cr4 = ctxt->ops->get_cr (ctxt,4 );if (emulator_has_longmode (ctxt)) {struct desc_struct cs_desc;/* Zero CR4.PCIDE before CR0.PG. */ -if (cr4 &X86_CR4_PCIDE ) { + cr4 = ctxt->ops->get_cr (ctxt,4 ); +if (cr4 &X86_CR4_PCIDE ) ctxt->ops->set_cr (ctxt,4 , cr4 & ~X86_CR4_PCIDE ); - cr4 &= ~X86_CR4_PCIDE ; - }/* A 32-bit code segment is required to clear EFER.LMA. */ memset (&cs_desc,0 ,sizeof (cs_desc));
@@ -2589,13 +2587,16 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt)if (cr0 &X86_CR0_PE ) ctxt->ops->set_cr (ctxt,0 , cr0 & ~(X86_CR0_PG |X86_CR0_PE )); -/* Now clear CR4.PAE (which must be done before clearing EFER.LME). */ -if (cr4 &X86_CR4_PAE ) - ctxt->ops->set_cr (ctxt,4 , cr4 & ~X86_CR4_PAE ); +if (emulator_has_longmode (ctxt)) { +/* Clear CR4.PAE before clearing EFER.LME. */ + cr4 = ctxt->ops->get_cr (ctxt,4 ); +if (cr4 &X86_CR4_PAE ) + ctxt->ops->set_cr (ctxt,4 , cr4 & ~X86_CR4_PAE ); -/* And finally go back to 32-bit mode. */ - efer =0 ; - ctxt->ops->set_msr (ctxt,MSR_EFER , efer); +/* And finally go back to 32-bit mode. */ + efer =0 ; + ctxt->ops->set_msr (ctxt,MSR_EFER , efer); + } smbase = ctxt->ops->get_smbase (ctxt);if (emulator_has_longmode (ctxt))
arch/x86/realmode/rm/Makefile +1 -1
@@ -43,7 +43,7 @@ $(obj)/pasyms.h: $(REALMODE_OBJS) FORCE targets += realmode.lds $(obj)/realmode.lds: $(obj)/pasyms.h -LDFLAGS_realmode.elf := --emit-relocs -T +LDFLAGS_realmode.elf := -m elf_i386 --emit-relocs -T CPPFLAGS_realmode.lds += -P -C -I$(obj) targets += realmode.elf
arch/xtensa/kernel/stacktrace.c +5 -1
@@ -272,10 +272,14 @@ static int return_address_cb(struct stackframe *frame, void *data)return 1 ; } +/* +* level == 0 is for the return address from the caller of this function, +* not from this function itself. +*/ unsigned long return_address (unsigned level) {struct return_addr_data r = { - .skip = level +1 , + .skip = level, };walk_stackframe (stack_pointer (NULL ), return_address_cb, &r);return r.addr;
block/bio.c +4 -1
@@ -1216,8 +1216,11 @@ struct bio *bio_copy_user_iov(struct request_queue *q, } } -if (bio_add_pc_page (q, bio, page, bytes, offset) < bytes) +if (bio_add_pc_page (q, bio, page, bytes, offset) < bytes) { +if (!map_data) +__free_page (page);break ; + } len -= bytes; offset =0 ;
crypto/testmgr.h +43 -1
50 lines not on this page · raw message
drivers/acpi/sbs.c +6 -2
@@ -443,9 +443,13 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs)/* * The spec requires that bit 4 always be 1. If it's not set, assume -* that the implementation doesn't support an SBS charger +* that the implementation doesn't support an SBS charger. +* +* And on some MacBooks a status of 0xffff is always returned, no +* matter whether the charger is plugged in or not, which is also +* wrong, so ignore the SBS charger for those too. */ -if (!((status >>4 ) &0x1 )) +if (!((status >>4 ) &0x1 ) || status ==0xffff )return -ENODEV ; sbs->charger_present = (status >>15 ) &0x1 ;
drivers/cdrom/cdrom.c +3 -4
@@ -265,6 +265,7 @@/* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */ /* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */ +#include <linux/atomic.h> #include <linux/module.h> #include <linux/fs.h> #include <linux/major.h>
@@ -3677,9 +3678,9 @@ static struct ctl_table_header *cdrom_sysctl_header;static void cdrom_sysctl_register (void ) { -static int initialized; +static atomic_t initialized =ATOMIC_INIT (0 ); -if (initialized ==1 ) +if (!atomic_add_unless (&initialized,1 ,1 ))return ; cdrom_sysctl_header =register_sysctl_table (cdrom_root_table);
@@ -3690,8 +3691,6 @@ static void cdrom_sysctl_register(void) cdrom_sysctl_settings.debug = debug; cdrom_sysctl_settings.lock = lockdoor; cdrom_sysctl_settings.check = check_media_type; - - initialized =1 ; }static void cdrom_sysctl_unregister (void )
drivers/char/Kconfig +1 -1
@@ -389,7 +389,7 @@ config XILINX_HWICAP config R3964 tristate "Siemens R3964 line discipline" - depends on TTY + depends on TTY && BROKEN ---help--- This driver allows synchronous communication with devices using the Siemens R3964 packet protocol. Unless you are dealing with special
drivers/char/hpet.c +1 -1
@@ -376,7 +376,7 @@ static __init int hpet_mmap_enable(char *str)pr_info ("HPET mmap %s\n" , hpet_mmap_enabled ?"enabled" :"disabled" );return 1 ; } -__setup ("hpet_mmap" , hpet_mmap_enable); +__setup ("hpet_mmap=" , hpet_mmap_enable);static int hpet_mmap (struct file *file,struct vm_area_struct *vma) {
drivers/char/hw_random/virtio-rng.c +1 -1
@@ -73,7 +73,7 @@ static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)if (!vi->busy) { vi->busy = true; -init_completion (&vi->have_data); +reinit_completion (&vi->have_data);register_buffer (vi, buf, size); }
drivers/char/tpm/tpm_crb.c +16 -6
@@ -109,19 +109,29 @@ static int crb_recv(struct tpm_chip *chip, u8 *buf, size_t count)struct crb_priv *priv = chip->vendor.priv;unsigned int expected; -/* sanity check */ -if (count <6 ) +/* A sanity check that the upper layer wants to get at least the header +* as that is the minimum size for any TPM response. +*/ +if (count <TPM_HEADER_SIZE )return -EIO ; +/* If this bit is set, according to the spec, the TPM is in +* unrecoverable condition. +*/ if (le32_to_cpu (ioread32 (&priv->cca->sts)) &CRB_CA_STS_ERROR )return -EIO ; -memcpy_fromio (buf, priv->rsp,6 ); - expected =be32_to_cpup ((__be32 *) &buf[2 ]); -if (expected > count || expected <6 ) +/* Read the first 8 bytes in order to get the length of the response. +* We read exactly a quad word in order to make sure that the remaining +* reads will be aligned. +*/ +memcpy_fromio (buf, priv->rsp,8 ); + + expected =be32_to_cpup ((__be32 *)&buf[2 ]); +if (expected > count || expected <TPM_HEADER_SIZE )return -EIO ; -memcpy_fromio (&buf[6 ], &priv->rsp[6 ], expected -6 ); +memcpy_fromio (&buf[8 ], &priv->rsp[8 ], expected -8 );return expected; }
drivers/char/tpm/tpm_i2c_atmel.c +9 -1
@@ -65,7 +65,15 @@ static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len)dev_dbg (&chip->dev,"%s(buf=%*ph len=%0zx) -> sts=%d\n" , __func__, (int )min_t (size_t,64 , len), buf, len, status); -return status; + +if (status <0 ) +return status; + +/* The upper layer does not support incomplete sends. */ +if (status != len) +return -E2BIG ; + +return 0 ; }static int i2c_atmel_recv (struct tpm_chip *chip,u8 *buf,size_t count)
drivers/crypto/amcc/crypto4xx_alg.c +2 -1
@@ -138,7 +138,8 @@ static int crypto4xx_setkey_aes(struct crypto_ablkcipher *cipher, sa = (struct dynamic_sa_ctl *) ctx->sa_in; ctx->hash_final =0 ; - set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, SA_NOT_SAVE_IV, + set_dynamic_sa_command_0(sa, SA_NOT_SAVE_HASH, (cm == CRYPTO_MODE_CBC ? + SA_SAVE_IV : SA_NOT_SAVE_IV), SA_LOAD_HASH_FROM_SA, SA_LOAD_IV_FROM_STATE, SA_NO_HEADER_PROC, SA_HASH_ALG_NULL, SA_CIPHER_ALG_AES, SA_PAD_TYPE_ZERO,
drivers/crypto/amcc/crypto4xx_core.c +9 -0
@@ -645,6 +645,15 @@ static u32 crypto4xx_ablkcipher_done(struct crypto4xx_device *dev, addr =dma_map_page (dev->core_dev->device,sg_page (dst), dst->offset, dst->length,DMA_FROM_DEVICE ); } + +if (pd_uinfo->sa_va->sa_command_0.bf.save_iv ==SA_SAVE_IV ) { +struct crypto_skcipher *skcipher =crypto_skcipher_reqtfm (req); + +crypto4xx_memcpy_from_le32 ((u32 *)req->iv, + pd_uinfo->sr_va->save_iv, +crypto_skcipher_ivsize (skcipher)); + } +crypto4xx_ret_sg_desc (dev, pd_uinfo);if (ablk_req->base.complete !=NULL ) ablk_req->base.complete (&ablk_req->base,0 );
drivers/dma/imx-dma.c +1 -1
@@ -286,7 +286,7 @@ static inline int imxdma_sg_next(struct imxdma_desc *d)struct scatterlist *sg = d->sg;unsigned long now; - now =min (d->len,sg_dma_len (sg)); + now =min_t (size_t, d->len,sg_dma_len (sg));if (d->len !=IMX_DMA_LENGTH_LOOP ) d->len -= now;
drivers/dma/tegra20-apb-dma.c +4 -1
@@ -632,7 +632,10 @@ static void handle_cont_sngl_cycle_dma_done(struct tegra_dma_channel *tdc, sgreq =list_first_entry (&tdc->pending_sg_req,typeof (*sgreq), node); dma_desc = sgreq->dma_desc; - dma_desc->bytes_transferred += sgreq->req_len; +/* if we dma for long enough the transfer count will wrap */ + dma_desc->bytes_transferred = + (dma_desc->bytes_transferred + sgreq->req_len) % + dma_desc->bytes_requested;/* Callback need to be call */ if (!dma_desc->cb_count)
drivers/gpio/gpio-omap.c +8 -6
@@ -872,14 +872,16 @@ static void omap_gpio_unmask_irq(struct irq_data *d)if (trigger)omap_set_gpio_triggering (bank, offset, trigger); -/* For level-triggered GPIOs, the clearing must be done after -* the HW source is cleared, thus after the handler has run */ -if (bank->level_mask &BIT (offset)) { -omap_set_gpio_irqenable (bank, offset,0 ); +omap_set_gpio_irqenable (bank, offset,1 ); + +/* +* For level-triggered GPIOs, clearing must be done after the source +* is cleared, thus after the handler has run. OMAP4 needs this done +* after enabing the interrupt to clear the wakeup status. +*/ +if (bank->level_mask &BIT (offset))omap_clear_gpio_irqstatus (bank, offset); - } -omap_set_gpio_irqenable (bank, offset,1 );raw_spin_unlock_irqrestore (&bank->lock, flags); }
drivers/gpu/drm/drm_dp_mst_topology.c +1 -0
@@ -3019,6 +3019,7 @@ static int drm_dp_mst_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs msg.u.i2c_read.transactions[i].i2c_dev_id = msgs[i].addr; msg.u.i2c_read.transactions[i].num_bytes = msgs[i].len; msg.u.i2c_read.transactions[i].bytes = msgs[i].buf; + msg.u.i2c_read.transactions[i].no_stop_bit = !(msgs[i].flags &I2C_M_STOP ); } msg.u.i2c_read.read_i2c_device_id = msgs[num -1 ].addr; msg.u.i2c_read.num_bytes_read = msgs[num -1 ].len;
drivers/hwtracing/coresight/coresight-etm4x.c +2 -1
@@ -54,7 +54,8 @@ static void etm4_os_unlock(void *info)static bool etm4_arch_supported (u8 arch) { -switch (arch) { +/* Mask out the minor version number */ +switch (arch &0xf0 ) {case ETM_ARCH_V4 :break ;default :
drivers/i2c/i2c-core.c +6 -6
@@ -2936,16 +2936,16 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter *adapter, u16 addr,the underlying bus driver */ break ;case I2C_SMBUS_I2C_BLOCK_DATA : +if (data->block[0 ] >I2C_SMBUS_BLOCK_MAX ) { +dev_err (&adapter->dev,"Invalid block %s size %d\n" , + read_write ==I2C_SMBUS_READ ?"read" :"write" , + data->block[0 ]); +return -EINVAL ; + }if (read_write ==I2C_SMBUS_READ ) { msg[1 ].len = data->block[0 ]; }else { msg[0 ].len = data->block[0 ] +1 ; -if (msg[0 ].len >I2C_SMBUS_BLOCK_MAX +1 ) { -dev_err (&adapter->dev, -"Invalid block write size %d\n" , - data->block[0 ]); -return -EINVAL ; - }for (i =1 ; i <= data->block[0 ]; i++) msgbuf0[i] = data->block[i]; }
drivers/iio/accel/kxcjk-1013.c +2 -0
@@ -1343,6 +1343,8 @@ static int kxcjk1013_resume(struct device *dev)mutex_lock (&data->mutex); ret =kxcjk1013_set_mode (data,OPERATION ); +if (ret ==0 ) + ret =kxcjk1013_set_range (data, data->range);mutex_unlock (&data->mutex);return ret;
drivers/iio/adc/ad_sigma_delta.c +1 -0
@@ -121,6 +121,7 @@ static int ad_sd_read_reg_raw(struct ad_sigma_delta *sigma_delta,if (sigma_delta->info->has_registers) { data[0 ] = reg << sigma_delta->info->addr_shift; data[0 ] |= sigma_delta->info->read_mask; + data[0 ] |= sigma_delta->comm;spi_message_add_tail (&t[0 ], &m); }spi_message_add_tail (&t[1 ], &m);
drivers/iio/adc/at91_adc.c +17 -11
@@ -702,23 +702,29 @@ static int at91_adc_read_raw(struct iio_dev *idev, ret =wait_event_interruptible_timeout (st->wq_data_avail, st->done,msecs_to_jiffies (1000 )); -if (ret ==0 ) - ret = -ETIMEDOUT ; -if (ret <0 ) { -mutex_unlock (&st->lock); -return ret; - } - - *val = st->last_value; +/* Disable interrupts, regardless if adc conversion was +* successful or not +*/ at91_adc_writel (st,AT91_ADC_CHDR ,AT91_ADC_CH (chan->channel));at91_adc_writel (st,AT91_ADC_IDR ,BIT (chan->channel)); - st->last_value =0 ; - st->done = false; +if (ret >0 ) { +/* a valid conversion took place */ + *val = st->last_value; + st->last_value =0 ; + st->done = false; + ret =IIO_VAL_INT ; + }else if (ret ==0 ) { +/* conversion timeout */ +dev_err (&idev->dev,"ADC Channel %d timeout.\n" , + chan->channel); + ret = -ETIMEDOUT ; + } +mutex_unlock (&st->lock); -return IIO_VAL_INT ; +return ret;case IIO_CHAN_INFO_SCALE : *val = st->vref_mv;
drivers/iio/gyro/bmg160_core.c +3 -3
@@ -519,11 +519,10 @@ static int bmg160_read_raw(struct iio_dev *indio_dev, }else return -EINVAL ;case IIO_CHAN_INFO_SCALE : - *val =0 ;switch (chan->type) {case IIO_TEMP : - *val2 =500000 ; -return IIO_VAL_INT_PLUS_MICRO ; + *val =500 ; +return IIO_VAL_INT ;case IIO_ANGL_VEL : {int i;
@@ -531,6 +530,7 @@ static int bmg160_read_raw(struct iio_dev *indio_dev,for (i =0 ; i <ARRAY_SIZE (bmg160_scale_table); ++i) {if (bmg160_scale_table[i].dps_range == data->dps_range) { + *val =0 ; *val2 = bmg160_scale_table[i].scale;return IIO_VAL_INT_PLUS_MICRO ; }
drivers/infiniband/hw/mlx4/alias_GUID.c +1 -1
@@ -805,8 +805,8 @@ void mlx4_ib_destroy_alias_guid_service(struct mlx4_ib_dev *dev)unsigned long flags;for (i =0 ; i < dev->num_ports; i++) { -cancel_delayed_work (&dev->sriov.alias_guid.ports_guid[i].alias_guid_work); det = &sriov->alias_guid.ports_guid[i]; +cancel_delayed_work_sync (&det->alias_guid_work);spin_lock_irqsave (&sriov->alias_guid.ag_work_lock, flags);while (!list_empty (&det->cb_list)) { cb_ctx = list_entry(det->cb_list.next,
drivers/infiniband/hw/mlx4/cm.c +1 -1
@@ -39,7 +39,7 @@#include "mlx4_ib.h" -#define CM_CLEANUP_CACHE_TIMEOUT (5 * HZ) +#define CM_CLEANUP_CACHE_TIMEOUT (30 * HZ)struct id_map_entry {struct rb_node node;
drivers/iommu/dmar.c +1 -1
@@ -143,7 +143,7 @@ dmar_alloc_pci_notify_info(struct pci_dev *dev, unsigned long event)for (tmp = dev; tmp; tmp = tmp->bus->self) level++; - size =sizeof (*info) + level *sizeof (struct acpi_dmar_pci_path ); + size =sizeof (*info) + level *sizeof (info->path[0 ]);if (size <=sizeof (dmar_pci_notify_info_buf)) { info = (struct dmar_pci_notify_info *)dmar_pci_notify_info_buf; }else {
drivers/iommu/intel-iommu.c +3 -0
@@ -1598,6 +1598,9 @@ static void iommu_disable_protect_mem_regions(struct intel_iommu *iommu)u32 pmen;unsigned long flags; +if (!cap_plmr (iommu->cap) && !cap_phmr (iommu->cap)) +return ; +raw_spin_lock_irqsave (&iommu->register_lock, flags); pmen =readl (iommu->reg +DMAR_PMEN_REG ); pmen &= ~DMA_PMEN_EPM ;
drivers/leds/leds-lp55xx-common.c +2 -2
@@ -200,7 +200,7 @@ static void lp55xx_firmware_loaded(const struct firmware *fw, void *context)if (!fw) {dev_err (dev,"firmware request failed\n" ); - goto out; +return ; }/* handling firmware data is chip dependent */
@@ -213,9 +213,9 @@ static void lp55xx_firmware_loaded(const struct firmware *fw, void *context)mutex_unlock (&chip->lock); -out:/* firmware should be released for other channel use */ release_firmware (chip->fw); + chip->fw =NULL ; }static int lp55xx_request_firmware (struct lp55xx_chip *chip)
drivers/md/bcache/sysfs.c +14 -3
@@ -215,7 +215,9 @@ STORE(__cached_dev)d_strtoul (writeback_rate_d_term);d_strtoul_nonzero (writeback_rate_p_term_inverse); -d_strtoi_h (sequential_cutoff); +sysfs_strtoul_clamp (sequential_cutoff, + dc->sequential_cutoff, +0 ,UINT_MAX );d_strtoi_h (readahead);if (attr == &sysfs_clear_stats)
@@ -645,8 +647,17 @@ STORE(__bch_cache_set) c->error_limit =strtoul_or_return (buf) <<IO_ERROR_SHIFT ;/* See count_io_errors() for why 88 */ -if (attr == &sysfs_io_error_halflife) - c->error_decay =strtoul_or_return (buf) /88 ; +if (attr == &sysfs_io_error_halflife) { +unsigned long v =0 ; +ssize_t ret; + + ret =strtoul_safe_clamp (buf, v,0 ,UINT_MAX ); +if (!ret) { + c->error_decay = v /88 ; +return size; + } +return ret; + }sysfs_strtoul (journal_delay_ms, c->journal_delay_ms);sysfs_strtoul (verify, c->verify);
drivers/md/bcache/sysfs.h +10 -3
@@ -80,9 +80,16 @@ do { \#define sysfs_strtoul_clamp (file, var, min, max) \ do { \ - if (attr == &sysfs_ ## file) \ - return strtoul_safe_clamp(buf, var, min, max) \ - ?: (ssize_t) size; \ + if (attr == &sysfs_ ## file) { \ + unsigned long v = 0; \ + ssize_t ret; \ + ret = strtoul_safe_clamp(buf, v, min, max); \ + if (!ret) { \ + var = v; \ + return size; \ + } \ + return ret; \ + } \ } while (0)#define strtoul_or_return (cp) \
drivers/md/dm-thin.c +13 -0
@@ -3210,6 +3210,13 @@ static int pool_ctr(struct dm_target *ti, unsigned argc, char **argv) as.argc = argc; as.argv = argv; +/* make sure metadata and data are different devices */ +if (!strcmp (argv[0 ], argv[1 ])) { + ti->error ="Error setting metadata or data device" ; + r = -EINVAL ; + goto out_unlock; + } +/* * Set default pool features. */
@@ -4092,6 +4099,12 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv) tc->sort_bio_list =RB_ROOT ;if (argc ==3 ) { +if (!strcmp (argv[0 ], argv[2 ])) { + ti->error ="Error setting origin device" ; + r = -EINVAL ; + goto bad_origin_dev; + } + r =dm_get_device (ti, argv[2 ],FMODE_READ , &origin_dev);if (r) { ti->error ="Error opening origin device" ;
drivers/media/i2c/soc_camera/mt9m111.c +2 -0
@@ -988,6 +988,8 @@ static int mt9m111_probe(struct i2c_client *client, mt9m111->rect.top =MT9M111_MIN_DARK_ROWS ; mt9m111->rect.width =MT9M111_MAX_WIDTH ; mt9m111->rect.height =MT9M111_MAX_HEIGHT ; + mt9m111->width = mt9m111->rect.width; + mt9m111->height = mt9m111->rect.height; mt9m111->fmt = &mt9m111_colour_fmts[0 ]; mt9m111->lastpage =-1 ;mutex_init (&mt9m111->power_lock);
drivers/media/platform/mx2_emmaprp.c +3 -3
@@ -289,7 +289,7 @@ static void emmaprp_device_run(void *priv) {struct emmaprp_ctx *ctx = priv;struct emmaprp_q_data *s_q_data, *d_q_data; -struct vb2_buffer *src_buf, *dst_buf; +struct vb2_v4l2_buffer *src_buf, *dst_buf;struct emmaprp_dev *pcdev = ctx->dev;unsigned int s_width, s_height;unsigned int d_width, d_height;
@@ -309,8 +309,8 @@ static void emmaprp_device_run(void *priv) d_height = d_q_data->height; d_size = d_width * d_height; - p_in =vb2_dma_contig_plane_dma_addr (src_buf,0 ); - p_out =vb2_dma_contig_plane_dma_addr (dst_buf,0 ); + p_in =vb2_dma_contig_plane_dma_addr (&src_buf->vb2_buf,0 ); + p_out =vb2_dma_contig_plane_dma_addr (&dst_buf->vb2_buf,0 );if (!p_in || !p_out) {v4l2_err (&pcdev->v4l2_dev,"Acquiring kernel pointers to buffers failed\n" );
drivers/media/platform/s5p-g2d/g2d.c +3 -3
@@ -497,7 +497,7 @@ static void device_run(void *prv) {struct g2d_ctx *ctx = prv;struct g2d_dev *dev = ctx->dev; -struct vb2_buffer *src, *dst; +struct vb2_v4l2_buffer *src, *dst;unsigned long flags;u32 cmd =0 ;
@@ -512,10 +512,10 @@ static void device_run(void *prv)spin_lock_irqsave (&dev->ctrl_lock, flags);g2d_set_src_size (dev, &ctx->in); -g2d_set_src_addr (dev,vb2_dma_contig_plane_dma_addr (src,0 )); +g2d_set_src_addr (dev,vb2_dma_contig_plane_dma_addr (&src->vb2_buf,0 ));g2d_set_dst_size (dev, &ctx->out); -g2d_set_dst_addr (dev,vb2_dma_contig_plane_dma_addr (dst,0 )); +g2d_set_dst_addr (dev,vb2_dma_contig_plane_dma_addr (&dst->vb2_buf,0 ));g2d_set_rop4 (dev, ctx->rop);g2d_set_flip (dev, ctx->flip);
drivers/media/platform/s5p-jpeg/jpeg-core.c +30 -27
191 lines not on this page · raw message
drivers/media/platform/sh_veu.c +2 -2
@@ -277,13 +277,13 @@ static void sh_veu_process(struct sh_veu_dev *veu,static void sh_veu_device_run (void *priv) {struct sh_veu_dev *veu = priv; -struct vb2_buffer *src_buf, *dst_buf; +struct vb2_v4l2_buffer *src_buf, *dst_buf; src_buf =v4l2_m2m_next_src_buf (veu->m2m_ctx); dst_buf =v4l2_m2m_next_dst_buf (veu->m2m_ctx);if (src_buf && dst_buf) -sh_veu_process (veu, src_buf, dst_buf); +sh_veu_process (veu, &src_buf->vb2_buf, &dst_buf->vb2_buf); }/* ========== video ioctls ========== */
drivers/mmc/host/davinci_mmc.c +1 -1
@@ -1147,7 +1147,7 @@ static inline void mmc_davinci_cpufreq_deregister(struct mmc_davinci_host *host) { }#endif -static void __init init_mmcsd_host (struct mmc_davinci_host *host) +static void init_mmcsd_host (struct mmc_davinci_host *host) {mmc_davinci_reset_ctrl (host,1 );
drivers/mmc/host/omap.c +1 -1
@@ -921,7 +921,7 @@ static inline void set_cmd_timeout(struct mmc_omap_host *host, struct mmc_reques reg &= ~(1 <<5 );OMAP_MMC_WRITE (host,SDIO , reg);/* Set maximum timeout */ -OMAP_MMC_WRITE (host,CTO ,0xff ); +OMAP_MMC_WRITE (host,CTO ,0xfd ); }static inline void set_data_timeout (struct mmc_omap_host *host,struct mmc_request *req)
drivers/net/bonding/bond_main.c +5 -1
@@ -3067,8 +3067,12 @@ static int bond_netdev_event(struct notifier_block *this,return NOTIFY_DONE ;if (event_dev->flags &IFF_MASTER ) { +int ret; +netdev_dbg (event_dev,"IFF_MASTER\n" ); -return bond_master_netdev_event (event, event_dev); + ret =bond_master_netdev_event (event, event_dev); +if (ret !=NOTIFY_DONE ) +return ret; }if (event_dev->flags &IFF_SLAVE ) {
drivers/net/ethernet/cisco/enic/enic_main.c +3 -3
@@ -120,7 +120,7 @@ static void enic_init_affinity_hint(struct enic *enic)for (i =0 ; i < enic->intr_count; i++) {if (enic_is_err_intr (enic, i) ||enic_is_notify_intr (enic, i) || - (enic->msix[i].affinity_mask && + (cpumask_available (enic->msix[i].affinity_mask) && !cpumask_empty (enic->msix[i].affinity_mask)))continue ; if (zalloc_cpumask_var(&enic->msix[i].affinity_mask,
@@ -149,7 +149,7 @@ static void enic_set_affinity_hint(struct enic *enic)for (i =0 ; i < enic->intr_count; i++) {if (enic_is_err_intr (enic, i) ||enic_is_notify_intr (enic, i) || - !enic->msix[i].affinity_mask || + !cpumask_available (enic->msix[i].affinity_mask) ||cpumask_empty (enic->msix[i].affinity_mask))continue ; err = irq_set_affinity_hint(enic->msix_entry[i].vector,
@@ -162,7 +162,7 @@ static void enic_set_affinity_hint(struct enic *enic)for (i =0 ; i < enic->wq_count; i++) {int wq_intr =enic_msix_wq_intr (enic, i); -if (enic->msix[wq_intr].affinity_mask && +if (cpumask_available (enic->msix[wq_intr].affinity_mask) && !cpumask_empty (enic->msix[wq_intr].affinity_mask)) netif_set_xps_queue(enic->netdev, enic->msix[wq_intr].affinity_mask,
drivers/net/ethernet/intel/e1000e/netdev.c +2 -2
@@ -2131,7 +2131,7 @@ static int e1000_request_msix(struct e1000_adapter *adapter)if (strlen (netdev->name) < (IFNAMSIZ -5 ))snprintf (adapter->rx_ring->name,sizeof (adapter->rx_ring->name) -1 , -"%s-rx-0" , netdev->name); +"%.14s-rx-0" , netdev->name);else memcpy (adapter->rx_ring->name, netdev->name,IFNAMSIZ ); err = request_irq(adapter->msix_entries[vector].vector,
@@ -2147,7 +2147,7 @@ static int e1000_request_msix(struct e1000_adapter *adapter)if (strlen (netdev->name) < (IFNAMSIZ -5 ))snprintf (adapter->tx_ring->name,sizeof (adapter->tx_ring->name) -1 , -"%s-tx-0" , netdev->name); +"%.14s-tx-0" , netdev->name);else memcpy (adapter->tx_ring->name, netdev->name,IFNAMSIZ ); err = request_irq(adapter->msix_entries[vector].vector,
drivers/net/usb/qmi_wwan.c +1 -0
@@ -717,6 +717,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */ + {QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */ {QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */ {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
drivers/net/wireless/mediatek/mt7601u/eeprom.h +1 -1
@@ -17,7 +17,7 @@struct mt7601u_dev ; -#define MT7601U_EE_MAX_VER 0x0c +#define MT7601U_EE_MAX_VER 0x0d#define MT7601U_EEPROM_SIZE 256#define MT7601U_DEFAULT_TX_POWER 6
drivers/net/wireless/rsi/rsi_common.h +0 -1
@@ -75,7 +75,6 @@ static inline int rsi_kill_thread(struct rsi_thread *handle)atomic_inc (&handle->thread_done);rsi_set_event (&handle->event); -wait_for_completion (&handle->completion);return kthread_stop (handle->task); }
drivers/net/wireless/ti/wlcore/main.c +5 -2
@@ -1123,8 +1123,11 @@ static int wl12xx_chip_wakeup(struct wl1271 *wl, bool plt) goto out; ret =wl12xx_fetch_firmware (wl, plt); -if (ret <0 ) - goto out; +if (ret <0 ) { +kfree (wl->fw_status); +kfree (wl->raw_fw_status); +kfree (wl->tx_res_if); + } out:return ret;
drivers/pci/quirks.c +2 -0
@@ -3623,6 +3623,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9128,/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c14 */ DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9130 , quirk_dma_func1_alias); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9170 , + quirk_dma_func1_alias);/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c47 + c57 */ DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9172 , quirk_dma_func1_alias);
drivers/regulator/act8865-regulator.c +3 -2
@@ -131,7 +131,7 @@* ACT8865 voltage number */ #define ACT8865_VOLTAGE_NUM 64 -#define ACT8600_SUDCDC_VOLTAGE_NUM 255 +#define ACT8600_SUDCDC_VOLTAGE_NUM 256struct act8865 {struct regmap *regmap;
@@ -154,7 +154,8 @@ static const struct regulator_linear_range act8600_sudcdc_voltage_ranges[] = {REGULATOR_LINEAR_RANGE (3000000 ,0 ,63 ,0 ),REGULATOR_LINEAR_RANGE (3000000 ,64 ,159 ,100000 ),REGULATOR_LINEAR_RANGE (12600000 ,160 ,191 ,200000 ), - REGULATOR_LINEAR_RANGE(19000000, 191, 255, 400000), +REGULATOR_LINEAR_RANGE (19000000 ,192 ,247 ,400000 ), + REGULATOR_LINEAR_RANGE(41400000, 248, 255, 0), }; static struct regulator_ops act8865_ops = {
drivers/scsi/megaraid/megaraid_sas_base.c +1 -0
@@ -3847,6 +3847,7 @@ int megasas_alloc_cmds(struct megasas_instance *instance)if (megasas_create_frame_pool (instance)) {dev_printk (KERN_DEBUG , &instance->pdev->dev,"Error creating frame DMA pool\n" );megasas_free_cmds (instance); +return -ENOMEM ; }return 0 ;
drivers/scsi/scsi_scan.c +3 -3
@@ -217,7 +217,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget,extern void scsi_requeue_run_queue (struct work_struct *work); sdev =kzalloc (sizeof (*sdev) + shost->transportt->device_size, -GFP_ATOMIC ); +GFP_KERNEL );if (!sdev) goto out;
@@ -791,7 +791,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,*/ sdev->inquiry =kmemdup (inq_result,max_t (size_t, sdev->inquiry_len,36 ), -GFP_ATOMIC ); +GFP_KERNEL );if (sdev->inquiry ==NULL )return SCSI_SCAN_NO_RESPONSE ;
@@ -1085,7 +1085,7 @@ static int scsi_probe_and_add_lun(struct scsi_target *starget,if (!sdev) goto out; - result =kmalloc (result_len,GFP_ATOMIC | + result =kmalloc (result_len,GFP_KERNEL | ((shost->unchecked_isa_dma) ? __GFP_DMA :0 ));if (!result) goto out_free_sdev;
drivers/soc/qcom/qcom_gsbi.c +5 -2
@@ -138,7 +138,7 @@ static int gsbi_probe(struct platform_device *pdev)struct resource *res;void __iomem *base;struct gsbi_info *gsbi; -int i; +int i, ret;u32 mask, gsbi_num;const struct crci_config *config =NULL ;
@@ -221,7 +221,10 @@ static int gsbi_probe(struct platform_device *pdev)platform_set_drvdata (pdev, gsbi); -return of_platform_populate (node,NULL ,NULL , &pdev->dev); + ret =of_platform_populate (node,NULL ,NULL , &pdev->dev); +if (ret) +clk_disable_unprepare (gsbi->hclk); +return ret; }static int gsbi_remove (struct platform_device *pdev)
drivers/soc/tegra/fuse/fuse-tegra.c +9 -3
@@ -131,13 +131,17 @@ static int tegra_fuse_probe(struct platform_device *pdev)/* take over the memory region from the early initialization */ res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); fuse->base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (fuse->base)) -return PTR_ERR (fuse->base); +if (IS_ERR (fuse->base)) { + err =PTR_ERR (fuse->base); + fuse->base = base; +return err; + } fuse->clk =devm_clk_get (&pdev->dev,"fuse" );if (IS_ERR (fuse->clk)) {dev_err (&pdev->dev,"failed to get FUSE clock: %ld" ,PTR_ERR (fuse->clk)); + fuse->base = base;return PTR_ERR (fuse->clk); }
@@ -146,8 +150,10 @@ static int tegra_fuse_probe(struct platform_device *pdev)if (fuse->soc->probe) { err = fuse->soc->probe (fuse); -if (err <0 ) +if (err <0 ) { + fuse->base = base;return err; + } } if (tegra_fuse_create_sysfs(&pdev->dev, fuse->soc->info->size,
drivers/staging/comedi/drivers/ni_usb6501.c +4 -6
@@ -472,10 +472,8 @@ static int ni6501_alloc_usb_buffers(struct comedi_device *dev) size =le16_to_cpu (devpriv->ep_tx->wMaxPacketSize); devpriv->usb_tx_buf =kzalloc (size,GFP_KERNEL ); -if (!devpriv->usb_tx_buf) { -kfree (devpriv->usb_rx_buf); +if (!devpriv->usb_tx_buf)return -ENOMEM ; - }return 0 ; }
@@ -527,6 +525,9 @@ static int ni6501_auto_attach(struct comedi_device *dev,if (!devpriv)return -ENOMEM ; +mutex_init (&devpriv->mut); +usb_set_intfdata (intf, devpriv); + ret =ni6501_find_endpoints (dev);if (ret)return ret;
@@ -535,9 +536,6 @@ static int ni6501_auto_attach(struct comedi_device *dev,if (ret)return ret; -mutex_init (&devpriv->mut); -usb_set_intfdata (intf, devpriv); - ret =comedi_alloc_subdevices (dev,2 );if (ret)return ret;
drivers/staging/comedi/drivers/vmk80xx.c +3 -5
@@ -691,10 +691,8 @@ static int vmk80xx_alloc_usb_buffers(struct comedi_device *dev) size =le16_to_cpu (devpriv->ep_tx->wMaxPacketSize); devpriv->usb_tx_buf =kzalloc (size,GFP_KERNEL ); -if (!devpriv->usb_tx_buf) { -kfree (devpriv->usb_rx_buf); +if (!devpriv->usb_tx_buf)return -ENOMEM ; - }return 0 ; }
@@ -809,6 +807,8 @@ static int vmk80xx_auto_attach(struct comedi_device *dev, devpriv->model = board->model; +sema_init (&devpriv->limit_sem,8 ); + ret =vmk80xx_find_usb_endpoints (dev);if (ret)return ret;
@@ -817,8 +817,6 @@ static int vmk80xx_auto_attach(struct comedi_device *dev,if (ret)return ret; -sema_init (&devpriv->limit_sem,8 ); -usb_set_intfdata (intf, devpriv);if (devpriv->model ==VMK8055_MODEL )
drivers/thermal/int340x_thermal/int3400_thermal.c +17 -4
@@ -20,6 +20,13 @@ enum int3400_thermal_uuid {INT3400_THERMAL_PASSIVE_1 ,INT3400_THERMAL_ACTIVE ,INT3400_THERMAL_CRITICAL , +INT3400_THERMAL_ADAPTIVE_PERFORMANCE , +INT3400_THERMAL_EMERGENCY_CALL_MODE , +INT3400_THERMAL_PASSIVE_2 , +INT3400_THERMAL_POWER_BOSS , +INT3400_THERMAL_VIRTUAL_SENSOR , +INT3400_THERMAL_COOLING_MODE , +INT3400_THERMAL_HARDWARE_DUTY_CYCLING , INT3400_THERMAL_MAXIMUM_UUID, };
@@ -27,6 +34,13 @@ static u8 *int3400_thermal_uuids[INT3400_THERMAL_MAXIMUM_UUID] = {"42A441D6-AE6A-462b-A84B-4A8CE79027D3" ,"3A95C389-E4B8-4629-A526-C52C88626BAE" ,"97C68AE7-15FA-499c-B8C9-5DA81D606E0A" , +"63BE270F-1C11-48FD-A6F7-3AF253FF3E2D" , +"5349962F-71E6-431D-9AE8-0A635B710AEE" , +"9E04115A-AE87-4D1C-9500-0F3E340BFE75" , +"F5A35014-C209-46A4-993A-EB56DE7530A1" , +"6ED722A7-9240-48A5-B479-31EEF723D7CF" , +"16CAF1B7-DD38-40ED-B1C1-1B8A1913D531" , + "BE84BABF-C4D4-403D-B495-3128FD44dAC1", }; struct int3400_thermal_priv {
@@ -271,10 +285,9 @@ static int int3400_thermal_probe(struct platform_device *pdev)platform_set_drvdata (pdev, priv); -if (priv->uuid_bitmap &1 <<INT3400_THERMAL_PASSIVE_1 ) { - int3400_thermal_ops.get_mode = int3400_thermal_get_mode; - int3400_thermal_ops.set_mode = int3400_thermal_set_mode; - } + int3400_thermal_ops.get_mode = int3400_thermal_get_mode; + int3400_thermal_ops.set_mode = int3400_thermal_set_mode; + priv->thermal =thermal_zone_device_register ("INT3400 Thermal" ,0 ,0 , priv, &int3400_thermal_ops, &int3400_thermal_params,0 ,0 );
drivers/tty/Kconfig +23 -0
@@ -466,4 +466,27 @@ config MIPS_EJTAG_FDC_KGDB_CHAN help FDC channel number to use for KGDB. +config LDISC_AUTOLOAD + bool "Automatically load TTY Line Disciplines" + default y + help + Historically the kernel has always automatically loaded any + line discipline that is in a kernel module when a user asks + for it to be loaded with the TIOCSETD ioctl, or through other + means. This is not always the best thing to do on systems + where you know you will not be using some of the more + "ancient" line disciplines, so prevent the kernel from doing + this unless the request is coming from a process with the + CAP_SYS_MODULE permissions. + + Say 'Y' here if you trust your userspace users to do the right + thing, or if you have only provided the line disciplines that + you know you will be using, or if you wish to continue to use + the traditional method of on-demand loading of these modules + by any user. + + This functionality can be changed at runtime with the + dev.tty.ldisc_autoload sysctl, this configuration option will + only set the default value of this functionality. + endif # TTY
drivers/tty/serial/atmel_serial.c +32 -11
88 lines not on this page · raw message
drivers/tty/serial/xilinx_uartps.c +1 -1
@@ -1145,7 +1145,7 @@ static void cdns_uart_console_write(struct console *co, const char *s,* * Return: 0 on success, negative errno otherwise. */ -static int __init cdns_uart_console_setup (struct console *co,char *options) +static int cdns_uart_console_setup (struct console *co,char *options) {struct uart_port *port = &cdns_uart_port[co->index];int baud =9600 ;
drivers/tty/tty_buffer.c +1 -1
@@ -25,7 +25,7 @@* Byte threshold to limit memory consumption for flip buffers. * The actual memory limit is > 2x this amount. */ -#define TTYB_DEFAULT_MEM_LIMIT 65536 +#define TTYB_DEFAULT_MEM_LIMIT (640 * 1024UL)/* * We default to dicing tty buffer allocations to this many characters
drivers/tty/tty_io.c +3 -0
@@ -513,6 +513,8 @@ void proc_clear_tty(struct task_struct *p)tty_kref_put (tty); } +extern void tty_sysctl_init (void ); +/** * proc_set_tty - set the controlling terminal *
@@ -3689,6 +3691,7 @@ void console_sysfs_notify(void)*/ int __init tty_init (void ) { +tty_sysctl_init ();cdev_init (&tty_cdev, &tty_fops);if (cdev_add (&tty_cdev,MKDEV (TTYAUX_MAJOR ,0 ),1 ) ||register_chrdev_region (MKDEV (TTYAUX_MAJOR ,0 ),1 ,"/dev/tty" ) <0 )
drivers/tty/tty_ldisc.c +47 -0
62 lines not on this page · raw message
drivers/usb/chipidea/core.c +8 -1
@@ -913,8 +913,15 @@ static int ci_hdrc_probe(struct platform_device *pdev) }else if (ci->platdata->usb_phy) { ci->usb_phy = ci->platdata->usb_phy; }else { + ci->usb_phy =devm_usb_get_phy_by_phandle (dev->parent,"phys" , +0 ); ci->phy =devm_phy_get (dev->parent,"usb-phy" ); - ci->usb_phy =devm_usb_get_phy (dev->parent,USB_PHY_TYPE_USB2 ); + +/* Fallback to grabbing any registered USB2 PHY */ +if (IS_ERR (ci->usb_phy) && +PTR_ERR (ci->usb_phy) != -EPROBE_DEFER ) + ci->usb_phy =devm_usb_get_phy (dev->parent, +USB_PHY_TYPE_USB2 );/* if both generic PHY and USB PHY layers aren't enabled */ if (PTR_ERR(ci->phy) == -ENOSYS &&
drivers/video/fbdev/core/fbmem.c +3 -0
@@ -425,6 +425,9 @@ static void fb_do_show_logo(struct fb_info *info, struct fb_image *image, {unsigned int x; +if (image->width > info->var.xres || image->height > info->var.yres) +return ; +if (rotate ==FB_ROTATE_UR ) { for (x = 0; x < num && image->dx + image->width <= info->var.xres;
fs/9p/v9fs.c +21 -0
@@ -59,6 +59,8 @@ enum { Opt_cache_loose, Opt_fscache, Opt_mmap,/* Access options */ Opt_access, Opt_posixacl, +/* Lock timeout option */ + Opt_locktimeout,/* Error token */ Opt_err };
@@ -78,6 +80,7 @@ static const match_table_t tokens = { {Opt_cachetag, "cachetag=%s"}, {Opt_access, "access=%s"}, {Opt_posixacl, "posixacl"}, + {Opt_locktimeout, "locktimeout=%u"}, {Opt_err, NULL} };
@@ -126,6 +129,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)#ifdef CONFIG_9P_FSCACHE v9ses->cachetag =NULL ;#endif + v9ses->session_lock_timeout =P9_LOCK_TIMEOUT ;if (!opts)return 0 ;
@@ -298,6 +302,23 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts)#endif break ; +case Opt_locktimeout: + r =match_int (&args[0 ], &option); +if (r <0 ) { +p9_debug (P9_DEBUG_ERROR , +"integer field, but no integer?\n" ); + ret = r; +continue ; + } +if (option <1 ) { +p9_debug (P9_DEBUG_ERROR , +"locktimeout must be a greater than zero integer.\n" ); + ret = -EINVAL ; +continue ; + } + v9ses->session_lock_timeout = (long )option *HZ ; +break ; +default :continue ; }
fs/9p/v9fs.h +1 -0
@@ -116,6 +116,7 @@ struct v9fs_session_info {struct list_head slist;/* list of sessions registered with v9fs */ struct backing_dev_info bdi;struct rw_semaphore rename_sem; +long session_lock_timeout;/* retry interval for blocking locks */ };/* cache_validity flags */
fs/9p/vfs_dir.c +3 -5
@@ -105,7 +105,6 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)int err =0 ;struct p9_fid *fid;int buflen; -int reclen =0 ;struct p9_rdir *rdir;struct kvec kvec;
@@ -138,11 +137,10 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)while (rdir->head < rdir->tail) { err =p9stat_read (fid->clnt, rdir->buf + rdir->head, rdir->tail - rdir->head, &st); -if (err) { +if (err <=0 ) {p9_debug (P9_DEBUG_VFS ,"returned %d\n" , err);return -EIO ; } - reclen = st.size+2 ; over = !dir_emit (ctx, st.name,strlen (st.name),v9fs_qid2ino (&st.qid),dt_type (&st));
@@ -150,8 +148,8 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx)if (over)return 0 ; - rdir->head += reclen; - ctx->pos += reclen; + rdir->head += err; + ctx->pos += err; } } }
fs/9p/vfs_file.c +5 -1
@@ -154,6 +154,7 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)uint8_t status =P9_LOCK_ERROR ;int res =0 ;unsigned char fl_type; +struct v9fs_session_info *v9ses; fid = filp->private_data;BUG_ON (fid ==NULL );
@@ -189,6 +190,8 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)if (IS_SETLKW (cmd)) flock.flags =P9_LOCK_FLAGS_BLOCK ; + v9ses =v9fs_inode2v9ses (file_inode (filp)); +/* * if its a blocked request and we get P9_LOCK_BLOCKED as the status * for lock request, keep on trying
@@ -202,7 +205,8 @@ static int v9fs_file_do_lock(struct file *filp, int cmd, struct file_lock *fl)break ;if (status ==P9_LOCK_BLOCKED && !IS_SETLKW (cmd))break ; -if (schedule_timeout_interruptible (P9_LOCK_TIMEOUT ) !=0 ) +if (schedule_timeout_interruptible (v9ses->session_lock_timeout) + !=0 )break ;/* * p9_client_lock_dotl overwrites flock.client_id with the
fs/binfmt_elf.c +1 -1
@@ -850,6 +850,7 @@ static int load_elf_binary(struct linux_binprm *bprm) current->flags |=PF_RANDOMIZE ;setup_new_exec (bprm); +install_exec_creds (bprm);/* Do this so that we can load the interpreter, if need be. We will change some of these later */
@@ -1084,7 +1085,6 @@ static int load_elf_binary(struct linux_binprm *bprm) goto out;#endif /* ARCH_HAS_SETUP_ADDITIONAL_PAGES */ -install_exec_creds (bprm); retval =create_elf_tables (bprm, &loc->elf_ex, load_addr, interp_load_addr);if (retval <0 )
fs/buffer.c +7 -0
@@ -2985,6 +2985,13 @@ void guard_bio_eod(int rw, struct bio *bio)/* Uhhuh. We've got a bio that straddles the device size! */ truncated_bytes = bio->bi_iter.bi_size - (maxsector <<9 ); +/* +* The bio contains more than one segment which spans EOD, just return +* and let IO layer turn it into an EIO +*/ +if (truncated_bytes > bvec->bv_len) +return ; +/* Truncate the bio.. */ bio->bi_iter.bi_size -= truncated_bytes; bvec->bv_len -= truncated_bytes;
fs/cifs/cifs_dfs_ref.c +2 -2
@@ -266,9 +266,9 @@ static void dump_referral(const struct dfs_info3_param *ref) {cifs_dbg (FYI ,"DFS: ref path: %s\n" , ref->path_name);cifs_dbg (FYI ,"DFS: node path: %s\n" , ref->node_name); -cifs_dbg (FYI ,"DFS: fl: %hd, srv_type: %hd\n" , +cifs_dbg (FYI ,"DFS: fl: %d, srv_type: %d\n" , ref->flags, ref->server_type); -cifs_dbg (FYI ,"DFS: ref_flags: %hd, path_consumed: %hd\n" , +cifs_dbg (FYI ,"DFS: ref_flags: %d, path_consumed: %d\n" , ref->ref_flag, ref->path_consumed); }
fs/cifs/connect.c +5 -0
@@ -1255,6 +1255,11 @@ cifs_parse_devname(const char *devname, struct smb_vol *vol)const char *delims ="/\\" ;size_t len; +if (unlikely (!devname || !*devname)) { +cifs_dbg (VFS ,"Device name not specified.\n" ); +return -EINVAL ; + } +/* make sure we have a valid UNC double delimiter prefix */ len =strspn (devname, delims);if (len !=2 )
fs/cifs/file.c +13 -1
@@ -1574,8 +1574,20 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type, rc = server->ops->mand_unlock_range (cfile, flock, xid); out: -if (flock->fl_flags &FL_POSIX && !rc) +if (flock->fl_flags &FL_POSIX ) { +/* +* If this is a request to remove all locks because we +* are closing the file, it doesn't matter if the +* unlocking failed as both cifs.ko and the SMB server +* remove the lock on file close +*/ +if (rc) { +cifs_dbg (VFS ,"%s failed rc=%d\n" , __func__, rc); +if (!(flock->fl_flags &FL_CLOSE )) +return rc; + } rc =locks_lock_file_wait (file, flock); + }return rc; }
fs/cifs/inode.c +38 -31
81 lines not on this page · raw message
fs/cifs/smb1ops.c +1 -1
@@ -305,7 +305,7 @@ coalesce_t2(char *second_buf, struct smb_hdr *target_hdr) remaining = tgt_total_cnt - total_in_tgt;if (remaining <0 ) { -cifs_dbg (FYI ,"Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%hu\n" , +cifs_dbg (FYI ,"Server sent too much data. tgt_total_cnt=%hu total_in_tgt=%u\n" , tgt_total_cnt, total_in_tgt);return -EPROTO ; }
fs/cifs/smb2maperror.c +2 -1
@@ -1034,7 +1034,8 @@ static const struct status_to_posix_error smb2_error_map_table[] = { {STATUS_UNFINISHED_CONTEXT_DELETED , -EIO , "STATUS_UNFINISHED_CONTEXT_DELETED"}, {STATUS_NO_TGT_REPLY, -EIO, "STATUS_NO_TGT_REPLY"}, - {STATUS_OBJECTID_NOT_FOUND, -EIO, "STATUS_OBJECTID_NOT_FOUND"}, +/* Note that ENOATTTR and ENODATA are the same errno */ + {STATUS_OBJECTID_NOT_FOUND, -ENODATA, "STATUS_OBJECTID_NOT_FOUND"}, {STATUS_NO_IP_ADDRESSES, -EIO, "STATUS_NO_IP_ADDRESSES"}, {STATUS_WRONG_CREDENTIAL_HANDLE, -EIO, "STATUS_WRONG_CREDENTIAL_HANDLE"},
fs/ext4/indirect.c +22 -25
124 lines not on this page · raw message
fs/ext4/ioctl.c +7 -0
@@ -599,6 +599,13 @@ resizefs_out:if (!blk_queue_discard (q))return -EOPNOTSUPP ; +/* +* We haven't replayed the journal, so we cannot use our +* block-bitmap-guided storage zapping commands. +*/ +if (test_opt (sb,NOLOAD ) &&ext4_has_feature_journal (sb)) +return -EROFS ; +if (copy_from_user (&range, (struct fstrim_range __user *)arg,sizeof (range)))return -EFAULT ;
fs/ext4/resize.c +14 -3
@@ -907,11 +907,18 @@ static int add_new_gdb_meta_bg(struct super_block *sb,memcpy (n_group_desc, o_group_desc,EXT4_SB (sb)->s_gdb_count *sizeof (struct buffer_head *)); n_group_desc[gdb_num] = gdb_bh; + +BUFFER_TRACE (gdb_bh,"get_write_access" ); + err =ext4_journal_get_write_access (handle, gdb_bh); +if (err) { +kvfree (n_group_desc); +brelse (gdb_bh); +return err; + } +EXT4_SB (sb)->s_group_desc = n_group_desc;EXT4_SB (sb)->s_gdb_count++;kvfree (o_group_desc); -BUFFER_TRACE (gdb_bh,"get_write_access" ); - err =ext4_journal_get_write_access (handle, gdb_bh);return err; }
@@ -2040,6 +2047,10 @@ out:free_flex_gd (flex_gd);if (resize_inode !=NULL )iput (resize_inode); -ext4_msg (sb,KERN_INFO ,"resized filesystem to %llu" , n_blocks_count); +if (err) +ext4_warning (sb,"error (%d) occurred during " +"file system resize" , err); +ext4_msg (sb,KERN_INFO ,"resized filesystem to %llu" , +ext4_blocks_count (es));return err; }
fs/f2fs/super.c +33 -1
@@ -1143,7 +1143,7 @@ int sanity_check_ckpt(struct f2fs_sb_info *sbi)unsigned int segment_count_main;unsigned int cp_pack_start_sum, cp_payload;block_t user_block_count; -int i; +int i, j; total =le32_to_cpu (raw_super->segment_count); fsmeta =le32_to_cpu (raw_super->segment_count_ckpt);
@@ -1184,11 +1184,43 @@ int sanity_check_ckpt(struct f2fs_sb_info *sbi)if (le32_to_cpu (ckpt->cur_node_segno[i]) >= main_segs ||le16_to_cpu (ckpt->cur_node_blkoff[i]) >= blocks_per_seg)return 1 ; +for (j = i +1 ; j <NR_CURSEG_NODE_TYPE ; j++) { +if (le32_to_cpu (ckpt->cur_node_segno[i]) == +le32_to_cpu (ckpt->cur_node_segno[j])) { +f2fs_msg (sbi->sb,KERN_ERR , +"Node segment (%u, %u) has the same " +"segno: %u" , i, j, +le32_to_cpu (ckpt->cur_node_segno[i])); +return 1 ; + } + } }for (i =0 ; i <NR_CURSEG_DATA_TYPE ; i++) {if (le32_to_cpu (ckpt->cur_data_segno[i]) >= main_segs ||le16_to_cpu (ckpt->cur_data_blkoff[i]) >= blocks_per_seg)return 1 ; +for (j = i +1 ; j <NR_CURSEG_DATA_TYPE ; j++) { +if (le32_to_cpu (ckpt->cur_data_segno[i]) == +le32_to_cpu (ckpt->cur_data_segno[j])) { +f2fs_msg (sbi->sb,KERN_ERR , +"Data segment (%u, %u) has the same " +"segno: %u" , i, j, +le32_to_cpu (ckpt->cur_data_segno[i])); +return 1 ; + } + } + } +for (i =0 ; i <NR_CURSEG_NODE_TYPE ; i++) { +for (j = i; j <NR_CURSEG_DATA_TYPE ; j++) { +if (le32_to_cpu (ckpt->cur_node_segno[i]) == +le32_to_cpu (ckpt->cur_data_segno[j])) { +f2fs_msg (sbi->sb,KERN_ERR , +"Data segment (%u) and Data segment (%u)" +" has the same segno: %u" , i, j, +le32_to_cpu (ckpt->cur_node_segno[i])); +return 1 ; + } + } } sit_bitmap_size =le32_to_cpu (ckpt->sit_ver_bitmap_bytesize);
fs/f2fs/trace.c +7 -1
@@ -60,6 +60,7 @@ void f2fs_trace_pid(struct page *page) page->private = pid; +retry:if (radix_tree_preload (GFP_NOFS ))return ;
@@ -70,7 +71,12 @@ void f2fs_trace_pid(struct page *page)if (p)radix_tree_delete (&pids, pid); -f2fs_radix_tree_insert (&pids, pid, current); +if (radix_tree_insert (&pids, pid, current)) { +spin_unlock (&pids_lock); +radix_tree_preload_end (); +cond_resched (); + goto retry; + } trace_printk("%3x:%3x %4x %-16s\n", MAJOR(inode->i_sb->s_dev), MINOR(inode->i_sb->s_dev),
fs/file.c +1 -0
@@ -474,6 +474,7 @@ struct files_struct init_files = { .full_fds_bits = init_files.full_fds_bits_init, }, .file_lock = __SPIN_LOCK_UNLOCKED(init_files.file_lock), + .resize_wait = __WAIT_QUEUE_HEAD_INITIALIZER(init_files.resize_wait), };static unsigned long find_next_fd (struct fdtable *fdt,unsigned long start)
fs/ocfs2/cluster/nodemanager.c +8 -6
@@ -621,13 +621,15 @@ static void o2nm_node_group_drop_item(struct config_group *group,struct o2nm_node *node =to_o2nm_node (item);struct o2nm_cluster *cluster =to_o2nm_cluster (group->cg_item.ci_parent); -o2net_disconnect_node (node); +if (cluster->cl_nodes[node->nd_num] == node) { +o2net_disconnect_node (node); -if (cluster->cl_has_local && - (cluster->cl_local_node == node->nd_num)) { - cluster->cl_has_local =0 ; - cluster->cl_local_node =O2NM_INVALID_NODE_NUM ; -o2net_stop_listening (node); +if (cluster->cl_has_local && + (cluster->cl_local_node == node->nd_num)) { + cluster->cl_has_local =0 ; + cluster->cl_local_node =O2NM_INVALID_NODE_NUM ; +o2net_stop_listening (node); + } }/* XXX call into net to stop this node from trading messages */
fs/overlayfs/dir.c +11 -2
@@ -408,12 +408,21 @@ static int ovl_create_or_link(struct dentry *dentry, int mode, dev_t rdev, err =ovl_create_upper (dentry, inode, &stat, link, hardlink); }else {const struct cred *old_cred; +struct cred *override_cred; old_cred =ovl_override_creds (dentry->d_sb); - err =ovl_create_over_whiteout (dentry, inode, &stat, link, - hardlink); + err = -ENOMEM ; + override_cred =prepare_creds (); +if (override_cred) { + override_cred->fsuid = old_cred->fsuid; + override_cred->fsgid = old_cred->fsgid; +put_cred (override_creds (override_cred)); +put_cred (override_cred); + err =ovl_create_over_whiteout (dentry, inode, &stat, + link, hardlink); + }revert_creds (old_cred); }
include/linux/atalk.h +15 -5
@@ -150,19 +150,29 @@ extern int sysctl_aarp_retransmit_limit;extern int sysctl_aarp_resolve_time;#ifdef CONFIG_SYSCTL -extern void atalk_register_sysctl (void ); +extern int atalk_register_sysctl (void );extern void atalk_unregister_sysctl (void );#else -#define atalk_register_sysctl () do { } while(0) -#define atalk_unregister_sysctl () do { } while(0) +static inline int atalk_register_sysctl (void ) +{ +return 0 ; +} +static inline void atalk_unregister_sysctl (void ) +{ +}#endif #ifdef CONFIG_PROC_FS extern int atalk_proc_init (void );extern void atalk_proc_exit (void );#else -#define atalk_proc_init () ({ 0; }) -#define atalk_proc_exit () do { } while(0) +static inline int atalk_proc_init (void ) +{ +return 0 ; +} +static inline void atalk_proc_exit (void ) +{ +}#endif /* CONFIG_PROC_FS */ #endif /* __LINUX_ATALK_H__ */
include/linux/bitrev.h +18 -18
@@ -31,32 +31,32 @@ static inline u32 __bitrev32(u32 x)#define __constant_bitrev32 (x) \ ({ \ - u32 __x = x; \ - __x = (__x >> 16) | (__x << 16); \ - __x = ((__x & (u32)0xFF00FF00UL) >> 8) | ((__x & (u32)0x00FF00FFUL) << 8); \ - __x = ((__x & (u32)0xF0F0F0F0UL) >> 4) | ((__x & (u32)0x0F0F0F0FUL) << 4); \ - __x = ((__x & (u32)0xCCCCCCCCUL) >> 2) | ((__x & (u32)0x33333333UL) << 2); \ - __x = ((__x & (u32)0xAAAAAAAAUL) >> 1) | ((__x & (u32)0x55555555UL) << 1); \ - __x; \ + u32 ___x = x; \ + ___x = (___x >> 16) | (___x << 16); \ + ___x = ((___x & (u32)0xFF00FF00UL) >> 8) | ((___x & (u32)0x00FF00FFUL) << 8); \ + ___x = ((___x & (u32)0xF0F0F0F0UL) >> 4) | ((___x & (u32)0x0F0F0F0FUL) << 4); \ + ___x = ((___x & (u32)0xCCCCCCCCUL) >> 2) | ((___x & (u32)0x33333333UL) << 2); \ + ___x = ((___x & (u32)0xAAAAAAAAUL) >> 1) | ((___x & (u32)0x55555555UL) << 1); \ + ___x; \ })#define __constant_bitrev16 (x) \ ({ \ - u16 __x = x; \ - __x = (__x >> 8) | (__x << 8); \ - __x = ((__x & (u16)0xF0F0U) >> 4) | ((__x & (u16)0x0F0FU) << 4); \ - __x = ((__x & (u16)0xCCCCU) >> 2) | ((__x & (u16)0x3333U) << 2); \ - __x = ((__x & (u16)0xAAAAU) >> 1) | ((__x & (u16)0x5555U) << 1); \ - __x; \ + u16 ___x = x; \ + ___x = (___x >> 8) | (___x << 8); \ + ___x = ((___x & (u16)0xF0F0U) >> 4) | ((___x & (u16)0x0F0FU) << 4); \ + ___x = ((___x & (u16)0xCCCCU) >> 2) | ((___x & (u16)0x3333U) << 2); \ + ___x = ((___x & (u16)0xAAAAU) >> 1) | ((___x & (u16)0x5555U) << 1); \ + ___x; \ })#define __constant_bitrev8 (x) \ ({ \ - u8 __x = x; \ - __x = (__x >> 4) | (__x << 4); \ - __x = ((__x & (u8)0xCCU) >> 2) | ((__x & (u8)0x33U) << 2); \ - __x = ((__x & (u8)0xAAU) >> 1) | ((__x & (u8)0x55U) << 1); \ - __x; \ + u8 ___x = x; \ + ___x = (___x >> 4) | (___x << 4); \ + ___x = ((___x & (u8)0xCCU) >> 2) | ((___x & (u8)0x33U) << 2); \ + ___x = ((___x & (u8)0xAAU) >> 1) | ((___x & (u8)0x55U) << 1); \ + ___x; \ })#define bitrev32 (x) \
include/linux/kprobes.h +1 -0
@@ -197,6 +197,7 @@ struct kretprobe_instance {struct kretprobe *rp;kprobe_opcode_t *ret_addr;struct task_struct *task; +void *fp;char data[0 ]; };
include/linux/ring_buffer.h +1 -1
@@ -125,7 +125,7 @@ ring_buffer_consume(struct ring_buffer *buffer, int cpu, u64 *ts, unsigned long *lost_events);struct ring_buffer_iter * -ring_buffer_read_prepare (struct ring_buffer *buffer,int cpu); +ring_buffer_read_prepare (struct ring_buffer *buffer,int cpu,gfp_t flags);void ring_buffer_read_prepare_sync (void );void ring_buffer_read_start (struct ring_buffer_iter *iter);void ring_buffer_read_finish (struct ring_buffer_iter *iter);
include/linux/string.h +3 -0
@@ -110,6 +110,9 @@ extern void * memscan(void *,int,__kernel_size_t);#ifndef __HAVE_ARCH_MEMCMPextern int memcmp (const void *,const void *,__kernel_size_t );#endif +#ifndef __HAVE_ARCH_BCMP +extern int bcmp (const void *,const void *,__kernel_size_t ); +#endif #ifndef __HAVE_ARCH_MEMCHRextern void *memchr (const void *,int ,__kernel_size_t );#endif
include/linux/swap.h +2 -2
@@ -135,9 +135,9 @@ struct swap_extent {/* * Max bad pages in the new format.. */ -#define __swapoffset (x) ((unsigned long)&((union swap_header *)0)->x)#define MAX_SWAP_BADPAGES \ - ((__swapoffset(magic.magic) - __swapoffset(info.badpages)) / sizeof(int)) + ((offsetof(union swap_header, magic.magic) - \ + offsetof(union swap_header, info.badpages)) / sizeof(int))enum {SWP_USED = (1 <<0 ),/* is slot in swap_info[] used? */
include/net/net_namespace.h +1 -0
@@ -53,6 +53,7 @@ struct net {*/ spinlock_t rules_mod_lock; +u32 hash_mix;atomic64_t cookie_gen;struct list_head list;/* list of network namespaces */
include/net/netfilter/br_netfilter.h +0 -1
@@ -42,7 +42,6 @@ static inline struct rtable *bridge_parent_rtable(const struct net_device *dev) }struct net_device *setup_pre_routing (struct sk_buff *skb); -void br_netfilter_enable (void );#if IS_ENABLED (CONFIG_IPV6 )int br_validate_ipv6 (struct net *net,struct sk_buff *skb);
include/net/netns/hash.h +2 -13
@@ -1,21 +1,10 @@#ifndef __NET_NS_HASH_H__#define __NET_NS_HASH_H__ -#include <asm/cache.h> - -struct net ; +#include <net/net_namespace.h> static inline u32 net_hash_mix (const struct net *net) { -#ifdef CONFIG_NET_NS -/* -* shift this right to eliminate bits, that are -* always zeroed -*/ - -return (u32)(((unsigned long )net) >>L1_CACHE_SHIFT ); -#else -return 0 ; -#endif +return net->hash_mix; }#endif
kernel/events/core.c +2 -0
@@ -5998,6 +5998,7 @@ static void perf_event_mmap_output(struct perf_event *event,struct perf_output_handle handle;struct perf_sample_data sample;int size = mmap_event->event_id.header.size; +u32 type = mmap_event->event_id.header.type;int ret;if (!perf_event_mmap_match (event, data))
@@ -6041,6 +6042,7 @@ static void perf_event_mmap_output(struct perf_event *event,perf_output_end (&handle); out: mmap_event->event_id.header.size = size; + mmap_event->event_id.header.type = type; }static void perf_event_mmap_event (struct perf_mmap_event *mmap_event)
kernel/irq/chip.c +4 -0
@@ -1056,6 +1056,10 @@ int irq_chip_set_vcpu_affinity_parent(struct irq_data *data, void *vcpu_info)int irq_chip_set_wake_parent (struct irq_data *data,unsigned int on) { data = data->parent_data; + +if (data->chip->flags &IRQCHIP_SKIP_SET_WAKE ) +return 0 ; +if (data->chip->irq_set_wake)return data->chip->irq_set_wake (data, on);
kernel/kprobes.c +2 -4
@@ -668,7 +668,6 @@ static void unoptimize_kprobe(struct kprobe *p, bool force)static int reuse_unused_kprobe (struct kprobe *ap) {struct optimized_kprobe *op; -int ret;BUG_ON (!kprobe_unused (ap));/*
@@ -682,9 +681,8 @@ static int reuse_unused_kprobe(struct kprobe *ap)/* Enable the probe again */ ap->flags &= ~KPROBE_FLAG_DISABLED ;/* Optimize it again (remove from op->list) */ - ret =kprobe_optready (ap); -if (ret) -return ret; +if (!kprobe_optready (ap)) +return -EINVAL ;optimize_kprobe (ap);return 0 ;
kernel/locking/lockdep.c +0 -3
@@ -3314,9 +3314,6 @@ __lock_set_class(struct lockdep_map *lock, const char *name,unsigned int depth;int i; -if (unlikely (!debug_locks)) -return 0 ; - depth = curr->lockdep_depth;/* * This function is about (re)setting the class of a held lock,
kernel/sched/fair.c +28 -3
@@ -4016,12 +4016,15 @@ static enum hrtimer_restart sched_cfs_slack_timer(struct hrtimer *timer)return HRTIMER_NORESTART ; } +extern const u64 max_cfs_quota_period; +static enum hrtimer_restart sched_cfs_period_timer (struct hrtimer *timer) {struct cfs_bandwidth *cfs_b = container_of(timer, struct cfs_bandwidth, period_timer);int overrun;int idle =0 ; +int count =0 ;raw_spin_lock (&cfs_b->lock);for (;;) {
@@ -4029,6 +4032,28 @@ static enum hrtimer_restart sched_cfs_period_timer(struct hrtimer *timer)if (!overrun)break ; +if (++count >3 ) { +u64 new, old =ktime_to_ns (cfs_b->period); + + new = (old *147 ) /128 ;/* ~115% */ + new =min (new, max_cfs_quota_period); + + cfs_b->period =ns_to_ktime (new); + +/* since max is 1s, this is limited to 1e9^2, which fits in u64 */ + cfs_b->quota *= new; + cfs_b->quota =div64_u64 (cfs_b->quota, old); + +pr_warn_ratelimited ( +"cfs_period_timer[cpu%d]: period too short, scaling up (new cfs_period_us %lld, cfs_quota_us = %lld)\n" , +smp_processor_id (), +div_u64 (new,NSEC_PER_USEC ), +div_u64 (cfs_b->quota,NSEC_PER_USEC )); + +/* reset count so we don't come right back in here */ + count =0 ; + } + idle =do_sched_cfs_period_timer (cfs_b, overrun); }if (idle)
@@ -6022,10 +6047,10 @@ static void update_cfs_rq_h_load(struct cfs_rq *cfs_rq)if (cfs_rq->last_h_load_update == now)return ; - cfs_rq->h_load_next =NULL ; +WRITE_ONCE (cfs_rq->h_load_next,NULL );for_each_sched_entity (se) { cfs_rq =cfs_rq_of (se); - cfs_rq->h_load_next = se; +WRITE_ONCE (cfs_rq->h_load_next, se);if (cfs_rq->last_h_load_update == now)break ; }
@@ -6035,7 +6060,7 @@ static void update_cfs_rq_h_load(struct cfs_rq *cfs_rq) cfs_rq->last_h_load_update = now; } -while ((se = cfs_rq->h_load_next) !=NULL ) { +while ((se =READ_ONCE (cfs_rq->h_load_next)) !=NULL ) { load = cfs_rq->h_load; load =div64_ul (load * se->avg.load_avg,cfs_rq_load_avg (cfs_rq) +1 );
kernel/sysctl.c +4 -0
@@ -125,7 +125,9 @@ static int zero;static int __maybe_unused one =1 ;static int __maybe_unused two =2 ;static int __maybe_unused four =4 ; +static unsigned long zero_ul;static unsigned long one_ul =1 ; +static unsigned long long_max =LONG_MAX ;static int one_hundred =100 ;#ifdef CONFIG_PRINTK static int ten_thousand =10000 ;
@@ -1603,6 +1605,8 @@ static struct ctl_table fs_table[] = { .maxlen = sizeof(files_stat.max_files), .mode = 0644, .proc_handler = proc_doulongvec_minmax, + .extra1 = &zero_ul, + .extra2 = &long_max, }, { .procname = "nr_open",
kernel/trace/ftrace.c +5 -1
@@ -32,6 +32,7 @@#include <linux/list.h> #include <linux/hash.h> #include <linux/rcupdate.h> +#include <linux/kprobes.h> #include <trace/events/sched.h>
@@ -5165,7 +5166,7 @@ static struct ftrace_ops control_ops = {INIT_OPS_HASH (control_ops) }; -static inline void +static nokprobe_inline void__ftrace_ops_list_func (unsigned long ip,unsigned long parent_ip,struct ftrace_ops *ignored,struct pt_regs *regs) {
@@ -5214,11 +5215,13 @@ static void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip, {__ftrace_ops_list_func (ip, parent_ip,NULL , regs); } +NOKPROBE_SYMBOL (ftrace_ops_list_func);#else static void ftrace_ops_no_ops (unsigned long ip,unsigned long parent_ip) {__ftrace_ops_list_func (ip, parent_ip,NULL ,NULL ); } +NOKPROBE_SYMBOL (ftrace_ops_no_ops);#endif /*
@@ -5239,6 +5242,7 @@ static void ftrace_ops_recurs_func(unsigned long ip, unsigned long parent_ip,trace_clear_recursion (bit); } +NOKPROBE_SYMBOL (ftrace_ops_recurs_func);/** * ftrace_ops_get_func - get the function a trampoline should call
kernel/trace/ring_buffer.c +3 -2
@@ -4042,6 +4042,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_consume);* ring_buffer_read_prepare - Prepare for a non consuming read of the buffer * @buffer: The ring buffer to read from * @cpu: The cpu buffer to iterate over +* @flags: gfp flags to use for memory allocation * * This performs the initial preparations necessary to iterate * through the buffer. Memory is allocated, buffer recording
@@ -4059,7 +4060,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_consume);* This overall must be paired with ring_buffer_read_finish. */ struct ring_buffer_iter * -ring_buffer_read_prepare (struct ring_buffer *buffer,int cpu) +ring_buffer_read_prepare (struct ring_buffer *buffer,int cpu,gfp_t flags) {struct ring_buffer_per_cpu *cpu_buffer;struct ring_buffer_iter *iter;
@@ -4067,7 +4068,7 @@ ring_buffer_read_prepare(struct ring_buffer *buffer, int cpu)if (!cpumask_test_cpu (cpu, buffer->cpumask))return NULL ; - iter =kmalloc (sizeof (*iter),GFP_KERNEL ); + iter =kmalloc (sizeof (*iter), flags);if (!iter)return NULL ;
kernel/trace/trace.c +4 -2
@@ -3122,7 +3122,8 @@ __tracing_open(struct inode *inode, struct file *file, bool snapshot)if (iter->cpu_file ==RING_BUFFER_ALL_CPUS ) {for_each_tracing_cpu (cpu) { iter->buffer_iter[cpu] = -ring_buffer_read_prepare (iter->trace_buffer->buffer, cpu); +ring_buffer_read_prepare (iter->trace_buffer->buffer, + cpu,GFP_KERNEL ); }ring_buffer_read_prepare_sync ();for_each_tracing_cpu (cpu) {
@@ -3132,7 +3133,8 @@ __tracing_open(struct inode *inode, struct file *file, bool snapshot) }else { cpu = iter->cpu_file; iter->buffer_iter[cpu] = -ring_buffer_read_prepare (iter->trace_buffer->buffer, cpu); +ring_buffer_read_prepare (iter->trace_buffer->buffer, + cpu,GFP_KERNEL );ring_buffer_read_prepare_sync ();ring_buffer_read_start (iter->buffer_iter[cpu]);tracing_iter_reset (iter, cpu);
kernel/trace/trace_kdb.c +4 -2
@@ -50,14 +50,16 @@ static void ftrace_dump_buf(int skip_lines, long cpu_file)if (cpu_file ==RING_BUFFER_ALL_CPUS ) {for_each_tracing_cpu (cpu) { iter.buffer_iter[cpu] = -ring_buffer_read_prepare (iter.trace_buffer->buffer, cpu); +ring_buffer_read_prepare (iter.trace_buffer->buffer, + cpu,GFP_ATOMIC );ring_buffer_read_start (iter.buffer_iter[cpu]);tracing_iter_reset (&iter, cpu); } }else { iter.cpu_file = cpu_file; iter.buffer_iter[cpu_file] = -ring_buffer_read_prepare (iter.trace_buffer->buffer, cpu_file); +ring_buffer_read_prepare (iter.trace_buffer->buffer, + cpu_file,GFP_ATOMIC );ring_buffer_read_start (iter.buffer_iter[cpu_file]);tracing_iter_reset (&iter, cpu_file); }
lib/bsearch.c +2 -0
@@ -11,6 +11,7 @@#include <linux/export.h> #include <linux/bsearch.h> +#include <linux/kprobes.h> /* * bsearch - binary search an array of elements
@@ -51,3 +52,4 @@ void *bsearch(const void *key, const void *base, size_t num, size_t size,return NULL ; }EXPORT_SYMBOL (bsearch); +NOKPROBE_SYMBOL (bsearch);
lib/div64.c +2 -2
@@ -100,7 +100,7 @@ u64 div64_u64_rem(u64 dividend, u64 divisor, u64 *remainder) quot =div_u64_rem (dividend, divisor, &rem32); *remainder = rem32; }else { -int n =1 +fls (high); +int n =fls (high); quot =div_u64 (dividend >> n, divisor >> n);if (quot !=0 )
@@ -138,7 +138,7 @@ u64 div64_u64(u64 dividend, u64 divisor)if (high ==0 ) { quot =div_u64 (dividend, divisor); }else { -int n =1 +fls (high); +int n =fls (high); quot =div_u64 (dividend >> n, divisor >> n);if (quot !=0 )
lib/int_sqrt.c +2 -4
@@ -7,6 +7,7 @@#include <linux/kernel.h> #include <linux/export.h> +#include <linux/bitops.h> /** * int_sqrt - rough approximation to sqrt
@@ -21,10 +22,7 @@ unsigned long int_sqrt(unsigned long x)if (x <=1 )return x; - m =1UL << (BITS_PER_LONG -2 ); -while (m > x) - m >>=2 ; - + m =1UL << (__fls (x) & ~1UL );while (m !=0 ) { b = y + m; y >>=1 ;
lib/raid6/Makefile +1 -1
@@ -23,7 +23,7 @@ endif ifeq ($(CONFIG_KERNEL_MODE_NEON),y) NEON_FLAGS := -ffreestanding ifeq ($(ARCH),arm) -NEON_FLAGS += -mfloat-abi=softfp -mfpu=neon +NEON_FLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=neon endif ifeq ($(ARCH),arm64) CFLAGS_REMOVE_neon1.o += -mgeneral-regs-only
lib/string.c +20 -0
@@ -746,6 +746,26 @@ __visible int memcmp(const void *cs, const void *ct, size_t count)EXPORT_SYMBOL (memcmp);#endif +#ifndef __HAVE_ARCH_BCMP +/** +* bcmp - returns 0 if and only if the buffers have identical contents. +* @a: pointer to first buffer. +* @b: pointer to second buffer. +* @len: size of buffers. +* +* The sign or magnitude of a non-zero return value has no particular +* meaning, and architectures may implement their own more efficient bcmp(). So +* while this particular implementation is a simple (tail) call to memcmp, do +* not rely on anything but whether the return value is zero or non-zero. +*/ +#undef bcmp +int bcmp (const void *a,const void *b,size_t len) +{ +return memcmp (a, b, len); +} +EXPORT_SYMBOL (bcmp); +#endif +#ifndef __HAVE_ARCH_MEMSCAN/** * memscan - Find a character in an area of memory.
mm/cma.c +3 -1
@@ -339,12 +339,14 @@ int __init cma_declare_contiguous(phys_addr_t base, ret =cma_init_reserved_mem (base, size, order_per_bit, res_cma);if (ret)
Lines of this file are not shown. View the raw message.
scripts/mod/file2alias.c +47 -94
141 lines not on this page · raw message
sound/soc/fsl/fsl_esai.c +37 -10
47 lines not on this page · raw message
tools/perf/tests/openat-syscall-all-cpus.c +3 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.