Linux 4.4.134
Greg KH
maintainerI'm announcing the release of the 4.4.134 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/device-mapper/thin-provisioning.txt | 8 Makefile | 2 arch/alpha/include/asm/xchg.h | 30 ++- arch/arc/Kconfig | 1 arch/arm/boot/dts/socfpga.dtsi | 2 arch/arm/include/asm/vdso.h | 2 arch/arm/kernel/vdso.c | 12 - arch/arm/mach-omap1/clock.c | 6 arch/arm/mach-omap2/pm.c | 4 arch/arm/mach-omap2/timer.c | 19 + arch/arm/plat-omap/dmtimer.c | 7 arch/arm64/include/asm/spinlock.h | 4 arch/m68k/coldfire/device.c | 12 + arch/mips/cavium-octeon/octeon-irq.c | 10 - arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 2 arch/mips/kernel/ptrace.c | 22 +- arch/mips/kernel/ptrace32.c | 4 arch/mips/kvm/mips.c | 2 arch/mips/txx9/rbtx4939/setup.c | 4 arch/powerpc/include/asm/irq_work.h | 1 arch/powerpc/kvm/book3s_hv.c | 12 - arch/powerpc/mm/numa.c | 78 +++++++- arch/powerpc/net/bpf_jit_comp.c | 3 arch/powerpc/perf/core-book3s.c | 25 ++ arch/powerpc/sysdev/mpic.c | 2 arch/s390/include/asm/nospec-insn.h | 13 + arch/s390/kernel/asm-offsets.c | 1 arch/s390/kernel/mcount.S | 14 - arch/sh/kernel/entry-common.S | 2 arch/sparc/include/asm/atomic_64.h | 6 arch/x86/kernel/apic/apic.c | 2 arch/x86/kernel/devicetree.c | 21 +- arch/x86/kernel/smpboot.c | 1 arch/x86/kvm/lapic.c | 10 - arch/x86/kvm/vmx.c | 20 +- arch/x86/kvm/x86.c | 7 arch/x86/mm/pgtable.c | 9 arch/x86/power/hibernate_32.c | 2 arch/x86/power/hibernate_64.c | 2 drivers/acpi/acpi_pad.c | 3 drivers/acpi/acpica/evevent.c | 9 drivers/acpi/acpica/nseval.c | 8 drivers/acpi/processor_perflib.c | 2 drivers/ata/libata-core.c | 6 drivers/block/paride/pcd.c | 2 drivers/bluetooth/btusb.c | 6 drivers/cdrom/cdrom.c | 3 drivers/cdrom/gdrom.c | 3 drivers/char/hw_random/stm32-rng.c | 9 drivers/char/ipmi/ipmi_powernv.c | 5 drivers/char/ipmi/ipmi_ssif.c | 4 drivers/clk/clk.c | 3 drivers/clk/rockchip/clk-mmc-phase.c | 23 ++ drivers/clk/samsung/clk-exynos3250.c | 4 drivers/clk/samsung/clk-exynos5250.c | 8 drivers/clk/samsung/clk-exynos5260.c | 2 drivers/clk/samsung/clk-exynos5433.c | 12 - drivers/clk/samsung/clk-s3c2410.c | 16 - drivers/clocksource/fsl_ftm_timer.c | 2 drivers/cpufreq/cppc_cpufreq.c | 23 +- drivers/crypto/sunxi-ss/sun4i-ss-core.c | 1 drivers/dma/pl330.c | 6 drivers/dma/sh/rcar-dmac.c | 2 drivers/firewire/ohci.c | 8 drivers/firmware/dmi_scan.c | 22 -- drivers/gpu/drm/exynos/regs-fimc.h | 2 drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 7 drivers/gpu/drm/virtio/virtgpu_ioctl.c | 17 + drivers/hid/hid-roccat-kovaplus.c | 2 drivers/hwmon/nct6775.c | 10 - drivers/hwmon/pmbus/adm1275.c | 4 drivers/hwmon/pmbus/max8688.c | 2 drivers/i2c/busses/i2c-mv64xxx.c | 8 drivers/ide/ide-cd.c | 2 drivers/infiniband/core/ucma.c | 2 drivers/infiniband/hw/mlx5/qp.c | 5 drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 drivers/irqchip/irq-gic-v3.c | 2 drivers/md/bcache/alloc.c | 4 drivers/md/bcache/bcache.h | 2 drivers/md/bcache/btree.c | 9 drivers/md/bcache/request.c | 2 drivers/md/bcache/super.c | 23 +- drivers/md/bcache/sysfs.c | 11 - drivers/md/bcache/writeback.c | 27 ++ drivers/md/raid1.c | 11 + drivers/md/raid10.c | 6 drivers/md/raid5.c | 7 drivers/media/dvb-core/dmxdev.c | 2 drivers/media/pci/cx23885/cx23885-cards.c | 4 drivers/media/pci/cx23885/cx23885-core.c | 10 + drivers/media/pci/cx25821/cx25821-core.c | 7 drivers/media/platform/s3c-camif/camif-capture.c | 7 drivers/media/usb/em28xx/em28xx.h | 2 drivers/message/fusion/mptctl.c | 2 drivers/mmc/host/sdhci-iproc.c | 30 ++- drivers/net/ethernet/broadcom/bgmac.c | 3 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 drivers/net/ethernet/cisco/enic/enic_main.c | 10 - drivers/net/ethernet/freescale/gianfar.c | 7 drivers/net/ethernet/intel/e1000e/ich8lan.c | 2 drivers/net/ethernet/intel/e1000e/mac.c | 2 drivers/net/ethernet/intel/e1000e/netdev.c | 4 drivers/net/ethernet/marvell/mvneta.c | 1 drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 2 drivers/net/ethernet/sun/sunvnet.c | 2 drivers/net/phy/dp83640.c | 18 + drivers/net/usb/qmi_wwan.c | 5 drivers/net/usb/r8152.c | 2 drivers/net/usb/smsc75xx.c | 7 drivers/net/virtio_net.c | 2 drivers/net/wireless/ath/ath10k/mac.c | 10 + drivers/net/wireless/mac80211_hwsim.c | 4 drivers/net/xen-netfront.c | 46 ++-- drivers/ntb/ntb_transport.c | 3 drivers/nvme/host/pci.c | 5 drivers/parisc/lba_pci.c | 20 +- drivers/pci/pci-driver.c | 17 + drivers/pci/quirks.c | 5 drivers/regulator/of_regulator.c | 1 drivers/rtc/hctosys.c | 5 drivers/rtc/rtc-snvs.c | 15 + drivers/rtc/rtc-tx4939.c | 6 drivers/s390/cio/device_fsm.c | 7 drivers/s390/cio/io_sch.h | 1 drivers/scsi/aacraid/commsup.c | 4 drivers/scsi/aacraid/linit.c | 5 drivers/scsi/arm/fas216.c | 2 drivers/scsi/bnx2fc/bnx2fc_io.c | 1 drivers/scsi/lpfc/lpfc_attr.c | 5 drivers/scsi/lpfc/lpfc_hbadisc.c | 5 drivers/scsi/lpfc/lpfc_sli.c | 2 drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 drivers/scsi/qla2xxx/qla_isr.c | 6 drivers/scsi/qla4xxx/ql4_def.h | 2 drivers/scsi/qla4xxx/ql4_os.c | 46 ++++ drivers/scsi/sd.c | 3 drivers/scsi/sr.c | 21 +- drivers/scsi/storvsc_drv.c | 2 drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 drivers/scsi/ufs/ufshcd.c | 2 drivers/staging/rtl8192u/r8192U_core.c | 2 drivers/tty/serial/arc_uart.c | 5 drivers/tty/serial/fsl_lpuart.c | 4 drivers/tty/serial/imx.c | 6 drivers/tty/serial/mxs-auart.c | 4 drivers/tty/serial/samsung.c | 4 drivers/tty/serial/xilinx_uartps.c | 2 drivers/usb/dwc2/core.h | 2 drivers/usb/dwc2/gadget.c | 12 - drivers/usb/dwc3/core.h | 2 drivers/usb/gadget/composite.c | 40 +--- drivers/usb/gadget/function/f_fs.c | 6 drivers/usb/gadget/function/f_uac2.c | 2 drivers/usb/gadget/udc/fsl_udc_core.c | 4 drivers/usb/gadget/udc/goku_udc.h | 2 drivers/usb/host/ohci-hcd.c | 3 drivers/usb/host/xhci-mem.c | 2 drivers/usb/musb/musb_core.c | 5 drivers/video/fbdev/sbuslib.c | 4 drivers/watchdog/f71808e_wdt.c | 3 drivers/watchdog/sp5100_tco.h | 2 drivers/xen/events/events_base.c | 4 drivers/xen/grant-table.c | 4 drivers/xen/swiotlb-xen.c | 2 drivers/xen/xen-acpi-processor.c | 6 drivers/xen/xenbus/xenbus_probe.c | 5 drivers/zorro/zorro.c | 12 + fs/affs/namei.c | 10 - fs/aio.c | 4 fs/btrfs/ctree.c | 12 - fs/btrfs/disk-io.c | 2 fs/btrfs/extent-tree.c | 1 fs/btrfs/file.c | 9 fs/btrfs/inode.c | 16 - fs/btrfs/raid56.c | 18 + fs/btrfs/send.c | 3 fs/btrfs/tests/qgroup-tests.c | 2 fs/btrfs/tree-log.c | 12 - fs/btrfs/volumes.c | 9 fs/cifs/cifssmb.c | 4 fs/dcache.c | 22 ++ fs/ecryptfs/inode.c | 3 fs/ext2/namei.c | 6 fs/ext4/namei.c | 6 fs/f2fs/namei.c | 12 - fs/fscache/page.c | 13 - fs/gfs2/file.c | 5 fs/gfs2/quota.h | 2 fs/jffs2/dir.c | 12 - fs/jffs2/fs.c | 1 fs/jfs/namei.c | 12 - fs/nfs/nfs4proc.c | 12 - fs/nfs/nfs4state.c | 5 fs/nfs/nfs4sysctl.c | 2 fs/nilfs2/namei.c | 6 fs/ocfs2/acl.c | 6 fs/ocfs2/dlm/dlmdomain.c | 14 - fs/ocfs2/dlm/dlmdomain.h | 25 ++ fs/ocfs2/dlm/dlmrecovery.c | 9 fs/ocfs2/journal.c | 23 +- fs/ocfs2/super.c | 5 fs/ocfs2/xattr.c | 2 fs/proc/base.c | 29 ++ fs/proc/proc_sysctl.c | 3 fs/reiserfs/namei.c | 12 - fs/udf/namei.c | 6 fs/udf/super.c | 5 fs/ufs/namei.c | 6 fs/xfs/libxfs/xfs_attr.c | 6 fs/xfs/xfs_discard.c | 14 - include/asm-generic/pgtable.h | 15 + include/linux/dcache.h | 1 include/linux/suspend.h | 2 include/linux/usb/composite.h | 3 include/net/ip.h | 11 - include/net/ip_fib.h | 1 include/net/llc_conn.h | 2 include/net/mac80211.h | 2 include/net/regulatory.h | 2 include/net/route.h | 3 include/trace/events/timer.h | 20 +- include/uapi/drm/virtgpu_drm.h | 1 include/uapi/linux/if_ether.h | 1 ipc/shm.c | 19 + kernel/audit.c | 2 kernel/debug/kdb/kdb_main.c | 27 ++ kernel/events/core.c | 24 +- kernel/locking/qspinlock.c | 8 kernel/power/power.h | 3 kernel/relay.c | 2 kernel/sched/rt.c | 2 kernel/signal.c | 4 kernel/sys.c | 3 kernel/workqueue.c | 2 lib/test_bpf.c | 31 ++- mm/kasan/kasan.c | 2 mm/kmemleak.c | 12 - mm/ksm.c | 28 ++ mm/mempolicy.c | 36 +++ mm/swapfile.c | 4 mm/vmscan.c | 22 +- net/batman-adv/distributed-arp-table.c | 2 net/batman-adv/fragmentation.c | 3 net/batman-adv/gateway_client.c | 3 net/batman-adv/multicast.c | 4 net/batman-adv/soft-interface.c | 8 net/bridge/netfilter/ebtables.c | 33 ++- net/core/skbuff.c | 9 net/ipv4/ip_vti.c | 2 net/ipv4/route.c | 26 +- net/ipv4/tcp_illinois.c | 2 net/ipv4/xfrm4_policy.c | 1 net/ipv6/sit.c | 7 net/llc/llc_c_ac.c | 15 - net/llc/llc_conn.c | 32 ++- net/netlabel/netlabel_unlabeled.c | 10 + net/nfc/llcp_commands.c | 4 net/nfc/netlink.c | 3 net/rds/ib.c | 3 scripts/kconfig/expr.c | 2 scripts/kconfig/menu.c | 1 scripts/kconfig/zconf.y | 33 ++- security/integrity/ima/Kconfig | 1 security/integrity/ima/ima_crypto.c | 2 security/integrity/ima/ima_main.c | 13 + sound/core/timer.c | 4 sound/core/vmaster.c | 5 sound/pci/hda/Kconfig | 1 sound/pci/hda/patch_realtek.c | 5 sound/soc/au1x/ac97c.c | 6 sound/soc/samsung/i2s.c | 13 + sound/soc/soc-topology.c | 3 tools/lib/bpf/libbpf.c | 26 ++ tools/lib/traceevent/event-parse.c | 17 - tools/lib/traceevent/parse-filter.c | 10 - tools/perf/tests/vmlinux-kallsyms.c | 2 tools/perf/util/evsel.c | 8 tools/perf/util/hist.c | 4 tools/perf/util/hist.h | 1 tools/testing/selftests/Makefile | 1 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc | 46 ++++ tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc | 97 ++++++++++ tools/testing/selftests/ftrace/test.d/kprobe/probepoint.tc | 43 ++++ tools/testing/selftests/memfd/config | 1 tools/testing/selftests/net/psock_fanout.c | 3 tools/testing/selftests/powerpc/mm/subpage_prot.c | 14 + tools/thermal/tmon/sysfs.c | 12 - tools/thermal/tmon/tmon.c | 1 289 files changed, 1873 insertions(+), 632 deletions(-)
Al Viro (3):
affs_lookup(): close a race with affs_remove_link()
aio: fix io_destroy(2) vs. lookup_ioctx() race do d_instantiate/unlock_new_inode combinations safely
Alex Estrin (1):
IB/ipoib: Fix for potential no-carrier state
Alex Williamson (1):
PCI: Add function 1 DMA alias quirk for Marvell 9128
Alexandre Belloni (1):
rtc: hctosys: Ensure system time doesn't overflow time_t
Alexey Dobriyan (1):
proc: fix /proc/*/map_files lookup
Anders Roxell (1):
selftests: memfd: add config fragment for fuse
Andrea Parri (2):
locking/xchg/alpha: Add unconditional memory barrier to cmpxchg() locking/xchg/alpha: Fix xchg() and cmpxchg() memory ordering bugs
Andreas Gruenbacher (1):
gfs2: Fix fallocate chunk size
Andreas Kemnade (1):
usb: musb: fix enumeration after resume
Andrzej Hajda (5):
clk: samsung: s3c2410: Fix PLL rates
clk: samsung: exynos5260: Fix PLL rates
clk: samsung: exynos5433: Fix PLL rates
clk: samsung: exynos5250: Fix PLL rates
clk: samsung: exynos3250: Fix PLL rates
Anna-Maria Gleixner (1):
tracing/hrtimer: Fix tracing bugs by taking all clock bases and modes into account
Arnaldo Carvalho de Melo (1):
perf callchain: Fix attr.sample_max_stack setting
Arnd Bergmann (5):
scsi: fas216: fix sense buffer initialization x86/power: Fix swsusp_arch_resume prototype
cifs: silence compiler warnings showing up with gcc-8.0.0
md: raid5: avoid string overflow warning
media: s3c-camif: fix out-of-bounds array access
Arvind Yadav (2):
xen: xenbus: use put_device() instead of kfree()
workqueue: use put_device() instead of kfree()
Baoquan He (1):
x86/apic: Set up through-local-APIC mode on the boot CPU if 'noapic' specified
Bart Van Assche (1):
scsi: qla2xxx: Avoid triggering undefined behavior in qla2x00_mbx_completion()
Ben Hutchings (1):
ALSA: timer: Fix pause event notification
Benjamin Poirier (1):
e1000e: Fix check_for_link return value with autoneg off
Brad Love (3):
media: cx23885: Override 888 ImpactVCBe crystal frequency
media: cx23885: Set subdev host data to clk_freq pointer
media: em28xx: USB bulk packet size fix
Brian Foster (1):
xfs: remove racy hasattr check from attr ops
Bryan O'Donoghue (1):
rtc: snvs: Fix usage of snvs_rtc_enable
Carlos Maiolino (1):
Force log to disk before reading the AGF during a fstrim
Cathy Zhou (1):
sunvnet: does not support GSO for sctp
Chad Dupuis (1):
scsi: bnx2fc: Fix check in SCSI completion handler for timed out request
Chen Yu (1):
ACPI: processor_perflib: Do not send _PPC change notification if not ready
Chien Tin Tung (1):
RDMA/ucma: Correct option size check using optlen
Chris Dickens (1):
usb: gadget: composite: fix incorrect handling of OS desc requests
Christophe JAILLET (1):
regulator: of: Add a missing 'of_node_put()' in an error handling path of 'of_regulator_match()'
Chunyu Hu (1):
cpufreq: cppc_cpufreq: Fix cppc_cpufreq_init() failure path
Claudio Imbrenda (1):
mm/ksm: fix interaction with THP
Claudiu Manoil (1):
gianfar: Fix Rx byte accounting for ndev stats
Colin Ian King (5):
KVM: Fix spelling mistake: "cop_unsuable" -> "cop_unusable" clocksource/drivers/fsl_ftm_timer: Fix error return checking
staging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr
rtc: tx4939: avoid unintended sign extension on a 24 bit shift
media: cx25821: prevent out-of-bounds read on array card
Coly Li (2):
bcache: properly set task state in bch_writeback_thread()
bcache: quit dc->writeback_thread when BCACHE_DEV_DETACHING is set
Cong Wang (1):
llc: properly handle dev_queue_xmit() return value
Corneliu Doban (1):
mmc: sdhci-iproc: fix 32bit writes for TRANSFER_MODE register
Dan Carpenter (5):
ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read()
HID: roccat: prevent an out of bounds read in kovaplus_profile_activated()
scsi: sym53c8xx_2: iterator underflow in sym_getsync()
scsi: mptfusion: Add bounds check in mptctl_hp_targetinfo() xen/acpi: off by one in read_acpi_id()
Danilo Krummrich (1):
fs/proc/proc_sysctl.c: fix potential page fault while unregistering sysctl table
Dave Airlie (1):
virtio-gpu: fix ioctl and expose the fixed status to userspace.
Dave Carroll (1):
scsi: aacraid: Insure command thread is not recursively stopped
David Hildenbrand (1):
kasan: fix memory hotplug during boot
David Howells (1):
fscache: Fix hanging wait on page discarded by writeback
David Rientjes (1):
kernel/relay.c: limit kmalloc size to KMALLOC_MAX_SIZE
David S. Miller (1):
sparc64: Make atomic_xchg() an inline function rather than a macro.
Davidlohr Bueso (3):
Revert "ipc/shm: Fix shmat mmap nil-page protection" ipc/shm: fix shmat() nil address after round-down when remapping sched/rt: Fix rq->clock_update_flags < RQCF_ACT_SKIP warning
Eric Dumazet (2):
smsc75xx: fix smsc75xx_set_features()
r8152: fix tx packets accounting
Erik Schmauss (1):
ACPICA: Events: add a return on failure from acpi_hw_register_read
Esben Haabendal (1):
dp83640: Ensure against premature access to PHY registers after reset
Felix Fietkau (1):
mac80211: round IEEE80211_TX_STATUS_HEADROOM up to multiple of 4
Filipe Manana (2):
Btrfs: send, fix issuing write op when processing hole in no data mode
Btrfs: fix copy_items() return value when logging an inode
Florian Fainelli (1):
net: bgmac: Fix endian access in bgmac_dma_tx_ring_free()
Florian Westphal (2):
netfilter: ebtables: convert BUG_ONs to WARN_ONs
netfilter: ebtables: fix erroneous reject of last rule
Frank Asseg (1):
tools/thermal: tmon: fix for segfault
Fredrik Noring (1):
USB: OHCI: Fix NULL dereference in HCDs using HCD_LOCAL_MEM
Geert Uytterhoeven (7):
ARM: OMAP1: clock: Fix debugfs_create_*() usage
serial: xuartps: Fix out-of-bounds access through DT alias
serial: samsung: Fix out-of-bounds access through serial port index
serial: mxs-auart: Fix out-of-bounds access through serial port index
serial: imx: Fix out-of-bounds access through serial port index
serial: fsl_lpuart: Fix out-of-bounds access through DT alias
serial: arc_uart: Fix out-of-bounds access through DT alias
Giuseppe Lippolis (1):
net-usb: add qmi_wwan if on lte modem wistron neweb d18q1
Govindarajulu Varadarajan (1):
enic: enable rq before updating rq descriptors
Greg Kroah-Hartman (1):
Linux 4.4.134
Greg Ungerer (1):
m68k: set dma and coherent masks for platform FEC ethernets
Gregory CLEMENT (1):
i2c: mv64xxx: Apply errata delay only in standard mode
Grigor Tovmasyan (1):
usb: dwc2: Fix interval type issue
Guanglei Li (1):
RDS: IB: Fix null pointer issue
Guenter Roeck (4):
watchdog: sp5100_tco: Fix watchdog disable bit
hwmon: (nct6775) Fix writing pwmX_mode
hwmon: (pmbus/max8688) Accept negative page register values
hwmon: (pmbus/adm1275) Accept negative page register values
Gustavo A. R. Silva (1):
kernel/sys.c: fix potential Spectre v1 issue
Hannes Reinecke (1):
scsi: mpt3sas: Do not mark fw_event workqueue as WQ_MEM_RECLAIM
Hector Martin (1):
firewire-ohci: work around oversized DMA reads on JMicron controllers
Helge Deller (1):
parisc/pci: Switch LBA PCI bus from Hard Fail to Soft Fail mode
Huang Ying (1):
mm: fix races between address_space dereference and free in page_evicatable
Igor Pylypiv (1):
watchdog: f71808e_wdt: Fix magic close handling
Ivan Gorinov (2):
x86/devicetree: Initialize device tree before using it x86/devicetree: Fix device IRQ settings in DT
Jake Daryll Obina (1):
jffs2: Fix use-after-free bug in jffs2_iget()'s error handling path
James Smart (3):
scsi: lpfc: Fix issue_lip if link is disabled
scsi: lpfc: Fix soft lockup in lpfc worker thread during LIP testing
scsi: lpfc: Fix frequency of Release WQE CQEs
Jan Chochol (1):
nfs: Do not convert nfs_idmap_cache_timeout to jiffies
Jan Kara (1):
udf: Provide saner default for invalid uid / gid
Jay Vosburgh (1):
virtio-net: Fix operstate for virtio when no VIRTIO_NET_F_STATUS
Jean Delvare (1):
firmware: dmi_scan: Fix handling of empty DMI strings
Jeff Mahoney (1):
btrfs: fix lockdep splat in btrfs_alloc_subvolume_writers
Jens Axboe (1):
sr: get/drop reference to device in revalidate and check_events
Jeremy Cline (1):
scsi: sd: Keep disk read-only when re-reading partition
Jesper Dangaard Brouer (1):
tools/libbpf: handle issues with bpf ELF objects containing .eh_frames
Jianchao Wang (1):
nvme-pci: Fix nvme queue cleanup if IRQ setup fails
Jiandi An (1):
ima: Fix Kconfig to select TPM 2.0 CRB interface
Jinbum Park (1):
ARM: 8748/1: mm: Define vdso_start, vdso_end as array
Jiri Olsa (2):
perf tests: Use arch__compare_symbol_names to compare symbols perf report: Fix memory corruption in --branch-history mode --branch-history
Joe Jin (1):
xen-swiotlb: fix the check condition for xen_swiotlb_free_coherent
Joe Perches (1):
MIPS: Octeon: Fix logging messages with spurious periods after newlines
Joerg Roedel (1):
x86/pgtable: Don't set huge PUD/PMD on non-leaf entries
Joey Pabalinas (1):
net/tcp/illinois: replace broken algorithm reference link
Johannes Berg (1):
regulatory: add NUL to request alpha2
John Keeping (1):
usb: gadget: f_uac2: fix bFirstInterface in composite gadget
Jun Piao (1):
ocfs2/dlm: don't handle migrate lockres if already in shutdown
Kamlakant Patel (1):
ipmi_ssif: Fix kernel panic at msg_done_handler
Karthikeyan Periyasamy (1):
ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk)
Kees Cook (1):
NFC: llcp: Limit size of SDP URI
Kirill A. Shutemov (1):
asm-generic: provide generic_pmdp_establish()
Larry Finger (1):
Bluetooth: btusb: Add device ID for RTL8822BE
Lars-Peter Clausen (2):
usb: gadget: ffs: Let setup() return USB_GADGET_DELAYED_STATUS
usb: gadget: ffs: Execute copy_to_user() with USER_DS set
Lenny Szubowicz (1):
ACPI: acpi_pad: Fix memory leak in power saving threads
Leon Romanovsky (2):
RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure net/mlx5: Protect from command bit overflow
Linus Lüssing (2):
batman-adv: fix multicast-via-unicast transmission with AP isolation
batman-adv: fix packet loss for broadcasted DHCP packets to a server
Liu Bo (4):
Btrfs: set plug for fsync
Btrfs: fix scrub to repair raid6 corruption
Btrfs: bail out on error during replay_dir_deletes
Btrfs: fix NULL pointer dereference in log_dir_items
Logan Gunthorpe (1):
ntb_transport: Fix bug with max_mw_size parameter
Maciej W. Rozycki (2):
MIPS: ptrace: Expose FIR register through FP regset
MIPS: Fix ptrace(2) PTRACE_PEEKUSR and PTRACE_POKEUSR accesses to o32 FGRs
Madhavan Srinivasan (1):
powerpc/perf: Prevent kernel address leak to userspace via BHRB buffer
Manish Rangankar (1):
scsi: qla4xxx: skip error recovery in case of register disconnect.
Mark Lord (1):
powerpc/bpf/jit: Fix 32-bit JIT for seccomp_data access
Mark Salter (1):
irqchip/gic-v3: Change pr_debug message to pr_devel
Martin Schwidefsky (1):
s390/ftrace: use expoline for indirect branches
Masami Hiramatsu (3):
selftests: ftrace: Add probe event argument syntax testcase
selftests: ftrace: Add a testcase for string type with kprobe_event
selftests: ftrace: Add a testcase for probepoint
Mathias Kresin (1):
MIPS: ath79: Fix AR724X_PLL_REG_PCIE_CONFIG offset
Mathias Nyman (1):
xhci: zero usb device slot_id member when disabling and freeing a xhci slot
Mathieu Malaterre (1):
powerpc: Add missing prototype for arch_irq_work_raise()
Matt Redfearn (1):
MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS
Matthias Schiffer (3):
batman-adv: fix packet checksum in receive path
batman-adv: invalidate checksum on fragment reassembly
batman-adv: fix header size check in batadv_dbg_arp()
Maurizio Lombardi (1):
cdrom: do not call check_disk_change() inside cdrom_open()
Mauro Carvalho Chehab (1):
media: dmxdev: fix error code for invalid ioctls
Meelis Roos (1):
scsi: aacraid: fix shutdown crash when init fails
Mel Gorman (1):
mm: pin address_space before dereferencing it while isolating an LRU page
Merlijn Wajer (1):
usb: musb: call pm_runtime_{get,put}_sync before reading vbus registers
Michael Bringmann (2):
powerpc/numa: Use ibm,max-associativity-domains to discover possible nodes powerpc/numa: Ensure nodes initialized for hotplug
Michael Chan (1):
bnxt_en: Check valid VNIC ID in bnxt_hwrm_vnic_set_tpa().
Michael Ellerman (4):
selftests/powerpc: Skip the subpage_prot tests if the syscall is unavailable powerpc/mpic: Check if cpu_possible() in mpic_physmask() powerpc/perf: Fix kernel address leak via sampling registers
selftests: Print the test we're running to /dev/kmsg
Michael Kelley (EOSG) (1):
scsi: storvsc: Increase cmd_per_lun for higher speed devices
Michael Schmitz (1):
zorro: Set up z->dev.dma_mask for the DMA API
NeilBrown (1):
NFSv4: always set NFS_LOCK_LOST when a lock is lost.
Nikolay Borisov (2):
btrfs: Fix out of bounds access in btrfs_search_slot
btrfs: Fix possible softlock on single core machines
Paolo Bonzini (1):
kvm: x86: fix KVM_XEN_HVM_CONFIG ioctl
Paul Mackerras (1):
KVM: PPC: Book3S HV: Fix VRMA initialization with 2MB or 1GB memory backing
Pawel Dembicki (1):
net: qmi_wwan: add BroadMobi BM806U 2020:2033
Peter Malone (1):
fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper().
Peter Robinson (1):
crypto: sunxi-ss - Add MODULE_ALIAS to sun4i-ss
Peter Zijlstra (1):
perf/core: Fix perf_output_read_group()
Petr Vorel (1):
ima: Fallback to the builtin hash algorithm
Philipp Puschmann (1):
arm: dts: socfpga: fix GIC PPI warning
Pierre-Yves Kerbrat (1):
e1000e: allocate ring descriptors with dma_zalloc_coherent
Prashant Bhole (1):
selftests/net: fixes psock_fanout eBPF test case
Qi Hou (2):
ARM: OMAP2+: timer: fix a kmemleak caused in omap_get_timer_dt
dmaengine: pl330: fix a race condition in case of threaded irqs
Qu Wenruo (1):
btrfs: tests/qgroup: Fix wrong tree backref level
Rafael J. Wysocki (1):
PCI: Restore config space on runtime resume despite being unbound
Randy Dunlap (1):
kdb: make "mdr" command repeat
Ranjani Sridharan (1):
ASoC: topology: create TLV data for dapm widgets
Rich Felker (1):
sh: fix debug trap failure to process signals before return to user
Richard Guy Briggs (1):
audit: return on memory error to avoid null pointer dereference
Richard Haines (1):
netlabel: If PF_INET6, check sk_buff ip header version
Roger Pau Monne (1):
xen/pirq: fix error path cleanup when binding MSIs
Ross Lagerwall (2):
xen-netfront: Fix race between device setup and open xen/grant-table: Use put_page instead of free_page
Sabrina Dubroca (1):
ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmtu
Samuel Neves (1):
x86/topology: Update the 'cpu cores' field in /proc/cpuinfo correctly across CPU hotplug operations
Sean Christopherson (1):
KVM: VMX: raise internal error for exception during invalid protected mode state
Sebastian Ott (2):
s390/cio: fix return code after missing interrupt s390/cio: clear timer when terminating driver I/O
Seunghun Han (1):
ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c
Shawn Lin (2):
clk: Don't show the incorrect clock phase
clk: rockchip: Prevent calculating mmc phase if clock rate is zero
Shunyong Yang (1):
cpufreq: CPPC: Initialize shared perf capabilities of CPUs
Song Liu (1):
perf/cgroup: Fix child event counting bug
Stefan Agner (1):
usb: gadget: fsl_udc_core: fix ep valid checks
Stefano Brivio (2):
vti4: Don't count header length twice on tunnel setup
vti4: Don't override MTU passed on link creation via IFLA_MTU
Steven Rostedt (VMware) (2):
tools lib traceevent: Simplify pointer print logic and fix %pF tools lib traceevent: Fix get_field_str() for dynamic strings
Sudip Mukherjee (1):
libata: blacklist Micron 500IT SSD with MU01 firmware
Sujit Reddy Thumma (1):
scsi: ufs: Enable quirk to ignore sending WRITE_SAME command
Sylwester Nawrocki (1):
ASoC: samsung: i2s: Ensure the RCLK rate is properly determined
Takashi Iwai (2):
ALSA: hda - Use IS_REACHABLE() for dependency on input
ALSA: vmaster: Propagate slave error
Tang Junhui (4):
bcache: fix for allocator and register thread race
bcache: fix for data collapse after re-attaching an attached device
bcache: return attach error when no cache set exist
bcache: fix kcrashes with fio in RAID5 backend dev
Tejun Heo (1):
libata: Blacklist some Sandisk SSDs for NCQ
Thinh Nguyen (1):
usb: dwc3: Update DWC_usb31 GTXFIFOSIZ reg fields
Thomas Vincent-Cross (1):
PCI: Add function 1 DMA alias quirk for Marvell 88SE9220
Tom Abraham (1):
swap: divide-by-zero when zero length swap file on ssd
Tony Lindgren (2):
ARM: OMAP3: Fix prm wake interrupt for resume
ARM: OMAP: Fix dmtimer init for omap1
Torsten Hilbrich (1):
net/usb/qmi_wwan.c: Add USB id for lt4120 modem
Toshiaki Makita (2):
net: Fix vlan untag for bridge and vlan_dev with reorder_hdr off
net: Fix untag for vlan packets without ethernet header
Ulf Magnusson (4):
kconfig: Don't leak main menus during parsing
kconfig: Fix automatic menu creation mem leak
kconfig: Fix expr_free() E_NOT leak
ARC: Fix malformed ARC_EMUL_UNALIGNED default
Vardan Mikayelyan (1):
usb: dwc2: Fix dwc2_hsotg_core_init_disconnected()
Vicente Bergas (1):
Bluetooth: btusb: Add USB ID 7392:a611 for Edimax EW-7611ULB
Vinayak Menon (1):
mm/kmemleak.c: wait for scan completion before disabling free
Vitaly Kuznetsov (1):
KVM: lapic: stop advertising DIRECTED_EOI when in-kernel IOAPIC is in use
Wei Yongjun (1):
ipmi/powernv: Fix error return code in ipmi_powernv_probe()
Will Deacon (2):
arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics locking/qspinlock: Ensure node->count is updated before initialising node
Wolfram Sang (2):
drm/exynos: fix comparison to bitshift when dealing with a mask
usb: gadget: udc: change comparison to bitshift when dealing with a mask
Xin Long (1):
sit: fix IFLA_MTU ignored on NEWLINK
Yelena Krivosheev (1):
net: mvneta: fix enable of all initialized RXQs
Yisheng Xie (3):
mm/mempolicy: fix the check of nodemask from user mm/mempolicy: add nodes_empty check in SYSC_migrate_pages mm/mempolicy.c: avoid use uninitialized preferred_node
Yonghong Song (1):
bpf: fix selftests/bpf test_kmod.sh failure when CONFIG_BPF_JIT_ALWAYS_ON=y
Yoshihiro Shimoda (1):
dmaengine: rcar-dmac: fix max_chunk_size for R-Car Gen3
Yufen Yu (2):
md raid10: fix NULL deference in handle_write_completed() md/raid1: fix NULL pointer dereference
[email protected] (1):
hwrng: stm32 - add reset during probe
mulhern (1):
dm thin: fix documentation relative to low water mark threshold
piaojun (3):
ocfs2: return -EROFS to mount.ocfs2 if inode block is invalid ocfs2/acl: use 'ip_xattr_sem' to protect getting extended attribute
ocfs2: return error when we attempt to access a dirty bh in jbd2
weiyongjun (A) (1):
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
zhongjiang (1):
kernel/signal.c: avoid undefined behaviour in kill_something_info
Ørjan Eide (1):
drm/rockchip: Respect page offset for PRIME mmap calls
Greg KH
maintainerDocumentation/device-mapper/thin-provisioning.txt +5 -3
@@ -112,9 +112,11 @@ $low_water_mark is expressed in blocks of size $data_block_size. If free space on the data device drops below this level then a dm event will be triggered which a userspace daemon should catch allowing it to extend the pool device. Only one such event will be sent. -Resuming a device with a new table itself triggers an event so the -userspace daemon can use this to detect a situation where a new table -already exceeds the threshold. + +No special event is triggered if a just resumed device's free space is below +the low water mark. However, resuming a device always triggers an +event; a userspace daemon should verify that free space exceeds the low +water mark when handling this event. A low water mark for the metadata device is maintained in the kernel and will trigger a dm event if free space on the metadata device drops below
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 133 +SUBLEVEL = 134 EXTRAVERSION = NAME = Blurry Fish Butt
arch/alpha/include/asm/xchg.h +22 -8
@@ -11,6 +11,10 @@* Atomic exchange. * Since it can be used to implement critical sections * it must clobber "memory" (also for interrupts in UP). +* +* The leading and the trailing memory barriers guarantee that these +* operations are fully ordered. +* */ static inline unsigned long
@@ -18,6 +22,7 @@ ____xchg(_u8, volatile char *m, unsigned long val) {unsigned long ret, tmp, addr64; +smp_mb (); __asm__ __volatile__(" andnot %4,7,%3\n" " insbl %1,%4,%1\n"
@@ -42,6 +47,7 @@ ____xchg(_u16, volatile short *m, unsigned long val) {unsigned long ret, tmp, addr64; +smp_mb (); __asm__ __volatile__(" andnot %4,7,%3\n" " inswl %1,%4,%1\n"
@@ -66,6 +72,7 @@ ____xchg(_u32, volatile int *m, unsigned long val) {unsigned long dummy; +smp_mb (); __asm__ __volatile__("1: ldl_l %0,%4\n" " bis $31,%3,%1\n"
@@ -86,6 +93,7 @@ ____xchg(_u64, volatile long *m, unsigned long val) {unsigned long dummy; +smp_mb (); __asm__ __volatile__("1: ldq_l %0,%4\n" " bis $31,%3,%1\n"
@@ -127,10 +135,12 @@ ____xchg(, volatile void *ptr, unsigned long x, int size)* store NEW in MEM. Return the initial value in MEM. Success is * indicated by comparing RETURN with OLD. * -* The memory barrier should be placed in SMP only when we actually -* make the change. If we don't change anything (so if the returned -* prev is equal to old) then we aren't acquiring anything new and -* we don't need any memory barrier as far I can tell. +* The leading and the trailing memory barriers guarantee that these +* operations are fully ordered. +* +* The trailing memory barrier is placed in SMP unconditionally, in +* order to guarantee that dependency ordering is preserved when a +* dependency is headed by an unsuccessful operation. */ static inline unsigned long
@@ -138,6 +148,7 @@ ____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new) {unsigned long prev, tmp, cmp, addr64; +smp_mb (); __asm__ __volatile__(" andnot %5,7,%4\n" " insbl %1,%5,%1\n"
@@ -149,8 +160,8 @@ ____cmpxchg(_u8, volatile char *m, unsigned char old, unsigned char new)" or %1,%2,%2\n" " stq_c %2,0(%4)\n" " beq %2,3f\n" - __ASM__MB"2:\n" + __ASM__MB".subsection 2\n" "3: br 1b\n" ".previous"
@@ -165,6 +176,7 @@ ____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new) {unsigned long prev, tmp, cmp, addr64; +smp_mb (); __asm__ __volatile__(" andnot %5,7,%4\n" " inswl %1,%5,%1\n"
@@ -176,8 +188,8 @@ ____cmpxchg(_u16, volatile short *m, unsigned short old, unsigned short new)" or %1,%2,%2\n" " stq_c %2,0(%4)\n" " beq %2,3f\n" - __ASM__MB"2:\n" + __ASM__MB".subsection 2\n" "3: br 1b\n" ".previous"
@@ -192,6 +204,7 @@ ____cmpxchg(_u32, volatile int *m, int old, int new) {unsigned long prev, cmp; +smp_mb (); __asm__ __volatile__("1: ldl_l %0,%5\n" " cmpeq %0,%3,%1\n"
@@ -199,8 +212,8 @@ ____cmpxchg(_u32, volatile int *m, int old, int new)" mov %4,%1\n" " stl_c %1,%2\n" " beq %1,3f\n" - __ASM__MB"2:\n" + __ASM__MB".subsection 2\n" "3: br 1b\n" ".previous"
@@ -215,6 +228,7 @@ ____cmpxchg(_u64, volatile long *m, unsigned long old, unsigned long new) {unsigned long prev, cmp; +smp_mb (); __asm__ __volatile__("1: ldq_l %0,%5\n" " cmpeq %0,%3,%1\n"
@@ -222,8 +236,8 @@ ____cmpxchg(_u64, volatile long *m, unsigned long old, unsigned long new)" mov %4,%1\n" " stq_c %1,%2\n" " beq %1,3f\n" - __ASM__MB"2:\n" + __ASM__MB".subsection 2\n" "3: br 1b\n" ".previous"
arch/arc/Kconfig +0 -1
@@ -479,7 +479,6 @@ config ARC_CURR_IN_REG config ARC_EMUL_UNALIGNED bool "Emulate unaligned memory access (userspace only)" - default N select SYSCTL_ARCH_UNALIGN_NO_WARN select SYSCTL_ARCH_UNALIGN_ALLOW depends on ISA_ARCOMPACT
arch/arm/boot/dts/socfpga.dtsi +1 -1
@@ -738,7 +738,7 @@ timer@fffec600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0xfffec600 0x100>; - interrupts = <1 13 0xf04>; + interrupts = <1 13 0xf01>; clocks = <&mpu_periph_clk>; };
arch/arm/include/asm/vdso.h +0 -2
@@ -11,8 +11,6 @@ struct mm_struct;void arm_install_vdso (struct mm_struct *mm,unsigned long addr); -extern char vdso_start, vdso_end; -extern unsigned int vdso_total_pages;#else /* CONFIG_VDSO */
arch/arm/kernel/vdso.c +7 -5
@@ -38,6 +38,8 @@static struct page **vdso_text_pagelist; +extern char vdso_start[], vdso_end[]; +/* Total number of pages needed for the data and text portions of the VDSO. */ unsigned int vdso_total_pages__read_mostly ;
@@ -178,13 +180,13 @@ static int __init vdso_init(void)unsigned int text_pages;int i; -if (memcmp (&vdso_start,"\177ELF" ,4 )) { +if (memcmp (vdso_start,"\177ELF" ,4 )) {pr_err ("VDSO is not a valid ELF object!\n" );return -ENOEXEC ; } - text_pages = (&vdso_end - &vdso_start) >>PAGE_SHIFT ; -pr_debug ("vdso: %i text pages at base %p\n" , text_pages, &vdso_start); + text_pages = (vdso_end - vdso_start) >>PAGE_SHIFT ; +pr_debug ("vdso: %i text pages at base %p\n" , text_pages, vdso_start);/* Allocate the VDSO text pagelist */ vdso_text_pagelist = kcalloc(text_pages, sizeof(struct page *),
@@ -199,7 +201,7 @@ static int __init vdso_init(void)for (i =0 ; i < text_pages; i++) {struct page *page; - page =virt_to_page (&vdso_start + i *PAGE_SIZE ); + page =virt_to_page (vdso_start + i *PAGE_SIZE ); vdso_text_pagelist[i] = page; }
@@ -210,7 +212,7 @@ static int __init vdso_init(void) cntvct_ok =cntvct_functional (); -patch_vdso (&vdso_start); +patch_vdso (vdso_start);return 0 ; }
arch/arm/mach-omap1/clock.c +3 -3
@@ -1031,17 +1031,17 @@ static int clk_debugfs_register_one(struct clk *c)return -ENOMEM ; c->dent = d; - d =debugfs_create_u8 ("usecount" ,S_IRUGO , c->dent, (u8 *)&c->usecount); + d =debugfs_create_u8 ("usecount" ,S_IRUGO , c->dent, &c->usecount);if (!d) { err = -ENOMEM ; goto err_out; } - d =debugfs_create_u32 ("rate" ,S_IRUGO , c->dent, (u32 *)&c->rate); + d =debugfs_create_ulong ("rate" ,S_IRUGO , c->dent, &c->rate);if (!d) { err = -ENOMEM ; goto err_out; } - d =debugfs_create_x32 ("flags" ,S_IRUGO , c->dent, (u32 *)&c->flags); + d =debugfs_create_x8 ("flags" ,S_IRUGO , c->dent, &c->flags);if (!d) { err = -ENOMEM ; goto err_out;
arch/arm/mach-omap2/pm.c +2 -2
@@ -231,7 +231,7 @@ static void omap_pm_end(void)cpu_idle_poll_ctrl (false); } -static void omap_pm_finish (void ) +static void omap_pm_wake (void ) {if (cpu_is_omap34xx ())omap_prcm_irq_complete ();
@@ -241,7 +241,7 @@ static const struct platform_suspend_ops omap_pm_ops = { .begin = omap_pm_begin, .end = omap_pm_end, .enter = omap_pm_enter, - .finish = omap_pm_finish, + .wake = omap_pm_wake, .valid = suspend_valid_only_mem, };
arch/arm/mach-omap2/timer.c +11 -8
@@ -136,12 +136,6 @@ static struct clock_event_device clockevent_gpt = { .tick_resume = omap2_gp_timer_shutdown, }; -static struct property device_disabled = { - .name ="status" , - .length =sizeof ("disabled" ), - .value ="disabled" , -}; -static const struct of_device_id omap_timer_match[]__initconst = { { .compatible ="ti,omap2420-timer" , }, { .compatible ="ti,omap3430-timer" , },
@@ -183,8 +177,17 @@ static struct device_node * __init omap_get_timer_dt(const struct of_device_id * of_get_property(np, "ti,timer-secure", NULL))) continue; -if (!of_device_is_compatible (np,"ti,omap-counter32k" )) -of_add_property (np, &device_disabled); +if (!of_device_is_compatible (np,"ti,omap-counter32k" )) { +struct property *prop; + + prop =kzalloc (sizeof (*prop),GFP_KERNEL ); +if (!prop) +return NULL ; + prop->name ="status" ; + prop->value ="disabled" ; + prop->length =strlen (prop->value); +of_add_property (np, prop); + }return np; }
arch/arm/plat-omap/dmtimer.c +2 -5
@@ -854,11 +854,8 @@ static int omap_dm_timer_probe(struct platform_device *pdev) timer->irq = irq->start; timer->pdev = pdev; -/* Skip pm_runtime_enable for OMAP1 */ -if (!(timer->capability &OMAP_TIMER_NEEDS_RESET )) { -pm_runtime_enable (dev); -pm_runtime_irq_safe (dev); - } +pm_runtime_enable (dev); +pm_runtime_irq_safe (dev);if (!timer->reserved) { ret =pm_runtime_get_sync (dev);
arch/arm64/include/asm/spinlock.h +2 -2
@@ -94,8 +94,8 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)" cbnz %w1, 1f\n" " add %w1, %w0, %3\n" " casa %w0, %w1, %2\n" -" and %w1, %w1, #0xffff\n" -" eor %w1, %w1, %w0, lsr #16\n" +" sub %w1, %w1, %3\n" +" eor %w1, %w1, %w0\n" "1:") : "=&r" (lockval), "=&r" (tmp), "+Q" (*lock) : "I" (1 << TICKET_SHIFT)
arch/m68k/coldfire/device.c +10 -2
@@ -135,7 +135,11 @@ static struct platform_device mcf_fec0 = { .id = 0, .num_resources = ARRAY_SIZE(mcf_fec0_resources), .resource = mcf_fec0_resources, - .dev.platform_data = FEC_PDATA, + .dev = { + .dma_mask = &mcf_fec0.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = FEC_PDATA, + } };#ifdef MCFFEC_BASE1
@@ -167,7 +171,11 @@ static struct platform_device mcf_fec1 = { .id = 1, .num_resources = ARRAY_SIZE(mcf_fec1_resources), .resource = mcf_fec1_resources, - .dev.platform_data = FEC_PDATA, + .dev = { + .dma_mask = &mcf_fec1.dev.coherent_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + .platform_data = FEC_PDATA, + } };#endif /* MCFFEC_BASE1 */ #endif /* CONFIG_FEC */
arch/mips/cavium-octeon/octeon-irq.c +5 -5
@@ -2240,7 +2240,7 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, parent_irq =irq_of_parse_and_map (ciu_node,0 );if (!parent_irq) { -pr_err ("ERROR: Couldn't acquire parent_irq for %s\n." , +pr_err ("ERROR: Couldn't acquire parent_irq for %s\n" , ciu_node->name);return -EINVAL ; }
@@ -2252,7 +2252,7 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, addr =of_get_address (ciu_node,0 ,NULL ,NULL );if (!addr) { -pr_err ("ERROR: Couldn't acquire reg(0) %s\n." , ciu_node->name); +pr_err ("ERROR: Couldn't acquire reg(0) %s\n" , ciu_node->name);return -EINVAL ; } host_data->raw_reg = (u64)phys_to_virt(
@@ -2260,7 +2260,7 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, addr =of_get_address (ciu_node,1 ,NULL ,NULL );if (!addr) { -pr_err ("ERROR: Couldn't acquire reg(1) %s\n." , ciu_node->name); +pr_err ("ERROR: Couldn't acquire reg(1) %s\n" , ciu_node->name);return -EINVAL ; } host_data->en_reg = (u64)phys_to_virt(
@@ -2268,7 +2268,7 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, r =of_property_read_u32 (ciu_node,"cavium,max-bits" , &val);if (r) { -pr_err ("ERROR: Couldn't read cavium,max-bits from %s\n." , +pr_err ("ERROR: Couldn't read cavium,max-bits from %s\n" , ciu_node->name);return r; }
@@ -2278,7 +2278,7 @@ static int __init octeon_irq_init_cib(struct device_node *ciu_node, &octeon_irq_domain_cib_ops, host_data);if (!cib_domain) { -pr_err ("ERROR: Couldn't irq_domain_add_linear()\n." ); +pr_err ("ERROR: Couldn't irq_domain_add_linear()\n" );return -ENOMEM ; }
arch/mips/include/asm/mach-ath79/ar71xx_regs.h +1 -1
@@ -167,7 +167,7 @@#define AR71XX_AHB_DIV_MASK 0x7#define AR724X_PLL_REG_CPU_CONFIG 0x00 -#define AR724X_PLL_REG_PCIE_CONFIG 0x18 +#define AR724X_PLL_REG_PCIE_CONFIG 0x10#define AR724X_PLL_FB_SHIFT 0#define AR724X_PLL_FB_MASK 0x3ff
arch/mips/kernel/ptrace.c +18 -4
@@ -483,7 +483,7 @@ static int fpr_get_msa(struct task_struct *target,/* * Copy the floating-point context to the supplied NT_PRFPREG buffer. * Choose the appropriate helper for general registers, and then copy -* the FCSR register separately. +* the FCSR and FIR registers separately. */ static int fpr_get(struct task_struct *target, const struct user_regset *regset,
@@ -491,6 +491,7 @@ static int fpr_get(struct task_struct *target, void *kbuf, void __user *ubuf) {const int fcr31_pos =NUM_FPU_REGS *sizeof (elf_fpreg_t); +const int fir_pos = fcr31_pos +sizeof (u32);int err;if (sizeof (target->thread.fpu.fpr[0 ]) ==sizeof (elf_fpreg_t))
@@ -503,6 +504,12 @@ static int fpr_get(struct task_struct *target, err =user_regset_copyout (&pos, &count, &kbuf, &ubuf, &target->thread.fpu.fcr31, fcr31_pos, fcr31_pos +sizeof (u32)); +if (err) +return err; + + err =user_regset_copyout (&pos, &count, &kbuf, &ubuf, + &boot_cpu_data.fpu_id, + fir_pos, fir_pos +sizeof (u32));return err; }
@@ -551,7 +558,8 @@ static int fpr_set_msa(struct task_struct *target,/* * Copy the supplied NT_PRFPREG buffer to the floating-point context. * Choose the appropriate helper for general registers, and then copy -* the FCSR register separately. +* the FCSR register separately. Ignore the incoming FIR register +* contents though, as the register is read-only. * * We optimize for the case where `count % sizeof(elf_fpreg_t) == 0', * which is supposed to have been guaranteed by the kernel before
@@ -565,6 +573,7 @@ static int fpr_set(struct task_struct *target, const void *kbuf, const void __user *ubuf) { const int fcr31_pos = NUM_FPU_REGS * sizeof(elf_fpreg_t); +const int fir_pos = fcr31_pos +sizeof (u32);u32 fcr31;int err;
@@ -592,6 +601,11 @@ static int fpr_set(struct task_struct *target,ptrace_setfcr31 (target, fcr31); } +if (count >0 ) + err =user_regset_copyin_ignore (&pos, &count, &kbuf, &ubuf, + fir_pos, + fir_pos +sizeof (u32)); +return err; }
@@ -816,7 +830,7 @@ long arch_ptrace(struct task_struct *child, long request, fregs =get_fpu_regs (child);#ifdef CONFIG_32BIT -if (test_thread_flag (TIF_32BIT_FPREGS )) { +if (test_tsk_thread_flag (child,TIF_32BIT_FPREGS )) {/* * The odd registers are actually the high * order bits of the values stored in the even
@@ -905,7 +919,7 @@ long arch_ptrace(struct task_struct *child, long request,init_fp_ctx (child);#ifdef CONFIG_32BIT -if (test_thread_flag (TIF_32BIT_FPREGS )) { +if (test_tsk_thread_flag (child,TIF_32BIT_FPREGS )) {/* * The odd registers are actually the high * order bits of the values stored in the even
arch/mips/kernel/ptrace32.c +2 -2
@@ -97,7 +97,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request,break ; } fregs =get_fpu_regs (child); -if (test_thread_flag (TIF_32BIT_FPREGS )) { +if (test_tsk_thread_flag (child,TIF_32BIT_FPREGS )) {/* * The odd registers are actually the high * order bits of the values stored in the even
@@ -203,7 +203,7 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, sizeof(child->thread.fpu)); child->thread.fpu.fcr31 =0 ; } -if (test_thread_flag (TIF_32BIT_FPREGS )) { +if (test_tsk_thread_flag (child,TIF_32BIT_FPREGS )) {/* * The odd registers are actually the high * order bits of the values stored in the even
arch/mips/kvm/mips.c +1 -1
@@ -40,7 +40,7 @@ struct kvm_stats_debugfs_item debugfs_entries[] = { { "cache", VCPU_STAT(cache_exits), KVM_STAT_VCPU }, { "signal", VCPU_STAT(signal_exits), KVM_STAT_VCPU }, { "interrupt", VCPU_STAT(int_exits), KVM_STAT_VCPU }, - { "cop_unsuable", VCPU_STAT(cop_unusable_exits), KVM_STAT_VCPU }, + { "cop_unusable", VCPU_STAT(cop_unusable_exits), KVM_STAT_VCPU }, { "tlbmod", VCPU_STAT(tlbmod_exits), KVM_STAT_VCPU }, { "tlbmiss_ld", VCPU_STAT(tlbmiss_ld_exits), KVM_STAT_VCPU }, { "tlbmiss_st", VCPU_STAT(tlbmiss_st_exits), KVM_STAT_VCPU },
arch/mips/txx9/rbtx4939/setup.c +2 -2
@@ -186,7 +186,7 @@ static void __init rbtx4939_update_ioc_pen(void)#define RBTX4939_MAX_7SEGLEDS 8 -#if IS_ENABLED(CONFIG_LEDS_CLASS) +#if IS_BUILTIN(CONFIG_LEDS_CLASS) static u8 led_val[RBTX4939_MAX_7SEGLEDS]; struct rbtx4939_led_data { struct led_classdev cdev;
@@ -261,7 +261,7 @@ static inline void rbtx4939_led_setup(void)static void __rbtx4939_7segled_putc (unsigned int pos,unsigned char val) { -#if IS_ENABLED (CONFIG_LEDS_CLASS ) +#if IS_BUILTIN (CONFIG_LEDS_CLASS )unsigned long flags;local_irq_save (flags);/* bit7: reserved for LED class */
arch/powerpc/include/asm/irq_work.h +1 -0
@@ -5,5 +5,6 @@ static inline bool arch_irq_work_has_interrupt(void) {return true; } +extern void arch_irq_work_raise (void );#endif /* _ASM_POWERPC_IRQ_WORK_H */
arch/powerpc/kvm/book3s_hv.c +7 -5
@@ -3002,15 +3002,17 @@ static int kvmppc_hv_setup_htab_rma(struct kvm_vcpu *vcpu) goto up_out; psize =vma_kernel_pagesize (vma); - porder =__ilog2 (psize);up_read (¤t->mm->mmap_sem);/* We can handle 4k, 64k or 16M pages in the VRMA */ - err = -EINVAL ; -if (!(psize ==0x1000 || psize ==0x10000 || - psize ==0x1000000 )) - goto out_srcu; +if (psize >=0x1000000 ) + psize =0x1000000 ; +else if (psize >=0x10000 ) + psize =0x10000 ; +else + psize =0x1000 ; + porder =__ilog2 (psize);/* Update VRMASD field in the LPCR */ senc =slb_pgsize_encoding (psize);
arch/powerpc/mm/numa.c +68 -10
117 lines not on this page · raw message
arch/powerpc/net/bpf_jit_comp.c +3 -0
@@ -329,6 +329,9 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image, BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, len) != 4);PPC_LWZ_OFFS (r_A, r_skb, offsetof(struct sk_buff , len));break ; +case BPF_LDX |BPF_W |BPF_ABS :/* A = *((u32 *)(seccomp_data + K)); */ +PPC_LWZ_OFFS (r_A, r_skb,K ); +break ;case BPF_LDX |BPF_W |BPF_LEN :/* X = skb->len; */ PPC_LWZ_OFFS (r_X, r_skb, offsetof(struct sk_buff , len));break ;
arch/powerpc/perf/core-book3s.c +25 -0
@@ -448,6 +448,16 @@ static void power_pmu_bhrb_read(struct cpu_hw_events *cpuhw)/* invalid entry */ continue ; +/* +* BHRB rolling buffer could very much contain the kernel +* addresses at this point. Check the privileges before +* exporting it to userspace (avoid exposure of regions +* where we could have speculative execution) +*/ +if (perf_paranoid_kernel () && !capable (CAP_SYS_ADMIN ) && +is_kernel_addr (addr)) +continue ; +/* Branches are read most recent first (ie. mfbhrb 0 is * the most recent branch). * There are two types of valid entries:
@@ -1188,6 +1198,7 @@ static void power_pmu_disable(struct pmu *pmu)*/ write_mmcr0 (cpuhw, val);mb (); +isync ();/* * Disable instruction sampling if it was enabled
@@ -1196,12 +1207,26 @@ static void power_pmu_disable(struct pmu *pmu)mtspr (SPRN_MMCRA , cpuhw->mmcr[2 ] & ~MMCRA_SAMPLE_ENABLE );mb (); +isync (); } cpuhw->disabled =1 ; cpuhw->n_added =0 ;ebb_switch_out (mmcr0); + +#ifdef CONFIG_PPC64 +/* +* These are readable by userspace, may contain kernel +* addresses and are not switched by context switch, so clear +* them now to avoid leaking anything to userspace in general +* including to another process. +*/ +if (ppmu->flags &PPMU_ARCH_207S ) { +mtspr (SPRN_SDAR ,0 ); +mtspr (SPRN_SIAR ,0 ); + } +#endif }local_irq_restore (flags);
arch/powerpc/sysdev/mpic.c +1 -1
@@ -626,7 +626,7 @@ static inline u32 mpic_physmask(u32 cpumask)int i;u32 mask =0 ; -for (i =0 ; i <min (32 ,NR_CPUS ); ++i, cpumask >>=1 ) +for (i =0 ; i <min (32 ,NR_CPUS ) &&cpu_possible (i); ++i, cpumask >>=1 ) mask |= (cpumask &1 ) <<get_hard_smp_processor_id (i);return mask; }
arch/s390/include/asm/nospec-insn.h +13 -0
@@ -2,10 +2,15 @@#ifndef _ASM_S390_NOSPEC_ASM_H#define _ASM_S390_NOSPEC_ASM_H +#include <asm/alternative-asm.h> +#include <asm/asm-offsets.h> +#ifdef __ASSEMBLY__#ifdef CONFIG_EXPOLINE +_LC_BR_R1 = __LC_BR_R1 +/* * The expoline macros are used to create thunks in the same format * as gcc generates them. The 'comdat' section flag makes sure that
@@ -101,13 +106,21 @@ .endm .macro __THUNK_EX_BR reg,ruse +# Be very careful when adding instructions to this macro! +# The ALTERNATIVE replacement code has a .+10 which targets +# the "br \reg" after the code has been patched.#ifdef CONFIG_HAVE_MARCH_Z10_FEATURES exrl 0,555f j . #else + .ifc \reg,%r1 +ALTERNATIVE "ex %r0,_LC_BR_R1" ,".insn ril,0xc60000000000,0,.+10" ,35 + j . + .else larl \ruse,555f ex 0,0(\ruse) j . + .endif#endif 555: br \reg .endm
arch/s390/kernel/asm-offsets.c +1 -0
@@ -170,6 +170,7 @@ int main(void)OFFSET (__LC_MACHINE_FLAGS, _lowcore, machine_flags);OFFSET (__LC_GMAP, _lowcore, gmap);OFFSET (__LC_PASTE, _lowcore, paste); +OFFSET (__LC_BR_R1, _lowcore, br_r1_trampoline);/* software defined ABI-relevant lowcore locations 0xe00 - 0xe20 */ OFFSET (__LC_DUMP_REIPL, _lowcore, ipib);/* hardware defined lowcore locations 0x1000 - 0x18ff */
arch/s390/kernel/mcount.S +9 -5
@@ -8,12 +8,16 @@ #include <linux/linkage.h> #include <asm/asm-offsets.h> #include <asm/ftrace.h> +#include <asm/nospec-insn.h> #include <asm/ptrace.h> + GEN_BR_THUNK %r1 + GEN_BR_THUNK %r14 + .section .kprobes.text, "ax" ENTRY(ftrace_stub) - br %r14 + BR_EX %r14 #define STACK_FRAME_SIZE (STACK_FRAME_OVERHEAD + __PT_SIZE) #define STACK_PTREGS (STACK_FRAME_OVERHEAD)
@@ -21,7 +25,7 @@ ENTRY(ftrace_stub) #define STACK_PTREGS_PSW (STACK_PTREGS + __PT_PSW) ENTRY(_mcount) - br %r14 + BR_EX %r14 ENTRY(ftrace_caller) .globl ftrace_regs_caller
@@ -49,7 +53,7 @@ ENTRY(ftrace_caller) #endif lgr %r3,%r14 la %r5,STACK_PTREGS(%r15) - basr %r14,%r1 + BASR_EX %r14,%r1 #ifdef CONFIG_FUNCTION_GRAPH_TRACER # The j instruction gets runtime patched to a nop instruction. # See ftrace_enable_ftrace_graph_caller.
@@ -64,7 +68,7 @@ ftrace_graph_caller_end: #endif lg %r1,(STACK_PTREGS_PSW+8)(%r15) lmg %r2,%r15,(STACK_PTREGS_GPRS+2*8)(%r15) - br %r1 + BR_EX %r1 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
@@ -77,6 +81,6 @@ ENTRY(return_to_handler) aghi %r15,STACK_FRAME_OVERHEAD lgr %r14,%r2 lmg %r2,%r5,32(%r15) - br %r14 + BR_EX %r14 #endif
arch/sh/kernel/entry-common.S +1 -1
@@ -255,7 +255,7 @@ debug_trap: mov.l @r8, r8 jsr @r8 nop - bra __restore_all + bra ret_from_exception nop CFI_ENDPROC
arch/sparc/include/asm/atomic_64.h +5 -1
@@ -74,7 +74,11 @@ ATOMIC_OP(xor)#define atomic64_add_negative (i, v) (atomic64_add_return(i, v) < 0)#define atomic_cmpxchg (v, o, n) (cmpxchg(&((v)->counter), (o), (n))) -#define atomic_xchg (v, new) (xchg(&((v)->counter), new)) + +static inline int atomic_xchg (atomic_t *v,int new) +{ +return xchg (&v->counter, new); +}static inline int __atomic_add_unless (atomic_t *v,int a,int u) {
arch/x86/kernel/apic/apic.c +1 -1
@@ -1368,7 +1368,7 @@ void setup_local_APIC(void)* TODO: set up through-local-APIC from through-I/O-APIC? --macro */ value =apic_read (APIC_LVT0 ) &APIC_LVT_MASKED ; -if (!cpu && (pic_mode || !value)) { +if (!cpu && (pic_mode || !value || skip_ioapic_setup)) { value =APIC_DM_EXTINT ;apic_printk (APIC_VERBOSE ,"enabled ExtINT on CPU#%d\n" , cpu); }else {
arch/x86/kernel/devicetree.c +13 -8
@@ -11,6 +11,7 @@#include <linux/of_address.h> #include <linux/of_platform.h> #include <linux/of_irq.h> +#include <linux/libfdt.h> #include <linux/slab.h> #include <linux/pci.h> #include <linux/of_pci.h>
@@ -199,19 +200,22 @@ static struct of_ioapic_type of_ioapic_type[] =static int dt_irqdomain_alloc (struct irq_domain *domain,unsigned int virq,unsigned int nr_irqs,void *arg) { -struct of_phandle_args *irq_data = (void *)arg; +struct irq_fwspec *fwspec = (struct irq_fwspec *)arg;struct of_ioapic_type *it;struct irq_alloc_info tmp; +int type_index; -if (WARN_ON (irq_data->args_count <2 )) +if (WARN_ON (fwspec->param_count <2 ))return -EINVAL ; -if (irq_data->args[1 ] >=ARRAY_SIZE (of_ioapic_type)) + + type_index = fwspec->param[1 ]; +if (type_index >=ARRAY_SIZE (of_ioapic_type))return -EINVAL ; - it = &of_ioapic_type[irq_data->args[1 ]]; + it = &of_ioapic_type[type_index];ioapic_set_alloc_attr (&tmp,NUMA_NO_NODE , it->trigger, it->polarity); tmp.ioapic_id =mpc_ioapic_id (mp_irqdomain_ioapic_idx (domain)); - tmp.ioapic_pin = irq_data->args[0 ]; + tmp.ioapic_pin = fwspec->param[0 ];return mp_irqdomain_alloc (domain, virq, nr_irqs, &tmp); }
@@ -276,14 +280,15 @@ static void __init x86_flattree_get_config(void) map_len =max (PAGE_SIZE - (initial_dtb & ~PAGE_MASK ), (u64 )128 ); - initial_boot_params = dt =early_memremap (initial_dtb, map_len); - size =of_get_flat_dt_size (); + dt =early_memremap (initial_dtb, map_len); + size =fdt_totalsize (dt);if (map_len < size) {early_memunmap (dt, map_len); - initial_boot_params = dt =early_memremap (initial_dtb, size); + dt =early_memremap (initial_dtb, size); map_len = size; } +early_init_dt_verify (dt);unflatten_and_copy_device_tree ();early_memunmap (dt, map_len); }
arch/x86/kernel/smpboot.c +1 -0
@@ -1344,6 +1344,7 @@ static void remove_siblinginfo(int cpu)cpumask_clear (topology_core_cpumask (cpu)); c->phys_proc_id =0 ; c->cpu_core_id =0 ; + c->booted_cores =0 ;cpumask_clear_cpu (cpu, cpu_sibling_setup_mask); }
arch/x86/kvm/lapic.c +9 -1
@@ -288,8 +288,16 @@ void kvm_apic_set_version(struct kvm_vcpu *vcpu)if (!kvm_vcpu_has_lapic (vcpu))return ; +/* +* KVM emulates 82093AA datasheet (with in-kernel IOAPIC implementation) +* which doesn't have EOI register; Some buggy OSes (e.g. Windows with +* Hyper-V role) disable EOI broadcast in lapic not checking for IOAPIC +* version first and level-triggered interrupts never get EOIed in +* IOAPIC. +*/ feat =kvm_find_cpuid_entry (apic->vcpu,0x1 ,0 ); -if (feat && (feat->ecx & (1 << (X86_FEATURE_X2APIC &31 )))) +if (feat && (feat->ecx & (1 << (X86_FEATURE_X2APIC &31 ))) && + !ioapic_in_kernel (vcpu->kvm)) v |=APIC_LVR_DIRECTED_EOI ;apic_set_reg (apic,APIC_LVR , v); }
arch/x86/kvm/vmx.c +14 -6
@@ -2319,6 +2319,8 @@ static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,return ; } +WARN_ON_ONCE (vmx->emulation_required); +if (kvm_exception_is_soft (nr)) {vmcs_write32 (VM_ENTRY_INSTRUCTION_LEN , vmx->vcpu.arch.event_exit_inst_len);
@@ -6037,12 +6039,12 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu) goto out; } -if (err !=EMULATE_DONE ) { - vcpu->run->exit_reason =KVM_EXIT_INTERNAL_ERROR ; - vcpu->run->internal.suberror =KVM_INTERNAL_ERROR_EMULATION ; - vcpu->run->internal.ndata =0 ; -return 0 ; - } +if (err !=EMULATE_DONE ) + goto emulation_error; + +if (vmx->emulation_required && !vmx->rmode.vm86_active && + vcpu->arch.exception.pending) + goto emulation_error;if (vcpu->arch.halt_request) { vcpu->arch.halt_request =0 ;
@@ -6058,6 +6060,12 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu) out:return ret; + +emulation_error: + vcpu->run->exit_reason =KVM_EXIT_INTERNAL_ERROR ; + vcpu->run->internal.suberror =KVM_INTERNAL_ERROR_EMULATION ; + vcpu->run->internal.ndata =0 ; +return 0 ; }static int __grow_ple_window (int val)
arch/x86/kvm/x86.c +4 -3
@@ -3973,13 +3973,14 @@ long kvm_arch_vm_ioctl(struct file *filp,mutex_unlock (&kvm->lock);break ;case KVM_XEN_HVM_CONFIG : { +struct kvm_xen_hvm_config xhc; r = -EFAULT ; -if (copy_from_user (&kvm->arch.xen_hvm_config, argp, -sizeof (struct kvm_xen_hvm_config ))) +if (copy_from_user (&xhc, argp,sizeof (xhc))) goto out; r = -EINVAL ; -if (kvm->arch.xen_hvm_config.flags) +if (xhc.flags) goto out; +memcpy (&kvm->arch.xen_hvm_config, &xhc,sizeof (xhc)); r =0 ;break ; }
arch/x86/mm/pgtable.c +9 -0
@@ -1,5 +1,6 @@#include <linux/mm.h> #include <linux/gfp.h> +#include <linux/hugetlb.h> #include <asm/pgalloc.h> #include <asm/pgtable.h> #include <asm/tlb.h>
@@ -600,6 +601,10 @@ int pud_set_huge(pud_t *pud, phys_addr_t addr, pgprot_t prot) (mtrr != MTRR_TYPE_WRBACK))return 0 ; +/* Bail out if we are we on a populated non-leaf entry: */ +if (pud_present (*pud) && !pud_huge (*pud)) +return 0 ; + prot =pgprot_4k_2_large (prot); set_pte((pte_t *)pud, pfn_pte(
@@ -628,6 +633,10 @@ int pmd_set_huge(pmd_t *pmd, phys_addr_t addr, pgprot_t prot)return 0 ; } +/* Bail out if we are we on a populated non-leaf entry: */ +if (pmd_present (*pmd) && !pmd_huge (*pmd)) +return 0 ; + prot =pgprot_4k_2_large (prot); set_pte((pte_t *)pmd, pfn_pte(
arch/x86/power/hibernate_32.c +1 -1
@@ -142,7 +142,7 @@ static inline void resume_init_first_level_page_table(pgd_t *pg_dir)#endif } -int swsusp_arch_resume (void ) +asmlinkage int swsusp_arch_resume(void) {int error;
arch/x86/power/hibernate_64.c +1 -1
@@ -78,7 +78,7 @@ static int set_up_temporary_mappings(void)return 0 ; } -int swsusp_arch_resume (void ) +asmlinkage int swsusp_arch_resume(void) {int error;
drivers/acpi/acpi_pad.c +3 -0
@@ -108,6 +108,7 @@ static void round_robin_cpu(unsigned int tsk_index)cpumask_andnot (tmp, cpu_online_mask, pad_busy_cpus);if (cpumask_empty (tmp)) {mutex_unlock (&round_robin_lock); +free_cpumask_var (tmp);return ; }for_each_cpu (cpu, tmp) {
@@ -125,6 +126,8 @@ static void round_robin_cpu(unsigned int tsk_index)mutex_unlock (&round_robin_lock);set_cpus_allowed_ptr (current,cpumask_of (preferred_cpu)); + +free_cpumask_var (tmp); }static void exit_round_robin (unsigned int tsk_index)
drivers/acpi/acpica/evevent.c +7 -2
@@ -204,6 +204,7 @@ u32 acpi_ev_fixed_event_detect(void)u32 fixed_status;u32 fixed_enable;u32 i; +acpi_status status;ACPI_FUNCTION_NAME (ev_fixed_event_detect);
@@ -211,8 +212,12 @@ u32 acpi_ev_fixed_event_detect(void)* Read the fixed feature status and enable registers, as all the cases * depend on their values. Ignore errors here. */ - (void )acpi_hw_register_read (ACPI_REGISTER_PM1_STATUS , &fixed_status); - (void )acpi_hw_register_read (ACPI_REGISTER_PM1_ENABLE , &fixed_enable); + status =acpi_hw_register_read (ACPI_REGISTER_PM1_STATUS , &fixed_status); + status |= +acpi_hw_register_read (ACPI_REGISTER_PM1_ENABLE , &fixed_enable); +if (ACPI_FAILURE (status)) { +return (int_status); + } ACPI_DEBUG_PRINT((ACPI_DB_INTERRUPTS, "Fixed Event Block: Enable %08X Status %08X\n",
drivers/acpi/acpica/nseval.c +8 -0
@@ -308,6 +308,14 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info)/* Map AE_CTRL_RETURN_VALUE to AE_OK, we are done with it */ status =AE_OK ; + }else if (ACPI_FAILURE (status)) { + +/* If return_object exists, delete it */ + +if (info->return_object) { +acpi_ut_remove_reference (info->return_object); + info->return_object =NULL ; + } } ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
drivers/acpi/processor_perflib.c +1 -1
@@ -161,7 +161,7 @@ int acpi_processor_ppc_has_changed(struct acpi_processor *pr, int event_flag) {int ret; -if (ignore_ppc) { +if (ignore_ppc || !pr->performance) {/* * Only when it is notification event, the _OST object * will be evaluated. Otherwise it is skipped.
drivers/ata/libata-core.c +6 -0
@@ -4187,6 +4187,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {/* https://bugzilla.kernel.org/show_bug.cgi?id=15573 */ { "C300-CTFDDAC128MAG", "0001", ATA_HORKAGE_NONCQ, }, + /* Some Sandisk SSDs lock up hard with NCQ enabled. Reported on + SD7SN6S256G and SD8SN8U256G */ + { "SanDisk SD[78]SN*G", NULL, ATA_HORKAGE_NONCQ, }, + /* devices which puke on READ_NATIVE_MAX */ { "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, }, { "WDC WD3200JD-00KLB0", "WD-WCAMR1130137", ATA_HORKAGE_BROKEN_HPA },
@@ -4247,6 +4251,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "SanDisk SD7UB3Q*G1001", NULL, ATA_HORKAGE_NOLPM, }, /* devices that don't properly handle queued TRIM commands */ + { "Micron_M500IT_*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM | + ATA_HORKAGE_ZERO_AFTER_TRIM, }, { "Micron_M500_*", NULL, ATA_HORKAGE_NO_NCQ_TRIM | ATA_HORKAGE_ZERO_AFTER_TRIM, }, { "Crucial_CT*M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
drivers/block/paride/pcd.c +2 -0
@@ -230,6 +230,8 @@ static int pcd_block_open(struct block_device *bdev, fmode_t mode)struct pcd_unit *cd = bdev->bd_disk->private_data;int ret; +check_disk_change (bdev); +mutex_lock (&pcd_mutex); ret =cdrom_open (&cd->info, bdev, mode);mutex_unlock (&pcd_mutex);
drivers/bluetooth/btusb.c +6 -0
@@ -336,6 +336,9 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x13d3, 0x3459), .driver_info = BTUSB_REALTEK }, { USB_DEVICE(0x13d3, 0x3494), .driver_info = BTUSB_REALTEK }, + /* Additional Realtek 8723BU Bluetooth devices */ + { USB_DEVICE(0x7392, 0xa611), .driver_info = BTUSB_REALTEK }, + /* Additional Realtek 8821AE Bluetooth devices */ { USB_DEVICE(0x0b05, 0x17dc), .driver_info = BTUSB_REALTEK }, { USB_DEVICE(0x13d3, 0x3414), .driver_info = BTUSB_REALTEK },
@@ -343,6 +346,9 @@ static const struct usb_device_id blacklist_table[] = { { USB_DEVICE(0x13d3, 0x3461), .driver_info = BTUSB_REALTEK }, { USB_DEVICE(0x13d3, 0x3462), .driver_info = BTUSB_REALTEK }, + /* Additional Realtek 8822BE Bluetooth devices */ + { USB_DEVICE(0x0b05, 0x185c), .driver_info = BTUSB_REALTEK }, + /* Silicon Wave based devices */ { USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
drivers/cdrom/cdrom.c +0 -3
@@ -1154,9 +1154,6 @@ int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev,cd_dbg (CD_OPEN ,"entering cdrom_open\n" ); -/* open is event synchronization point, check events first */ -check_disk_change (bdev); -/* if this was a O_NONBLOCK open and we should honor the flags, * do a quick open without drive/disc integrity checks. */ cdi->use_count++;
drivers/cdrom/gdrom.c +3 -0
@@ -497,6 +497,9 @@ static struct cdrom_device_ops gdrom_ops = {static int gdrom_bdops_open (struct block_device *bdev,fmode_t mode) {int ret; + +check_disk_change (bdev); +mutex_lock (&gdrom_mutex); ret =cdrom_open (gd.cd_info, bdev, mode);mutex_unlock (&gdrom_mutex);
drivers/char/hw_random/stm32-rng.c +9 -0
@@ -21,6 +21,7 @@#include <linux/of_address.h> #include <linux/of_platform.h> #include <linux/pm_runtime.h> +#include <linux/reset.h> #include <linux/slab.h> #define RNG_CR 0x00
@@ -46,6 +47,7 @@ struct stm32_rng_private {struct hwrng rng;void __iomem *base;struct clk *clk; +struct reset_control *rst; };static int stm32_rng_read (struct hwrng *rng,void *data,size_t max,bool wait)
@@ -140,6 +142,13 @@ static int stm32_rng_probe(struct platform_device *ofdev)if (IS_ERR (priv->clk))return PTR_ERR (priv->clk); + priv->rst =devm_reset_control_get (&ofdev->dev,NULL ); +if (!IS_ERR (priv->rst)) { +reset_control_assert (priv->rst); +udelay (2 ); +reset_control_deassert (priv->rst); + } +dev_set_drvdata (dev, priv); priv->rng.name = dev_driver_string(dev),
drivers/char/ipmi/ipmi_powernv.c +3 -2
@@ -251,8 +251,9 @@ static int ipmi_powernv_probe(struct platform_device *pdev) ipmi->irq =opal_event_request (prop); } -if (request_irq (ipmi->irq, ipmi_opal_event,IRQ_TYPE_LEVEL_HIGH , -"opal-ipmi" , ipmi)) { + rc =request_irq (ipmi->irq, ipmi_opal_event,IRQ_TYPE_LEVEL_HIGH , +"opal-ipmi" , ipmi); +if (rc) {dev_warn (dev,"Unable to request irq\n" ); goto err_dispose; }
drivers/char/ipmi/ipmi_ssif.c +2 -2
@@ -757,7 +757,7 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result, ssif_info->ssif_state =SSIF_NORMAL ;ipmi_ssif_unlock_cond (ssif_info, flags);pr_warn (PFX "Error getting flags: %d %d, %x\n" , - result, len, data[2 ]); + result, len, (len >=3 ) ? data[2 ] :0 ); }else if (data[0 ] != (IPMI_NETFN_APP_REQUEST |1 ) <<2 || data[1 ] !=IPMI_GET_MSG_FLAGS_CMD ) {/*
@@ -779,7 +779,7 @@ static void msg_done_handler(struct ssif_info *ssif_info, int result,if ((result <0 ) || (len <3 ) || (data[2 ] !=0 )) {/* Error clearing flags */ pr_warn (PFX "Error clearing flags: %d %d, %x\n" , - result, len, data[2 ]); + result, len, (len >=3 ) ? data[2 ] :0 ); }else if (data[0 ] != (IPMI_NETFN_APP_REQUEST |1 ) <<2 || data[1 ] !=IPMI_CLEAR_MSG_FLAGS_CMD ) { pr_warn(PFX "Invalid response clearing flags: %x %x\n",
drivers/clk/clk.c +3 -0
@@ -1905,6 +1905,9 @@ static int clk_core_get_phase(struct clk_core *core)int ret;clk_prepare_lock (); +/* Always try to update cached phase if possible */ +if (core->ops->get_phase) + core->phase = core->ops->get_phase (core->hw); ret = core->phase;clk_prepare_unlock ();
drivers/clk/rockchip/clk-mmc-phase.c +23 -0
@@ -60,6 +60,12 @@ static int rockchip_mmc_get_phase(struct clk_hw *hw)u16 degrees;u32 delay_num =0 ; +/* See the comment for rockchip_mmc_set_phase below */ +if (!rate) { +pr_err ("%s: invalid clk rate\n" , __func__); +return -EINVAL ; + } + raw_value =readl (mmc_clock->reg) >> (mmc_clock->shift); degrees = (raw_value &ROCKCHIP_MMC_DEGREE_MASK ) *90 ;
@@ -86,6 +92,23 @@ static int rockchip_mmc_set_phase(struct clk_hw *hw, int degrees)u32 raw_value;u32 delay; +/* +* The below calculation is based on the output clock from +* MMC host to the card, which expects the phase clock inherits +* the clock rate from its parent, namely the output clock +* provider of MMC host. However, things may go wrong if +* (1) It is orphan. +* (2) It is assigned to the wrong parent. +* +* This check help debug the case (1), which seems to be the +* most likely problem we often face and which makes it difficult +* for people to debug unstable mmc tuning results. +*/ +if (!rate) { +pr_err ("%s: invalid clk rate\n" , __func__); +return -EINVAL ; + } + nineties = degrees /90 ; remainder = (degrees %90 );
drivers/clk/samsung/clk-exynos3250.c +2 -2
@@ -683,7 +683,7 @@ static struct samsung_pll_rate_table exynos3250_epll_rates[] = {PLL_36XX_RATE (144000000 ,96 ,2 ,3 ,0 ),PLL_36XX_RATE (96000000 ,128 ,2 ,4 ,0 ),PLL_36XX_RATE (84000000 ,112 ,2 ,4 ,0 ), -PLL_36XX_RATE (80000004 ,106 ,2 ,4 ,43691 ), +PLL_36XX_RATE (80000003 ,106 ,2 ,4 ,43691 ),PLL_36XX_RATE (73728000 ,98 ,2 ,4 ,19923 ),PLL_36XX_RATE (67737598 ,270 ,3 ,5 ,62285 ), PLL_36XX_RATE( 65535999, 174, 2, 5, 49982),
@@ -719,7 +719,7 @@ static struct samsung_pll_rate_table exynos3250_vpll_rates[] = {PLL_36XX_RATE (148352005 ,98 ,2 ,3 ,59070 ),PLL_36XX_RATE (108000000 ,144 ,2 ,4 ,0 ),PLL_36XX_RATE (74250000 ,99 ,2 ,4 ,0 ), -PLL_36XX_RATE (74176002 ,98 ,3 ,4 ,59070 ), +PLL_36XX_RATE (74176002 ,98 ,2 ,4 ,59070 ),PLL_36XX_RATE (54054000 ,216 ,3 ,5 ,14156 ), PLL_36XX_RATE( 54000000, 144, 2, 5, 0), { /* sentinel */ }
drivers/clk/samsung/clk-exynos5250.c +4 -4
@@ -711,13 +711,13 @@ static struct samsung_pll_rate_table epll_24mhz_tbl[] __initdata = {/* sorted in descending order */ /* PLL_36XX_RATE(rate, m, p, s, k) */ PLL_36XX_RATE (192000000 ,64 ,2 ,2 ,0 ), -PLL_36XX_RATE (180633600 ,90 ,3 ,2 ,20762 ), +PLL_36XX_RATE (180633605 ,90 ,3 ,2 ,20762 ),PLL_36XX_RATE (180000000 ,90 ,3 ,2 ,0 ),PLL_36XX_RATE (73728000 ,98 ,2 ,4 ,19923 ), -PLL_36XX_RATE (67737600 ,90 ,2 ,4 ,20762 ), +PLL_36XX_RATE (67737602 ,90 ,2 ,4 ,20762 ),PLL_36XX_RATE (49152000 ,98 ,3 ,4 ,19923 ), -PLL_36XX_RATE (45158400 ,90 ,3 ,4 ,20762 ), - PLL_36XX_RATE(32768000, 131, 3, 5, 4719), +PLL_36XX_RATE (45158401 ,90 ,3 ,4 ,20762 ), + PLL_36XX_RATE(32768001, 131, 3, 5, 4719), { }, };
drivers/clk/samsung/clk-exynos5260.c +1 -1
@@ -65,7 +65,7 @@ static struct samsung_pll_rate_table pll2650_24mhz_tbl[] __initdata = {PLL_36XX_RATE (480000000 ,160 ,2 ,2 ,0 ),PLL_36XX_RATE (432000000 ,144 ,2 ,2 ,0 ),PLL_36XX_RATE (400000000 ,200 ,3 ,2 ,0 ), -PLL_36XX_RATE (394073130 ,459 ,7 ,2 ,49282 ), +PLL_36XX_RATE (394073128 ,459 ,7 ,2 ,49282 ),PLL_36XX_RATE (333000000 ,111 ,2 ,2 ,0 ),PLL_36XX_RATE (300000000 ,100 ,2 ,2 ,0 ), PLL_36XX_RATE(266000000, 266, 3, 3, 0),
drivers/clk/samsung/clk-exynos5433.c +6 -6
@@ -747,7 +747,7 @@ static struct samsung_pll_rate_table exynos5443_pll_rates[] = {PLL_35XX_RATE (800000000U ,400 ,6 ,1 ),PLL_35XX_RATE (733000000U ,733 ,12 ,1 ),PLL_35XX_RATE (700000000U ,175 ,3 ,1 ), -PLL_35XX_RATE (667000000U ,222 ,4 ,1 ), +PLL_35XX_RATE (666000000U ,222 ,4 ,1 ),PLL_35XX_RATE (633000000U ,211 ,4 ,1 ),PLL_35XX_RATE (600000000U ,500 ,5 ,2 ), PLL_35XX_RATE(552000000U, 460, 5, 2),
@@ -773,12 +773,12 @@ static struct samsung_pll_rate_table exynos5443_pll_rates[] = {/* AUD_PLL */ static struct samsung_pll_rate_table exynos5443_aud_pll_rates[] = {PLL_36XX_RATE (400000000U ,200 ,3 ,2 ,0 ), -PLL_36XX_RATE (393216000U ,197 ,3 ,2 ,-25690 ), +PLL_36XX_RATE (393216003U ,197 ,3 ,2 ,-25690 ),PLL_36XX_RATE (384000000U ,128 ,2 ,2 ,0 ), -PLL_36XX_RATE (368640000U ,246 ,4 ,2 ,-15729 ), -PLL_36XX_RATE (361507200U ,181 ,3 ,2 ,-16148 ), -PLL_36XX_RATE (338688000U ,113 ,2 ,2 ,-6816 ), -PLL_36XX_RATE (294912000U ,98 ,1 ,3 ,19923 ), +PLL_36XX_RATE (368639991U ,246 ,4 ,2 ,-15729 ), +PLL_36XX_RATE (361507202U ,181 ,3 ,2 ,-16148 ), +PLL_36XX_RATE (338687988U ,113 ,2 ,2 ,-6816 ), +PLL_36XX_RATE (294912002U ,98 ,1 ,3 ,19923 ),PLL_36XX_RATE (288000000U ,96 ,1 ,3 ,0 ),PLL_36XX_RATE (252000000U ,84 ,1 ,3 ,0 ), {/* sentinel */ }
drivers/clk/samsung/clk-s3c2410.c +8 -8
@@ -168,7 +168,7 @@ static struct samsung_pll_rate_table pll_s3c2410_12mhz_tbl[] __initdata = {PLL_35XX_RATE (226000000 ,105 ,1 ,1 ),PLL_35XX_RATE (210000000 ,132 ,2 ,1 ),/* 2410 common */ -PLL_35XX_RATE (203000000 ,161 ,3 ,1 ), +PLL_35XX_RATE (202800000 ,161 ,3 ,1 ),PLL_35XX_RATE (192000000 ,88 ,1 ,1 ),PLL_35XX_RATE (186000000 ,85 ,1 ,1 ), PLL_35XX_RATE(180000000, 82, 1, 1),
@@ -178,18 +178,18 @@ static struct samsung_pll_rate_table pll_s3c2410_12mhz_tbl[] __initdata = {PLL_35XX_RATE (147000000 ,90 ,2 ,1 ),PLL_35XX_RATE (135000000 ,82 ,2 ,1 ),PLL_35XX_RATE (124000000 ,116 ,1 ,2 ), -PLL_35XX_RATE (118000000 ,150 ,2 ,2 ), +PLL_35XX_RATE (118500000 ,150 ,2 ,2 ),PLL_35XX_RATE (113000000 ,105 ,1 ,2 ), -PLL_35XX_RATE (101000000 ,127 ,2 ,2 ), +PLL_35XX_RATE (101250000 ,127 ,2 ,2 ),PLL_35XX_RATE (90000000 ,112 ,2 ,2 ), -PLL_35XX_RATE (85000000 ,105 ,2 ,2 ), +PLL_35XX_RATE (84750000 ,105 ,2 ,2 ),PLL_35XX_RATE (79000000 ,71 ,1 ,2 ), -PLL_35XX_RATE (68000000 ,82 ,2 ,2 ), -PLL_35XX_RATE (56000000 ,142 ,2 ,3 ), +PLL_35XX_RATE (67500000 ,82 ,2 ,2 ), +PLL_35XX_RATE (56250000 ,142 ,2 ,3 ),PLL_35XX_RATE (48000000 ,120 ,2 ,3 ), -PLL_35XX_RATE (51000000 ,161 ,3 ,3 ), +PLL_35XX_RATE (50700000 ,161 ,3 ,3 ),PLL_35XX_RATE (45000000 ,82 ,1 ,3 ), - PLL_35XX_RATE(34000000, 82, 2, 3), + PLL_35XX_RATE(33750000, 82, 2, 3), { /* sentinel */ }, };
drivers/clocksource/fsl_ftm_timer.c +1 -1
@@ -281,7 +281,7 @@ static int __init __ftm_clk_init(struct device_node *np, char *cnt_name,static unsigned long __init ftm_clk_init (struct device_node *np) { -unsigned long freq; +long freq; freq =__ftm_clk_init (np,"ftm-evt-counter-en" ,"ftm-evt" );if (freq <=0 )
drivers/cpufreq/cppc_cpufreq.c +19 -4
@@ -100,9 +100,19 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.max_freq = policy->max; policy->shared_type = cpu->shared_type; -if (policy->shared_type ==CPUFREQ_SHARED_TYPE_ANY ) +if (policy->shared_type ==CPUFREQ_SHARED_TYPE_ANY ) { +int i; +cpumask_copy (policy->cpus, cpu->shared_cpu_map); -else if (policy->shared_type ==CPUFREQ_SHARED_TYPE_ALL ) { + +for_each_cpu (i, policy->cpus) { +if (unlikely (i == policy->cpu)) +continue ; + +memcpy (&all_cpu_data[i]->perf_caps, &cpu->perf_caps, +sizeof (cpu->perf_caps)); + } + }else if (policy->shared_type ==CPUFREQ_SHARED_TYPE_ALL ) {/* Support only SW_ANY for now. */ pr_debug ("Unsupported CPU co-ord type\n" );return -EFAULT ;
@@ -166,8 +176,13 @@ static int __init cppc_cpufreq_init(void)return ret; out: -for_each_possible_cpu (i) -kfree (all_cpu_data[i]); +for_each_possible_cpu (i) { + cpu = all_cpu_data[i]; +if (!cpu) +break ; +free_cpumask_var (cpu->shared_cpu_map); +kfree (cpu); + }kfree (all_cpu_data);return -ENODEV ;
drivers/crypto/sunxi-ss/sun4i-ss-core.c +1 -0
@@ -422,6 +422,7 @@ static struct platform_driver sun4i_ss_driver = {module_platform_driver (sun4i_ss_driver); +MODULE_ALIAS ("platform:sun4i-ss" );MODULE_DESCRIPTION ("Allwinner Security System cryptographic accelerator" );MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Corentin LABBE <[email protected]>" );
drivers/dma/pl330.c +4 -2
@@ -1533,7 +1533,7 @@ static void pl330_dotask(unsigned long data)/* Returns 1 if state was updated, 0 otherwise */ static int pl330_update (struct pl330_dmac *pl330) { -struct dma_pl330_desc *descdone, *tmp; +struct dma_pl330_desc *descdone;unsigned long flags;void __iomem *regs;u32 val;
@@ -1611,7 +1611,9 @@ static int pl330_update(struct pl330_dmac *pl330) }/* Now that we are in no hurry, do the callbacks */ -list_for_each_entry_safe (descdone, tmp, &pl330->req_done, rqd) { +while (!list_empty (&pl330->req_done)) { + descdone =list_first_entry (&pl330->req_done, + struct dma_pl330_desc, rqd);list_del (&descdone->rqd);spin_unlock_irqrestore (&pl330->lock, flags);dma_pl330_rqcb (descdone,PL330_ERR_NONE );
drivers/dma/sh/rcar-dmac.c +1 -1
@@ -851,7 +851,7 @@ rcar_dmac_chan_prep_sg(struct rcar_dmac_chan *chan, struct scatterlist *sgl,rcar_dmac_chan_configure_desc (chan, desc); - max_chunk_size = (RCAR_DMATCR_MASK +1 ) << desc->xfer_shift; + max_chunk_size =RCAR_DMATCR_MASK << desc->xfer_shift;/* * Allocate and fill the transfer chunk descriptors. We own the only
drivers/firewire/ohci.c +7 -1
@@ -1130,7 +1130,13 @@ static int context_add_buffer(struct context *ctx)return -ENOMEM ; offset = (void *)&desc->buffer - (void *)desc; - desc->buffer_size =PAGE_SIZE - offset; +/* +* Some controllers, like JMicron ones, always issue 0x20-byte DMA reads +* for descriptors, even 0x10-byte ones. This can cause page faults when +* an IOMMU is in use and the oversized read crosses a page boundary. +* Work around this by always leaving at least 0x10 bytes of padding. +*/ + desc->buffer_size =PAGE_SIZE - offset -0x10 ; desc->buffer_bus = bus_addr + offset; desc->used =0 ;
drivers/firmware/dmi_scan.c +9 -13
@@ -18,7 +18,7 @@ EXPORT_SYMBOL_GPL(dmi_kobj);* of and an antecedent to, SMBIOS, which stands for System * Management BIOS. See further: http://www.dmtf.org/standards */ -static const char dmi_empty_string[] =" " ; +static const char dmi_empty_string[] ="" ;static u32 dmi_ver__initdata ;static u32 dmi_len;
@@ -44,25 +44,21 @@ static int dmi_memdev_nr;static const char *__init dmi_string_nosave (const struct dmi_header *dm,u8 s) {const u8 *bp = ((u8 *) dm) + dm->length; +const u8 *nsp;if (s) { - s--; -while (s >0 && *bp) { +while (--s >0 && *bp) bp +=strlen (bp) +1 ; - s--; - } - -if (*bp !=0 ) { -size_t len =strlen (bp)+1 ; -size_t cmp_len = len >8 ?8 : len; -if (!memcmp (bp, dmi_empty_string, cmp_len)) -return dmi_empty_string; +/* Strings containing only spaces are considered empty */ + nsp = bp; +while (*nsp ==' ' ) + nsp++; +if (*nsp !='\0' )return bp; - } } -return "" ; +return dmi_empty_string; }static const char *__init dmi_string (const struct dmi_header *dm,u8 s)
drivers/gpu/drm/exynos/regs-fimc.h +1 -1
@@ -569,7 +569,7 @@#define EXYNOS_CIIMGEFF_FIN_EMBOSSING (4 << 26)#define EXYNOS_CIIMGEFF_FIN_SILHOUETTE (5 << 26)#define EXYNOS_CIIMGEFF_FIN_MASK (7 << 26) -#define EXYNOS_CIIMGEFF_PAT_CBCR_MASK ((0xff < 13) | (0xff < 0)) +#define EXYNOS_CIIMGEFF_PAT_CBCR_MASK ((0xff << 13) | (0xff << 0))/* Real input DMA size register */ #define EXYNOS_CIREAL_ISIZE_AUTOLOAD_ENABLE (1 << 31)
drivers/gpu/drm/rockchip/rockchip_drm_gem.c +6 -1
@@ -67,7 +67,6 @@ static int rockchip_drm_gem_object_mmap(struct drm_gem_object *obj,* VM_PFNMAP flag that was set by drm_gem_mmap_obj()/drm_gem_mmap(). */ vma->vm_flags &= ~VM_PFNMAP ; - vma->vm_pgoff =0 ; ret =dma_mmap_attrs (drm->dev, vma, rk_obj->kvaddr, rk_obj->dma_addr, obj->size, &rk_obj->dma_attrs);
@@ -99,6 +98,12 @@ int rockchip_gem_mmap(struct file *filp, struct vm_area_struct *vma)if (ret)return ret; +/* +* Set vm_pgoff (used as a fake buffer offset by DRM) to 0 and map the +* whole buffer from the start. +*/ + vma->vm_pgoff =0 ; + obj = vma->vm_private_data;return rockchip_drm_gem_object_mmap (obj, vma);
drivers/gpu/drm/virtio/virtgpu_ioctl.c +11 -6
@@ -208,6 +208,9 @@ static int virtio_gpu_getparam_ioctl(struct drm_device *dev, void *data,case VIRTGPU_PARAM_3D_FEATURES : value = vgdev->has_virgl_3d == true ?1 :0 ;break ; +case VIRTGPU_PARAM_CAPSET_QUERY_FIX : + value =1 ; +break ;default :return -EINVAL ; }
@@ -483,7 +486,7 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev, {struct virtio_gpu_device *vgdev = dev->dev_private;struct drm_virtgpu_get_caps *args = data; -int size; +unsigned size, host_caps_size;int i;int found_valid =-1 ;int ret;
@@ -492,6 +495,10 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev,if (vgdev->num_capsets ==0 )return -ENOSYS ; +/* don't allow userspace to pass 0 */ +if (args->size ==0 ) +return -EINVAL ; +spin_lock (&vgdev->display_info_lock);for (i =0 ; i < vgdev->num_capsets; i++) {if (vgdev->capsets[i].id == args->cap_set_id) {
@@ -507,11 +514,9 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev,return -EINVAL ; } - size = vgdev->capsets[found_valid].max_size; -if (args->size > size) { -spin_unlock (&vgdev->display_info_lock); -return -EINVAL ; - } + host_caps_size = vgdev->capsets[found_valid].max_size; +/* only copy to user the minimum of the host caps size or the guest caps size */ + size =min (args->size, host_caps_size);list_for_each_entry (cache_ent, &vgdev->cap_cache, head) { if (cache_ent->id == args->cap_set_id &&
drivers/hid/hid-roccat-kovaplus.c +2 -0
@@ -37,6 +37,8 @@ static uint kovaplus_convert_event_cpi(uint value)static void kovaplus_profile_activated (struct kovaplus_device *kovaplus,uint new_profile_index) { +if (new_profile_index >=ARRAY_SIZE (kovaplus->profile_settings)) +return ; kovaplus->actual_profile = new_profile_index; kovaplus->actual_cpi = kovaplus->profile_settings[new_profile_index].cpi_startup_level; kovaplus->actual_x_sensitivity = kovaplus->profile_settings[new_profile_index].sensitivity_x;
drivers/hwmon/nct6775.c +5 -5
@@ -1390,7 +1390,7 @@ static void nct6775_update_pwm(struct device *dev) duty_is_dc = data->REG_PWM_MODE[i] && (nct6775_read_value (data, data->REG_PWM_MODE[i]) & data->PWM_MODE_MASK[i]); - data->pwm_mode[i] = duty_is_dc; + data->pwm_mode[i] = !duty_is_dc; fanmodecfg =nct6775_read_value (data, data->REG_FAN_MODE[i]);for (j =0 ; j <ARRAY_SIZE (data->REG_PWM); j++) {
@@ -2267,7 +2267,7 @@ show_pwm_mode(struct device *dev, struct device_attribute *attr, char *buf)struct nct6775_data *data =nct6775_update_device (dev);struct sensor_device_attribute *sattr =to_sensor_dev_attr (attr); -return sprintf (buf,"%d\n" , !data->pwm_mode[sattr->index]); +return sprintf (buf,"%d\n" , data->pwm_mode[sattr->index]); } static ssize_t
@@ -2288,9 +2288,9 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr,if (val >1 )return -EINVAL ; -/* Setting DC mode is not supported for all chips/channels */ +/* Setting DC mode (0) is not supported for all chips/channels */ if (data->REG_PWM_MODE[nr] ==0 ) { -if (val) +if (!val)return -EINVAL ;return count; }
@@ -2299,7 +2299,7 @@ store_pwm_mode(struct device *dev, struct device_attribute *attr, data->pwm_mode[nr] = val; reg =nct6775_read_value (data, data->REG_PWM_MODE[nr]); reg &= ~data->PWM_MODE_MASK[nr]; -if (val) +if (!val) reg |= data->PWM_MODE_MASK[nr];nct6775_write_value (data, data->REG_PWM_MODE[nr], reg);mutex_unlock (&data->update_lock);
drivers/hwmon/pmbus/adm1275.c +2 -2
@@ -141,7 +141,7 @@ static int adm1275_read_word_data(struct i2c_client *client, int page, int reg)const struct adm1275_data *data =to_adm1275_data (info);int ret =0 ; -if (page) +if (page >0 )return -ENXIO ;switch (reg) {
@@ -218,7 +218,7 @@ static int adm1275_write_word_data(struct i2c_client *client, int page, int reg,const struct adm1275_data *data =to_adm1275_data (info);int ret; -if (page) +if (page >0 )return -ENXIO ;switch (reg) {
drivers/hwmon/pmbus/max8688.c +1 -1
@@ -45,7 +45,7 @@ static int max8688_read_word_data(struct i2c_client *client, int page, int reg) {int ret; -if (page) +if (page >0 )return -ENXIO ;switch (reg) {
drivers/i2c/busses/i2c-mv64xxx.c +6 -2
@@ -856,12 +856,16 @@ mv64xxx_of_config(struct mv64xxx_i2c_data *drv_data,*/ if (of_device_is_compatible (np,"marvell,mv78230-i2c" )) { drv_data->offload_enabled = true; - drv_data->errata_delay = true; +/* The delay is only needed in standard mode (100kHz) */ +if (bus_freq <=100000 ) + drv_data->errata_delay = true; }if (of_device_is_compatible (np,"marvell,mv78230-a0-i2c" )) { drv_data->offload_enabled = false; - drv_data->errata_delay = true; +/* The delay is only needed in standard mode (100kHz) */ +if (bus_freq <=100000 ) + drv_data->errata_delay = true; }if (of_device_is_compatible (np,"allwinner,sun6i-a31-i2c" ))
drivers/ide/ide-cd.c +2 -0
@@ -1593,6 +1593,8 @@ static int idecd_open(struct block_device *bdev, fmode_t mode)struct cdrom_info *info;int rc = -ENXIO ; +check_disk_change (bdev); +mutex_lock (&ide_cd_mutex); info =ide_cd_get (bdev->bd_disk);if (!info)
drivers/infiniband/core/ucma.c +1 -1
@@ -1295,7 +1295,7 @@ static ssize_t ucma_set_option(struct ucma_file *file, const char __user *inbuf,if (IS_ERR (ctx))return PTR_ERR (ctx); -if (unlikely (cmd.optval >KMALLOC_MAX_SIZE )) +if (unlikely (cmd.optlen >KMALLOC_MAX_SIZE ))return -EINVAL ; optval = memdup_user((void __user *) (unsigned long) cmd.optval,
drivers/infiniband/hw/mlx5/qp.c +1 -4
@@ -3161,12 +3161,9 @@ int mlx5_ib_dealloc_xrcd(struct ib_xrcd *xrcd)int err; err =mlx5_core_xrcd_dealloc (dev->mdev, xrcdn); -if (err) { +if (err)mlx5_ib_warn (dev,"failed to dealloc xrcdn 0x%x\n" , xrcdn); -return err; - }kfree (xrcd); -return 0 ; }
drivers/infiniband/ulp/ipoib/ipoib_main.c +3 -0
@@ -1953,6 +1953,9 @@ static struct net_device *ipoib_add_port(const char *format, goto event_failed; } +/* call event handler to ensure pkey in sync */ +queue_work (ipoib_workqueue, &priv->flush_heavy); + result =register_netdev (priv->dev);if (result) { printk(KERN_WARNING "%s: couldn't register ipoib port %d; error %d\n",
drivers/irqchip/irq-gic-v3.c +1 -1
@@ -589,7 +589,7 @@ static void gic_send_sgi(u64 cluster_id, u16 tlist, unsigned int irq)MPIDR_TO_SGI_AFFINITY (cluster_id,1 ) | tlist << ICC_SGI1R_TARGET_LIST_SHIFT); -pr_debug ("CPU%d: ICC_SGI1R_EL1 %llx\n" ,smp_processor_id (), val); +pr_devel ("CPU%d: ICC_SGI1R_EL1 %llx\n" ,smp_processor_id (), val);gic_write_sgi1r (val); }
drivers/md/bcache/alloc.c +3 -1
@@ -285,8 +285,10 @@ do { \break ; \ \mutex_unlock (&(ca)->set->bucket_lock); \ -if (kthread_should_stop ()) \ +if (kthread_should_stop ()) { \ +set_current_state (TASK_RUNNING ); \return 0 ; \ + } \ \try_to_freeze (); \schedule (); \
drivers/md/bcache/bcache.h +1 -1
@@ -904,7 +904,7 @@ void bcache_write_super(struct cache_set *);int bch_flash_dev_create (struct cache_set *c,uint64_t size); -int bch_cached_dev_attach (struct cached_dev *,struct cache_set *); +int bch_cached_dev_attach (struct cached_dev *,struct cache_set *,uint8_t *);void bch_cached_dev_detach (struct cached_dev *);void bch_cached_dev_run (struct cached_dev *);void bcache_device_stop (struct bcache_device *);
drivers/md/bcache/btree.c +6 -3
@@ -1869,14 +1869,17 @@ void bch_initial_gc_finish(struct cache_set *c)*/ for_each_cache (ca, c, i) {for_each_bucket (b, ca) { -if (fifo_full (&ca->free[RESERVE_PRIO ])) +if (fifo_full (&ca->free[RESERVE_PRIO ]) && +fifo_full (&ca->free[RESERVE_BTREE ]))break ;if (bch_can_invalidate_bucket (ca, b) && !GC_MARK (b)) {__bch_invalidate_one_bucket (ca, b); -fifo_push (&ca->free[RESERVE_PRIO ], - b - ca->buckets); +if (!fifo_push (&ca->free[RESERVE_PRIO ], + b - ca->buckets)) +fifo_push (&ca->free[RESERVE_BTREE ], + b - ca->buckets); } } }
drivers/md/bcache/request.c +1 -1
@@ -633,11 +633,11 @@ static void do_bio_hook(struct search *s, struct bio *orig_bio)static void search_free (struct closure *cl) { struct search *s = container_of(cl, struct search, cl); -bio_complete (s);if (s->iop.bio)bio_put (s->iop.bio); +bio_complete (s);closure_debug_destroy (cl);mempool_free (s, s->d->c->search); }
drivers/md/bcache/super.c +18 -5
@@ -936,7 +936,8 @@ void bch_cached_dev_detach(struct cached_dev *dc)cached_dev_put (dc); } -int bch_cached_dev_attach (struct cached_dev *dc,struct cache_set *c) +int bch_cached_dev_attach (struct cached_dev *dc,struct cache_set *c, +uint8_t *set_uuid) {uint32_t rtime =cpu_to_le32 (get_seconds ());struct uuid_entry *u;
@@ -945,7 +946,8 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c)bdevname (dc->bdev, buf); -if (memcmp (dc->sb.set_uuid, c->sb.set_uuid,16 )) +if ((set_uuid &&memcmp (set_uuid, c->sb.set_uuid,16 )) || + (!set_uuid &&memcmp (dc->sb.set_uuid, c->sb.set_uuid,16 )))return -ENOENT ;if (dc->disk.c) {
@@ -1189,7 +1191,7 @@ static void register_bdev(struct cache_sb *sb, struct page *sb_page,list_add (&dc->list, &uncached_devices);list_for_each_entry (c, &bch_cache_sets, list) -bch_cached_dev_attach (dc, c); +bch_cached_dev_attach (dc, c,NULL );if (BDEV_STATE (&dc->sb) ==BDEV_STATE_NONE ||BDEV_STATE (&dc->sb) ==BDEV_STATE_STALE )
@@ -1711,7 +1713,7 @@ static void run_cache_set(struct cache_set *c)bcache_write_super (c);list_for_each_entry_safe (dc, t, &uncached_devices, list) -bch_cached_dev_attach (dc, c); +bch_cached_dev_attach (dc, c,NULL );flash_devs_run (c);
@@ -1828,6 +1830,7 @@ void bch_cache_release(struct kobject *kobj)static int cache_alloc (struct cache_sb *sb,struct cache *ca) {size_t free; +size_t btree_buckets;struct bucket *b;__module_get (THIS_MODULE );
@@ -1837,9 +1840,19 @@ static int cache_alloc(struct cache_sb *sb, struct cache *ca) ca->journal.bio.bi_max_vecs =8 ; ca->journal.bio.bi_io_vec = ca->journal.bio.bi_inline_vecs; +/* +* when ca->sb.njournal_buckets is not zero, journal exists, +* and in bch_journal_replay(), tree node may split, +* so bucket of RESERVE_BTREE type is needed, +* the worst situation is all journal buckets are valid journal, +* and all the keys need to replay, +* so the number of RESERVE_BTREE type buckets should be as much +* as journal buckets +*/ + btree_buckets = ca->sb.njournal_buckets ?:8 ; free =roundup_pow_of_two (ca->sb.nbuckets) >>10 ; - if (!init_fifo(&ca->free[RESERVE_BTREE], 8, GFP_KERNEL) || + if (!init_fifo(&ca->free[RESERVE_BTREE], btree_buckets, GFP_KERNEL) || !init_fifo_exact(&ca->free[RESERVE_PRIO], prio_buckets(ca), GFP_KERNEL) || !init_fifo(&ca->free[RESERVE_MOVINGGC], free, GFP_KERNEL) || !init_fifo(&ca->free[RESERVE_NONE], free, GFP_KERNEL) ||
drivers/md/bcache/sysfs.c +7 -4
@@ -191,7 +191,7 @@ STORE(__cached_dev) { struct cached_dev *dc = container_of(kobj, struct cached_dev, disk.kobj); -ssize_t v = size; +ssize_t v;struct cache_set *c;struct kobj_uevent_env *env;
@@ -263,17 +263,20 @@ STORE(__cached_dev) }if (attr == &sysfs_attach) { -if (bch_parse_uuid (buf, dc->sb.set_uuid) <16 ) +uint8_t set_uuid[16 ]; + +if (bch_parse_uuid (buf, set_uuid) <16 )return -EINVAL ; + v = -ENOENT ;list_for_each_entry (c, &bch_cache_sets, list) { - v =bch_cached_dev_attach (dc, c); + v =bch_cached_dev_attach (dc, c, set_uuid);if (!v)return size; }pr_err ("Can't attach %s: cache set not found" , buf); - size = v; +return v; }if (attr == &sysfs_detach && dc->disk.c)
drivers/md/bcache/writeback.c +22 -5
@@ -425,19 +425,28 @@ static int bch_writeback_thread(void *arg)while (!kthread_should_stop ()) {down_write (&dc->writeback_lock); -if (!atomic_read (&dc->has_dirty) || - (!test_bit (BCACHE_DEV_DETACHING , &dc->disk.flags) && - !dc->writeback_running)) { +set_current_state (TASK_INTERRUPTIBLE ); +/* +* If the bache device is detaching, skip here and continue +* to perform writeback. Otherwise, if no dirty data on cache, +* or there is dirty data on cache but writeback is disabled, +* the writeback thread should sleep here and wait for others +* to wake up it. +*/ +if (!test_bit (BCACHE_DEV_DETACHING , &dc->disk.flags) && + (!atomic_read (&dc->has_dirty) || !dc->writeback_running)) {up_write (&dc->writeback_lock); -set_current_state (TASK_INTERRUPTIBLE ); -if (kthread_should_stop ()) +if (kthread_should_stop ()) { +set_current_state (TASK_RUNNING );return 0 ; + }try_to_freeze ();schedule ();continue ; } +set_current_state (TASK_RUNNING ); searched_full_index =refill_dirty (dc);
@@ -447,6 +456,14 @@ static int bch_writeback_thread(void *arg)cached_dev_put (dc);SET_BDEV_STATE (&dc->sb,BDEV_STATE_CLEAN );bch_write_bdev_super (dc,NULL ); +/* +* If bcache device is detaching via sysfs interface, +* writeback thread should stop after there is no dirty +* data on cache. BCACHE_DEV_DETACHING flag is set in +* bch_cached_dev_detach(). +*/ +if (test_bit (BCACHE_DEV_DETACHING , &dc->disk.flags)) +break ; }up_write (&dc->writeback_lock);
drivers/md/raid1.c +11 -0
@@ -1686,6 +1686,17 @@ static int raid1_remove_disk(struct mddev *mddev, struct md_rdev *rdev)struct md_rdev *repl = conf->mirrors[conf->raid_disks + number].rdev;freeze_array (conf,0 ); +if (atomic_read (&repl->nr_pending)) { +/* It means that some queued IO of retry_list +* hold repl. Thus, we cannot set replacement +* as NULL, avoiding rdev NULL pointer +* dereference in sync_request_write and +* handle_write_finished. +*/ + err = -EBUSY ; +unfreeze_array (conf); + goto abort; + }clear_bit (Replacement, &repl->flags); p->rdev = repl; conf->mirrors[conf->raid_disks + number].rdev =NULL ;
drivers/md/raid10.c +4 -2
@@ -2630,7 +2630,8 @@ static void handle_write_completed(struct r10conf *conf, struct r10bio *r10_bio)for (m =0 ; m < conf->copies; m++) {int dev = r10_bio->devs[m].devnum; rdev = conf->mirrors[dev].rdev; -if (r10_bio->devs[m].bio ==NULL ) +if (r10_bio->devs[m].bio ==NULL || + r10_bio->devs[m].bio->bi_end_io ==NULL )continue ;if (!r10_bio->devs[m].bio->bi_error) { rdev_clear_badblocks(
@@ -2645,7 +2646,8 @@ static void handle_write_completed(struct r10conf *conf, struct r10bio *r10_bio)md_error (conf->mddev, rdev); } rdev = conf->mirrors[dev].replacement; -if (r10_bio->devs[m].repl_bio ==NULL ) +if (r10_bio->devs[m].repl_bio ==NULL || + r10_bio->devs[m].repl_bio->bi_end_io ==NULL )continue ;if (!r10_bio->devs[m].repl_bio->bi_error) {
drivers/md/raid5.c +4 -3
@@ -2028,15 +2028,16 @@ static int grow_one_stripe(struct r5conf *conf, gfp_t gfp)static int grow_stripes (struct r5conf *conf,int num) {struct kmem_cache *sc; +size_t namelen =sizeof (conf->cache_name[0 ]);int devs =max (conf->raid_disks, conf->previous_raid_disks);if (conf->mddev->gendisk) -sprintf (conf->cache_name[0 ], +snprintf (conf->cache_name[0 ], namelen,"raid%d-%s" , conf->level,mdname (conf->mddev));else -sprintf (conf->cache_name[0 ], +snprintf (conf->cache_name[0 ], namelen,"raid%d-%p" , conf->level, conf->mddev); -sprintf (conf->cache_name[1 ],"%s-alt" , conf->cache_name[0 ]); +snprintf (conf->cache_name[1 ], namelen,"%.27s-alt" , conf->cache_name[0 ]); conf->active_name =0 ; sc = kmem_cache_create(conf->cache_name[conf->active_name],
drivers/media/dvb-core/dmxdev.c +1 -1
@@ -1071,7 +1071,7 @@ static int dvb_demux_do_ioctl(struct file *file,break ;default : - ret = -EINVAL ; + ret = -ENOTTY ;break ; }mutex_unlock (&dmxdev->mutex);
drivers/media/pci/cx23885/cx23885-cards.c +4 -0
@@ -2124,6 +2124,10 @@ void cx23885_card_setup(struct cx23885_dev *dev) &dev->i2c_bus[2 ].i2c_adap, "cx25840", 0x88 >> 1, NULL);if (dev->sd_cx25840) { +/* set host data for clk_freq configuration */ +v4l2_set_subdev_hostdata (dev->sd_cx25840, + &dev->clk_freq); + dev->sd_cx25840->grp_id =CX23885_HW_AV_CORE ;v4l2_subdev_call (dev->sd_cx25840, core, load_fw); }
drivers/media/pci/cx23885/cx23885-core.c +10 -0
@@ -872,6 +872,16 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)if (cx23885_boards[dev->board].clk_freq >0 ) dev->clk_freq = cx23885_boards[dev->board].clk_freq; +if (dev->board ==CX23885_BOARD_HAUPPAUGE_IMPACTVCBE && + dev->pci->subsystem_device ==0x7137 ) { +/* Hauppauge ImpactVCBe device ID 0x7137 is populated +* with an 888, and a 25Mhz crystal, instead of the +* usual third overtone 50Mhz. The default clock rate must +* be overridden so the cx25840 is properly configured +*/ + dev->clk_freq =25000000 ; + } + dev->pci_bus = dev->pci->bus->number; dev->pci_slot =PCI_SLOT (dev->pci->devfn);cx23885_irq_add (dev,0x001f00 );
drivers/media/pci/cx25821/cx25821-core.c +4 -3
@@ -871,6 +871,10 @@ static int cx25821_dev_setup(struct cx25821_dev *dev) dev->nr = ++cx25821_devcount;sprintf (dev->name,"cx25821[%d]" , dev->nr); +if (dev->nr >=ARRAY_SIZE (card)) { +CX25821_INFO ("dev->nr >= %zd" ,ARRAY_SIZE (card)); +return -ENODEV ; + }if (dev->pci->device !=0x8210 ) {pr_info ("%s(): Exiting. Incorrect Hardware device = 0x%02x\n" , __func__, dev->pci->device);
@@ -886,9 +890,6 @@ static int cx25821_dev_setup(struct cx25821_dev *dev) dev->channels[i].sram_channels = &cx25821_sram_channels[i]; } -if (dev->nr >1 ) -CX25821_INFO ("dev->nr > 1!" ); -/* board config */ dev->board =1 ;/* card[dev->nr]; */ dev->_max_num_decoders =MAX_DECODERS ;
drivers/media/platform/s3c-camif/camif-capture.c +4 -3
@@ -1268,16 +1268,17 @@ static void __camif_subdev_try_format(struct camif_dev *camif, {const struct s3c_camif_variant *variant = camif->variant;const struct vp_pix_limits *pix_lim; -int i =ARRAY_SIZE (camif_mbus_formats); +unsigned int i;/* FIXME: constraints against codec or preview path ? */ pix_lim = &variant->vp_pix_limits[VP_CODEC ]; -while (i-- >=0 ) +for (i =0 ; i <ARRAY_SIZE (camif_mbus_formats); i++)if (camif_mbus_formats[i] == mf->code)break ; - mf->code = camif_mbus_formats[i]; +if (i ==ARRAY_SIZE (camif_mbus_formats)) + mf->code = camif_mbus_formats[0 ];if (pad ==CAMIF_SD_PAD_SINK ) { v4l_bound_align_image(&mf->width, 8, CAMIF_MAX_PIX_WIDTH,
drivers/media/usb/em28xx/em28xx.h +1 -1
@@ -187,7 +187,7 @@USB 2.0 spec says bulk packet size is always 512 bytes */ #define EM28XX_BULK_PACKET_MULTIPLIER 384 -#define EM28XX_DVB_BULK_PACKET_MULTIPLIER 384 +#define EM28XX_DVB_BULK_PACKET_MULTIPLIER 94#define EM28XX_INTERLACED_DEFAULT 1
drivers/message/fusion/mptctl.c +2 -0
@@ -2698,6 +2698,8 @@ mptctl_hp_targetinfo(unsigned long arg) __FILE__, __LINE__, iocnum);return -ENODEV ; } +if (karg.hdr.id >=MPT_MAX_FC_DEVICES ) +return -EINVAL ;dctlprintk (ioc,printk (MYIOC_s_DEBUG_FMT"mptctl_hp_targetinfo called.\n" , ioc->name));
drivers/mmc/host/sdhci-iproc.c +25 -5
@@ -32,6 +32,8 @@ struct sdhci_iproc_host {const struct sdhci_iproc_data *data;u32 shadow_cmd;u32 shadow_blk; +bool is_cmd_shadowed; +bool is_blk_shadowed; };#define REG_OFFSET_IN_BITS (reg) ((reg) << 3 & 0x18)
@@ -47,8 +49,22 @@ static inline u32 sdhci_iproc_readl(struct sdhci_host *host, int reg)static u16 sdhci_iproc_readw (struct sdhci_host *host,int reg) { -u32 val =sdhci_iproc_readl (host, (reg & ~3 )); -u16 word = val >>REG_OFFSET_IN_BITS (reg) &0xffff ; +struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host); +struct sdhci_iproc_host *iproc_host =sdhci_pltfm_priv (pltfm_host); +u32 val; +u16 word; + +if ((reg ==SDHCI_TRANSFER_MODE ) && iproc_host->is_cmd_shadowed) { +/* Get the saved transfer mode */ + val = iproc_host->shadow_cmd; + }else if ((reg ==SDHCI_BLOCK_SIZE || reg ==SDHCI_BLOCK_COUNT ) && + iproc_host->is_blk_shadowed) { +/* Get the saved block info */ + val = iproc_host->shadow_blk; + }else { + val =sdhci_iproc_readl (host, (reg & ~3 )); + } + word = val >>REG_OFFSET_IN_BITS (reg) &0xffff ;return word; }
@@ -104,13 +120,15 @@ static void sdhci_iproc_writew(struct sdhci_host *host, u16 val, int reg)if (reg ==SDHCI_COMMAND ) {/* Write the block now as we are issuing a command */ -if (iproc_host->shadow_blk !=0 ) { +if (iproc_host->is_blk_shadowed) {sdhci_iproc_writel (host, iproc_host->shadow_blk,SDHCI_BLOCK_SIZE ); - iproc_host->shadow_blk =0 ; + iproc_host->is_blk_shadowed = false; } oldval = iproc_host->shadow_cmd; - }else if (reg ==SDHCI_BLOCK_SIZE || reg ==SDHCI_BLOCK_COUNT ) { + iproc_host->is_cmd_shadowed = false; + }else if ((reg ==SDHCI_BLOCK_SIZE || reg ==SDHCI_BLOCK_COUNT ) && + iproc_host->is_blk_shadowed) {/* Block size and count are stored in shadow reg */ oldval = iproc_host->shadow_blk; }else {
@@ -122,9 +140,11 @@ static void sdhci_iproc_writew(struct sdhci_host *host, u16 val, int reg)if (reg ==SDHCI_TRANSFER_MODE ) {/* Save the transfer mode until the command is issued */ iproc_host->shadow_cmd = newval; + iproc_host->is_cmd_shadowed = true; }else if (reg ==SDHCI_BLOCK_SIZE || reg ==SDHCI_BLOCK_COUNT ) {/* Save the block info until the command is issued */ iproc_host->shadow_blk = newval; + iproc_host->is_blk_shadowed = true; }else {/* Command or other regular 32-bit write */ sdhci_iproc_writel (host, newval, reg & ~3 );
drivers/net/ethernet/broadcom/bgmac.c +2 -1
@@ -531,7 +531,8 @@ static void bgmac_dma_tx_ring_free(struct bgmac *bgmac,int i;for (i =0 ; i <BGMAC_TX_RING_SLOTS ; i++) { -int len = dma_desc[i].ctl1 &BGMAC_DESC_CTL1_LEN ; +u32 ctl1 =le32_to_cpu (dma_desc[i].ctl1); +unsigned int len = ctl1 &BGMAC_DESC_CTL1_LEN ; slot = &ring->slots[i];dev_kfree_skb (slot->skb);
drivers/net/ethernet/broadcom/bnxt/bnxt.c +3 -0
@@ -2925,6 +2925,9 @@ static int bnxt_hwrm_vnic_set_tpa(struct bnxt *bp, u16 vnic_id, u32 tpa_flags)struct bnxt_vnic_info *vnic = &bp->vnic_info[vnic_id];struct hwrm_vnic_tpa_cfg_input req = {0 }; +if (vnic->fw_vnic_id ==INVALID_HW_RING_ID ) +return 0 ; +bnxt_hwrm_cmd_hdr_init (bp, &req,HWRM_VNIC_TPA_CFG ,-1 ,-1 );if (tpa_flags) {
drivers/net/ethernet/cisco/enic/enic_main.c +7 -3
@@ -1726,6 +1726,8 @@ static int enic_open(struct net_device *netdev) }for (i =0 ; i < enic->rq_count; i++) { +/* enable rq before updating rq desc */ +vnic_rq_enable (&enic->rq[i]);vnic_rq_fill (&enic->rq[i], enic_rq_alloc_buf);/* Need at least one buffer on ring to get going */ if (vnic_rq_desc_used (&enic->rq[i]) ==0 ) {
@@ -1737,8 +1739,6 @@ static int enic_open(struct net_device *netdev)for (i =0 ; i < enic->wq_count; i++)vnic_wq_enable (&enic->wq[i]); -for (i =0 ; i < enic->rq_count; i++) -vnic_rq_enable (&enic->rq[i]);if (!enic_is_dynamic (enic) && !enic_is_sriov_vf (enic))enic_dev_add_station_addr (enic);
@@ -1765,8 +1765,12 @@ static int enic_open(struct net_device *netdev)return 0 ; err_out_free_rq: -for (i =0 ; i < enic->rq_count; i++) +for (i =0 ; i < enic->rq_count; i++) { + err =vnic_rq_disable (&enic->rq[i]); +if (err) +return err;vnic_rq_clean (&enic->rq[i], enic_free_rq_buf); + }enic_dev_notify_unset (enic); err_out_free_intr:enic_unset_affinity_hint (enic);
drivers/net/ethernet/freescale/gianfar.c +3 -4
@@ -3053,9 +3053,6 @@ static void gfar_process_frame(struct net_device *ndev, struct sk_buff *skb)if (ndev->features &NETIF_F_RXCSUM )gfar_rx_checksum (skb, fcb); -/* Tell the skb what kind of packet this is */ - skb->protocol =eth_type_trans (skb, ndev); -/* There's need to check for NETIF_F_HW_VLAN_CTAG_RX here. * Even if vlan rx accel is disabled, on some chips * RXFCB_VLN is pseudo randomly set.
@@ -3126,13 +3123,15 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit)continue ; } +gfar_process_frame (ndev, skb); +/* Increment the number of packets */ total_pkts++; total_bytes += skb->len;skb_record_rx_queue (skb, rx_queue->qindex); -gfar_process_frame (ndev, skb); + skb->protocol =eth_type_trans (skb, ndev);/* Send the packet up the stack */ napi_gro_receive (&rx_queue->grp->napi_rx, skb);
drivers/net/ethernet/intel/e1000e/ich8lan.c +1 -1
@@ -1574,7 +1574,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)* we have already determined whether we have link or not. */ if (!mac->autoneg) -return -E1000_ERR_CONFIG ; +return 1 ;/* Auto-Neg is enabled. Auto Speed Detection takes care * of MAC speed/duplex configuration. So we only need to
drivers/net/ethernet/intel/e1000e/mac.c +1 -1
@@ -450,7 +450,7 @@ s32 e1000e_check_for_copper_link(struct e1000_hw *hw)* we have already determined whether we have link or not. */ if (!mac->autoneg) -return -E1000_ERR_CONFIG ; +return 1 ;/* Auto-Neg is enabled. Auto Speed Detection takes care * of MAC speed/duplex configuration. So we only need to
drivers/net/ethernet/intel/e1000e/netdev.c +2 -2
@@ -2330,8 +2330,8 @@ static int e1000_alloc_ring_dma(struct e1000_adapter *adapter, {struct pci_dev *pdev = adapter->pdev; - ring->desc =dma_alloc_coherent (&pdev->dev, ring->size, &ring->dma, -GFP_KERNEL ); + ring->desc =dma_zalloc_coherent (&pdev->dev, ring->size, &ring->dma, +GFP_KERNEL );if (!ring->desc)return -ENOMEM ;
drivers/net/ethernet/marvell/mvneta.c +1 -0
@@ -818,6 +818,7 @@ static void mvneta_port_up(struct mvneta_port *pp) }mvreg_write (pp,MVNETA_TXQ_CMD , q_map); + q_map =0 ;/* Enable all initialized RXQs. */ mvreg_write (pp,MVNETA_RXQ_CMD ,BIT (rxq_def)); }
drivers/net/ethernet/mellanox/mlx5/core/cmd.c +1 -1
@@ -1623,7 +1623,7 @@ int mlx5_cmd_init(struct mlx5_core_dev *dev) cmd->checksum_disabled =1 ; cmd->max_reg_cmds = (1 << cmd->log_sz) -1 ; - cmd->bitmask = (1 << cmd->max_reg_cmds) -1 ; + cmd->bitmask = (1UL << cmd->max_reg_cmds) -1 ; cmd->cmdif_rev =ioread32be (&dev->iseg->cmdif_rev_fw_sub) >>16 ;if (cmd->cmdif_rev >CMD_IF_REV ) {
drivers/net/ethernet/sun/sunvnet.c +1 -1
@@ -1787,7 +1787,7 @@ static struct vnet *vnet_new(const u64 *local_mac, dev->ethtool_ops = &vnet_ethtool_ops; dev->watchdog_timeo =VNET_TX_TIMEOUT ; - dev->hw_features =NETIF_F_TSO |NETIF_F_GSO |NETIF_F_GSO_SOFTWARE | + dev->hw_features =NETIF_F_TSO |NETIF_F_GSO |NETIF_F_ALL_TSO |NETIF_F_HW_CSUM |NETIF_F_SG ; dev->features = dev->hw_features;
drivers/net/phy/dp83640.c +18 -0
@@ -1203,6 +1203,23 @@ static void dp83640_remove(struct phy_device *phydev)kfree (dp83640); } +static int dp83640_soft_reset (struct phy_device *phydev) +{ +int ret; + + ret =genphy_soft_reset (phydev); +if (ret <0 ) +return ret; + +/* From DP83640 datasheet: "Software driver code must wait 3 us +* following a software reset before allowing further serial MII +* operations with the DP83640." +*/ +udelay (10 );/* Taking udelay inaccuracy into account */ + +return 0 ; +} +static int dp83640_config_init (struct phy_device *phydev) {struct dp83640_private *dp83640 = phydev->priv;
@@ -1496,6 +1513,7 @@ static struct phy_driver dp83640_driver = { .flags = PHY_HAS_INTERRUPT, .probe = dp83640_probe, .remove = dp83640_remove, + .soft_reset = dp83640_soft_reset, .config_init = dp83640_config_init, .config_aneg = genphy_config_aneg, .read_status = genphy_read_status,
drivers/net/usb/qmi_wwan.c +5 -0
@@ -637,6 +637,9 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x0846, 0x68a2, 8)}, {QMI_FIXED_INTF(0x12d1, 0x140c, 1)}, /* Huawei E173 */ {QMI_FIXED_INTF(0x12d1, 0x14ac, 1)}, /* Huawei E1820 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 3)}, /* Wistron NeWeb D18Q1 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 4)}, /* Wistron NeWeb D18Q1 */ + {QMI_FIXED_INTF(0x1435, 0xd181, 5)}, /* Wistron NeWeb D18Q1 */ {QMI_FIXED_INTF(0x16d8, 0x6003, 0)}, /* CMOTech 6003 */ {QMI_FIXED_INTF(0x16d8, 0x6007, 0)}, /* CMOTech CHE-628S */ {QMI_FIXED_INTF(0x16d8, 0x6008, 0)}, /* CMOTech CMU-301 */
@@ -713,6 +716,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, 0x2033, 4)}, /* BroadMobi BM806U */ {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */ {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
@@ -762,6 +766,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x413c, 0x81a9, 8)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ {QMI_FIXED_INTF(0x413c, 0x81b1, 8)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card */ {QMI_FIXED_INTF(0x03f0, 0x4e1d, 8)}, /* HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module */ + {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */ {QMI_FIXED_INTF(0x1e0e, 0x9001, 5)}, /* SIMCom 7230E */
drivers/net/usb/r8152.c +1 -1
@@ -1610,7 +1610,7 @@ static int r8152_tx_agg_fill(struct r8152 *tp, struct tx_agg *agg) tx_data += len; agg->skb_len += len; - agg->skb_num++; + agg->skb_num +=skb_shinfo (skb)->gso_segs ?:1 ;dev_kfree_skb_any (skb);
drivers/net/usb/smsc75xx.c +4 -3
@@ -945,10 +945,11 @@ static int smsc75xx_set_features(struct net_device *netdev,/* it's racing here! */ ret =smsc75xx_write_reg (dev,RFE_CTL , pdata->rfe_ctl); -if (ret <0 ) +if (ret <0 ) {netdev_warn (dev->net,"Error writing RFE_CTL\n" ); - -return ret; +return ret; + } +return 0 ; }static int smsc75xx_wait_ready (struct usbnet *dev,int in_pm)
drivers/net/virtio_net.c +1 -1
@@ -1912,8 +1912,8 @@ static int virtnet_probe(struct virtio_device *vdev)/* Assume link up if device can't report link status, otherwise get link status from config. */ +netif_carrier_off (dev);if (virtio_has_feature (vi->vdev,VIRTIO_NET_F_STATUS )) { -netif_carrier_off (dev);schedule_work (&vi->config_work); }else { vi->status =VIRTIO_NET_S_LINK_UP ;
drivers/net/wireless/ath/ath10k/mac.c +10 -0
@@ -6311,10 +6311,20 @@ static void ath10k_sta_rc_update(struct ieee80211_hw *hw, {struct ath10k *ar = hw->priv;struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv; +struct ath10k_vif *arvif = (void *)vif->drv_priv; +struct ath10k_peer *peer;u32 bw, smps;spin_lock_bh (&ar->data_lock); + peer =ath10k_peer_find (ar, arvif->vdev_id, sta->addr); +if (!peer) { +spin_unlock_bh (&ar->data_lock); +ath10k_warn (ar,"mac sta rc update failed to find peer %pM on vdev %i\n" , + sta->addr, arvif->vdev_id); +return ; + } + ath10k_dbg(ar, ATH10K_DBG_MAC, "mac sta rc update for %pM changed %08x bw %d nss %d smps %d\n", sta->addr, changed, sta->bandwidth, sta->rx_nss,
drivers/net/wireless/mac80211_hwsim.c +3 -1
@@ -2925,8 +2925,10 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)if (info->attrs[HWSIM_ATTR_REG_CUSTOM_REG ]) {u32 idx =nla_get_u32 (info->attrs[HWSIM_ATTR_REG_CUSTOM_REG ]); -if (idx >=ARRAY_SIZE (hwsim_world_regdom_custom)) +if (idx >=ARRAY_SIZE (hwsim_world_regdom_custom)) { +kfree (hwname);return -EINVAL ; + } param.regd = hwsim_world_regdom_custom[idx]; }
drivers/net/xen-netfront.c +24 -22
125 lines not on this page · raw message
drivers/ntb/ntb_transport.c +3 -0
@@ -955,6 +955,9 @@ static int ntb_transport_init_queue(struct ntb_transport_ctx *nt, mw_base = nt->mw_vec[mw_num].phys_addr; mw_size = nt->mw_vec[mw_num].phys_size; +if (max_mw_size && mw_size > max_mw_size) + mw_size = max_mw_size; + tx_size = (unsigned int )mw_size / num_qps_mw; qp_offset = tx_size * (qp_num / mw_count);
drivers/nvme/host/pci.c +4 -1
@@ -1583,7 +1583,7 @@ static int nvme_create_queue(struct nvme_queue *nvmeq, int qid) nvmeq->cq_vector = qid -1 ; result =adapter_alloc_cq (dev, qid, nvmeq);if (result <0 ) -return result; + goto release_vector; result =adapter_alloc_sq (dev, qid, nvmeq);if (result <0 )
@@ -1597,9 +1597,12 @@ static int nvme_create_queue(struct nvme_queue *nvmeq, int qid)return result; release_sq: + dev->online_queues--;adapter_delete_sq (dev, qid); release_cq:adapter_delete_cq (dev, qid); + release_vector: + nvmeq->cq_vector =-1 ;return result; }
drivers/parisc/lba_pci.c +19 -1
@@ -1365,9 +1365,27 @@ lba_hw_init(struct lba_device *d)WRITE_REG32 (stat, d->hba.base_addr +LBA_ERROR_CONFIG ); } -/* Set HF mode as the default (vs. -1 mode). */ + +/* +* Hard Fail vs. Soft Fail on PCI "Master Abort". +* +* "Master Abort" means the MMIO transaction timed out - usually due to +* the device not responding to an MMIO read. We would like HF to be +* enabled to find driver problems, though it means the system will +* crash with a HPMC. +* +* In SoftFail mode "~0L" is returned as a result of a timeout on the +* pci bus. This is like how PCI busses on x86 and most other +* architectures behave. In order to increase compatibility with +* existing (x86) PCI hardware and existing Linux drivers we enable +* Soft Faul mode on PA-RISC now too. +*/ stat =READ_REG32 (d->hba.base_addr +LBA_STAT_CTL ); +#if defined(ENABLE_HARDFAIL )WRITE_REG32 (stat |HF_ENABLE , d->hba.base_addr +LBA_STAT_CTL ); +#else +WRITE_REG32 (stat & ~HF_ENABLE , d->hba.base_addr +LBA_STAT_CTL ); +#endif /* ** Writing a zero to STAT_CTL.rf (bit 0) will clear reset signal
drivers/pci/pci-driver.c +11 -6
@@ -1140,11 +1140,14 @@ static int pci_pm_runtime_suspend(struct device *dev)int error;/* -* If pci_dev->driver is not set (unbound), the device should -* always remain in D0 regardless of the runtime PM status +* If pci_dev->driver is not set (unbound), we leave the device in D0, +* but it may go to D3cold when the bridge above it runtime suspends. +* Save its config space in case that happens. */ -if (!pci_dev->driver) +if (!pci_dev->driver) { +pci_save_state (pci_dev);return 0 ; + }if (!pm || !pm->runtime_suspend)return -ENOSYS ;
@@ -1195,16 +1198,18 @@ static int pci_pm_runtime_resume(struct device *dev)const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm :NULL ;/* -* If pci_dev->driver is not set (unbound), the device should -* always remain in D0 regardless of the runtime PM status +* Restoring config space is necessary even if the device is not bound +* to a driver because although we left it in D0, it may have gone to +* D3cold when the bridge above it runtime suspended. */ +pci_restore_standard_config (pci_dev); +if (!pci_dev->driver)return 0 ;if (!pm || !pm->runtime_resume)return -ENOSYS ; -pci_restore_standard_config (pci_dev);pci_fixup_device (pci_fixup_resume_early, pci_dev);__pci_enable_wake (pci_dev,PCI_D0 , true, false);pci_fixup_device (pci_fixup_resume, pci_dev);
drivers/pci/quirks.c +5 -0
@@ -3614,6 +3614,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9120, quirk_dma_func1_alias);DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9123 , quirk_dma_func1_alias); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9128 , + quirk_dma_func1_alias);/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c14 */ DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9130 , quirk_dma_func1_alias);
@@ -3626,6 +3628,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x917a,/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c46 */ DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x91a0 , quirk_dma_func1_alias); +/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c127 */ +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9220 , + quirk_dma_func1_alias);/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c49 */ DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9230 , quirk_dma_func1_alias);
drivers/regulator/of_regulator.c +1 -0
@@ -274,6 +274,7 @@ int of_regulator_match(struct device *dev, struct device_node *node,dev_err (dev,"failed to parse DT for regulator %s\n" , child->name); +of_node_put (child);return -EINVAL ; } match->of_node =of_node_get (child);
drivers/rtc/hctosys.c +5 -0
@@ -49,6 +49,11 @@ static int __init rtc_hctosys(void) tv64.tv_sec =rtc_tm_to_time64 (&tm); +#if BITS_PER_LONG ==32 +if (tv64.tv_sec >INT_MAX ) + goto err_read; +#endif + err =do_settimeofday64 (&tv64); dev_info(rtc->dev.parent,
drivers/rtc/rtc-snvs.c +11 -4
@@ -132,20 +132,23 @@ static int snvs_rtc_set_time(struct device *dev, struct rtc_time *tm) {struct snvs_rtc_data *data =dev_get_drvdata (dev);unsigned long time; +int ret;rtc_tm_to_time (tm, &time);/* Disable RTC first */ -snvs_rtc_enable (data, false); + ret =snvs_rtc_enable (data, false); +if (ret) +return ret;/* Write 32-bit time to 47-bit timer, leaving 15 LSBs blank */ regmap_write (data->regmap, data->offset +SNVS_LPSRTCLR , time <<CNTR_TO_SECS_SH );regmap_write (data->regmap, data->offset +SNVS_LPSRTCMR , time >> (32 -CNTR_TO_SECS_SH ));/* Enable RTC again */ -snvs_rtc_enable (data, true); + ret =snvs_rtc_enable (data, true); -return 0 ; +return ret; }static int snvs_rtc_read_alarm (struct device *dev,struct rtc_wkalrm *alrm)
@@ -287,7 +290,11 @@ static int snvs_rtc_probe(struct platform_device *pdev)regmap_write (data->regmap, data->offset +SNVS_LPSR ,0xffffffff );/* Enable RTC */ -snvs_rtc_enable (data, true); + ret =snvs_rtc_enable (data, true); +if (ret) { +dev_err (&pdev->dev,"failed to enable rtc %d\n" , ret); + goto error_rtc_device_register; + }device_init_wakeup (&pdev->dev, true);
drivers/rtc/rtc-tx4939.c +4 -2
@@ -86,7 +86,8 @@ static int tx4939_rtc_read_time(struct device *dev, struct rtc_time *tm)for (i =2 ; i <6 ; i++) buf[i] =__raw_readl (&rtcreg->dat);spin_unlock_irq (&pdata->lock); - sec = (buf[5 ] <<24 ) | (buf[4 ] <<16 ) | (buf[3 ] <<8 ) | buf[2 ]; + sec = ((unsigned long )buf[5 ] <<24 ) | (buf[4 ] <<16 ) | + (buf[3 ] <<8 ) | buf[2 ];rtc_time_to_tm (sec, tm);return rtc_valid_tm (tm); }
@@ -147,7 +148,8 @@ static int tx4939_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm) alrm->enabled = (ctl &TX4939_RTCCTL_ALME ) ?1 :0 ; alrm->pending = (ctl &TX4939_RTCCTL_ALMD ) ?1 :0 ;spin_unlock_irq (&pdata->lock); - sec = (buf[5 ] <<24 ) | (buf[4 ] <<16 ) | (buf[3 ] <<8 ) | buf[2 ]; + sec = ((unsigned long )buf[5 ] <<24 ) | (buf[4 ] <<16 ) | + (buf[3 ] <<8 ) | buf[2 ];rtc_time_to_tm (sec, &alrm->time);return rtc_valid_tm (&alrm->time); }
drivers/s390/cio/device_fsm.c +5 -2
@@ -822,6 +822,7 @@ ccw_device_online_timeout(struct ccw_device *cdev, enum dev_event dev_event)ccw_device_set_timeout (cdev,0 ); cdev->private->iretry =255 ; + cdev->private->async_kill_io_rc = -ETIMEDOUT ; ret =ccw_device_cancel_halt_clear (cdev);if (ret == -EBUSY ) {ccw_device_set_timeout (cdev,3 *HZ );
@@ -898,7 +899,7 @@ ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event)/* OK, i/o is dead now. Call interrupt handler. */ if (cdev->handler) cdev->handler (cdev, cdev->private->intparm, -ERR_PTR (-EIO )); +ERR_PTR (cdev->private->async_kill_io_rc)); } static void
@@ -915,14 +916,16 @@ ccw_device_killing_timeout(struct ccw_device *cdev, enum dev_event dev_event)ccw_device_online_verify (cdev,0 );if (cdev->handler) cdev->handler (cdev, cdev->private->intparm, -ERR_PTR (-EIO )); +ERR_PTR (cdev->private->async_kill_io_rc)); }void ccw_device_kill_io (struct ccw_device *cdev) {int ret; +ccw_device_set_timeout (cdev,0 ); cdev->private->iretry =255 ; + cdev->private->async_kill_io_rc = -EIO ; ret =ccw_device_cancel_halt_clear (cdev);if (ret == -EBUSY ) {ccw_device_set_timeout (cdev,3 *HZ );
drivers/s390/cio/io_sch.h +1 -0
@@ -155,6 +155,7 @@ struct ccw_device_private {unsigned long intparm;/* user interruption parameter */ struct qdio_irq *qdio_data;struct irb irb;/* device status */ +int async_kill_io_rc;struct senseid senseid;/* SenseID info */ struct pgid pgid[8 ];/* path group IDs per chpid*/ struct ccw1 iccws[2 ];/* ccws for SNID/SID/SPGID commands */
drivers/scsi/aacraid/commsup.c +3 -1
@@ -1321,9 +1321,10 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced) host = aac->scsi_host_ptr;scsi_block_requests (host);aac_adapter_disable_int (aac); -if (aac->thread->pid != current->pid) { +if (aac->thread && aac->thread->pid != current->pid) {spin_unlock_irq (host->host_lock);kthread_stop (aac->thread); + aac->thread =NULL ; jafo =1 ; }
@@ -1392,6 +1393,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced) aac->name);if (IS_ERR (aac->thread)) { retval =PTR_ERR (aac->thread); + aac->thread =NULL ; goto out; } }
drivers/scsi/aacraid/linit.c +4 -1
@@ -1085,6 +1085,7 @@ static void __aac_shutdown(struct aac_dev * aac)up (&fib->event_wait); }kthread_stop (aac->thread); + aac->thread =NULL ; }aac_send_shutdown (aac);aac_adapter_disable_int (aac);
@@ -1189,8 +1190,10 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)* Map in the registers from the adapter. */ aac->base_size =AAC_MIN_FOOTPRINT_SIZE ; -if ((*aac_drivers[index].init)(aac)) +if ((*aac_drivers[index].init)(aac)) { + error = -ENODEV ; goto out_unmap; + }if (aac->sync_mode) {if (aac_sync_mode)
drivers/scsi/arm/fas216.c +1 -1
@@ -2009,7 +2009,7 @@ static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt,* have valid data in the sense buffer that could * confuse the higher levels. */ -memset (SCpnt->sense_buffer,0 ,sizeof (SCpnt->sense_buffer)); +memset (SCpnt->sense_buffer,0 ,SCSI_SENSE_BUFFERSIZE );//printk("scsi%d.%c: sense buffer: ", info->host->host_no, '0' + SCpnt->device->id); //{ int i; for (i = 0; i < 32; i++) printk("%02x ", SCpnt->sense_buffer[i]); printk("\n"); } /*
drivers/scsi/bnx2fc/bnx2fc_io.c +1 -0
@@ -1858,6 +1858,7 @@ void bnx2fc_process_scsi_cmd_compl(struct bnx2fc_cmd *io_req,/* we will not receive ABTS response for this IO */ BNX2FC_IO_DBG (io_req,"Timer context finished processing " "this scsi cmd\n" ); +return ; }/* Cancel the timeout_work, as we received IO completion */
drivers/scsi/lpfc/lpfc_attr.c +5 -0
@@ -634,7 +634,12 @@ lpfc_issue_lip(struct Scsi_Host *shost)LPFC_MBOXQ_t *pmboxq;int mbxstatus =MBXERR_ERROR ; +/* +* If the link is offline, disabled or BLOCK_MGMT_IO +* it doesn't make any sense to allow issue_lip +*/ if ((vport->fc_flag &FC_OFFLINE_MODE ) || + (phba->hba_flag &LINK_DISABLED ) || (phba->sli.sli_flag &LPFC_BLOCK_MGMT_IO ))return -EPERM ;
drivers/scsi/lpfc/lpfc_hbadisc.c +3 -2
@@ -691,8 +691,9 @@ lpfc_work_done(struct lpfc_hba *phba) (phba->hba_flag & HBA_SP_QUEUE_EVT)) {if (pring->flag &LPFC_STOP_IOCB_EVENT ) { pring->flag |=LPFC_DEFERRED_RING_EVENT ; -/* Set the lpfc data pending flag */ -set_bit (LPFC_DATA_READY , &phba->data_flags); +/* Preserve legacy behavior. */ +if (!(phba->hba_flag &HBA_SP_QUEUE_EVT )) +set_bit (LPFC_DATA_READY , &phba->data_flags); }else {if (phba->link_state >=LPFC_LINK_UP ) { pring->flag &= ~LPFC_DEFERRED_RING_EVENT ;
drivers/scsi/lpfc/lpfc_sli.c +2 -0
@@ -115,6 +115,8 @@ lpfc_sli4_wq_put(struct lpfc_queue *q, union lpfc_wqe *wqe)/* set consumption flag every once in a while */ if (!((q->host_index +1 ) % q->entry_repost))bf_set (wqe_wqec, &wqe->generic.wqe_com,1 ); +else +bf_set (wqe_wqec, &wqe->generic.wqe_com,0 );if (q->phba->sli3_options &LPFC_SLI4_PHWQ_ENABLED )bf_set (wqe_wqid, &wqe->generic.wqe_com, q->queue_id);lpfc_sli_pcimem_bcopy (wqe, temp_wqe, q->entry_size);
drivers/scsi/mpt3sas/mpt3sas_scsih.c +1 -1
@@ -8637,7 +8637,7 @@ _scsih_probe(struct pci_dev *pdev, const struct pci_device_id *id)snprintf (ioc->firmware_event_name,sizeof (ioc->firmware_event_name),"fw_event_%s%d" , ioc->driver_name, ioc->id); ioc->firmware_event_thread =alloc_ordered_workqueue ( - ioc->firmware_event_name,WQ_MEM_RECLAIM ); + ioc->firmware_event_name,0 );if (!ioc->firmware_event_thread) {pr_err (MPT3SAS_FMT "failure at %s:%d/%s()!\n" , ioc->name, __FILE__, __LINE__, __func__);
drivers/scsi/qla2xxx/qla_isr.c +4 -2
@@ -268,7 +268,8 @@ qla2x00_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)struct device_reg_2xxx __iomem *reg = &ha->iobase->isp;/* Read all mbox registers? */ - mboxes = (1 << ha->mbx_count) -1 ; +WARN_ON_ONCE (ha->mbx_count >32 ); + mboxes = (1ULL << ha->mbx_count) -1 ;if (!ha->mcp)ql_dbg (ql_dbg_async, vha,0x5001 ,"MBX pointer ERROR.\n" );else
@@ -2495,7 +2496,8 @@ qla24xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)struct device_reg_24xx __iomem *reg = &ha->iobase->isp24;/* Read all mbox registers? */ - mboxes = (1 << ha->mbx_count) -1 ; +WARN_ON_ONCE (ha->mbx_count >32 ); + mboxes = (1ULL << ha->mbx_count) -1 ;if (!ha->mcp)ql_dbg (ql_dbg_async, vha,0x504e ,"MBX pointer ERROR.\n" );else
drivers/scsi/qla4xxx/ql4_def.h +2 -0
@@ -168,6 +168,8 @@#define DEV_DB_NON_PERSISTENT 0#define DEV_DB_PERSISTENT 1 +#define QL4_ISP_REG_DISCONNECT 0xffffffffU +#define COPY_ISID (dst_isid, src_isid) { \ int i, j; \ for (i = 0, j = ISID_SIZE - 1; i < ISID_SIZE;) \
drivers/scsi/qla4xxx/ql4_os.c +46 -0
95 lines not on this page · raw message
drivers/scsi/sd.c +2 -1
@@ -2395,6 +2395,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer)int res;struct scsi_device *sdp = sdkp->device;struct scsi_mode_data data; +int disk_ro =get_disk_ro (sdkp->disk);int old_wp = sdkp->write_prot;set_disk_ro (sdkp->disk,0 );
@@ -2435,7 +2436,7 @@ sd_read_write_protect_flag(struct scsi_disk *sdkp, unsigned char *buffer) "Test WP failed, assume Write Enabled\n"); }else { sdkp->write_prot = ((data.device_specific &0x80 ) !=0 ); -set_disk_ro (sdkp->disk, sdkp->write_prot); +set_disk_ro (sdkp->disk, sdkp->write_prot || disk_ro);if (sdkp->first_scan || old_wp != sdkp->write_prot) {sd_printk (KERN_NOTICE , sdkp,"Write Protect is %s\n" , sdkp->write_prot ?"on" :"off" );
drivers/scsi/sr.c +17 -4
@@ -522,6 +522,8 @@ static int sr_block_open(struct block_device *bdev, fmode_t mode)struct scsi_cd *cd;int ret = -ENXIO ; +check_disk_change (bdev); +mutex_lock (&sr_mutex); cd =scsi_cd_get (bdev->bd_disk);if (cd) {
@@ -582,18 +584,28 @@ out:static unsigned int sr_block_check_events (struct gendisk *disk,unsigned int clearing) { -struct scsi_cd *cd =scsi_cd (disk); +unsigned int ret =0 ; +struct scsi_cd *cd; -if (atomic_read (&cd->device->disk_events_disable_depth)) + cd =scsi_cd_get (disk); +if (!cd)return 0 ; -return cdrom_check_events (&cd->cdi, clearing); +if (!atomic_read (&cd->device->disk_events_disable_depth)) + ret =cdrom_check_events (&cd->cdi, clearing); + +scsi_cd_put (cd); +return ret; }static int sr_block_revalidate_disk (struct gendisk *disk) { -struct scsi_cd *cd =scsi_cd (disk);struct scsi_sense_hdr sshdr; +struct scsi_cd *cd; + + cd =scsi_cd_get (disk); +if (!cd) +return -ENXIO ;/* if the unit is not ready, nothing more to do */ if (scsi_test_unit_ready (cd->device,SR_TIMEOUT ,MAX_RETRIES , &sshdr))
@@ -602,6 +614,7 @@ static int sr_block_revalidate_disk(struct gendisk *disk)sr_cd_check (&cd->cdi);get_sectorsize (cd); out: +scsi_cd_put (cd);return 0 ; }
drivers/scsi/storvsc_drv.c +1 -1
@@ -1538,7 +1538,7 @@ static struct scsi_host_template scsi_driver = { .eh_timed_out = storvsc_eh_timed_out, .slave_alloc = storvsc_device_alloc, .slave_configure = storvsc_device_configure, - .cmd_per_lun = 255, + .cmd_per_lun = 2048, .this_id = -1, .use_clustering = ENABLE_CLUSTERING,/* Make sure we dont get a sg segment crosses a page boundary */
drivers/scsi/sym53c8xx_2/sym_hipd.c +1 -1
@@ -536,7 +536,7 @@ sym_getsync(struct sym_hcb *np, u_char dt, u_char sfac, u_char *divp, u_char *fa* Look for the greatest clock divisor that allows an * input speed faster than the period. */ -while (div-- >0 ) +while (--div >0 )if (kpc >= (div_10M[div] <<2 ))break ;/*
drivers/scsi/ufs/ufshcd.c +2 -0
@@ -2923,6 +2923,8 @@ static int ufshcd_slave_alloc(struct scsi_device *sdev)/* REPORT SUPPORTED OPERATION CODES is not supported */ sdev->no_report_opcodes =1 ; +/* WRITE_SAME command is not supported */ + sdev->no_write_same =1 ;ufshcd_set_queue_depth (sdev);
drivers/staging/rtl8192u/r8192U_core.c +2 -0
@@ -1749,6 +1749,8 @@ static short rtl8192_usb_initendpoints(struct net_device *dev) priv->rx_urb[16 ] =usb_alloc_urb (0 ,GFP_KERNEL ); priv->oldaddr =kmalloc (16 ,GFP_KERNEL ); +if (!priv->oldaddr) +return -ENOMEM ; oldaddr = priv->oldaddr; align = ((long )oldaddr) &3 ;if (align) {
drivers/tty/serial/arc_uart.c +5 -0
@@ -597,6 +597,11 @@ static int arc_serial_probe(struct platform_device *pdev)if (dev_id <0 ) dev_id =0 ; +if (dev_id >=ARRAY_SIZE (arc_uart_ports)) { +dev_err (&pdev->dev,"serial%d out of range\n" , dev_id); +return -EINVAL ; + } + uart = &arc_uart_ports[dev_id]; port = &uart->port;
drivers/tty/serial/fsl_lpuart.c +4 -0
@@ -1818,6 +1818,10 @@ static int lpuart_probe(struct platform_device *pdev)dev_err (&pdev->dev,"failed to get alias id, errno %d\n" , ret);return ret; } +if (ret >=ARRAY_SIZE (lpuart_ports)) { +dev_err (&pdev->dev,"serial%d out of range\n" , ret); +return -EINVAL ; + } sport->port.line = ret; sport->lpuart32 =of_device_is_compatible (np,"fsl,ls1021a-lpuart" );
drivers/tty/serial/imx.c +6 -0
@@ -1923,6 +1923,12 @@ static int serial_imx_probe(struct platform_device *pdev)else if (ret <0 )return ret; +if (sport->port.line >=ARRAY_SIZE (imx_ports)) { +dev_err (&pdev->dev,"serial%d out of range\n" , + sport->port.line); +return -EINVAL ; + } + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); base =devm_ioremap_resource (&pdev->dev, res);if (IS_ERR (base))
drivers/tty/serial/mxs-auart.c +4 -0
@@ -1274,6 +1274,10 @@ static int mxs_auart_probe(struct platform_device *pdev) s->port.line = pdev->id <0 ?0 : pdev->id; else if (ret < 0) return ret; + if (s->port.line >= ARRAY_SIZE(auart_port)) { +dev_err (&pdev->dev,"serial%d out of range\n" , s->port.line); +return -EINVAL ; + }if (of_id) { pdev->id_entry = of_id->data;
drivers/tty/serial/samsung.c +4 -0
@@ -1807,6 +1807,10 @@ static int s3c24xx_serial_probe(struct platform_device *pdev)dbg ("s3c24xx_serial_probe(%p) %d\n" , pdev, index); +if (index >=ARRAY_SIZE (s3c24xx_serial_ports)) { +dev_err (&pdev->dev,"serial%d out of range\n" , index); +return -EINVAL ; + } ourport = &s3c24xx_serial_ports[index]; ourport->drv_data =s3c24xx_get_driver_data (pdev);
drivers/tty/serial/xilinx_uartps.c +1 -1
@@ -1026,7 +1026,7 @@ static struct uart_port *cdns_uart_get_port(int id)struct uart_port *port;/* Try the given port id if failed use default method */ -if (cdns_uart_port[id].mapbase !=0 ) { +if (id <CDNS_UART_NR_PORTS && cdns_uart_port[id].mapbase !=0 ) {/* Find the next unused port */ for (id =0 ; id <CDNS_UART_NR_PORTS ; id++)if (cdns_uart_port[id].mapbase ==0 )
drivers/usb/dwc2/core.h +1 -1
@@ -187,7 +187,7 @@ struct dwc2_hsotg_ep {unsigned char dir_in;unsigned char index;unsigned char mc; -unsigned char interval; +u16 interval; unsigned int halted:1; unsigned int periodic:1;
drivers/usb/dwc2/gadget.c +6 -6
@@ -2424,12 +2424,6 @@ void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *hsotg,dwc2_writel (dwc2_hsotg_ep0_mps (hsotg->eps_out[0 ]->ep.maxpacket) |DXEPCTL_USBACTEP , hsotg->regs +DIEPCTL0 ); -dwc2_hsotg_enqueue_setup (hsotg); - -dev_dbg (hsotg->dev,"EP0: DIEPCTL0=0x%08x, DOEPCTL0=0x%08x\n" , -dwc2_readl (hsotg->regs +DIEPCTL0 ), -dwc2_readl (hsotg->regs +DOEPCTL0 )); -/* clear global NAKs */ val =DCTL_CGOUTNAK |DCTL_CGNPINNAK ;if (!is_usb_reset)
@@ -2440,6 +2434,12 @@ void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *hsotg,mdelay (3 ); hsotg->lx_state =DWC2_L0 ; + +dwc2_hsotg_enqueue_setup (hsotg); + +dev_dbg (hsotg->dev,"EP0: DIEPCTL0=0x%08x, DOEPCTL0=0x%08x\n" , +dwc2_readl (hsotg->regs +DIEPCTL0 ), +dwc2_readl (hsotg->regs +DOEPCTL0 ));
Lines of this file are not shown. View the raw message.
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_string.tc new file +46 -0
46 lines not on this page · raw message
tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_syntax.tc new file +97 -0
97 lines not on this page · raw message
tools/testing/selftests/ftrace/test.d/kprobe/probepoint.tc new file +43 -0
43 lines not on this page · raw message
tools/testing/selftests/memfd/config new file +1 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/net/psock_fanout.c +2 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/mm/subpage_prot.c +14 -0
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.