Linux 3.16.49
I'm announcing the release of the 3.16.49 kernel.
All users of the 3.16 kernel series should upgrade.
The updated 3.16.y git tree can be found at:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.16.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git
The diff from 3.16.48 is attached to this message.
Ben.
------------
Documentation/DMA-API.txt | 2 +- Documentation/cgroups/cpusets.txt | 6 +- Makefile | 2 +- arch/arm/include/asm/xen/events.h | 2 +- arch/arm/mach-omap2/sleep34xx.S | 22 +-- arch/arm64/include/asm/elf.h | 11 +- arch/arm64/include/asm/ptrace.h | 34 +---- arch/arm64/kernel/ptrace.c | 89 ++++++++++- arch/arm64/kernel/signal.c | 4 +- arch/arm64/kernel/signal32.c | 2 +- arch/m32r/include/asm/io.h | 11 +- arch/mips/include/asm/branch.h | 5 +- arch/mips/include/asm/kvm_host.h | 1 + arch/mips/include/asm/processor.h | 2 +- arch/mips/kernel/branch.c | 8 +- arch/mips/kernel/module-rela.c | 19 ++- arch/mips/kernel/module.c | 43 ++++-- arch/mips/kernel/ptrace.c | 2 +- arch/mips/kernel/scall32-o32.S | 2 +- arch/mips/kernel/scall64-64.S | 2 +- arch/mips/kernel/scall64-n32.S | 2 +- arch/mips/kernel/scall64-o32.S | 2 +- arch/mips/kernel/syscall.c | 15 +- arch/mips/kvm/kvm_locore.S | 1 + arch/mips/kvm/kvm_mips.c | 11 +- arch/mips/kvm/kvm_mips_int.h | 2 + arch/mips/math-emu/cp1emu.c | 38 +++++ arch/parisc/include/asm/dma-mapping.h | 11 +- arch/parisc/kernel/syscall_table.S | 2 +- arch/parisc/mm/fault.c | 2 +- arch/powerpc/include/asm/atomic.h | 4 +- arch/powerpc/include/asm/reg.h | 2 +- arch/powerpc/lib/sstep.c | 13 ++ arch/s390/include/asm/syscall.h | 8 +- arch/sparc/include/asm/head_64.h | 4 + arch/sparc/include/asm/ttable.h | 8 +- arch/sparc/kernel/Makefile | 1 + arch/sparc/kernel/cherrs.S | 14 +- arch/sparc/kernel/entry.S | 17 +++ arch/sparc/kernel/fpu_traps.S | 11 +- arch/sparc/kernel/head_64.S | 24 +-- arch/sparc/kernel/misctrap.S | 12 +- arch/sparc/kernel/pci.c | 17 +++ arch/sparc/kernel/rtrap_64.S | 57 ++----- arch/sparc/kernel/signal32.c | 46 ++++-- arch/sparc/kernel/signal_32.c | 41 ++++-- arch/sparc/kernel/signal_64.c | 33 +++-- arch/sparc/kernel/sigutil_32.c | 9 +- arch/sparc/kernel/sigutil_64.c | 10 +- arch/sparc/kernel/spiterrs.S | 18 +-- arch/sparc/kernel/syscalls.S | 36 +++++ arch/sparc/kernel/urtt_fill.S | 98 +++++++++++++ arch/sparc/kernel/utrap.S | 3 +- arch/sparc/kernel/vmlinux.lds.S | 4 + arch/sparc/kernel/winfixup.S | 3 +- arch/sparc/mm/init_64.c | 10 +- arch/x86/boot/compressed/Makefile | 3 + arch/x86/boot/compressed/efi_stub_64.S | 25 ---- arch/x86/boot/compressed/efi_thunk_64.S | 196 +++++++++++++++++++++++++ arch/x86/crypto/sha1_ssse3_glue.c | 3 +- arch/x86/include/asm/xen/hypercall.h | 3 + arch/x86/include/uapi/asm/msr-index.h | 2 + arch/x86/kernel/cpu/perf_event_intel.c | 12 +- arch/x86/kernel/nmi_selftest.c | 2 +- arch/x86/kvm/cpuid.h | 9 ++ arch/x86/kvm/vmx.c | 16 +- arch/x86/pci/fixup.c | 52 ++++++- arch/x86/platform/efi/efi_stub_64.S | 161 -------------------- arch/x86/platform/efi/efi_thunk_64.S | 121 ++++++++++++--- drivers/acpi/ec.c | 4 +- drivers/base/power/domain.c | 4 +- drivers/base/power/sysfs.c | 2 + drivers/char/tpm/tpm-sysfs.c | 3 +- drivers/crypto/atmel-sha.c | 4 +- drivers/crypto/caam/caamhash.c | 2 +- drivers/crypto/caam/key_gen.c | 2 +- drivers/crypto/talitos.c | 7 +- drivers/gpu/drm/drm_irq.c | 3 +- drivers/gpu/drm/i915/i915_dma.c | 8 +- drivers/gpu/drm/i915/intel_display.c | 11 +- drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_sprite.c | 20 +++ drivers/gpu/drm/msm/hdmi/hdmi_audio.c | 6 +- drivers/gpu/drm/radeon/atombios_encoders.c | 13 +- drivers/i2c/busses/i2c-cadence.c | 6 +- drivers/iio/accel/st_accel_spi.c | 4 - drivers/iio/magnetometer/st_magn_spi.c | 2 - drivers/infiniband/core/cache.c | 61 ++++---- drivers/infiniband/core/device.c | 26 +--- drivers/infiniband/core/uverbs_cmd.c | 9 ++ drivers/input/serio/i8042.c | 12 +- drivers/input/touchscreen/ads7846.c | 8 +- drivers/macintosh/therm_windtunnel.c | 1 + drivers/md/dm.c | 55 +++++++ drivers/md/raid1.c | 5 +- drivers/md/raid5.c | 5 +- drivers/media/pci/saa7164/saa7164-buffer.c | 4 +- drivers/media/pci/saa7164/saa7164-bus.c | 96 ++++++------ drivers/media/pci/saa7164/saa7164-core.c | 13 +- drivers/media/pci/saa7164/saa7164-fw.c | 6 +- drivers/media/pci/saa7164/saa7164-types.h | 4 +- drivers/media/pci/saa7164/saa7164.h | 4 +- drivers/media/rc/mceusb.c | 5 + drivers/misc/ad525x_dpot.c | 2 +- drivers/misc/enclosure.c | 14 +- drivers/net/ethernet/intel/e1000e/netdev.c | 33 ++++- drivers/net/hyperv/netvsc_drv.c | 19 ++- drivers/net/vxlan.c | 2 +- drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 - drivers/net/wireless/ath/ath9k/tx99.c | 13 +- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 32 +++- drivers/net/wireless/libertas/mesh.c | 5 +- drivers/net/wireless/mwifiex/cfg80211.c | 37 ++--- drivers/net/wireless/mwifiex/fw.h | 5 - drivers/net/wireless/mwifiex/uap_cmd.c | 22 --- drivers/net/wireless/ti/wlcore/spi.c | 3 +- drivers/parisc/ccio-dma.c | 12 ++ drivers/parisc/dino.c | 5 +- drivers/parisc/lba_pci.c | 6 +- drivers/parisc/sba_iommu.c | 14 ++ drivers/pci/pci-driver.c | 1 + drivers/pci/pci-sysfs.c | 18 +-- drivers/pci/quirks.c | 14 +- drivers/pinctrl/pinctrl-imx.c | 12 +- drivers/rtc/rtc-nuc900.c | 2 +- drivers/scsi/bnx2i/bnx2i_iscsi.c | 3 +- drivers/scsi/scsi_scan.c | 5 +- drivers/scsi/scsi_sysfs.c | 8 +- drivers/scsi/scsi_transport_iscsi.c | 2 +- drivers/scsi/sun_esp.c | 9 +- drivers/scsi/virtio_scsi.c | 12 ++ drivers/spi/spi-atmel.c | 24 ++- drivers/staging/comedi/comedi_fops.c | 1 + drivers/staging/usbip/stub_main.c | 4 + drivers/staging/usbip/stub_tx.c | 4 + drivers/target/iscsi/iscsi_target_configfs.c | 3 + drivers/target/iscsi/iscsi_target_core.h | 9 ++ drivers/target/iscsi/iscsi_target_nego.c | 6 +- drivers/target/iscsi/iscsi_target_parameters.c | 41 ++++-- drivers/target/iscsi/iscsi_target_parameters.h | 2 +- drivers/target/iscsi/iscsi_target_tpg.c | 19 +++ drivers/target/iscsi/iscsi_target_tpg.h | 1 + drivers/target/target_core_transport.c | 9 ++ drivers/tty/serial/samsung.c | 4 +- drivers/tty/serial/sccnxp.c | 15 +- drivers/tty/vt/vt.c | 6 +- drivers/usb/core/quirks.c | 4 + drivers/usb/host/xhci-hub.c | 3 + drivers/usb/host/xhci-pci.c | 12 ++ drivers/usb/host/xhci.h | 1 + drivers/usb/musb/musb_cppi41.c | 24 +-- drivers/usb/serial/cp210x.c | 1 + drivers/usb/serial/option.c | 4 + drivers/usb/serial/qcserial.c | 1 + drivers/vfio/vfio.c | 46 +++++- drivers/video/fbdev/aty/atyfb_base.c | 2 +- fs/btrfs/acl.c | 19 ++- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/file.c | 5 +- fs/btrfs/ioctl.c | 2 +- fs/cifs/cifs_fs_sb.h | 4 + fs/cifs/cifsfs.c | 17 ++- fs/cifs/cifsproto.h | 2 +- fs/cifs/connect.c | 80 +++++++++- fs/cifs/dir.c | 20 ++- fs/cifs/file.c | 5 +- fs/cifs/inode.c | 22 ++- fs/dcache.c | 5 +- fs/exec.c | 4 +- fs/ext2/acl.c | 43 ++++-- fs/ext3/acl.c | 21 ++- fs/ext4/acl.c | 25 +++- fs/f2fs/acl.c | 7 +- fs/f2fs/gc.c | 9 +- fs/f2fs/inode.c | 1 + fs/hfsplus/posix_acl.c | 30 ++-- fs/jfs/acl.c | 24 ++- fs/proc/proc_sysctl.c | 10 +- fs/reiserfs/xattr_acl.c | 17 ++- fs/ubifs/journal.c | 8 +- fs/ubifs/tnc.c | 2 + fs/ubifs/ubifs.h | 1 + fs/ubifs/xattr.c | 22 +++ fs/udf/file.c | 9 +- fs/udf/inode.c | 4 +- fs/xfs/xfs_acl.c | 6 +- fs/xfs/xfs_acl.h | 1 + fs/xfs/xfs_dinode.h | 9 +- fs/xfs/xfs_iops.c | 4 +- include/linux/cpumask.h | 17 +++ include/linux/cpuset.h | 4 +- include/linux/net.h | 17 +++ include/linux/pci_ids.h | 7 + include/linux/sched.h | 34 ++++- include/linux/usb/hcd.h | 4 +- include/linux/vfio.h | 2 + include/rdma/ib_verbs.h | 34 +++++ include/scsi/scsi_device.h | 1 + include/uapi/linux/v4l2-dv-timings.h | 30 ++-- kernel/cpuset.c | 9 +- kernel/events/core.c | 15 +- kernel/sched/core.c | 102 +++++++++---- kernel/seccomp.c | 2 +- kernel/sys.c | 4 +- lib/cpumask.c | 32 ++++ mm/memory.c | 14 +- mm/mmap.c | 8 +- mm/slab.c | 4 +- mm/swap.c | 9 +- net/bluetooth/l2cap_core.c | 80 +++++----- net/bluetooth/smp.c | 5 +- net/ipv4/fib_frontend.c | 6 +- net/ipv4/fib_semantics.c | 2 + net/ipv4/ip_output.c | 3 +- net/ipv4/tcp_output.c | 1 + net/ipv6/addrconf.c | 23 +-- net/ipv6/ip6_fib.c | 6 +- net/iucv/af_iucv.c | 8 +- net/l2tp/l2tp_ip.c | 2 +- net/nfc/core.c | 31 ++-- net/sched/cls_api.c | 3 +- net/sunrpc/auth_gss/gss_krb5_crypto.c | 3 +- net/wireless/nl80211.c | 11 +- scripts/tags.sh | 6 + security/apparmor/domain.c | 4 +- sound/pci/oxygen/oxygen_mixer.c | 2 +- sound/soc/soc-compress.c | 6 +- tools/lib/lockdep/uinclude/linux/lockdep.h | 2 +- virt/kvm/vfio.c | 27 +++- 229 files changed, 2414 insertions(+), 1043 deletions(-)
Abhilash Kesavan (1):
m32r: add definition of ioremap_wc to io.h
Adam Borowski (1):
vt: fix unchecked __put_user() in tioclinux ioctls
Alex Williamson (2):
vfio: Fix group release deadlock
vfio: New external user group/file match
Andrea Arcangeli (1):
mm: thp: fix SMP race condition between THP page fault and MADV_DONTNEED
Andrey Gelman (1):
Input: ads7846 - correct the value got from SPI
Andrey Ryabinin (1):
perf/x86: Fix undefined shift on 32-bit kernels
Anton Blanchard (1):
powerpc: Fix emulation of mfocrf in emulate_step()
Arnd Bergmann (2):
wlcore: fix 64K page support
xen: avoid type warning in xchg_xen_ulong
Aurelien Aptel (1):
fs/cifs: make share unaccessible at root level mountable
Babu Moger (1):
sparc/PCI: Fix for panic while enabling SR-IOV
Ben Hutchings (4):
tools/lib/lockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing lock_chain/: Depth
ext3: Don't clear SGID when inheriting ACLs
ext3: preserve i_mode if ext2_set_acl() fails
Linux 3.16.49
Ben Seri (1):
Bluetooth: Properly check L2CAP config option output buffer length
Benjamin Herrenschmidt (1):
usb: Fix typo in the definition of Endpoint[out]Request
Bin Liu (2):
usb: musb: cppi41: correct the macro name EP_MODE_AUTOREG_*
usb: musb: cppi41: improve rx channel abort routine
Bjorn Helgaas (3):
PCI: Correct PCI_STD_RESOURCE_END usage
PCI: Mark Haswell Power Control Unit as having non-compliant BARs
PCI: Work around poweroff & suspend-to-RAM issue on Macbook Pro 11
Bjørn Mork (1):
USB: serial: qcserial: new Sierra Wireless EM7305 device ID
Boris Pismenny (1):
RDMA/uverbs: Check port number supplied by user verbs cmds
Brian Norris (1):
mwifiex: fixup error cases in mwifiex_add_virtual_intf()
Chanwoo Choi (1):
serial: samsung: Reorder the sequence of clock control when call s3c24xx_serial_set_termios()
Chen Hong (1):
Input: i8042 - fix crash at boot time
Chen Yu (1):
PCI/PM: Restore the status of PCI devices across hibernation
Chris Wilson (1):
e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails
Cyrille Pitchen (1):
spi: atmel: fix corrupted data issue on SAM9 family SoCs
Dan Bogdan Nechita (1):
misc: ad525x_dpot: Fix the enabling of the "otpXen" attributes
Dan Carpenter (5):
x86/nmi: Fix timeout test in test_nmi_ipi()
scsi: bnx2i: missing error code in bnx2i_ep_connect()
libertas: Fix lbs_prb_rsp_limit_set()
rtc: rtc-nuc900: fix loop timeout test
PM / QoS: return -EINVAL for bogus strings
Dave Martin (1):
arm64: ptrace: Avoid setting compat FP[SC]R to garbage if get_user fails
David Ertman (1):
e1000e: Fix Runtime PM blocks EEE link negotiation in S5
David S. Miller (5):
sparc64: Fix bootup regressions on some Kconfig combinations.
sparc64: Fix sparc64_set_context stack handling.
sparc64: Take ctx_alloc_lock properly in hugetlb_setup().
sparc: Harden signal return frame checks.
sparc64: Fix return from trap window fill crashes.
Devin Heitmueller (1):
Add USB quirk for HVR-950q to avoid intermittent device resets
Dong Aisheng (1):
pinctrl: imx: fix debug message for SHARE_MUX_CONF_REG case
Dong Bo (1):
arm64: Preventing READ_IMPLIES_EXEC propagation
Emmanuel Grumbach (1):
iwlwifi: mvm: fix the recovery flow while connecting
Eric Biggers (1):
parisc: use compat_sys_keyctl()
Ernesto A. Fernández (6):
ext2: preserve i_mode if ext2_set_acl() fails
reiserfs: preserve i_mode if __reiserfs_set_acl() fails
jfs: preserve i_mode if __jfs_set_acl() fails
ext4: preserve i_mode if __ext4_set_acl() fails
f2fs: preserve i_mode if __f2fs_set_acl() fails
btrfs: preserve i_mode if __btrfs_set_acl() fails
Ewan D. Milne (1):
scsi: Add STARGET_CREATED_REMOVE state to scsi_target_state
Filipe Manana (1):
Btrfs: fix invalid extent maps due to hole punching
Ganapathi Bhat (1):
mwifiex: do not update MCS set from hostapd
Gilad Ben-Yossef (1):
crypto: atmel - only treat EBUSY as transient if backlog
Hans Verkuil (2):
saa7164: fix sparse warnings v4l2-dv-timings.h: fix polarity for 4k formats
Helge Deller (2):
parisc: Report SIGSEGV instead of SIGBUS when running out of stack
mm: fix overflow check in expand_upwards()
Herbert Xu (1):
crypto: sha1-ssse3 - Disable avx2
Horia Geantă (1):
crypto: caam - fix signals handling
Ian Abbott (1):
staging: comedi: fix clean-up of comedi_class in comedi_init()
Ira Weiny (1):
IB/core: Create common start/end port functions
Jaegeuk Kim (3):
f2fs: load inode's flag from disk
f2fs: try to freeze in gc and discard threads
f2fs: Don't clear SGID when inheriting ACLs
Jamal Hadi Salim (2):
net: reflect mark on tcp syn ack packets
net sched filters: fix notification of filter delete with proper handle
James Hogan (5):
MIPS: Fix mips_atomic_set() retry condition
MIPS: Save static registers before sysmips
MIPS: Fix mips_atomic_set() with EVA
MIPS: Negate error syscall return in trace
MIPS: KVM: Fix modular KVM under QEMU
Jan Kara (9):
udf: Fix races with i_size changes during readpage
udf: Fix deadlock between writeback and udf_setsize()
xfs: Don't clear SGID when inheriting ACLs
btrfs: Don't clear SGID when inheriting ACLs
ext2: Don't clear SGID when inheriting ACLs
hfsplus: Don't clear SGID when inheriting ACLs
reiserfs: Don't clear SGID when inheriting ACLs
jfs: Don't clear SGID when inheriting ACLs
ext4: Don't clear SGID when inheriting ACLs
Jan Willeke (1):
s390/seccomp: fix error return for filtered system calls
Jarkko Sakkinen (1):
tpm: fix a kernel memory leak in tpm-sysfs.c
Jason A. Donenfeld (4):
Bluetooth: use constant time memory comparison for secret values
sunrpc: use constant time memory comparison for mac
net_dbg_ratelimited: turn into no-op when !DEBUG
net: Don't forget pr_fmt on net_dbg_ratelimited for CONFIG_DYNAMIC_DEBUG
Jason S. McMullan (3):
PCI: Support PCIe devices with short cfg_size
PCI: Add Netronome vendor and device IDs
PCI: Limit config space size for Netronome NFP6000 family
Javier Martinez Canillas (1):
macintosh/therm_windtunnel: Export I2C module alias information
Jeremie Rapin (1):
USB: serial: cp210x: add ID for CEL EM3588 USB ZigBee stick
Jiahau Chang (1):
xhci: Limit USB2 port wake support for AMD Promontory hosts
Jiang Yi (1):
target: Fix COMPARE_AND_WRITE caw_sem leak during se_cmd quiesce
Jim Mattson (4):
kvm: vmx: Do not disable intercepts for BNDCFGS
kvm: x86: Guest BNDCFGS requires guest MPX support
kvm: vmx: Check value written to IA32_BNDCFGS
kvm: nVMX: Don't allow L2 to access the hardware CR8
Jiri Olsa (1):
s390/syscalls: Fix out of bounds arguments access
Johan Hovold (4):
mceusb: fix memory leaks in error path
USB: serial: option: add two Longcheer device ids
NFC: fix broken device allocation
scsi: sun_esp: fix device reference leaks
Josef Bacik (1):
Btrfs: don't use src fd for printk
Kees Cook (1):
sched: move no_new_privs into new atomic flags
Krzysztof Kozlowski (1):
PM / Domains: Fix unsafe iteration over modified list of device links
Lauro Ramos Venancio (1):
sched/topology: Refactor function build_overlap_sched_groups()
Liu Bo (1):
Btrfs: skip commit transaction if we don't have enough pinned bytes
Liviu Dudau (1):
drm/msm/hdmi: Use bitwise operators when building register values
Lorenzo Bianconi (2):
iio: accel: st_accel_spi: fix spi_device_id table
iio: magnetometer: st_magn_spi: fix spi_device_id table
Lubomir Rintel (1):
ipv6: always add flag an address that failed DAD with DADFAILED
Luis R. Rodriguez (1):
sysctl: fix lax sysctl_check_table() sanity check
Lukasz Odzioba (1):
mm/swap.c: flush lru pvecs on compound page arrival
Lv Zheng (1):
Revert "ACPI / EC: Add support to disallow QR_EC to be issued before completing previous QR_EC"
Maciej W. Rozycki (4):
MIPS: math-emu: Prevent wrong ISA mode instruction emulation
MIPS: Actually decode JALX in `__compute_return_epc_for_insn'
MIPS: Fix unaligned PC interpretation in `compute_return_epc'
MIPS: Send SIGILL for BPOSGE32 in `__compute_return_epc_for_insn'
Marek Marczykowski-Górecki (1):
x86/xen: allow userspace access during hypercalls
Mario Kleiner (1):
drm/radeon: Fix eDP for single-display iMac10,1 (v2)
Mark Rutland (1):
arm64: Rework valid_user_regs
Martin Hicks (1):
crypto: talitos - Extend max key length for SHA384/512-HMAC and AEAD
Mateusz Jurczyk (1):
af_iucv: Move sockaddr length checks to before accessing sa_family in bind and connect handlers
Matt Fleming (1):
x86/efi: Avoid triple faults during EFI mixed mode calls
Matt Weber (1):
i2c: cadance: fix ctrl/addr reg write order
Maurizio Lombardi (1):
scsi: ses: do not add a device to an enclosure if enclosure_add_links() fails.
Miaoqing Pan (2):
ath9k: fix tx99 use after free
ath9k: fix tx99 bus error
Michael Ellerman (1):
powerpc/64: Fix atomic64_inc_not_zero() to return an int
Michael Grzeschik (1):
usb: usbip: set buffer pointers to NULL after free
Michal Hocko (1):
mm/mmap.c: do not blow on PROT_NONE MAP_FIXED holes in the stack
Mike Frysinger (1):
sparc: Fix system call tracing register handling.
Mikulas Patocka (2):
md: don't use flush_signals in userspace processes
dm: flush queued bios when process blocks to avoid deadlock
Nicholas Bellinger (1):
iscsi-target: Add login_keys_workaround attribute for non RFC initiators
Oliver O'Halloran (1):
powerpc/asm: Mark cr0 as clobbered in mftb()
Palik, Imre (1):
perf/x86: Honor the architectural performance monitoring version
Paolo Abeni (2):
net/route: enforce hoplimit max value
ipv4/fib: don't warn when primary address is missing if in_dev is dead
Paolo Bonzini (1):
scsi: virtio_scsi: let host do exception handling
Paul Burton (2):
MIPS: Bail on unsupported module relocs
MIPS: module: Ensure we always clean up r_mips_hi16_list
Paul Hüber (1):
l2tp: avoid use-after-free caused by l2tp_ip_backlog_recv
Peter Zijlstra (5):
sched/fair, cpumask: Export for_each_cpu_wrap() sched/topology: Fix building of overlapping sched-groups sched/topology: Fix overlapping sched_group_mask sched/topology: Fix overlapping sched_group_capacity perf/core: Correct event creation with PERF_FORMAT_GROUP
Rabin Vincent (1):
CIFS: fix circular locking dependency
Ralf Baechle (1):
MIPS: Fix 64k page support for 32 bit kernels.
Richard Wareing (1):
xfs: XFS_IS_REALTIME_INODE() should be false if no rt device present
Richard Weinberger (2):
ubifs: Correctly evict xattr inodes
ubifs: Don't leak kernel memory to the MTD
Rob Clark (1):
drm/irq: BUG_ON() -> WARN_ON()
Roopa Prabhu (1):
vxlan: dont migrate permanent fdb entries during learn
Sabrina Dubroca (1):
ipv6: dad: don't remove dynamic addresses if link is down
Sachin Prabhu (5):
Fix memory leaks in cifs_do_mount()
Compare prepaths when comparing superblocks Move check for prefix path to within cifs_get_root() Fix regression which breaks DFS mounting Fix match_prepath()
Sahitya Tummala (1):
fs/dcache.c: fix spin lockup issue on nlru->lock
Satish Babu Patakokila (1):
ASoC: compress: Derive substream from stream based on direction
Simon Horman (2):
PCI: Add Netronome NFP4000 PF device ID
PCI: Limit config space size for Netronome NFP4000
Srinivas Dasari (3):
cfg80211: Check if PMKID attribute is of expected size
cfg80211: Define nla_policy for NL80211_ATTR_LOCAL_MESH_POWER_MODE
cfg80211: Validate frequencies nested in NL80211_ATTR_SCAN_FREQUENCIES
Stephen Hemminger (1):
netvsc: fix incorrect receive checksum offloading
Steven Toth (1):
saa7164: fix double fetch PCIe access condition
Sudip Mukherjee (1):
m32r: add io*_rep helpers
Thomas Bogendoerfer (2):
Fix serial console on SNI RM400 machines
parisc: DMA API: return error instead of BUG_ON for dma ops on non dma devs
Tim Bingham (1):
net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case
Tomer Barletz (1):
ALSA: oxygen: Fix logical-not-parentheses warning
Tony Lindgren (1):
ARM: OMAP3: Fix booting with thumb2 kernel
Ville Syrjälä (2):
drm/i915: Workaround VLV/CHV DSI scanline counter hardware fail drm/i915: Disable MSI for all pre-gen5
Vladis Dronov (2):
nl80211: check for the required netlink attributes presence
video: fbdev: aty: do not leak uninitialized padding in clk to userspace
Wolfram Sang (1):
Documentation: DMA API: fix a typo in a function name
Xin Long (1):
scsi: scsi_transport_iscsi: fix the issue that iscsi_if_rx doesn't parse nlmsg properly
Yuval Shaia (1):
IB/core: Add inline function to validate port
Zefan Li (3):
sched: fix confusing PFA_NO_NEW_PRIVS constant
sched: add macros to define bitops for task atomic flags
cpuset: PF_SPREAD_PAGE and PF_SPREAD_SLAB should be atomic flags
Zhihui Zhang (1):
sched: Rename a misleading variable in build_overlap_sched_groups()
Documentation/DMA-API.txt +1 -1
@@ -691,7 +691,7 @@ of preallocated entries is defined per architecture. If it is too low for you boot with 'dma_debug_entries=<your_desired_number>' to overwrite the architectural default. -void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr); +void debug_dma_mapping_error(struct device *dev, dma_addr_t dma_addr); dma-debug interface debug_dma_mapping_error() to debug drivers that fail to check DMA mapping errors on addresses returned by dma_map_single() and
Documentation/cgroups/cpusets.txt +3 -3
@@ -345,14 +345,14 @@ the named feature on. The implementation is simple. Setting the flag 'cpuset.memory_spread_page' turns on a per-process flag -PF_SPREAD_PAGE for each task that is in that cpuset or subsequently +PFA_SPREAD_PAGE for each task that is in that cpuset or subsequently joins that cpuset. The page allocation calls for the page cache -is modified to perform an inline check for this PF_SPREAD_PAGE task +is modified to perform an inline check for this PFA_SPREAD_PAGE task flag, and if set, a call to a new routine cpuset_mem_spread_node() returns the node to prefer for the allocation. Similarly, setting 'cpuset.memory_spread_slab' turns on the flag -PF_SPREAD_SLAB, and appropriately marked slab caches will allocate +PFA_SPREAD_SLAB, and appropriately marked slab caches will allocate pages from the node returned by cpuset_mem_spread_node(). The cpuset_mem_spread_node() routine is also simple. It uses the
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 16 -SUBLEVEL = 48 +SUBLEVEL = 49 EXTRAVERSION = NAME = Museum of Fishiegoodies
arch/arm/include/asm/xen/events.h +1 -1
@@ -16,7 +16,7 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)return raw_irqs_disabled_flags (regs->ARM_cpsr); } -#define xchg_xen_ulong (ptr, val) atomic64_xchg(container_of((ptr), \ +#define xchg_xen_ulong (ptr, val) atomic64_xchg(container_of((long long*)(ptr),\ atomic64_t, \ counter), (val))
arch/arm/mach-omap2/sleep34xx.S +2 -20
@@ -203,23 +203,8 @@ ENTRY(omap34xx_cpu_suspend) */ ldr r1, kernel_flush blx r1 - /* - * The kernel doesn't interwork: v7_flush_dcache_all in particluar will - * always return in Thumb state when CONFIG_THUMB2_KERNEL is enabled. - * This sequence switches back to ARM. Note that .align may insert a - * nop: bx pc needs to be word-aligned in order to work. - */ - THUMB( .thumb ) - THUMB( .align ) - THUMB( bx pc ) - THUMB( nop ) - .arm - b omap3_do_wfi - -/* - * Local variables - */ +ENDPROC(omap34xx_cpu_suspend) omap3_do_wfi_sram_addr: .word omap3_do_wfi_sram kernel_flush:
@@ -364,10 +349,7 @@ ENTRY(omap3_do_wfi) * =================================== */ ldmfd sp!, {r4 - r11, pc} @ restore regs and return - -/* - * Local variables - */ +ENDPROC(omap3_do_wfi) sdrc_power: .word SDRC_POWER_V cm_idlest1_core:
arch/arm64/include/asm/elf.h +10 -1
@@ -135,7 +135,11 @@ extern unsigned long randomize_et_dyn(unsigned long base);*/ #define ELF_PLAT_INIT (_r, load_addr) (_r)->regs[0] = 0 -#define SET_PERSONALITY (ex) clear_thread_flag(TIF_32BIT); +#define SET_PERSONALITY (ex) \ +({ \ + clear_thread_flag(TIF_32BIT); \ + current->personality &= ~READ_IMPLIES_EXEC; \ +})/* update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ #define ARCH_DLINFO \
@@ -183,6 +187,11 @@ typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG]; ((x)->e_flags & EF_ARM_EABI_MASK))#define compat_start_thread compat_start_thread +/* +* Unlike the native SET_PERSONALITY macro, the compat version inherits +* READ_IMPLIES_EXEC across a fork() since this is the behaviour on +* arch/arm/. +*/ #define COMPAT_SET_PERSONALITY (ex) set_thread_flag(TIF_32BIT);#define COMPAT_ARCH_DLINFO extern int aarch32_setup_vectors_page(struct linux_binprm *bprm,
arch/arm64/include/asm/ptrace.h +5 -29
@@ -58,6 +58,8 @@#define COMPAT_PSR_Z_BIT 0x40000000#define COMPAT_PSR_N_BIT 0x80000000#define COMPAT_PSR_IT_MASK 0x0600fc00/* If-Then execution state mask */ +#define COMPAT_PSR_GE_MASK 0x000f0000 +/* * These are 'magic' values for PTRACE_PEEKUSR that return info about where a * process is located in memory.
@@ -144,35 +146,9 @@ static inline unsigned long regs_return_value(struct pt_regs *regs)return regs->regs[0 ]; } -/* -* Are the current registers suitable for user mode? (used to maintain -* security in signal handlers) -*/ -static inline int valid_user_regs (struct user_pt_regs *regs) -{ -if (user_mode (regs) && (regs->pstate &PSR_I_BIT ) ==0 ) { - regs->pstate &= ~(PSR_F_BIT |PSR_A_BIT ); - -/* The T bit is reserved for AArch64 */ -if (!(regs->pstate &PSR_MODE32_BIT )) - regs->pstate &= ~COMPAT_PSR_T_BIT ; - -return 1 ; - } - -/* -* Force PSR to something logical... -*/ - regs->pstate &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT ) | \ -COMPAT_PSR_T_BIT |PSR_MODE32_BIT ; - -if (!(regs->pstate &PSR_MODE32_BIT )) { - regs->pstate &= ~COMPAT_PSR_T_BIT ; - regs->pstate |= PSR_MODE_EL0t; - } - -return 0 ; -} +/* We must avoid circular header include via sched.h */ +struct task_struct ; +int valid_user_regs (struct user_pt_regs *regs,struct task_struct *task);#define instruction_pointer (regs) ((unsigned long)(regs)->pc)
arch/arm64/kernel/ptrace.c +85 -4
116 lines not on this page · raw message
arch/arm64/kernel/signal.c +2 -2
@@ -115,7 +115,7 @@ static int restore_sigframe(struct pt_regs *regs,*/ regs->syscallno = ~0UL ; - err |= !valid_user_regs (®s->user_regs); + err |= !valid_user_regs (®s->user_regs, current);if (err ==0 ) { struct fpsimd_context *fpsimd_ctx =
@@ -322,7 +322,7 @@ static void handle_signal(unsigned long sig, struct k_sigaction *ka,/* * Check that the resulting registers are actually sane. */ - ret |= !valid_user_regs (®s->user_regs); + ret |= !valid_user_regs (®s->user_regs, current);if (ret !=0 ) {force_sigsegv (sig, tsk);
arch/arm64/kernel/signal32.c +1 -1
@@ -350,7 +350,7 @@ static int compat_restore_sigframe(struct pt_regs *regs,*/ regs->syscallno = ~0UL ; - err |= !valid_user_regs (®s->user_regs); + err |= !valid_user_regs (®s->user_regs, current); aux = (struct compat_aux_sigframe __user *) sf->uc.uc_regspace;if (err ==0 )
arch/m32r/include/asm/io.h +10 -1
@@ -67,6 +67,7 @@ static inline void __iomem *ioremap(unsigned long offset, unsigned long size)extern void iounmap (volatile void __iomem *addr);#define ioremap_nocache (off,size) ioremap(off,size) +#define ioremap_wc ioremap_nocache/* * IO bus memory addresses are also 1:1 with the physical address
@@ -162,13 +163,21 @@ static inline void _writel(unsigned long l, unsigned long addr)#define __raw_writew writew#define __raw_writel writel -#define ioread8 read +#define ioread8 readb#define ioread16 readw#define ioread32 readl#define iowrite8 writeb#define iowrite16 writew#define iowrite32 writel +#define ioread8_rep (p, dst, count) insb((unsigned long)(p), (dst), (count)) +#define ioread16_rep (p, dst, count) insw((unsigned long)(p), (dst), (count)) +#define ioread32_rep (p, dst, count) insl((unsigned long)(p), (dst), (count)) + +#define iowrite8_rep (p, src, count) outsb((unsigned long)(p), (src), (count)) +#define iowrite16_rep (p, src, count) outsw((unsigned long)(p), (src), (count)) +#define iowrite32_rep (p, src, count) outsl((unsigned long)(p), (src), (count)) +#define mmiowb ()#define flush_write_buffers () do { } while (0)/* M32R_FIXME */
arch/mips/include/asm/branch.h +1 -4
@@ -74,10 +74,7 @@ static inline int compute_return_epc(struct pt_regs *regs)return __microMIPS_compute_return_epc (regs);if (cpu_has_mips16)return __MIPS16e_compute_return_epc (regs); -return regs->cp0_epc; - } - -if (!delay_slot (regs)) { + }else if (!delay_slot (regs)) { regs->cp0_epc +=4 ;return 0 ; }
arch/mips/include/asm/kvm_host.h +1 -0
@@ -378,6 +378,7 @@ struct kvm_mips_tlb {#define KVM_MIPS_GUEST_TLB_SIZE 64struct kvm_vcpu_arch {void *host_ebase, *guest_ebase; +int (*vcpu_run)(struct kvm_run *run,struct kvm_vcpu *vcpu);unsigned long host_stack;unsigned long host_gp;
arch/mips/include/asm/processor.h +1 -1
@@ -51,7 +51,7 @@ extern unsigned int vced_count, vcei_count;* User space process size: 2GB. This is hardcoded into a few places, * so don't change it unless you know what you are doing. */ -#define TASK_SIZE 0x7fff8000UL +#define TASK_SIZE 0x80000000UL#endif #ifdef __KERNEL__
arch/mips/kernel/branch.c +5 -3
@@ -396,7 +396,7 @@ int __MIPS16e_compute_return_epc(struct pt_regs *regs)* * @regs: Pointer to pt_regs * @insn: branch instruction to decode -* @returns: -EFAULT on error and forces SIGBUS, and on success +* @returns: -EFAULT on error and forces SIGILL, and on success * returns 0 or BRANCH_LIKELY_TAKEN as appropriate after * evaluating the branch. */
@@ -493,6 +493,7 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,/* * These are unconditional and in j_format. */ +case jalx_op:case jal_op: regs->regs[31 ] = regs->cp0_epc +8 ;case j_op:
@@ -632,8 +633,9 @@ int __compute_return_epc_for_insn(struct pt_regs *regs,return ret; sigill: -printk ("%s: DSP branch but not DSP ASE - sending SIGBUS.\n" , current->comm); -force_sig (SIGBUS , current); +pr_info ("%s: DSP branch but not DSP ASE - sending SIGILL.\n" , + current->comm); +force_sig (SIGILL , current);return -EFAULT ; }EXPORT_SYMBOL_GPL (__compute_return_epc_for_insn);
arch/mips/kernel/module-rela.c +16 -3
@@ -109,9 +109,10 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, struct module *me) {Elf_Mips_Rela *rel = (void *) sechdrs[relsec].sh_addr; +int (*handler)(struct module *me,u32 *location,Elf_Addr v);Elf_Sym *sym;u32 *location; -unsigned int i; +unsigned int i, type;Elf_Addr v;int res;
@@ -134,9 +135,21 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,return -ENOENT ; } - v = sym->st_value + rel[i].r_addend; + type =ELF_MIPS_R_TYPE (rel[i]); + +if (type <ARRAY_SIZE (reloc_handlers_rela)) + handler = reloc_handlers_rela[type]; +else + handler =NULL ; - res = reloc_handlers_rela[ELF_MIPS_R_TYPE (rel[i])](me, location, v); +if (!handler) { +pr_err ("%s: Unknown relocation type %u\n" , + me->name, type); +return -EINVAL ; + } + + v = sym->st_value + rel[i].r_addend; + res =handler (me, location, v);if (res)return res; }
arch/mips/kernel/module.c +30 -13
71 lines not on this page · raw message
arch/mips/kernel/ptrace.c +1 -1
@@ -804,7 +804,7 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)audit_syscall_exit (regs);if (unlikely (test_thread_flag (TIF_SYSCALL_TRACEPOINT ))) -trace_sys_exit (regs, regs->regs[2 ]); +trace_sys_exit (regs,regs_return_value (regs));if (test_thread_flag (TIF_SYSCALL_TRACE ))tracehook_report_syscall_exit (regs,0 );
arch/mips/kernel/scall32-o32.S +1 -1
@@ -363,7 +363,7 @@ EXPORT(sys_call_table) PTR sys_writev PTR sys_cacheflush PTR sys_cachectl - PTR sys_sysmips + PTR __sys_sysmips PTR sys_ni_syscall /* 4150 */ PTR sys_getsid PTR sys_fdatasync
arch/mips/kernel/scall64-64.S +1 -1
@@ -318,7 +318,7 @@ EXPORT(sys_call_table) PTR sys_sched_getaffinity PTR sys_cacheflush PTR sys_cachectl - PTR sys_sysmips + PTR __sys_sysmips PTR sys_io_setup /* 5200 */ PTR sys_io_destroy PTR sys_io_getevents
arch/mips/kernel/scall64-n32.S +1 -1
@@ -307,7 +307,7 @@ EXPORT(sysn32_call_table) PTR compat_sys_sched_getaffinity PTR sys_cacheflush PTR sys_cachectl - PTR sys_sysmips + PTR __sys_sysmips PTR compat_sys_io_setup /* 6200 */ PTR sys_io_destroy PTR compat_sys_io_getevents
arch/mips/kernel/scall64-o32.S +1 -1
@@ -358,7 +358,7 @@ EXPORT(sys32_call_table) PTR compat_sys_writev PTR sys_cacheflush PTR sys_cachectl - PTR sys_sysmips + PTR __sys_sysmips PTR sys_ni_syscall /* 4150 */ PTR sys_getsid PTR sys_fdatasync
arch/mips/kernel/syscall.c +12 -3
@@ -28,6 +28,7 @@#include <linux/elf.h> #include <asm/asm.h> +#include <asm/asm-eva.h> #include <asm/branch.h> #include <asm/cachectl.h> #include <asm/cacheflush.h>
@@ -137,10 +138,12 @@ static inline int mips_atomic_set(unsigned long addr, unsigned long new) __asm__ __volatile__ (" .set arch=r4000 \n" " li %[err], 0 \n" -"1: ll %[old], (%[addr]) \n" +"1: \n" + user_ll("%[old]", "(%[addr])")" move %[tmp], %[new] \n" -"2: sc %[tmp], (%[addr]) \n" -" bnez %[tmp], 4f \n" +"2: \n" + user_sc("%[tmp]", "(%[addr])") +" beqz %[tmp], 4f \n" "3: \n" " .subsection 2 \n" "4: b 1b \n"
@@ -197,6 +200,12 @@ static inline int mips_atomic_set(unsigned long addr, unsigned long new)unreachable (); } +/* +* mips_atomic_set() normally returns directly via syscall_exit potentially +* clobbering static registers, so be sure to preserve them. +*/ +save_static_function (sys_sysmips); + SYSCALL_DEFINE3(sysmips, long, cmd, long, arg1, long, arg2) {switch (cmd) {
arch/mips/kvm/kvm_locore.S +1 -0
@@ -229,6 +229,7 @@ FEXPORT(__kvm_mips_load_k0k1) /* Jump to guest */ eret +EXPORT(__kvm_mips_vcpu_run_end) VECTOR(MIPSX(exception), unknown) /*
arch/mips/kvm/kvm_mips.c +10 -1
@@ -342,6 +342,15 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)memcpy (gebase + offset, mips32_GuestException, mips32_GuestExceptionEnd - mips32_GuestException); +#ifdef MODULE + offset += mips32_GuestExceptionEnd - mips32_GuestException; +memcpy (gebase + offset, (char *)__kvm_mips_vcpu_run, + __kvm_mips_vcpu_run_end - (char *)__kvm_mips_vcpu_run); + vcpu->arch.vcpu_run = gebase + offset; +#else + vcpu->arch.vcpu_run = __kvm_mips_vcpu_run; +#endif +/* Invalidate the icache for these ranges */ flush_icache_range ((unsigned long )gebase, (unsigned long )gebase +ALIGN (size,PAGE_SIZE ));
@@ -426,7 +435,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)kvm_guest_enter (); - r =__kvm_mips_vcpu_run (run, vcpu); + r = vcpu->arch.vcpu_run (run, vcpu);kvm_guest_exit ();local_irq_enable ();
arch/mips/kvm/kvm_mips_int.h +2 -0
@@ -27,6 +27,8 @@#define MIPS_EXC_MAX 12/* XXXSL More to follow */ +extern char __kvm_mips_vcpu_run_end[]; +#define C_TI (_ULCAST_(1) << 30)#define KVM_MIPS_IRQ_DELIVER_ALL_AT_ONCE (0)
arch/mips/math-emu/cp1emu.c +38 -0
@@ -1856,6 +1856,35 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,return 0 ; } +/* +* Emulate FPU instructions. +* +* If we use FPU hardware, then we have been typically called to handle +* an unimplemented operation, such as where an operand is a NaN or +* denormalized. In that case exit the emulation loop after a single +* iteration so as to let hardware execute any subsequent instructions. +* +* If we have no FPU hardware or it has been disabled, then continue +* emulating floating-point instructions until one of these conditions +* has occurred: +* +* - a non-FPU instruction has been encountered, +* +* - an attempt to emulate has ended with a signal, +* +* - the ISA mode has been switched. +* +* We need to terminate the emulation loop if we got switched to the +* MIPS16 mode, whether supported or not, so that we do not attempt +* to emulate a MIPS16 instruction as a regular MIPS FPU instruction. +* Similarly if we got switched to the microMIPS mode and only the +* regular MIPS mode is supported, so that we do not attempt to emulate +* a microMIPS instruction as a regular MIPS FPU instruction. Or if +* we got switched to the regular MIPS mode and only the microMIPS mode +* is supported, so that we do not attempt to emulate a regular MIPS +* instruction that should cause an Address Error exception instead. +* For simplicity we always terminate upon an ISA mode switch. +*/ int fpu_emulator_cop1Handler (struct pt_regs *xcp,struct mips_fpu_struct *ctx,int has_fpu,void *__user *fault_addr) {
@@ -1943,6 +1972,15 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,break ;if (sig)break ; +/* +* We have to check for the ISA bit explicitly here, +* because `get_isa16_mode' may return 0 if support +* for code compression has been globally disabled, +* or otherwise we may produce the wrong signal or +* even proceed successfully where we must not. +*/ +if ((xcp->cp0_epc ^ prevepc) &0x1 ) +break ;cond_resched (); }while (xcp->cp0_epc > prevepc);
arch/parisc/include/asm/dma-mapping.h +7 -4
@@ -39,6 +39,8 @@ struct hppa_dma_ops {** flush/purge and allocate "regular" cacheable pages for everything. */ +#define DMA_ERROR_CODE (~(dma_addr_t)0) +#ifdef CONFIG_PA11 extern struct hppa_dma_ops pcxl_dma_ops;extern struct hppa_dma_ops pcx_dma_ops;
@@ -209,12 +211,13 @@ parisc_walk_tree(struct device *dev)break ; } } -BUG_ON (!dev->platform_data);return dev->platform_data; } - -#define GET_IOC (dev) (HBA_DATA(parisc_walk_tree(dev))->iommu) - + +#define GET_IOC (dev) ({ \ + void *__pdata = parisc_walk_tree(dev); \ + __pdata ? HBA_DATA(__pdata)->iommu : NULL; \ +})#ifdef CONFIG_IOMMU_CCIO struct parisc_device ;
arch/parisc/kernel/syscall_table.S +1 -1
@@ -361,7 +361,7 @@ ENTRY_SAME(ni_syscall) /* 263: reserved for vserver */ ENTRY_SAME(add_key) ENTRY_SAME(request_key) /* 265 */ - ENTRY_SAME(keyctl) + ENTRY_COMP(keyctl) ENTRY_SAME(ioprio_set) ENTRY_SAME(ioprio_get) ENTRY_SAME(inotify_init)
arch/parisc/mm/fault.c +1 -1
@@ -303,7 +303,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code,case 15 :/* Data TLB miss fault/Data page fault */ /* send SIGSEGV when outside of vma */ if (!vma || - address < vma->vm_start || address > vma->vm_end) { + address < vma->vm_start || address >= vma->vm_end) { si.si_signo =SIGSEGV ; si.si_code =SEGV_MAPERR ;break ;
arch/powerpc/include/asm/atomic.h +2 -2
@@ -497,7 +497,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)* Atomically increments @v by 1, so long as @v is non-zero. * Returns non-zero if @v was non-zero, and zero otherwise. */ -static __inline__long atomic64_inc_not_zero (atomic64_t *v) +static __inline__int atomic64_inc_not_zero (atomic64_t *v) {long t1, t2;
@@ -516,7 +516,7 @@ static __inline__ long atomic64_inc_not_zero(atomic64_t *v) : "r" (&v->counter) : "cc", "xer", "memory"); - return t1; + return t1 != 0; }#endif /* __powerpc64__ */
arch/powerpc/include/asm/reg.h +1 -1
@@ -1226,7 +1226,7 @@ " .llong 0\n" \ ".previous" \ : "=r" (rval) \ - : "i" (CPU_FTR_CELL_TB_BUG), "i" (SPRN_TBRL)); \ + : "i" (CPU_FTR_CELL_TB_BUG), "i" (SPRN_TBRL) : "cr0"); \ rval;}) #else #define mftb() ({unsigned long rval; \
arch/powerpc/lib/sstep.c +13 -0
@@ -938,6 +938,19 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) goto instr_done;#endif case 19 :/* mfcr */ +if ((instr >>20 ) &1 ) { + imm =0xf0000000UL ; +for (sh =0 ; sh <8 ; ++sh) { +if (instr & (0x80000 >> sh)) { + regs->gpr[rd] = regs->ccr & imm; +break ; + } + imm >>=4 ; + } + + goto instr_done; + } + regs->gpr[rd] = regs->ccr; regs->gpr[rd] &=0xffffffffUL ; goto instr_done;
arch/s390/include/asm/syscall.h +7 -1
@@ -54,7 +54,7 @@ static inline void syscall_set_return_value(struct task_struct *task,struct pt_regs *regs, int error, long val) { - regs->gprs[2] = error ? -error : val; + regs->gprs[2] = error ? error : val; } static inline void syscall_get_arguments(struct task_struct *task,
@@ -64,6 +64,12 @@ static inline void syscall_get_arguments(struct task_struct *task, {unsigned long mask =-1UL ; +/* +* No arguments for this syscall, there's nothing to do. +*/ +if (!n) +return ; +BUG_ON (i + n >6 );#ifdef CONFIG_COMPAT if (test_tsk_thread_flag (task,TIF_31BIT ))
arch/sparc/include/asm/head_64.h +4 -0
@@ -15,6 +15,10 @@#define PTREGS_OFF (STACK_BIAS + STACKFRAME_SZ) +#define RTRAP_PSTATE (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV|PSTATE_IE) +#define RTRAP_PSTATE_IRQOFF (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV) +#define RTRAP_PSTATE_AG_IRQOFF (PSTATE_TSO|PSTATE_PEF|PSTATE_PRIV|PSTATE_AG) +#define __CHEETAH_ID 0x003e0014#define __JALAPENO_ID 0x003e0016#define __SERRANO_ID 0x003e0022
arch/sparc/include/asm/ttable.h +4 -4
@@ -589,8 +589,8 @@ user_rtt_fill_64bit: \ restored; \ nop; nop; nop; nop; nop; nop; \ nop; nop; nop; nop; nop; \ - ba,a,pt %xcc, user_rtt_fill_fixup; \ - ba,a,pt %xcc, user_rtt_fill_fixup; \ + ba,a,pt %xcc, user_rtt_fill_fixup_dax; \ + ba,a,pt %xcc, user_rtt_fill_fixup_mna; \ ba,a,pt %xcc, user_rtt_fill_fixup;
@@ -652,8 +652,8 @@ user_rtt_fill_32bit: \ restored; \ nop; nop; nop; nop; nop; \ nop; nop; nop; \ - ba,a,pt %xcc, user_rtt_fill_fixup; \ - ba,a,pt %xcc, user_rtt_fill_fixup; \ + ba,a,pt %xcc, user_rtt_fill_fixup_dax; \ + ba,a,pt %xcc, user_rtt_fill_fixup_mna; \ ba,a,pt %xcc, user_rtt_fill_fixup;
arch/sparc/kernel/Makefile +1 -0
@@ -21,6 +21,7 @@ CFLAGS_REMOVE_perf_event.o := -pg CFLAGS_REMOVE_pcr.o := -pg endif +obj-$(CONFIG_SPARC64) += urtt_fill.o obj-$(CONFIG_SPARC32) += entry.o wof.o wuf.o obj-$(CONFIG_SPARC32) += etrap_32.o obj-$(CONFIG_SPARC32) += rtrap_32.o
arch/sparc/kernel/cherrs.S +5 -9
@@ -214,8 +214,7 @@ do_dcpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ subcc %g1, %g2, %g1 ! Next cacheline bge,pt %icc, 1b nop - ba,pt %xcc, dcpe_icpe_tl1_common - nop + ba,a,pt %xcc, dcpe_icpe_tl1_common do_dcpe_tl1_fatal: sethi %hi(1f), %g7
@@ -224,8 +223,7 @@ do_dcpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ mov 0x2, %o0 call cheetah_plus_parity_error add %sp, PTREGS_OFF, %o1 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size do_dcpe_tl1,.-do_dcpe_tl1 .globl do_icpe_tl1
@@ -259,8 +257,7 @@ do_icpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ subcc %g1, %g2, %g1 bge,pt %icc, 1b nop - ba,pt %xcc, dcpe_icpe_tl1_common - nop + ba,a,pt %xcc, dcpe_icpe_tl1_common do_icpe_tl1_fatal: sethi %hi(1f), %g7
@@ -269,8 +266,7 @@ do_icpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ mov 0x3, %o0 call cheetah_plus_parity_error add %sp, PTREGS_OFF, %o1 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size do_icpe_tl1,.-do_icpe_tl1 .type dcpe_icpe_tl1_common,#function
@@ -456,7 +452,7 @@ do_icpe_tl1_nonfatal: /* Ok we may use interrupt globals safely. */ cmp %g2, 0x63 be c_cee nop - ba,pt %xcc, c_deferred + ba,a,pt %xcc, c_deferred .size __cheetah_log_error,.-__cheetah_log_error /* Cheetah FECC trap handling, we get here from tl{0,1}_fecc
arch/sparc/kernel/entry.S +17 -0
@@ -948,7 +948,24 @@ SUN_PI_(lda [%l4] ASI_M_MMUREGS, %l5) ! read sfsr last cmp %o0, 0 bne 3f mov -ENOSYS, %o0 + + /* Syscall tracing can modify the registers. */ + ld [%sp + STACKFRAME_SZ + PT_G1], %g1 + sethi %hi(sys_call_table), %l7 + ld [%sp + STACKFRAME_SZ + PT_I0], %i0 + or %l7, %lo(sys_call_table), %l7 + ld [%sp + STACKFRAME_SZ + PT_I1], %i1 + ld [%sp + STACKFRAME_SZ + PT_I2], %i2 + ld [%sp + STACKFRAME_SZ + PT_I3], %i3 + ld [%sp + STACKFRAME_SZ + PT_I4], %i4 + ld [%sp + STACKFRAME_SZ + PT_I5], %i5 + cmp %g1, NR_syscalls + bgeu 3f + mov -ENOSYS, %o0 + + sll %g1, 2, %l4 mov %i0, %o0 + ld [%l7 + %l4], %l7 mov %i1, %o1 mov %i2, %o2 mov %i3, %o3
arch/sparc/kernel/fpu_traps.S +5 -6
@@ -100,8 +100,8 @@ fmuld %f0, %f2, %f26 faddd %f0, %f2, %f28 fmuld %f0, %f2, %f30 - b,pt %xcc, fpdis_exit - nop + ba,a,pt %xcc, fpdis_exit + 2: andcc %g5, FPRS_DU, %g0 bne,pt %icc, 3f fzero %f32
@@ -144,8 +144,8 @@ fmuld %f32, %f34, %f58 faddd %f32, %f34, %f60 fmuld %f32, %f34, %f62 - ba,pt %xcc, fpdis_exit - nop + ba,a,pt %xcc, fpdis_exit + 3: mov SECONDARY_CONTEXT, %g3 add %g6, TI_FPREGS, %g1
@@ -197,8 +197,7 @@ fp_other_bounce: call do_fpother add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size fp_other_bounce,.-fp_other_bounce .align 32
arch/sparc/kernel/head_64.S +8 -16
@@ -461,9 +461,8 @@ subcc %g3, 1, %g3 bne,pt %xcc, 41b add %g1, 1, %g1 - mov SUN4V_CHIP_SPARC64X, %g4 ba,pt %xcc, 5f - nop + mov SUN4V_CHIP_SPARC64X, %g4 49: mov SUN4V_CHIP_UNKNOWN, %g4
@@ -548,8 +547,7 @@ stxa %g0, [%g7] ASI_DMMU membar #Sync - ba,pt %xcc, sun4u_continue - nop + ba,a,pt %xcc, sun4u_continue sun4v_init: /* Set ctx 0 */
@@ -560,14 +558,12 @@ mov SECONDARY_CONTEXT, %g7 stxa %g0, [%g7] ASI_MMU membar #Sync - ba,pt %xcc, niagara_tlb_fixup - nop + ba,a,pt %xcc, niagara_tlb_fixup sun4u_continue: BRANCH_IF_ANY_CHEETAH(g1, g7, cheetah_tlb_fixup) - ba,pt %xcc, spitfire_tlb_fixup - nop + ba,a,pt %xcc, spitfire_tlb_fixup niagara_tlb_fixup: mov 3, %g2 /* Set TLB type to hypervisor. */
@@ -639,8 +635,7 @@ call hypervisor_patch_cachetlbops nop - ba,pt %xcc, tlb_fixup_done - nop + ba,a,pt %xcc, tlb_fixup_done cheetah_tlb_fixup: mov 2, %g2 /* Set TLB type to cheetah+. */
@@ -659,8 +654,7 @@ call cheetah_patch_cachetlbops nop - ba,pt %xcc, tlb_fixup_done - nop + ba,a,pt %xcc, tlb_fixup_done spitfire_tlb_fixup: /* Set TLB type to spitfire. */
@@ -782,8 +776,7 @@ call %o1 add %sp, (2047 + 128), %o0 - ba,pt %xcc, 2f - nop + ba,a,pt %xcc, 2f 1: sethi %hi(sparc64_ttable_tl0), %o0 set prom_set_trap_table_name, %g2
@@ -822,8 +815,7 @@ BRANCH_IF_ANY_CHEETAH(o2, o3, 1f) - ba,pt %xcc, 2f - nop + ba,a,pt %xcc, 2f /* Disable STICK_INT interrupts. */ 1:
arch/sparc/kernel/misctrap.S +4 -8
@@ -18,8 +18,7 @@ 109: or %g7, %lo(109b), %g7 call do_privact add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size __do_privact,.-__do_privact .type do_mna,#function
@@ -46,8 +45,7 @@ mov %l5, %o2 call mem_address_unaligned add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size do_mna,.-do_mna .type do_lddfmna,#function
@@ -65,8 +63,7 @@ mov %l5, %o2 call handle_lddfmna add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size do_lddfmna,.-do_lddfmna .type do_stdfmna,#function
@@ -84,8 +81,7 @@ mov %l5, %o2 call handle_stdfmna add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size do_stdfmna,.-do_stdfmna .type breakpoint_trap,#function
arch/sparc/kernel/pci.c +17 -0
@@ -930,6 +930,23 @@ void pcibios_set_master(struct pci_dev *dev)/* No special bus mastering setup handling */ } +#ifdef CONFIG_PCI_IOV +int pcibios_add_device (struct pci_dev *dev) +{ +struct pci_dev *pdev; + +/* Add sriov arch specific initialization here. +* Copy dev_archdata from PF to VF +*/ +if (dev->is_virtfn) { + pdev = dev->physfn; +memcpy (&dev->dev.archdata, &pdev->dev.archdata, +sizeof (struct dev_archdata )); + } +return 0 ; +} +#endif /* CONFIG_PCI_IOV */ +static int __init pcibios_init (void ) { pci_dfl_cache_line_size =64 >>2 ;
arch/sparc/kernel/rtrap_64.S +9 -48
71 lines not on this page · raw message
arch/sparc/kernel/signal32.c +30 -16
85 lines not on this page · raw message
arch/sparc/kernel/signal_32.c +26 -15
76 lines not on this page · raw message
arch/sparc/kernel/signal_64.c +21 -12
@@ -52,7 +52,7 @@ asmlinkage void sparc64_set_context(struct pt_regs *regs)unsigned char fenab;int err; -flush_user_windows (); +synchronize_user_stack ();if (get_thread_wsaved () || (((unsigned long )ucp) & (sizeof (unsigned long )-1 )) || (!__access_ok (ucp,sizeof (*ucp))))
@@ -234,6 +234,17 @@ asmlinkage void sparc64_get_context(struct pt_regs *regs) goto out; } +/* Checks if the fp is valid. We always build rt signal frames which +* are 16-byte aligned, therefore we can always enforce that the +* restore frame has that property as well. +*/ +static bool invalid_frame_pointer (void __user *fp) +{ +if (((unsigned long ) fp) &15 ) +return true; +return false; +} +struct rt_signal_frame {struct sparc_stackf ss;siginfo_t info;
@@ -246,8 +257,8 @@ struct rt_signal_frame {void do_rt_sigreturn (struct pt_regs *regs) { +unsigned long tpc, tnpc, tstate, ufp;struct rt_signal_frame __user *sf; -unsigned long tpc, tnpc, tstate;__siginfo_fpu_t __user *fpu_save;__siginfo_rwin_t __user *rwin_save;sigset_t set;
@@ -261,10 +272,16 @@ void do_rt_sigreturn(struct pt_regs *regs) (regs->u_regs [UREG_FP ] +STACK_BIAS );/* 1. Make sure we are not getting garbage from the user */ -if (((unsigned long ) sf) &3 ) +if (invalid_frame_pointer (sf)) + goto segv; + +if (get_user (ufp, &sf->regs.u_regs[UREG_FP ])) goto segv; - err =get_user (tpc, &sf->regs.tpc); +if ((ufp +STACK_BIAS ) &0x7 ) + goto segv; + + err =__get_user (tpc, &sf->regs.tpc); err |=__get_user (tnpc, &sf->regs.tnpc);if (test_thread_flag (TIF_32BIT )) { tpc &=0xffffffff ;
@@ -308,14 +325,6 @@ void do_rt_sigreturn(struct pt_regs *regs)force_sig (SIGSEGV , current); } -/* Checks if the fp is valid */ -static int invalid_frame_pointer (void __user *fp) -{ -if (((unsigned long ) fp) &15 ) -return 1 ; -return 0 ; -} -static inline void __user *get_sigframe (struct ksignal *ksig,struct pt_regs *regs,unsigned long framesize) {unsigned long sp = regs->u_regs[UREG_FP ] +STACK_BIAS ;
arch/sparc/kernel/sigutil_32.c +8 -1
@@ -48,6 +48,10 @@ int save_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)int restore_fpu_state (struct pt_regs *regs,__siginfo_fpu_t __user *fpu) {int err; + +if (((unsigned long ) fpu) &3 ) +return -EFAULT ; +#ifdef CONFIG_SMP if (test_tsk_thread_flag (current,TIF_USEDFPU )) regs->psr &= ~PSR_EF ;
@@ -97,7 +101,10 @@ int restore_rwin_state(__siginfo_rwin_t __user *rp)struct thread_info *t =current_thread_info ();int i, wsaved, err; -__get_user (wsaved, &rp->wsaved); +if (((unsigned long ) rp) &3 ) +return -EFAULT ; + +get_user (wsaved, &rp->wsaved);if (wsaved >NSWINS )return -EFAULT ;
arch/sparc/kernel/sigutil_64.c +8 -2
@@ -37,7 +37,10 @@ int restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu)unsigned long fprs;int err; - err =__get_user (fprs, &fpu->si_fprs); +if (((unsigned long ) fpu) &7 ) +return -EFAULT ; + + err =get_user (fprs, &fpu->si_fprs);fprs_write (0 ); regs->tstate &= ~TSTATE_PEF ;if (fprs &FPRS_DL )
@@ -72,7 +75,10 @@ int restore_rwin_state(__siginfo_rwin_t __user *rp)struct thread_info *t =current_thread_info ();int i, wsaved, err; -__get_user (wsaved, &rp->wsaved); +if (((unsigned long ) rp) &7 ) +return -EFAULT ; + +get_user (wsaved, &rp->wsaved);if (wsaved >NSWINS )return -EFAULT ;
arch/sparc/kernel/spiterrs.S +6 -12
@@ -85,8 +85,7 @@ ba,pt %xcc, etraptl1 rd %pc, %g7 - ba,pt %xcc, 2f - nop + ba,a,pt %xcc, 2f 1: ba,pt %xcc, etrap_irq rd %pc, %g7
@@ -100,8 +99,7 @@ mov %l5, %o2 call spitfire_access_error add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size __spitfire_access_error,.-__spitfire_access_error /* This is the trap handler entry point for ECC correctable
@@ -179,8 +177,7 @@ mov %l5, %o2 call spitfire_data_access_exception_tl1 add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size __spitfire_data_access_exception_tl1,.-__spitfire_data_access_exception_tl1 .type __spitfire_data_access_exception,#function
@@ -200,8 +197,7 @@ mov %l5, %o2 call spitfire_data_access_exception add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size __spitfire_data_access_exception,.-__spitfire_data_access_exception .type __spitfire_insn_access_exception_tl1,#function
@@ -220,8 +216,7 @@ mov %l5, %o2 call spitfire_insn_access_exception_tl1 add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size __spitfire_insn_access_exception_tl1,.-__spitfire_insn_access_exception_tl1 .type __spitfire_insn_access_exception,#function
@@ -240,6 +235,5 @@ mov %l5, %o2 call spitfire_insn_access_exception add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap .size __spitfire_insn_access_exception,.-__spitfire_insn_access_exception
arch/sparc/kernel/syscalls.S +36 -0
@@ -148,7 +148,25 @@ sys_vfork: /* Under Linux, vfork and fork are just special cases of clone. */ add %sp, PTREGS_OFF, %o0 brnz,pn %o0, 3f mov -ENOSYS, %o0 + + /* Syscall tracing can modify the registers. */ + ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 + sethi %hi(sys_call_table32), %l7 + ldx [%sp + PTREGS_OFF + PT_V9_I0], %i0 + or %l7, %lo(sys_call_table32), %l7 + ldx [%sp + PTREGS_OFF + PT_V9_I1], %i1 + ldx [%sp + PTREGS_OFF + PT_V9_I2], %i2 + ldx [%sp + PTREGS_OFF + PT_V9_I3], %i3 + ldx [%sp + PTREGS_OFF + PT_V9_I4], %i4 + ldx [%sp + PTREGS_OFF + PT_V9_I5], %i5 + + cmp %g1, NR_syscalls + bgeu,pn %xcc, 3f + mov -ENOSYS, %o0 + + sll %g1, 2, %l4 srl %i0, 0, %o0 + lduw [%l7 + %l4], %l7 srl %i4, 0, %o4 srl %i1, 0, %o1 srl %i2, 0, %o2
@@ -160,7 +178,25 @@ sys_vfork: /* Under Linux, vfork and fork are just special cases of clone. */ add %sp, PTREGS_OFF, %o0 brnz,pn %o0, 3f mov -ENOSYS, %o0 + + /* Syscall tracing can modify the registers. */ + ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 + sethi %hi(sys_call_table64), %l7 + ldx [%sp + PTREGS_OFF + PT_V9_I0], %i0 + or %l7, %lo(sys_call_table64), %l7 + ldx [%sp + PTREGS_OFF + PT_V9_I1], %i1 + ldx [%sp + PTREGS_OFF + PT_V9_I2], %i2 + ldx [%sp + PTREGS_OFF + PT_V9_I3], %i3 + ldx [%sp + PTREGS_OFF + PT_V9_I4], %i4 + ldx [%sp + PTREGS_OFF + PT_V9_I5], %i5 + + cmp %g1, NR_syscalls + bgeu,pn %xcc, 3f + mov -ENOSYS, %o0 + + sll %g1, 2, %l4 mov %i0, %o0 + lduw [%l7 + %l4], %l7 mov %i1, %o1 mov %i2, %o2 mov %i3, %o3
arch/sparc/kernel/urtt_fill.S new file +98 -0
98 lines not on this page · raw message
arch/sparc/kernel/utrap.S +1 -2
@@ -11,8 +11,7 @@ utrap_trap: /* %g3=handler,%g4=level */ mov %l4, %o1 call bad_trap add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap invoke_utrap: sllx %g3, 3, %g3
arch/sparc/kernel/vmlinux.lds.S +4 -0
@@ -33,6 +33,10 @@ ENTRY(_start) jiffies = jiffies_64; #endif +#ifdef CONFIG_SPARC64 +ASSERT((swapper_tsb == 0x0000000000408000), "Error: sparc64 early assembler too large") +#endif + SECTIONS { #ifdef CONFIG_SPARC64
arch/sparc/kernel/winfixup.S +1 -2
@@ -32,8 +32,7 @@ rd %pc, %g7 call do_sparc64_fault add %sp, PTREGS_OFF, %o0 - ba,pt %xcc, rtrap - nop + ba,a,pt %xcc, rtrap /* Be very careful about usage of the trap globals here. * You cannot touch %g5 as that has the fault information.
arch/sparc/mm/init_64.c +7 -3
@@ -2682,9 +2682,10 @@ void hugetlb_setup(struct pt_regs *regs)* the Data-TLB for huge pages. */ if (tlb_type == cheetah_plus) { +bool need_context_reload = false;unsigned long ctx; -spin_lock (&ctx_alloc_lock); +spin_lock_irq (&ctx_alloc_lock); ctx = mm->context.sparc64_ctx_val; ctx &= ~CTX_PGSZ_MASK ; ctx |=CTX_PGSZ_BASE <<CTX_PGSZ0_SHIFT ;
@@ -2703,9 +2704,12 @@ void hugetlb_setup(struct pt_regs *regs)* also executing in this address space. */ mm->context.sparc64_ctx_val = ctx; - on_each_cpu(context_reload, mm, 0); + need_context_reload = true; } -spin_unlock (&ctx_alloc_lock); +spin_unlock_irq (&ctx_alloc_lock); + +if (need_context_reload) +on_each_cpu (context_reload, mm,0 ); } }#endif
arch/x86/boot/compressed/Makefile +3 -0
@@ -34,6 +34,9 @@ $(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone ifeq ($(CONFIG_EFI_STUB), y) VMLINUX_OBJS += $(obj)/eboot.o $(obj)/efi_stub_$(BITS).o +ifeq ($(CONFIG_EFI_MIXED), y) + VMLINUX_OBJS += $(obj)/efi_thunk_$(BITS).o +endif endif $(obj)/vmlinux: $(VMLINUX_OBJS) FORCE
arch/x86/boot/compressed/efi_stub_64.S +0 -25
@@ -3,28 +3,3 @@ #include <asm/processor-flags.h> #include "../../platform/efi/efi_stub_64.S" - -#ifdef CONFIG_EFI_MIXED - .code64 - .text -ENTRY(efi64_thunk) - push %rbp - push %rbx - - subq $16, %rsp - leaq efi_exit32(%rip), %rax - movl %eax, 8(%rsp) - leaq efi_gdt64(%rip), %rax - movl %eax, 4(%rsp) - movl %eax, 2(%rax) /* Fixup the gdt base address */ - leaq efi32_boot_gdt(%rip), %rax - movl %eax, (%rsp) - - call __efi64_thunk - - addq $16, %rsp - pop %rbx - pop %rbp - ret -ENDPROC(efi64_thunk) -#endif /* CONFIG_EFI_MIXED */
arch/x86/boot/compressed/efi_thunk_64.S new file +196 -0
196 lines not on this page · raw message
arch/x86/crypto/sha1_ssse3_glue.c +2 -1
@@ -224,7 +224,8 @@ static bool __init avx_usable(void)#ifdef CONFIG_AS_AVX2 static bool __init avx2_usable (void ) { -if (avx_usable () && cpu_has_avx2 &&boot_cpu_has (X86_FEATURE_BMI1 ) && +if (false &&avx_usable () && cpu_has_avx2 && +boot_cpu_has (X86_FEATURE_BMI1 ) &&boot_cpu_has (X86_FEATURE_BMI2 ))return true;
arch/x86/include/asm/xen/hypercall.h +3 -0
@@ -43,6 +43,7 @@#include <asm/page.h> #include <asm/pgtable.h> +#include <asm/smap.h> #include <xen/interface/xen.h> #include <xen/interface/sched.h>
@@ -213,10 +214,12 @@ privcmd_call(unsigned call, __HYPERCALL_DECLS;__HYPERCALL_5ARG (a1, a2, a3, a4, a5); +stac (); asmvolatile ("call *%[call]" : __HYPERCALL_5PARAM : [call]"a" (&hypercall_page[call]) : __HYPERCALL_CLOBBER5); +clac ();return (long )__res; }
arch/x86/include/uapi/asm/msr-index.h +2 -0
@@ -298,6 +298,8 @@#define MSR_IA32_TSC_ADJUST 0x0000003b#define MSR_IA32_BNDCFGS 0x00000d90 +#define MSR_IA32_BNDCFGS_RSVD 0x00000ffc +#define FEATURE_CONTROL_LOCKED (1<<0)#define FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX (1<<1)#define FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX (1<<2)
arch/x86/kernel/cpu/perf_event_intel.c +6 -6
@@ -2642,13 +2642,13 @@ __init int intel_pmu_init(void)* counter, so do not extend mask to generic counters */ for_each_event_constraint (c, x86_pmu.event_constraints) { -if (c->cmask !=FIXED_EVENT_FLAGS - || c->idxmsk64 ==INTEL_PMC_MSK_FIXED_REF_CYCLES ) { -continue ; +if (c->cmask ==FIXED_EVENT_FLAGS + && c->idxmsk64 !=INTEL_PMC_MSK_FIXED_REF_CYCLES ) { + c->idxmsk64 |= (1ULL << x86_pmu.num_counters) -1 ; } - - c->idxmsk64 |= (1ULL << x86_pmu.num_counters) -1 ; - c->weight += x86_pmu.num_counters; + c->idxmsk64 &= + ~(~0ULL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed)); + c->weight =hweight64 (c->idxmsk64); } }
arch/x86/kernel/nmi_selftest.c +1 -1
@@ -78,7 +78,7 @@ static void __init test_nmi_ipi(struct cpumask *mask)/* Don't wait longer than a second */ timeout =USEC_PER_SEC ; -while (!cpumask_empty (mask) && timeout--) +while (!cpumask_empty (mask) && --timeout)udelay (1 );/* What happens if we timeout, do we still unregister?? */
arch/x86/kvm/cpuid.h +9 -0
@@ -95,4 +95,13 @@ static inline bool guest_cpuid_has_gbpages(struct kvm_vcpu *vcpu) best =kvm_find_cpuid_entry (vcpu,0x80000001 ,0 ); return best && (best->edx & bit(X86_FEATURE_GBPAGES)); } + +static inline bool guest_cpuid_has_mpx (struct kvm_vcpu *vcpu) +{ +struct kvm_cpuid_entry2 *best; + + best =kvm_find_cpuid_entry (vcpu,7 ,0 ); +return best && (best->ebx &bit (X86_FEATURE_MPX )); +} +#endif
arch/x86/kvm/vmx.c +13 -3
@@ -2514,7 +2514,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata) data =vmcs_readl (GUEST_SYSENTER_ESP );break ;case MSR_IA32_BNDCFGS : -if (!vmx_mpx_supported ()) +if (!vmx_mpx_supported () || !guest_cpuid_has_mpx (vcpu))return 1 ; data =vmcs_read64 (GUEST_BNDCFGS );break ;
@@ -2587,7 +2587,10 @@ static int vmx_set_msr(struct kvm_vcpu *vcpu, struct msr_data *msr_info)vmcs_writel (GUEST_SYSENTER_ESP , data);break ;case MSR_IA32_BNDCFGS : -if (!vmx_mpx_supported ()) +if (!vmx_mpx_supported () || !guest_cpuid_has_mpx (vcpu)) +return 1 ; +if (is_noncanonical_address (data &PAGE_MASK ) || + (data &MSR_IA32_BNDCFGS_RSVD ))return 1 ;vmcs_write64 (GUEST_BNDCFGS , data);break ;
@@ -8045,6 +8048,14 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) exec_control &= ~CPU_BASED_VIRTUAL_NMI_PENDING ; exec_control &= ~CPU_BASED_TPR_SHADOW ; exec_control |= vmcs12->cpu_based_vm_exec_control; + +if (!(exec_control &CPU_BASED_TPR_SHADOW )) { +#ifdef CONFIG_X86_64 + exec_control |=CPU_BASED_CR8_LOAD_EXITING | +CPU_BASED_CR8_STORE_EXITING ; +#endif + } +/* * Merging of IO and MSR bitmaps not currently supported. * Rather, exit every time.
@@ -9048,7 +9059,6 @@ static int __init vmx_init(void)vmx_disable_intercept_for_msr (MSR_IA32_SYSENTER_CS , false);vmx_disable_intercept_for_msr (MSR_IA32_SYSENTER_ESP , false);vmx_disable_intercept_for_msr (MSR_IA32_SYSENTER_EIP , false); -vmx_disable_intercept_for_msr (MSR_IA32_BNDCFGS , true);memcpy (vmx_msr_bitmap_legacy_x2apic, vmx_msr_bitmap_legacy,PAGE_SIZE );
arch/x86/pci/fixup.c +45 -7
60 lines not on this page · raw message
arch/x86/platform/efi/efi_stub_64.S +0 -161
167 lines not on this page · raw message
arch/x86/platform/efi/efi_thunk_64.S +104 -17
141 lines not on this page · raw message
drivers/acpi/ec.c +2 -2
@@ -299,11 +299,11 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec,/* following two actions should be kept atomic */ ec->curr = t;start_transaction (ec); +if (ec->curr->command ==ACPI_EC_COMMAND_QUERY ) +clear_bit (EC_FLAGS_QUERY_PENDING , &ec->flags);spin_unlock_irqrestore (&ec->lock, tmp); ret =ec_poll (ec);spin_lock_irqsave (&ec->lock, tmp); -if (ec->curr->command ==ACPI_EC_COMMAND_QUERY ) -clear_bit (EC_FLAGS_QUERY_PENDING , &ec->flags); ec->curr =NULL ;spin_unlock_irqrestore (&ec->lock, tmp);return ret;
drivers/base/power/domain.c +2 -2
@@ -1704,7 +1704,7 @@ int pm_genpd_add_subdomain_names(const char *master_name,int pm_genpd_remove_subdomain (struct generic_pm_domain *genpd,struct generic_pm_domain *subdomain) { -struct gpd_link *link; +struct gpd_link *l, *link;int ret = -EINVAL ;if (IS_ERR_OR_NULL (genpd) ||IS_ERR_OR_NULL (subdomain))
@@ -1713,7 +1713,7 @@ int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd, start:genpd_acquire_lock (genpd); -list_for_each_entry (link, &genpd->master_links, master_node) { +list_for_each_entry_safe (link, l, &genpd->master_links, master_node) {if (link->slave != subdomain)continue ;
drivers/base/power/sysfs.c +2 -0
@@ -272,6 +272,8 @@ static ssize_t pm_qos_latency_tolerance_store(struct device *dev, value =PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT ; else if (!strcmp(buf, "any") || !strcmp(buf, "any\n")) value =PM_QOS_LATENCY_ANY ; + else + return -EINVAL; } ret =dev_pm_qos_update_user_latency_tolerance (dev, value);return ret <0 ? ret : n;
drivers/char/tpm/tpm-sysfs.c +2 -1
@@ -54,9 +54,10 @@ static ssize_t pubek_show(struct device *dev, struct device_attribute *attr,ssize_t err;int i, rc;char *str = buf; -struct tpm_chip *chip =dev_get_drvdata (dev); +memset (&tpm_cmd,0 ,sizeof (tpm_cmd)); + tpm_cmd.header.in = tpm_readpubek_header; err =transmit_cmd (chip, &tpm_cmd,READ_PUBEK_RESULT_SIZE ,"attempting to read the PUBEK" );
drivers/crypto/atmel-sha.c +3 -1
@@ -957,7 +957,9 @@ static int atmel_sha_finup(struct ahash_request *req) ctx->flags |=SHA_FLAGS_FINUP ; err1 =atmel_sha_update (req); -if (err1 == -EINPROGRESS || err1 == -EBUSY ) +if (err1 == -EINPROGRESS || + (err1 == -EBUSY && (ahash_request_flags (req) & +CRYPTO_TFM_REQ_MAY_BACKLOG )))return err1;/*
drivers/crypto/caam/caamhash.c +1 -1
@@ -478,7 +478,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, const u8 *key_in, ret =caam_jr_enqueue (jrdev, desc, split_key_done, &result);if (!ret) {/* in progress */ -wait_for_completion_interruptible (&result.completion); +wait_for_completion (&result.completion); ret = result.err;#ifdef DEBUG print_hex_dump(KERN_ERR,
drivers/crypto/caam/key_gen.c +1 -1
@@ -103,7 +103,7 @@ int gen_split_key(struct device *jrdev, u8 *key_out, int split_key_len, ret =caam_jr_enqueue (jrdev, desc, split_key_done, &result);if (!ret) {/* in progress */ -wait_for_completion_interruptible (&result.completion); +wait_for_completion (&result.completion); ret = result.err;#ifdef DEBUG print_hex_dump(KERN_ERR, "ctx.key@"__stringify(__LINE__)": ",
drivers/crypto/talitos.c +6 -1
@@ -634,7 +634,7 @@ static void talitos_unregister_rng(struct device *dev)* crypto alg */ #define TALITOS_CRA_PRIORITY 3000 -#define TALITOS_MAX_KEY_SIZE 96 +#define TALITOS_MAX_KEY_SIZE (AES_MAX_KEY_SIZE + SHA512_BLOCK_SIZE)#define TALITOS_MAX_IV_LENGTH 16/* max of AES_BLOCK_SIZE, DES3_EDE_BLOCK_SIZE */ #define MD5_BLOCK_SIZE 64
@@ -1324,6 +1324,11 @@ static int ablkcipher_setkey(struct crypto_ablkcipher *cipher, {struct talitos_ctx *ctx =crypto_ablkcipher_ctx (cipher); +if (keylen >TALITOS_MAX_KEY_SIZE ) { +crypto_ablkcipher_set_flags (cipher,CRYPTO_TFM_RES_BAD_KEY_LEN ); +return -EINVAL ; + } +memcpy (&ctx->key, key, keylen); ctx->keylen = keylen;
drivers/gpu/drm/drm_irq.c +2 -1
@@ -973,7 +973,8 @@ EXPORT_SYMBOL(drm_crtc_vblank_get);*/ void drm_vblank_put (struct drm_device *dev,int crtc) { -BUG_ON (atomic_read (&dev->vblank[crtc].refcount) ==0 ); +if (WARN_ON (atomic_read (&dev->vblank[crtc].refcount) ==0 )) +return ;/* Last user schedules interrupt disable */ if (atomic_dec_and_test(&dev->vblank[crtc].refcount) &&
drivers/gpu/drm/i915/i915_dma.c +5 -3
@@ -1747,10 +1747,12 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)* and the registers being closely associated. * * According to chipset errata, on the 965GM, MSI interrupts may -* be lost or delayed, but we use them anyways to avoid -* stuck interrupts on some machines. +* be lost or delayed, and was defeatured. MSI interrupts seem to +* get lost on g4x as well, and interrupt delivery seems to stay +* properly dead afterwards. So we'll just disable them for all +* pre-gen5 chipsets. */ -if (!IS_I945G (dev) && !IS_I945GM (dev)) +if (INTEL_INFO (dev)->gen >=5 )pci_enable_msi (dev->pdev);intel_device_info_runtime_init (dev);
drivers/gpu/drm/i915/intel_display.c +10 -1
@@ -369,7 +369,7 @@ static void vlv_clock(int refclk, intel_clock_t *clock)/** * Returns whether any output on the specified pipe is of the specified type */ -static bool intel_pipe_has_type (struct drm_crtc *crtc,int type) +bool intel_pipe_has_type (struct drm_crtc *crtc,int type) {struct drm_device *dev = crtc->dev;struct intel_encoder *encoder;
@@ -10313,6 +10313,15 @@ static void update_scanline_offset(struct intel_crtc *crtc)* type. For DP ports it behaves like most other platforms, but on HDMI * there's an extra 1 line difference. So we need to add two instead of * one to the value. +* +* On VLV/CHV DSI the scanline counter would appear to increment +* approx. 1/3 of a scanline before start of vblank. Unfortunately +* that means we can't tell whether we're in vblank or not while +* we're on that particular line. We must still set scanline_offset +* to 1 so that the vblank timestamps come out correct when we query +* the scanline counter from within the vblank interrupt handler. +* However if queried just before the start of vblank we'll get an +* answer that's slightly in the future. */ if (IS_GEN2 (dev)) {const struct drm_display_mode *mode = &crtc->config.adjusted_mode;
drivers/gpu/drm/i915/intel_drv.h +1 -0
@@ -721,6 +721,7 @@ void intel_ddi_get_config(struct intel_encoder *encoder,const char *intel_output_name (int output);bool intel_has_pending_fb_unpin (struct drm_device *dev);int intel_pch_rawclk (struct drm_device *dev); +bool intel_pipe_has_type (struct drm_crtc *crtc,int type);int valleyview_cur_cdclk (struct drm_i915_private *dev_priv);void intel_mark_busy (struct drm_device *dev); void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
drivers/gpu/drm/i915/intel_sprite.c +20 -0
@@ -53,6 +53,8 @@ static bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vblenum pipe pipe = crtc->pipe;long timeout =msecs_to_jiffies_timeout (1 );int scanline, min, max, vblank_start; +bool need_vlv_dsi_wa = (IS_VALLEYVIEW (dev) ||IS_CHERRYVIEW (dev)) && +intel_pipe_has_type (&crtc->base,INTEL_OUTPUT_DSI );DEFINE_WAIT (wait);WARN_ON (!drm_modeset_is_locked (&crtc->base.mutex));
@@ -104,6 +106,24 @@ static bool intel_pipe_update_start(struct intel_crtc *crtc, uint32_t *start_vbldrm_vblank_put (dev, pipe); +/* +* On VLV/CHV DSI the scanline counter would appear to +* increment approx. 1/3 of a scanline before start of vblank. +* The registers still get latched at start of vblank however. +* This means we must not write any registers on the first +* line of vblank (since not the whole line is actually in +* vblank). And unfortunately we can't use the interrupt to +* wait here since it will fire too soon. We could use the +* frame start interrupt instead since it will fire after the +* critical scanline, but that would require more changes +* in the interrupt code. So for now we'll just do the nasty +* thing and poll for the bad scanline to pass us by. +* +* FIXME figure out if BXT+ DSI suffers from this as well +*/ +while (need_vlv_dsi_wa && scanline == vblank_start) + scanline =intel_get_crtc_scanline (crtc); + *start_vbl_count = dev->driver->get_vblank_counter (dev, pipe);trace_i915_pipe_update_vblank_evaded (crtc, min, max, *start_vbl_count);
drivers/gpu/drm/msm/hdmi/hdmi_audio.c +3 -3
@@ -182,10 +182,10 @@ int hdmi_audio_update(struct hdmi *hdmi)/* configure infoframe: */ hdmi_audio_infoframe_pack (info, buf,sizeof (buf));hdmi_write (hdmi,REG_HDMI_AUDIO_INFO0 , - (buf[3 ] <<0 ) || (buf[4 ] <<8 ) || - (buf[5 ] <<16 ) || (buf[6 ] <<24 )); + (buf[3 ] <<0 ) | (buf[4 ] <<8 ) | + (buf[5 ] <<16 ) | (buf[6 ] <<24 ));hdmi_write (hdmi,REG_HDMI_AUDIO_INFO1 , - (buf[7 ] <<0 ) || (buf[8 ] <<8 )); + (buf[7 ] <<0 ) | (buf[8 ] <<8 ));hdmi_write (hdmi,REG_HDMI_GC ,0 );
drivers/gpu/drm/radeon/atombios_encoders.c +11 -2
@@ -29,6 +29,7 @@#include "radeon.h" #include "atom.h" #include <linux/backlight.h> +#include <linux/dmi.h> extern int atom_debug;
@@ -2095,9 +2096,17 @@ static int radeon_atom_pick_dig_encoder(struct drm_encoder *encoder) } } -/* on DCE32 and encoder can driver any block so just crtc id */ +/* +* On DCE32 any encoder can drive any block so usually just use crtc id, +* but Apple thinks different at least on iMac10,1, so there use linkb, +* otherwise the internal eDP panel will stay dark. +*/ if (ASIC_IS_DCE32 (rdev)) { -return radeon_crtc->crtc_id; +if (dmi_match (DMI_PRODUCT_NAME ,"iMac10,1" )) +return (dig->linkb) ?1 :0 ; +else +return radeon_crtc->crtc_id; + }/* on DCE3 - LVTMA can only be driven by DIGB */
drivers/i2c/busses/i2c-cadence.c +3 -3
@@ -340,14 +340,14 @@ static void cdns_i2c_mrecv(struct cdns_i2c *id) CDNS_I2C_XFER_SIZE_OFFSET); else cdns_i2c_writereg(id->recv_count, CDNS_I2C_XFER_SIZE_OFFSET); +/* Set the slave address in address register - triggers operation */ +cdns_i2c_writereg (id->p_msg->addr &CDNS_I2C_ADDR_MASK , +CDNS_I2C_ADDR_OFFSET );/* Clear the bus hold flag if bytes to receive is less than FIFO size */ if (!id->bus_hold_flag && ((id->p_msg->flags &I2C_M_RECV_LEN ) !=I2C_M_RECV_LEN ) && (id->recv_count <=CDNS_I2C_FIFO_DEPTH ))cdns_i2c_clear_bus_hold (id); -/* Set the slave address in address register - triggers operation */ -cdns_i2c_writereg (id->p_msg->addr &CDNS_I2C_ADDR_MASK , -CDNS_I2C_ADDR_OFFSET );cdns_i2c_writereg (CDNS_I2C_ENABLED_INTR_MASK ,CDNS_I2C_IER_OFFSET ); }
drivers/iio/accel/st_accel_spi.c +0 -4
@@ -48,15 +48,11 @@ static int st_accel_spi_remove(struct spi_device *spi) }static const struct spi_device_id st_accel_id_table[] = { - {LSM303DLH_ACCEL_DEV_NAME }, - {LSM303DLHC_ACCEL_DEV_NAME }, {LIS3DH_ACCEL_DEV_NAME }, {LSM330D_ACCEL_DEV_NAME }, {LSM330DL_ACCEL_DEV_NAME }, {LSM330DLC_ACCEL_DEV_NAME }, {LIS331DLH_ACCEL_DEV_NAME }, - {LSM303DL_ACCEL_DEV_NAME }, - {LSM303DLM_ACCEL_DEV_NAME }, {LSM330_ACCEL_DEV_NAME }, {}, };
drivers/iio/magnetometer/st_magn_spi.c +0 -2
@@ -49,8 +49,6 @@ static int st_magn_spi_remove(struct spi_device *spi) }static const struct spi_device_id st_magn_id_table[] = { - {LSM303DLHC_MAGN_DEV_NAME }, - {LSM303DLM_MAGN_DEV_NAME }, {LIS3MDL_MAGN_DEV_NAME }, {}, };
drivers/infiniband/core/cache.c +25 -36
163 lines not on this page · raw message
drivers/infiniband/core/device.c +7 -19
@@ -151,18 +151,6 @@ static int alloc_name(char *name)return 0 ; } -static int start_port (struct ib_device *device) -{ -return (device->node_type ==RDMA_NODE_IB_SWITCH ) ?0 :1 ; -} - - -static int end_port (struct ib_device *device) -{ -return (device->node_type ==RDMA_NODE_IB_SWITCH ) ? -0 : device->phys_port_cnt; -} -/** * ib_alloc_device - allocate an IB device struct * @size:size of structure to allocate
@@ -232,7 +220,7 @@ static int read_port_table_lengths(struct ib_device *device)if (!tprops) goto out; - num_ports =end_port (device) -start_port (device) +1 ; + num_ports =rdma_end_port (device) -rdma_start_port (device) +1 ; device->pkey_tbl_len =kmalloc (sizeof *device->pkey_tbl_len * num_ports,GFP_KERNEL );
@@ -242,7 +230,7 @@ static int read_port_table_lengths(struct ib_device *device) goto err;for (port_index =0 ; port_index < num_ports; ++port_index) { - ret =ib_query_port (device, port_index +start_port (device), + ret =ib_query_port (device, port_index +rdma_start_port (device), tprops);if (ret) goto err;
@@ -575,7 +563,7 @@ int ib_query_port(struct ib_device *device, u8 port_num, struct ib_port_attr *port_attr) { -if (port_num <start_port (device) || port_num >end_port (device)) +if (!rdma_is_port_valid (device, port_num))return -EINVAL ;return device->query_port (device, port_num, port_attr);
@@ -653,7 +641,7 @@ int ib_modify_port(struct ib_device *device,if (!device->modify_port)return -ENOSYS ; -if (port_num <start_port (device) || port_num >end_port (device)) +if (!rdma_is_port_valid (device, port_num))return -EINVAL ; return device->modify_port(device, port_num, port_modify_mask,
@@ -676,8 +664,8 @@ int ib_find_gid(struct ib_device *device, union ib_gid *gid,union ib_gid tmp_gid;int ret, port, i; -for (port =start_port (device); port <=end_port (device); ++port) { -for (i =0 ; i < device->gid_tbl_len[port -start_port (device)]; ++i) { +for (port =rdma_start_port (device); port <=rdma_end_port (device); ++port) { +for (i =0 ; i < device->gid_tbl_len[port -rdma_start_port (device)]; ++i) { ret =ib_query_gid (device, port, i, &tmp_gid);if (ret)return ret;
@@ -709,7 +697,7 @@ int ib_find_pkey(struct ib_device *device,u16 tmp_pkey;int partial_ix =-1 ; -for (i =0 ; i < device->pkey_tbl_len[port_num -start_port (device)]; ++i) { +for (i =0 ; i < device->pkey_tbl_len[port_num -rdma_start_port (device)]; ++i) { ret =ib_query_pkey (device, port_num, i, &tmp_pkey);if (ret)return ret;
drivers/infiniband/core/uverbs_cmd.c +9 -0
@@ -1915,6 +1915,11 @@ ssize_t ib_uverbs_modify_qp(struct ib_uverbs_file *file, goto out; } +if (!rdma_is_port_valid (qp->device, cmd.port_num)) { + ret = -EINVAL ; + goto release_qp; + } + attr->qp_state = cmd.qp_state; attr->cur_qp_state = cmd.cur_qp_state; attr->path_mtu = cmd.path_mtu;
@@ -2397,6 +2402,7 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file, const char __user *buf, int in_len, int out_len) { + struct ib_device *ib_dev = file->device->ib_dev;struct ib_uverbs_create_ah cmd;struct ib_uverbs_create_ah_resp resp;struct ib_uobject *uobj;
@@ -2411,6 +2417,9 @@ ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file,if (copy_from_user (&cmd, buf,sizeof cmd))return -EFAULT ; +if (!rdma_is_port_valid (ib_dev, cmd.attr.port_num)) +return -EINVAL ; + uobj =kmalloc (sizeof *uobj,GFP_KERNEL );if (!uobj)return -ENOMEM ;
drivers/input/serio/i8042.c +9 -3
@@ -397,8 +397,10 @@ static int i8042_start(struct serio *serio) {struct i8042_port *port = serio->port_data; +spin_lock_irq (&i8042_lock); port->exists = true; -mb (); +spin_unlock_irq (&i8042_lock); +return 0 ; }
@@ -411,16 +413,20 @@ static void i8042_stop(struct serio *serio) {struct i8042_port *port = serio->port_data; +spin_lock_irq (&i8042_lock); port->exists = false; + port->serio =NULL ; +spin_unlock_irq (&i8042_lock);/* +* We need to make sure that interrupt handler finishes using +* our serio port before we return from this function. * We synchronize with both AUX and KBD IRQs because there is * a (very unlikely) chance that AUX IRQ is raised for KBD port * and vice versa. */ synchronize_irq (I8042_AUX_IRQ );synchronize_irq (I8042_KBD_IRQ ); - port->serio =NULL ; }/*
@@ -537,7 +543,7 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id)spin_unlock_irqrestore (&i8042_lock, flags); -if (likely (port->exists && !filtered)) +if (likely (serio && !filtered))serio_interrupt (serio, data, dfl); out:
drivers/input/touchscreen/ads7846.c +6 -2
@@ -668,18 +668,22 @@ static int ads7846_no_filter(void *ads, int data_idx, int *val)static int ads7846_get_value (struct ads7846 *ts,struct spi_message *m) { +int value;struct spi_transfer *t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list);if (ts->model ==7845 ) { -return be16_to_cpup ((__be16 *)&(((char *)t->rx_buf)[1 ])) >>3 ; + value =be16_to_cpup ((__be16 *)&(((char *)t->rx_buf)[1 ])); }else {/* * adjust: on-wire is a must-ignore bit, a BE12 value, then * padding; built from two 8 bit values written msb-first. */ -return be16_to_cpup ((__be16 *)t->rx_buf) >>3 ; + value =be16_to_cpup ((__be16 *)t->rx_buf); } + +/* enforce ADC output is 12 bits width */ +return (value >>3 ) &0xfff ; }static void ads7846_update_value (struct spi_message *m,int val)
drivers/macintosh/therm_windtunnel.c +1 -0
@@ -408,6 +408,7 @@ static const struct i2c_device_id therm_windtunnel_id[] = { { "therm_adm1030", adm1030 }, { } }; +MODULE_DEVICE_TABLE (i2c, therm_windtunnel_id);static int do_probe (struct i2c_client *cl,const struct i2c_device_id *id)
drivers/md/dm.c +55 -0
73 lines not on this page · raw message
drivers/md/raid1.c +4 -1
@@ -1122,13 +1122,16 @@ static void make_request(struct mddev *mddev, struct bio * bio)*/ DEFINE_WAIT (w);for (;;) { -flush_signals (current); +sigset_t full, old;prepare_to_wait (&conf->wait_barrier, &w,TASK_INTERRUPTIBLE );if (bio_end_sector (bio) <= mddev->suspend_lo || bio->bi_iter.bi_sector >= mddev->suspend_hi)break ; +sigfillset (&full); +sigprocmask (SIG_BLOCK , &full, &old);schedule (); +sigprocmask (SIG_SETMASK , &old,NULL ); }finish_wait (&conf->wait_barrier, &w); }
drivers/md/raid5.c +4 -1
@@ -4721,12 +4721,15 @@ static void make_request(struct mddev *mddev, struct bio * bi)* userspace, we want an interruptible * wait. */ -flush_signals (current);prepare_to_wait (&conf->wait_for_overlap, &w,TASK_INTERRUPTIBLE );if (logical_sector >= mddev->suspend_lo && logical_sector < mddev->suspend_hi) { +sigset_t full, old; +sigfillset (&full); +sigprocmask (SIG_BLOCK , &full, &old);schedule ();
Lines of this file are not shown. View the raw message.
drivers/media/pci/saa7164/saa7164-buffer.c +2 -2
Lines of this file are not shown. View the raw message.
drivers/media/pci/saa7164/saa7164-bus.c +51 -45
96 lines not on this page · raw message
drivers/media/pci/saa7164/saa7164-core.c +6 -7
Lines of this file are not shown. View the raw message.
drivers/media/pci/saa7164/saa7164-types.h +2 -2
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/e1000e/netdev.c +32 -1
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/ath9k/ar9003_phy.c +0 -2
Lines of this file are not shown. View the raw message.
drivers/net/wireless/iwlwifi/mvm/mac80211.c +25 -7
Lines of this file are not shown. View the raw message.
drivers/net/wireless/mwifiex/cfg80211.c +19 -18
Lines of this file are not shown. View the raw message.
drivers/net/wireless/mwifiex/uap_cmd.c +0 -22
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_configfs.c +3 -0
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_core.h +9 -0
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_nego.c +4 -2
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_parameters.c +28 -13
41 lines not on this page · raw message
drivers/target/iscsi/iscsi_target_parameters.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_tpg.c +19 -0
Lines of this file are not shown. View the raw message.
drivers/target/iscsi/iscsi_target_tpg.h +1 -0
Lines of this file are not shown. View the raw message.
drivers/vfio/vfio.c +45 -1
46 lines not on this page · raw message
fs/cifs/connect.c +78 -2
80 lines not on this page · raw message
fs/ext2/acl.c +29 -14
43 lines not on this page · raw message
kernel/sched/core.c +75 -27
102 lines not on this page · raw message
net/bluetooth/l2cap_core.c +43 -37
80 lines not on this page · raw message
tools/lib/lockdep/uinclude/linux/lockdep.h +1 -1
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.