* [PATCH 3.18 000/178] 3.18.15-review
@ 2015-06-08 13:39 Sasha Levin
0 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
This is the start of the stable review cycle for the 3.18.15 release.
There are 178 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Adam Honse (1):
ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample
rate
Al Viro (3):
path_openat(): fix double fput()
coredump: accept any write method
d_walk() might skip too much
Alban Bedel (1):
iio:st_sensors: Fix oops when probing SPI devices
Alex Deucher (3):
drm/radeon: add new bonaire pci id
drm/radeon: retry dcpd fetch
drm/radeon: don't share plls if monitors differ in audio support
Alexey Khoroshilov (1):
sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND)
Andi Kleen (1):
tools/vm: fix page-flags build
Andrea Arcangeli (1):
kvm: fix crash in kvm_vcpu_reload_apic_access_page
Andy Grover (1):
target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST
Ansgar Hegerfeld (1):
ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450
Anton Blanchard (1):
powerpc: Align TOC to 256 bytes
Axel Lin (1):
ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls
Ben Hutchings (1):
xen-pciback: Add name prefix to global 'permissive' variable
Bob Copeland (1):
omfs: fix sign confusion for bitmap loop counter
Boris Ostrovsky (4):
xen/events: Clear cpu_evtchn_mask before resuming
xen/xenbus: Update xenbus event channel on resume
xen/console: Update console event channel on resume
xen/events: Set irq_info->evtchn before binding the channel to CPU in
__startup_pirq()
Borislav Petkov (1):
x86/mce: Fix MCE severity messages
Chen Yucong (1):
x86, mce, severity: Extend the the mce_severity mechanism to handle
UCNA/DEFERRED error
Chris Bainbridge (1):
ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook
Chris Lesiak (1):
hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
Christian König (6):
drm/radeon: disable semaphores for UVD V1 (v2)
drm/radeon: make VCE handle check more strict
drm/radeon: make UVD handle checking more strict
drm/radeon: more strictly validate the UVD codec
drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling
drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR
handling"
Christoph Hellwig (1):
nfsd: fix the check for confirmed openowner in
nfs4_preprocess_stateid_op
Chuanxiao Dong (1):
mmc: card: Don't access RPMB partitions for normal read/write
Dan Williams (1):
ahci: avoton port-disable reset-quirk
Darrick J. Wong (1):
jbd2: fix r_count overflows leading to buffer overflow in journal
recovery
Dave Chinner (2):
xfs: xfs_attr_inactive leaves inconsistent attr fork state behind
xfs: xfs_iozero can return positive errno
David Henningsson (3):
ALSA: hda - Add headset mic quirk for Dell Inspiron 5548
ALSA: hda - Fix headset mic and mic-in for a Dell desktop
ALSA: hda - Disable Headphone Mic boost for ALC662
David Vrabel (1):
xen/events: don't bind non-percpu VIRQs with percpu chip
Doug Anderson (1):
pinctrl: Don't just pretend to protect pinctrl_maps, do it for real
Eric W. Biederman (3):
mnt: Fix fs_fully_visible to verify the root directory is visible
mnt: Fail collect_mounts when applied to unmounted mounts
fs_pin: Allow for the possibility that m_list or s_list go unused.
Eric Wong (1):
ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate
Eryu Guan (1):
ext4: check for zero length extent explicitly
Fabio Estevam (1):
ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO
Frank C Guenther (1):
ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003)
Gabriele Mazzotta (2):
libata: Add helper to determine when PHY events should be ignored
libata: Ignore spurious PHY event on LPM policy change
Gregory CLEMENT (1):
ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC
Grygorii Strashko (1):
mmc: core: add missing pm event in mmc_pm_notify to fix hib restore
Guenter Roeck (2):
hwmon: (nct6775) Add missing sysfs attribute initialization
hwmon: (nct6683) Add missing sysfs attribute initialization
Hans de Goede (1):
usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices
Harald Freudenberger (1):
crypto: s390/ghash - Fix incorrect ghash icv buffer handling.
Helge Deller (1):
parisc,metag: Fix crashes due to stack randomization on
stack-grows-upwards architectures
Hui Wang (1):
ALSA: hda - fix headset mic detection problem for one more machine
Ilya Dryomov (2):
Revert "libceph: clear r_req_lru_item in
__unregister_linger_request()"
Revert "libceph: clear r_req_lru_item in
__unregister_linger_request()"
Ingo Molnar (1):
x86/fpu: Disable XSAVES* support for now
Jan Kara (1):
lib: Fix strnlen_user() to not touch memory after specified maximum
Jani Nikula (1):
drm/i915/dp: there is no audio on port A
Janusz Dziedzic (1):
mac80211: move WEP tailroom size check
Jason A. Donenfeld (2):
USB: visor: Match I330 phone more precisely
USB: pl2303: Remove support for Samsung I330
Jason Gunthorpe (1):
RDMA/CMA: Canonize IPv4 on IPV6 sockets properly
Jean Delvare (1):
firmware: dmi_scan: Fix ordering of product_uuid
Joe Lawrence (1):
xhci: gracefully handle xhci_irq dead device
Joe Turner (1):
ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate
Johan Hovold (1):
gpio: sysfs: fix memory leaks and device hotplug
Johannes Berg (1):
mac80211: don't use napi_gro_receive() outside NAPI context
John Stultz (1):
ktime: Fix ktime_divns to do signed division
Junxiao Bi (1):
ocfs2: dlm: fix race between purge and get lock resource
Jurgen Kramer (3):
ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs
ALSA: usb-audio: Add mode select quirk for Denon/Marantz DACs
ALSA: usb-audio: add native DSD support for Matrix Audio DACs
K. Y. Srinivasan (1):
storvsc: Set the SRB flags correctly when no data transfer is needed
Kailang Yang (6):
ALSA: hda/realtek - Support Dell headset mode for ALC256
ALSA: hda/realtek - Support headset mode for ALC286/288
ALSA: hda/realtek - Fix typo for ALC286/ALC288
ALSA: hda/realtek - Add ALC298 alias name for Dell
ALSA: hda/realtek - Support headset mode for ALC298
ALSA: hda/realtek - Add ALC256 alias name for Dell
Koro Chen (1):
ASoC: dapm: Modify widget stream name according to prefix
Krzysztof Opasiak (1):
usb: gadget: configfs: Fix interfaces array NULL-termination
Larry Finger (1):
rtlwifi: rtl8192cu: Fix kernel deadlock
Liad Kaufman (1):
iwlwifi: pcie: prevent using unmapped memory in fw monitor
Liang Li (1):
kvm/fpu: Enable eager restore kvm FPU for MPX
Ludovic Desroches (1):
mmc: atmel-mci: fix bad variable type for clkdiv
Lukas Czerner (1):
ext4: fix NULL pointer dereference when journal restart fails
Lukas Wunner (1):
drm/i915: Add missing MacBook Pro models with dual channel LVDS
Lv Zheng (4):
ACPICA: Tables: Change acpi_find_root_pointer() to use
acpi_physical_address.
ACPICA: Utilities: Cleanup to enforce
ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR().
ACPICA: Utilities: Cleanup to convert physical address printing
formats.
ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx
helpers.
Malcolm Priestley (1):
staging: vt6656: use ieee80211_tx_info to select packet type.
Marek Vasut (1):
ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name
Mario Kleiner (1):
drm: Zero out invalid vblank timestamp in drm_update_vblank_count.
Mark Edwards (1):
USB: cp210x: add ID for KCF Technologies PRN device
Mark Hounschell (1):
sd: Disable support for 256 byte/sector disks
Mark Rutland (2):
ARM: 8307/1: psci: move psci firmware calls out of line
ARM: 8356/1: mm: handle non-pmd-aligned end of RAM
Markus Pargmann (1):
ARM: dts: imx25: Add #pwm-cells to pwm4
Martin K. Petersen (2):
libata: Update Crucial/Micron blacklist
libata: Blacklist queued TRIM on all Samsung 800-series
Martin Schwidefsky (1):
s390/mm: correct return value of pmd_pfn
Mathias Nyman (2):
xhci: fix isoc endpoint dequeue from advancing too far on transaction
error
xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256
Mel Gorman (1):
mm, numa: really disable NUMA balancing by default on single node
machines
Michael Brunner (1):
gpio: gpio-kempld: Fix get_direction return value
Miklos Szeredi (1):
ovl: mount read-only if workdir can't be created
Ming Lei (2):
blk-mq: fix race between timeout and CPU hotplug
blk-mq: fix CPU hotplug handling
Nadav Haklai (1):
thermal: armada: Update Armada 380 thermal sensor coefficients
Naoya Horiguchi (2):
mm/memory-failure: call shake_page() when error hits thp tail page
mm: soft-offline: fix num_poisoned_pages counting on concurrent events
NeilBrown (1):
md/raid5: don't record new size if resize_stripes fails.
Nicolas Pitre (1):
ktime: Optimize ktime_divns for constant divisors
Nicolas Schichan (1):
ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction.
Pan Xinhui (1):
tty/n_gsm.c: fix a memory leak when gsmtty is removed
Panu Matilainen (1):
ALSA: usb-audio: Add support for Zoom R16/24 capture and midi
interfaces
Paolo Bonzini (2):
Revert "KVM: x86: drop fpu_activate hook"
KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages
Pavel Machek (1):
ARM: dts: OMAP3-N900: Add microphone bias voltages
Philipp Zabel (1):
ARM: dts: imx6: phyFLEX: USB VBUS control is active-high
Philippe Reynes (1):
ARM: dts: imx27: only map 4 Kbyte for fec registers
Rabin Vincent (1):
Revert "dm crypt: fix deadlock when async crypto algorithm returns
-EBUSY"
Rafael J. Wysocki (1):
ACPI / init: Fix the ordering of acpi_reserve_resources()
Russell King (1):
ARM: fix missing syscall trace exit
Rusty Russell (1):
lguest: fix out-by-one error in address checking.
Ryusuke Konishi (1):
nilfs2: fix sanity check of btree level in nilfs_btree_root_broken()
Sasha Levin (2):
fs, omfs: add NULL terminator in the end up the token list
vfs: read file_handle only once in handle_to_path
Scott Branden (1):
rt2x00: add new rt2800usb device DWA 130
Scott Mayhew (1):
svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures
Srinivas Pandruvada (2):
iio: light: hid-sensor-prox: Fix modifier
iio: pressure: hid-sensor-press: Fix modifier
Stefan Wahren (1):
ARM: dts: imx23-olinuxino: Fix dr_mode of usb0
Stephane Eranian (1):
perf/x86/rapl: Enable Broadwell-U RAPL support
Steven Rostedt (1):
module: Call module notifier on failure after complete_formation()
Sławomir Demeszko (1):
staging: gdm724x: Correction of variable usage after applying ALIGN()
Takashi Iwai (11):
ALSA: usb-audio: Check Marantz/Denon USB DACs in a single place
ALSA: usb-audio: Add quirk for MS LifeCam Studio
ALSA: hda - Enable widget power saving for Realtek codecs
ALSA: hda/realtek - Fix the regression by widget power-saving
ALSA: hda - Add headphone quirk for Lifebook E752
ALSA: hda/realtek - Fix a typo
ALSA: hda - Disable widget power-saving for ALC292 & co
ALSA: hda - Fix lost sound due to stream_pm ops cleanup
Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"
ALSA: hda - Add AZX_DCAPS_SNOOP_OFF (and refactor snoop setup)
ALSA: hda - Fix noise on AMD radeon 290x controller
Takeshi Kihara (1):
mmc: sh_mmcif: Fix timeout value for command request
Tatyana Nikolova (1):
RDMA/core: Fix for parsing netlink string attribute
Tejun Heo (1):
writeback: use |1 instead of +1 to protect against div by zero
Thomas Betker (4):
iio: adc: xilinx: Fix register addresses
iio: adc: xilinx: Fix "vccaux" channel .address
iio: adc: xilinx: Fix VREFP scale
iio: adc: xilinx: Fix VREFN sign
Thomas Gleixner (1):
sched: Handle priority boosted tasks proper in setscheduler()
Thomas Petazzoni (1):
ARM: mvebu: do not register custom DMA operations when coherency is
disabled
Tony Lindgren (1):
ARM: OMAP2+: Fix omap off idle power consumption creeping up
Ulf Hansson (3):
ARM: ux500: Move GPIO regulator for SD-card into board DTSs
ARM: ux500: Enable GPIO regulator for SD-card for HREF boards
ARM: ux500: Enable GPIO regulator for SD-card for snowball
Vineet Gupta (1):
ARC: unbork !LLSC build
Vittorio G (VittGam) (1):
ALSA: usb-audio: Add quirk for MS LifeCam HD-3000
Wei Yongjun (1):
power/reset: at91: fix return value check in
at91_reset_platform_probe()
Witold Szczeponik (1):
ACPI / PNP: add two IDs to list for PNPACPI device enumeration
Xi Wang (1):
arm64: bpf: fix signedness bug in loading 64-bit immediate
Xiao Guangrong (2):
KVM: MMU: fix smap permission check
KVM: MMU: fix SMAP virtualization
Zidan Wang (2):
ASoC: wm8960: fix "RINPUT3" audio route error
ASoC: wm8994: correct BCLK DIV 348 to 384
huaibin Wang (1):
xfrm: release dst_orig in case of error in xfrm_lookup()
monk.liu (1):
drm/radeon: fix userptr BO unpin bug v3
.../devicetree/bindings/dma/fsl-mxs-dma.txt | 2 +-
Documentation/virtual/kvm/mmu.txt | 18 ++-
arch/arc/include/asm/atomic.h | 2 +-
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 +
arch/arm/boot/dts/imx23-olinuxino.dts | 4 +-
arch/arm/boot/dts/imx25.dtsi | 1 +
arch/arm/boot/dts/imx27.dtsi | 2 +-
arch/arm/boot/dts/imx28.dtsi | 2 +-
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 2 +
arch/arm/boot/dts/omap3-n900.dts | 4 +
arch/arm/boot/dts/ste-dbx5x0.dtsi | 17 --
arch/arm/boot/dts/ste-href.dtsi | 15 ++
arch/arm/boot/dts/ste-snowball.dts | 13 ++
arch/arm/kernel/Makefile | 2 +-
arch/arm/kernel/entry-common.S | 4 +-
arch/arm/kernel/psci-call.S | 31 ++++
arch/arm/kernel/psci.c | 39 +----
arch/arm/mach-mvebu/coherency.c | 5 +-
arch/arm/mach-omap2/prm-regbits-34xx.h | 1 +
arch/arm/mach-omap2/prm-regbits-44xx.h | 1 +
arch/arm/mach-omap2/vc.c | 12 +-
arch/arm/mach-omap2/vc.h | 2 +
arch/arm/mach-omap2/vc3xxx_data.c | 1 +
arch/arm/mach-omap2/vc44xx_data.c | 1 +
arch/arm/mm/mmu.c | 20 +--
arch/arm/net/bpf_jit_32.c | 15 +-
arch/arm64/net/bpf_jit_comp.c | 2 +-
arch/parisc/include/asm/elf.h | 4 +
arch/parisc/kernel/sys_parisc.c | 3 +
arch/powerpc/kernel/vmlinux.lds.S | 1 +
arch/s390/crypto/ghash_s390.c | 25 +--
arch/s390/include/asm/pgtable.h | 2 +-
arch/x86/include/asm/kvm_host.h | 3 +
arch/x86/include/asm/mce.h | 4 +
arch/x86/kernel/cpu/mcheck/mce-internal.h | 4 +-
arch/x86/kernel/cpu/mcheck/mce-severity.c | 23 ++-
arch/x86/kernel/cpu/mcheck/mce.c | 17 +-
arch/x86/kernel/cpu/perf_event_intel_rapl.c | 1 +
arch/x86/kernel/i387.c | 15 ++
arch/x86/kvm/cpuid.c | 4 +
arch/x86/kvm/cpuid.h | 8 +
arch/x86/kvm/mmu.c | 16 +-
arch/x86/kvm/mmu.h | 4 +-
arch/x86/kvm/paging_tmpl.h | 7 +
arch/x86/kvm/svm.c | 1 +
arch/x86/kvm/vmx.c | 1 +
arch/x86/kvm/x86.c | 26 ++-
block/blk-mq.c | 50 +++---
drivers/acpi/acpi_pnp.c | 2 +
drivers/acpi/acpica/acmacros.h | 13 +-
drivers/acpi/acpica/dsopcode.c | 7 +-
drivers/acpi/acpica/evregion.c | 2 +-
drivers/acpi/acpica/exdump.c | 4 +-
drivers/acpi/acpica/exfldio.c | 10 +-
drivers/acpi/acpica/exregion.c | 8 +-
drivers/acpi/acpica/hwvalid.c | 16 +-
drivers/acpi/acpica/nsdump.c | 12 +-
drivers/acpi/acpica/tbdata.c | 15 +-
drivers/acpi/acpica/tbinstal.c | 27 ++--
drivers/acpi/acpica/tbprint.c | 19 +--
drivers/acpi/acpica/tbxfroot.c | 7 +-
drivers/acpi/acpica/utaddress.c | 34 ++--
drivers/acpi/osl.c | 6 +-
drivers/acpi/sbshc.c | 22 +++
drivers/ata/ahci.c | 103 +++++++++++-
drivers/ata/libahci.c | 3 +-
drivers/ata/libata-core.c | 74 ++++++++-
drivers/ata/libata-eh.c | 3 +
drivers/edac/mce_amd.h | 3 -
drivers/firmware/dmi_scan.c | 7 +-
drivers/gpio/gpio-kempld.c | 2 +-
drivers/gpio/gpiolib-sysfs.c | 19 +++
drivers/gpu/drm/drm_irq.c | 9 +-
drivers/gpu/drm/i915/intel_dp.c | 6 +-
drivers/gpu/drm/i915/intel_lvds.c | 18 ++-
drivers/gpu/drm/radeon/atombios_crtc.c | 4 +-
drivers/gpu/drm/radeon/atombios_dp.c | 20 +--
drivers/gpu/drm/radeon/cik.c | 2 +-
drivers/gpu/drm/radeon/ni.c | 3 +-
drivers/gpu/drm/radeon/radeon_asic.c | 2 +-
drivers/gpu/drm/radeon/radeon_asic.h | 4 +
drivers/gpu/drm/radeon/radeon_ttm.c | 8 +-
drivers/gpu/drm/radeon/radeon_uvd.c | 105 ++++++++----
drivers/gpu/drm/radeon/radeon_vce.c | 65 ++++++--
drivers/gpu/drm/radeon/rv770d.h | 3 +
drivers/gpu/drm/radeon/si.c | 2 +-
drivers/gpu/drm/radeon/uvd_v1_0.c | 14 +-
drivers/gpu/drm/radeon/uvd_v2_2.c | 29 ++++
drivers/hwmon/nct6683.c | 2 +
drivers/hwmon/nct6775.c | 2 +
drivers/hwmon/ntc_thermistor.c | 9 ++
drivers/iio/accel/st_accel_core.c | 1 +
drivers/iio/adc/xilinx-xadc-core.c | 5 +-
drivers/iio/adc/xilinx-xadc.h | 6 +-
drivers/iio/common/st_sensors/st_sensors_core.c | 2 -
drivers/iio/gyro/st_gyro_core.c | 1 +
drivers/iio/light/hid-sensor-prox.c | 2 -
drivers/iio/magnetometer/st_magn_core.c | 1 +
drivers/iio/pressure/hid-sensor-press.c | 2 -
drivers/iio/pressure/st_pressure_core.c | 1 +
drivers/infiniband/core/cma.c | 27 ++--
drivers/infiniband/core/iwpm_msg.c | 2 +-
drivers/lguest/core.c | 2 +-
drivers/md/dm-crypt.c | 12 +-
drivers/md/raid5.c | 3 +-
drivers/mmc/card/block.c | 12 ++
drivers/mmc/card/queue.c | 2 +-
drivers/mmc/card/queue.h | 2 +
drivers/mmc/core/core.c | 1 +
drivers/mmc/host/atmel-mci.c | 9 +-
drivers/mmc/host/sh_mmcif.c | 2 +-
drivers/net/wireless/iwlwifi/pcie/trans.c | 11 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 1 +
drivers/net/wireless/rtlwifi/usb.c | 2 +-
drivers/pinctrl/core.c | 10 +-
drivers/pinctrl/core.h | 2 +-
drivers/pinctrl/devicetree.c | 2 +-
drivers/power/reset/at91-reset.c | 4 +-
drivers/scsi/sd.c | 19 +--
drivers/scsi/storvsc_drv.c | 3 +-
drivers/staging/gdm724x/gdm_mux.c | 16 +-
drivers/staging/vt6656/rxtx.c | 14 +-
drivers/target/target_core_pscsi.c | 3 +
drivers/target/target_core_pscsi.h | 1 +
drivers/thermal/armada_thermal.c | 6 +-
drivers/tty/hvc/hvc_xen.c | 20 ++-
drivers/tty/n_gsm.c | 5 +-
drivers/usb/gadget/configfs.c | 1 +
drivers/usb/host/xhci-ring.c | 7 +-
drivers/usb/host/xhci.h | 2 +-
drivers/usb/serial/cp210x.c | 1 +
drivers/usb/serial/pl2303.c | 1 -
drivers/usb/serial/pl2303.h | 4 -
drivers/usb/serial/visor.c | 2 +-
drivers/usb/storage/unusual_devs.h | 7 +
drivers/xen/events/events_2l.c | 10 ++
drivers/xen/events/events_base.c | 19 ++-
drivers/xen/xen-pciback/conf_space.c | 6 +-
drivers/xen/xen-pciback/conf_space.h | 2 +-
drivers/xen/xen-pciback/conf_space_header.c | 2 +-
drivers/xen/xenbus/xenbus_probe.c | 29 ++++
fs/coredump.c | 2 +-
fs/dcache.c | 8 +-
fs/exec.c | 3 +
fs/ext4/ext4_jbd2.c | 6 +
fs/ext4/extents.c | 2 +-
fs/fhandle.c | 5 +-
fs/fs_pin.c | 4 +-
fs/jbd2/recovery.c | 10 +-
fs/jbd2/revoke.c | 18 ++-
fs/jbd2/transaction.c | 25 +--
fs/namei.c | 3 +-
fs/namespace.c | 13 +-
fs/nfsd/nfs4state.c | 21 +--
fs/nilfs2/btree.c | 2 +-
fs/ocfs2/dlm/dlmmaster.c | 13 ++
fs/omfs/inode.c | 6 +-
fs/overlayfs/copy_up.c | 3 +
fs/overlayfs/dir.c | 9 ++
fs/overlayfs/super.c | 22 +++
fs/xfs/libxfs/xfs_attr_leaf.c | 8 +-
fs/xfs/libxfs/xfs_attr_leaf.h | 2 +-
fs/xfs/xfs_attr_inactive.c | 83 ++++++----
fs/xfs/xfs_file.c | 2 +-
fs/xfs/xfs_inode.c | 12 +-
include/acpi/acpixf.h | 12 +-
include/drm/drm_pciids.h | 1 +
include/linux/ktime.h | 29 +++-
include/linux/libata.h | 10 ++
include/linux/nilfs2_fs.h | 2 +-
include/linux/sched/rt.h | 7 +-
include/net/dst.h | 1 +
include/xen/events.h | 2 +-
kernel/locking/rtmutex.c | 12 +-
kernel/module.c | 3 +
kernel/sched/core.c | 26 +--
kernel/time/hrtimer.c | 16 +-
lib/strnlen_user.c | 3 +-
mm/memory-failure.c | 16 +-
mm/mempolicy.c | 2 +-
mm/page-writeback.c | 6 +-
net/ceph/osd_client.c | 33 ++--
net/mac80211/ieee80211_i.h | 3 +
net/mac80211/rx.c | 5 +-
net/mac80211/wep.c | 6 +-
net/sunrpc/auth_gss/gss_rpc_xdr.c | 23 ++-
net/xfrm/xfrm_policy.c | 12 +-
sound/oss/sequencer.c | 12 +-
sound/pci/hda/hda_intel.c | 73 +++++----
sound/pci/hda/hda_priv.h | 12 +-
sound/pci/hda/patch_realtek.c | 179 ++++++++++++++++++++-
sound/pci/hda/patch_via.c | 1 +
sound/pci/hda/thinkpad_helper.c | 1 -
sound/soc/codecs/mc13783.c | 4 +-
sound/soc/codecs/wm8960.c | 2 +-
sound/soc/codecs/wm8994.c | 2 +-
sound/soc/soc-dapm.c | 11 +-
sound/usb/clock.c | 5 +
sound/usb/pcm.c | 5 +
sound/usb/quirks-table.h | 40 +++++
sound/usb/quirks.c | 90 +++++++++--
sound/usb/quirks.h | 5 +
tools/vm/Makefile | 2 +-
203 files changed, 1727 insertions(+), 702 deletions(-)
create mode 100644 arch/arm/kernel/psci-call.S
--
2.1.0
^ permalink raw reply [flat|nested] 185+ messages in thread
* [PATCH 3.18 000/178] 3.18.15-review
@ 2015-06-08 13:39 Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 001/178] ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook Sasha Levin
` (178 more replies)
0 siblings, 179 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
This is the start of the stable review cycle for the 3.18.15 release.
There are 178 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Adam Honse (1):
ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample
rate
Al Viro (3):
path_openat(): fix double fput()
coredump: accept any write method
d_walk() might skip too much
Alban Bedel (1):
iio:st_sensors: Fix oops when probing SPI devices
Alex Deucher (3):
drm/radeon: add new bonaire pci id
drm/radeon: retry dcpd fetch
drm/radeon: don't share plls if monitors differ in audio support
Alexey Khoroshilov (1):
sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND)
Andi Kleen (1):
tools/vm: fix page-flags build
Andrea Arcangeli (1):
kvm: fix crash in kvm_vcpu_reload_apic_access_page
Andy Grover (1):
target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST
Ansgar Hegerfeld (1):
ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450
Anton Blanchard (1):
powerpc: Align TOC to 256 bytes
Axel Lin (1):
ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls
Ben Hutchings (1):
xen-pciback: Add name prefix to global 'permissive' variable
Bob Copeland (1):
omfs: fix sign confusion for bitmap loop counter
Boris Ostrovsky (4):
xen/events: Clear cpu_evtchn_mask before resuming
xen/xenbus: Update xenbus event channel on resume
xen/console: Update console event channel on resume
xen/events: Set irq_info->evtchn before binding the channel to CPU in
__startup_pirq()
Borislav Petkov (1):
x86/mce: Fix MCE severity messages
Chen Yucong (1):
x86, mce, severity: Extend the the mce_severity mechanism to handle
UCNA/DEFERRED error
Chris Bainbridge (1):
ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook
Chris Lesiak (1):
hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
Christian König (6):
drm/radeon: disable semaphores for UVD V1 (v2)
drm/radeon: make VCE handle check more strict
drm/radeon: make UVD handle checking more strict
drm/radeon: more strictly validate the UVD codec
drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling
drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR
handling"
Christoph Hellwig (1):
nfsd: fix the check for confirmed openowner in
nfs4_preprocess_stateid_op
Chuanxiao Dong (1):
mmc: card: Don't access RPMB partitions for normal read/write
Dan Williams (1):
ahci: avoton port-disable reset-quirk
Darrick J. Wong (1):
jbd2: fix r_count overflows leading to buffer overflow in journal
recovery
Dave Chinner (2):
xfs: xfs_attr_inactive leaves inconsistent attr fork state behind
xfs: xfs_iozero can return positive errno
David Henningsson (3):
ALSA: hda - Add headset mic quirk for Dell Inspiron 5548
ALSA: hda - Fix headset mic and mic-in for a Dell desktop
ALSA: hda - Disable Headphone Mic boost for ALC662
David Vrabel (1):
xen/events: don't bind non-percpu VIRQs with percpu chip
Doug Anderson (1):
pinctrl: Don't just pretend to protect pinctrl_maps, do it for real
Eric W. Biederman (3):
mnt: Fix fs_fully_visible to verify the root directory is visible
mnt: Fail collect_mounts when applied to unmounted mounts
fs_pin: Allow for the possibility that m_list or s_list go unused.
Eric Wong (1):
ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate
Eryu Guan (1):
ext4: check for zero length extent explicitly
Fabio Estevam (1):
ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO
Frank C Guenther (1):
ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003)
Gabriele Mazzotta (2):
libata: Add helper to determine when PHY events should be ignored
libata: Ignore spurious PHY event on LPM policy change
Gregory CLEMENT (1):
ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC
Grygorii Strashko (1):
mmc: core: add missing pm event in mmc_pm_notify to fix hib restore
Guenter Roeck (2):
hwmon: (nct6775) Add missing sysfs attribute initialization
hwmon: (nct6683) Add missing sysfs attribute initialization
Hans de Goede (1):
usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices
Harald Freudenberger (1):
crypto: s390/ghash - Fix incorrect ghash icv buffer handling.
Helge Deller (1):
parisc,metag: Fix crashes due to stack randomization on
stack-grows-upwards architectures
Hui Wang (1):
ALSA: hda - fix headset mic detection problem for one more machine
Ilya Dryomov (2):
Revert "libceph: clear r_req_lru_item in
__unregister_linger_request()"
Revert "libceph: clear r_req_lru_item in
__unregister_linger_request()"
Ingo Molnar (1):
x86/fpu: Disable XSAVES* support for now
Jan Kara (1):
lib: Fix strnlen_user() to not touch memory after specified maximum
Jani Nikula (1):
drm/i915/dp: there is no audio on port A
Janusz Dziedzic (1):
mac80211: move WEP tailroom size check
Jason A. Donenfeld (2):
USB: visor: Match I330 phone more precisely
USB: pl2303: Remove support for Samsung I330
Jason Gunthorpe (1):
RDMA/CMA: Canonize IPv4 on IPV6 sockets properly
Jean Delvare (1):
firmware: dmi_scan: Fix ordering of product_uuid
Joe Lawrence (1):
xhci: gracefully handle xhci_irq dead device
Joe Turner (1):
ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate
Johan Hovold (1):
gpio: sysfs: fix memory leaks and device hotplug
Johannes Berg (1):
mac80211: don't use napi_gro_receive() outside NAPI context
John Stultz (1):
ktime: Fix ktime_divns to do signed division
Junxiao Bi (1):
ocfs2: dlm: fix race between purge and get lock resource
Jurgen Kramer (3):
ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs
ALSA: usb-audio: Add mode select quirk for Denon/Marantz DACs
ALSA: usb-audio: add native DSD support for Matrix Audio DACs
K. Y. Srinivasan (1):
storvsc: Set the SRB flags correctly when no data transfer is needed
Kailang Yang (6):
ALSA: hda/realtek - Support Dell headset mode for ALC256
ALSA: hda/realtek - Support headset mode for ALC286/288
ALSA: hda/realtek - Fix typo for ALC286/ALC288
ALSA: hda/realtek - Add ALC298 alias name for Dell
ALSA: hda/realtek - Support headset mode for ALC298
ALSA: hda/realtek - Add ALC256 alias name for Dell
Koro Chen (1):
ASoC: dapm: Modify widget stream name according to prefix
Krzysztof Opasiak (1):
usb: gadget: configfs: Fix interfaces array NULL-termination
Larry Finger (1):
rtlwifi: rtl8192cu: Fix kernel deadlock
Liad Kaufman (1):
iwlwifi: pcie: prevent using unmapped memory in fw monitor
Liang Li (1):
kvm/fpu: Enable eager restore kvm FPU for MPX
Ludovic Desroches (1):
mmc: atmel-mci: fix bad variable type for clkdiv
Lukas Czerner (1):
ext4: fix NULL pointer dereference when journal restart fails
Lukas Wunner (1):
drm/i915: Add missing MacBook Pro models with dual channel LVDS
Lv Zheng (4):
ACPICA: Tables: Change acpi_find_root_pointer() to use
acpi_physical_address.
ACPICA: Utilities: Cleanup to enforce
ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR().
ACPICA: Utilities: Cleanup to convert physical address printing
formats.
ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx
helpers.
Malcolm Priestley (1):
staging: vt6656: use ieee80211_tx_info to select packet type.
Marek Vasut (1):
ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name
Mario Kleiner (1):
drm: Zero out invalid vblank timestamp in drm_update_vblank_count.
Mark Edwards (1):
USB: cp210x: add ID for KCF Technologies PRN device
Mark Hounschell (1):
sd: Disable support for 256 byte/sector disks
Mark Rutland (2):
ARM: 8307/1: psci: move psci firmware calls out of line
ARM: 8356/1: mm: handle non-pmd-aligned end of RAM
Markus Pargmann (1):
ARM: dts: imx25: Add #pwm-cells to pwm4
Martin K. Petersen (2):
libata: Update Crucial/Micron blacklist
libata: Blacklist queued TRIM on all Samsung 800-series
Martin Schwidefsky (1):
s390/mm: correct return value of pmd_pfn
Mathias Nyman (2):
xhci: fix isoc endpoint dequeue from advancing too far on transaction
error
xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256
Mel Gorman (1):
mm, numa: really disable NUMA balancing by default on single node
machines
Michael Brunner (1):
gpio: gpio-kempld: Fix get_direction return value
Miklos Szeredi (1):
ovl: mount read-only if workdir can't be created
Ming Lei (2):
blk-mq: fix race between timeout and CPU hotplug
blk-mq: fix CPU hotplug handling
Nadav Haklai (1):
thermal: armada: Update Armada 380 thermal sensor coefficients
Naoya Horiguchi (2):
mm/memory-failure: call shake_page() when error hits thp tail page
mm: soft-offline: fix num_poisoned_pages counting on concurrent events
NeilBrown (1):
md/raid5: don't record new size if resize_stripes fails.
Nicolas Pitre (1):
ktime: Optimize ktime_divns for constant divisors
Nicolas Schichan (1):
ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction.
Pan Xinhui (1):
tty/n_gsm.c: fix a memory leak when gsmtty is removed
Panu Matilainen (1):
ALSA: usb-audio: Add support for Zoom R16/24 capture and midi
interfaces
Paolo Bonzini (2):
Revert "KVM: x86: drop fpu_activate hook"
KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages
Pavel Machek (1):
ARM: dts: OMAP3-N900: Add microphone bias voltages
Philipp Zabel (1):
ARM: dts: imx6: phyFLEX: USB VBUS control is active-high
Philippe Reynes (1):
ARM: dts: imx27: only map 4 Kbyte for fec registers
Rabin Vincent (1):
Revert "dm crypt: fix deadlock when async crypto algorithm returns
-EBUSY"
Rafael J. Wysocki (1):
ACPI / init: Fix the ordering of acpi_reserve_resources()
Russell King (1):
ARM: fix missing syscall trace exit
Rusty Russell (1):
lguest: fix out-by-one error in address checking.
Ryusuke Konishi (1):
nilfs2: fix sanity check of btree level in nilfs_btree_root_broken()
Sasha Levin (2):
fs, omfs: add NULL terminator in the end up the token list
vfs: read file_handle only once in handle_to_path
Scott Branden (1):
rt2x00: add new rt2800usb device DWA 130
Scott Mayhew (1):
svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures
Srinivas Pandruvada (2):
iio: light: hid-sensor-prox: Fix modifier
iio: pressure: hid-sensor-press: Fix modifier
Stefan Wahren (1):
ARM: dts: imx23-olinuxino: Fix dr_mode of usb0
Stephane Eranian (1):
perf/x86/rapl: Enable Broadwell-U RAPL support
Steven Rostedt (1):
module: Call module notifier on failure after complete_formation()
Sławomir Demeszko (1):
staging: gdm724x: Correction of variable usage after applying ALIGN()
Takashi Iwai (11):
ALSA: usb-audio: Check Marantz/Denon USB DACs in a single place
ALSA: usb-audio: Add quirk for MS LifeCam Studio
ALSA: hda - Enable widget power saving for Realtek codecs
ALSA: hda/realtek - Fix the regression by widget power-saving
ALSA: hda - Add headphone quirk for Lifebook E752
ALSA: hda/realtek - Fix a typo
ALSA: hda - Disable widget power-saving for ALC292 & co
ALSA: hda - Fix lost sound due to stream_pm ops cleanup
Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"
ALSA: hda - Add AZX_DCAPS_SNOOP_OFF (and refactor snoop setup)
ALSA: hda - Fix noise on AMD radeon 290x controller
Takeshi Kihara (1):
mmc: sh_mmcif: Fix timeout value for command request
Tatyana Nikolova (1):
RDMA/core: Fix for parsing netlink string attribute
Tejun Heo (1):
writeback: use |1 instead of +1 to protect against div by zero
Thomas Betker (4):
iio: adc: xilinx: Fix register addresses
iio: adc: xilinx: Fix "vccaux" channel .address
iio: adc: xilinx: Fix VREFP scale
iio: adc: xilinx: Fix VREFN sign
Thomas Gleixner (1):
sched: Handle priority boosted tasks proper in setscheduler()
Thomas Petazzoni (1):
ARM: mvebu: do not register custom DMA operations when coherency is
disabled
Tony Lindgren (1):
ARM: OMAP2+: Fix omap off idle power consumption creeping up
Ulf Hansson (3):
ARM: ux500: Move GPIO regulator for SD-card into board DTSs
ARM: ux500: Enable GPIO regulator for SD-card for HREF boards
ARM: ux500: Enable GPIO regulator for SD-card for snowball
Vineet Gupta (1):
ARC: unbork !LLSC build
Vittorio G (VittGam) (1):
ALSA: usb-audio: Add quirk for MS LifeCam HD-3000
Wei Yongjun (1):
power/reset: at91: fix return value check in
at91_reset_platform_probe()
Witold Szczeponik (1):
ACPI / PNP: add two IDs to list for PNPACPI device enumeration
Xi Wang (1):
arm64: bpf: fix signedness bug in loading 64-bit immediate
Xiao Guangrong (2):
KVM: MMU: fix smap permission check
KVM: MMU: fix SMAP virtualization
Zidan Wang (2):
ASoC: wm8960: fix "RINPUT3" audio route error
ASoC: wm8994: correct BCLK DIV 348 to 384
huaibin Wang (1):
xfrm: release dst_orig in case of error in xfrm_lookup()
monk.liu (1):
drm/radeon: fix userptr BO unpin bug v3
.../devicetree/bindings/dma/fsl-mxs-dma.txt | 2 +-
Documentation/virtual/kvm/mmu.txt | 18 ++-
arch/arc/include/asm/atomic.h | 2 +-
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 +
arch/arm/boot/dts/imx23-olinuxino.dts | 4 +-
arch/arm/boot/dts/imx25.dtsi | 1 +
arch/arm/boot/dts/imx27.dtsi | 2 +-
arch/arm/boot/dts/imx28.dtsi | 2 +-
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 2 +
arch/arm/boot/dts/omap3-n900.dts | 4 +
arch/arm/boot/dts/ste-dbx5x0.dtsi | 17 --
arch/arm/boot/dts/ste-href.dtsi | 15 ++
arch/arm/boot/dts/ste-snowball.dts | 13 ++
arch/arm/kernel/Makefile | 2 +-
arch/arm/kernel/entry-common.S | 4 +-
arch/arm/kernel/psci-call.S | 31 ++++
arch/arm/kernel/psci.c | 39 +----
arch/arm/mach-mvebu/coherency.c | 5 +-
arch/arm/mach-omap2/prm-regbits-34xx.h | 1 +
arch/arm/mach-omap2/prm-regbits-44xx.h | 1 +
arch/arm/mach-omap2/vc.c | 12 +-
arch/arm/mach-omap2/vc.h | 2 +
arch/arm/mach-omap2/vc3xxx_data.c | 1 +
arch/arm/mach-omap2/vc44xx_data.c | 1 +
arch/arm/mm/mmu.c | 20 +--
arch/arm/net/bpf_jit_32.c | 15 +-
arch/arm64/net/bpf_jit_comp.c | 2 +-
arch/parisc/include/asm/elf.h | 4 +
arch/parisc/kernel/sys_parisc.c | 3 +
arch/powerpc/kernel/vmlinux.lds.S | 1 +
arch/s390/crypto/ghash_s390.c | 25 +--
arch/s390/include/asm/pgtable.h | 2 +-
arch/x86/include/asm/kvm_host.h | 3 +
arch/x86/include/asm/mce.h | 4 +
arch/x86/kernel/cpu/mcheck/mce-internal.h | 4 +-
arch/x86/kernel/cpu/mcheck/mce-severity.c | 23 ++-
arch/x86/kernel/cpu/mcheck/mce.c | 17 +-
arch/x86/kernel/cpu/perf_event_intel_rapl.c | 1 +
arch/x86/kernel/i387.c | 15 ++
arch/x86/kvm/cpuid.c | 4 +
arch/x86/kvm/cpuid.h | 8 +
arch/x86/kvm/mmu.c | 16 +-
arch/x86/kvm/mmu.h | 4 +-
arch/x86/kvm/paging_tmpl.h | 7 +
arch/x86/kvm/svm.c | 1 +
arch/x86/kvm/vmx.c | 1 +
arch/x86/kvm/x86.c | 26 ++-
block/blk-mq.c | 50 +++---
drivers/acpi/acpi_pnp.c | 2 +
drivers/acpi/acpica/acmacros.h | 13 +-
drivers/acpi/acpica/dsopcode.c | 7 +-
drivers/acpi/acpica/evregion.c | 2 +-
drivers/acpi/acpica/exdump.c | 4 +-
drivers/acpi/acpica/exfldio.c | 10 +-
drivers/acpi/acpica/exregion.c | 8 +-
drivers/acpi/acpica/hwvalid.c | 16 +-
drivers/acpi/acpica/nsdump.c | 12 +-
drivers/acpi/acpica/tbdata.c | 15 +-
drivers/acpi/acpica/tbinstal.c | 27 ++--
drivers/acpi/acpica/tbprint.c | 19 +--
drivers/acpi/acpica/tbxfroot.c | 7 +-
drivers/acpi/acpica/utaddress.c | 34 ++--
drivers/acpi/osl.c | 6 +-
drivers/acpi/sbshc.c | 22 +++
drivers/ata/ahci.c | 103 +++++++++++-
drivers/ata/libahci.c | 3 +-
drivers/ata/libata-core.c | 74 ++++++++-
drivers/ata/libata-eh.c | 3 +
drivers/edac/mce_amd.h | 3 -
drivers/firmware/dmi_scan.c | 7 +-
drivers/gpio/gpio-kempld.c | 2 +-
drivers/gpio/gpiolib-sysfs.c | 19 +++
drivers/gpu/drm/drm_irq.c | 9 +-
drivers/gpu/drm/i915/intel_dp.c | 6 +-
drivers/gpu/drm/i915/intel_lvds.c | 18 ++-
drivers/gpu/drm/radeon/atombios_crtc.c | 4 +-
drivers/gpu/drm/radeon/atombios_dp.c | 20 +--
drivers/gpu/drm/radeon/cik.c | 2 +-
drivers/gpu/drm/radeon/ni.c | 3 +-
drivers/gpu/drm/radeon/radeon_asic.c | 2 +-
drivers/gpu/drm/radeon/radeon_asic.h | 4 +
drivers/gpu/drm/radeon/radeon_ttm.c | 8 +-
drivers/gpu/drm/radeon/radeon_uvd.c | 105 ++++++++----
drivers/gpu/drm/radeon/radeon_vce.c | 65 ++++++--
drivers/gpu/drm/radeon/rv770d.h | 3 +
drivers/gpu/drm/radeon/si.c | 2 +-
drivers/gpu/drm/radeon/uvd_v1_0.c | 14 +-
drivers/gpu/drm/radeon/uvd_v2_2.c | 29 ++++
drivers/hwmon/nct6683.c | 2 +
drivers/hwmon/nct6775.c | 2 +
drivers/hwmon/ntc_thermistor.c | 9 ++
drivers/iio/accel/st_accel_core.c | 1 +
drivers/iio/adc/xilinx-xadc-core.c | 5 +-
drivers/iio/adc/xilinx-xadc.h | 6 +-
drivers/iio/common/st_sensors/st_sensors_core.c | 2 -
drivers/iio/gyro/st_gyro_core.c | 1 +
drivers/iio/light/hid-sensor-prox.c | 2 -
drivers/iio/magnetometer/st_magn_core.c | 1 +
drivers/iio/pressure/hid-sensor-press.c | 2 -
drivers/iio/pressure/st_pressure_core.c | 1 +
drivers/infiniband/core/cma.c | 27 ++--
drivers/infiniband/core/iwpm_msg.c | 2 +-
drivers/lguest/core.c | 2 +-
drivers/md/dm-crypt.c | 12 +-
drivers/md/raid5.c | 3 +-
drivers/mmc/card/block.c | 12 ++
drivers/mmc/card/queue.c | 2 +-
drivers/mmc/card/queue.h | 2 +
drivers/mmc/core/core.c | 1 +
drivers/mmc/host/atmel-mci.c | 9 +-
drivers/mmc/host/sh_mmcif.c | 2 +-
drivers/net/wireless/iwlwifi/pcie/trans.c | 11 +-
drivers/net/wireless/rt2x00/rt2800usb.c | 1 +
drivers/net/wireless/rtlwifi/usb.c | 2 +-
drivers/pinctrl/core.c | 10 +-
drivers/pinctrl/core.h | 2 +-
drivers/pinctrl/devicetree.c | 2 +-
drivers/power/reset/at91-reset.c | 4 +-
drivers/scsi/sd.c | 19 +--
drivers/scsi/storvsc_drv.c | 3 +-
drivers/staging/gdm724x/gdm_mux.c | 16 +-
drivers/staging/vt6656/rxtx.c | 14 +-
drivers/target/target_core_pscsi.c | 3 +
drivers/target/target_core_pscsi.h | 1 +
drivers/thermal/armada_thermal.c | 6 +-
drivers/tty/hvc/hvc_xen.c | 20 ++-
drivers/tty/n_gsm.c | 5 +-
drivers/usb/gadget/configfs.c | 1 +
drivers/usb/host/xhci-ring.c | 7 +-
drivers/usb/host/xhci.h | 2 +-
drivers/usb/serial/cp210x.c | 1 +
drivers/usb/serial/pl2303.c | 1 -
drivers/usb/serial/pl2303.h | 4 -
drivers/usb/serial/visor.c | 2 +-
drivers/usb/storage/unusual_devs.h | 7 +
drivers/xen/events/events_2l.c | 10 ++
drivers/xen/events/events_base.c | 19 ++-
drivers/xen/xen-pciback/conf_space.c | 6 +-
drivers/xen/xen-pciback/conf_space.h | 2 +-
drivers/xen/xen-pciback/conf_space_header.c | 2 +-
drivers/xen/xenbus/xenbus_probe.c | 29 ++++
fs/coredump.c | 2 +-
fs/dcache.c | 8 +-
fs/exec.c | 3 +
fs/ext4/ext4_jbd2.c | 6 +
fs/ext4/extents.c | 2 +-
fs/fhandle.c | 5 +-
fs/fs_pin.c | 4 +-
fs/jbd2/recovery.c | 10 +-
fs/jbd2/revoke.c | 18 ++-
fs/jbd2/transaction.c | 25 +--
fs/namei.c | 3 +-
fs/namespace.c | 13 +-
fs/nfsd/nfs4state.c | 21 +--
fs/nilfs2/btree.c | 2 +-
fs/ocfs2/dlm/dlmmaster.c | 13 ++
fs/omfs/inode.c | 6 +-
fs/overlayfs/copy_up.c | 3 +
fs/overlayfs/dir.c | 9 ++
fs/overlayfs/super.c | 22 +++
fs/xfs/libxfs/xfs_attr_leaf.c | 8 +-
fs/xfs/libxfs/xfs_attr_leaf.h | 2 +-
fs/xfs/xfs_attr_inactive.c | 83 ++++++----
fs/xfs/xfs_file.c | 2 +-
fs/xfs/xfs_inode.c | 12 +-
include/acpi/acpixf.h | 12 +-
include/drm/drm_pciids.h | 1 +
include/linux/ktime.h | 29 +++-
include/linux/libata.h | 10 ++
include/linux/nilfs2_fs.h | 2 +-
include/linux/sched/rt.h | 7 +-
include/net/dst.h | 1 +
include/xen/events.h | 2 +-
kernel/locking/rtmutex.c | 12 +-
kernel/module.c | 3 +
kernel/sched/core.c | 26 +--
kernel/time/hrtimer.c | 16 +-
lib/strnlen_user.c | 3 +-
mm/memory-failure.c | 16 +-
mm/mempolicy.c | 2 +-
mm/page-writeback.c | 6 +-
net/ceph/osd_client.c | 33 ++--
net/mac80211/ieee80211_i.h | 3 +
net/mac80211/rx.c | 5 +-
net/mac80211/wep.c | 6 +-
net/sunrpc/auth_gss/gss_rpc_xdr.c | 23 ++-
net/xfrm/xfrm_policy.c | 12 +-
sound/oss/sequencer.c | 12 +-
sound/pci/hda/hda_intel.c | 73 +++++----
sound/pci/hda/hda_priv.h | 12 +-
sound/pci/hda/patch_realtek.c | 179 ++++++++++++++++++++-
sound/pci/hda/patch_via.c | 1 +
sound/pci/hda/thinkpad_helper.c | 1 -
sound/soc/codecs/mc13783.c | 4 +-
sound/soc/codecs/wm8960.c | 2 +-
sound/soc/codecs/wm8994.c | 2 +-
sound/soc/soc-dapm.c | 11 +-
sound/usb/clock.c | 5 +
sound/usb/pcm.c | 5 +
sound/usb/quirks-table.h | 40 +++++
sound/usb/quirks.c | 90 +++++++++--
sound/usb/quirks.h | 5 +
tools/vm/Makefile | 2 +-
203 files changed, 1727 insertions(+), 702 deletions(-)
create mode 100644 arch/arm/kernel/psci-call.S
--
2.1.0
^ permalink raw reply [flat|nested] 185+ messages in thread
* [PATCH 3.18 001/178] ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
@ 2015-06-08 13:39 ` Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 002/178] ACPI / PNP: add two IDs to list for PNPACPI device enumeration Sasha Levin
` (177 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Chris Bainbridge <chris.bainbridge@gmail.com>
[ Upstream commit 3349fb64b2927407017d970dd5c4daf3c5ad69f8 ]
Commit 7bc5a2bad0b8 'ACPI: Support _OSI("Darwin") correctly' caused
the MacBook firmware to expose the SBS, resulting in intermittent
hangs of several minutes on boot, and failure to detect or report
the battery. Fix this by adding a 5 us delay to the start of each
SMBUS transaction. This timing is the result of experimentation -
hangs were observed with 3 us but never with 5 us.
Fixes: 7bc5a2bad0b8 'ACPI: Support _OSI("Darwin") correctly'
Link: https://bugzilla.kernel.org/show_bug.cgi?id=94651
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Cc: 3.18+ <stable@vger.kernel.org> # 3.18+
[ rjw: Subject and changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/acpi/sbshc.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 26e5b50..bf034f8 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -14,6 +14,7 @@
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/interrupt.h>
+#include <linux/dmi.h>
#include "sbshc.h"
#define PREFIX "ACPI: "
@@ -87,6 +88,8 @@ enum acpi_smb_offset {
ACPI_SMB_ALARM_DATA = 0x26, /* 2 bytes alarm data */
};
+static bool macbook;
+
static inline int smb_hc_read(struct acpi_smb_hc *hc, u8 address, u8 *data)
{
return ec_read(hc->offset + address, data);
@@ -132,6 +135,8 @@ static int acpi_smbus_transaction(struct acpi_smb_hc *hc, u8 protocol,
}
mutex_lock(&hc->lock);
+ if (macbook)
+ udelay(5);
if (smb_hc_read(hc, ACPI_SMB_PROTOCOL, &temp))
goto end;
if (temp) {
@@ -257,12 +262,29 @@ extern int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
acpi_handle handle, acpi_ec_query_func func,
void *data);
+static int macbook_dmi_match(const struct dmi_system_id *d)
+{
+ pr_debug("Detected MacBook, enabling workaround\n");
+ macbook = true;
+ return 0;
+}
+
+static struct dmi_system_id acpi_smbus_dmi_table[] = {
+ { macbook_dmi_match, "Apple MacBook", {
+ DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBook") },
+ },
+ { },
+};
+
static int acpi_smbus_hc_add(struct acpi_device *device)
{
int status;
unsigned long long val;
struct acpi_smb_hc *hc;
+ dmi_check_system(acpi_smbus_dmi_table);
+
if (!device)
return -EINVAL;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 002/178] ACPI / PNP: add two IDs to list for PNPACPI device enumeration
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 001/178] ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook Sasha Levin
@ 2015-06-08 13:39 ` Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 003/178] ocfs2: dlm: fix race between purge and get lock resource Sasha Levin
` (176 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Witold Szczeponik <Witold.Szczeponik@gmx.net>
[ Upstream commit 622532bb2fad8fe342fb685727ae0be566f6be5d ]
Commit eec15edbb0e1 (ACPI / PNP: use device ID list for PNPACPI device
enumeration) changed the way how ACPI devices are enumerated and when
they are added to the PNP bus.
However, it broke the sound card support on (at least) a vintage
IBM ThinkPad 600E: with said commit applied, two of the necessary
"CSC01xx" devices are not added to the PNP bus and hence can not be
found during the initialization of the "snd-cs4236" module. As a
consequence, loading "snd-cs4236" causes null pointer exceptions.
The attached patch fixes the problem end re-enables sound on the
IBM ThinkPad 600E.
Fixes: eec15edbb0e1 (ACPI / PNP: use device ID list for PNPACPI device enumeration)
Signed-off-by: Witold Szczeponik <Witold.Szczeponik@gmx.net>
Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/acpi/acpi_pnp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c
index b193f84..ff6d8ad 100644
--- a/drivers/acpi/acpi_pnp.c
+++ b/drivers/acpi/acpi_pnp.c
@@ -304,6 +304,8 @@ static const struct acpi_device_id acpi_pnp_device_ids[] = {
{"PNPb006"},
/* cs423x-pnpbios */
{"CSC0100"},
+ {"CSC0103"},
+ {"CSC0110"},
{"CSC0000"},
{"GIM0100"}, /* Guillemot Turtlebeach something appears to be cs4232 compatible */
/* es18xx-pnpbios */
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 003/178] ocfs2: dlm: fix race between purge and get lock resource
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 001/178] ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 002/178] ACPI / PNP: add two IDs to list for PNPACPI device enumeration Sasha Levin
@ 2015-06-08 13:39 ` Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 004/178] nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() Sasha Levin
` (175 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Junxiao Bi <junxiao.bi@oracle.com>
[ Upstream commit b1432a2a35565f538586774a03bf277c27fc267d ]
There is a race window in dlm_get_lock_resource(), which may return a
lock resource which has been purged. This will cause the process to
hang forever in dlmlock() as the ast msg can't be handled due to its
lock resource not existing.
dlm_get_lock_resource {
...
spin_lock(&dlm->spinlock);
tmpres = __dlm_lookup_lockres_full(dlm, lockid, namelen, hash);
if (tmpres) {
spin_unlock(&dlm->spinlock);
>>>>>>>> race window, dlm_run_purge_list() may run and purge
the lock resource
spin_lock(&tmpres->spinlock);
...
spin_unlock(&tmpres->spinlock);
}
}
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/ocfs2/dlm/dlmmaster.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 215e41a..9ec1eea 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -765,6 +765,19 @@ lookup:
if (tmpres) {
spin_unlock(&dlm->spinlock);
spin_lock(&tmpres->spinlock);
+
+ /*
+ * Right after dlm spinlock was released, dlm_thread could have
+ * purged the lockres. Check if lockres got unhashed. If so
+ * start over.
+ */
+ if (hlist_unhashed(&tmpres->hash_node)) {
+ spin_unlock(&tmpres->spinlock);
+ dlm_lockres_put(tmpres);
+ tmpres = NULL;
+ goto lookup;
+ }
+
/* Wait on the thread that is mastering the resource */
if (tmpres->owner == DLM_LOCK_RES_OWNER_UNKNOWN) {
__dlm_wait_on_lockres(tmpres);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 004/178] nilfs2: fix sanity check of btree level in nilfs_btree_root_broken()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (2 preceding siblings ...)
2015-06-08 13:39 ` [PATCH 3.18 003/178] ocfs2: dlm: fix race between purge and get lock resource Sasha Levin
@ 2015-06-08 13:39 ` Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 005/178] RDMA/CMA: Canonize IPv4 on IPV6 sockets properly Sasha Levin
` (174 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
[ Upstream commit d8fd150fe3935e1692bf57c66691e17409ebb9c1 ]
The range check for b-tree level parameter in nilfs_btree_root_broken()
is wrong; it accepts the case of "level == NILFS_BTREE_LEVEL_MAX" even
though the level is limited to values in the range of 0 to
(NILFS_BTREE_LEVEL_MAX - 1).
Since the level parameter is read from storage device and used to index
nilfs_btree_path array whose element count is NILFS_BTREE_LEVEL_MAX, it
can cause memory overrun during btree operations if the boundary value
is set to the level parameter on device.
This fixes the broken sanity check and adds a comment to clarify that
the upper bound NILFS_BTREE_LEVEL_MAX is exclusive.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/nilfs2/btree.c | 2 +-
include/linux/nilfs2_fs.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index ecdbae1..090d8ce 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -388,7 +388,7 @@ static int nilfs_btree_root_broken(const struct nilfs_btree_node *node,
nchildren = nilfs_btree_node_get_nchildren(node);
if (unlikely(level < NILFS_BTREE_LEVEL_NODE_MIN ||
- level > NILFS_BTREE_LEVEL_MAX ||
+ level >= NILFS_BTREE_LEVEL_MAX ||
nchildren < 0 ||
nchildren > NILFS_BTREE_ROOT_NCHILDREN_MAX)) {
pr_crit("NILFS: bad btree root (inode number=%lu): level = %d, flags = 0x%x, nchildren = %d\n",
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
index ff3fea3..9abb763 100644
--- a/include/linux/nilfs2_fs.h
+++ b/include/linux/nilfs2_fs.h
@@ -460,7 +460,7 @@ struct nilfs_btree_node {
/* level */
#define NILFS_BTREE_LEVEL_DATA 0
#define NILFS_BTREE_LEVEL_NODE_MIN (NILFS_BTREE_LEVEL_DATA + 1)
-#define NILFS_BTREE_LEVEL_MAX 14
+#define NILFS_BTREE_LEVEL_MAX 14 /* Max level (exclusive) */
/**
* struct nilfs_palloc_group_desc - block group descriptor
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 005/178] RDMA/CMA: Canonize IPv4 on IPV6 sockets properly
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (3 preceding siblings ...)
2015-06-08 13:39 ` [PATCH 3.18 004/178] nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() Sasha Levin
@ 2015-06-08 13:39 ` Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 006/178] gpio: sysfs: fix memory leaks and device hotplug Sasha Levin
` (173 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
[ Upstream commit 285214409a9e5fceba2215461b4682b6069d8e77 ]
When accepting a new IPv4 connect to an IPv6 socket, the CMA tries to
canonize the address family to IPv4, but does not properly process
the listening sockaddr to get the listening port, and does not properly
set the address family of the canonized sockaddr.
Fixes: e51060f08a61 ("IB: IP address based RDMA connection manager")
Cc: <stable@vger.kernel.org>
Reported-By: Yotam Kenneth <yotamke@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Tested-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/infiniband/core/cma.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index d570030..06441a4 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -859,19 +859,27 @@ static void cma_save_ib_info(struct rdma_cm_id *id, struct rdma_cm_id *listen_id
memcpy(&ib->sib_addr, &path->dgid, 16);
}
+static __be16 ss_get_port(const struct sockaddr_storage *ss)
+{
+ if (ss->ss_family == AF_INET)
+ return ((struct sockaddr_in *)ss)->sin_port;
+ else if (ss->ss_family == AF_INET6)
+ return ((struct sockaddr_in6 *)ss)->sin6_port;
+ BUG();
+}
+
static void cma_save_ip4_info(struct rdma_cm_id *id, struct rdma_cm_id *listen_id,
struct cma_hdr *hdr)
{
- struct sockaddr_in *listen4, *ip4;
+ struct sockaddr_in *ip4;
- listen4 = (struct sockaddr_in *) &listen_id->route.addr.src_addr;
ip4 = (struct sockaddr_in *) &id->route.addr.src_addr;
- ip4->sin_family = listen4->sin_family;
+ ip4->sin_family = AF_INET;
ip4->sin_addr.s_addr = hdr->dst_addr.ip4.addr;
- ip4->sin_port = listen4->sin_port;
+ ip4->sin_port = ss_get_port(&listen_id->route.addr.src_addr);
ip4 = (struct sockaddr_in *) &id->route.addr.dst_addr;
- ip4->sin_family = listen4->sin_family;
+ ip4->sin_family = AF_INET;
ip4->sin_addr.s_addr = hdr->src_addr.ip4.addr;
ip4->sin_port = hdr->port;
}
@@ -879,16 +887,15 @@ static void cma_save_ip4_info(struct rdma_cm_id *id, struct rdma_cm_id *listen_i
static void cma_save_ip6_info(struct rdma_cm_id *id, struct rdma_cm_id *listen_id,
struct cma_hdr *hdr)
{
- struct sockaddr_in6 *listen6, *ip6;
+ struct sockaddr_in6 *ip6;
- listen6 = (struct sockaddr_in6 *) &listen_id->route.addr.src_addr;
ip6 = (struct sockaddr_in6 *) &id->route.addr.src_addr;
- ip6->sin6_family = listen6->sin6_family;
+ ip6->sin6_family = AF_INET6;
ip6->sin6_addr = hdr->dst_addr.ip6;
- ip6->sin6_port = listen6->sin6_port;
+ ip6->sin6_port = ss_get_port(&listen_id->route.addr.src_addr);
ip6 = (struct sockaddr_in6 *) &id->route.addr.dst_addr;
- ip6->sin6_family = listen6->sin6_family;
+ ip6->sin6_family = AF_INET6;
ip6->sin6_addr = hdr->src_addr.ip6;
ip6->sin6_port = hdr->port;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 006/178] gpio: sysfs: fix memory leaks and device hotplug
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (4 preceding siblings ...)
2015-06-08 13:39 ` [PATCH 3.18 005/178] RDMA/CMA: Canonize IPv4 on IPV6 sockets properly Sasha Levin
@ 2015-06-08 13:39 ` Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 007/178] mnt: Fix fs_fully_visible to verify the root directory is visible Sasha Levin
` (172 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Johan Hovold <johan@kernel.org>
[ Upstream commit 483d821108791092798f5d230686868112927044 ]
Unregister GPIOs requested through sysfs at chip remove to avoid leaking
the associated memory and sysfs entries.
The stale sysfs entries prevented the gpio numbers from being exported
when the gpio range was later reused (e.g. at device reconnect).
This also fixes the related module-reference leak.
Note that kernfs makes sure that any on-going sysfs operations finish
before the class devices are unregistered and that further accesses
fail.
The chip exported flag is used to prevent gpiod exports during removal.
This also makes it harder to trigger, but does not fix, the related race
between gpiochip_remove and export_store, which is really a race with
gpiod_request that needs to be addressed separately.
Also note that this would prevent the crashes (e.g. NULL-dereferences)
at reconnect that affects pre-3.18 kernels, as well as use-after-free on
operations on open attribute files on pre-3.14 kernels (prior to
kernfs).
Fixes: d8f388d8dc8d ("gpio: sysfs interface")
Cc: stable <stable@vger.kernel.org> # v2.6.27: 01cca93a9491
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpio/gpiolib-sysfs.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index aed7dd6..d9fa798 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -519,6 +519,7 @@ static struct class gpio_class = {
*/
int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
{
+ struct gpio_chip *chip;
unsigned long flags;
int status;
const char *ioname = NULL;
@@ -536,8 +537,16 @@ int gpiod_export(struct gpio_desc *desc, bool direction_may_change)
return -EINVAL;
}
+ chip = desc->chip;
+
mutex_lock(&sysfs_lock);
+ /* check if chip is being removed */
+ if (!chip || !chip->exported) {
+ status = -ENODEV;
+ goto fail_unlock;
+ }
+
spin_lock_irqsave(&gpio_lock, flags);
if (!test_bit(FLAG_REQUESTED, &desc->flags) ||
test_bit(FLAG_EXPORT, &desc->flags)) {
@@ -766,12 +775,15 @@ void gpiochip_unexport(struct gpio_chip *chip)
{
int status;
struct device *dev;
+ struct gpio_desc *desc;
+ unsigned int i;
mutex_lock(&sysfs_lock);
dev = class_find_device(&gpio_class, NULL, chip, match_export);
if (dev) {
put_device(dev);
device_unregister(dev);
+ /* prevent further gpiod exports */
chip->exported = false;
status = 0;
} else
@@ -780,6 +792,13 @@ void gpiochip_unexport(struct gpio_chip *chip)
if (status)
chip_dbg(chip, "%s: status %d\n", __func__, status);
+
+ /* unregister gpiod class devices owned by sysfs */
+ for (i = 0; i < chip->ngpio; i++) {
+ desc = &chip->desc[i];
+ if (test_and_clear_bit(FLAG_SYSFS, &desc->flags))
+ gpiod_free(desc);
+ }
}
static int __init gpiolib_sysfs_init(void)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 007/178] mnt: Fix fs_fully_visible to verify the root directory is visible
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (5 preceding siblings ...)
2015-06-08 13:39 ` [PATCH 3.18 006/178] gpio: sysfs: fix memory leaks and device hotplug Sasha Levin
@ 2015-06-08 13:39 ` Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 008/178] mm/memory-failure: call shake_page() when error hits thp tail page Sasha Levin
` (171 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Eric W. Biederman" <ebiederm@xmission.com>
[ Upstream commit 7e96c1b0e0f495c5a7450dc4aa7c9a24ba4305bd ]
This fixes a dumb bug in fs_fully_visible that allows proc or sys to
be mounted if there is a bind mount of part of /proc/ or /sys/ visible.
Cc: stable@vger.kernel.org
Reported-by: Eric Windisch <ewindisch@docker.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/namespace.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fs/namespace.c b/fs/namespace.c
index 07ba424..64837e3 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -3137,6 +3137,12 @@ bool fs_fully_visible(struct file_system_type *type)
if (mnt->mnt.mnt_sb->s_type != type)
continue;
+ /* This mount is not fully visible if it's root directory
+ * is not the root directory of the filesystem.
+ */
+ if (mnt->mnt.mnt_root != mnt->mnt.mnt_sb->s_root)
+ continue;
+
/* This mount is not fully visible if there are any child mounts
* that cover anything except for empty directories.
*/
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 008/178] mm/memory-failure: call shake_page() when error hits thp tail page
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (6 preceding siblings ...)
2015-06-08 13:39 ` [PATCH 3.18 007/178] mnt: Fix fs_fully_visible to verify the root directory is visible Sasha Levin
@ 2015-06-08 13:39 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 009/178] path_openat(): fix double fput() Sasha Levin
` (170 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:39 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
[ Upstream commit 09789e5de18e4e442870b2d700831f5cb802eb05 ]
Currently memory_failure() calls shake_page() to sweep pages out from
pcplists only when the victim page is 4kB LRU page or thp head page.
But we should do this for a thp tail page too.
Consider that a memory error hits a thp tail page whose head page is on
a pcplist when memory_failure() runs. Then, the current kernel skips
shake_pages() part, so hwpoison_user_mappings() returns without calling
split_huge_page() nor try_to_unmap() because PageLRU of the thp head is
still cleared due to the skip of shake_page().
As a result, me_huge_page() runs for the thp, which is broken behavior.
One effect is a leak of the thp. And another is to fail to isolate the
memory error, so later access to the error address causes another MCE,
which kills the processes which used the thp.
This patch fixes this problem by calling shake_page() for thp tail case.
Fixes: 385de35722c9 ("thp: allow a hwpoisoned head page to be put back to LRU")
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Dean Nelson <dnelson@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Jin Dongming <jin.dongming@np.css.fujitsu.com>
Cc: <stable@vger.kernel.org> [3.4+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
mm/memory-failure.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 3415e7a..f098ae8 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1153,10 +1153,10 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
* The check (unnecessarily) ignores LRU pages being isolated and
* walked by the page reclaim code, however that's not a big loss.
*/
- if (!PageHuge(p) && !PageTransTail(p)) {
- if (!PageLRU(p))
- shake_page(p, 0);
- if (!PageLRU(p)) {
+ if (!PageHuge(p)) {
+ if (!PageLRU(hpage))
+ shake_page(hpage, 0);
+ if (!PageLRU(hpage)) {
/*
* shake_page could have turned it free.
*/
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 009/178] path_openat(): fix double fput()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (7 preceding siblings ...)
2015-06-08 13:39 ` [PATCH 3.18 008/178] mm/memory-failure: call shake_page() when error hits thp tail page Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 010/178] writeback: use |1 instead of +1 to protect against div by zero Sasha Levin
` (169 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Al Viro <viro@zeniv.linux.org.uk>
[ Upstream commit f15133df088ecadd141ea1907f2c96df67c729f0 ]
path_openat() jumps to the wrong place after do_tmpfile() - it has
already done path_cleanup() (as part of path_lookupat() called by
do_tmpfile()), so doing that again can lead to double fput().
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/namei.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/namei.c b/fs/namei.c
index 890d358..d20f061 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3197,7 +3197,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
if (unlikely(file->f_flags & __O_TMPFILE)) {
error = do_tmpfile(dfd, pathname, nd, flags, op, file, &opened);
- goto out;
+ goto out2;
}
error = path_init(dfd, pathname->name, flags | LOOKUP_PARENT, nd, &base);
@@ -3235,6 +3235,7 @@ out:
path_put(&nd->root);
if (base)
fput(base);
+out2:
if (!(opened & FILE_OPENED)) {
BUG_ON(!error);
put_filp(file);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 010/178] writeback: use |1 instead of +1 to protect against div by zero
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (8 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 009/178] path_openat(): fix double fput() Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 011/178] mm: soft-offline: fix num_poisoned_pages counting on concurrent events Sasha Levin
` (168 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Tejun Heo <tj@kernel.org>
[ Upstream commit 464d1387acb94dc43ba772b35242345e3d2ead1b ]
mm/page-writeback.c has several places where 1 is added to the divisor
to prevent division by zero exceptions; however, if the original
divisor is equivalent to -1, adding 1 leads to division by zero.
There are three places where +1 is used for this purpose - one in
pos_ratio_polynom() and two in bdi_position_ratio(). The second one
in bdi_position_ratio() actually triggered div-by-zero oops on a
machine running a 3.10 kernel. The divisor is
x_intercept - bdi_setpoint + 1 == span + 1
span is confirmed to be (u32)-1. It isn't clear how it ended up that
but it could be from write bandwidth calculation underflow fixed by
c72efb658f7c ("writeback: fix possible underflow in write bandwidth
calculation").
At any rate, +1 isn't a proper protection against div-by-zero. This
patch converts all +1 protections to |1. Note that
bdi_update_dirty_ratelimit() was already using |1 before this patch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
mm/page-writeback.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index c8abd20..b9aaa16 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -580,7 +580,7 @@ static long long pos_ratio_polynom(unsigned long setpoint,
long x;
x = div64_s64(((s64)setpoint - (s64)dirty) << RATELIMIT_CALC_SHIFT,
- limit - setpoint + 1);
+ (limit - setpoint) | 1);
pos_ratio = x;
pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT;
pos_ratio = pos_ratio * x >> RATELIMIT_CALC_SHIFT;
@@ -807,7 +807,7 @@ static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
* scale global setpoint to bdi's:
* bdi_setpoint = setpoint * bdi_thresh / thresh
*/
- x = div_u64((u64)bdi_thresh << 16, thresh + 1);
+ x = div_u64((u64)bdi_thresh << 16, thresh | 1);
bdi_setpoint = setpoint * (u64)x >> 16;
/*
* Use span=(8*write_bw) in single bdi case as indicated by
@@ -822,7 +822,7 @@ static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
if (bdi_dirty < x_intercept - span / 4) {
pos_ratio = div64_u64(pos_ratio * (x_intercept - bdi_dirty),
- x_intercept - bdi_setpoint + 1);
+ (x_intercept - bdi_setpoint) | 1);
} else
pos_ratio /= 4;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 011/178] mm: soft-offline: fix num_poisoned_pages counting on concurrent events
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (9 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 010/178] writeback: use |1 instead of +1 to protect against div by zero Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 012/178] xen/events: Clear cpu_evtchn_mask before resuming Sasha Levin
` (167 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
[ Upstream commit 602498f9aa43d4951eece3fd6ad95a6d0a78d537 ]
If multiple soft offline events hit one free page/hugepage concurrently,
soft_offline_page() can handle the free page/hugepage multiple times,
which makes num_poisoned_pages counter increased more than once. This
patch fixes this wrong counting by checking TestSetPageHWPoison for normal
papes and by checking the return value of dequeue_hwpoisoned_huge_page()
for hugepages.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Dean Nelson <dnelson@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: <stable@vger.kernel.org> [3.14+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
mm/memory-failure.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index f098ae8..22f047f 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1733,12 +1733,12 @@ int soft_offline_page(struct page *page, int flags)
} else if (ret == 0) { /* for free pages */
if (PageHuge(page)) {
set_page_hwpoison_huge_page(hpage);
- dequeue_hwpoisoned_huge_page(hpage);
- atomic_long_add(1 << compound_order(hpage),
+ if (!dequeue_hwpoisoned_huge_page(hpage))
+ atomic_long_add(1 << compound_order(hpage),
&num_poisoned_pages);
} else {
- SetPageHWPoison(page);
- atomic_long_inc(&num_poisoned_pages);
+ if (!TestSetPageHWPoison(page))
+ atomic_long_inc(&num_poisoned_pages);
}
}
unset_migratetype_isolate(page, MIGRATE_MOVABLE);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 012/178] xen/events: Clear cpu_evtchn_mask before resuming
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (10 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 011/178] mm: soft-offline: fix num_poisoned_pages counting on concurrent events Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 013/178] xen/xenbus: Update xenbus event channel on resume Sasha Levin
` (166 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
[ Upstream commit 5cec98834989a014a9560b1841649eaca95cf00e ]
When a guest is resumed, the hypervisor may change event channel
assignments. If this happens and the guest uses 2-level events it
is possible for the interrupt to be claimed by wrong VCPU since
cpu_evtchn_mask bits may be stale. This can happen even though
evtchn_2l_bind_to_cpu() attempts to clear old bits: irq_info that
is passed in is not necessarily the original one (from pre-migration
times) but instead is freshly allocated during resume and so any
information about which CPU the channel was bound to is lost.
Thus we should clear the mask during resume.
We also need to make sure that bits for xenstore and console channels
are set when these two subsystems are resumed. While rebind_evtchn_irq()
(which is invoked for both of them on a resume) calls irq_set_affinity(),
the latter will in fact postpone setting affinity until handling the
interrupt. But because cpu_evtchn_mask will have bits for these two
cleared we won't be able to take the interrupt.
With that in mind, we need to bind those two channels explicitly in
rebind_evtchn_irq(). We will keep irq_set_affinity() so that we have a
pass through generic irq affinity code later, in case something needs
to be updated there as well.
(Also replace cpumask_of(0) with cpumask_of(info->cpu) in
rebind_evtchn_irq(): it should be set to zero in preceding
xen_irq_info_evtchn_setup().)
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reported-by: Annie Li <annie.li@oracle.com>
Cc: <stable@vger.kernel.org> # 3.14+
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/xen/events/events_2l.c | 10 ++++++++++
drivers/xen/events/events_base.c | 5 +++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/xen/events/events_2l.c b/drivers/xen/events/events_2l.c
index 5db43fc..7dd4631 100644
--- a/drivers/xen/events/events_2l.c
+++ b/drivers/xen/events/events_2l.c
@@ -345,6 +345,15 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}
+static void evtchn_2l_resume(void)
+{
+ int i;
+
+ for_each_online_cpu(i)
+ memset(per_cpu(cpu_evtchn_mask, i), 0, sizeof(xen_ulong_t) *
+ EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD);
+}
+
static const struct evtchn_ops evtchn_ops_2l = {
.max_channels = evtchn_2l_max_channels,
.nr_channels = evtchn_2l_max_channels,
@@ -356,6 +365,7 @@ static const struct evtchn_ops evtchn_ops_2l = {
.mask = evtchn_2l_mask,
.unmask = evtchn_2l_unmask,
.handle_events = evtchn_2l_handle_events,
+ .resume = evtchn_2l_resume,
};
void __init xen_evtchn_2l_init(void)
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 70fba97..a1ec564 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -1279,8 +1279,9 @@ void rebind_evtchn_irq(int evtchn, int irq)
mutex_unlock(&irq_mapping_update_lock);
- /* new event channels are always bound to cpu 0 */
- irq_set_affinity(irq, cpumask_of(0));
+ bind_evtchn_to_cpu(evtchn, info->cpu);
+ /* This will be deferred until interrupt is processed */
+ irq_set_affinity(irq, cpumask_of(info->cpu));
/* Unmask the event channel. */
enable_irq(irq);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 013/178] xen/xenbus: Update xenbus event channel on resume
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (11 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 012/178] xen/events: Clear cpu_evtchn_mask before resuming Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 014/178] xen/console: Update console " Sasha Levin
` (165 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
[ Upstream commit 16f1cf3ba7303228372d3756677bf7d10e79cf9f ]
After a resume the hypervisor/tools may change xenbus event
channel number. We should re-query it.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/xen/xenbus/xenbus_probe.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 564b315..5390a67 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -57,6 +57,7 @@
#include <xen/xen.h>
#include <xen/xenbus.h>
#include <xen/events.h>
+#include <xen/xen-ops.h>
#include <xen/page.h>
#include <xen/hvm.h>
@@ -735,6 +736,30 @@ static int __init xenstored_local_init(void)
return err;
}
+static int xenbus_resume_cb(struct notifier_block *nb,
+ unsigned long action, void *data)
+{
+ int err = 0;
+
+ if (xen_hvm_domain()) {
+ uint64_t v;
+
+ err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
+ if (!err && v)
+ xen_store_evtchn = v;
+ else
+ pr_warn("Cannot update xenstore event channel: %d\n",
+ err);
+ } else
+ xen_store_evtchn = xen_start_info->store_evtchn;
+
+ return err;
+}
+
+static struct notifier_block xenbus_resume_nb = {
+ .notifier_call = xenbus_resume_cb,
+};
+
static int __init xenbus_init(void)
{
int err = 0;
@@ -793,6 +818,10 @@ static int __init xenbus_init(void)
goto out_error;
}
+ if ((xen_store_domain_type != XS_LOCAL) &&
+ (xen_store_domain_type != XS_UNKNOWN))
+ xen_resume_notifier_register(&xenbus_resume_nb);
+
#ifdef CONFIG_XEN_COMPAT_XENFS
/*
* Create xenfs mountpoint in /proc for compatibility with
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 014/178] xen/console: Update console event channel on resume
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (12 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 013/178] xen/xenbus: Update xenbus event channel on resume Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 015/178] xen/events: Set irq_info->evtchn before binding the channel to CPU in __startup_pirq() Sasha Levin
` (164 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
[ Upstream commit b9d934f27c91b878c4b2e64299d6e419a4022f8d ]
After a resume the hypervisor/tools may change console event
channel number. We should re-query it.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/tty/hvc/hvc_xen.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index f1e5742..5bab1c6 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -299,11 +299,27 @@ static int xen_initial_domain_console_init(void)
return 0;
}
+static void xen_console_update_evtchn(struct xencons_info *info)
+{
+ if (xen_hvm_domain()) {
+ uint64_t v;
+ int err;
+
+ err = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
+ if (!err && v)
+ info->evtchn = v;
+ } else
+ info->evtchn = xen_start_info->console.domU.evtchn;
+}
+
void xen_console_resume(void)
{
struct xencons_info *info = vtermno_to_xencons(HVC_COOKIE);
- if (info != NULL && info->irq)
+ if (info != NULL && info->irq) {
+ if (!xen_initial_domain())
+ xen_console_update_evtchn(info);
rebind_evtchn_irq(info->evtchn, info->irq);
+ }
}
static void xencons_disconnect_backend(struct xencons_info *info)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 015/178] xen/events: Set irq_info->evtchn before binding the channel to CPU in __startup_pirq()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (13 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 014/178] xen/console: Update console " Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 016/178] xen-pciback: Add name prefix to global 'permissive' variable Sasha Levin
` (163 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
[ Upstream commit 16e6bd5970c88a2ac018b84a5f1dd5c2ff1fdf2c ]
.. because bind_evtchn_to_cpu(evtchn, cpu) will map evtchn to
'info' and pass 'info' down to xen_evtchn_port_bind_to_cpu().
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Tested-by: Annie Li <annie.li@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/xen/events/events_base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index a1ec564..2b8553b 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -529,8 +529,8 @@ static unsigned int __startup_pirq(unsigned int irq)
if (rc)
goto err;
- bind_evtchn_to_cpu(evtchn, 0);
info->evtchn = evtchn;
+ bind_evtchn_to_cpu(evtchn, 0);
rc = xen_evtchn_port_setup(info);
if (rc)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 016/178] xen-pciback: Add name prefix to global 'permissive' variable
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (14 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 015/178] xen/events: Set irq_info->evtchn before binding the channel to CPU in __startup_pirq() Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 017/178] Revert "dm crypt: fix deadlock when async crypto algorithm returns -EBUSY" Sasha Levin
` (162 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ben Hutchings <ben@decadent.org.uk>
[ Upstream commit 8014bcc86ef112eab9ee1db312dba4e6b608cf89 ]
The variable for the 'permissive' module parameter used to be static
but was recently changed to be extern. This puts it in the kernel
global namespace if the driver is built-in, so its name should begin
with a prefix identifying the driver.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: af6fc858a35b ("xen-pciback: limit guest control of command register")
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/xen/xen-pciback/conf_space.c | 6 +++---
drivers/xen/xen-pciback/conf_space.h | 2 +-
| 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/xen/xen-pciback/conf_space.c b/drivers/xen/xen-pciback/conf_space.c
index 75fe3d4..9c23420 100644
--- a/drivers/xen/xen-pciback/conf_space.c
+++ b/drivers/xen/xen-pciback/conf_space.c
@@ -16,8 +16,8 @@
#include "conf_space.h"
#include "conf_space_quirks.h"
-bool permissive;
-module_param(permissive, bool, 0644);
+bool xen_pcibk_permissive;
+module_param_named(permissive, xen_pcibk_permissive, bool, 0644);
/* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word,
* xen_pcibk_write_config_word, and xen_pcibk_write_config_byte are created. */
@@ -262,7 +262,7 @@ int xen_pcibk_config_write(struct pci_dev *dev, int offset, int size, u32 value)
* This means that some fields may still be read-only because
* they have entries in the config_field list that intercept
* the write and do nothing. */
- if (dev_data->permissive || permissive) {
+ if (dev_data->permissive || xen_pcibk_permissive) {
switch (size) {
case 1:
err = pci_write_config_byte(dev, offset,
diff --git a/drivers/xen/xen-pciback/conf_space.h b/drivers/xen/xen-pciback/conf_space.h
index 2e1d73d..62461a8 100644
--- a/drivers/xen/xen-pciback/conf_space.h
+++ b/drivers/xen/xen-pciback/conf_space.h
@@ -64,7 +64,7 @@ struct config_field_entry {
void *data;
};
-extern bool permissive;
+extern bool xen_pcibk_permissive;
#define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset)
--git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c
index 2d73693..f8baf46 100644
--- a/drivers/xen/xen-pciback/conf_space_header.c
+++ b/drivers/xen/xen-pciback/conf_space_header.c
@@ -105,7 +105,7 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data)
cmd->val = value;
- if (!permissive && (!dev_data || !dev_data->permissive))
+ if (!xen_pcibk_permissive && (!dev_data || !dev_data->permissive))
return 0;
/* Only allow the guest to control certain bits. */
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 017/178] Revert "dm crypt: fix deadlock when async crypto algorithm returns -EBUSY"
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (15 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 016/178] xen-pciback: Add name prefix to global 'permissive' variable Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 018/178] blk-mq: fix race between timeout and CPU hotplug Sasha Levin
` (161 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Rabin Vincent <rabin.vincent@axis.com>
[ Upstream commit c0403ec0bb5a8c5b267fb7e16021bec0b17e4964 ]
This reverts Linux 4.1-rc1 commit 0618764cb25f6fa9fb31152995de42a8a0496475.
The problem which that commit attempts to fix actually lies in the
Freescale CAAM crypto driver not dm-crypt.
dm-crypt uses CRYPTO_TFM_REQ_MAY_BACKLOG. This means the the crypto
driver should internally backlog requests which arrive when the queue is
full and process them later. Until the crypto hw's queue becomes full,
the driver returns -EINPROGRESS. When the crypto hw's queue if full,
the driver returns -EBUSY, and if CRYPTO_TFM_REQ_MAY_BACKLOG is set, is
expected to backlog the request and process it when the hardware has
queue space. At the point when the driver takes the request from the
backlog and starts processing it, it calls the completion function with
a status of -EINPROGRESS. The completion function is called (for a
second time, in the case of backlogged requests) with a status/err of 0
when a request is done.
Crypto drivers for hardware without hardware queueing use the helpers,
crypto_init_queue(), crypto_enqueue_request(), crypto_dequeue_request()
and crypto_get_backlog() helpers to implement this behaviour correctly,
while others implement this behaviour without these helpers (ccp, for
example).
dm-crypt (before the patch that needs reverting) uses this API
correctly. It queues up as many requests as the hw queues will allow
(i.e. as long as it gets back -EINPROGRESS from the request function).
Then, when it sees at least one backlogged request (gets -EBUSY), it
waits till that backlogged request is handled (completion gets called
with -EINPROGRESS), and then continues. The references to
af_alg_wait_for_completion() and af_alg_complete() in that commit's
commit message are irrelevant because those functions only handle one
request at a time, unlink dm-crypt.
The problem is that the Freescale CAAM driver, which that commit
describes as having being tested with, fails to implement the
backlogging behaviour correctly. In cam_jr_enqueue(), if the hardware
queue is full, it simply returns -EBUSY without backlogging the request.
What the observed deadlock was is not described in the commit message
but it is obviously the wait_for_completion() in crypto_convert() where
dm-crypto would wait for the completion being called with -EINPROGRESS
in the case of backlogged requests. This completion will never be
completed due to the bug in the CAAM driver.
Commit 0618764cb25 incorrectly made dm-crypt wait for every request,
even when the driver/hardware queues are not full, which means that
dm-crypt will never see -EBUSY. This means that that commit will cause
a performance regression on all crypto drivers which implement the API
correctly.
Revert it. Correct backlog handling should be implemented in the CAAM
driver instead.
Cc'ing stable purely because commit 0618764cb25 did. If for some reason
a stable@ kernel did pick up commit 0618764cb25 it should get reverted.
Signed-off-by: Rabin Vincent <rabin.vincent@axis.com>
Reviewed-by: Horia Geanta <horia.geanta@freescale.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/md/dm-crypt.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index a9f2266..08981be 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -920,10 +920,11 @@ static int crypt_convert(struct crypt_config *cc,
switch (r) {
/* async */
- case -EINPROGRESS:
case -EBUSY:
wait_for_completion(&ctx->restart);
reinit_completion(&ctx->restart);
+ /* fall through*/
+ case -EINPROGRESS:
ctx->req = NULL;
ctx->cc_sector++;
continue;
@@ -1314,8 +1315,10 @@ static void kcryptd_async_done(struct crypto_async_request *async_req,
struct dm_crypt_io *io = container_of(ctx, struct dm_crypt_io, ctx);
struct crypt_config *cc = io->cc;
- if (error == -EINPROGRESS)
+ if (error == -EINPROGRESS) {
+ complete(&ctx->restart);
return;
+ }
if (!error && cc->iv_gen_ops && cc->iv_gen_ops->post)
error = cc->iv_gen_ops->post(cc, iv_of_dmreq(cc, dmreq), dmreq);
@@ -1326,15 +1329,12 @@ static void kcryptd_async_done(struct crypto_async_request *async_req,
crypt_free_req(cc, req_of_dmreq(cc, dmreq), io->base_bio);
if (!atomic_dec_and_test(&ctx->cc_pending))
- goto done;
+ return;
if (bio_data_dir(io->base_bio) == READ)
kcryptd_crypt_read_done(io);
else
kcryptd_crypt_write_io_submit(io, 1);
-done:
- if (!completion_done(&ctx->restart))
- complete(&ctx->restart);
}
static void kcryptd_crypt(struct work_struct *work)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 018/178] blk-mq: fix race between timeout and CPU hotplug
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (16 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 017/178] Revert "dm crypt: fix deadlock when async crypto algorithm returns -EBUSY" Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 019/178] blk-mq: fix CPU hotplug handling Sasha Levin
` (160 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ming Lei <ming.lei@canonical.com>
[ Upstream commit f054b56c951bf1731ba7314a4c7f1cc0b2977cc9 ]
Firstly during CPU hotplug, even queue is freezed, timeout
handler still may come and access hctx->tags, which may cause
use after free, so this patch deactivates timeout handler
inside CPU hotplug notifier.
Secondly, tags can be shared by more than one queues, so we
have to check if the hctx has been unmapped, otherwise
still use-after-free on tags can be triggered.
Cc: <stable@vger.kernel.org>
Reported-by: Dongsu Park <dongsu.park@profitbricks.com>
Tested-by: Dongsu Park <dongsu.park@profitbricks.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
block/blk-mq.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 849479d..9f30a9c 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -601,8 +601,11 @@ static void blk_mq_rq_timer(unsigned long priv)
data.next = blk_rq_timeout(round_jiffies_up(data.next));
mod_timer(&q->timeout, data.next);
} else {
- queue_for_each_hw_ctx(q, hctx, i)
- blk_mq_tag_idle(hctx);
+ queue_for_each_hw_ctx(q, hctx, i) {
+ /* the hctx may be unmapped, so check it here */
+ if (blk_mq_hw_queue_mapped(hctx))
+ blk_mq_tag_idle(hctx);
+ }
}
}
@@ -1974,9 +1977,16 @@ static int blk_mq_queue_reinit_notify(struct notifier_block *nb,
*/
list_for_each_entry(q, &all_q_list, all_q_node)
blk_mq_freeze_queue_start(q);
- list_for_each_entry(q, &all_q_list, all_q_node)
+ list_for_each_entry(q, &all_q_list, all_q_node) {
blk_mq_freeze_queue_wait(q);
+ /*
+ * timeout handler can't touch hw queue during the
+ * reinitialization
+ */
+ del_timer_sync(&q->timeout);
+ }
+
list_for_each_entry(q, &all_q_list, all_q_node)
blk_mq_queue_reinit(q);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 019/178] blk-mq: fix CPU hotplug handling
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (17 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 018/178] blk-mq: fix race between timeout and CPU hotplug Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 020/178] ARM: dts: OMAP3-N900: Add microphone bias voltages Sasha Levin
` (159 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ming Lei <ming.lei@canonical.com>
[ Upstream commit 2a34c0872adf252f23a6fef2d051a169ac796cef ]
hctx->tags has to be set as NULL in case that it is to be unmapped
no matter if set->tags[hctx->queue_num] is NULL or not in blk_mq_map_swqueue()
because shared tags can be freed already from another request queue.
The same situation has to be considered during handling CPU online too.
Unmapped hw queue can be remapped after CPU topo is changed, so we need
to allocate tags for the hw queue in blk_mq_map_swqueue(). Then tags
allocation for hw queue can be removed in hctx cpu online notifier, and it
is reasonable to do that after mapping is updated.
Cc: <stable@vger.kernel.org>
Reported-by: Dongsu Park <dongsu.park@profitbricks.com>
Tested-by: Dongsu Park <dongsu.park@profitbricks.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
block/blk-mq.c | 34 +++++++++++++---------------------
1 file changed, 13 insertions(+), 21 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 9f30a9c..9321837 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1476,22 +1476,6 @@ static int blk_mq_hctx_cpu_offline(struct blk_mq_hw_ctx *hctx, int cpu)
return NOTIFY_OK;
}
-static int blk_mq_hctx_cpu_online(struct blk_mq_hw_ctx *hctx, int cpu)
-{
- struct request_queue *q = hctx->queue;
- struct blk_mq_tag_set *set = q->tag_set;
-
- if (set->tags[hctx->queue_num])
- return NOTIFY_OK;
-
- set->tags[hctx->queue_num] = blk_mq_init_rq_map(set, hctx->queue_num);
- if (!set->tags[hctx->queue_num])
- return NOTIFY_STOP;
-
- hctx->tags = set->tags[hctx->queue_num];
- return NOTIFY_OK;
-}
-
static int blk_mq_hctx_notify(void *data, unsigned long action,
unsigned int cpu)
{
@@ -1499,8 +1483,11 @@ static int blk_mq_hctx_notify(void *data, unsigned long action,
if (action == CPU_DEAD || action == CPU_DEAD_FROZEN)
return blk_mq_hctx_cpu_offline(hctx, cpu);
- else if (action == CPU_ONLINE || action == CPU_ONLINE_FROZEN)
- return blk_mq_hctx_cpu_online(hctx, cpu);
+
+ /*
+ * In case of CPU online, tags may be reallocated
+ * in blk_mq_map_swqueue() after mapping is updated.
+ */
return NOTIFY_OK;
}
@@ -1685,6 +1672,7 @@ static void blk_mq_map_swqueue(struct request_queue *q)
unsigned int i;
struct blk_mq_hw_ctx *hctx;
struct blk_mq_ctx *ctx;
+ struct blk_mq_tag_set *set = q->tag_set;
queue_for_each_hw_ctx(q, hctx, i) {
cpumask_clear(hctx->cpumask);
@@ -1711,16 +1699,20 @@ static void blk_mq_map_swqueue(struct request_queue *q)
* disable it and free the request entries.
*/
if (!hctx->nr_ctx) {
- struct blk_mq_tag_set *set = q->tag_set;
-
if (set->tags[i]) {
blk_mq_free_rq_map(set, set->tags[i], i);
set->tags[i] = NULL;
- hctx->tags = NULL;
}
+ hctx->tags = NULL;
continue;
}
+ /* unmapped hw queue can be remapped after CPU topo changed */
+ if (!set->tags[i])
+ set->tags[i] = blk_mq_init_rq_map(set, i);
+ hctx->tags = set->tags[i];
+ WARN_ON(!hctx->tags);
+
/*
* Initialize batch roundrobin counts
*/
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 020/178] ARM: dts: OMAP3-N900: Add microphone bias voltages
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (18 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 019/178] blk-mq: fix CPU hotplug handling Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 021/178] ARM: dts: imx25: Add #pwm-cells to pwm4 Sasha Levin
` (158 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Pavel Machek <pavel@ucw.cz>
[ Upstream commit 1819e3034ee26ffadc71880064ed8b8e7d74f52c ]
N900 audio recording needs that codec provides bias voltage for integrated
digital microphone and headset microphone depending which one is used.
Digital microphone uses 2 V bias and it comes from the codec A part. Codec
B part drives the headset microphone bias and that is set to 2.5 V.
Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Pavel Machek <pavel@ucw.cz>
[Jarkko: Headset mic bias changed to 2 (2.5 V) as it was before commit
e2e8bfdf6157 ("ASoC: tlv320aic3x: Convert mic bias to a supply widget")]
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/omap3-n900.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts
index bc82a12..ae630a9 100644
--- a/arch/arm/boot/dts/omap3-n900.dts
+++ b/arch/arm/boot/dts/omap3-n900.dts
@@ -445,6 +445,8 @@
DRVDD-supply = <&vmmc2>;
IOVDD-supply = <&vio>;
DVDD-supply = <&vio>;
+
+ ai3x-micbias-vg = <1>;
};
tlv320aic3x_aux: tlv320aic3x@19 {
@@ -456,6 +458,8 @@
DRVDD-supply = <&vmmc2>;
IOVDD-supply = <&vio>;
DVDD-supply = <&vio>;
+
+ ai3x-micbias-vg = <2>;
};
tsl2563: tsl2563@29 {
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 021/178] ARM: dts: imx25: Add #pwm-cells to pwm4
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (19 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 020/178] ARM: dts: OMAP3-N900: Add microphone bias voltages Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 022/178] ARM: dts: imx6: phyFLEX: USB VBUS control is active-high Sasha Levin
` (157 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Markus Pargmann <mpa@pengutronix.de>
[ Upstream commit f90d3f0d0a11fa77918fd5497cb616dd2faa8431 ]
The property '#pwm-cells' is currently missing. It is not possible to
use pwm4 without this property.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Fixes: 5658a68fb578 ("ARM i.MX25: Add devicetree")
Cc: <stable@vger.kernel.org>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/imx25.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index e4d3aec..677f81d 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -428,6 +428,7 @@
pwm4: pwm@53fc8000 {
compatible = "fsl,imx25-pwm", "fsl,imx27-pwm";
+ #pwm-cells = <2>;
reg = <0x53fc8000 0x4000>;
clocks = <&clks 108>, <&clks 52>;
clock-names = "ipg", "per";
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 022/178] ARM: dts: imx6: phyFLEX: USB VBUS control is active-high
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (20 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 021/178] ARM: dts: imx25: Add #pwm-cells to pwm4 Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 023/178] ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name Sasha Levin
` (156 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Philipp Zabel <p.zabel@pengutronix.de>
[ Upstream commit 7f8d49dcc66a3dd3a8fc3078330b8fb9e616ad3f ]
The fixed-regulator bindings require a separate property enable-active-high,
the standard gpio phandle property polarity setting is ignored.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Fixes: 4fe69a934b1f ("ARM: dts: Add Phytec pfla02 with i.MX6 DualLite/Solo")
Cc: stable@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
index 0e50bb0..4135697 100644
--- a/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-phytec-pfla02.dtsi
@@ -31,6 +31,7 @@
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio4 15 0>;
+ enable-active-high;
};
reg_usb_h1_vbus: regulator@1 {
@@ -40,6 +41,7 @@
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 0 0>;
+ enable-active-high;
};
};
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 023/178] ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (21 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 022/178] ARM: dts: imx6: phyFLEX: USB VBUS control is active-high Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 024/178] ARM: dts: imx23-olinuxino: Fix dr_mode of usb0 Sasha Levin
` (155 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Marek Vasut <marex@denx.de>
[ Upstream commit 4ada77e37a773168fea484899201e272ab44ba8b ]
Fix a typo in the TX DMA interrupt name for AUART4.
This patch makes AUART4 operational again.
Signed-off-by: Marek Vasut <marex@denx.de>
Fixes: f30fb03d4d3a ("ARM: dts: add generic DMA device tree binding for mxs-dma")
Cc: stable@vger.kernel.org
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt | 2 +-
arch/arm/boot/dts/imx28.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
index a4873e5..e30e184 100644
--- a/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-mxs-dma.txt
@@ -38,7 +38,7 @@ dma_apbx: dma-apbx@80024000 {
80 81 68 69
70 71 72 73
74 75 76 77>;
- interrupt-names = "auart4-rx", "aurat4-tx", "spdif-tx", "empty",
+ interrupt-names = "auart4-rx", "auart4-tx", "spdif-tx", "empty",
"saif0", "saif1", "i2c0", "i2c1",
"auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
"auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
diff --git a/arch/arm/boot/dts/imx28.dtsi b/arch/arm/boot/dts/imx28.dtsi
index 47f68ac..5ed245a 100644
--- a/arch/arm/boot/dts/imx28.dtsi
+++ b/arch/arm/boot/dts/imx28.dtsi
@@ -900,7 +900,7 @@
80 81 68 69
70 71 72 73
74 75 76 77>;
- interrupt-names = "auart4-rx", "aurat4-tx", "spdif-tx", "empty",
+ interrupt-names = "auart4-rx", "auart4-tx", "spdif-tx", "empty",
"saif0", "saif1", "i2c0", "i2c1",
"auart0-rx", "auart0-tx", "auart1-rx", "auart1-tx",
"auart2-rx", "auart2-tx", "auart3-rx", "auart3-tx";
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 024/178] ARM: dts: imx23-olinuxino: Fix dr_mode of usb0
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (22 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 023/178] ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 025/178] ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO Sasha Levin
` (154 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Stefan Wahren <stefan.wahren@i2se.com>
[ Upstream commit 0fdebe1a2f4d3a8fc03754022fabf8ba95e131a3 ]
The dr_mode of usb0 on imx233-olinuxino is left to default "otg".
Since the green LED (GPIO2_1) on imx233-olinuxino is connected to the
same pin as USB_OTG_ID it's possible to disable USB host by LED toggling:
echo 0 > /sys/class/leds/green/brightness
[ 1068.890000] ci_hdrc ci_hdrc.0: remove, state 1
[ 1068.890000] usb usb1: USB disconnect, device number 1
[ 1068.920000] usb 1-1: USB disconnect, device number 2
[ 1068.920000] usb 1-1.1: USB disconnect, device number 3
[ 1069.070000] usb 1-1.2: USB disconnect, device number 4
[ 1069.450000] ci_hdrc ci_hdrc.0: USB bus 1 deregistered
[ 1074.460000] ci_hdrc ci_hdrc.0: timeout waiting for 00000800 in 11
This patch fixes the issue by setting dr_mode to "host" in the dts file.
Reported-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Acked-by: Peter Chen <peter.chen@freescale.com>
Fixes: b49312948285 ("ARM: dts: imx23-olinuxino: Add USB host support")
Cc: stable@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/imx23-olinuxino.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
index 7e6eef2..3b2d74d 100644
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
@@ -93,6 +93,7 @@
ahb@80080000 {
usb0: usb@80080000 {
+ dr_mode = "host";
vbus-supply = <®_usb0_vbus>;
status = "okay";
};
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 025/178] ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (23 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 024/178] ARM: dts: imx23-olinuxino: Fix dr_mode of usb0 Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 026/178] ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC Sasha Levin
` (153 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Fabio Estevam <fabio.estevam@freescale.com>
[ Upstream commit cfe8c59762244251fd9a5e281d48808095ff4090 ]
On imx23-olinuxino the LED turns on when level logic high is aplied to
GPIO2_1.
Fix the gpios property accordingly.
Fixes: b34aa1850244 ("ARM: dts: imx23-olinuxino: Remove unneeded "default-on"")
Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Cc: stable@vger.kernel.org
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/imx23-olinuxino.dts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx23-olinuxino.dts b/arch/arm/boot/dts/imx23-olinuxino.dts
index 3b2d74d..8204539 100644
--- a/arch/arm/boot/dts/imx23-olinuxino.dts
+++ b/arch/arm/boot/dts/imx23-olinuxino.dts
@@ -12,6 +12,7 @@
*/
/dts-v1/;
+#include <dt-bindings/gpio/gpio.h>
#include "imx23.dtsi"
/ {
@@ -123,7 +124,7 @@
user {
label = "green";
- gpios = <&gpio2 1 1>;
+ gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
};
};
};
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 026/178] ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (24 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 025/178] ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 027/178] ARM: OMAP2+: Fix omap off idle power consumption creeping up Sasha Levin
` (152 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Gregory CLEMENT <gregory.clement@free-electrons.com>
[ Upstream commit 750e30d4076ae5e02ad13a376e96c95a2627742c ]
There is no crystal connected to the internal RTC on the Open Block
AX3. So let's disable it in order to prevent the kernel probing the
driver uselessly. Eventually this patches removes the following
warning message from the boot log:
"rtc-mv d0010300.rtc: internal RTC not ticking"
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: <stable@vger.kernel.org> # v3.8 +
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
index 4e5a59e..db06fa3 100644
--- a/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
+++ b/arch/arm/boot/dts/armada-xp-openblocks-ax3-4.dts
@@ -71,6 +71,10 @@
};
internal-regs {
+ rtc@10300 {
+ /* No crystal connected to the internal RTC */
+ status = "disabled";
+ };
serial@12000 {
status = "okay";
};
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 027/178] ARM: OMAP2+: Fix omap off idle power consumption creeping up
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (25 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 026/178] ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 028/178] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction Sasha Levin
` (151 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Tony Lindgren <tony@atomide.com>
[ Upstream commit 102bcb6ed2d1c3ffcc7269afc957c2df11942085 ]
If we use a combination of VMODE and I2C4 for retention modes,
eventually the off idle power consumption will creep up by about
23mW, even during off mode with I2C4 always staying enabled.
Turns out this is because of erratum i531 "Extra Power Consumed
When Repeated Start Operation Mode Is Enabled on I2C Interface
Dedicated for Smart Reflex (I2C4)" as pointed out by Nishanth
Menon <nm@ti.com>.
Let's fix the issue by adding i2c_cfg_clear_mask for the bits
to clear when initializing the I2C4 adapter so we can clear
SREN bit that drives the I2C4 lines low otherwise when there
is no traffic.
Fixes: 3b8c4ebb7630 ("ARM: OMAP3: Fix idle mode signaling for
Cc: stable@vger.kernel.org # v3.16+
sys_clkreq and sys_off_mode")
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/mach-omap2/prm-regbits-34xx.h | 1 +
arch/arm/mach-omap2/prm-regbits-44xx.h | 1 +
arch/arm/mach-omap2/vc.c | 12 ++++++++++--
arch/arm/mach-omap2/vc.h | 2 ++
arch/arm/mach-omap2/vc3xxx_data.c | 1 +
arch/arm/mach-omap2/vc44xx_data.c | 1 +
6 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/prm-regbits-34xx.h b/arch/arm/mach-omap2/prm-regbits-34xx.h
index cbefbd7..661d753 100644
--- a/arch/arm/mach-omap2/prm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-34xx.h
@@ -112,6 +112,7 @@
#define OMAP3430_VC_CMD_ONLP_SHIFT 16
#define OMAP3430_VC_CMD_RET_SHIFT 8
#define OMAP3430_VC_CMD_OFF_SHIFT 0
+#define OMAP3430_SREN_MASK (1 << 4)
#define OMAP3430_HSEN_MASK (1 << 3)
#define OMAP3430_MCODE_MASK (0x7 << 0)
#define OMAP3430_VALID_MASK (1 << 24)
diff --git a/arch/arm/mach-omap2/prm-regbits-44xx.h b/arch/arm/mach-omap2/prm-regbits-44xx.h
index b1c7a33..e794828 100644
--- a/arch/arm/mach-omap2/prm-regbits-44xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-44xx.h
@@ -35,6 +35,7 @@
#define OMAP4430_GLOBAL_WARM_SW_RST_SHIFT 1
#define OMAP4430_GLOBAL_WUEN_MASK (1 << 16)
#define OMAP4430_HSMCODE_MASK (0x7 << 0)
+#define OMAP4430_SRMODEEN_MASK (1 << 4)
#define OMAP4430_HSMODEEN_MASK (1 << 3)
#define OMAP4430_HSSCLL_SHIFT 24
#define OMAP4430_ICEPICK_RST_SHIFT 9
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index be9ef83..076fd20 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -316,7 +316,8 @@ static void __init omap3_vc_init_pmic_signaling(struct voltagedomain *voltdm)
* idle. And we can also scale voltages to zero for off-idle.
* Note that no actual voltage scaling during off-idle will
* happen unless the board specific twl4030 PMIC scripts are
- * loaded.
+ * loaded. See also omap_vc_i2c_init for comments regarding
+ * erratum i531.
*/
val = voltdm->read(OMAP3_PRM_VOLTCTRL_OFFSET);
if (!(val & OMAP3430_PRM_VOLTCTRL_SEL_OFF)) {
@@ -704,9 +705,16 @@ static void __init omap_vc_i2c_init(struct voltagedomain *voltdm)
return;
}
+ /*
+ * Note that for omap3 OMAP3430_SREN_MASK clears SREN to work around
+ * erratum i531 "Extra Power Consumed When Repeated Start Operation
+ * Mode Is Enabled on I2C Interface Dedicated for Smart Reflex (I2C4)".
+ * Otherwise I2C4 eventually leads into about 23mW extra power being
+ * consumed even during off idle using VMODE.
+ */
i2c_high_speed = voltdm->pmic->i2c_high_speed;
if (i2c_high_speed)
- voltdm->rmw(vc->common->i2c_cfg_hsen_mask,
+ voltdm->rmw(vc->common->i2c_cfg_clear_mask,
vc->common->i2c_cfg_hsen_mask,
vc->common->i2c_cfg_reg);
diff --git a/arch/arm/mach-omap2/vc.h b/arch/arm/mach-omap2/vc.h
index cdbdd78..89b83b7 100644
--- a/arch/arm/mach-omap2/vc.h
+++ b/arch/arm/mach-omap2/vc.h
@@ -34,6 +34,7 @@ struct voltagedomain;
* @cmd_ret_shift: RET field shift in PRM_VC_CMD_VAL_* register
* @cmd_off_shift: OFF field shift in PRM_VC_CMD_VAL_* register
* @i2c_cfg_reg: I2C configuration register offset
+ * @i2c_cfg_clear_mask: high-speed mode bit clear mask in I2C config register
* @i2c_cfg_hsen_mask: high-speed mode bit field mask in I2C config register
* @i2c_mcode_mask: MCODE field mask for I2C config register
*
@@ -52,6 +53,7 @@ struct omap_vc_common {
u8 cmd_ret_shift;
u8 cmd_off_shift;
u8 i2c_cfg_reg;
+ u8 i2c_cfg_clear_mask;
u8 i2c_cfg_hsen_mask;
u8 i2c_mcode_mask;
};
diff --git a/arch/arm/mach-omap2/vc3xxx_data.c b/arch/arm/mach-omap2/vc3xxx_data.c
index 75bc4aa..71d74c9 100644
--- a/arch/arm/mach-omap2/vc3xxx_data.c
+++ b/arch/arm/mach-omap2/vc3xxx_data.c
@@ -40,6 +40,7 @@ static struct omap_vc_common omap3_vc_common = {
.cmd_onlp_shift = OMAP3430_VC_CMD_ONLP_SHIFT,
.cmd_ret_shift = OMAP3430_VC_CMD_RET_SHIFT,
.cmd_off_shift = OMAP3430_VC_CMD_OFF_SHIFT,
+ .i2c_cfg_clear_mask = OMAP3430_SREN_MASK | OMAP3430_HSEN_MASK,
.i2c_cfg_hsen_mask = OMAP3430_HSEN_MASK,
.i2c_cfg_reg = OMAP3_PRM_VC_I2C_CFG_OFFSET,
.i2c_mcode_mask = OMAP3430_MCODE_MASK,
diff --git a/arch/arm/mach-omap2/vc44xx_data.c b/arch/arm/mach-omap2/vc44xx_data.c
index 085e5d6..2abd5fa 100644
--- a/arch/arm/mach-omap2/vc44xx_data.c
+++ b/arch/arm/mach-omap2/vc44xx_data.c
@@ -42,6 +42,7 @@ static const struct omap_vc_common omap4_vc_common = {
.cmd_ret_shift = OMAP4430_RET_SHIFT,
.cmd_off_shift = OMAP4430_OFF_SHIFT,
.i2c_cfg_reg = OMAP4_PRM_VC_CFG_I2C_MODE_OFFSET,
+ .i2c_cfg_clear_mask = OMAP4430_SRMODEEN_MASK | OMAP4430_HSMODEEN_MASK,
.i2c_cfg_hsen_mask = OMAP4430_HSMODEEN_MASK,
.i2c_mcode_mask = OMAP4430_HSMCODE_MASK,
};
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 028/178] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (26 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 027/178] ARM: OMAP2+: Fix omap off idle power consumption creeping up Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 029/178] ARM: ux500: Move GPIO regulator for SD-card into board DTSs Sasha Levin
` (150 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Nicolas Schichan <nschichan@freebox.fr>
[ Upstream commit 19fc99d0c6ba7d9b65456496b5bb2169d5f74cd0 ]
In that case, emit_udiv() will be called with rn == ARM_R0 (r_scratch)
and loading rm first into ARM_R0 will result in jit_udiv() function
being called the same dividend and divisor. Fix that by loading rn
first into ARM_R1 and then rm into ARM_R0.
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Cc: <stable@vger.kernel.org> # v3.13+
Fixes: aee636c4809f (bpf: do not use reciprocal divide)
Acked-by: Mircea Gherzan <mgherzan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/net/bpf_jit_32.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index e1268f9..f412b53 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -449,10 +449,21 @@ static inline void emit_udiv(u8 rd, u8 rm, u8 rn, struct jit_ctx *ctx)
return;
}
#endif
- if (rm != ARM_R0)
- emit(ARM_MOV_R(ARM_R0, rm), ctx);
+
+ /*
+ * For BPF_ALU | BPF_DIV | BPF_K instructions, rm is ARM_R4
+ * (r_A) and rn is ARM_R0 (r_scratch) so load rn first into
+ * ARM_R1 to avoid accidentally overwriting ARM_R0 with rm
+ * before using it as a source for ARM_R1.
+ *
+ * For BPF_ALU | BPF_DIV | BPF_X rm is ARM_R4 (r_A) and rn is
+ * ARM_R5 (r_X) so there is no particular register overlap
+ * issues.
+ */
if (rn != ARM_R1)
emit(ARM_MOV_R(ARM_R1, rn), ctx);
+ if (rm != ARM_R0)
+ emit(ARM_MOV_R(ARM_R0, rm), ctx);
ctx->seen |= SEEN_CALL;
emit_mov_i(ARM_R3, (u32)jit_udiv, ctx);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 029/178] ARM: ux500: Move GPIO regulator for SD-card into board DTSs
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (27 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 028/178] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 030/178] ARM: ux500: Enable GPIO regulator for SD-card for HREF boards Sasha Levin
` (149 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ulf Hansson <ulf.hansson@linaro.org>
[ Upstream commit 53d2669844263fd5fdc70f0eb6a2eb8a21086d8e ]
The GPIO regulator for the SD-card isn't a ux500 SOC configuration, but
instead it's specific to the board. Move the definition of it, into the
board DTSs.
Fixes: c94a4ab7af3f ("ARM: ux500: Disable the MMCI gpio-regulator by default")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/ste-dbx5x0.dtsi | 17 -----------------
arch/arm/boot/dts/ste-href.dtsi | 17 +++++++++++++++++
arch/arm/boot/dts/ste-snowball.dts | 15 +++++++++++++++
3 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/arch/arm/boot/dts/ste-dbx5x0.dtsi b/arch/arm/boot/dts/ste-dbx5x0.dtsi
index 9d23230..563640f 100644
--- a/arch/arm/boot/dts/ste-dbx5x0.dtsi
+++ b/arch/arm/boot/dts/ste-dbx5x0.dtsi
@@ -995,23 +995,6 @@
status = "disabled";
};
- vmmci: regulator-gpio {
- compatible = "regulator-gpio";
-
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <2900000>;
- regulator-name = "mmci-reg";
- regulator-type = "voltage";
-
- startup-delay-us = <100>;
- enable-active-high;
-
- states = <1800000 0x1
- 2900000 0x0>;
-
- status = "disabled";
- };
-
mcde@a0350000 {
compatible = "stericsson,mcde";
reg = <0xa0350000 0x1000>, /* MCDE */
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi
index bf8f0ed..8cf499a 100644
--- a/arch/arm/boot/dts/ste-href.dtsi
+++ b/arch/arm/boot/dts/ste-href.dtsi
@@ -111,6 +111,23 @@
pinctrl-1 = <&i2c3_sleep_mode>;
};
+ vmmci: regulator-gpio {
+ compatible = "regulator-gpio";
+
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2900000>;
+ regulator-name = "mmci-reg";
+ regulator-type = "voltage";
+
+ startup-delay-us = <100>;
+ enable-active-high;
+
+ states = <1800000 0x1
+ 2900000 0x0>;
+
+ status = "disabled";
+ };
+
// External Micro SD slot
sdi0_per1@80126000 {
arm,primecell-periphid = <0x10480180>;
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts
index 3e97a66..eab23bf 100644
--- a/arch/arm/boot/dts/ste-snowball.dts
+++ b/arch/arm/boot/dts/ste-snowball.dts
@@ -146,8 +146,23 @@
};
vmmci: regulator-gpio {
+ compatible = "regulator-gpio";
+
gpios = <&gpio7 4 0x4>;
enable-gpio = <&gpio6 25 0x4>;
+
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <2900000>;
+ regulator-name = "mmci-reg";
+ regulator-type = "voltage";
+
+ startup-delay-us = <100>;
+ enable-active-high;
+
+ states = <1800000 0x1
+ 2900000 0x0>;
+
+ status = "disabled";
};
// External Micro SD slot
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 030/178] ARM: ux500: Enable GPIO regulator for SD-card for HREF boards
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (28 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 029/178] ARM: ux500: Move GPIO regulator for SD-card into board DTSs Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 031/178] ARM: ux500: Enable GPIO regulator for SD-card for snowball Sasha Levin
` (148 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ulf Hansson <ulf.hansson@linaro.org>
[ Upstream commit f9a8c3914ba85f19c3360b19612d77c47adb8942 ]
Fixes: c94a4ab7af3f ("ARM: ux500: Disable the MMCI gpio-regulator by default")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/ste-href.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/boot/dts/ste-href.dtsi b/arch/arm/boot/dts/ste-href.dtsi
index 8cf499a..744c1e3 100644
--- a/arch/arm/boot/dts/ste-href.dtsi
+++ b/arch/arm/boot/dts/ste-href.dtsi
@@ -124,8 +124,6 @@
states = <1800000 0x1
2900000 0x0>;
-
- status = "disabled";
};
// External Micro SD slot
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 031/178] ARM: ux500: Enable GPIO regulator for SD-card for snowball
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (29 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 030/178] ARM: ux500: Enable GPIO regulator for SD-card for HREF boards Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 032/178] drm: Zero out invalid vblank timestamp in drm_update_vblank_count Sasha Levin
` (147 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ulf Hansson <ulf.hansson@linaro.org>
[ Upstream commit 11133db7a836b0cb411faa048f07a38e994d1382 ]
Fixes: c94a4ab7af3f ("ARM: ux500: Disable the MMCI gpio-regulator by default")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/ste-snowball.dts | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts
index eab23bf..17c4422 100644
--- a/arch/arm/boot/dts/ste-snowball.dts
+++ b/arch/arm/boot/dts/ste-snowball.dts
@@ -161,8 +161,6 @@
states = <1800000 0x1
2900000 0x0>;
-
- status = "disabled";
};
// External Micro SD slot
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 032/178] drm: Zero out invalid vblank timestamp in drm_update_vblank_count.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (30 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 031/178] ARM: ux500: Enable GPIO regulator for SD-card for snowball Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 033/178] drm/i915: Add missing MacBook Pro models with dual channel LVDS Sasha Levin
` (146 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Mario Kleiner <mario.kleiner.de@gmail.com>
[ Upstream commit fdb68e09bbb1c981f24608d7022c7d93cc47b326 ]
Since commit 844b03f27739135fe1fed2fef06da0ffc4c7a081 we make
sure that after vblank irq off, we return the last valid
(vblank count, vblank timestamp) pair to clients, e.g., during
modesets, which is good.
An overlooked side effect of that commit for kms drivers without
support for precise vblank timestamping is that at vblank irq
enable, when we update the vblank counter from the hw counter, we
can't update the corresponding vblank timestamp, so now we have a
totally mismatched timestamp for the new count to confuse clients.
Restore old client visible behaviour from before Linux 3.17, but
zero out the timestamp at vblank counter update (instead of disable
as in original implementation) if we can't generate a meaningful
timestamp immediately for the new vblank counter. This will fix
this regression, so callers know they need to retry again later
if they need a valid timestamp, but at the same time preserves
the improvements made in the commit mentioned above.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: <stable@vger.kernel.org> #v3.17+
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/drm_irq.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index c4edea9..7d64d22 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -131,12 +131,11 @@ static void drm_update_vblank_count(struct drm_device *dev, int crtc)
/* Reinitialize corresponding vblank timestamp if high-precision query
* available. Skip this step if query unsupported or failed. Will
- * reinitialize delayed at next vblank interrupt in that case.
+ * reinitialize delayed at next vblank interrupt in that case and
+ * assign 0 for now, to mark the vblanktimestamp as invalid.
*/
- if (rc) {
- tslot = atomic_read(&vblank->count) + diff;
- vblanktimestamp(dev, crtc, tslot) = t_vblank;
- }
+ tslot = atomic_read(&vblank->count) + diff;
+ vblanktimestamp(dev, crtc, tslot) = rc ? t_vblank : (struct timeval) {0, 0};
smp_mb__before_atomic();
atomic_add(diff, &vblank->count);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 033/178] drm/i915: Add missing MacBook Pro models with dual channel LVDS
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (31 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 032/178] drm: Zero out invalid vblank timestamp in drm_update_vblank_count Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 034/178] drm/i915/dp: there is no audio on port A Sasha Levin
` (145 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Lukas Wunner <lukas@wunner.de>
[ Upstream commit 3916e3fd81021fb795bfbdb17f375b6b3685bced ]
Single channel LVDS maxes out at 112 MHz. The 15" pre-retina models
shipped with 1440x900 (106 MHz) by default or 1680x1050 (119 MHz)
as a BTO option, both versions used dual channel LVDS even though
the smaller one would have fit into a single channel.
Notes:
Bug report showing that the MacBookPro8,2 with 1440x900 uses dual
channel LVDS (this lead to it being hardcoded in intel_lvds.c by
Daniel Vetter with commit 618563e3945b9d0864154bab3c607865b557cecc):
https://bugzilla.kernel.org/show_bug.cgi?id=42842
If i915.lvds_channel_mode=2 is missing even though the machine needs
it, every other vertical line is white and consequently, only the left
half of the screen is visible (verified by myself on a MacBookPro9,1).
Forum posting concerning a MacBookPro6,2 with 1440x900, author is
using i915.lvds_channel_mode=2 on the kernel command line, proving
that the machine uses dual channels:
https://bbs.archlinux.org/viewtopic.php?id=185770
Chi Mei N154C6-L04 with 1440x900 is a replacement panel for all
MacBook Pro "A1286" models, and that model number encompasses the
MacBookPro6,2 / 8,2 / 9,1. Page 17 of the panel's datasheet shows it's
driven with dual channel LVDS:
http://www.ebay.com/itm/-/400690878560
http://www.everymac.com/ultimate-mac-lookup/?search_keywords=A1286
http://www.taopanel.com/chimei/datasheet/N154C6-L04.pdf
Those three 15" models, MacBookPro6,2 / 8,2 / 9,1, are the only ones
with i915 graphics and dual channel LVDS, so that list should be
complete. And the 8,2 is already in intel_lvds.c.
Possible motivation to use dual channel LVDS even on the 1440x900
models: Reduce the number of different parts, i.e. use identical logic
boards and display cabling on both versions and the only differing
component is the panel.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
[Jani: included notes in the commit message for posterity]
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/i915/intel_lvds.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index c0bbf21..b7e80bf 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -809,12 +809,28 @@ static int intel_dual_link_lvds_callback(const struct dmi_system_id *id)
static const struct dmi_system_id intel_dual_link_lvds[] = {
{
.callback = intel_dual_link_lvds_callback,
- .ident = "Apple MacBook Pro (Core i5/i7 Series)",
+ .ident = "Apple MacBook Pro 15\" (2010)",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro6,2"),
+ },
+ },
+ {
+ .callback = intel_dual_link_lvds_callback,
+ .ident = "Apple MacBook Pro 15\" (2011)",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"),
},
},
+ {
+ .callback = intel_dual_link_lvds_callback,
+ .ident = "Apple MacBook Pro 15\" (2012)",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9,1"),
+ },
+ },
{ } /* terminating entry */
};
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 034/178] drm/i915/dp: there is no audio on port A
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (32 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 033/178] drm/i915: Add missing MacBook Pro models with dual channel LVDS Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 035/178] drm/radeon: disable semaphores for UVD V1 (v2) Sasha Levin
` (144 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Jani Nikula <jani.nikula@intel.com>
[ Upstream commit 9fcb1704d1d51b12e2f03c78bca013d0cbbb7c98 ]
The eDP port A register on PCH split platforms has a slightly different
register layout from the other ports, with bit 6 being either alternate
scrambler reset or reserved, depending on the generation. Our
misinterpretation of the bit as audio has lead to warning.
Fix this by not enabling audio on port A, since none of our platforms
support audio on port A anyway.
v2: DDI doesn't have audio on port A either (Sivakumar Thulasimani)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89958
Reported-and-tested-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/i915/intel_dp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 740d9eb..a29db0a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1037,7 +1037,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
pipe_config->has_dp_encoder = true;
pipe_config->has_drrs = false;
- pipe_config->has_audio = intel_dp->has_audio;
+ pipe_config->has_audio = intel_dp->has_audio && port != PORT_A;
if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
@@ -1879,8 +1879,8 @@ static void intel_dp_get_config(struct intel_encoder *encoder,
int dotclock;
tmp = I915_READ(intel_dp->output_reg);
- if (tmp & DP_AUDIO_OUTPUT_ENABLE)
- pipe_config->has_audio = true;
+
+ pipe_config->has_audio = tmp & DP_AUDIO_OUTPUT_ENABLE && port != PORT_A;
if ((port == PORT_A) || !HAS_PCH_CPT(dev)) {
if (tmp & DP_SYNC_HS_HIGH)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 035/178] drm/radeon: disable semaphores for UVD V1 (v2)
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (33 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 034/178] drm/i915/dp: there is no audio on port A Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 036/178] drm/radeon: fix userptr BO unpin bug v3 Sasha Levin
` (143 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Christian König <christian.koenig@amd.com>
[ Upstream commit 013ead48a843442e63b9426e3bd5df18ca5d054a ]
Hardware doesn't seem to work correctly, just block userspace in this case.
v2: add missing defines
Bugs: https://bugs.freedesktop.org/show_bug.cgi?id=85320
Signed-off-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/radeon_asic.c | 2 +-
drivers/gpu/drm/radeon/radeon_asic.h | 4 ++++
drivers/gpu/drm/radeon/rv770d.h | 3 +++
drivers/gpu/drm/radeon/uvd_v1_0.c | 14 ++------------
drivers/gpu/drm/radeon/uvd_v2_2.c | 29 +++++++++++++++++++++++++++++
5 files changed, 39 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c
index ed0e10e..c34ceb8 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.c
+++ b/drivers/gpu/drm/radeon/radeon_asic.c
@@ -1190,7 +1190,7 @@ static struct radeon_asic rs780_asic = {
static struct radeon_asic_ring rv770_uvd_ring = {
.ib_execute = &uvd_v1_0_ib_execute,
.emit_fence = &uvd_v2_2_fence_emit,
- .emit_semaphore = &uvd_v1_0_semaphore_emit,
+ .emit_semaphore = &uvd_v2_2_semaphore_emit,
.cs_parse = &radeon_uvd_cs_parse,
.ring_test = &uvd_v1_0_ring_test,
.ib_test = &uvd_v1_0_ib_test,
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h
index 0c1da2b..6dd68f6 100644
--- a/drivers/gpu/drm/radeon/radeon_asic.h
+++ b/drivers/gpu/drm/radeon/radeon_asic.h
@@ -908,6 +908,10 @@ void uvd_v1_0_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
int uvd_v2_2_resume(struct radeon_device *rdev);
void uvd_v2_2_fence_emit(struct radeon_device *rdev,
struct radeon_fence *fence);
+bool uvd_v2_2_semaphore_emit(struct radeon_device *rdev,
+ struct radeon_ring *ring,
+ struct radeon_semaphore *semaphore,
+ bool emit_wait);
/* uvd v3.1 */
bool uvd_v3_1_semaphore_emit(struct radeon_device *rdev,
diff --git a/drivers/gpu/drm/radeon/rv770d.h b/drivers/gpu/drm/radeon/rv770d.h
index 3cf1e29..9ef2064 100644
--- a/drivers/gpu/drm/radeon/rv770d.h
+++ b/drivers/gpu/drm/radeon/rv770d.h
@@ -989,6 +989,9 @@
((n) & 0x3FFF) << 16)
/* UVD */
+#define UVD_SEMA_ADDR_LOW 0xef00
+#define UVD_SEMA_ADDR_HIGH 0xef04
+#define UVD_SEMA_CMD 0xef08
#define UVD_GPCOM_VCPU_CMD 0xef0c
#define UVD_GPCOM_VCPU_DATA0 0xef10
#define UVD_GPCOM_VCPU_DATA1 0xef14
diff --git a/drivers/gpu/drm/radeon/uvd_v1_0.c b/drivers/gpu/drm/radeon/uvd_v1_0.c
index e72b3cb..c6b1cbc 100644
--- a/drivers/gpu/drm/radeon/uvd_v1_0.c
+++ b/drivers/gpu/drm/radeon/uvd_v1_0.c
@@ -466,18 +466,8 @@ bool uvd_v1_0_semaphore_emit(struct radeon_device *rdev,
struct radeon_semaphore *semaphore,
bool emit_wait)
{
- uint64_t addr = semaphore->gpu_addr;
-
- radeon_ring_write(ring, PACKET0(UVD_SEMA_ADDR_LOW, 0));
- radeon_ring_write(ring, (addr >> 3) & 0x000FFFFF);
-
- radeon_ring_write(ring, PACKET0(UVD_SEMA_ADDR_HIGH, 0));
- radeon_ring_write(ring, (addr >> 23) & 0x000FFFFF);
-
- radeon_ring_write(ring, PACKET0(UVD_SEMA_CMD, 0));
- radeon_ring_write(ring, emit_wait ? 1 : 0);
-
- return true;
+ /* disable semaphores for UVD V1 hardware */
+ return false;
}
/**
diff --git a/drivers/gpu/drm/radeon/uvd_v2_2.c b/drivers/gpu/drm/radeon/uvd_v2_2.c
index 8919351..7ed778c 100644
--- a/drivers/gpu/drm/radeon/uvd_v2_2.c
+++ b/drivers/gpu/drm/radeon/uvd_v2_2.c
@@ -60,6 +60,35 @@ void uvd_v2_2_fence_emit(struct radeon_device *rdev,
}
/**
+ * uvd_v2_2_semaphore_emit - emit semaphore command
+ *
+ * @rdev: radeon_device pointer
+ * @ring: radeon_ring pointer
+ * @semaphore: semaphore to emit commands for
+ * @emit_wait: true if we should emit a wait command
+ *
+ * Emit a semaphore command (either wait or signal) to the UVD ring.
+ */
+bool uvd_v2_2_semaphore_emit(struct radeon_device *rdev,
+ struct radeon_ring *ring,
+ struct radeon_semaphore *semaphore,
+ bool emit_wait)
+{
+ uint64_t addr = semaphore->gpu_addr;
+
+ radeon_ring_write(ring, PACKET0(UVD_SEMA_ADDR_LOW, 0));
+ radeon_ring_write(ring, (addr >> 3) & 0x000FFFFF);
+
+ radeon_ring_write(ring, PACKET0(UVD_SEMA_ADDR_HIGH, 0));
+ radeon_ring_write(ring, (addr >> 23) & 0x000FFFFF);
+
+ radeon_ring_write(ring, PACKET0(UVD_SEMA_CMD, 0));
+ radeon_ring_write(ring, emit_wait ? 1 : 0);
+
+ return true;
+}
+
+/**
* uvd_v2_2_resume - memory controller programming
*
* @rdev: radeon_device pointer
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 036/178] drm/radeon: fix userptr BO unpin bug v3
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (34 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 035/178] drm/radeon: disable semaphores for UVD V1 (v2) Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 037/178] drm/radeon: make VCE handle check more strict Sasha Levin
` (142 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "monk.liu" <monk.liu@amd.com>
[ Upstream commit db12973cd581d4e79f4aadd0960948f268d15af7 ]
Fixing a memory leak with userptrs.
v2: clean up the loop, use an iterator instead
v3: remove unused variable
Signed-off-by: monk.liu <monk.liu@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/radeon_ttm.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 9ab8e26..13f6947 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -568,8 +568,7 @@ static void radeon_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
{
struct radeon_device *rdev = radeon_get_rdev(ttm->bdev);
struct radeon_ttm_tt *gtt = (void *)ttm;
- struct scatterlist *sg;
- int i;
+ struct sg_page_iter sg_iter;
int write = !(gtt->userflags & RADEON_GEM_USERPTR_READONLY);
enum dma_data_direction direction = write ?
@@ -582,9 +581,8 @@ static void radeon_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
/* free the sg table and pages again */
dma_unmap_sg(rdev->dev, ttm->sg->sgl, ttm->sg->nents, direction);
- for_each_sg(ttm->sg->sgl, sg, ttm->sg->nents, i) {
- struct page *page = sg_page(sg);
-
+ for_each_sg_page(ttm->sg->sgl, &sg_iter, ttm->sg->nents, 0) {
+ struct page *page = sg_page_iter_page(&sg_iter);
if (!(gtt->userflags & RADEON_GEM_USERPTR_READONLY))
set_page_dirty(page);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 037/178] drm/radeon: make VCE handle check more strict
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (35 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 036/178] drm/radeon: fix userptr BO unpin bug v3 Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 038/178] drm/radeon: make UVD handle checking " Sasha Levin
` (141 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Christian König <christian.koenig@amd.com>
[ Upstream commit 29c63fe22a17c64e54016040cd882481bd45ee5a ]
Invalid handles can crash the hw.
Signed-off-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/radeon_vce.c | 65 +++++++++++++++++++++++++++----------
1 file changed, 48 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_vce.c b/drivers/gpu/drm/radeon/radeon_vce.c
index 9e85757..1c0022a 100644
--- a/drivers/gpu/drm/radeon/radeon_vce.c
+++ b/drivers/gpu/drm/radeon/radeon_vce.c
@@ -493,18 +493,27 @@ int radeon_vce_cs_reloc(struct radeon_cs_parser *p, int lo, int hi,
*
* @p: parser context
* @handle: handle to validate
+ * @allocated: allocated a new handle?
*
* Validates the handle and return the found session index or -EINVAL
* we we don't have another free session index.
*/
-int radeon_vce_validate_handle(struct radeon_cs_parser *p, uint32_t handle)
+static int radeon_vce_validate_handle(struct radeon_cs_parser *p,
+ uint32_t handle, bool *allocated)
{
unsigned i;
+ *allocated = false;
+
/* validate the handle */
for (i = 0; i < RADEON_MAX_VCE_HANDLES; ++i) {
- if (atomic_read(&p->rdev->vce.handles[i]) == handle)
+ if (atomic_read(&p->rdev->vce.handles[i]) == handle) {
+ if (p->rdev->vce.filp[i] != p->filp) {
+ DRM_ERROR("VCE handle collision detected!\n");
+ return -EINVAL;
+ }
return i;
+ }
}
/* handle not found try to alloc a new one */
@@ -512,6 +521,7 @@ int radeon_vce_validate_handle(struct radeon_cs_parser *p, uint32_t handle)
if (!atomic_cmpxchg(&p->rdev->vce.handles[i], 0, handle)) {
p->rdev->vce.filp[i] = p->filp;
p->rdev->vce.img_size[i] = 0;
+ *allocated = true;
return i;
}
}
@@ -529,10 +539,10 @@ int radeon_vce_validate_handle(struct radeon_cs_parser *p, uint32_t handle)
int radeon_vce_cs_parse(struct radeon_cs_parser *p)
{
int session_idx = -1;
- bool destroyed = false;
+ bool destroyed = false, created = false, allocated = false;
uint32_t tmp, handle = 0;
uint32_t *size = &tmp;
- int i, r;
+ int i, r = 0;
while (p->idx < p->chunks[p->chunk_ib_idx].length_dw) {
uint32_t len = radeon_get_ib_value(p, p->idx);
@@ -540,18 +550,21 @@ int radeon_vce_cs_parse(struct radeon_cs_parser *p)
if ((len < 8) || (len & 3)) {
DRM_ERROR("invalid VCE command length (%d)!\n", len);
- return -EINVAL;
+ r = -EINVAL;
+ goto out;
}
if (destroyed) {
DRM_ERROR("No other command allowed after destroy!\n");
- return -EINVAL;
+ r = -EINVAL;
+ goto out;
}
switch (cmd) {
case 0x00000001: // session
handle = radeon_get_ib_value(p, p->idx + 2);
- session_idx = radeon_vce_validate_handle(p, handle);
+ session_idx = radeon_vce_validate_handle(p, handle,
+ &allocated);
if (session_idx < 0)
return session_idx;
size = &p->rdev->vce.img_size[session_idx];
@@ -561,6 +574,13 @@ int radeon_vce_cs_parse(struct radeon_cs_parser *p)
break;
case 0x01000001: // create
+ created = true;
+ if (!allocated) {
+ DRM_ERROR("Handle already in use!\n");
+ r = -EINVAL;
+ goto out;
+ }
+
*size = radeon_get_ib_value(p, p->idx + 8) *
radeon_get_ib_value(p, p->idx + 10) *
8 * 3 / 2;
@@ -577,12 +597,12 @@ int radeon_vce_cs_parse(struct radeon_cs_parser *p)
r = radeon_vce_cs_reloc(p, p->idx + 10, p->idx + 9,
*size);
if (r)
- return r;
+ goto out;
r = radeon_vce_cs_reloc(p, p->idx + 12, p->idx + 11,
*size / 3);
if (r)
- return r;
+ goto out;
break;
case 0x02000001: // destroy
@@ -593,7 +613,7 @@ int radeon_vce_cs_parse(struct radeon_cs_parser *p)
r = radeon_vce_cs_reloc(p, p->idx + 3, p->idx + 2,
*size * 2);
if (r)
- return r;
+ goto out;
break;
case 0x05000004: // video bitstream buffer
@@ -601,36 +621,47 @@ int radeon_vce_cs_parse(struct radeon_cs_parser *p)
r = radeon_vce_cs_reloc(p, p->idx + 3, p->idx + 2,
tmp);
if (r)
- return r;
+ goto out;
break;
case 0x05000005: // feedback buffer
r = radeon_vce_cs_reloc(p, p->idx + 3, p->idx + 2,
4096);
if (r)
- return r;
+ goto out;
break;
default:
DRM_ERROR("invalid VCE command (0x%x)!\n", cmd);
- return -EINVAL;
+ r = -EINVAL;
+ goto out;
}
if (session_idx == -1) {
DRM_ERROR("no session command at start of IB\n");
- return -EINVAL;
+ r = -EINVAL;
+ goto out;
}
p->idx += len / 4;
}
- if (destroyed) {
- /* IB contains a destroy msg, free the handle */
+ if (allocated && !created) {
+ DRM_ERROR("New session without create command!\n");
+ r = -ENOENT;
+ }
+
+out:
+ if ((!r && destroyed) || (r && allocated)) {
+ /*
+ * IB contains a destroy msg or we have allocated an
+ * handle and got an error, anyway free the handle
+ */
for (i = 0; i < RADEON_MAX_VCE_HANDLES; ++i)
atomic_cmpxchg(&p->rdev->vce.handles[i], handle, 0);
}
- return 0;
+ return r;
}
/**
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 038/178] drm/radeon: make UVD handle checking more strict
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (36 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 037/178] drm/radeon: make VCE handle check more strict Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 039/178] drm/radeon: more strictly validate the UVD codec Sasha Levin
` (140 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Christian König <christian.koenig@amd.com>
[ Upstream commit a1b403da70e038ca6c6c6fe434d1d873546873a3 ]
Invalid messages can crash the hw otherwise.
Signed-off-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/radeon_uvd.c | 72 ++++++++++++++++++++++---------------
1 file changed, 43 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 11b6624..a2dad16 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -436,50 +436,64 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
return -EINVAL;
}
- if (msg_type == 1) {
+ switch (msg_type) {
+ case 0:
+ /* it's a create msg, calc image size (width * height) */
+ img_size = msg[7] * msg[8];
+ radeon_bo_kunmap(bo);
+
+ /* try to alloc a new handle */
+ for (i = 0; i < RADEON_MAX_UVD_HANDLES; ++i) {
+ if (atomic_read(&p->rdev->uvd.handles[i]) == handle) {
+ DRM_ERROR("Handle 0x%x already in use!\n", handle);
+ return -EINVAL;
+ }
+
+ if (!atomic_cmpxchg(&p->rdev->uvd.handles[i], 0, handle)) {
+ p->rdev->uvd.filp[i] = p->filp;
+ p->rdev->uvd.img_size[i] = img_size;
+ return 0;
+ }
+ }
+
+ DRM_ERROR("No more free UVD handles!\n");
+ return -EINVAL;
+
+ case 1:
/* it's a decode msg, calc buffer sizes */
r = radeon_uvd_cs_msg_decode(msg, buf_sizes);
- /* calc image size (width * height) */
- img_size = msg[6] * msg[7];
radeon_bo_kunmap(bo);
if (r)
return r;
- } else if (msg_type == 2) {
+ /* validate the handle */
+ for (i = 0; i < RADEON_MAX_UVD_HANDLES; ++i) {
+ if (atomic_read(&p->rdev->uvd.handles[i]) == handle) {
+ if (p->rdev->uvd.filp[i] != p->filp) {
+ DRM_ERROR("UVD handle collision detected!\n");
+ return -EINVAL;
+ }
+ return 0;
+ }
+ }
+
+ DRM_ERROR("Invalid UVD handle 0x%x!\n", handle);
+ return -ENOENT;
+
+ case 2:
/* it's a destroy msg, free the handle */
for (i = 0; i < RADEON_MAX_UVD_HANDLES; ++i)
atomic_cmpxchg(&p->rdev->uvd.handles[i], handle, 0);
radeon_bo_kunmap(bo);
return 0;
- } else {
- /* it's a create msg, calc image size (width * height) */
- img_size = msg[7] * msg[8];
- radeon_bo_kunmap(bo);
- if (msg_type != 0) {
- DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
- return -EINVAL;
- }
-
- /* it's a create msg, no special handling needed */
- }
-
- /* create or decode, validate the handle */
- for (i = 0; i < RADEON_MAX_UVD_HANDLES; ++i) {
- if (atomic_read(&p->rdev->uvd.handles[i]) == handle)
- return 0;
- }
+ default:
- /* handle not found try to alloc a new one */
- for (i = 0; i < RADEON_MAX_UVD_HANDLES; ++i) {
- if (!atomic_cmpxchg(&p->rdev->uvd.handles[i], 0, handle)) {
- p->rdev->uvd.filp[i] = p->filp;
- p->rdev->uvd.img_size[i] = img_size;
- return 0;
- }
+ DRM_ERROR("Illegal UVD message type (%d)!\n", msg_type);
+ return -EINVAL;
}
- DRM_ERROR("No more free UVD handles!\n");
+ BUG();
return -EINVAL;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 039/178] drm/radeon: more strictly validate the UVD codec
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (37 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 038/178] drm/radeon: make UVD handle checking " Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 040/178] pinctrl: Don't just pretend to protect pinctrl_maps, do it for real Sasha Levin
` (139 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Christian König <christian.koenig@amd.com>
[ Upstream commit d52cdfa4a0c6406bbfb33206341eaf1fb1555994 ]
MPEG 2/4 are only supported since UVD3.
Signed-off-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/radeon_uvd.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index a2dad16..db6536f 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -396,6 +396,29 @@ static int radeon_uvd_cs_msg_decode(uint32_t *msg, unsigned buf_sizes[])
return 0;
}
+static int radeon_uvd_validate_codec(struct radeon_cs_parser *p,
+ unsigned stream_type)
+{
+ switch (stream_type) {
+ case 0: /* H264 */
+ case 1: /* VC1 */
+ /* always supported */
+ return 0;
+
+ case 3: /* MPEG2 */
+ case 4: /* MPEG4 */
+ /* only since UVD 3 */
+ if (p->rdev->family >= CHIP_PALM)
+ return 0;
+
+ /* fall through */
+ default:
+ DRM_ERROR("UVD codec not supported by hardware %d!\n",
+ stream_type);
+ return -EINVAL;
+ }
+}
+
static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
unsigned offset, unsigned buf_sizes[])
{
@@ -440,7 +463,11 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
case 0:
/* it's a create msg, calc image size (width * height) */
img_size = msg[7] * msg[8];
+
+ r = radeon_uvd_validate_codec(p, msg[4]);
radeon_bo_kunmap(bo);
+ if (r)
+ return r;
/* try to alloc a new handle */
for (i = 0; i < RADEON_MAX_UVD_HANDLES; ++i) {
@@ -460,8 +487,10 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,
return -EINVAL;
case 1:
- /* it's a decode msg, calc buffer sizes */
- r = radeon_uvd_cs_msg_decode(msg, buf_sizes);
+ /* it's a decode msg, validate codec and calc buffer sizes */
+ r = radeon_uvd_validate_codec(p, msg[4]);
+ if (!r)
+ r = radeon_uvd_cs_msg_decode(msg, buf_sizes);
radeon_bo_kunmap(bo);
if (r)
return r;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 040/178] pinctrl: Don't just pretend to protect pinctrl_maps, do it for real
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (38 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 039/178] drm/radeon: more strictly validate the UVD codec Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 041/178] mmc: card: Don't access RPMB partitions for normal read/write Sasha Levin
` (138 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Doug Anderson <dianders@chromium.org>
[ Upstream commit c5272a28566b00cce79127ad382406e0a8650690 ]
Way back, when the world was a simpler place and there was no war, no
evil, and no kernel bugs, there was just a single pinctrl lock. That
was how the world was when (57291ce pinctrl: core device tree mapping
table parsing support) was written. In that case, there were
instances where the pinctrl mutex was already held when
pinctrl_register_map() was called, hence a "locked" parameter was
passed to the function to indicate that the mutex was already locked
(so we shouldn't lock it again).
A few years ago in (42fed7b pinctrl: move subsystem mutex to
pinctrl_dev struct), we switched to a separate pinctrl_maps_mutex.
...but (oops) we forgot to re-think about the whole "locked" parameter
for pinctrl_register_map(). Basically the "locked" parameter appears
to still refer to whether the bigger pinctrl_dev mutex is locked, but
we're using it to skip locks of our (now separate) pinctrl_maps_mutex.
That's kind of a bad thing(TM). Probably nobody noticed because most
of the calls to pinctrl_register_map happen at boot time and we've got
synchronous device probing. ...and even cases where we're
asynchronous don't end up actually hitting the race too often. ...but
after banging my head against the wall for a bug that reproduced 1 out
of 1000 reboots and lots of looking through kgdb, I finally noticed
this.
Anyway, we can now safely remove the "locked" parameter and go back to
a war-free, evil-free, and kernel-bug-free world.
Fixes: 42fed7ba44e4 ("pinctrl: move subsystem mutex to pinctrl_dev struct")
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/pinctrl/core.c | 10 ++++------
drivers/pinctrl/core.h | 2 +-
drivers/pinctrl/devicetree.c | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 89dca77..18ee208 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -1110,7 +1110,7 @@ void devm_pinctrl_put(struct pinctrl *p)
EXPORT_SYMBOL_GPL(devm_pinctrl_put);
int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
- bool dup, bool locked)
+ bool dup)
{
int i, ret;
struct pinctrl_maps *maps_node;
@@ -1178,11 +1178,9 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
maps_node->maps = maps;
}
- if (!locked)
- mutex_lock(&pinctrl_maps_mutex);
+ mutex_lock(&pinctrl_maps_mutex);
list_add_tail(&maps_node->node, &pinctrl_maps);
- if (!locked)
- mutex_unlock(&pinctrl_maps_mutex);
+ mutex_unlock(&pinctrl_maps_mutex);
return 0;
}
@@ -1197,7 +1195,7 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
int pinctrl_register_mappings(struct pinctrl_map const *maps,
unsigned num_maps)
{
- return pinctrl_register_map(maps, num_maps, true, false);
+ return pinctrl_register_map(maps, num_maps, true);
}
void pinctrl_unregister_map(struct pinctrl_map const *map)
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h
index 75476b3..b24ea84 100644
--- a/drivers/pinctrl/core.h
+++ b/drivers/pinctrl/core.h
@@ -183,7 +183,7 @@ static inline struct pin_desc *pin_desc_get(struct pinctrl_dev *pctldev,
}
int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
- bool dup, bool locked);
+ bool dup);
void pinctrl_unregister_map(struct pinctrl_map const *map);
extern int pinctrl_force_sleep(struct pinctrl_dev *pctldev);
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index eda13de..0bbf7d7 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -92,7 +92,7 @@ static int dt_remember_or_free_map(struct pinctrl *p, const char *statename,
dt_map->num_maps = num_maps;
list_add_tail(&dt_map->node, &p->dt_maps);
- return pinctrl_register_map(map, num_maps, false, true);
+ return pinctrl_register_map(map, num_maps, false);
}
struct pinctrl_dev *of_pinctrl_get(struct device_node *np)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 041/178] mmc: card: Don't access RPMB partitions for normal read/write
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (39 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 040/178] pinctrl: Don't just pretend to protect pinctrl_maps, do it for real Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 042/178] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Sasha Levin
` (137 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Chuanxiao Dong <chuanxiao.dong@intel.com>
[ Upstream commit 4e93b9a6abc0d028daf3c8a00cb77b679d8a4df4 ]
During kernel boot, it will try to read some logical sectors
of each block device node for the possible partition table.
But since RPMB partition is special and can not be accessed
by normal eMMC read / write CMDs, it will cause below error
messages during kernel boot:
...
mmc0: Got data interrupt 0x00000002 even though no data operation was in progress.
mmcblk0rpmb: error -110 transferring data, sector 0, nr 32, cmd response 0x900, card status 0xb00
mmcblk0rpmb: retrying using single block read
mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
mmcblk0rpmb: timed out sending r/w cmd command, card status 0x400900
end_request: I/O error, dev mmcblk0rpmb, sector 0
Buffer I/O error on device mmcblk0rpmb, logical block 0
end_request: I/O error, dev mmcblk0rpmb, sector 8
Buffer I/O error on device mmcblk0rpmb, logical block 1
end_request: I/O error, dev mmcblk0rpmb, sector 16
Buffer I/O error on device mmcblk0rpmb, logical block 2
end_request: I/O error, dev mmcblk0rpmb, sector 24
Buffer I/O error on device mmcblk0rpmb, logical block 3
...
This patch will discard the access request in eMMC queue if
it is RPMB partition access request. By this way, it avoids
trigger above error messages.
Fixes: 090d25fe224c ("mmc: core: Expose access to RPMB partition")
Signed-off-by: Yunpeng Gao <yunpeng.gao@intel.com>
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Tested-by: Michael Shigorin <mike@altlinux.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/mmc/card/block.c | 12 ++++++++++++
drivers/mmc/card/queue.c | 2 +-
drivers/mmc/card/queue.h | 2 ++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index a11451f..a19a18f 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1025,6 +1025,18 @@ static inline void mmc_blk_reset_success(struct mmc_blk_data *md, int type)
md->reset_done &= ~type;
}
+int mmc_access_rpmb(struct mmc_queue *mq)
+{
+ struct mmc_blk_data *md = mq->data;
+ /*
+ * If this is a RPMB partition access, return ture
+ */
+ if (md && md->part_type == EXT_CSD_PART_CONFIG_ACC_RPMB)
+ return true;
+
+ return false;
+}
+
static int mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
{
struct mmc_blk_data *md = mq->data;
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index cfa6110..7a41a22 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -38,7 +38,7 @@ static int mmc_prep_request(struct request_queue *q, struct request *req)
return BLKPREP_KILL;
}
- if (mq && mmc_card_removed(mq->card))
+ if (mq && (mmc_card_removed(mq->card) || mmc_access_rpmb(mq)))
return BLKPREP_KILL;
req->cmd_flags |= REQ_DONTPREP;
diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h
index 5752d50..99e6521 100644
--- a/drivers/mmc/card/queue.h
+++ b/drivers/mmc/card/queue.h
@@ -73,4 +73,6 @@ extern void mmc_queue_bounce_post(struct mmc_queue_req *);
extern int mmc_packed_init(struct mmc_queue *, struct mmc_card *);
extern void mmc_packed_clean(struct mmc_queue *);
+extern int mmc_access_rpmb(struct mmc_queue *);
+
#endif
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 042/178] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (40 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 041/178] mmc: card: Don't access RPMB partitions for normal read/write Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 043/178] mmc: sh_mmcif: Fix timeout value for command request Sasha Levin
` (136 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Grygorii Strashko <Grygorii.Strashko@linaro.org>
[ Upstream commit 184af16b09360d6273fd6160e6ff7f8e2482ef23 ]
The PM_RESTORE_PREPARE is not handled now in mmc_pm_notify(),
as result mmc_rescan() could be scheduled and executed at
late hibernation restore stages when MMC device is suspended
already - which, in turn, will lead to system crash on TI dra7-evm board:
WARNING: CPU: 0 PID: 3188 at drivers/bus/omap_l3_noc.c:148 l3_interrupt_handler+0x258/0x374()
44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in User mode during Functional access
Hence, add missed PM_RESTORE_PREPARE PM event in mmc_pm_notify().
Fixes: 4c2ef25fe0b8 (mmc: fix all hangs related to mmc/sd card...)
Signed-off-by: Grygorii Strashko <Grygorii.Strashko@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/mmc/core/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index f26a5f1..297b4f9 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2615,6 +2615,7 @@ int mmc_pm_notify(struct notifier_block *notify_block,
switch (mode) {
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
+ case PM_RESTORE_PREPARE:
spin_lock_irqsave(&host->lock, flags);
host->rescan_disable = 1;
spin_unlock_irqrestore(&host->lock, flags);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 043/178] mmc: sh_mmcif: Fix timeout value for command request
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (41 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 042/178] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 044/178] ARM: 8307/1: psci: move psci firmware calls out of line Sasha Levin
` (135 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[ Upstream commit bad4371d87d1d1ed1aecd9c9cc21c41ac3f289c8 ]
f9fd54f22e ("mmc: sh_mmcif: Use msecs_to_jiffies() for host->timeout")
changed the timeout value from 1000 jiffies to 1s. In the case where
HZ is 1000 the values are the same. However, for smaller HZ values the
timeout is now smaller, 1s instead of 10s in the case of HZ=100.
Since the timeout occurs in spite of a normal data transfer a timeout of
10s seems more appropriate. This restores the previous timeout in the
case where HZ=100 and results in an increase over the previous timeout
for larger values of HZ.
Fixes: f9fd54f22e ("mmc: sh_mmcif: Use msecs_to_jiffies() for host->timeout")
Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[horms: rewrote changelog to refer to HZ]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/mmc/host/sh_mmcif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
index 7d9d6a3..5165ae7 100644
--- a/drivers/mmc/host/sh_mmcif.c
+++ b/drivers/mmc/host/sh_mmcif.c
@@ -1402,7 +1402,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
host = mmc_priv(mmc);
host->mmc = mmc;
host->addr = reg;
- host->timeout = msecs_to_jiffies(1000);
+ host->timeout = msecs_to_jiffies(10000);
host->ccs_enable = !pd || !pd->ccs_unsupported;
host->clk_ctrl2_enable = pd && pd->clk_ctrl2_present;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 044/178] ARM: 8307/1: psci: move psci firmware calls out of line
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (42 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 043/178] mmc: sh_mmcif: Fix timeout value for command request Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 045/178] sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) Sasha Levin
` (134 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Mark Rutland <mark.rutland@arm.com>
[ Upstream commit c097877319ab61dd045b6497953b4e3df8f2bb44 ]
arm64 builds with GCC 5 have caused the __asmeq assertions in the PSCI
calling code to fire, so move the ARM PSCI calls out of line into their
own assembly file for consistency and to safeguard against the same
issue occuring with the 32-bit toolchain.
[will: brought into line with arm64 implementation]
Reported-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/kernel/Makefile | 2 +-
arch/arm/kernel/psci-call.S | 31 +++++++++++++++++++++++++++++++
arch/arm/kernel/psci.c | 39 +++------------------------------------
3 files changed, 35 insertions(+), 37 deletions(-)
create mode 100644 arch/arm/kernel/psci-call.S
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 38ddd9f..03120e6 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -97,7 +97,7 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o
ifeq ($(CONFIG_ARM_PSCI),y)
-obj-y += psci.o
+obj-y += psci.o psci-call.o
obj-$(CONFIG_SMP) += psci_smp.o
endif
diff --git a/arch/arm/kernel/psci-call.S b/arch/arm/kernel/psci-call.S
new file mode 100644
index 0000000..a78e9e1
--- /dev/null
+++ b/arch/arm/kernel/psci-call.S
@@ -0,0 +1,31 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * Copyright (C) 2015 ARM Limited
+ *
+ * Author: Mark Rutland <mark.rutland@arm.com>
+ */
+
+#include <linux/linkage.h>
+
+#include <asm/opcodes-sec.h>
+#include <asm/opcodes-virt.h>
+
+/* int __invoke_psci_fn_hvc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */
+ENTRY(__invoke_psci_fn_hvc)
+ __HVC(0)
+ bx lr
+ENDPROC(__invoke_psci_fn_hvc)
+
+/* int __invoke_psci_fn_smc(u32 function_id, u32 arg0, u32 arg1, u32 arg2) */
+ENTRY(__invoke_psci_fn_smc)
+ __SMC(0)
+ bx lr
+ENDPROC(__invoke_psci_fn_smc)
diff --git a/arch/arm/kernel/psci.c b/arch/arm/kernel/psci.c
index f73891b..f90fdf4 100644
--- a/arch/arm/kernel/psci.c
+++ b/arch/arm/kernel/psci.c
@@ -23,8 +23,6 @@
#include <asm/compiler.h>
#include <asm/errno.h>
-#include <asm/opcodes-sec.h>
-#include <asm/opcodes-virt.h>
#include <asm/psci.h>
#include <asm/system_misc.h>
@@ -33,6 +31,9 @@ struct psci_operations psci_ops;
static int (*invoke_psci_fn)(u32, u32, u32, u32);
typedef int (*psci_initcall_t)(const struct device_node *);
+asmlinkage int __invoke_psci_fn_hvc(u32, u32, u32, u32);
+asmlinkage int __invoke_psci_fn_smc(u32, u32, u32, u32);
+
enum psci_function {
PSCI_FN_CPU_SUSPEND,
PSCI_FN_CPU_ON,
@@ -71,40 +72,6 @@ static u32 psci_power_state_pack(struct psci_power_state state)
& PSCI_0_2_POWER_STATE_AFFL_MASK);
}
-/*
- * The following two functions are invoked via the invoke_psci_fn pointer
- * and will not be inlined, allowing us to piggyback on the AAPCS.
- */
-static noinline int __invoke_psci_fn_hvc(u32 function_id, u32 arg0, u32 arg1,
- u32 arg2)
-{
- asm volatile(
- __asmeq("%0", "r0")
- __asmeq("%1", "r1")
- __asmeq("%2", "r2")
- __asmeq("%3", "r3")
- __HVC(0)
- : "+r" (function_id)
- : "r" (arg0), "r" (arg1), "r" (arg2));
-
- return function_id;
-}
-
-static noinline int __invoke_psci_fn_smc(u32 function_id, u32 arg0, u32 arg1,
- u32 arg2)
-{
- asm volatile(
- __asmeq("%0", "r0")
- __asmeq("%1", "r1")
- __asmeq("%2", "r2")
- __asmeq("%3", "r3")
- __SMC(0)
- : "+r" (function_id)
- : "r" (arg0), "r" (arg1), "r" (arg2));
-
- return function_id;
-}
-
static int psci_get_version(void)
{
int err;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 045/178] sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND)
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (43 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 044/178] ARM: 8307/1: psci: move psci firmware calls out of line Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 046/178] coredump: accept any write method Sasha Levin
` (133 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
[ Upstream commit bc26d4d06e337ade069f33d3f4377593b24e6e36 ]
A deadlock can be initiated by userspace via ioctl(SNDCTL_SEQ_OUTOFBAND)
on /dev/sequencer with TMR_ECHO midi event.
In this case the control flow is:
sound_ioctl()
-> case SND_DEV_SEQ:
case SND_DEV_SEQ2:
sequencer_ioctl()
-> case SNDCTL_SEQ_OUTOFBAND:
spin_lock_irqsave(&lock,flags);
play_event();
-> case EV_TIMING:
seq_timing_event()
-> case TMR_ECHO:
seq_copy_to_input()
-> spin_lock_irqsave(&lock,flags);
It seems that spin_lock_irqsave() around play_event() is not necessary,
because the only other call location in seq_startplay() makes the call
without acquiring spinlock.
So, the patch just removes spinlocks around play_event().
By the way, it removes unreachable code in seq_timing_event(),
since (seq_mode == SEQ_2) case is handled in the beginning.
Compile tested only.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/oss/sequencer.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c
index c0eea1d..f19da4b 100644
--- a/sound/oss/sequencer.c
+++ b/sound/oss/sequencer.c
@@ -681,13 +681,8 @@ static int seq_timing_event(unsigned char *event_rec)
break;
case TMR_ECHO:
- if (seq_mode == SEQ_2)
- seq_copy_to_input(event_rec, 8);
- else
- {
- parm = (parm << 8 | SEQ_ECHO);
- seq_copy_to_input((unsigned char *) &parm, 4);
- }
+ parm = (parm << 8 | SEQ_ECHO);
+ seq_copy_to_input((unsigned char *) &parm, 4);
break;
default:;
@@ -1324,7 +1319,6 @@ int sequencer_ioctl(int dev, struct file *file, unsigned int cmd, void __user *a
int mode = translate_mode(file);
struct synth_info inf;
struct seq_event_rec event_rec;
- unsigned long flags;
int __user *p = arg;
orig_dev = dev = dev >> 4;
@@ -1479,9 +1473,7 @@ int sequencer_ioctl(int dev, struct file *file, unsigned int cmd, void __user *a
case SNDCTL_SEQ_OUTOFBAND:
if (copy_from_user(&event_rec, arg, sizeof(event_rec)))
return -EFAULT;
- spin_lock_irqsave(&lock,flags);
play_event(event_rec.arr);
- spin_unlock_irqrestore(&lock,flags);
return 0;
case SNDCTL_MIDI_INFO:
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 046/178] coredump: accept any write method
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (44 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 045/178] sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 047/178] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address Sasha Levin
` (132 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Al Viro <viro@zeniv.linux.org.uk>
[ Upstream commit 86cc05840a0da1afcb6b8151b53f3b606457c91b ]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/coredump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/coredump.c b/fs/coredump.c
index b5c86ff..4c5866b 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -657,7 +657,7 @@ void do_coredump(const siginfo_t *siginfo)
*/
if (!uid_eq(inode->i_uid, current_fsuid()))
goto close_fail;
- if (!cprm.file->f_op->write)
+ if (!(cprm.file->f_mode & FMODE_CAN_WRITE))
goto close_fail;
if (do_truncate(cprm.file->f_path.dentry, 0, 0, cprm.file))
goto close_fail;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 047/178] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (45 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 046/178] coredump: accept any write method Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 048/178] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() Sasha Levin
` (131 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Lv Zheng <lv.zheng@intel.com>
[ Upstream commit f254e3c57b9d952e987502aefa0804c177dd2503 ]
ACPICA commit 7d9fd64397d7c38899d3dc497525f6e6b044e0e3
OSPMs like Linux expect an acpi_physical_address returning value from
acpi_find_root_pointer(). This triggers warnings if sizeof (acpi_size) doesn't
equal to sizeof (acpi_physical_address):
drivers/acpi/osl.c:275:3: warning: passing argument 1 of 'acpi_find_root_pointer' from incompatible pointer type [enabled by default]
In file included from include/acpi/acpi.h:64:0,
from include/linux/acpi.h:36,
from drivers/acpi/osl.c:41:
include/acpi/acpixf.h:433:1: note: expected 'acpi_size *' but argument is of type 'acpi_physical_address *'
This patch corrects acpi_find_root_pointer().
Link: https://github.com/acpica/acpica/commit/7d9fd643
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/acpi/acpica/tbxfroot.c | 7 ++++---
include/acpi/acpixf.h | 12 ++++++------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/acpi/acpica/tbxfroot.c b/drivers/acpi/acpica/tbxfroot.c
index 43a54af..89772b3 100644
--- a/drivers/acpi/acpica/tbxfroot.c
+++ b/drivers/acpi/acpica/tbxfroot.c
@@ -142,7 +142,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp)
*
******************************************************************************/
-acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
+acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address)
{
u8 *table_ptr;
u8 *mem_rover;
@@ -200,7 +200,8 @@ acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
physical_address +=
(u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
- *table_address = physical_address;
+ *table_address =
+ (acpi_physical_address) physical_address;
return_ACPI_STATUS(AE_OK);
}
}
@@ -233,7 +234,7 @@ acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
(ACPI_HI_RSDP_WINDOW_BASE +
ACPI_PTR_DIFF(mem_rover, table_ptr));
- *table_address = physical_address;
+ *table_address = (acpi_physical_address) physical_address;
return_ACPI_STATUS(AE_OK);
}
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index ab2acf6..0747006 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -431,13 +431,13 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
- acpi_find_root_pointer(acpi_size * rsdp_address))
-
+ acpi_find_root_pointer(acpi_physical_address *
+ rsdp_address))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
- acpi_get_table_header(acpi_string signature,
- u32 instance,
- struct acpi_table_header
- *out_table_header))
+ acpi_get_table_header(acpi_string signature,
+ u32 instance,
+ struct acpi_table_header
+ *out_table_header))
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
acpi_get_table(acpi_string signature, u32 instance,
struct acpi_table_header
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 048/178] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR().
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (46 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 047/178] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 049/178] ACPICA: Utilities: Cleanup to convert physical address printing formats Sasha Levin
` (130 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Lv Zheng <lv.zheng@intel.com>
[ Upstream commit 6d3fd3cc33d50e4c0d0c0bd172de02caaec3127c ]
ACPICA commit 154f6d074dd38d6ebc0467ad454454e6c5c9ecdf
There are code pieces converting pointers using "(acpi_physical_address) x"
or "ACPI_CAST_PTR (t, x)" formats, this patch cleans up them.
Known issues:
1. Cleanup of "(ACPI_PHYSICAL_ADDRRESS) x" for a table field
For the conversions around the table fields, it is better to fix it with
alignment also fixed. So this patch doesn't modify such code. There
should be no functional problem by leaving them unchanged.
Link: https://github.com/acpica/acpica/commit/154f6d07
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/acpi/acpica/dsopcode.c | 3 +--
drivers/acpi/acpica/tbdata.c | 9 +++++----
drivers/acpi/acpica/tbinstal.c | 10 +++++-----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index 6c0759c..cd2d987 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -539,8 +539,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
return_ACPI_STATUS(AE_NOT_EXIST);
}
- obj_desc->region.address =
- (acpi_physical_address) ACPI_TO_INTEGER(table);
+ obj_desc->region.address = ACPI_PTR_TO_PHYSADDR(table);
obj_desc->region.length = table->length;
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index f499c10..7d3dd12 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -113,9 +113,9 @@ acpi_tb_acquire_table(struct acpi_table_desc *table_desc,
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
- table =
- ACPI_CAST_PTR(struct acpi_table_header,
- table_desc->address);
+ table = ACPI_CAST_PTR(struct acpi_table_header,
+ ACPI_PHYSADDR_TO_PTR(table_desc->
+ address));
break;
default:
@@ -214,7 +214,8 @@ acpi_tb_acquire_temp_table(struct acpi_table_desc *table_desc,
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
- table_header = ACPI_CAST_PTR(struct acpi_table_header, address);
+ table_header = ACPI_CAST_PTR(struct acpi_table_header,
+ ACPI_PHYSADDR_TO_PTR(address));
if (!table_header) {
return (AE_NO_MEMORY);
}
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index c0b39f3..3c57ff2 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -188,7 +188,7 @@ acpi_tb_install_fixed_table(acpi_physical_address address,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
if (ACPI_FAILURE(status)) {
ACPI_ERROR((AE_INFO, "Could not acquire table length at %p",
- ACPI_CAST_PTR(void, address)));
+ ACPI_PHYSADDR_TO_PTR(address)));
return_ACPI_STATUS(status);
}
@@ -247,7 +247,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
status = acpi_tb_acquire_temp_table(&new_table_desc, address, flags);
if (ACPI_FAILURE(status)) {
ACPI_ERROR((AE_INFO, "Could not acquire table length at %p",
- ACPI_CAST_PTR(void, address)));
+ ACPI_PHYSADDR_TO_PTR(address)));
return_ACPI_STATUS(status);
}
@@ -259,8 +259,8 @@ acpi_tb_install_standard_table(acpi_physical_address address,
acpi_gbl_disable_ssdt_table_install &&
ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) {
ACPI_INFO((AE_INFO, "Ignoring installation of %4.4s at %p",
- new_table_desc.signature.ascii, ACPI_CAST_PTR(void,
- address)));
+ new_table_desc.signature.ascii,
+ ACPI_PHYSADDR_TO_PTR(address)));
goto release_and_exit;
}
@@ -516,7 +516,7 @@ void acpi_tb_uninstall_table(struct acpi_table_desc *table_desc)
if ((table_desc->flags & ACPI_TABLE_ORIGIN_MASK) ==
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL) {
- ACPI_FREE(ACPI_CAST_PTR(void, table_desc->address));
+ ACPI_FREE(ACPI_PHYSADDR_TO_PTR(table_desc->address));
}
table_desc->address = ACPI_PTR_TO_PHYSADDR(NULL);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 049/178] ACPICA: Utilities: Cleanup to convert physical address printing formats.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (47 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 048/178] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 050/178] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers Sasha Levin
` (129 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Lv Zheng <lv.zheng@intel.com>
[ Upstream commit cc2080b0e5a7c6c33ef5e9ffccbc2b8f6f861393 ]
ACPICA commit 7f06739db43a85083a70371c14141008f20b2198
For physical addresses, since the address may exceed 32-bit address range
after calculation, we should use %8.8X%8.8X (see ACPI_FORMAT_UINT64()) to
convert the %p formats.
This is a preparation to switch acpi_physical_address to 64-bit on 32-bit
kernel builds.
Link: https://github.com/acpica/acpica/commit/7f06739d
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/acpi/acpica/exfldio.c | 10 ++++------
drivers/acpi/acpica/hwvalid.c | 16 ++++++++--------
drivers/acpi/acpica/nsdump.c | 7 +++----
drivers/acpi/acpica/tbinstal.c | 15 +++++++++------
drivers/acpi/acpica/utaddress.c | 34 +++++++++++++++-------------------
5 files changed, 39 insertions(+), 43 deletions(-)
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index 1d1b27a..58ea85e 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -263,17 +263,15 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
}
ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD,
- " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n",
+ " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n",
acpi_ut_get_region_name(rgn_desc->region.
space_id),
rgn_desc->region.space_id,
obj_desc->common_field.access_byte_width,
obj_desc->common_field.base_byte_offset,
- field_datum_byte_offset, ACPI_CAST_PTR(void,
- (rgn_desc->
- region.
- address +
- region_offset))));
+ field_datum_byte_offset,
+ ACPI_FORMAT_UINT64(rgn_desc->region.address +
+ region_offset)));
/* Invoke the appropriate address_space/op_region handler */
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c
index 6b91912..dabf754 100644
--- a/drivers/acpi/acpica/hwvalid.c
+++ b/drivers/acpi/acpica/hwvalid.c
@@ -142,17 +142,17 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
byte_width = ACPI_DIV_8(bit_width);
last_address = address + byte_width - 1;
- ACPI_DEBUG_PRINT((ACPI_DB_IO, "Address %p LastAddress %p Length %X",
- ACPI_CAST_PTR(void, address), ACPI_CAST_PTR(void,
- last_address),
- byte_width));
+ ACPI_DEBUG_PRINT((ACPI_DB_IO,
+ "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X",
+ ACPI_FORMAT_UINT64(address),
+ ACPI_FORMAT_UINT64(last_address), byte_width));
/* Maximum 16-bit address in I/O space */
if (last_address > ACPI_UINT16_MAX) {
ACPI_ERROR((AE_INFO,
- "Illegal I/O port address/length above 64K: %p/0x%X",
- ACPI_CAST_PTR(void, address), byte_width));
+ "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X",
+ ACPI_FORMAT_UINT64(address), byte_width));
return_ACPI_STATUS(AE_LIMIT);
}
@@ -181,8 +181,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
if (acpi_gbl_osi_data >= port_info->osi_dependency) {
ACPI_DEBUG_PRINT((ACPI_DB_IO,
- "Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)",
- ACPI_CAST_PTR(void, address),
+ "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)",
+ ACPI_FORMAT_UINT64(address),
byte_width, port_info->name,
port_info->start,
port_info->end));
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 3d88ef4..3440fa7 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -271,12 +271,11 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
switch (type) {
case ACPI_TYPE_PROCESSOR:
- acpi_os_printf("ID %02X Len %02X Addr %p\n",
+ acpi_os_printf("ID %02X Len %02X Addr %8.8X%8.8X\n",
obj_desc->processor.proc_id,
obj_desc->processor.length,
- ACPI_CAST_PTR(void,
- obj_desc->processor.
- address));
+ ACPI_FORMAT_UINT64(obj_desc->processor.
+ address));
break;
case ACPI_TYPE_DEVICE:
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 3c57ff2..5f93e57 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -187,8 +187,9 @@ acpi_tb_install_fixed_table(acpi_physical_address address,
status = acpi_tb_acquire_temp_table(&new_table_desc, address,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
if (ACPI_FAILURE(status)) {
- ACPI_ERROR((AE_INFO, "Could not acquire table length at %p",
- ACPI_PHYSADDR_TO_PTR(address)));
+ ACPI_ERROR((AE_INFO,
+ "Could not acquire table length at %8.8X%8.8X",
+ ACPI_FORMAT_UINT64(address)));
return_ACPI_STATUS(status);
}
@@ -246,8 +247,9 @@ acpi_tb_install_standard_table(acpi_physical_address address,
status = acpi_tb_acquire_temp_table(&new_table_desc, address, flags);
if (ACPI_FAILURE(status)) {
- ACPI_ERROR((AE_INFO, "Could not acquire table length at %p",
- ACPI_PHYSADDR_TO_PTR(address)));
+ ACPI_ERROR((AE_INFO,
+ "Could not acquire table length at %8.8X%8.8X",
+ ACPI_FORMAT_UINT64(address)));
return_ACPI_STATUS(status);
}
@@ -258,9 +260,10 @@ acpi_tb_install_standard_table(acpi_physical_address address,
if (!reload &&
acpi_gbl_disable_ssdt_table_install &&
ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) {
- ACPI_INFO((AE_INFO, "Ignoring installation of %4.4s at %p",
+ ACPI_INFO((AE_INFO,
+ "Ignoring installation of %4.4s at %8.8X%8.8X",
new_table_desc.signature.ascii,
- ACPI_PHYSADDR_TO_PTR(address)));
+ ACPI_FORMAT_UINT64(address)));
goto release_and_exit;
}
diff --git a/drivers/acpi/acpica/utaddress.c b/drivers/acpi/acpica/utaddress.c
index a1acec9..6598503 100644
--- a/drivers/acpi/acpica/utaddress.c
+++ b/drivers/acpi/acpica/utaddress.c
@@ -107,10 +107,10 @@ acpi_ut_add_address_range(acpi_adr_space_type space_id,
acpi_gbl_address_range_list[space_id] = range_info;
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
- "\nAdded [%4.4s] address range: 0x%p-0x%p\n",
+ "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
acpi_ut_get_node_name(range_info->region_node),
- ACPI_CAST_PTR(void, address),
- ACPI_CAST_PTR(void, range_info->end_address)));
+ ACPI_FORMAT_UINT64(address),
+ ACPI_FORMAT_UINT64(range_info->end_address)));
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
return_ACPI_STATUS(AE_OK);
@@ -160,15 +160,13 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id,
}
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
- "\nRemoved [%4.4s] address range: 0x%p-0x%p\n",
+ "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
acpi_ut_get_node_name(range_info->
region_node),
- ACPI_CAST_PTR(void,
- range_info->
- start_address),
- ACPI_CAST_PTR(void,
- range_info->
- end_address)));
+ ACPI_FORMAT_UINT64(range_info->
+ start_address),
+ ACPI_FORMAT_UINT64(range_info->
+ end_address)));
ACPI_FREE(range_info);
return_VOID;
@@ -245,16 +243,14 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
region_node);
ACPI_WARNING((AE_INFO,
- "%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)",
+ "%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)",
acpi_ut_get_region_name(space_id),
- ACPI_CAST_PTR(void, address),
- ACPI_CAST_PTR(void, end_address),
- ACPI_CAST_PTR(void,
- range_info->
- start_address),
- ACPI_CAST_PTR(void,
- range_info->
- end_address),
+ ACPI_FORMAT_UINT64(address),
+ ACPI_FORMAT_UINT64(end_address),
+ ACPI_FORMAT_UINT64(range_info->
+ start_address),
+ ACPI_FORMAT_UINT64(range_info->
+ end_address),
pathname));
ACPI_FREE(pathname);
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 050/178] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (48 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 049/178] ACPICA: Utilities: Cleanup to convert physical address printing formats Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 051/178] ARM: mvebu: do not register custom DMA operations when coherency is disabled Sasha Levin
` (128 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Lv Zheng <lv.zheng@intel.com>
[ Upstream commit 1d0a0b2f6df2bf2643fadc990eb143361eca6ada ]
ACPICA commit b60612373a4ef63b64a57c124576d7ddb6d8efb6
For physical addresses, since the address may exceed 32-bit address range
after calculation, we should use 0x%8.8X%8.8X instead of ACPI_PRINTF_UINT
and ACPI_FORMAT_UINT64() instead of
ACPI_FORMAT_NATIVE_UINT()/ACPI_FORMAT_TO_UINT().
This patch also removes above replaced macros as there are no users.
This is a preparation to switch acpi_physical_address to 64-bit on 32-bit
kernel builds.
Link: https://github.com/acpica/acpica/commit/b6061237
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/acpi/acpica/acmacros.h | 13 +------------
drivers/acpi/acpica/dsopcode.c | 4 ++--
drivers/acpi/acpica/evregion.c | 2 +-
drivers/acpi/acpica/exdump.c | 4 ++--
drivers/acpi/acpica/exregion.c | 8 +++-----
drivers/acpi/acpica/nsdump.c | 5 +++--
drivers/acpi/acpica/tbdata.c | 6 +++---
drivers/acpi/acpica/tbinstal.c | 8 ++++----
drivers/acpi/acpica/tbprint.c | 19 ++++++-------------
9 files changed, 25 insertions(+), 44 deletions(-)
diff --git a/drivers/acpi/acpica/acmacros.h b/drivers/acpi/acpica/acmacros.h
index 4bceb11..624cbb3 100644
--- a/drivers/acpi/acpica/acmacros.h
+++ b/drivers/acpi/acpica/acmacros.h
@@ -63,23 +63,12 @@
#define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val))
/*
- * printf() format helpers. These macros are workarounds for the difficulties
+ * printf() format helper. This macros is a workaround for the difficulties
* with emitting 64-bit integers and 64-bit pointers with the same code
* for both 32-bit and 64-bit hosts.
*/
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
-#if ACPI_MACHINE_WIDTH == 64
-#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
-#define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i)
-#define ACPI_PRINTF_UINT "0x%8.8X%8.8X"
-
-#else
-#define ACPI_FORMAT_NATIVE_UINT(i) 0, (u32) (i)
-#define ACPI_FORMAT_TO_UINT(i) (u32) (i)
-#define ACPI_PRINTF_UINT "0x%8.8X"
-#endif
-
/*
* Macros for moving data around to/from buffers that are possibly unaligned.
* If the hardware supports the transfer of unaligned data, just do the store.
diff --git a/drivers/acpi/acpica/dsopcode.c b/drivers/acpi/acpica/dsopcode.c
index cd2d987..5e7c7c3 100644
--- a/drivers/acpi/acpica/dsopcode.c
+++ b/drivers/acpi/acpica/dsopcode.c
@@ -446,7 +446,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
obj_desc,
- ACPI_FORMAT_NATIVE_UINT(obj_desc->region.address),
+ ACPI_FORMAT_UINT64(obj_desc->region.address),
obj_desc->region.length));
/* Now the address and length are valid for this opregion */
@@ -544,7 +544,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
obj_desc,
- ACPI_FORMAT_NATIVE_UINT(obj_desc->region.address),
+ ACPI_FORMAT_UINT64(obj_desc->region.address),
obj_desc->region.length));
/* Now the address and length are valid for this opregion */
diff --git a/drivers/acpi/acpica/evregion.c b/drivers/acpi/acpica/evregion.c
index 8eb8575..9ce5398 100644
--- a/drivers/acpi/acpica/evregion.c
+++ b/drivers/acpi/acpica/evregion.c
@@ -272,7 +272,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
®ion_obj->region.handler->address_space, handler,
- ACPI_FORMAT_NATIVE_UINT(address),
+ ACPI_FORMAT_UINT64(address),
acpi_ut_get_region_name(region_obj->region.
space_id)));
diff --git a/drivers/acpi/acpica/exdump.c b/drivers/acpi/acpica/exdump.c
index 0f23c3f..16b4909 100644
--- a/drivers/acpi/acpica/exdump.c
+++ b/drivers/acpi/acpica/exdump.c
@@ -767,8 +767,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
acpi_os_printf("\n");
} else {
acpi_os_printf(" base %8.8X%8.8X Length %X\n",
- ACPI_FORMAT_NATIVE_UINT(obj_desc->region.
- address),
+ ACPI_FORMAT_UINT64(obj_desc->region.
+ address),
obj_desc->region.length);
}
break;
diff --git a/drivers/acpi/acpica/exregion.c b/drivers/acpi/acpica/exregion.c
index cd5288a..be51d3e 100644
--- a/drivers/acpi/acpica/exregion.c
+++ b/drivers/acpi/acpica/exregion.c
@@ -181,7 +181,7 @@ acpi_ex_system_memory_space_handler(u32 function,
if (!mem_info->mapped_logical_address) {
ACPI_ERROR((AE_INFO,
"Could not map memory at 0x%8.8X%8.8X, size %u",
- ACPI_FORMAT_NATIVE_UINT(address),
+ ACPI_FORMAT_UINT64(address),
(u32) map_length));
mem_info->mapped_length = 0;
return_ACPI_STATUS(AE_NO_MEMORY);
@@ -202,8 +202,7 @@ acpi_ex_system_memory_space_handler(u32 function,
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
- bit_width, function,
- ACPI_FORMAT_NATIVE_UINT(address)));
+ bit_width, function, ACPI_FORMAT_UINT64(address)));
/*
* Perform the memory read or write
@@ -318,8 +317,7 @@ acpi_ex_system_io_space_handler(u32 function,
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"System-IO (width %u) R/W %u Address=%8.8X%8.8X\n",
- bit_width, function,
- ACPI_FORMAT_NATIVE_UINT(address)));
+ bit_width, function, ACPI_FORMAT_UINT64(address)));
/* Decode the function parameter */
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c
index 3440fa7..809ed52 100644
--- a/drivers/acpi/acpica/nsdump.c
+++ b/drivers/acpi/acpica/nsdump.c
@@ -346,8 +346,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
space_id));
if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
- ACPI_FORMAT_NATIVE_UINT
- (obj_desc->region.address),
+ ACPI_FORMAT_UINT64(obj_desc->
+ region.
+ address),
obj_desc->region.length);
} else {
acpi_os_printf
diff --git a/drivers/acpi/acpica/tbdata.c b/drivers/acpi/acpica/tbdata.c
index 7d3dd12..a078053 100644
--- a/drivers/acpi/acpica/tbdata.c
+++ b/drivers/acpi/acpica/tbdata.c
@@ -399,14 +399,14 @@ acpi_tb_verify_temp_table(struct acpi_table_desc * table_desc, char *signature)
table_desc->length);
if (ACPI_FAILURE(status)) {
ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
- "%4.4s " ACPI_PRINTF_UINT
+ "%4.4s 0x%8.8X%8.8X"
" Attempted table install failed",
acpi_ut_valid_acpi_name(table_desc->
signature.
ascii) ?
table_desc->signature.ascii : "????",
- ACPI_FORMAT_TO_UINT(table_desc->
- address)));
+ ACPI_FORMAT_UINT64(table_desc->
+ address)));
goto invalidate_and_exit;
}
}
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 5f93e57..8e1a43a 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -431,11 +431,11 @@ finish_override:
return;
}
- ACPI_INFO((AE_INFO, "%4.4s " ACPI_PRINTF_UINT
- " %s table override, new table: " ACPI_PRINTF_UINT,
+ ACPI_INFO((AE_INFO, "%4.4s 0x%8.8X%8.8X"
+ " %s table override, new table: 0x%8.8X%8.8X",
old_table_desc->signature.ascii,
- ACPI_FORMAT_TO_UINT(old_table_desc->address),
- override_type, ACPI_FORMAT_TO_UINT(new_table_desc.address)));
+ ACPI_FORMAT_UINT64(old_table_desc->address),
+ override_type, ACPI_FORMAT_UINT64(new_table_desc.address)));
/* We can now uninstall the original table */
diff --git a/drivers/acpi/acpica/tbprint.c b/drivers/acpi/acpica/tbprint.c
index df3bb20..a23bdae 100644
--- a/drivers/acpi/acpica/tbprint.c
+++ b/drivers/acpi/acpica/tbprint.c
@@ -127,18 +127,12 @@ acpi_tb_print_table_header(acpi_physical_address address,
{
struct acpi_table_header local_header;
- /*
- * The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to
- * support both 32-bit and 64-bit hosts/addresses in a consistent manner.
- * The %p specifier does not emit uniform output on all hosts. On some,
- * leading zeros are not supported.
- */
if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) {
/* FACS only has signature and length fields */
- ACPI_INFO((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X",
- header->signature, ACPI_FORMAT_TO_UINT(address),
+ ACPI_INFO((AE_INFO, "%-4.4s 0x%8.8X%8.8X %06X",
+ header->signature, ACPI_FORMAT_UINT64(address),
header->length));
} else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) {
@@ -149,9 +143,8 @@ acpi_tb_print_table_header(acpi_physical_address address,
header)->oem_id, ACPI_OEM_ID_SIZE);
acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
- ACPI_INFO((AE_INFO,
- "RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)",
- ACPI_FORMAT_TO_UINT(address),
+ ACPI_INFO((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
+ ACPI_FORMAT_UINT64(address),
(ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
revision >
0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
@@ -165,9 +158,9 @@ acpi_tb_print_table_header(acpi_physical_address address,
acpi_tb_cleanup_table_header(&local_header, header);
ACPI_INFO((AE_INFO,
- "%-4.4s " ACPI_PRINTF_UINT
+ "%-4.4s 0x%8.8X%8.8X"
" %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
- local_header.signature, ACPI_FORMAT_TO_UINT(address),
+ local_header.signature, ACPI_FORMAT_UINT64(address),
local_header.length, local_header.revision,
local_header.oem_id, local_header.oem_table_id,
local_header.oem_revision,
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 051/178] ARM: mvebu: do not register custom DMA operations when coherency is disabled
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (49 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 050/178] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 052/178] mnt: Fail collect_mounts when applied to unmounted mounts Sasha Levin
` (127 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This patch is a partial backport of commit ef01c6c36bb8 ("ARM: mvebu:
remove Armada 375 Z1 workaround for I/O coherency"). This commit was
merged in v3.19, so kernel versions later than v3.19 are not affected
by the problem that this commit fixes.
It does not make a lot of sense to backport this commit entirely,
since it is mainly removing some no longer useful code. However, this
commit is also making sure that the bus_register_notifier that
register the custom DMA operations that should be used for HW I/O
coherency does not get registered when said HW I/O coherency is not
enabled.
This is particularly critical since we have decided to disable HW I/O
coherency completely in all kernels < 4.0, to be on the safe side,
while experimenting a new implementation of the HW I/O coherency in >=
4.0.
Without this commit, kernels earlier than 3.18 have the custom DMA
operations normally used for HW I/O coherency registered (they don't
do cache maintenance operations), while HW I/O coherency is
disabled. It essentially causes every DMA transfer to transfer
garbage.
The issue fixed by this commit was introduced by 5ab5afd8ba83 ("ARM:
mvebu: implement Armada 375 coherency workaround"), but it was not
visible until now since it didn't cause any problem when HW I/O
coherency is enabled.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: <stable@vger.kernel.org> v3.16..v3.18
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/mach-mvebu/coherency.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c
index 2ffccd4..01efe13 100644
--- a/arch/arm/mach-mvebu/coherency.c
+++ b/arch/arm/mach-mvebu/coherency.c
@@ -448,8 +448,9 @@ static int __init coherency_late_init(void)
armada_375_coherency_init_wa();
}
- bus_register_notifier(&platform_bus_type,
- &mvebu_hwcc_nb);
+ if (coherency_available())
+ bus_register_notifier(&platform_bus_type,
+ &mvebu_hwcc_nb);
return 0;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 052/178] mnt: Fail collect_mounts when applied to unmounted mounts
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (50 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 051/178] ARM: mvebu: do not register custom DMA operations when coherency is disabled Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 053/178] fs_pin: Allow for the possibility that m_list or s_list go unused Sasha Levin
` (126 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Eric W. Biederman" <ebiederm@xmission.com>
[ Upstream commit cd4a40174b71acd021877341684d8bb1dc8ea4ae ]
The only users of collect_mounts are in audit_tree.c
In audit_trim_trees and audit_add_tree_rule the path passed into
collect_mounts is generated from kern_path passed an audit_tree
pathname which is guaranteed to be an absolute path. In those cases
collect_mounts is obviously intended to work on mounted paths and
if a race results in paths that are unmounted when collect_mounts
it is reasonable to fail early.
The paths passed into audit_tag_tree don't have the absolute path
check. But are used to play with fsnotify and otherwise interact with
the audit_trees, so again operating only on mounted paths appears
reasonable.
Avoid having to worry about what happens when we try and audit
unmounted filesystems by restricting collect_mounts to mounts
that appear in the mount tree.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/namespace.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/namespace.c b/fs/namespace.c
index 64837e3..8b60287 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1675,8 +1675,11 @@ struct vfsmount *collect_mounts(struct path *path)
{
struct mount *tree;
namespace_lock();
- tree = copy_tree(real_mount(path->mnt), path->dentry,
- CL_COPY_ALL | CL_PRIVATE);
+ if (!check_mnt(real_mount(path->mnt)))
+ tree = ERR_PTR(-EINVAL);
+ else
+ tree = copy_tree(real_mount(path->mnt), path->dentry,
+ CL_COPY_ALL | CL_PRIVATE);
namespace_unlock();
if (IS_ERR(tree))
return ERR_CAST(tree);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 053/178] fs_pin: Allow for the possibility that m_list or s_list go unused.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (51 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 052/178] mnt: Fail collect_mounts when applied to unmounted mounts Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 054/178] Revert "KVM: x86: drop fpu_activate hook" Sasha Levin
` (125 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Eric W. Biederman" <ebiederm@xmission.com>
[ Upstream commit 820f9f147dcce2602eefd9b575bbbd9ea14f0953 ]
This is needed to support lazily umounting locked mounts. Because the
entire unmounted subtree needs to stay together until there are no
users with references to any part of the subtree.
To support this guarantee that the fs_pin m_list and s_list nodes
are initialized by initializing them in init_fs_pin allowing
for the possibility that pin_insert_group does not touch them.
Further use hlist_del_init in pin_remove so that there is
a hlist_unhashed test before the list we attempt to update
the previous list item.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/fs_pin.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/fs_pin.c b/fs/fs_pin.c
index 9368236..569bbd1 100644
--- a/fs/fs_pin.c
+++ b/fs/fs_pin.c
@@ -20,8 +20,8 @@ void pin_put(struct fs_pin *p)
void pin_remove(struct fs_pin *pin)
{
spin_lock(&pin_lock);
- hlist_del(&pin->m_list);
- hlist_del(&pin->s_list);
+ hlist_del_init(&pin->m_list);
+ hlist_del_init(&pin->s_list);
spin_unlock(&pin_lock);
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 054/178] Revert "KVM: x86: drop fpu_activate hook"
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (52 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 053/178] fs_pin: Allow for the possibility that m_list or s_list go unused Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 055/178] x86, mce, severity: Extend the the mce_severity mechanism to handle UCNA/DEFERRED error Sasha Levin
` (124 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Paolo Bonzini <pbonzini@redhat.com>
[ Upstream commit 0fdd74f7784b5cdff7075736992bbb149b1ae49c ]
This reverts commit 4473b570a7ebb502f63f292ccfba7df622e5fdd3. We'll
use the hook again.
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/svm.c | 1 +
arch/x86/kvm/vmx.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 6ed0c30..77d5702 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -707,6 +707,7 @@ struct kvm_x86_ops {
void (*cache_reg)(struct kvm_vcpu *vcpu, enum kvm_reg reg);
unsigned long (*get_rflags)(struct kvm_vcpu *vcpu);
void (*set_rflags)(struct kvm_vcpu *vcpu, unsigned long rflags);
+ void (*fpu_activate)(struct kvm_vcpu *vcpu);
void (*fpu_deactivate)(struct kvm_vcpu *vcpu);
void (*tlb_flush)(struct kvm_vcpu *vcpu);
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 7527cef..f7eaee1 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -4370,6 +4370,7 @@ static struct kvm_x86_ops svm_x86_ops = {
.cache_reg = svm_cache_reg,
.get_rflags = svm_get_rflags,
.set_rflags = svm_set_rflags,
+ .fpu_activate = svm_fpu_activate,
.fpu_deactivate = svm_fpu_deactivate,
.tlb_flush = svm_flush_tlb,
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 47843b0..54bda28 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -9120,6 +9120,7 @@ static struct kvm_x86_ops vmx_x86_ops = {
.cache_reg = vmx_cache_reg,
.get_rflags = vmx_get_rflags,
.set_rflags = vmx_set_rflags,
+ .fpu_activate = vmx_fpu_activate,
.fpu_deactivate = vmx_fpu_deactivate,
.tlb_flush = vmx_flush_tlb,
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 055/178] x86, mce, severity: Extend the the mce_severity mechanism to handle UCNA/DEFERRED error
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (53 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 054/178] Revert "KVM: x86: drop fpu_activate hook" Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 056/178] x86/mce: Fix MCE severity messages Sasha Levin
` (123 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Chen Yucong <slaoub@gmail.com>
[ Upstream commit e3480271f59253cb60d030aa5e615bf00b731fea ]
Until now, the mce_severity mechanism can only identify the severity
of UCNA error as MCE_KEEP_SEVERITY. Meanwhile, it is not able to filter
out DEFERRED error for AMD platform.
This patch extends the mce_severity mechanism for handling
UCNA/DEFERRED error. In order to do this, the patch introduces a new
severity level - MCE_UCNA/DEFERRED_SEVERITY.
In addition, mce_severity is specific to machine check exception,
and it will check MCIP/EIPV/RIPV bits. In order to use mce_severity
mechanism in non-exception context, the patch also introduces a new
argument (is_excp) for mce_severity. `is_excp' is used to explicitly
specify the calling context of mce_severity.
Reviewed-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Signed-off-by: Chen Yucong <slaoub@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/include/asm/mce.h | 4 ++++
arch/x86/kernel/cpu/mcheck/mce-internal.h | 4 +++-
arch/x86/kernel/cpu/mcheck/mce-severity.c | 23 +++++++++++++++++------
arch/x86/kernel/cpu/mcheck/mce.c | 14 ++++++++------
drivers/edac/mce_amd.h | 3 ---
5 files changed, 32 insertions(+), 16 deletions(-)
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 958b90f..40b35a5 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -34,6 +34,10 @@
#define MCI_STATUS_S (1ULL<<56) /* Signaled machine check */
#define MCI_STATUS_AR (1ULL<<55) /* Action required */
+/* AMD-specific bits */
+#define MCI_STATUS_DEFERRED (1ULL<<44) /* declare an uncorrected error */
+#define MCI_STATUS_POISON (1ULL<<43) /* access poisonous data */
+
/*
* Note that the full MCACOD field of IA32_MCi_STATUS MSR is
* bits 15:0. But bit 12 is the 'F' bit, defined for corrected
diff --git a/arch/x86/kernel/cpu/mcheck/mce-internal.h b/arch/x86/kernel/cpu/mcheck/mce-internal.h
index 09edd0b..10b4690 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-internal.h
+++ b/arch/x86/kernel/cpu/mcheck/mce-internal.h
@@ -3,6 +3,8 @@
enum severity_level {
MCE_NO_SEVERITY,
+ MCE_DEFERRED_SEVERITY,
+ MCE_UCNA_SEVERITY = MCE_DEFERRED_SEVERITY,
MCE_KEEP_SEVERITY,
MCE_SOME_SEVERITY,
MCE_AO_SEVERITY,
@@ -21,7 +23,7 @@ struct mce_bank {
char attrname[ATTR_LEN]; /* attribute name */
};
-int mce_severity(struct mce *a, int tolerant, char **msg);
+int mce_severity(struct mce *a, int tolerant, char **msg, bool is_excp);
struct dentry *mce_get_debugfs_dir(void);
extern struct mce_bank *mce_banks;
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
index c370e1c..8bb4330 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
@@ -31,6 +31,7 @@
enum context { IN_KERNEL = 1, IN_USER = 2 };
enum ser { SER_REQUIRED = 1, NO_SER = 2 };
+enum exception { EXCP_CONTEXT = 1, NO_EXCP = 2 };
static struct severity {
u64 mask;
@@ -40,6 +41,7 @@ static struct severity {
unsigned char mcgres;
unsigned char ser;
unsigned char context;
+ unsigned char excp;
unsigned char covered;
char *msg;
} severities[] = {
@@ -48,6 +50,8 @@ static struct severity {
#define USER .context = IN_USER
#define SER .ser = SER_REQUIRED
#define NOSER .ser = NO_SER
+#define EXCP .excp = EXCP_CONTEXT
+#define NOEXCP .excp = NO_EXCP
#define BITCLR(x) .mask = x, .result = 0
#define BITSET(x) .mask = x, .result = x
#define MCGMASK(x, y) .mcgmask = x, .mcgres = y
@@ -62,7 +66,7 @@ static struct severity {
),
MCESEV(
NO, "Not enabled",
- BITCLR(MCI_STATUS_EN)
+ EXCP, BITCLR(MCI_STATUS_EN)
),
MCESEV(
PANIC, "Processor context corrupt",
@@ -71,16 +75,20 @@ static struct severity {
/* When MCIP is not set something is very confused */
MCESEV(
PANIC, "MCIP not set in MCA handler",
- MCGMASK(MCG_STATUS_MCIP, 0)
+ EXCP, MCGMASK(MCG_STATUS_MCIP, 0)
),
/* Neither return not error IP -- no chance to recover -> PANIC */
MCESEV(
PANIC, "Neither restart nor error IP",
- MCGMASK(MCG_STATUS_RIPV|MCG_STATUS_EIPV, 0)
+ EXCP, MCGMASK(MCG_STATUS_RIPV|MCG_STATUS_EIPV, 0)
),
MCESEV(
PANIC, "In kernel and no restart IP",
- KERNEL, MCGMASK(MCG_STATUS_RIPV, 0)
+ EXCP, KERNEL, MCGMASK(MCG_STATUS_RIPV, 0)
+ ),
+ MCESEV(
+ DEFERRED, "Deferred error",
+ NOSER, MASK(MCI_STATUS_UC|MCI_STATUS_DEFERRED|MCI_STATUS_POISON, MCI_STATUS_DEFERRED)
),
MCESEV(
KEEP, "Corrected error",
@@ -89,7 +97,7 @@ static struct severity {
/* ignore OVER for UCNA */
MCESEV(
- KEEP, "Uncorrected no action required",
+ UCNA, "Uncorrected no action required",
SER, MASK(MCI_UC_SAR, MCI_STATUS_UC)
),
MCESEV(
@@ -178,8 +186,9 @@ static int error_context(struct mce *m)
return ((m->cs & 3) == 3) ? IN_USER : IN_KERNEL;
}
-int mce_severity(struct mce *m, int tolerant, char **msg)
+int mce_severity(struct mce *m, int tolerant, char **msg, bool is_excp)
{
+ enum exception excp = (is_excp ? EXCP_CONTEXT : NO_EXCP);
enum context ctx = error_context(m);
struct severity *s;
@@ -194,6 +203,8 @@ int mce_severity(struct mce *m, int tolerant, char **msg)
continue;
if (s->context && ctx != s->context)
continue;
+ if (s->excp && excp != s->excp)
+ continue;
if (msg)
*msg = s->msg;
s->covered = 1;
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 61a9668ce..453e9bf 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -668,7 +668,8 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
if (quirk_no_way_out)
quirk_no_way_out(i, m, regs);
}
- if (mce_severity(m, mca_cfg.tolerant, msg) >= MCE_PANIC_SEVERITY)
+ if (mce_severity(m, mca_cfg.tolerant, msg, true) >=
+ MCE_PANIC_SEVERITY)
ret = 1;
}
return ret;
@@ -754,7 +755,7 @@ static void mce_reign(void)
for_each_possible_cpu(cpu) {
int severity = mce_severity(&per_cpu(mces_seen, cpu),
mca_cfg.tolerant,
- &nmsg);
+ &nmsg, true);
if (severity > global_worst) {
msg = nmsg;
global_worst = severity;
@@ -1095,13 +1096,14 @@ void do_machine_check(struct pt_regs *regs, long error_code)
*/
add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
- severity = mce_severity(&m, cfg->tolerant, NULL);
+ severity = mce_severity(&m, cfg->tolerant, NULL, true);
/*
- * When machine check was for corrected handler don't touch,
- * unless we're panicing.
+ * When machine check was for corrected/deferred handler don't
+ * touch, unless we're panicing.
*/
- if (severity == MCE_KEEP_SEVERITY && !no_way_out)
+ if ((severity == MCE_KEEP_SEVERITY ||
+ severity == MCE_UCNA_SEVERITY) && !no_way_out)
continue;
__set_bit(i, toclear);
if (severity == MCE_NO_SEVERITY) {
diff --git a/drivers/edac/mce_amd.h b/drivers/edac/mce_amd.h
index 51b7e3a..c2359a1 100644
--- a/drivers/edac/mce_amd.h
+++ b/drivers/edac/mce_amd.h
@@ -32,9 +32,6 @@
#define R4(x) (((x) >> 4) & 0xf)
#define R4_MSG(x) ((R4(x) < 9) ? rrrr_msgs[R4(x)] : "Wrong R4!")
-#define MCI_STATUS_DEFERRED BIT_64(44)
-#define MCI_STATUS_POISON BIT_64(43)
-
extern const char * const pp_msgs[];
enum tt_ids {
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 056/178] x86/mce: Fix MCE severity messages
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (54 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 055/178] x86, mce, severity: Extend the the mce_severity mechanism to handle UCNA/DEFERRED error Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 057/178] x86/fpu: Disable XSAVES* support for now Sasha Levin
` (122 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Borislav Petkov <bp@suse.de>
[ Upstream commit 17fea54bf0ab34fa09a06bbde2f58ed7bbdf9299 ]
Derek noticed that a critical MCE gets reported with the wrong
error type description:
[Hardware Error]: CPU 34: Machine Check Exception: 5 Bank 9: f200003f000100b0
[Hardware Error]: RIP !INEXACT! 10:<ffffffff812e14c1> {intel_idle+0xb1/0x170}
[Hardware Error]: TSC 49587b8e321cb
[Hardware Error]: PROCESSOR 0:306e4 TIME 1431561296 SOCKET 1 APIC 29
[Hardware Error]: Some CPUs didn't answer in synchronization
[Hardware Error]: Machine check: Invalid
^^^^^^^
The last line with 'Invalid' should have printed the high level
MCE error type description we get from mce_severity, i.e.
something like:
[Hardware Error]: Machine check: Action required: data load error in a user process
this happens due to the fact that mce_no_way_out() iterates over
all MCA banks and possibly overwrites the @msg argument which is
used in the panic printing later.
Change behavior to take the message of only and the (last)
critical MCE it detects.
Reported-by: Derek <denc716@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1431936437-25286-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kernel/cpu/mcheck/mce.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 453e9bf..b5c2276 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -660,6 +660,7 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
struct pt_regs *regs)
{
int i, ret = 0;
+ char *tmp;
for (i = 0; i < mca_cfg.banks; i++) {
m->status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i));
@@ -668,9 +669,11 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
if (quirk_no_way_out)
quirk_no_way_out(i, m, regs);
}
- if (mce_severity(m, mca_cfg.tolerant, msg, true) >=
- MCE_PANIC_SEVERITY)
+
+ if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
+ *msg = tmp;
ret = 1;
+ }
}
return ret;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 057/178] x86/fpu: Disable XSAVES* support for now
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (55 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 056/178] x86/mce: Fix MCE severity messages Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 058/178] KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages Sasha Levin
` (121 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ingo Molnar <mingo@kernel.org>
[ Upstream commit e88221c50cadade0eb4f7f149f4967d760212695 ]
The kernel's handling of 'compacted' xsave state layout is buggy:
http://marc.info/?l=linux-kernel&m=142967852317199
I don't have such a system, and the description there is vague, but
from extrapolation I guess that there were two kinds of bugs
observed:
- boot crashes, due to size calculations being wrong and the dynamic
allocation allocating a too small xstate area. (This is now fixed
in the new FPU code - but still present in stable kernels.)
- FPU state corruption and ABI breakage: if signal handlers try to
change the FPU state in standard format, which then the kernel
tries to restore in the compacted format.
These breakages are scary, but they only occur on a small number of
systems that have XSAVES* CPU support. Yet we have had XSAVES support
in the upstream kernel for a large number of stable kernel releases,
and the fixes are involved and unproven.
So do the safe resolution first: disable XSAVES* support and only
use the standard xstate format. This makes the code work and is
easy to backport.
On top of this we can work on enabling (and testing!) proper
compacted format support, without backporting pressure, on top of the
new, cleaned up FPU code.
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kernel/i387.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index a9a4229..ae0fdc8 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -155,6 +155,21 @@ static void init_thread_xstate(void)
xstate_size = sizeof(struct i387_fxsave_struct);
else
xstate_size = sizeof(struct i387_fsave_struct);
+
+ /*
+ * Quirk: we don't yet handle the XSAVES* instructions
+ * correctly, as we don't correctly convert between
+ * standard and compacted format when interfacing
+ * with user-space - so disable it for now.
+ *
+ * The difference is small: with recent CPUs the
+ * compacted format is only marginally smaller than
+ * the standard FPU state format.
+ *
+ * ( This is easy to backport while we are fixing
+ * XSAVES* support. )
+ */
+ setup_clear_cpu_cap(X86_FEATURE_XSAVES);
}
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 058/178] KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (56 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 057/178] x86/fpu: Disable XSAVES* support for now Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 059/178] KVM: MMU: fix smap permission check Sasha Levin
` (120 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Paolo Bonzini <pbonzini@redhat.com>
[ Upstream commit 898761158be7682082955e3efa4ad24725305fc7 ]
smep_andnot_wp is initialized in kvm_init_shadow_mmu and shadow pages
should not be reused for different values of it. Thus, it has to be
added to the mask in kvm_mmu_pte_write.
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kvm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 9c12e63..796997b 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -4126,7 +4126,7 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
++vcpu->kvm->stat.mmu_pte_write;
kvm_mmu_audit(vcpu, AUDIT_PRE_PTE_WRITE);
- mask.cr0_wp = mask.cr4_pae = mask.nxe = 1;
+ mask.cr0_wp = mask.cr4_pae = mask.nxe = mask.smep_andnot_wp = 1;
for_each_gfn_indirect_valid_sp(vcpu->kvm, sp, gfn) {
if (detect_write_misaligned(sp, gpa, bytes) ||
detect_write_flooding(sp)) {
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 059/178] KVM: MMU: fix smap permission check
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (57 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 058/178] KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 060/178] kvm: fix crash in kvm_vcpu_reload_apic_access_page Sasha Levin
` (119 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Xiao Guangrong <guangrong.xiao@linux.intel.com>
[ Upstream commit 7cbeed9bce7580479bb97457dad220cb3594b875 ]
Current permission check assumes that RSVD bit in PFEC is always zero,
however, it is not true since MMIO #PF will use it to quickly identify
MMIO access
Fix it by clearing the bit if walking guest page table is needed
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kvm/mmu.h | 2 ++
arch/x86/kvm/paging_tmpl.h | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
index bde8ee7..222fb3e 100644
--- a/arch/x86/kvm/mmu.h
+++ b/arch/x86/kvm/mmu.h
@@ -179,6 +179,8 @@ static inline bool permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
int index = (pfec >> 1) +
(smap >> (X86_EFLAGS_AC_BIT - PFERR_RSVD_BIT + 1));
+ WARN_ON(pfec & PFERR_RSVD_MASK);
+
return (mmu->permissions[index] >> pte_access) & 1;
}
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index fd49c86..6e6d115 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -718,6 +718,13 @@ static int FNAME(page_fault)(struct kvm_vcpu *vcpu, gva_t addr, u32 error_code,
mmu_is_nested(vcpu));
if (likely(r != RET_MMIO_PF_INVALID))
return r;
+
+ /*
+ * page fault with PFEC.RSVD = 1 is caused by shadow
+ * page fault, should not be used to walk guest page
+ * table.
+ */
+ error_code &= ~PFERR_RSVD_MASK;
};
r = mmu_topup_memory_caches(vcpu);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 060/178] kvm: fix crash in kvm_vcpu_reload_apic_access_page
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (58 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 059/178] KVM: MMU: fix smap permission check Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 061/178] KVM: MMU: fix SMAP virtualization Sasha Levin
` (118 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Andrea Arcangeli <aarcange@redhat.com>
[ Upstream commit e8fd5e9e9984675f45b9a5485909c143fbde248f ]
memslot->userfault_addr is set by the kernel with a mmap executed
from the kernel but the userland can still munmap it and lead to the
below oops after memslot->userfault_addr points to a host virtual
address that has no vma or mapping.
[ 327.538306] BUG: unable to handle kernel paging request at fffffffffffffffe
[ 327.538407] IP: [<ffffffff811a7b55>] put_page+0x5/0x50
[ 327.538474] PGD 1a01067 PUD 1a03067 PMD 0
[ 327.538529] Oops: 0000 [#1] SMP
[ 327.538574] Modules linked in: macvtap macvlan xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT iptable_filter ip_tables tun bridge stp llc rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache xprtrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ipmi_devintf iTCO_wdt iTCO_vendor_support intel_powerclamp coretemp dcdbas intel_rapl kvm_intel kvm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd pcspkr sb_edac edac_core ipmi_si ipmi_msghandler acpi_pad wmi acpi_power_meter lpc_ich mfd_core mei_me
[ 327.539488] mei shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc mlx4_ib ib_sa ib_mad ib_core mlx4_en vxlan ib_addr ip_tunnel xfs libcrc32c sd_mod crc_t10dif crct10dif_common crc32c_intel mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit drm_kms_helper ttm drm ahci i2c_core libahci mlx4_core libata tg3 ptp pps_core megaraid_sas ntb dm_mirror dm_region_hash dm_log dm_mod
[ 327.539956] CPU: 3 PID: 3161 Comm: qemu-kvm Not tainted 3.10.0-240.el7.userfault19.4ca4011.x86_64.debug #1
[ 327.540045] Hardware name: Dell Inc. PowerEdge R420/0CN7CM, BIOS 2.1.2 01/20/2014
[ 327.540115] task: ffff8803280ccf00 ti: ffff880317c58000 task.ti: ffff880317c58000
[ 327.540184] RIP: 0010:[<ffffffff811a7b55>] [<ffffffff811a7b55>] put_page+0x5/0x50
[ 327.540261] RSP: 0018:ffff880317c5bcf8 EFLAGS: 00010246
[ 327.540313] RAX: 00057ffffffff000 RBX: ffff880616a20000 RCX: 0000000000000000
[ 327.540379] RDX: 0000000000002014 RSI: 00057ffffffff000 RDI: fffffffffffffffe
[ 327.540445] RBP: ffff880317c5bd10 R08: 0000000000000103 R09: 0000000000000000
[ 327.540511] R10: 0000000000000000 R11: 0000000000000000 R12: fffffffffffffffe
[ 327.540576] R13: 0000000000000000 R14: ffff880317c5bd70 R15: ffff880317c5bd50
[ 327.540643] FS: 00007fd230b7f700(0000) GS:ffff880630800000(0000) knlGS:0000000000000000
[ 327.540717] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 327.540771] CR2: fffffffffffffffe CR3: 000000062a2c3000 CR4: 00000000000427e0
[ 327.540837] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 327.540904] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 327.540974] Stack:
[ 327.541008] ffffffffa05d6d0c ffff880616a20000 0000000000000000 ffff880317c5bdc0
[ 327.541093] ffffffffa05ddaa2 0000000000000000 00000000002191bf 00000042f3feab2d
[ 327.541177] 00000042f3feab2d 0000000000000002 0000000000000001 0321000000000000
[ 327.541261] Call Trace:
[ 327.541321] [<ffffffffa05d6d0c>] ? kvm_vcpu_reload_apic_access_page+0x6c/0x80 [kvm]
[ 327.543615] [<ffffffffa05ddaa2>] vcpu_enter_guest+0x3f2/0x10f0 [kvm]
[ 327.545918] [<ffffffffa05e2f10>] kvm_arch_vcpu_ioctl_run+0x2b0/0x5a0 [kvm]
[ 327.548211] [<ffffffffa05e2d02>] ? kvm_arch_vcpu_ioctl_run+0xa2/0x5a0 [kvm]
[ 327.550500] [<ffffffffa05ca845>] kvm_vcpu_ioctl+0x2b5/0x680 [kvm]
[ 327.552768] [<ffffffff810b8d12>] ? creds_are_invalid.part.1+0x12/0x50
[ 327.555069] [<ffffffff810b8d71>] ? creds_are_invalid+0x21/0x30
[ 327.557373] [<ffffffff812d6066>] ? inode_has_perm.isra.49.constprop.65+0x26/0x80
[ 327.559663] [<ffffffff8122d985>] do_vfs_ioctl+0x305/0x530
[ 327.561917] [<ffffffff8122dc51>] SyS_ioctl+0xa1/0xc0
[ 327.564185] [<ffffffff816de829>] system_call_fastpath+0x16/0x1b
[ 327.566480] Code: 0b 31 f6 4c 89 e7 e8 4b 7f ff ff 0f 0b e8 24 fd ff ff e9 a9 fd ff ff 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 <48> f7 07 00 c0 00 00 55 48 89 e5 75 2a 8b 47 1c 85 c0 74 1e f0
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kvm/x86.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 5369ec6..a495dd0 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6139,6 +6139,8 @@ void kvm_vcpu_reload_apic_access_page(struct kvm_vcpu *vcpu)
return;
page = gfn_to_page(vcpu->kvm, APIC_DEFAULT_PHYS_BASE >> PAGE_SHIFT);
+ if (is_error_page(page))
+ return;
kvm_x86_ops->set_apic_access_page_addr(vcpu, page_to_phys(page));
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 061/178] KVM: MMU: fix SMAP virtualization
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (59 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 060/178] kvm: fix crash in kvm_vcpu_reload_apic_access_page Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 062/178] kvm/fpu: Enable eager restore kvm FPU for MPX Sasha Levin
` (117 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Xiao Guangrong <guangrong.xiao@linux.intel.com>
[ Upstream commit 0be0226f07d14b153a5eedf2bb86e1eb7dcefab5 ]
KVM may turn a user page to a kernel page when kernel writes a readonly
user page if CR0.WP = 1. This shadow page entry will be reused after
SMAP is enabled so that kernel is allowed to access this user page
Fix it by setting SMAP && !CR0.WP into shadow page's role and reset mmu
once CR4.SMAP is updated
Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
Documentation/virtual/kvm/mmu.txt | 18 ++++++++++++++----
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/mmu.c | 16 ++++++++++++----
arch/x86/kvm/mmu.h | 2 --
arch/x86/kvm/x86.c | 8 +++-----
5 files changed, 30 insertions(+), 15 deletions(-)
diff --git a/Documentation/virtual/kvm/mmu.txt b/Documentation/virtual/kvm/mmu.txt
index 53838d9..c59bd9b 100644
--- a/Documentation/virtual/kvm/mmu.txt
+++ b/Documentation/virtual/kvm/mmu.txt
@@ -169,6 +169,10 @@ Shadow pages contain the following information:
Contains the value of cr4.smep && !cr0.wp for which the page is valid
(pages for which this is true are different from other pages; see the
treatment of cr0.wp=0 below).
+ role.smap_andnot_wp:
+ Contains the value of cr4.smap && !cr0.wp for which the page is valid
+ (pages for which this is true are different from other pages; see the
+ treatment of cr0.wp=0 below).
gfn:
Either the guest page table containing the translations shadowed by this
page, or the base page frame for linear translations. See role.direct.
@@ -344,10 +348,16 @@ on fault type:
(user write faults generate a #PF)
-In the first case there is an additional complication if CR4.SMEP is
-enabled: since we've turned the page into a kernel page, the kernel may now
-execute it. We handle this by also setting spte.nx. If we get a user
-fetch or read fault, we'll change spte.u=1 and spte.nx=gpte.nx back.
+In the first case there are two additional complications:
+- if CR4.SMEP is enabled: since we've turned the page into a kernel page,
+ the kernel may now execute it. We handle this by also setting spte.nx.
+ If we get a user fetch or read fault, we'll change spte.u=1 and
+ spte.nx=gpte.nx back.
+- if CR4.SMAP is disabled: since the page has been changed to a kernel
+ page, it can not be reused when CR4.SMAP is enabled. We set
+ CR4.SMAP && !CR0.WP into shadow page's role to avoid this case. Note,
+ here we do not care the case that CR4.SMAP is enabled since KVM will
+ directly inject #PF to guest due to failed permission check.
To prevent an spte that was converted into a kernel page with cr0.wp=0
from being written by the kernel after cr0.wp has changed to 1, we make
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 77d5702..3e8717f 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -201,6 +201,7 @@ union kvm_mmu_page_role {
unsigned nxe:1;
unsigned cr0_wp:1;
unsigned smep_andnot_wp:1;
+ unsigned smap_andnot_wp:1;
};
};
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 796997b..8bd81f5 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -3625,8 +3625,8 @@ static void reset_rsvds_bits_mask_ept(struct kvm_vcpu *vcpu,
}
}
-void update_permission_bitmask(struct kvm_vcpu *vcpu,
- struct kvm_mmu *mmu, bool ept)
+static void update_permission_bitmask(struct kvm_vcpu *vcpu,
+ struct kvm_mmu *mmu, bool ept)
{
unsigned bit, byte, pfec;
u8 map;
@@ -3807,6 +3807,7 @@ static void init_kvm_tdp_mmu(struct kvm_vcpu *vcpu)
void kvm_init_shadow_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *context)
{
bool smep = kvm_read_cr4_bits(vcpu, X86_CR4_SMEP);
+ bool smap = kvm_read_cr4_bits(vcpu, X86_CR4_SMAP);
ASSERT(vcpu);
ASSERT(!VALID_PAGE(vcpu->arch.mmu.root_hpa));
@@ -3824,6 +3825,8 @@ void kvm_init_shadow_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *context)
vcpu->arch.mmu.base_role.cr0_wp = is_write_protection(vcpu);
vcpu->arch.mmu.base_role.smep_andnot_wp
= smep && !is_write_protection(vcpu);
+ context->base_role.smap_andnot_wp
+ = smap && !is_write_protection(vcpu);
}
EXPORT_SYMBOL_GPL(kvm_init_shadow_mmu);
@@ -4095,12 +4098,18 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
const u8 *new, int bytes)
{
gfn_t gfn = gpa >> PAGE_SHIFT;
- union kvm_mmu_page_role mask = { .word = 0 };
struct kvm_mmu_page *sp;
LIST_HEAD(invalid_list);
u64 entry, gentry, *spte;
int npte;
bool remote_flush, local_flush, zap_page;
+ union kvm_mmu_page_role mask = (union kvm_mmu_page_role) {
+ .cr0_wp = 1,
+ .cr4_pae = 1,
+ .nxe = 1,
+ .smep_andnot_wp = 1,
+ .smap_andnot_wp = 1,
+ };
/*
* If we don't have indirect shadow pages, it means no page is
@@ -4126,7 +4135,6 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
++vcpu->kvm->stat.mmu_pte_write;
kvm_mmu_audit(vcpu, AUDIT_PRE_PTE_WRITE);
- mask.cr0_wp = mask.cr4_pae = mask.nxe = mask.smep_andnot_wp = 1;
for_each_gfn_indirect_valid_sp(vcpu->kvm, sp, gfn) {
if (detect_write_misaligned(sp, gpa, bytes) ||
detect_write_flooding(sp)) {
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
index 222fb3e..a6b8764 100644
--- a/arch/x86/kvm/mmu.h
+++ b/arch/x86/kvm/mmu.h
@@ -84,8 +84,6 @@ int handle_mmio_page_fault_common(struct kvm_vcpu *vcpu, u64 addr, bool direct);
void kvm_init_shadow_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *context);
void kvm_init_shadow_ept_mmu(struct kvm_vcpu *vcpu, struct kvm_mmu *context,
bool execonly);
-void update_permission_bitmask(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
- bool ept);
static inline unsigned int kvm_mmu_available_pages(struct kvm *kvm)
{
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index a495dd0..f764dd1 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -678,8 +678,9 @@ EXPORT_SYMBOL_GPL(kvm_set_xcr);
int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
{
unsigned long old_cr4 = kvm_read_cr4(vcpu);
- unsigned long pdptr_bits = X86_CR4_PGE | X86_CR4_PSE |
- X86_CR4_PAE | X86_CR4_SMEP;
+ unsigned long pdptr_bits = X86_CR4_PGE | X86_CR4_PSE | X86_CR4_PAE |
+ X86_CR4_SMEP | X86_CR4_SMAP;
+
if (cr4 & CR4_RESERVED_BITS)
return 1;
@@ -720,9 +721,6 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
(!(cr4 & X86_CR4_PCIDE) && (old_cr4 & X86_CR4_PCIDE)))
kvm_mmu_reset_context(vcpu);
- if ((cr4 ^ old_cr4) & X86_CR4_SMAP)
- update_permission_bitmask(vcpu, vcpu->arch.walk_mmu, false);
-
if ((cr4 ^ old_cr4) & X86_CR4_OSXSAVE)
kvm_update_cpuid(vcpu);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 062/178] kvm/fpu: Enable eager restore kvm FPU for MPX
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (60 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 061/178] KVM: MMU: fix SMAP virtualization Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 063/178] ktime: Optimize ktime_divns for constant divisors Sasha Levin
` (116 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Liang Li <liang.z.li@intel.com>
[ Upstream commit c447e76b4cabb49ddae8e49c5758f031f35d55fb ]
The MPX feature requires eager KVM FPU restore support. We have verified
that MPX cannot work correctly with the current lazy KVM FPU restore
mechanism. Eager KVM FPU restore should be enabled if the MPX feature is
exposed to VM.
Signed-off-by: Yang Zhang <yang.z.zhang@intel.com>
Signed-off-by: Liang Li <liang.z.li@intel.com>
[Also activate the FPU on AMD processors. - Paolo]
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/cpuid.c | 4 ++++
arch/x86/kvm/cpuid.h | 8 ++++++++
arch/x86/kvm/x86.c | 16 ++++++++++++++--
4 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 3e8717f..6c0709f 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -393,6 +393,7 @@ struct kvm_vcpu_arch {
struct kvm_mmu_memory_cache mmu_page_header_cache;
struct fpu guest_fpu;
+ bool eager_fpu;
u64 xcr0;
u64 guest_supported_xcr0;
u32 guest_xstate_size;
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 88f9201..81c6d54 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -16,6 +16,8 @@
#include <linux/module.h>
#include <linux/vmalloc.h>
#include <linux/uaccess.h>
+#include <asm/i387.h> /* For use_eager_fpu. Ugh! */
+#include <asm/fpu-internal.h> /* For use_eager_fpu. Ugh! */
#include <asm/user.h>
#include <asm/xsave.h>
#include "cpuid.h"
@@ -88,6 +90,8 @@ int kvm_update_cpuid(struct kvm_vcpu *vcpu)
xstate_required_size(vcpu->arch.xcr0);
}
+ vcpu->arch.eager_fpu = guest_cpuid_has_mpx(vcpu);
+
/*
* The existing code assumes virtual address is 48-bit in the canonical
* address checks; exit if it is ever changed.
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h
index 4452eed..9bec2b8 100644
--- a/arch/x86/kvm/cpuid.h
+++ b/arch/x86/kvm/cpuid.h
@@ -111,4 +111,12 @@ static inline bool guest_cpuid_has_rtm(struct kvm_vcpu *vcpu)
best = kvm_find_cpuid_entry(vcpu, 7, 0);
return best && (best->ebx & bit(X86_FEATURE_RTM));
}
+
+static inline bool guest_cpuid_has_mpx(struct kvm_vcpu *vcpu)
+{
+ struct kvm_cpuid_entry2 *best;
+
+ best = kvm_find_cpuid_entry(vcpu, 7, 0);
+ return best && (best->ebx & bit(X86_FEATURE_MPX));
+}
#endif
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f764dd1..0bb431c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6993,7 +6993,9 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)
fpu_save_init(&vcpu->arch.guest_fpu);
__kernel_fpu_end();
++vcpu->stat.fpu_reload;
- kvm_make_request(KVM_REQ_DEACTIVATE_FPU, vcpu);
+ if (!vcpu->arch.eager_fpu)
+ kvm_make_request(KVM_REQ_DEACTIVATE_FPU, vcpu);
+
trace_kvm_fpu(0);
}
@@ -7009,11 +7011,21 @@ void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
unsigned int id)
{
+ struct kvm_vcpu *vcpu;
+
if (check_tsc_unstable() && atomic_read(&kvm->online_vcpus) != 0)
printk_once(KERN_WARNING
"kvm: SMP vm created on host with unstable TSC; "
"guest TSC will not be reliable\n");
- return kvm_x86_ops->vcpu_create(kvm, id);
+
+ vcpu = kvm_x86_ops->vcpu_create(kvm, id);
+
+ /*
+ * Activate fpu unconditionally in case the guest needs eager FPU. It will be
+ * deactivated soon if it doesn't.
+ */
+ kvm_x86_ops->fpu_activate(vcpu);
+ return vcpu;
}
int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 063/178] ktime: Optimize ktime_divns for constant divisors
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (61 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 062/178] kvm/fpu: Enable eager restore kvm FPU for MPX Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 064/178] ktime: Fix ktime_divns to do signed division Sasha Levin
` (115 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Nicolas Pitre <nicolas.pitre@linaro.org>
[ Upstream commit 8b618628b2bf83512fc8df5e8672619d65adfdfb ]
At least on ARM, do_div() is optimized to turn constant divisors into
an inline multiplication by the reciprocal value at compile time.
However this optimization is missed entirely whenever ktime_divns() is
used and the slow out-of-line division code is used all the time.
Let ktime_divns() use do_div() inline whenever the divisor is constant
and small enough. This will make things like ktime_to_us() and
ktime_to_ms() much faster.
Cc: Arnd Bergmann <arnd.bergmann@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Nicolas Pitre <nico@linaro.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
include/linux/ktime.h | 12 +++++++++++-
kernel/time/hrtimer.c | 4 ++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index c9d645a..411dd8b 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -166,7 +166,17 @@ static inline bool ktime_before(const ktime_t cmp1, const ktime_t cmp2)
}
#if BITS_PER_LONG < 64
-extern u64 ktime_divns(const ktime_t kt, s64 div);
+extern u64 __ktime_divns(const ktime_t kt, s64 div);
+static inline u64 ktime_divns(const ktime_t kt, s64 div)
+{
+ if (__builtin_constant_p(div) && !(div >> 32)) {
+ u64 ns = kt.tv64;
+ do_div(ns, div);
+ return ns;
+ } else {
+ return __ktime_divns(kt, div);
+ }
+}
#else /* BITS_PER_LONG < 64 */
# define ktime_divns(kt, div) (u64)((kt).tv64 / (div))
#endif
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index d8c724c..5e4d51c 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -266,7 +266,7 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
/*
* Divide a ktime value by a nanosecond value
*/
-u64 ktime_divns(const ktime_t kt, s64 div)
+u64 __ktime_divns(const ktime_t kt, s64 div)
{
u64 dclc;
int sft = 0;
@@ -282,7 +282,7 @@ u64 ktime_divns(const ktime_t kt, s64 div)
return dclc;
}
-EXPORT_SYMBOL_GPL(ktime_divns);
+EXPORT_SYMBOL_GPL(__ktime_divns);
#endif /* BITS_PER_LONG >= 64 */
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 064/178] ktime: Fix ktime_divns to do signed division
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (62 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 063/178] ktime: Optimize ktime_divns for constant divisors Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 065/178] fs, omfs: add NULL terminator in the end up the token list Sasha Levin
` (114 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: John Stultz <john.stultz@linaro.org>
[ Upstream commit f7bcb70ebae0dcdb5a2d859b09e4465784d99029 ]
It was noted that the 32bit implementation of ktime_divns()
was doing unsigned division and didn't properly handle
negative values.
And when a ktime helper was changed to utilize
ktime_divns, it caused a regression on some IR blasters.
See the following bugzilla for details:
https://bugzilla.redhat.com/show_bug.cgi?id=1200353
This patch fixes the problem in ktime_divns by checking
and preserving the sign bit, and then reapplying it if
appropriate after the division, it also changes the return
type to a s64 to make it more obvious this is expected.
Nicolas also pointed out that negative dividers would
cause infinite loops on 32bit systems, negative dividers
is unlikely for users of this function, but out of caution
this patch adds checks for negative dividers for both
32-bit (BUG_ON) and 64-bit(WARN_ON) versions to make sure
no such use cases creep in.
[ tglx: Hand an u64 to do_div() to avoid the compiler warning ]
Fixes: 166afb64511e 'ktime: Sanitize ktime_to_us/ms conversion'
Reported-and-tested-by: Trevor Cordes <trevor@tecnopolis.ca>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Josh Boyer <jwboyer@redhat.com>
Cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/1431118043-23452-1-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
include/linux/ktime.h | 27 +++++++++++++++++++++------
kernel/time/hrtimer.c | 14 ++++++++------
2 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 411dd8b..039bbe5 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -166,19 +166,34 @@ static inline bool ktime_before(const ktime_t cmp1, const ktime_t cmp2)
}
#if BITS_PER_LONG < 64
-extern u64 __ktime_divns(const ktime_t kt, s64 div);
-static inline u64 ktime_divns(const ktime_t kt, s64 div)
+extern s64 __ktime_divns(const ktime_t kt, s64 div);
+static inline s64 ktime_divns(const ktime_t kt, s64 div)
{
+ /*
+ * Negative divisors could cause an inf loop,
+ * so bug out here.
+ */
+ BUG_ON(div < 0);
if (__builtin_constant_p(div) && !(div >> 32)) {
- u64 ns = kt.tv64;
- do_div(ns, div);
- return ns;
+ s64 ns = kt.tv64;
+ u64 tmp = ns < 0 ? -ns : ns;
+
+ do_div(tmp, div);
+ return ns < 0 ? -tmp : tmp;
} else {
return __ktime_divns(kt, div);
}
}
#else /* BITS_PER_LONG < 64 */
-# define ktime_divns(kt, div) (u64)((kt).tv64 / (div))
+static inline s64 ktime_divns(const ktime_t kt, s64 div)
+{
+ /*
+ * 32-bit implementation cannot handle negative divisors,
+ * so catch them on 64bit as well.
+ */
+ WARN_ON(div < 0);
+ return kt.tv64 / div;
+}
#endif
static inline s64 ktime_to_us(const ktime_t kt)
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 5e4d51c..210b848 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -266,21 +266,23 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
/*
* Divide a ktime value by a nanosecond value
*/
-u64 __ktime_divns(const ktime_t kt, s64 div)
+s64 __ktime_divns(const ktime_t kt, s64 div)
{
- u64 dclc;
int sft = 0;
+ s64 dclc;
+ u64 tmp;
dclc = ktime_to_ns(kt);
+ tmp = dclc < 0 ? -dclc : dclc;
+
/* Make sure the divisor is less than 2^32: */
while (div >> 32) {
sft++;
div >>= 1;
}
- dclc >>= sft;
- do_div(dclc, (unsigned long) div);
-
- return dclc;
+ tmp >>= sft;
+ do_div(tmp, (unsigned long) div);
+ return dclc < 0 ? -tmp : tmp;
}
EXPORT_SYMBOL_GPL(__ktime_divns);
#endif /* BITS_PER_LONG >= 64 */
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 065/178] fs, omfs: add NULL terminator in the end up the token list
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (63 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 064/178] ktime: Fix ktime_divns to do signed division Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 066/178] omfs: fix sign confusion for bitmap loop counter Sasha Levin
` (113 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
[ Upstream commit dcbff39da3d815f08750552fdd04f96b51751129 ]
match_token() expects a NULL terminator at the end of the token list so
that it would know where to stop. Not having one causes it to overrun
to invalid memory.
In practice, passing a mount option that omfs didn't recognize would
sometimes panic the system.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/omfs/inode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
index 138321b..70d4191 100644
--- a/fs/omfs/inode.c
+++ b/fs/omfs/inode.c
@@ -359,7 +359,7 @@ nomem:
}
enum {
- Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask
+ Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask, Opt_err
};
static const match_table_t tokens = {
@@ -368,6 +368,7 @@ static const match_table_t tokens = {
{Opt_umask, "umask=%o"},
{Opt_dmask, "dmask=%o"},
{Opt_fmask, "fmask=%o"},
+ {Opt_err, NULL},
};
static int parse_options(char *options, struct omfs_sb_info *sbi)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 066/178] omfs: fix sign confusion for bitmap loop counter
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (64 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 065/178] fs, omfs: add NULL terminator in the end up the token list Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 067/178] lguest: fix out-by-one error in address checking Sasha Levin
` (112 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Bob Copeland <me@bobcopeland.com>
[ Upstream commit c0345ee57d461343586b5e1e2f9c3c3766d07fe6 ]
The count variable is used to iterate down to (below) zero from the size
of the bitmap and handle the one-filling the remainder of the last
partial bitmap block. The loop conditional expects count to be signed
in order to detect when the final block is processed, after which count
goes negative.
Unfortunately, a recent change made this unsigned along with some other
related fields. The result of is this is that during mount,
omfs_get_imap will overrun the bitmap array and corrupt memory unless
number of blocks happens to be a multiple of 8 * blocksize.
Fix by changing count back to signed: it is guaranteed to fit in an s32
without overflow due to an enforced limit on the number of blocks in the
filesystem.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/omfs/inode.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
index 70d4191..454111a 100644
--- a/fs/omfs/inode.c
+++ b/fs/omfs/inode.c
@@ -306,7 +306,8 @@ static const struct super_operations omfs_sops = {
*/
static int omfs_get_imap(struct super_block *sb)
{
- unsigned int bitmap_size, count, array_size;
+ unsigned int bitmap_size, array_size;
+ int count;
struct omfs_sb_info *sbi = OMFS_SB(sb);
struct buffer_head *bh;
unsigned long **ptr;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 067/178] lguest: fix out-by-one error in address checking.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (65 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 066/178] omfs: fix sign confusion for bitmap loop counter Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 068/178] ovl: mount read-only if workdir can't be created Sasha Levin
` (111 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Rusty Russell <rusty@rustcorp.com.au>
[ Upstream commit 83a35114d0e4583e6b0ca39502e68b6a92e2910c ]
This bug has been there since day 1; addresses in the top guest physical
page weren't considered valid. You could map that page (the check in
check_gpte() is correct), but if a guest tried to put a pagetable there
we'd check that address manually when walking it, and kill the guest.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/lguest/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
index 6590558..ed70f1e 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -173,7 +173,7 @@ static void unmap_switcher(void)
bool lguest_address_ok(const struct lguest *lg,
unsigned long addr, unsigned long len)
{
- return (addr+len) / PAGE_SIZE < lg->pfn_limit && (addr+len >= addr);
+ return addr+len <= lg->pfn_limit * PAGE_SIZE && (addr+len >= addr);
}
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 068/178] ovl: mount read-only if workdir can't be created
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (66 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 067/178] lguest: fix out-by-one error in address checking Sasha Levin
@ 2015-06-08 13:40 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 069/178] xfs: xfs_attr_inactive leaves inconsistent attr fork state behind Sasha Levin
` (110 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:40 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Miklos Szeredi <mszeredi@suse.cz>
[ Upstream commit cc6f67bcafcb6bbbb2d1be1603dcd95125a52800 ]
OpenWRT folks reported that overlayfs fails to mount if upper fs is full,
because workdir can't be created. Wordir creation can fail for various
other reasons too.
There's no reason that the mount itself should fail, overlayfs can work
fine without a workdir, as long as the overlay isn't modified.
So mount it read-only and don't allow remounting read-write.
Add a couple of WARN_ON()s for the impossible case of workdir being used
despite being read-only.
Reported-by: Bastian Bittorf <bittorf@bluebottle.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: <stable@vger.kernel.org> # v3.18+
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/overlayfs/copy_up.c | 3 +++
fs/overlayfs/dir.c | 9 +++++++++
fs/overlayfs/super.c | 22 ++++++++++++++++++++++
3 files changed, 34 insertions(+)
diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
index ea10a87..b7d6dc3 100644
--- a/fs/overlayfs/copy_up.c
+++ b/fs/overlayfs/copy_up.c
@@ -300,6 +300,9 @@ int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry,
struct cred *override_cred;
char *link = NULL;
+ if (WARN_ON(!workdir))
+ return -EROFS;
+
ovl_path_upper(parent, &parentpath);
upperdir = parentpath.dentry;
diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
index 8ffc4b9..00d6583 100644
--- a/fs/overlayfs/dir.c
+++ b/fs/overlayfs/dir.c
@@ -222,6 +222,9 @@ static struct dentry *ovl_clear_empty(struct dentry *dentry,
struct kstat stat;
int err;
+ if (WARN_ON(!workdir))
+ return ERR_PTR(-EROFS);
+
err = ovl_lock_rename_workdir(workdir, upperdir);
if (err)
goto out;
@@ -322,6 +325,9 @@ static int ovl_create_over_whiteout(struct dentry *dentry, struct inode *inode,
struct dentry *newdentry;
int err;
+ if (WARN_ON(!workdir))
+ return -EROFS;
+
err = ovl_lock_rename_workdir(workdir, upperdir);
if (err)
goto out;
@@ -506,6 +512,9 @@ static int ovl_remove_and_whiteout(struct dentry *dentry, bool is_dir)
struct dentry *opaquedir = NULL;
int err;
+ if (WARN_ON(!workdir))
+ return -EROFS;
+
if (is_dir) {
opaquedir = ovl_check_empty_and_clear(dentry);
err = PTR_ERR(opaquedir);
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index f16d318..e2c21a5 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -723,11 +723,30 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
goto out_put_workpath;
}
+<<<<<<< HEAD
ufs->upper_mnt = clone_private_mount(&upperpath);
err = PTR_ERR(ufs->upper_mnt);
if (IS_ERR(ufs->upper_mnt)) {
pr_err("overlayfs: failed to clone upperpath\n");
goto out_put_workpath;
+=======
+ if (ufs->config.upperdir) {
+ ufs->upper_mnt = clone_private_mount(&upperpath);
+ err = PTR_ERR(ufs->upper_mnt);
+ if (IS_ERR(ufs->upper_mnt)) {
+ pr_err("overlayfs: failed to clone upperpath\n");
+ goto out_put_lowerpath;
+ }
+
+ ufs->workdir = ovl_workdir_create(ufs->upper_mnt, workpath.dentry);
+ err = PTR_ERR(ufs->workdir);
+ if (IS_ERR(ufs->workdir)) {
+ pr_warn("overlayfs: failed to create directory %s/%s (errno: %i); mounting read-only\n",
+ ufs->config.workdir, OVL_WORKDIR_NAME, -err);
+ sb->s_flags |= MS_RDONLY;
+ ufs->workdir = NULL;
+ }
+>>>>>>> 2577f42... ovl: mount read-only if workdir can't be created
}
ufs->lower_mnt = clone_private_mount(&lowerpath);
@@ -784,9 +803,12 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
out_put_workdir:
dput(ufs->workdir);
+<<<<<<< HEAD
out_put_lower_mnt:
mntput(ufs->lower_mnt);
out_put_upper_mnt:
+=======
+>>>>>>> 2577f42... ovl: mount read-only if workdir can't be created
mntput(ufs->upper_mnt);
out_put_workpath:
path_put(&workpath);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 069/178] xfs: xfs_attr_inactive leaves inconsistent attr fork state behind
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (67 preceding siblings ...)
2015-06-08 13:40 ` [PATCH 3.18 068/178] ovl: mount read-only if workdir can't be created Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 070/178] xfs: xfs_iozero can return positive errno Sasha Levin
` (109 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Dave Chinner <dchinner@redhat.com>
[ Upstream commit 6dfe5a049f2d48582050339d2a6b6fda36dfd14c ]
xfs_attr_inactive() is supposed to clean up the attribute fork when
the inode is being freed. While it removes attribute fork extents,
it completely ignores attributes in local format, which means that
there can still be active attributes on the inode after
xfs_attr_inactive() has run.
This leads to problems with concurrent inode writeback - the in-core
inode attribute fork is removed without locking on the assumption
that nothing will be attempting to access the attribute fork after a
call to xfs_attr_inactive() because it isn't supposed to exist on
disk any more.
To fix this, make xfs_attr_inactive() completely remove all traces
of the attribute fork from the inode, regardless of it's state.
Further, also remove the in-core attribute fork structure safely so
that there is nothing further that needs to be done by callers to
clean up the attribute fork. This means we can remove the in-core
and on-disk attribute forks atomically.
Also, on error simply remove the in-memory attribute fork. There's
nothing that can be done with it once we have failed to remove the
on-disk attribute fork, so we may as well just blow it away here
anyway.
cc: <stable@vger.kernel.org> # 3.12 to 4.0
Reported-by: Waiman Long <waiman.long@hp.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/xfs/libxfs/xfs_attr_leaf.c | 8 ++---
fs/xfs/libxfs/xfs_attr_leaf.h | 2 +-
fs/xfs/xfs_attr_inactive.c | 83 +++++++++++++++++++++++++------------------
fs/xfs/xfs_inode.c | 12 +++----
4 files changed, 58 insertions(+), 47 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
index b1f73db..b7cd0a0 100644
--- a/fs/xfs/libxfs/xfs_attr_leaf.c
+++ b/fs/xfs/libxfs/xfs_attr_leaf.c
@@ -500,8 +500,8 @@ xfs_attr_shortform_add(xfs_da_args_t *args, int forkoff)
* After the last attribute is removed revert to original inode format,
* making all literal area available to the data fork once more.
*/
-STATIC void
-xfs_attr_fork_reset(
+void
+xfs_attr_fork_remove(
struct xfs_inode *ip,
struct xfs_trans *tp)
{
@@ -567,7 +567,7 @@ xfs_attr_shortform_remove(xfs_da_args_t *args)
(mp->m_flags & XFS_MOUNT_ATTR2) &&
(dp->i_d.di_format != XFS_DINODE_FMT_BTREE) &&
!(args->op_flags & XFS_DA_OP_ADDNAME)) {
- xfs_attr_fork_reset(dp, args->trans);
+ xfs_attr_fork_remove(dp, args->trans);
} else {
xfs_idata_realloc(dp, -size, XFS_ATTR_FORK);
dp->i_d.di_forkoff = xfs_attr_shortform_bytesfit(dp, totsize);
@@ -830,7 +830,7 @@ xfs_attr3_leaf_to_shortform(
if (forkoff == -1) {
ASSERT(dp->i_mount->m_flags & XFS_MOUNT_ATTR2);
ASSERT(dp->i_d.di_format != XFS_DINODE_FMT_BTREE);
- xfs_attr_fork_reset(dp, args->trans);
+ xfs_attr_fork_remove(dp, args->trans);
goto out;
}
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.h b/fs/xfs/libxfs/xfs_attr_leaf.h
index e2929da..4f3a60a 100644
--- a/fs/xfs/libxfs/xfs_attr_leaf.h
+++ b/fs/xfs/libxfs/xfs_attr_leaf.h
@@ -53,7 +53,7 @@ int xfs_attr_shortform_remove(struct xfs_da_args *args);
int xfs_attr_shortform_list(struct xfs_attr_list_context *context);
int xfs_attr_shortform_allfit(struct xfs_buf *bp, struct xfs_inode *dp);
int xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes);
-
+void xfs_attr_fork_remove(struct xfs_inode *ip, struct xfs_trans *tp);
/*
* Internal routines when attribute fork size == XFS_LBSIZE(mp).
diff --git a/fs/xfs/xfs_attr_inactive.c b/fs/xfs/xfs_attr_inactive.c
index aa2a8b1..0687b67 100644
--- a/fs/xfs/xfs_attr_inactive.c
+++ b/fs/xfs/xfs_attr_inactive.c
@@ -382,23 +382,31 @@ xfs_attr3_root_inactive(
return error;
}
+/*
+ * xfs_attr_inactive kills all traces of an attribute fork on an inode. It
+ * removes both the on-disk and in-memory inode fork. Note that this also has to
+ * handle the condition of inodes without attributes but with an attribute fork
+ * configured, so we can't use xfs_inode_hasattr() here.
+ *
+ * The in-memory attribute fork is removed even on error.
+ */
int
-xfs_attr_inactive(xfs_inode_t *dp)
+xfs_attr_inactive(
+ struct xfs_inode *dp)
{
- xfs_trans_t *trans;
- xfs_mount_t *mp;
- int error;
+ struct xfs_trans *trans;
+ struct xfs_mount *mp;
+ int cancel_flags = 0;
+ int lock_mode = XFS_ILOCK_SHARED;
+ int error = 0;
mp = dp->i_mount;
ASSERT(! XFS_NOT_DQATTACHED(mp, dp));
- xfs_ilock(dp, XFS_ILOCK_SHARED);
- if (!xfs_inode_hasattr(dp) ||
- dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) {
- xfs_iunlock(dp, XFS_ILOCK_SHARED);
- return 0;
- }
- xfs_iunlock(dp, XFS_ILOCK_SHARED);
+ xfs_ilock(dp, lock_mode);
+ if (!XFS_IFORK_Q(dp))
+ goto out_destroy_fork;
+ xfs_iunlock(dp, lock_mode);
/*
* Start our first transaction of the day.
@@ -410,13 +418,18 @@ xfs_attr_inactive(xfs_inode_t *dp)
* the inode in every transaction to let it float upward through
* the log.
*/
+ lock_mode = 0;
trans = xfs_trans_alloc(mp, XFS_TRANS_ATTRINVAL);
error = xfs_trans_reserve(trans, &M_RES(mp)->tr_attrinval, 0, 0);
- if (error) {
- xfs_trans_cancel(trans, 0);
- return error;
- }
- xfs_ilock(dp, XFS_ILOCK_EXCL);
+ if (error)
+ goto out_cancel;
+
+ lock_mode = XFS_ILOCK_EXCL;
+ cancel_flags = XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT;
+ xfs_ilock(dp, lock_mode);
+
+ if (!XFS_IFORK_Q(dp))
+ goto out_cancel;
/*
* No need to make quota reservations here. We expect to release some
@@ -424,29 +437,31 @@ xfs_attr_inactive(xfs_inode_t *dp)
*/
xfs_trans_ijoin(trans, dp, 0);
- /*
- * Decide on what work routines to call based on the inode size.
- */
- if (!xfs_inode_hasattr(dp) ||
- dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) {
- error = 0;
- goto out;
+ /* invalidate and truncate the attribute fork extents */
+ if (dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
+ error = xfs_attr3_root_inactive(&trans, dp);
+ if (error)
+ goto out_cancel;
+
+ error = xfs_itruncate_extents(&trans, dp, XFS_ATTR_FORK, 0);
+ if (error)
+ goto out_cancel;
}
- error = xfs_attr3_root_inactive(&trans, dp);
- if (error)
- goto out;
- error = xfs_itruncate_extents(&trans, dp, XFS_ATTR_FORK, 0);
- if (error)
- goto out;
+ /* Reset the attribute fork - this also destroys the in-core fork */
+ xfs_attr_fork_remove(dp, trans);
error = xfs_trans_commit(trans, XFS_TRANS_RELEASE_LOG_RES);
- xfs_iunlock(dp, XFS_ILOCK_EXCL);
-
+ xfs_iunlock(dp, lock_mode);
return error;
-out:
- xfs_trans_cancel(trans, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT);
- xfs_iunlock(dp, XFS_ILOCK_EXCL);
+out_cancel:
+ xfs_trans_cancel(trans, cancel_flags);
+out_destroy_fork:
+ /* kill the in-core attr fork before we drop the inode lock */
+ if (dp->i_afp)
+ xfs_idestroy_fork(dp, XFS_ATTR_FORK);
+ if (lock_mode)
+ xfs_iunlock(dp, lock_mode);
return error;
}
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 3cc309a..32e95c7 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1894,21 +1894,17 @@ xfs_inactive(
/*
* If there are attributes associated with the file then blow them away
* now. The code calls a routine that recursively deconstructs the
- * attribute fork. We need to just commit the current transaction
- * because we can't use it for xfs_attr_inactive().
+ * attribute fork. If also blows away the in-core attribute fork.
*/
- if (ip->i_d.di_anextents > 0) {
- ASSERT(ip->i_d.di_forkoff != 0);
-
+ if (XFS_IFORK_Q(ip)) {
error = xfs_attr_inactive(ip);
if (error)
return;
}
- if (ip->i_afp)
- xfs_idestroy_fork(ip, XFS_ATTR_FORK);
-
+ ASSERT(!ip->i_afp);
ASSERT(ip->i_d.di_anextents == 0);
+ ASSERT(ip->i_d.di_forkoff == 0);
/*
* Free the inode.
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 070/178] xfs: xfs_iozero can return positive errno
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (68 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 069/178] xfs: xfs_attr_inactive leaves inconsistent attr fork state behind Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 071/178] Revert "libceph: clear r_req_lru_item in __unregister_linger_request()" Sasha Levin
` (108 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Dave Chinner <dchinner@redhat.com>
[ Upstream commit cddc116228cb9d51d3224d23ba3e61fbbc3ec3d2 ]
It was missed when we converted everything in XFs to use negative error
numbers, so fix it now. Bug introduced in 3.17 by commit 2451337 ("xfs: global
error sign conversion"), and should go back to stable kernels.
Thanks to Brian Foster for noticing it.
cc: <stable@vger.kernel.org> # 3.17, 3.18, 3.19, 4.0
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/xfs/xfs_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index b28f0d6..ba8b158 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -127,7 +127,7 @@ xfs_iozero(
status = 0;
} while (count);
- return (-status);
+ return status;
}
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 071/178] Revert "libceph: clear r_req_lru_item in __unregister_linger_request()"
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (69 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 070/178] xfs: xfs_iozero can return positive errno Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 072/178] " Sasha Levin
` (107 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ilya Dryomov <idryomov@gmail.com>
[ Upstream commit 521a04d06a729e5971cdee7f84080387ed320527 ]
This reverts commit ba9d114ec5578e6e99a4dfa37ff8ae688040fd64.
.. which introduced a regression that prevented all lingering requests
requeued in kick_requests() from ever being sent to the OSDs, resulting
in a lot of missed notifies. In retrospect it's pretty obvious that
r_req_lru_item item in the case of lingering requests can be used not
only for notarget, but also for unsent linkage due to how tightly
actual map and enqueue operations are coupled in __map_request().
The assertion that was being silenced is taken care of in the previous
("libceph: request a new osdmap if lingering request maps to no osd")
commit: by always kicking homeless lingering requests we ensure that
none of them ends up on the notarget list outside of the critical
section guarded by request_mutex.
Cc: stable@vger.kernel.org # 3.18+, needs b0494532214b "libceph: request a new osdmap if lingering request maps to no osd"
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
net/ceph/osd_client.c | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index b0cf1f2..46309ae 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1974,20 +1974,29 @@ static void kick_requests(struct ceph_osd_client *osdc, bool force_resend,
err = __map_request(osdc, req,
force_resend || force_resend_writes);
dout("__map_request returned %d\n", err);
- if (err == 0)
- continue; /* no change and no osd was specified */
if (err < 0)
continue; /* hrm! */
- if (req->r_osd == NULL) {
- dout("tid %llu maps to no valid osd\n", req->r_tid);
- needmap++; /* request a newer map */
- continue;
- }
+ if (req->r_osd == NULL || err > 0) {
+ if (req->r_osd == NULL) {
+ dout("lingering %p tid %llu maps to no osd\n",
+ req, req->r_tid);
+ /*
+ * A homeless lingering request makes
+ * no sense, as it's job is to keep
+ * a particular OSD connection open.
+ * Request a newer map and kick the
+ * request, knowing that it won't be
+ * resent until we actually get a map
+ * that can tell us where to send it.
+ */
+ needmap++;
+ }
- dout("kicking lingering %p tid %llu osd%d\n", req, req->r_tid,
- req->r_osd ? req->r_osd->o_osd : -1);
- __register_request(osdc, req);
- __unregister_linger_request(osdc, req);
+ dout("kicking lingering %p tid %llu osd%d\n", req,
+ req->r_tid, req->r_osd ? req->r_osd->o_osd : -1);
+ __register_request(osdc, req);
+ __unregister_linger_request(osdc, req);
+ }
}
reset_changed_osds(osdc);
mutex_unlock(&osdc->request_mutex);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 072/178] Revert "libceph: clear r_req_lru_item in __unregister_linger_request()"
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (70 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 071/178] Revert "libceph: clear r_req_lru_item in __unregister_linger_request()" Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 073/178] xen/events: don't bind non-percpu VIRQs with percpu chip Sasha Levin
` (106 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ilya Dryomov <idryomov@gmail.com>
[ Upstream commit 521a04d06a729e5971cdee7f84080387ed320527 ]
This reverts commit ba9d114ec5578e6e99a4dfa37ff8ae688040fd64.
.. which introduced a regression that prevented all lingering requests
requeued in kick_requests() from ever being sent to the OSDs, resulting
in a lot of missed notifies. In retrospect it's pretty obvious that
r_req_lru_item item in the case of lingering requests can be used not
only for notarget, but also for unsent linkage due to how tightly
actual map and enqueue operations are coupled in __map_request().
The assertion that was being silenced is taken care of in the previous
("libceph: request a new osdmap if lingering request maps to no osd")
commit: by always kicking homeless lingering requests we ensure that
none of them ends up on the notarget list outside of the critical
section guarded by request_mutex.
Cc: stable@vger.kernel.org # 3.18+, needs b0494532214b "libceph: request a new osdmap if lingering request maps to no osd"
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
net/ceph/osd_client.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 46309ae..e242f96 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1263,8 +1263,6 @@ static void __unregister_linger_request(struct ceph_osd_client *osdc,
if (list_empty(&req->r_osd_item))
req->r_osd = NULL;
}
-
- list_del_init(&req->r_req_lru_item); /* can be on notarget */
ceph_osdc_put_request(req);
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 073/178] xen/events: don't bind non-percpu VIRQs with percpu chip
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (71 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 072/178] " Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 074/178] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Sasha Levin
` (105 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: David Vrabel <david.vrabel@citrix.com>
[ Upstream commit 77bb3dfdc0d554befad58fdefbc41be5bc3ed38a ]
A non-percpu VIRQ (e.g., VIRQ_CONSOLE) may be freed on a different
VCPU than it is bound to. This can result in a race between
handle_percpu_irq() and removing the action in __free_irq() because
handle_percpu_irq() does not take desc->lock. The interrupt handler
sees a NULL action and oopses.
Only use the percpu chip/handler for per-CPU VIRQs (like VIRQ_TIMER).
# cat /proc/interrupts | grep virq
40: 87246 0 xen-percpu-virq timer0
44: 0 0 xen-percpu-virq debug0
47: 0 20995 xen-percpu-virq timer1
51: 0 0 xen-percpu-virq debug1
69: 0 0 xen-dyn-virq xen-pcpu
74: 0 0 xen-dyn-virq mce
75: 29 0 xen-dyn-virq hvc_console
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/tty/hvc/hvc_xen.c | 2 +-
drivers/xen/events/events_base.c | 12 ++++++++----
include/xen/events.h | 2 +-
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index 5bab1c6..7a3d146 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -289,7 +289,7 @@ static int xen_initial_domain_console_init(void)
return -ENOMEM;
}
- info->irq = bind_virq_to_irq(VIRQ_CONSOLE, 0);
+ info->irq = bind_virq_to_irq(VIRQ_CONSOLE, 0, false);
info->vtermno = HVC_COOKIE;
spin_lock(&xencons_lock);
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index 2b8553b..3838795 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -957,7 +957,7 @@ unsigned xen_evtchn_nr_channels(void)
}
EXPORT_SYMBOL_GPL(xen_evtchn_nr_channels);
-int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
+int bind_virq_to_irq(unsigned int virq, unsigned int cpu, bool percpu)
{
struct evtchn_bind_virq bind_virq;
int evtchn, irq, ret;
@@ -971,8 +971,12 @@ int bind_virq_to_irq(unsigned int virq, unsigned int cpu)
if (irq < 0)
goto out;
- irq_set_chip_and_handler_name(irq, &xen_percpu_chip,
- handle_percpu_irq, "virq");
+ if (percpu)
+ irq_set_chip_and_handler_name(irq, &xen_percpu_chip,
+ handle_percpu_irq, "virq");
+ else
+ irq_set_chip_and_handler_name(irq, &xen_dynamic_chip,
+ handle_edge_irq, "virq");
bind_virq.virq = virq;
bind_virq.vcpu = cpu;
@@ -1062,7 +1066,7 @@ int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu,
{
int irq, retval;
- irq = bind_virq_to_irq(virq, cpu);
+ irq = bind_virq_to_irq(virq, cpu, irqflags & IRQF_PERCPU);
if (irq < 0)
return irq;
retval = request_irq(irq, handler, irqflags, devname, dev_id);
diff --git a/include/xen/events.h b/include/xen/events.h
index 5321cd9..7d95fdf 100644
--- a/include/xen/events.h
+++ b/include/xen/events.h
@@ -17,7 +17,7 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn,
irq_handler_t handler,
unsigned long irqflags, const char *devname,
void *dev_id);
-int bind_virq_to_irq(unsigned int virq, unsigned int cpu);
+int bind_virq_to_irq(unsigned int virq, unsigned int cpu, bool percpu);
int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu,
irq_handler_t handler,
unsigned long irqflags, const char *devname,
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 074/178] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (72 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 073/178] xen/events: don't bind non-percpu VIRQs with percpu chip Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 075/178] iio:st_sensors: Fix oops when probing SPI devices Sasha Levin
` (104 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Chris Lesiak <chris.lesiak@licor.com>
[ Upstream commit adba657533bdd255f7b78bc8a324091f46b294cd ]
When configured via device tree, the associated iio device needs to be
measuring voltage for the conversion to resistance to be correct.
Return -EINVAL if that is not the case.
Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/hwmon/ntc_thermistor.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index 4ff89b2..31597c5 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -239,8 +239,10 @@ static struct ntc_thermistor_platform_data *
ntc_thermistor_parse_dt(struct platform_device *pdev)
{
struct iio_channel *chan;
+ enum iio_chan_type type;
struct device_node *np = pdev->dev.of_node;
struct ntc_thermistor_platform_data *pdata;
+ int ret;
if (!np)
return NULL;
@@ -253,6 +255,13 @@ ntc_thermistor_parse_dt(struct platform_device *pdev)
if (IS_ERR(chan))
return ERR_CAST(chan);
+ ret = iio_get_channel_type(chan, &type);
+ if (ret < 0)
+ return ERR_PTR(ret);
+
+ if (type != IIO_VOLTAGE)
+ return ERR_PTR(-EINVAL);
+
if (of_property_read_u32(np, "pullup-uv", &pdata->pullup_uv))
return ERR_PTR(-ENODEV);
if (of_property_read_u32(np, "pullup-ohm", &pdata->pullup_ohm))
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 075/178] iio:st_sensors: Fix oops when probing SPI devices
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (73 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 074/178] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 076/178] iio: light: hid-sensor-prox: Fix modifier Sasha Levin
` (103 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Alban Bedel <alban.bedel@avionic-design.de>
[ Upstream commit 8e71c04f863a1754f21b27fb8ecb773d680a0a80 ]
In SPI mode the transfer buffer is locked with a mutex. However this
mutex is only initilized after the probe, but some transfer needs to
be done in the probe.
To fix this bug we move the mutex initialization at the beginning of
the device probe.
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Acked-by: Denis Ciocca <denis.ciocca@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/iio/accel/st_accel_core.c | 1 +
drivers/iio/common/st_sensors/st_sensors_core.c | 2 --
drivers/iio/gyro/st_gyro_core.c | 1 +
drivers/iio/magnetometer/st_magn_core.c | 1 +
drivers/iio/pressure/st_pressure_core.c | 1 +
5 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 0878648..7860126 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -466,6 +466,7 @@ int st_accel_common_probe(struct iio_dev *indio_dev,
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &accel_info;
+ mutex_init(&adata->tb.buf_lock);
st_sensors_power_enable(indio_dev);
diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
index 24cfe4e..816a2b4 100644
--- a/drivers/iio/common/st_sensors/st_sensors_core.c
+++ b/drivers/iio/common/st_sensors/st_sensors_core.c
@@ -299,8 +299,6 @@ int st_sensors_init_sensor(struct iio_dev *indio_dev,
struct st_sensors_platform_data *of_pdata;
int err = 0;
- mutex_init(&sdata->tb.buf_lock);
-
/* If OF/DT pdata exists, it will take precedence of anything else */
of_pdata = st_sensors_of_probe(indio_dev->dev.parent, pdata);
if (of_pdata)
diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c
index f156fc6..f22ef2f 100644
--- a/drivers/iio/gyro/st_gyro_core.c
+++ b/drivers/iio/gyro/st_gyro_core.c
@@ -318,6 +318,7 @@ int st_gyro_common_probe(struct iio_dev *indio_dev,
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &gyro_info;
+ mutex_init(&gdata->tb.buf_lock);
st_sensors_power_enable(indio_dev);
diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
index 68cae86..08b8dc7 100644
--- a/drivers/iio/magnetometer/st_magn_core.c
+++ b/drivers/iio/magnetometer/st_magn_core.c
@@ -370,6 +370,7 @@ int st_magn_common_probe(struct iio_dev *indio_dev,
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &magn_info;
+ mutex_init(&mdata->tb.buf_lock);
st_sensors_power_enable(indio_dev);
diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
index 473d914e..dcd8be3 100644
--- a/drivers/iio/pressure/st_pressure_core.c
+++ b/drivers/iio/pressure/st_pressure_core.c
@@ -418,6 +418,7 @@ int st_press_common_probe(struct iio_dev *indio_dev,
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &press_info;
+ mutex_init(&press_data->tb.buf_lock);
st_sensors_power_enable(indio_dev);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 076/178] iio: light: hid-sensor-prox: Fix modifier
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (74 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 075/178] iio:st_sensors: Fix oops when probing SPI devices Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 077/178] iio: pressure: hid-sensor-press: " Sasha Levin
` (102 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ Upstream commit c2aab3d58b96002555a3e70004f593b043830248 ]
Currently in_proximity_(null)_raw is getting presented as raw sysfs
attribute. Same with the scan_elements.
The modifier doesn't apply to this channel.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/iio/light/hid-sensor-prox.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/light/hid-sensor-prox.c b/drivers/iio/light/hid-sensor-prox.c
index f5a5146..d403c98 100644
--- a/drivers/iio/light/hid-sensor-prox.c
+++ b/drivers/iio/light/hid-sensor-prox.c
@@ -43,8 +43,6 @@ struct prox_state {
static const struct iio_chan_spec prox_channels[] = {
{
.type = IIO_PROXIMITY,
- .modified = 1,
- .channel2 = IIO_NO_MOD,
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
BIT(IIO_CHAN_INFO_SCALE) |
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 077/178] iio: pressure: hid-sensor-press: Fix modifier
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (75 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 076/178] iio: light: hid-sensor-prox: Fix modifier Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 078/178] iio: adc: xilinx: Fix register addresses Sasha Levin
` (101 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ Upstream commit 964e2255f1d73fc0136bc206a78a1f86bdad72a7 ]
Fix "null" in the raw attribute and scan elements.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/iio/pressure/hid-sensor-press.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/iio/pressure/hid-sensor-press.c b/drivers/iio/pressure/hid-sensor-press.c
index 7649286..127db53 100644
--- a/drivers/iio/pressure/hid-sensor-press.c
+++ b/drivers/iio/pressure/hid-sensor-press.c
@@ -47,8 +47,6 @@ struct press_state {
static const struct iio_chan_spec press_channels[] = {
{
.type = IIO_PRESSURE,
- .modified = 1,
- .channel2 = IIO_NO_MOD,
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_OFFSET) |
BIT(IIO_CHAN_INFO_SCALE) |
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 078/178] iio: adc: xilinx: Fix register addresses
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (76 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 077/178] iio: pressure: hid-sensor-press: " Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 079/178] iio: adc: xilinx: Fix "vccaux" channel .address Sasha Levin
` (100 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Thomas Betker <thomas.betker@rohde-schwarz.com>
[ Upstream commit 3960d2c0c4aafe98da47a4a2eb64dfa8e88d8df5 ]
Define the register addresses for MIN_VCCPINT, MIN_VCCPAUX, MIN_VCCO_DDR
correctly.
Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/iio/adc/xilinx-xadc.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/xilinx-xadc.h b/drivers/iio/adc/xilinx-xadc.h
index c7487e8..54adc50 100644
--- a/drivers/iio/adc/xilinx-xadc.h
+++ b/drivers/iio/adc/xilinx-xadc.h
@@ -145,9 +145,9 @@ static inline int xadc_write_adc_reg(struct xadc *xadc, unsigned int reg,
#define XADC_REG_MAX_VCCPINT 0x28
#define XADC_REG_MAX_VCCPAUX 0x29
#define XADC_REG_MAX_VCCO_DDR 0x2a
-#define XADC_REG_MIN_VCCPINT 0x2b
-#define XADC_REG_MIN_VCCPAUX 0x2c
-#define XADC_REG_MIN_VCCO_DDR 0x2d
+#define XADC_REG_MIN_VCCPINT 0x2c
+#define XADC_REG_MIN_VCCPAUX 0x2d
+#define XADC_REG_MIN_VCCO_DDR 0x2e
#define XADC_REG_CONF0 0x40
#define XADC_REG_CONF1 0x41
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 079/178] iio: adc: xilinx: Fix "vccaux" channel .address
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (77 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 078/178] iio: adc: xilinx: Fix register addresses Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 080/178] iio: adc: xilinx: Fix VREFP scale Sasha Levin
` (99 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Thomas Betker <thomas.betker@rohde-schwarz.com>
[ Upstream commit d6c96c42283601e311a7a1a3d7e51cde9d7fdb6e ]
For the "vccaux" channel, read the VCCAUX register, not VCCINT.
Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/iio/adc/xilinx-xadc-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index a221f73..0ad7b50 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -1008,7 +1008,7 @@ static const struct iio_event_spec xadc_voltage_events[] = {
static const struct iio_chan_spec xadc_channels[] = {
XADC_CHAN_TEMP(0, 8, XADC_REG_TEMP),
XADC_CHAN_VOLTAGE(0, 9, XADC_REG_VCCINT, "vccint", true),
- XADC_CHAN_VOLTAGE(1, 10, XADC_REG_VCCINT, "vccaux", true),
+ XADC_CHAN_VOLTAGE(1, 10, XADC_REG_VCCAUX, "vccaux", true),
XADC_CHAN_VOLTAGE(2, 14, XADC_REG_VCCBRAM, "vccbram", true),
XADC_CHAN_VOLTAGE(3, 5, XADC_REG_VCCPINT, "vccpint", true),
XADC_CHAN_VOLTAGE(4, 6, XADC_REG_VCCPAUX, "vccpaux", true),
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 080/178] iio: adc: xilinx: Fix VREFP scale
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (78 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 079/178] iio: adc: xilinx: Fix "vccaux" channel .address Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 081/178] iio: adc: xilinx: Fix VREFN sign Sasha Levin
` (98 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Thomas Betker <thomas.betker@rohde-schwarz.com>
[ Upstream commit 00db4e52f4541965f7fda225eb458a75f892017b ]
The scaling factor for VREFP is 3.0/4096, not 1.0/4096; fix this to get
correct readings.
Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/iio/adc/xilinx-xadc-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index 0ad7b50..6fa629b 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -856,6 +856,7 @@ static int xadc_read_raw(struct iio_dev *indio_dev,
switch (chan->address) {
case XADC_REG_VCCINT:
case XADC_REG_VCCAUX:
+ case XADC_REG_VREFP:
case XADC_REG_VCCBRAM:
case XADC_REG_VCCPINT:
case XADC_REG_VCCPAUX:
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 081/178] iio: adc: xilinx: Fix VREFN sign
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (79 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 080/178] iio: adc: xilinx: Fix VREFP scale Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 082/178] hwmon: (nct6775) Add missing sysfs attribute initialization Sasha Levin
` (97 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Thomas Betker <thomas.betker@rohde-schwarz.com>
[ Upstream commit 97ffae1d30c3f6ceee67d5b0d3e540c08c13c744 ]
The VREFN channel is bipolar, not unipolar. Small negative values do
occur (e.g., -1mV), and unsigned conversion maps them incorrectly to
large positive values (about +1V), so fix this.
Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/iio/adc/xilinx-xadc-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/xilinx-xadc-core.c b/drivers/iio/adc/xilinx-xadc-core.c
index 6fa629b..ce93bd8 100644
--- a/drivers/iio/adc/xilinx-xadc-core.c
+++ b/drivers/iio/adc/xilinx-xadc-core.c
@@ -997,7 +997,7 @@ static const struct iio_event_spec xadc_voltage_events[] = {
.num_event_specs = (_alarm) ? ARRAY_SIZE(xadc_voltage_events) : 0, \
.scan_index = (_scan_index), \
.scan_type = { \
- .sign = 'u', \
+ .sign = ((_addr) == XADC_REG_VREFN) ? 's' : 'u', \
.realbits = 12, \
.storagebits = 16, \
.shift = 4, \
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 082/178] hwmon: (nct6775) Add missing sysfs attribute initialization
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (80 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 081/178] iio: adc: xilinx: Fix VREFN sign Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 083/178] hwmon: (nct6683) " Sasha Levin
` (96 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit 1b63bf617206ff35b93c57c67bbe067ac735a85a ]
The following error message is seen when loading the nct6775 driver
with DEBUG_LOCK_ALLOC enabled.
BUG: key ffff88040b2f0030 not in .data!
------------[ cut here ]------------
WARNING: CPU: 0 PID: 186 at kernel/locking/lockdep.c:2988
lockdep_init_map+0x469/0x630()
DEBUG_LOCKS_WARN_ON(1)
Caused by a missing call to sysfs_attr_init() when initializing
sysfs attributes.
Reported-by: Alexey Orishko <alexey.orishko@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Cc: stable@vger.kernel.org # v3.12+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/hwmon/nct6775.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
index 504cbdd..6461964 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
@@ -985,6 +985,7 @@ nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg,
(*t)->dev_attr.attr.name, tg->base + i);
if ((*t)->s2) {
a2 = &su->u.a2;
+ sysfs_attr_init(&a2->dev_attr.attr);
a2->dev_attr.attr.name = su->name;
a2->nr = (*t)->u.s.nr + i;
a2->index = (*t)->u.s.index;
@@ -995,6 +996,7 @@ nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg,
*attrs = &a2->dev_attr.attr;
} else {
a = &su->u.a1;
+ sysfs_attr_init(&a->dev_attr.attr);
a->dev_attr.attr.name = su->name;
a->index = (*t)->u.index + i;
a->dev_attr.attr.mode =
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 083/178] hwmon: (nct6683) Add missing sysfs attribute initialization
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (81 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 082/178] hwmon: (nct6775) Add missing sysfs attribute initialization Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 084/178] lib: Fix strnlen_user() to not touch memory after specified maximum Sasha Levin
` (95 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Guenter Roeck <linux@roeck-us.net>
[ Upstream commit c7bd6dc320b85445b6b36a0aff41f929210027c7 ]
The following error message is seen when loading the nct6683 driver
with DEBUG_LOCK_ALLOC enabled.
BUG: key ffff88040b2f0030 not in .data!
------------[ cut here ]------------
WARNING: CPU: 0 PID: 186 at kernel/locking/lockdep.c:2988
lockdep_init_map+0x469/0x630()
DEBUG_LOCKS_WARN_ON(1)
Caused by a missing call to sysfs_attr_init() when initializing
sysfs attributes.
Reported-by: Alexey Orishko <alexey.orishko@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Cc: stable@vger.kernel.org # v3.18+
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/hwmon/nct6683.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
index 7710f46..718953b 100644
--- a/drivers/hwmon/nct6683.c
+++ b/drivers/hwmon/nct6683.c
@@ -439,6 +439,7 @@ nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg,
(*t)->dev_attr.attr.name, tg->base + i);
if ((*t)->s2) {
a2 = &su->u.a2;
+ sysfs_attr_init(&a2->dev_attr.attr);
a2->dev_attr.attr.name = su->name;
a2->nr = (*t)->u.s.nr + i;
a2->index = (*t)->u.s.index;
@@ -449,6 +450,7 @@ nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg,
*attrs = &a2->dev_attr.attr;
} else {
a = &su->u.a1;
+ sysfs_attr_init(&a->dev_attr.attr);
a->dev_attr.attr.name = su->name;
a->index = (*t)->u.index + i;
a->dev_attr.attr.mode =
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 084/178] lib: Fix strnlen_user() to not touch memory after specified maximum
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (82 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 083/178] hwmon: (nct6683) " Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 085/178] d_walk() might skip too much Sasha Levin
` (94 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Jan Kara <jack@suse.cz>
[ Upstream commit f18c34e483ff6b1d9866472221e4015b3a4698e4 ]
If the specified maximum length of the string is a multiple of unsigned
long, we would load one long behind the specified maximum. If that
happens to be in a next page, we can hit a page fault although we were
not expected to.
Fix the off-by-one bug in the test whether we are at the end of the
specified range.
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
lib/strnlen_user.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
index a28df52..1164961 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -57,7 +57,8 @@ static inline long do_strnlen_user(const char __user *src, unsigned long count,
return res + find_zero(data) + 1 - align;
}
res += sizeof(unsigned long);
- if (unlikely(max < sizeof(unsigned long)))
+ /* We already handled 'unsigned long' bytes. Did we do it all ? */
+ if (unlikely(max <= sizeof(unsigned long)))
break;
max -= sizeof(unsigned long);
if (unlikely(__get_user(c,(unsigned long __user *)(src+res))))
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 085/178] d_walk() might skip too much
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (83 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 084/178] lib: Fix strnlen_user() to not touch memory after specified maximum Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 086/178] module: Call module notifier on failure after complete_formation() Sasha Levin
` (93 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Al Viro <viro@zeniv.linux.org.uk>
[ Upstream commit 2159184ea01e4ae7d15f2017e296d4bc82d5aeb0 ]
when we find that a child has died while we'd been trying to ascend,
we should go into the first live sibling itself, rather than its sibling.
Off-by-one in question had been introduced in "deal with deadlock in
d_walk()" and the fix needs to be backported to all branches this one
has been backported to.
Cc: stable@vger.kernel.org # 3.2 and later
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/dcache.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/dcache.c b/fs/dcache.c
index 03dca3c..e0750b8 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1094,13 +1094,13 @@ ascend:
/* might go back up the wrong parent if we have had a rename. */
if (need_seqretry(&rename_lock, seq))
goto rename_retry;
- next = child->d_child.next;
- while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) {
+ /* go into the first sibling still alive */
+ do {
+ next = child->d_child.next;
if (next == &this_parent->d_subdirs)
goto ascend;
child = list_entry(next, struct dentry, d_child);
- next = next->next;
- }
+ } while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED));
rcu_read_unlock();
goto resume;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 086/178] module: Call module notifier on failure after complete_formation()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (84 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 085/178] d_walk() might skip too much Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 087/178] ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs Sasha Levin
` (92 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Steven Rostedt <rostedt@goodmis.org>
[ Upstream commit 37815bf866ab6722a47550f8d25ad3f1a16a680c ]
The module notifier call chain for MODULE_STATE_COMING was moved up before
the parsing of args, into the complete_formation() call. But if the module failed
to load after that, the notifier call chain for MODULE_STATE_GOING was
never called and that prevented the users of those call chains from
cleaning up anything that was allocated.
Link: http://lkml.kernel.org/r/554C52B9.9060700@gmail.com
Reported-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Fixes: 4982223e51e8 "module: set nx before marking module MODULE_STATE_COMING"
Cc: stable@vger.kernel.org # 3.16+
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
kernel/module.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/module.c b/kernel/module.c
index 88cec1d..c353707 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3307,6 +3307,9 @@ static int load_module(struct load_info *info, const char __user *uargs,
module_bug_cleanup(mod);
mutex_unlock(&module_mutex);
+ blocking_notifier_call_chain(&module_notify_list,
+ MODULE_STATE_GOING, mod);
+
/* we can't deallocate the module until we clear memory protection */
unset_module_init_ro_nx(mod);
unset_module_core_ro_nx(mod);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 087/178] ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (85 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 086/178] module: Call module notifier on failure after complete_formation() Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 088/178] ALSA: usb-audio: Add mode select quirk " Sasha Levin
` (91 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Jurgen Kramer <gtmkramer@xs4all.nl>
[ Upstream commit 7a2e9ddc903225d8fb3a510a842144a239017ee4 ]
This patch adds native DSD support for the following devices:
- Marantz SA-14S1
- Marants HD-DAC1
Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 60dfe0d..f59d98d 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1204,5 +1204,16 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
break;
}
+ /* Denon/Marantz devices with USB DAC functionality */
+ switch (chip->usb_id) {
+ case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */
+ case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */
+ if (fp->altsetting == 2)
+ return SNDRV_PCM_FMTBIT_DSD_U32_BE;
+ break;
+ default:
+ break;
+ }
+
return 0;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 088/178] ALSA: usb-audio: Add mode select quirk for Denon/Marantz DACs
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (86 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 087/178] ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 089/178] ALSA: usb-audio: Add support for Zoom R16/24 capture and midi interfaces Sasha Levin
` (90 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Jurgen Kramer <gtmkramer@xs4all.nl>
[ Upstream commit 6874daad4b0fbed5b2f9bef7f4d3f2b895463a95 ]
Denon/Marantz USB DACs need a specific vendor command to switch between PCM and
DSD mode. This patch adds a new quirk function to switch between the two modes
using the specific USB vendor command.
This patch applies to the following devices:
- Marantz SA-14S1
- Marantz HD-DAC1
Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/pcm.c | 5 +++++
sound/usb/quirks.c | 38 ++++++++++++++++++++++++++++++++++++++
sound/usb/quirks.h | 3 +++
3 files changed, 46 insertions(+)
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index c62a165..0d8aba5 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -482,6 +482,11 @@ static int set_format(struct snd_usb_substream *subs, struct audioformat *fmt)
/* set interface */
if (subs->interface != fmt->iface ||
subs->altset_idx != fmt->altset_idx) {
+
+ err = snd_usb_select_mode_quirk(subs, fmt);
+ if (err < 0)
+ return -EIO;
+
err = usb_set_interface(dev, fmt->iface, fmt->altsetting);
if (err < 0) {
dev_err(&dev->dev,
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index f59d98d..8039495 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1102,6 +1102,44 @@ void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
}
}
+
+/* Marantz/Denon USB DACs need a vendor cmd to switch
+ * between PCM and native DSD mode
+ */
+int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
+ struct audioformat *fmt)
+{
+ struct usb_device *dev = subs->dev;
+ int err;
+
+ switch (subs->stream->chip->usb_id) {
+ case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */
+ case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */
+
+ /* First switch to alt set 0, otherwise the mode switch cmd
+ * will not be accepted by the DAC
+ */
+ err = usb_set_interface(dev, fmt->iface, 0);
+ if (err < 0)
+ return err;
+
+ mdelay(20); /* Delay needed after setting the interface */
+
+ switch (fmt->altsetting) {
+ case 2: /* DSD mode requested */
+ case 1: /* PCM mode requested */
+ err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), 0,
+ USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
+ fmt->altsetting - 1, 1, NULL, 0);
+ if (err < 0)
+ return err;
+ break;
+ }
+ mdelay(20);
+ }
+ return 0;
+}
+
void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep)
{
/*
diff --git a/sound/usb/quirks.h b/sound/usb/quirks.h
index 665e972..1b86238 100644
--- a/sound/usb/quirks.h
+++ b/sound/usb/quirks.h
@@ -31,6 +31,9 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
__u8 request, __u8 requesttype, __u16 value,
__u16 index, void *data, __u16 size);
+int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
+ struct audioformat *fmt);
+
u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
struct audioformat *fp,
unsigned int sample_bytes);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 089/178] ALSA: usb-audio: Add support for Zoom R16/24 capture and midi interfaces
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (87 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 088/178] ALSA: usb-audio: Add mode select quirk " Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 090/178] ALSA: usb-audio: add native DSD support for Matrix Audio DACs Sasha Levin
` (89 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Panu Matilainen <pmatilai@laiskiainen.org>
[ Upstream commit dacacb0aa0cb6fdeb69313db6acfc82456945d7e ]
This makes the midi interface and capture work out of the box with
R16 (and presumably R24 too but untested). Playback stream would also
seem to function fine except for one caveat: no sound is produced,
so it is disabled for now. Mixer descriptors are garbage and will
require further quirks to enable functionality, also disabled here.
Signed-off-by: Panu Matilainen <pmatilai@laiskiainen.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks-table.h | 40 ++++++++++++++++++++++++++++++++++++++++
sound/usb/quirks.c | 8 ++++++++
2 files changed, 48 insertions(+)
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 5293b5a..fde5b6e 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -3145,6 +3145,46 @@ AU0828_DEVICE(0x2040, 0x7270, "Hauppauge", "HVR-950Q"),
{
/*
+ * ZOOM R16/24 in audio interface mode.
+ * Mixer descriptors are garbage, further quirks will be needed
+ * to make any of it functional, thus disabled for now.
+ * Playback stream appears to start and run fine but no sound
+ * is produced, so also disabled for now.
+ */
+ USB_DEVICE(0x1686, 0x00dd),
+ .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+ .ifnum = QUIRK_ANY_INTERFACE,
+ .type = QUIRK_COMPOSITE,
+ .data = (const struct snd_usb_audio_quirk[]) {
+ {
+ /* Mixer */
+ .ifnum = 0,
+ .type = QUIRK_IGNORE_INTERFACE,
+ },
+ {
+ /* Playback */
+ .ifnum = 1,
+ .type = QUIRK_IGNORE_INTERFACE,
+ },
+ {
+ /* Capture */
+ .ifnum = 2,
+ .type = QUIRK_AUDIO_STANDARD_INTERFACE,
+ },
+ {
+ /* Midi */
+ .ifnum = 3,
+ .type = QUIRK_MIDI_STANDARD_INTERFACE
+ },
+ {
+ .ifnum = -1
+ },
+ }
+ }
+},
+
+{
+ /*
* Some USB MIDI devices don't have an audio control interface,
* so we have to grab MIDI streaming interfaces here.
*/
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 8039495..7907ea6 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1198,6 +1198,14 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
break;
}
}
+
+ /* Zoom R16/24 needs a tiny delay here, otherwise requests like
+ * get/set frequency return as failed despite actually succeeding.
+ */
+ if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1686) &&
+ (le16_to_cpu(dev->descriptor.idProduct) == 0x00dd) &&
+ (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
+ mdelay(1);
}
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 090/178] ALSA: usb-audio: add native DSD support for Matrix Audio DACs
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (88 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 089/178] ALSA: usb-audio: Add support for Zoom R16/24 capture and midi interfaces Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 091/178] ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate Sasha Levin
` (88 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Jurgen Kramer <gtmkramer@xs4all.nl>
[ Upstream commit 38f74d5b82b329dff5bdf8626e8776a36a1835da ]
This patch adds native DSD support for two XMOS based DACs from Matrix Audio:
- X-Sabre
- Mini-i Pro
Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 7907ea6..bf5870c 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1236,8 +1236,9 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
/* XMOS based USB DACs */
switch (chip->usb_id) {
- /* iFi Audio micro/nano iDSD */
- case USB_ID(0x20b1, 0x3008):
+ case USB_ID(0x20b1, 0x3008): /* iFi Audio micro/nano iDSD */
+ case USB_ID(0x20b1, 0x2008): /* Matrix Audio X-Sabre */
+ case USB_ID(0x20b1, 0x300a): /* Matrix Audio Mini-i Pro */
if (fp->altsetting == 2)
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
break;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 091/178] ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (89 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 090/178] ALSA: usb-audio: add native DSD support for Matrix Audio DACs Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 092/178] ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003) Sasha Levin
` (87 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Joe Turner <joe@oampo.co.uk>
[ Upstream commit b62b998010028c4dfd7db7c26990efb2a0985a1e ]
Adds a quirk to disable the check that the sample rate has been set correctly, as the Lifecam does not support getting the sample rate.
This means that we don't need to wait for the USB timeout when attempting to get the sample rate. Waiting for the timeout causes problems in some applications, which give up on the device acquisition process before it has had time to complete, resulting in no sound.
[minor tidy up by tiwai]
Signed-off-by: Joe Turner <joe@oampo.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/clock.c | 5 +++++
sound/usb/quirks.c | 5 +++++
sound/usb/quirks.h | 2 ++
3 files changed, 12 insertions(+)
diff --git a/sound/usb/clock.c b/sound/usb/clock.c
index 03fed66..2ed260b 100644
--- a/sound/usb/clock.c
+++ b/sound/usb/clock.c
@@ -303,6 +303,11 @@ static int set_sample_rate_v1(struct snd_usb_audio *chip, int iface,
return err;
}
+ /* Don't check the sample rate for devices which we know don't
+ * support reading */
+ if (snd_usb_get_sample_rate_quirk(chip))
+ return 0;
+
if ((err = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC_GET_CUR,
USB_TYPE_CLASS | USB_RECIP_ENDPOINT | USB_DIR_IN,
UAC_EP_CS_ATTR_SAMPLE_RATE << 8, ep,
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index bf5870c..5940bd5 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1102,6 +1102,11 @@ void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
}
}
+bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
+{
+ /* MS Lifecam HD-5000 doesn't support reading the sample rate. */
+ return chip->usb_id == USB_ID(0x045E, 0x076D);
+}
/* Marantz/Denon USB DACs need a vendor cmd to switch
* between PCM and native DSD mode
diff --git a/sound/usb/quirks.h b/sound/usb/quirks.h
index 1b86238..2cd71ed 100644
--- a/sound/usb/quirks.h
+++ b/sound/usb/quirks.h
@@ -21,6 +21,8 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
struct audioformat *fmt);
+bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip);
+
int snd_usb_is_big_endian_format(struct snd_usb_audio *chip,
struct audioformat *fp);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 092/178] ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003)
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (90 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 091/178] ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 093/178] ALSA: usb-audio: Check Marantz/Denon USB DACs in a single place Sasha Levin
` (86 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Frank C Guenther <bugzilla.frnkcg@spamgourmet.com>
[ Upstream commit 3cd1ce0420ce89937bef9096d5bdb13fbdf0f8b0 ]
Fix problem where playback of Denon DA-300USB DAC sometimes does not
start and leads to error messages like "clock source 41 is not valid,
cannot use".
Solution: Treat this device the same as other Denon/Marantz devices in
sound/usb/quirks.c.
Tested with both PCM and DSD formats.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=93261
Signed-off-by: Frank C Guenther <bugzilla.frnkcg@spamgourmet.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 5940bd5..f002216 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1118,6 +1118,7 @@ int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
int err;
switch (subs->stream->chip->usb_id) {
+ case USB_ID(0x154e, 0x1003): /* Denon DA-300USB */
case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */
case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */
@@ -1197,6 +1198,7 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
(requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) {
switch (le16_to_cpu(dev->descriptor.idProduct)) {
+ case 0x1003: /* Denon DA300-USB */
case 0x3005: /* Marantz HD-DAC1 */
case 0x3006: /* Marantz SA-14S1 */
mdelay(20);
@@ -1258,6 +1260,7 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
/* Denon/Marantz devices with USB DAC functionality */
switch (chip->usb_id) {
+ case USB_ID(0x154e, 0x1003): /* Denon DA300-USB */
case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */
case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */
if (fp->altsetting == 2)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 093/178] ALSA: usb-audio: Check Marantz/Denon USB DACs in a single place
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (91 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 092/178] ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003) Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 094/178] ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate Sasha Levin
` (85 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 8b28c93fe5a55873ce22b7126e84eb59290f8603 ]
There are three places doing the same check. Let's make them
together.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks.c | 40 +++++++++++++++++-----------------------
1 file changed, 17 insertions(+), 23 deletions(-)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index f002216..1861f23 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1111,17 +1111,24 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
/* Marantz/Denon USB DACs need a vendor cmd to switch
* between PCM and native DSD mode
*/
+static bool is_marantz_denon_dac(unsigned int id)
+{
+ switch (id) {
+ case USB_ID(0x154e, 0x1003): /* Denon DA-300USB */
+ case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */
+ case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */
+ return true;
+ }
+ return false;
+}
+
int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
struct audioformat *fmt)
{
struct usb_device *dev = subs->dev;
int err;
- switch (subs->stream->chip->usb_id) {
- case USB_ID(0x154e, 0x1003): /* Denon DA-300USB */
- case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */
- case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */
-
+ if (is_marantz_denon_dac(subs->stream->chip->usb_id)) {
/* First switch to alt set 0, otherwise the mode switch cmd
* will not be accepted by the DAC
*/
@@ -1194,17 +1201,10 @@ void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
/* Marantz/Denon devices with USB DAC functionality need a delay
* after each class compliant request
*/
- if ((le16_to_cpu(dev->descriptor.idVendor) == 0x154e) &&
- (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS) {
-
- switch (le16_to_cpu(dev->descriptor.idProduct)) {
- case 0x1003: /* Denon DA300-USB */
- case 0x3005: /* Marantz HD-DAC1 */
- case 0x3006: /* Marantz SA-14S1 */
- mdelay(20);
- break;
- }
- }
+ if (is_marantz_denon_dac(USB_ID(le16_to_cpu(dev->descriptor.idVendor),
+ le16_to_cpu(dev->descriptor.idProduct)))
+ && (requesttype & USB_TYPE_MASK) == USB_TYPE_CLASS)
+ mdelay(20);
/* Zoom R16/24 needs a tiny delay here, otherwise requests like
* get/set frequency return as failed despite actually succeeding.
@@ -1259,15 +1259,9 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
}
/* Denon/Marantz devices with USB DAC functionality */
- switch (chip->usb_id) {
- case USB_ID(0x154e, 0x1003): /* Denon DA300-USB */
- case USB_ID(0x154e, 0x3005): /* Marantz HD-DAC1 */
- case USB_ID(0x154e, 0x3006): /* Marantz SA-14S1 */
+ if (is_marantz_denon_dac(chip->usb_id)) {
if (fp->altsetting == 2)
return SNDRV_PCM_FMTBIT_DSD_U32_BE;
- break;
- default:
- break;
}
return 0;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 094/178] ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (92 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 093/178] ALSA: usb-audio: Check Marantz/Denon USB DACs in a single place Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 095/178] ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema " Sasha Levin
` (84 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Eric Wong <normalperson@yhbt.net>
[ Upstream commit 9fc88ad6fd86ff6ce979105c633c58cc3980129c ]
Adding this quirk allows us to avoid the noisy
"cannot get freq at ep 0x1" message in dmesg output every time
playback starts.
This ought to affect other Benchmark DAC1 variations using the same
"Microchip Technology, Inc." chip as well, but I have only tested
with the "Pre" variant.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Cc: Joe Turner <joe@oampo.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 1861f23..b92f403 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1104,8 +1104,13 @@ void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
{
- /* MS Lifecam HD-5000 doesn't support reading the sample rate. */
- return chip->usb_id == USB_ID(0x045E, 0x076D);
+ /* devices which do not support reading the sample rate. */
+ switch (chip->usb_id) {
+ case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */
+ case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
+ return true;
+ }
+ return false;
}
/* Marantz/Denon USB DACs need a vendor cmd to switch
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 095/178] ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample rate
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (93 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 094/178] ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 096/178] ALSA: usb-audio: Add quirk for MS LifeCam Studio Sasha Levin
` (83 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Adam Honse <calcprogrammer1@gmail.com>
[ Upstream commit eef0342cf32689f77d78ee3302999e5caaa6a8f3 ]
Adds Microsoft LifeCam Cinema USB ID to the snd_usb_get_sample_rate_quirk list as the Lifecam Cinema does not appear to support getting the sample rate.
Fixes the issue where the LifeCam Cinema would wait for USB timeout and log the message "cannot get freq at ep 0x82" when accessed.
Addresses bug report https://bugzilla.kernel.org/show_bug.cgi?id=95961.
Signed-off-by: Adam Honse <calcprogrammer1@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index b92f403..1e882a6 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1106,6 +1106,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
{
/* devices which do not support reading the sample rate. */
switch (chip->usb_id) {
+ case USB_ID(0x045E, 0x075D): /* MS Lifecam Cinema */
case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */
case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
return true;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 096/178] ALSA: usb-audio: Add quirk for MS LifeCam Studio
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (94 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 095/178] ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema " Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 097/178] ALSA: usb-audio: Add quirk for MS LifeCam HD-3000 Sasha Levin
` (82 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit fa94b0d72511add5822dc4124f2a3eae66b8863f ]
Microsoft LifeCam Studio (045e:0772) needs a similar quirk for
suppressing the wrong sample rate inquiry.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98481
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 1e882a6..9a43c22 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1108,6 +1108,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
switch (chip->usb_id) {
case USB_ID(0x045E, 0x075D): /* MS Lifecam Cinema */
case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */
+ case USB_ID(0x045E, 0x0772): /* MS Lifecam Studio */
case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
return true;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 097/178] ALSA: usb-audio: Add quirk for MS LifeCam HD-3000
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (95 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 096/178] ALSA: usb-audio: Add quirk for MS LifeCam Studio Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 098/178] ALSA: hda - Enable widget power saving for Realtek codecs Sasha Levin
` (81 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Vittorio G (VittGam)" <linuxbugs@vittgam.net>
[ Upstream commit ae425bb2a05bebe786a25cc8ae64e9d16c4d9b83 ]
Microsoft LifeCam HD-3000 (045e:0779) needs a similar quirk for
suppressing the unsupported sample rate inquiry.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98481
Cc: <stable@vger.kernel.org>
Signed-off-by: Vittorio Gambaletta <linuxbugs@vittgam.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/usb/quirks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 9a43c22..05ad944 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1109,6 +1109,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
case USB_ID(0x045E, 0x075D): /* MS Lifecam Cinema */
case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */
case USB_ID(0x045E, 0x0772): /* MS Lifecam Studio */
+ case USB_ID(0x045E, 0x0779): /* MS Lifecam HD-3000 */
case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */
return true;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 098/178] ALSA: hda - Enable widget power saving for Realtek codecs
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (96 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 097/178] ALSA: usb-audio: Add quirk for MS LifeCam HD-3000 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 099/178] ALSA: hda/realtek - Support Dell headset mode for ALC256 Sasha Levin
` (80 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 382fd7becc409be9cc18dea8e3d53f6d184f9a5c ]
Recent Realtek codecs support the finer power state control on each
widget. Let's enable the new feature.
Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e3ad4a4..cfb912c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5335,6 +5335,7 @@ static int patch_alc269(struct hda_codec *codec)
spec = codec->spec;
spec->gen.shared_mic_vref_pin = 0x18;
+ codec->power_save_node = 1;
snd_hda_pick_fixup(codec, alc269_fixup_models,
alc269_fixup_tbl, alc269_fixups);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 099/178] ALSA: hda/realtek - Support Dell headset mode for ALC256
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (97 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 098/178] ALSA: hda - Enable widget power saving for Realtek codecs Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 100/178] ALSA: hda/realtek - Support headset mode for ALC286/288 Sasha Levin
` (79 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Kailang Yang <kailang@realtek.com>
[ Upstream commit 7081adf3f98f4c39dc6758208775b2aa48f51f8a ]
Dell new platform of ALC256 audio codec.
Support headset mode for Dell ALC256 platform.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cfb912c..8c68114 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3500,6 +3500,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
switch (codec->vendor_id) {
case 0x10ec0255:
+ case 0x10ec0256:
alc_process_coef_fw(codec, coef0255);
break;
case 0x10ec0233:
@@ -3555,6 +3556,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
switch (codec->vendor_id) {
case 0x10ec0255:
+ case 0x10ec0256:
alc_write_coef_idx(codec, 0x45, 0xc489);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
alc_process_coef_fw(codec, coef0255);
@@ -3624,6 +3626,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
switch (codec->vendor_id) {
case 0x10ec0255:
+ case 0x10ec0256:
alc_process_coef_fw(codec, coef0255);
break;
case 0x10ec0233:
@@ -3678,6 +3681,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
switch (codec->vendor_id) {
case 0x10ec0255:
+ case 0x10ec0256:
alc_process_coef_fw(codec, coef0255);
break;
case 0x10ec0233:
@@ -3732,6 +3736,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
switch (codec->vendor_id) {
case 0x10ec0255:
+ case 0x10ec0256:
alc_process_coef_fw(codec, coef0255);
break;
case 0x10ec0233:
@@ -3777,6 +3782,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
switch (codec->vendor_id) {
case 0x10ec0255:
+ case 0x10ec0256:
alc_process_coef_fw(codec, coef0255);
msleep(300);
val = alc_read_coef_idx(codec, 0x46);
@@ -5095,6 +5101,16 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
{0x17, 0x40000000},
{0x1d, 0x40700001},
{0x21, 0x02211050}),
+ SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+ {0x12, 0x90a60140},
+ {0x13, 0x40000000},
+ {0x14, 0x90170110},
+ {0x19, 0x411111f0},
+ {0x1a, 0x411111f0},
+ {0x1b, 0x411111f0},
+ {0x1d, 0x40700001},
+ {0x1e, 0x411111f0},
+ {0x21, 0x02211020}),
SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
{0x12, 0x90a60130},
{0x13, 0x40000000},
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 100/178] ALSA: hda/realtek - Support headset mode for ALC286/288
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (98 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 099/178] ALSA: hda/realtek - Support Dell headset mode for ALC256 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 101/178] ALSA: hda/realtek - Fix the regression by widget power-saving Sasha Levin
` (78 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Kailang Yang <kailang@realtek.com>
[ Upstream commit f3b703326541d0c1ce85f5e570f6d2b6bd4296ec ]
Support headset mode for ALC286 and ALC288 platforms.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 77 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8c68114..01bc4c1 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3476,6 +3476,14 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
WRITE_COEF(0x32, 0x42a3),
{}
};
+ static struct coef_fw coef0288[] = {
+ UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
+ UPDATE_COEF(0x50, 0x2000, 0x2000),
+ UPDATE_COEF(0x56, 0x0006, 0x0006),
+ UPDATE_COEF(0x66, 0x0008, 0),
+ UPDATE_COEF(0x67, 0x2000, 0),
+ {}
+ };
static struct coef_fw coef0292[] = {
WRITE_COEF(0x76, 0x000e),
WRITE_COEF(0x6c, 0x2400),
@@ -3507,6 +3515,10 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
case 0x10ec0283:
alc_process_coef_fw(codec, coef0233);
break;
+ case 0x10ec0286:
+ case 0x10ec0288:
+ alc_process_coef_fw(codec, coef0288);
+ break;
case 0x10ec0292:
alc_process_coef_fw(codec, coef0292);
break;
@@ -3536,6 +3548,14 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
WRITE_COEF(0x26, 0x008c),
{}
};
+ static struct coef_fw coef0288[] = {
+ UPDATE_COEF(0x50, 0x2000, 0),
+ UPDATE_COEF(0x56, 0x0006, 0),
+ UPDATE_COEF(0x4f, 0xfcc0, 0xc400),
+ UPDATE_COEF(0x66, 0x0008, 0x0008),
+ UPDATE_COEF(0x67, 0x2000, 0x2000),
+ {}
+ };
static struct coef_fw coef0292[] = {
WRITE_COEF(0x19, 0xa208),
WRITE_COEF(0x2e, 0xacf0),
@@ -3569,6 +3589,13 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
alc_process_coef_fw(codec, coef0233);
snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
break;
+ case 0x10ec0286:
+ case 0x10ec0288:
+ alc_update_coef_idx(codec, 0x4f, 0x000c, 0);
+ snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
+ alc_process_coef_fw(codec, coef0288);
+ snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
+ break;
case 0x10ec0292:
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
alc_process_coef_fw(codec, coef0292);
@@ -3604,6 +3631,14 @@ static void alc_headset_mode_default(struct hda_codec *codec)
WRITE_COEF(0x32, 0x4ea3),
{}
};
+ static struct coef_fw coef0288[] = {
+ UPDATE_COEF(0x4f, 0xfcc0, 0xc400), /* Set to TRS type */
+ UPDATE_COEF(0x50, 0x2000, 0x2000),
+ UPDATE_COEF(0x56, 0x0006, 0x0006),
+ UPDATE_COEF(0x66, 0x0008, 0),
+ UPDATE_COEF(0x67, 0x2000, 0),
+ {}
+ };
static struct coef_fw coef0292[] = {
WRITE_COEF(0x76, 0x000e),
WRITE_COEF(0x6c, 0x2400),
@@ -3633,6 +3668,11 @@ static void alc_headset_mode_default(struct hda_codec *codec)
case 0x10ec0283:
alc_process_coef_fw(codec, coef0233);
break;
+ case 0x10ec0286:
+ case 0x10ec0288:
+ alc_process_coef_fw(codec, coef0288);
+ break;
+ break;
case 0x10ec0292:
alc_process_coef_fw(codec, coef0292);
break;
@@ -3661,6 +3701,13 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
WRITE_COEF(0x32, 0x4ea3),
{}
};
+ static struct coef_fw coef0288[] = {
+ UPDATE_COEF(0x50, 0x2000, 0x2000),
+ UPDATE_COEF(0x56, 0x0006, 0x0006),
+ UPDATE_COEF(0x66, 0x0008, 0),
+ UPDATE_COEF(0x67, 0x2000, 0),
+ {}
+ };
static struct coef_fw coef0292[] = {
WRITE_COEF(0x6b, 0xd429),
WRITE_COEF(0x76, 0x0008),
@@ -3688,6 +3735,12 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
case 0x10ec0283:
alc_process_coef_fw(codec, coef0233);
break;
+ case 0x10ec0286:
+ case 0x10ec0288:
+ alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400);
+ msleep(300);
+ alc_process_coef_fw(codec, coef0288);
+ break;
case 0x10ec0292:
alc_process_coef_fw(codec, coef0292);
break;
@@ -3716,6 +3769,13 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
WRITE_COEF(0x32, 0x4ea3),
{}
};
+ static struct coef_fw coef0288[] = {
+ UPDATE_COEF(0x50, 0x2000, 0x2000),
+ UPDATE_COEF(0x56, 0x0006, 0x0006),
+ UPDATE_COEF(0x66, 0x0008, 0),
+ UPDATE_COEF(0x67, 0x2000, 0),
+ {}
+ };
static struct coef_fw coef0292[] = {
WRITE_COEF(0x6b, 0xe429),
WRITE_COEF(0x76, 0x0008),
@@ -3743,6 +3803,12 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
case 0x10ec0283:
alc_process_coef_fw(codec, coef0233);
break;
+ case 0x10ec0286:
+ case 0x10ec0288:
+ alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400);
+ msleep(300);
+ alc_process_coef_fw(codec, coef0288);
+ break;
case 0x10ec0292:
alc_process_coef_fw(codec, coef0292);
break;
@@ -3767,6 +3833,10 @@ static void alc_determine_headset_type(struct hda_codec *codec)
conteol) */
{}
};
+ static struct coef_fw coef0288[] = {
+ UPDATE_COEF(0x4f, 0xfcc0, 0xd400), /* Check Type */
+ {}
+ };
static struct coef_fw coef0293[] = {
UPDATE_COEF(0x4a, 0x000f, 0x0008), /* Combo Jack auto detect */
WRITE_COEF(0x45, 0xD429), /* Set to ctia type */
@@ -3795,6 +3865,13 @@ static void alc_determine_headset_type(struct hda_codec *codec)
val = alc_read_coef_idx(codec, 0x46);
is_ctia = (val & 0x0070) == 0x0070;
break;
+ case 0x10ec0286:
+ case 0x10ec0288:
+ alc_process_coef_fw(codec, coef0288);
+ msleep(350);
+ val = alc_read_coef_idx(codec, 0x50);
+ is_ctia = (val & 0x0070) == 0x0070;
+ break;
case 0x10ec0292:
alc_write_coef_idx(codec, 0x6b, 0xd429);
msleep(300);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 101/178] ALSA: hda/realtek - Fix the regression by widget power-saving
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (99 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 100/178] ALSA: hda/realtek - Support headset mode for ALC286/288 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 102/178] ALSA: hda - fix headset mic detection problem for one more machine Sasha Levin
` (77 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit cffd39668177afe5566104a2f289242c3c5ce3d1 ]
While enabling the widget power-saving for ALC269 & co, the important
setup was forgotten -- stream_pm ops. Without this setup, the paths
for PCM won't be powered up at all.
Also, the power_filter callbacks used in ALC269 & co need to chain to
the default snd_hda_gen_path_power_filter().
Tested-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 01bc4c1..016a058 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3262,7 +3262,7 @@ static unsigned int led_power_filter(struct hda_codec *codec,
snd_hda_set_pin_ctl(codec, nid,
snd_hda_codec_get_pin_target(codec, nid));
- return AC_PWRST_D0;
+ return snd_hda_gen_path_power_filter(codec, nid, power_state);
}
static void alc269_fixup_hp_mute_led(struct hda_codec *codec,
@@ -4097,7 +4097,7 @@ static unsigned int alc_power_filter_xps13(struct hda_codec *codec,
if (spec->gen.hp_jack_present)
if (nid == codec->afg || nid == 0x02 || nid == 0x15)
return AC_PWRST_D0;
- return power_state;
+ return snd_hda_gen_path_power_filter(codec, nid, power_state);
}
static void alc_fixup_dell_xps13(struct hda_codec *codec,
@@ -5527,6 +5527,7 @@ static int patch_alc269(struct hda_codec *codec)
set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
codec->patch_ops = alc_patch_ops;
+ codec->patch_ops.stream_pm = snd_hda_gen_stream_pm,
#ifdef CONFIG_PM
codec->patch_ops.suspend = alc269_suspend;
codec->patch_ops.resume = alc269_resume;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 102/178] ALSA: hda - fix headset mic detection problem for one more machine
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (100 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 101/178] ALSA: hda/realtek - Fix the regression by widget power-saving Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 103/178] ALSA: hda - Add headphone quirk for Lifebook E752 Sasha Levin
` (76 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Hui Wang <hui.wang@canonical.com>
[ Upstream commit e8191a8e475551b277d85cd76c3f0f52fdf42e86 ]
We have two machines with alc256 codec in the pin quirk table, so
moving the common pins to ALC256_STANDARD_PINS.
Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1447909
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 016a058..ac7a67b 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5086,6 +5086,16 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{0x1b, 0x411111f0}, \
{0x1e, 0x411111f0}
+#define ALC256_STANDARD_PINS \
+ {0x12, 0x90a60140}, \
+ {0x14, 0x90170110}, \
+ {0x19, 0x411111f0}, \
+ {0x1a, 0x411111f0}, \
+ {0x1b, 0x411111f0}, \
+ {0x1d, 0x40700001}, \
+ {0x1e, 0x411111f0}, \
+ {0x21, 0x02211020}
+
#define ALC282_STANDARD_PINS \
{0x14, 0x90170110}, \
{0x18, 0x411111f0}, \
@@ -5179,15 +5189,11 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
{0x1d, 0x40700001},
{0x21, 0x02211050}),
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
- {0x12, 0x90a60140},
- {0x13, 0x40000000},
- {0x14, 0x90170110},
- {0x19, 0x411111f0},
- {0x1a, 0x411111f0},
- {0x1b, 0x411111f0},
- {0x1d, 0x40700001},
- {0x1e, 0x411111f0},
- {0x21, 0x02211020}),
+ ALC256_STANDARD_PINS,
+ {0x13, 0x40000000}),
+ SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+ ALC256_STANDARD_PINS,
+ {0x13, 0x411111f0}),
SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4,
{0x12, 0x90a60130},
{0x13, 0x40000000},
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 103/178] ALSA: hda - Add headphone quirk for Lifebook E752
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (101 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 102/178] ALSA: hda - fix headset mic detection problem for one more machine Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 104/178] ALSA: hda/realtek - Fix typo for ALC286/ALC288 Sasha Levin
` (75 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 88776f366ede7d9cdce60bd2c9753dd6d6fa8b77 ]
Fujitsu Lifebook E752 laptop needs a similar quirk done for Lifebook
T731. Otherwise the headphone is always muted.
Reported-and-tested-by: Christian Weber <we_chris@hotmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ac7a67b..051024b 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4969,6 +4969,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x9099, "Sony VAIO S13", ALC275_FIXUP_SONY_DISABLE_AAMIX),
SND_PCI_QUIRK(0x10cf, 0x1475, "Lifebook", ALC269_FIXUP_LIFEBOOK),
SND_PCI_QUIRK(0x10cf, 0x15dc, "Lifebook T731", ALC269_FIXUP_LIFEBOOK_HP_PIN),
+ SND_PCI_QUIRK(0x10cf, 0x1757, "Lifebook E752", ALC269_FIXUP_LIFEBOOK_HP_PIN),
SND_PCI_QUIRK(0x10cf, 0x1845, "Lifebook U904", ALC269_FIXUP_LIFEBOOK_EXTMIC),
SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x1458, 0xfa53, "Gigabyte BXBT-2807", ALC283_FIXUP_BXBT2807_MIC),
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 104/178] ALSA: hda/realtek - Fix typo for ALC286/ALC288
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (102 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 103/178] ALSA: hda - Add headphone quirk for Lifebook E752 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 105/178] ALSA: hda/realtek - Fix a typo Sasha Levin
` (74 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Kailang Yang <kailang@realtek.com>
[ Upstream commit ec6bfca835b61df360881c1bf89268f69fed2a61 ]
Delete more one break for ALC286/ALC288.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 051024b..6ab902c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3672,7 +3672,6 @@ static void alc_headset_mode_default(struct hda_codec *codec)
case 0x10ec0288:
alc_process_coef_fw(codec, coef0288);
break;
- break;
case 0x10ec0292:
alc_process_coef_fw(codec, coef0292);
break;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 105/178] ALSA: hda/realtek - Fix a typo
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (103 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 104/178] ALSA: hda/realtek - Fix typo for ALC286/ALC288 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 106/178] ALSA: hda/realtek - Add ALC298 alias name for Dell Sasha Levin
` (73 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit f4d3129c2b580ad2b82aa3211a6216bbf7ad007c ]
A comma was used instead of a semicolon, which may lead to a build
error.
Fixes: cffd39668177 ('ALSA: hda/realtek - Fix the regression by widget power-saving')
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 6ab902c..cdaba45 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5533,7 +5533,7 @@ static int patch_alc269(struct hda_codec *codec)
set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
codec->patch_ops = alc_patch_ops;
- codec->patch_ops.stream_pm = snd_hda_gen_stream_pm,
+ codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
#ifdef CONFIG_PM
codec->patch_ops.suspend = alc269_suspend;
codec->patch_ops.resume = alc269_resume;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 106/178] ALSA: hda/realtek - Add ALC298 alias name for Dell
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (104 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 105/178] ALSA: hda/realtek - Fix a typo Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 107/178] ALSA: hda - Add headset mic quirk for Dell Inspiron 5548 Sasha Levin
` (72 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Kailang Yang <kailang@realtek.com>
[ Upstream commit 2c674fac5b1603c6a2aacc88116e3fbc75ebd799 ]
Add ALC3266 for Dell platform.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index cdaba45..4929abe 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -880,6 +880,7 @@ static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
{ 0x10ec0668, 0x1028, 0, "ALC3661" },
{ 0x10ec0275, 0x1028, 0, "ALC3260" },
{ 0x10ec0899, 0x1028, 0, "ALC3861" },
+ { 0x10ec0298, 0x1028, 0, "ALC3266" },
{ 0x10ec0670, 0x1025, 0, "ALC669X" },
{ 0x10ec0676, 0x1025, 0, "ALC679X" },
{ 0x10ec0282, 0x1043, 0, "ALC3229" },
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 107/178] ALSA: hda - Add headset mic quirk for Dell Inspiron 5548
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (105 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 106/178] ALSA: hda/realtek - Add ALC298 alias name for Dell Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 108/178] ALSA: hda/realtek - Support headset mode for ALC298 Sasha Levin
` (71 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: David Henningsson <david.henningsson@canonical.com>
[ Upstream commit 9b5a4e395c2f39fae89f75e4a749be5dba342d22 ]
This enables the headset microphone on Dell Inspiron 5548,
or at least some variants of it.
Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1452175
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 4929abe..7553899 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5189,6 +5189,13 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
{0x17, 0x40000000},
{0x1d, 0x40700001},
{0x21, 0x02211050}),
+ SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell Inspiron 5548", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
+ ALC255_STANDARD_PINS,
+ {0x12, 0x90a60180},
+ {0x14, 0x90170130},
+ {0x17, 0x40000000},
+ {0x1d, 0x40700001},
+ {0x21, 0x02211040}),
SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE,
ALC256_STANDARD_PINS,
{0x13, 0x40000000}),
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 108/178] ALSA: hda/realtek - Support headset mode for ALC298
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (106 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 107/178] ALSA: hda - Add headset mic quirk for Dell Inspiron 5548 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 109/178] ALSA: hda - Fix headset mic and mic-in for a Dell desktop Sasha Levin
` (70 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Kailang Yang <kailang@realtek.com>
[ Upstream commit 1a5bc8d95020c5a81264146c94102baec6ab0861 ]
Support headset mode for ALC298 platform.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7553899..a7f5a1d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3518,6 +3518,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
break;
case 0x10ec0286:
case 0x10ec0288:
+ case 0x10ec0298:
alc_process_coef_fw(codec, coef0288);
break;
case 0x10ec0292:
@@ -3592,6 +3593,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
break;
case 0x10ec0286:
case 0x10ec0288:
+ case 0x10ec0298:
alc_update_coef_idx(codec, 0x4f, 0x000c, 0);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
alc_process_coef_fw(codec, coef0288);
@@ -3671,6 +3673,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
break;
case 0x10ec0286:
case 0x10ec0288:
+ case 0x10ec0298:
alc_process_coef_fw(codec, coef0288);
break;
case 0x10ec0292:
@@ -3735,6 +3738,9 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
case 0x10ec0283:
alc_process_coef_fw(codec, coef0233);
break;
+ case 0x10ec0298:
+ alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020);/* Headset output enable */
+ /* ALC298 jack type setting is the same with ALC286/ALC288 */
case 0x10ec0286:
case 0x10ec0288:
alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xd400);
@@ -3803,6 +3809,9 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
case 0x10ec0283:
alc_process_coef_fw(codec, coef0233);
break;
+ case 0x10ec0298:
+ alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0010);/* Headset output enable */
+ /* ALC298 jack type setting is the same with ALC286/ALC288 */
case 0x10ec0286:
case 0x10ec0288:
alc_update_coef_idx(codec, 0x4f, 0xfcc0, 0xe400);
@@ -3865,6 +3874,9 @@ static void alc_determine_headset_type(struct hda_codec *codec)
val = alc_read_coef_idx(codec, 0x46);
is_ctia = (val & 0x0070) == 0x0070;
break;
+ case 0x10ec0298:
+ alc_update_coef_idx(codec, 0x8e, 0x0070, 0x0020); /* Headset output enable */
+ /* ALC298 check jack type is the same with ALC286/ALC288 */
case 0x10ec0286:
case 0x10ec0288:
alc_process_coef_fw(codec, coef0288);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 109/178] ALSA: hda - Fix headset mic and mic-in for a Dell desktop
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (107 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 108/178] ALSA: hda/realtek - Support headset mode for ALC298 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 110/178] ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450 Sasha Levin
` (69 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: David Henningsson <david.henningsson@canonical.com>
[ Upstream commit 1f8b46cdc806dfd76386f8442d9a6d0ae69abb25 ]
ALC662 does not need any special verbs to change the jack functionality,
and enables mic in through the headphone jack mode by changing the
direction of the headphone pin node.
BugLink: https://bugs.launchpad.net/bugs/1454235
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 46 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a7f5a1d..bcd5c07 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3610,6 +3610,10 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
alc_process_coef_fw(codec, coef0293);
snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
break;
+ case 0x10ec0662:
+ snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
+ snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
+ break;
case 0x10ec0668:
alc_write_coef_idx(codec, 0x11, 0x0001);
snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
@@ -3958,7 +3962,7 @@ static void alc_update_headset_mode(struct hda_codec *codec)
if (new_headset_mode != ALC_HEADSET_MODE_MIC) {
snd_hda_set_pin_ctl_cache(codec, hp_pin,
AC_PINCTL_OUT_EN | AC_PINCTL_HP_EN);
- if (spec->headphone_mic_pin)
+ if (spec->headphone_mic_pin && spec->headphone_mic_pin != hp_pin)
snd_hda_set_pin_ctl_cache(codec, spec->headphone_mic_pin,
PIN_VREFHIZ);
}
@@ -4133,6 +4137,18 @@ static void alc_fixup_dell_xps13(struct hda_codec *codec,
}
}
+static void alc_fixup_headset_mode_alc662(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct alc_spec *spec = codec->spec;
+
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
+ spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */
+ } else
+ alc_fixup_headset_mode(codec, fix, action);
+}
+
static void alc_fixup_headset_mode_alc668(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -5949,7 +5965,9 @@ enum {
ALC662_FIXUP_NO_JACK_DETECT,
ALC662_FIXUP_ZOTAC_Z68,
ALC662_FIXUP_INV_DMIC,
+ ALC662_FIXUP_DELL_MIC_NO_PRESENCE,
ALC668_FIXUP_DELL_MIC_NO_PRESENCE,
+ ALC662_FIXUP_HEADSET_MODE,
ALC668_FIXUP_HEADSET_MODE,
ALC662_FIXUP_BASS_MODE4_CHMAP,
ALC662_FIXUP_BASS_16,
@@ -6142,6 +6160,20 @@ static const struct hda_fixup alc662_fixups[] = {
.chained = true,
.chain_id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE
},
+ [ALC662_FIXUP_DELL_MIC_NO_PRESENCE] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x19, 0x03a1113c }, /* use as headset mic, without its own jack detect */
+ /* headphone mic by setting pin control of 0x1b (headphone out) to in + vref_50 */
+ { }
+ },
+ .chained = true,
+ .chain_id = ALC662_FIXUP_HEADSET_MODE
+ },
+ [ALC662_FIXUP_HEADSET_MODE] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc_fixup_headset_mode_alc662,
+ },
[ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
@@ -6293,6 +6325,18 @@ static const struct hda_model_fixup alc662_fixup_models[] = {
};
static const struct snd_hda_pin_quirk alc662_pin_fixup_tbl[] = {
+ SND_HDA_PIN_QUIRK(0x10ec0662, 0x1028, "Dell", ALC662_FIXUP_DELL_MIC_NO_PRESENCE,
+ {0x12, 0x4004c000},
+ {0x14, 0x01014010},
+ {0x15, 0x411111f0},
+ {0x16, 0x411111f0},
+ {0x18, 0x01a19020},
+ {0x19, 0x411111f0},
+ {0x1a, 0x0181302f},
+ {0x1b, 0x0221401f},
+ {0x1c, 0x411111f0},
+ {0x1d, 0x4054c601},
+ {0x1e, 0x411111f0}),
SND_HDA_PIN_QUIRK(0x10ec0668, 0x1028, "Dell", ALC668_FIXUP_AUTO_MUTE,
{0x12, 0x99a30130},
{0x14, 0x90170110},
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 110/178] ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (108 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 109/178] ALSA: hda - Fix headset mic and mic-in for a Dell desktop Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 111/178] ALSA: hda - Disable widget power-saving for ALC292 & co Sasha Levin
` (68 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ansgar Hegerfeld <linux@hegerfeld.org>
[ Upstream commit 09ea997677cd44ebe7f42573119aaf46b775c683 ]
The Lenovo ThinkPad L450 requires the ALC292_FIXUP_TPT440_DOCK fix in
order to get sound output on the docking stations audio port.
This patch was tested using a ThinkPad L450 (20DSS00B00) using kernel
4.0.3 and a ThinkPad Pro Dock.
Signed-off-by: Ansgar Hegerfeld <linux@hegerfeld.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index bcd5c07..f6248b2 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5027,6 +5027,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x17aa, 0x5034, "Thinkpad T450", ALC292_FIXUP_TPT440_DOCK),
SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK),
+ SND_PCI_QUIRK(0x17aa, 0x503c, "Thinkpad L450", ALC292_FIXUP_TPT440_DOCK),
SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K),
SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD),
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 111/178] ALSA: hda - Disable widget power-saving for ALC292 & co
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (109 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 110/178] ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 112/178] ALSA: hda/realtek - Add ALC256 alias name for Dell Sasha Levin
` (67 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 219f47e4f96442a7fe8fb646c59c6730690a9e66 ]
We've got reports that ALC3226 (a Dell variant of ALC292) gives click
noises at transition from D3 to D0 when the widget power-saving is
enabled. Further debugging session showed that avoiding it isn't
trivial, unfortunately, since paths are basically activated
dynamically while the pins have been already enabled.
This patch disables the widget power-saving for such codecs.
Reported-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f6248b2..5407b81 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5471,7 +5471,8 @@ static int patch_alc269(struct hda_codec *codec)
spec = codec->spec;
spec->gen.shared_mic_vref_pin = 0x18;
- codec->power_save_node = 1;
+ if (codec->core.vendor_id != 0x10ec0292)
+ codec->power_save_node = 1;
snd_hda_pick_fixup(codec, alc269_fixup_models,
alc269_fixup_tbl, alc269_fixups);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 112/178] ALSA: hda/realtek - Add ALC256 alias name for Dell
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (110 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 111/178] ALSA: hda - Disable widget power-saving for ALC292 & co Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 113/178] ALSA: hda - Disable Headphone Mic boost for ALC662 Sasha Levin
` (66 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Kailang Yang <kailang@realtek.com>
[ Upstream commit 823245026ead28a244cb9df5ae79b511da128606 ]
Add ALC3246 for Dell platform.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 5407b81..661ccc9 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -881,6 +881,7 @@ static struct alc_codec_rename_pci_table rename_pci_tbl[] = {
{ 0x10ec0275, 0x1028, 0, "ALC3260" },
{ 0x10ec0899, 0x1028, 0, "ALC3861" },
{ 0x10ec0298, 0x1028, 0, "ALC3266" },
+ { 0x10ec0256, 0x1028, 0, "ALC3246" },
{ 0x10ec0670, 0x1025, 0, "ALC669X" },
{ 0x10ec0676, 0x1025, 0, "ALC679X" },
{ 0x10ec0282, 0x1043, 0, "ALC3229" },
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 113/178] ALSA: hda - Disable Headphone Mic boost for ALC662
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (111 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 112/178] ALSA: hda/realtek - Add ALC256 alias name for Dell Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 114/178] ALSA: hda - Fix lost sound due to stream_pm ops cleanup Sasha Levin
` (65 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: David Henningsson <david.henningsson@canonical.com>
[ Upstream commit b40eda6408e94ee286cb5720cd3f409f70e01778 ]
When headphone mic boost is above zero, some 10 - 20 second delay
might occur before the headphone mic is operational.
Therefore disable the headphone mic boost control (recording gain is
sufficient even without it).
(Note: this patch is not about the headset mic, it's about the less
common mic-in only mode.)
BugLink: https://bugs.launchpad.net/bugs/1454235
Suggested-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_realtek.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 661ccc9..6924e06 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4146,6 +4146,11 @@ static void alc_fixup_headset_mode_alc662(struct hda_codec *codec,
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
spec->gen.hp_mic = 1; /* Mic-in is same pin as headphone */
+
+ /* Disable boost for mic-in permanently. (This code is only called
+ from quirks that guarantee that the headphone is at NID 0x1b.) */
+ snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000);
+ snd_hda_override_wcaps(codec, 0x1b, get_wcaps(codec, 0x1b) & ~AC_WCAP_IN_AMP);
} else
alc_fixup_headset_mode(codec, fix, action);
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 114/178] ALSA: hda - Fix lost sound due to stream_pm ops cleanup
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (112 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 113/178] ALSA: hda - Disable Headphone Mic boost for ALC662 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 115/178] Revert "ALSA: hda - Add mute-LED mode control to Thinkpad" Sasha Levin
` (64 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit b47eee2e0a7de623c24dbcaf303c3bf2b5155455 ]
The commit [49fb18972581: ALSA: hda - Set stream_pm ops automatically
by generic parser] resulted in regressions on some Realtek and VIA
codecs because these drivers set patch_ops after calling the generic
parser, thus stream_pm got cleared to NULL again. I haven't noticed
since I tested with IDT codec.
Restore (partial revert) the stream_pm ops for them to fix the
regression.
Fixes: 49fb18972581 ('ALSA: hda - Set stream_pm ops automatically by generic parser')
Reported-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/patch_via.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 6c206b6..d3057af 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -504,6 +504,7 @@ static const struct hda_codec_ops via_patch_ops = {
.init = via_init,
.free = via_free,
.unsol_event = snd_hda_jack_unsol_event,
+ .stream_pm = snd_hda_gen_stream_pm,
#ifdef CONFIG_PM
.suspend = via_suspend,
.check_power_status = via_check_power_status,
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 115/178] Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (113 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 114/178] ALSA: hda - Fix lost sound due to stream_pm ops cleanup Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 116/178] ALSA: hda - Add AZX_DCAPS_SNOOP_OFF (and refactor snoop setup) Sasha Levin
` (63 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 3530febb5c7636f6b26d15637f68296804d26491 ]
This reverts commit 7290006d8c0900c56d8c58428134f02c35109d17.
Through the regression report, it was revealed that the
tpacpi_led_set() call to thinkpad_acpi helper doesn't only toggle the
mute LED but actually mutes the sound. This is contradiction to the
expectation, and rather confuses user.
According to Henrique, it's not trivial to judge which TP model
behaves "LED-only" and which model does whatever more intrusive, as
Lenovo's implementations vary model by model. So, from the safety
reason, we should revert the patch for now.
Reported-by: Martin Steigerwald <martin@lichtvoll.de>
Cc: Pali Rohár <pali.rohar@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/thinkpad_helper.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/pci/hda/thinkpad_helper.c b/sound/pci/hda/thinkpad_helper.c
index 2341fc3..6ba0b55 100644
--- a/sound/pci/hda/thinkpad_helper.c
+++ b/sound/pci/hda/thinkpad_helper.c
@@ -72,7 +72,6 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec,
if (led_set_func(TPACPI_LED_MUTE, false) >= 0) {
old_vmaster_hook = spec->vmaster_mute.hook;
spec->vmaster_mute.hook = update_tpacpi_mute_led;
- spec->vmaster_mute_enum = 1;
removefunc = false;
}
if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0) {
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 116/178] ALSA: hda - Add AZX_DCAPS_SNOOP_OFF (and refactor snoop setup)
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (114 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 115/178] Revert "ALSA: hda - Add mute-LED mode control to Thinkpad" Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 117/178] ALSA: hda - Fix noise on AMD radeon 290x controller Sasha Levin
` (62 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 37e661ee10c6d0d1310c62b3d29ae9a63073ac5d ]
Add a new driver_caps bit, AZX_DCAPS_SNOOP_OFF, to set the snoop off
as default. This new bit is used for the checks in
azx_check_snoop_available(). Most of case-switches are replaced with
the new dcaps in each entry.
While working on it, for avoiding to spend more bits, combine three
bits AZX_DCAPS_SNOOP_SCH, AZX_DCAPS_SNOOP_ATI and
AZX_DCAPS_SNOOP_NVIDIA bits into a flat type of two bits. This
reduces the bits usages, and assign AZX_DCAPS_OFF to this empty bit
now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/hda_intel.c | 71 +++++++++++++++++++++++++----------------------
sound/pci/hda/hda_priv.h | 12 ++++++--
2 files changed, 47 insertions(+), 36 deletions(-)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 8413797..81f24e5 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -272,43 +272,52 @@ enum {
AZX_NUM_DRIVERS, /* keep this as last entry */
};
+#define azx_get_snoop_type(chip) \
+ (((chip)->driver_caps & AZX_DCAPS_SNOOP_MASK) >> 10)
+#define AZX_DCAPS_SNOOP_TYPE(type) ((AZX_SNOOP_TYPE_ ## type) << 10)
+
/* quirks for Intel PCH */
#define AZX_DCAPS_INTEL_PCH_NOPM \
- (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_BUFSIZE | \
- AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_REVERSE_ASSIGN)
+ (AZX_DCAPS_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY |\
+ AZX_DCAPS_REVERSE_ASSIGN | AZX_DCAPS_SNOOP_TYPE(SCH))
#define AZX_DCAPS_INTEL_PCH \
(AZX_DCAPS_INTEL_PCH_NOPM | AZX_DCAPS_PM_RUNTIME)
#define AZX_DCAPS_INTEL_HASWELL \
- (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_ALIGN_BUFSIZE | \
- AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME | \
- AZX_DCAPS_I915_POWERWELL)
+ (AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_COUNT_LPIB_DELAY |\
+ AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_POWERWELL |\
+ AZX_DCAPS_SNOOP_TYPE(SCH))
/* Broadwell HDMI can't use position buffer reliably, force to use LPIB */
#define AZX_DCAPS_INTEL_BROADWELL \
- (AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_ALIGN_BUFSIZE | \
- AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_PM_RUNTIME | \
- AZX_DCAPS_I915_POWERWELL)
+ (AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_POSFIX_LPIB |\
+ AZX_DCAPS_PM_RUNTIME | AZX_DCAPS_I915_POWERWELL |\
+ AZX_DCAPS_SNOOP_TYPE(SCH))
/* quirks for ATI SB / AMD Hudson */
#define AZX_DCAPS_PRESET_ATI_SB \
- (AZX_DCAPS_ATI_SNOOP | AZX_DCAPS_NO_TCSEL | \
- AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB)
+ (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB |\
+ AZX_DCAPS_SNOOP_TYPE(ATI))
/* quirks for ATI/AMD HDMI */
#define AZX_DCAPS_PRESET_ATI_HDMI \
(AZX_DCAPS_NO_TCSEL | AZX_DCAPS_SYNC_WRITE | AZX_DCAPS_POSFIX_LPIB|\
AZX_DCAPS_NO_MSI64)
+/* quirks for ATI HDMI with snoop off */
+#define AZX_DCAPS_PRESET_ATI_HDMI_NS \
+ (AZX_DCAPS_PRESET_ATI_HDMI | AZX_DCAPS_SNOOP_OFF)
+
/* quirks for Nvidia */
#define AZX_DCAPS_PRESET_NVIDIA \
- (AZX_DCAPS_NVIDIA_SNOOP | AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI |\
- AZX_DCAPS_ALIGN_BUFSIZE | AZX_DCAPS_NO_64BIT |\
- AZX_DCAPS_CORBRP_SELF_CLEAR)
+ (AZX_DCAPS_RIRB_DELAY | AZX_DCAPS_NO_MSI | AZX_DCAPS_ALIGN_BUFSIZE |\
+ AZX_DCAPS_NO_64BIT | AZX_DCAPS_CORBRP_SELF_CLEAR |\
+ AZX_DCAPS_SNOOP_TYPE(NVIDIA))
#define AZX_DCAPS_PRESET_CTHDA \
- (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_4K_BDLE_BOUNDARY)
+ (AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB |\
+ AZX_DCAPS_4K_BDLE_BOUNDARY | AZX_DCAPS_SNOOP_OFF)
/*
* VGA-switcher support
@@ -437,6 +446,8 @@ static void update_pci_byte(struct pci_dev *pci, unsigned int reg,
static void azx_init_pci(struct azx *chip)
{
+ int snoop_type = azx_get_snoop_type(chip);
+
/* Clear bits 0-2 of PCI register TCSEL (at offset 0x44)
* TCSEL == Traffic Class Select Register, which sets PCI express QOS
* Ensuring these bits are 0 clears playback static on some HD Audio
@@ -451,7 +462,7 @@ static void azx_init_pci(struct azx *chip)
/* For ATI SB450/600/700/800/900 and AMD Hudson azalia HD audio,
* we need to enable snoop.
*/
- if (chip->driver_caps & AZX_DCAPS_ATI_SNOOP) {
+ if (snoop_type == AZX_SNOOP_TYPE_ATI) {
dev_dbg(chip->card->dev, "Setting ATI snoop: %d\n",
azx_snoop(chip));
update_pci_byte(chip->pci,
@@ -460,7 +471,7 @@ static void azx_init_pci(struct azx *chip)
}
/* For NVIDIA HDA, enable snoop */
- if (chip->driver_caps & AZX_DCAPS_NVIDIA_SNOOP) {
+ if (snoop_type == AZX_SNOOP_TYPE_NVIDIA) {
dev_dbg(chip->card->dev, "Setting Nvidia snoop: %d\n",
azx_snoop(chip));
update_pci_byte(chip->pci,
@@ -475,7 +486,7 @@ static void azx_init_pci(struct azx *chip)
}
/* Enable SCH/PCH snoop if needed */
- if (chip->driver_caps & AZX_DCAPS_SCH_SNOOP) {
+ if (snoop_type == AZX_SNOOP_TYPE_SCH) {
unsigned short snoop;
pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop);
if ((!azx_snoop(chip) && !(snoop & INTEL_SCH_HDA_DEVC_NOSNOOP)) ||
@@ -1363,8 +1374,8 @@ static void azx_check_snoop_available(struct azx *chip)
{
bool snoop = chip->snoop;
- switch (chip->driver_type) {
- case AZX_DRIVER_VIA:
+ if (azx_get_snoop_type(chip) == AZX_SNOOP_TYPE_NONE &&
+ chip->driver_type == AZX_DRIVER_VIA) {
/* force to non-snoop mode for a new VIA controller
* when BIOS is set
*/
@@ -1374,17 +1385,11 @@ static void azx_check_snoop_available(struct azx *chip)
if (!(val & 0x80) && chip->pci->revision == 0x30)
snoop = false;
}
- break;
- case AZX_DRIVER_ATIHDMI_NS:
- /* new ATI HDMI requires non-snoop */
- snoop = false;
- break;
- case AZX_DRIVER_CTHDA:
- case AZX_DRIVER_CMEDIA:
- snoop = false;
- break;
}
+ if (chip->driver_caps & AZX_DCAPS_SNOOP_OFF)
+ snoop = false;
+
if (snoop != chip->snoop) {
dev_info(chip->card->dev, "Force to %s mode\n",
snoop ? "snoop" : "non-snoop");
@@ -2131,13 +2136,13 @@ static const struct pci_device_id azx_ids[] = {
{ PCI_DEVICE(0x1002, 0xaa98),
.driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
{ PCI_DEVICE(0x1002, 0x9902),
- .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI },
+ .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
{ PCI_DEVICE(0x1002, 0xaaa0),
- .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI },
+ .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
{ PCI_DEVICE(0x1002, 0xaaa8),
- .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI },
+ .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
{ PCI_DEVICE(0x1002, 0xaab0),
- .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI },
+ .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
/* VIA VT8251/VT8237A */
{ PCI_DEVICE(0x1106, 0x3288),
.driver_data = AZX_DRIVER_VIA | AZX_DCAPS_POSFIX_VIA },
@@ -2184,7 +2189,7 @@ static const struct pci_device_id azx_ids[] = {
/* CM8888 */
{ PCI_DEVICE(0x13f6, 0x5011),
.driver_data = AZX_DRIVER_CMEDIA |
- AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB },
+ AZX_DCAPS_NO_MSI | AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_SNOOP_OFF },
/* Vortex86MX */
{ PCI_DEVICE(0x17f3, 0x3010), .driver_data = AZX_DRIVER_GENERIC },
/* VMware HDAudio */
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h
index 5016014..a09703a 100644
--- a/sound/pci/hda/hda_priv.h
+++ b/sound/pci/hda/hda_priv.h
@@ -152,9 +152,8 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
/* bits 0-7 are used for indicating driver type */
#define AZX_DCAPS_NO_TCSEL (1 << 8) /* No Intel TCSEL bit */
#define AZX_DCAPS_NO_MSI (1 << 9) /* No MSI support */
-#define AZX_DCAPS_ATI_SNOOP (1 << 10) /* ATI snoop enable */
-#define AZX_DCAPS_NVIDIA_SNOOP (1 << 11) /* Nvidia snoop enable */
-#define AZX_DCAPS_SCH_SNOOP (1 << 12) /* SCH/PCH snoop enable */
+#define AZX_DCAPS_SNOOP_MASK (3 << 10) /* snoop type mask */
+#define AZX_DCAPS_SNOOP_OFF (1 << 12) /* snoop default off */
#define AZX_DCAPS_RIRB_DELAY (1 << 13) /* Long delay in read loop */
#define AZX_DCAPS_RIRB_PRE_DELAY (1 << 14) /* Put a delay before read */
#define AZX_DCAPS_CTX_WORKAROUND (1 << 15) /* X-Fi workaround */
@@ -173,6 +172,13 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
#define AZX_DCAPS_CORBRP_SELF_CLEAR (1 << 28) /* CORBRP clears itself after reset */
#define AZX_DCAPS_NO_MSI64 (1 << 29) /* Stick to 32-bit MSIs */
+enum {
+ AZX_SNOOP_TYPE_NONE ,
+ AZX_SNOOP_TYPE_SCH,
+ AZX_SNOOP_TYPE_ATI,
+ AZX_SNOOP_TYPE_NVIDIA,
+};
+
/* HD Audio class code */
#define PCI_CLASS_MULTIMEDIA_HD_AUDIO 0x0403
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 117/178] ALSA: hda - Fix noise on AMD radeon 290x controller
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (115 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 116/178] ALSA: hda - Add AZX_DCAPS_SNOOP_OFF (and refactor snoop setup) Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 118/178] ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls Sasha Levin
` (61 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Takashi Iwai <tiwai@suse.de>
[ Upstream commit 0fa372b6c95013af1334b3d5c9b5f03a70ecedab ]
A new AMD controller [1002:aac8] seems to need the quirk for other AMD
NS HDMI stuff, otherwise it gives noisy sounds.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=99021
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/pci/hda/hda_intel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 81f24e5..ddfc8a8 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2143,6 +2143,8 @@ static const struct pci_device_id azx_ids[] = {
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
{ PCI_DEVICE(0x1002, 0xaab0),
.driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
+ { PCI_DEVICE(0x1002, 0xaac8),
+ .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
/* VIA VT8251/VT8237A */
{ PCI_DEVICE(0x1106, 0x3288),
.driver_data = AZX_DRIVER_VIA | AZX_DCAPS_POSFIX_VIA },
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 118/178] ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (116 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 117/178] ALSA: hda - Fix noise on AMD radeon 290x controller Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 119/178] ASoC: dapm: Modify widget stream name according to prefix Sasha Levin
` (60 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Axel Lin <axel.lin@ingics.com>
[ Upstream commit 545774bd6e1427d98dde77244329d2311c5eca6f ]
mc13xxx_reg_rmw() won't change any bit if passing 0 to the mask field.
Pass AUDIO_SSI_SEL instead of 0 for the mask field to set AUDIO_SSI_SEL
bit.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/soc/codecs/mc13783.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 71f775a..2f98417 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -623,14 +623,14 @@ static int mc13783_probe(struct snd_soc_codec *codec)
AUDIO_SSI_SEL, 0);
else
mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_CODEC,
- 0, AUDIO_SSI_SEL);
+ AUDIO_SSI_SEL, AUDIO_SSI_SEL);
if (priv->dac_ssi_port == MC13783_SSI1_PORT)
mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC,
AUDIO_SSI_SEL, 0);
else
mc13xxx_reg_rmw(priv->mc13xxx, MC13783_AUDIO_DAC,
- 0, AUDIO_SSI_SEL);
+ AUDIO_SSI_SEL, AUDIO_SSI_SEL);
return 0;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 119/178] ASoC: dapm: Modify widget stream name according to prefix
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (117 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 118/178] ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 120/178] ASoC: wm8960: fix "RINPUT3" audio route error Sasha Levin
` (59 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Koro Chen <koro.chen@mediatek.com>
[ Upstream commit fdb6eb0a12871d5bfaf266c5a0d5259a5437a72f ]
When there is prefix specified, currently we will add this prefix in
widget->name, but not in widget->sname.
it causes failure at snd_soc_dapm_link_dai_widgets:
if (!w->sname || !strstr(w->sname, dai_w->name))
because dai_w->name has prefix added, but w->sname does not.
We should also add prefix for stream name
Signed-off-by: Koro Chen <koro.chen@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/soc/soc-dapm.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index c61cb9c..943e6a9 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3076,11 +3076,16 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
}
prefix = soc_dapm_prefix(dapm);
- if (prefix)
+ if (prefix) {
w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name);
- else
+ if (widget->sname)
+ w->sname = kasprintf(GFP_KERNEL, "%s %s", prefix,
+ widget->sname);
+ } else {
w->name = kasprintf(GFP_KERNEL, "%s", widget->name);
-
+ if (widget->sname)
+ w->sname = kasprintf(GFP_KERNEL, "%s", widget->sname);
+ }
if (w->name == NULL) {
kfree(w);
return NULL;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 120/178] ASoC: wm8960: fix "RINPUT3" audio route error
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (118 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 119/178] ASoC: dapm: Modify widget stream name according to prefix Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 121/178] ASoC: wm8994: correct BCLK DIV 348 to 384 Sasha Levin
` (58 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Zidan Wang <zidan.wang@freescale.com>
[ Upstream commit 85e36a1f4a735d991ba5106781ea48e89a0b8901 ]
It should be "RINPUT3" instead of "LINPUT3" route to "Right Input
Mixer".
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/soc/codecs/wm8960.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index ab9931c..34a18a9 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -392,7 +392,7 @@ static const struct snd_soc_dapm_route audio_paths[] = {
{ "Right Input Mixer", "Boost Switch", "Right Boost Mixer", },
{ "Right Input Mixer", NULL, "RINPUT1", }, /* Really Boost Switch */
{ "Right Input Mixer", NULL, "RINPUT2" },
- { "Right Input Mixer", NULL, "LINPUT3" },
+ { "Right Input Mixer", NULL, "RINPUT3" },
{ "Left ADC", NULL, "Left Input Mixer" },
{ "Right ADC", NULL, "Right Input Mixer" },
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 121/178] ASoC: wm8994: correct BCLK DIV 348 to 384
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (119 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 120/178] ASoC: wm8960: fix "RINPUT3" audio route error Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 122/178] RDMA/core: Fix for parsing netlink string attribute Sasha Levin
` (57 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Zidan Wang <zidan.wang@freescale.com>
[ Upstream commit 17fc2e0a3db11889e942c5ab15a1fcb876638f25 ]
According to the RM of wm8958, BCLK DIV 348 doesn't exist, correct it
to 384.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
sound/soc/codecs/wm8994.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 1fcb9f3..e5f14c8 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2753,7 +2753,7 @@ static struct {
};
static int fs_ratios[] = {
- 64, 128, 192, 256, 348, 512, 768, 1024, 1408, 1536
+ 64, 128, 192, 256, 384, 512, 768, 1024, 1408, 1536
};
static int bclk_divs[] = {
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 122/178] RDMA/core: Fix for parsing netlink string attribute
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (120 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 121/178] ASoC: wm8994: correct BCLK DIV 348 to 384 Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 123/178] staging: gdm724x: Correction of variable usage after applying ALIGN() Sasha Levin
` (56 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
[ Upstream commit ec04847c0c5b471bab2dacceadfdb803a9d1a2ea ]
The string iwpm_ulib_name is recorded in a nlmsg as a netlink attribute.
Without this fix parsing of the nlmsg by the userspace port mapper service fails
because of unknown attribute length, causing the port mapper service not to
register the client, which has sent the nlmsg.
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Cc: <stable@vger.kernel.org> #v3.16
Reviewed-By: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/infiniband/core/iwpm_msg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/iwpm_msg.c b/drivers/infiniband/core/iwpm_msg.c
index b85ddbc..e5558b2 100644
--- a/drivers/infiniband/core/iwpm_msg.c
+++ b/drivers/infiniband/core/iwpm_msg.c
@@ -33,7 +33,7 @@
#include "iwpm_util.h"
-static const char iwpm_ulib_name[] = "iWarpPortMapperUser";
+static const char iwpm_ulib_name[IWPM_ULIBNAME_SIZE] = "iWarpPortMapperUser";
static int iwpm_ulib_version = 3;
static int iwpm_user_pid = IWPM_PID_UNDEFINED;
static atomic_t echo_nlmsg_seq;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 123/178] staging: gdm724x: Correction of variable usage after applying ALIGN()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (121 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 122/178] RDMA/core: Fix for parsing netlink string attribute Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 124/178] staging: vt6656: use ieee80211_tx_info to select packet type Sasha Levin
` (55 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Sławomir Demeszko <s.demeszko@wireless-instruments.com>
[ Upstream commit 892c89d5d7ffd1bb794fe54d86c0eef18d215fab ]
Fix regression introduced by commit <29ef8a53542a>. After it writing
AT commands to /dev/GCT-ATM0 is unsuccessful (no echo, no response)
and dmesg show "gdmtty: invalid payload : 1 16 f011".
Before that commit value of dummy_cnt was only a padding size. After using
ALIGN() this value is increased by its first argument. So the following
usage of this variable needs correction.
Signed-off-by: Sławomir Demeszko <s.demeszko@wireless-instruments.com>
Cc: stable <stable@vger.kernel.org> # 3.14+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/staging/gdm724x/gdm_mux.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/gdm724x/gdm_mux.c b/drivers/staging/gdm724x/gdm_mux.c
index b5b063a..fe41044 100644
--- a/drivers/staging/gdm724x/gdm_mux.c
+++ b/drivers/staging/gdm724x/gdm_mux.c
@@ -158,7 +158,7 @@ static int up_to_host(struct mux_rx *r)
unsigned int start_flag;
unsigned int payload_size;
unsigned short packet_type;
- int dummy_cnt;
+ int total_len;
u32 packet_size_sum = r->offset;
int index;
int ret = TO_HOST_INVALID_PACKET;
@@ -176,10 +176,10 @@ static int up_to_host(struct mux_rx *r)
break;
}
- dummy_cnt = ALIGN(MUX_HEADER_SIZE + payload_size, 4);
+ total_len = ALIGN(MUX_HEADER_SIZE + payload_size, 4);
if (len - packet_size_sum <
- MUX_HEADER_SIZE + payload_size + dummy_cnt) {
+ total_len) {
pr_err("invalid payload : %d %d %04x\n",
payload_size, len, packet_type);
break;
@@ -202,7 +202,7 @@ static int up_to_host(struct mux_rx *r)
break;
}
- packet_size_sum += MUX_HEADER_SIZE + payload_size + dummy_cnt;
+ packet_size_sum += total_len;
if (len - packet_size_sum <= MUX_HEADER_SIZE + 2) {
ret = r->callback(NULL,
0,
@@ -361,7 +361,6 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index,
struct mux_pkt_header *mux_header;
struct mux_tx *t = NULL;
static u32 seq_num = 1;
- int dummy_cnt;
int total_len;
int ret;
unsigned long flags;
@@ -374,9 +373,7 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index,
spin_lock_irqsave(&mux_dev->write_lock, flags);
- dummy_cnt = ALIGN(MUX_HEADER_SIZE + len, 4);
-
- total_len = len + MUX_HEADER_SIZE + dummy_cnt;
+ total_len = ALIGN(MUX_HEADER_SIZE + len, 4);
t = alloc_mux_tx(total_len);
if (!t) {
@@ -392,7 +389,8 @@ static int gdm_mux_send(void *priv_dev, void *data, int len, int tty_index,
mux_header->packet_type = __cpu_to_le16(packet_type[tty_index]);
memcpy(t->buf+MUX_HEADER_SIZE, data, len);
- memset(t->buf+MUX_HEADER_SIZE+len, 0, dummy_cnt);
+ memset(t->buf+MUX_HEADER_SIZE+len, 0, total_len - MUX_HEADER_SIZE -
+ len);
t->len = total_len;
t->callback = cb;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 124/178] staging: vt6656: use ieee80211_tx_info to select packet type.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (122 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 123/178] staging: gdm724x: Correction of variable usage after applying ALIGN() Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 125/178] perf/x86/rapl: Enable Broadwell-U RAPL support Sasha Levin
` (54 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Malcolm Priestley <tvboxspy@gmail.com>
[ Upstream commit b23f14302e86628625ac3982a6d23e35888755f2 ]
Information for packet type is in ieee80211_tx_info
band IEEE80211_BAND_5GHZ for PK_TYPE_11A.
IEEE80211_TX_RC_USE_CTS_PROTECT via tx_rate flags selects PK_TYPE_11GB
This ensures that the packet is always the right type.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/staging/vt6656/rxtx.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index ea5140a..b3500fd 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -800,10 +800,18 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
vnt_schedule_command(priv, WLAN_CMD_SETPOWER);
}
- if (current_rate > RATE_11M)
- pkt_type = priv->packet_type;
- else
+ if (current_rate > RATE_11M) {
+ if (info->band == IEEE80211_BAND_5GHZ) {
+ pkt_type = PK_TYPE_11A;
+ } else {
+ if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
+ pkt_type = PK_TYPE_11GB;
+ else
+ pkt_type = PK_TYPE_11GA;
+ }
+ } else {
pkt_type = PK_TYPE_11B;
+ }
spin_lock_irqsave(&priv->lock, flags);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 125/178] perf/x86/rapl: Enable Broadwell-U RAPL support
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (123 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 124/178] staging: vt6656: use ieee80211_tx_info to select packet type Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 126/178] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Sasha Levin
` (53 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Stephane Eranian <eranian@google.com>
[ Upstream commit 44b11fee51711ca85aa2b121a49bf029d18a3722 ]
This patch enables RAPL counters (energy consumption counters)
support for Intel Broadwell-U processors (Model 61):
To use:
$ perf stat -a -I 1000 -e power/energy-cores/,power/energy-pkg/,power/energy-ram/ sleep 10
Signed-off-by: Stephane Eranian <eranian@google.com>
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: jacob.jun.pan@linux.intel.com
Cc: kan.liang@intel.com
Cc: peterz@infradead.org
Cc: sonnyrao@chromium.org
Link: http://lkml.kernel.org/r/20150423070709.GA4970@thinkpad
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/x86/kernel/cpu/perf_event_intel_rapl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_rapl.c b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
index 8c25674..611d821 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
@@ -664,6 +664,7 @@ static int __init rapl_pmu_init(void)
break;
case 60: /* Haswell */
case 69: /* Haswell-Celeron */
+ case 61: /* Broadwell */
rapl_cntr_mask = RAPL_IDX_HSW;
rapl_pmu_events_group.attrs = rapl_events_hsw_attr;
break;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 126/178] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (124 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 125/178] perf/x86/rapl: Enable Broadwell-U RAPL support Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 127/178] xhci: fix isoc endpoint dequeue from advancing too far on transaction error Sasha Levin
` (52 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Andy Grover <agrover@redhat.com>
[ Upstream commit 5a7125c64def3b21f8147eca8b54949a60963942 ]
See https://bugzilla.redhat.com/show_bug.cgi?id=1025672
We need to put() the reference to the scsi host that we got in
pscsi_configure_device(). In VIRTUAL_HOST mode it is associated with
the dev_virt, not the hba_virt.
Signed-off-by: Andy Grover <agrover@redhat.com>
Cc: stable@vger.kernel.org # 2.6.38+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/target/target_core_pscsi.c | 3 +++
drivers/target/target_core_pscsi.h | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 9a54381..3ee77db 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -520,6 +520,7 @@ static int pscsi_configure_device(struct se_device *dev)
" pdv_host_id: %d\n", pdv->pdv_host_id);
return -EINVAL;
}
+ pdv->pdv_lld_host = sh;
}
} else {
if (phv->phv_mode == PHV_VIRTUAL_HOST_ID) {
@@ -602,6 +603,8 @@ static void pscsi_free_device(struct se_device *dev)
if ((phv->phv_mode == PHV_LLD_SCSI_HOST_NO) &&
(phv->phv_lld_host != NULL))
scsi_host_put(phv->phv_lld_host);
+ else if (pdv->pdv_lld_host)
+ scsi_host_put(pdv->pdv_lld_host);
if ((sd->type == TYPE_DISK) || (sd->type == TYPE_ROM))
scsi_device_put(sd);
diff --git a/drivers/target/target_core_pscsi.h b/drivers/target/target_core_pscsi.h
index 1bd757d..820d305 100644
--- a/drivers/target/target_core_pscsi.h
+++ b/drivers/target/target_core_pscsi.h
@@ -45,6 +45,7 @@ struct pscsi_dev_virt {
int pdv_lun_id;
struct block_device *pdv_bd;
struct scsi_device *pdv_sd;
+ struct Scsi_Host *pdv_lld_host;
} ____cacheline_aligned;
typedef enum phv_modes {
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 127/178] xhci: fix isoc endpoint dequeue from advancing too far on transaction error
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (125 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 126/178] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 128/178] xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256 Sasha Levin
` (51 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Mathias Nyman <mathias.nyman@linux.intel.com>
[ Upstream commit d104d0152a97fade389f47635b73a9ccc7295d0b ]
Isoc TDs usually consist of one TRB, sometimes two. When all goes well we
receive only one success event for a TD, and move the dequeue pointer to
the next TD.
This fails if the TD consists of two TRBs and we get a transfer error
on the first TRB, we will then see two events for that TD.
Fix this by making sure the event we get is for the last TRB in that TD
before moving the dequeue pointer to the next TD. This will resolve some
of the uvc and dvb issues with the
"ERROR Transfer event TRB DMA ptr not part of current TD" error message
Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/host/xhci-ring.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 3307e16..27139b9 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2037,8 +2037,13 @@ static int process_isoc_td(struct xhci_hcd *xhci, struct xhci_td *td,
break;
case COMP_DEV_ERR:
case COMP_STALL:
+ frame->status = -EPROTO;
+ skip_td = true;
+ break;
case COMP_TX_ERR:
frame->status = -EPROTO;
+ if (event_trb != td->last_trb)
+ return 0;
skip_td = true;
break;
case COMP_STOP:
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 128/178] xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (126 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 127/178] xhci: fix isoc endpoint dequeue from advancing too far on transaction error Sasha Levin
@ 2015-06-08 13:41 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 129/178] xhci: gracefully handle xhci_irq dead device Sasha Levin
` (50 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:41 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Mathias Nyman <mathias.nyman@linux.intel.com>
[ Upstream commit 18cc2f4cbbaf825a4fedcf2d60fd388d291e0a38 ]
Our event ring consists of only one segment, and we risk filling
the event ring in case we get isoc transfers with short intervals
such as webcams that fill a TD every microframe (125us)
With 64 TRB segment size one usb camera could fill the event ring in 8ms.
A setup with several cameras and other devices can fill up the
event ring as it is shared between all devices.
This has occurred when uvcvideo queues 5 * 32TD URBs which then
get cancelled when the video mode changes. The cancelled URBs are returned
in the xhci interrupt context and blocks the interrupt handler from
handling the new events.
A full event ring will block xhci from scheduling traffic and affect all
devices conneted to the xhci, will see errors such as Missed Service
Intervals for isoc devices, and and Split transaction errors for LS/FS
interrupt devices.
Increasing the TRB_PER_SEGMENT will also increase the default endpoint ring
size, which is welcome as for most isoc transfer we had to dynamically
expand the endpoint ring anyway to be able to queue the 5 * 32TDs uvcvideo
queues.
The default size used to be 64 TRBs per segment
Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/host/xhci.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 9425114..54f386f 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1267,7 +1267,7 @@ union xhci_trb {
* since the command ring is 64-byte aligned.
* It must also be greater than 16.
*/
-#define TRBS_PER_SEGMENT 64
+#define TRBS_PER_SEGMENT 256
/* Allow two commands + a link TRB, along with any reserved command TRBs */
#define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3)
#define TRB_SEGMENT_SIZE (TRBS_PER_SEGMENT*16)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 129/178] xhci: gracefully handle xhci_irq dead device
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (127 preceding siblings ...)
2015-06-08 13:41 ` [PATCH 3.18 128/178] xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256 Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 130/178] USB: visor: Match I330 phone more precisely Sasha Levin
` (49 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Joe Lawrence <joe.lawrence@stratus.com>
[ Upstream commit 948fa13504f80b9765d2b753691ab94c83a10341 ]
If the xHCI host controller has died (ie, device removed) or suffered
other serious fatal error (STS_FATAL), then xhci_irq should handle this
condition with IRQ_HANDLED instead of -ESHUTDOWN.
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/host/xhci-ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 27139b9..9848a67 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2656,7 +2656,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
xhci_halt(xhci);
hw_died:
spin_unlock(&xhci->lock);
- return -ESHUTDOWN;
+ return IRQ_HANDLED;
}
/*
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 130/178] USB: visor: Match I330 phone more precisely
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (128 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 129/178] xhci: gracefully handle xhci_irq dead device Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 131/178] USB: pl2303: Remove support for Samsung I330 Sasha Levin
` (48 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
[ Upstream commit 82ee3aeb9295c5fc37fd2ddf20f13ac2b40ec97d ]
Samsung has just released a portable USB3 SSD, coming in a very small
and nice form factor. It's USB ID is 04e8:8001, which unfortunately is
already used by the Palm Visor driver for the Samsung I330 phone cradle.
Having pl2303 or visor pick up this device ID results in conflicts with
the usb-storage driver, which handles the newly released portable USB3
SSD.
To work around this conflict, I've dug up a mailing list post [1] from a
long time ago, in which a user posts the full USB descriptor
information. The most specific value in this appears to be the interface
class, which has value 255 (0xff). Since usb-storage requires an
interface class of 0x8, I believe it's correct to disambiguate the two
devices by matching on 0xff inside visor.
[1] http://permalink.gmane.org/gmane.linux.usb.user/4264
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/serial/visor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index bf2bd40..60afb39 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -95,7 +95,7 @@ static const struct usb_device_id id_table[] = {
.driver_info = (kernel_ulong_t)&palm_os_4_probe },
{ USB_DEVICE(ACER_VENDOR_ID, ACER_S10_ID),
.driver_info = (kernel_ulong_t)&palm_os_4_probe },
- { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID),
+ { USB_DEVICE_INTERFACE_CLASS(SAMSUNG_VENDOR_ID, SAMSUNG_SCH_I330_ID, 0xff),
.driver_info = (kernel_ulong_t)&palm_os_4_probe },
{ USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_SPH_I500_ID),
.driver_info = (kernel_ulong_t)&palm_os_4_probe },
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 131/178] USB: pl2303: Remove support for Samsung I330
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (129 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 130/178] USB: visor: Match I330 phone more precisely Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 132/178] USB: cp210x: add ID for KCF Technologies PRN device Sasha Levin
` (47 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
[ Upstream commit 48ef23a4f686b1e4519d4193c20d26834ff810ff ]
This phone is already supported by the visor driver.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/serial/pl2303.c | 1 -
drivers/usb/serial/pl2303.h | 4 ----
2 files changed, 5 deletions(-)
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 0f872e6..534c308 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -61,7 +61,6 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) },
{ USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) },
{ USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_ID) },
- { USB_DEVICE(SAMSUNG_VENDOR_ID, SAMSUNG_PRODUCT_ID) },
{ USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_SX1),
.driver_info = PL2303_QUIRK_UART_STATE_IDX0 },
{ USB_DEVICE(SIEMENS_VENDOR_ID, SIEMENS_PRODUCT_ID_X65),
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index 71fd9da..e3b7af8 100644
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -62,10 +62,6 @@
#define ALCATEL_VENDOR_ID 0x11f7
#define ALCATEL_PRODUCT_ID 0x02df
-/* Samsung I330 phone cradle */
-#define SAMSUNG_VENDOR_ID 0x04e8
-#define SAMSUNG_PRODUCT_ID 0x8001
-
#define SIEMENS_VENDOR_ID 0x11f5
#define SIEMENS_PRODUCT_ID_SX1 0x0001
#define SIEMENS_PRODUCT_ID_X65 0x0003
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 132/178] USB: cp210x: add ID for KCF Technologies PRN device
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (130 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 131/178] USB: pl2303: Remove support for Samsung I330 Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 133/178] usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices Sasha Levin
` (46 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Mark Edwards <sonofaforester@gmail.com>
[ Upstream commit c735ed74d83f8ecb45c4c4c95a16853c9c3c8157 ]
Added the USB serial console device ID for KCF Technologies PRN device
which has a USB port for its serial console.
Signed-off-by: Mark Edwards <sonofaforester@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/serial/cp210x.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 84ce2d7..9031750 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -127,6 +127,7 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(0x10C4, 0x88A5) }, /* Planet Innovation Ingeni ZigBee USB Device */
{ USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
{ USB_DEVICE(0x10C4, 0x8977) }, /* CEL MeshWorks DevKit Device */
+ { USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
{ USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 133/178] usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (131 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 132/178] USB: cp210x: add ID for KCF Technologies PRN device Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 134/178] usb: gadget: configfs: Fix interfaces array NULL-termination Sasha Levin
` (45 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Hans de Goede <hdegoede@redhat.com>
[ Upstream commit 172115090f5e739660b97694618a2ba86457063a ]
Without this flag some versions of these enclosures do not work.
Cc: stable@vger.kernel.org
Reported-and-tested-by: Christian Schaller <cschalle@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/storage/unusual_devs.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 8adb530..300ef9b 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -766,6 +766,13 @@ UNUSUAL_DEV( 0x059f, 0x0643, 0x0000, 0x0000,
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_GO_SLOW ),
+/* Reported by Christian Schaller <cschalle@redhat.com> */
+UNUSUAL_DEV( 0x059f, 0x0651, 0x0000, 0x0000,
+ "LaCie",
+ "External HDD",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ US_FL_NO_WP_DETECT ),
+
/* Submitted by Joel Bourquard <numlock@freesurf.ch>
* Some versions of this device need the SubClass and Protocol overrides
* while others don't.
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 134/178] usb: gadget: configfs: Fix interfaces array NULL-termination
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (132 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 133/178] usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 135/178] powerpc: Align TOC to 256 bytes Sasha Levin
` (44 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Krzysztof Opasiak <k.opasiak@samsung.com>
[ Upstream commit 903124fe1aa284f61745a9dd4fbfa0184e569fff ]
memset() to 0 interfaces array before reusing
usb_configuration structure.
This commit fix bug:
ln -s functions/acm.1 configs/c.1
ln -s functions/acm.2 configs/c.1
ln -s functions/acm.3 configs/c.1
echo "UDC name" > UDC
echo "" > UDC
rm configs/c.1/acm.*
rmdir functions/*
mkdir functions/ecm.usb0
ln -s functions/ecm.usb0 configs/c.1
echo "UDC name" > UDC
[ 82.220969] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[ 82.229009] pgd = c0004000
[ 82.231698] [00000000] *pgd=00000000
[ 82.235260] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[ 82.240638] Modules linked in:
[ 82.243681] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.0.0-rc2 #39
[ 82.249926] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[ 82.256003] task: c07cd2f0 ti: c07c8000 task.ti: c07c8000
[ 82.261393] PC is at composite_setup+0xe3c/0x1674
[ 82.266073] LR is at composite_setup+0xf20/0x1674
[ 82.270760] pc : [<c03510d4>] lr : [<c03511b8>] psr: 600001d3
[ 82.270760] sp : c07c9df0 ip : c0806448 fp : ed8c9c9c
[ 82.282216] r10: 00000001 r9 : 00000000 r8 : edaae918
[ 82.287425] r7 : ed551cc0 r6 : 00007fff r5 : 00000000 r4 : ed799634
[ 82.293934] r3 : 00000003 r2 : 00010002 r1 : edaae918 r0 : 0000002e
[ 82.300446] Flags: nZCv IRQs off FIQs off Mode SVC_32 ISA ARM Segment kernel
[ 82.307910] Control: 10c5387d Table: 6bc1804a DAC: 00000015
[ 82.313638] Process swapper/0 (pid: 0, stack limit = 0xc07c8210)
[ 82.319627] Stack: (0xc07c9df0 to 0xc07ca000)
[ 82.323969] 9de0: 00000000 c06e65f4 00000000 c07c9f68
[ 82.332130] 9e00: 00000067 c07c59ac 000003f7 edaae918 ed8c9c98 ed799690 eca2f140 200001d3
[ 82.340289] 9e20: ee79a2d8 c07c9e88 c07c5304 ffff55db 00010002 edaae810 edaae860 eda96d50
[ 82.348448] 9e40: 00000009 ee264510 00000007 c07ca444 edaae860 c0340890 c0827a40 ffff55e0
[ 82.356607] 9e60: c0827a40 eda96e40 ee264510 edaae810 00000000 edaae860 00000007 c07ca444
[ 82.364766] 9e80: edaae860 c0354170 c03407dc c033db4c edaae810 00000000 00000000 00000010
[ 82.372925] 9ea0: 00000032 c0341670 00000000 00000000 00000001 eda96e00 00000000 00000000
[ 82.381084] 9ec0: 00000000 00000032 c0803a23 ee1aa840 00000001 c005d54c 249e2450 00000000
[ 82.389244] 9ee0: 200001d3 ee1aa840 ee1aa8a0 ed84f4c0 00000000 c07c9f68 00000067 c07c59ac
[ 82.397403] 9f00: 00000000 c005d688 ee1aa840 ee1aa8a0 c07db4b4 c006009c 00000032 00000000
[ 82.405562] 9f20: 00000001 c005ce20 c07c59ac c005cf34 f002000c c07ca780 c07c9f68 00000057
[ 82.413722] 9f40: f0020000 413fc090 00000001 c00086b4 c000f804 60000053 ffffffff c07c9f9c
[ 82.421880] 9f60: c0803a20 c0011fc0 00000000 00000000 c07c9fb8 c001bee0 c07ca4f0 c057004c
[ 82.430040] 9f80: c07ca4fc c0803a20 c0803a20 413fc090 00000001 00000000 01000000 c07c9fb0
[ 82.438199] 9fa0: c000f800 c000f804 60000053 ffffffff 00000000 c0050e70 c0803bc0 c0783bd8
[ 82.446358] 9fc0: ffffffff ffffffff c0783664 00000000 00000000 c07b13e8 00000000 c0803e54
[ 82.454517] 9fe0: c07ca480 c07b13e4 c07ce40c 4000406a 00000000 40008074 00000000 00000000
[ 82.462689] [<c03510d4>] (composite_setup) from [<c0340890>] (s3c_hsotg_complete_setup+0xb4/0x418)
[ 82.471626] [<c0340890>] (s3c_hsotg_complete_setup) from [<c0354170>] (usb_gadget_giveback_request+0xc/0x10)
[ 82.481429] [<c0354170>] (usb_gadget_giveback_request) from [<c033db4c>] (s3c_hsotg_complete_request+0xcc/0x12c)
[ 82.491583] [<c033db4c>] (s3c_hsotg_complete_request) from [<c0341670>] (s3c_hsotg_irq+0x4fc/0x558)
[ 82.500614] [<c0341670>] (s3c_hsotg_irq) from [<c005d54c>] (handle_irq_event_percpu+0x50/0x150)
[ 82.509291] [<c005d54c>] (handle_irq_event_percpu) from [<c005d688>] (handle_irq_event+0x3c/0x5c)
[ 82.518145] [<c005d688>] (handle_irq_event) from [<c006009c>] (handle_fasteoi_irq+0xd4/0x18c)
[ 82.526650] [<c006009c>] (handle_fasteoi_irq) from [<c005ce20>] (generic_handle_irq+0x20/0x30)
[ 82.535242] [<c005ce20>] (generic_handle_irq) from [<c005cf34>] (__handle_domain_irq+0x6c/0xdc)
[ 82.543923] [<c005cf34>] (__handle_domain_irq) from [<c00086b4>] (gic_handle_irq+0x2c/0x6c)
[ 82.552256] [<c00086b4>] (gic_handle_irq) from [<c0011fc0>] (__irq_svc+0x40/0x74)
[ 82.559716] Exception stack(0xc07c9f68 to 0xc07c9fb0)
[ 82.564753] 9f60: 00000000 00000000 c07c9fb8 c001bee0 c07ca4f0 c057004c
[ 82.572913] 9f80: c07ca4fc c0803a20 c0803a20 413fc090 00000001 00000000 01000000 c07c9fb0
[ 82.581069] 9fa0: c000f800 c000f804 60000053 ffffffff
[ 82.586113] [<c0011fc0>] (__irq_svc) from [<c000f804>] (arch_cpu_idle+0x30/0x3c)
[ 82.593491] [<c000f804>] (arch_cpu_idle) from [<c0050e70>] (cpu_startup_entry+0x128/0x1a4)
[ 82.601740] [<c0050e70>] (cpu_startup_entry) from [<c0783bd8>] (start_kernel+0x350/0x3bc)
[ 82.609890] Code: 0a000002 e3530005 05975010 15975008 (e5953000)
[ 82.615965] ---[ end trace f57d5f599a5f1bfa ]---
Most of kernel code assume that interface array in
struct usb_configuration is NULL terminated.
When gadget is composed with configfs configuration
structure may be reused for different functions set.
This bug happens because purge_configs_funcs() sets
only next_interface_id to 0. Interface array still
contains pointers to already freed interfaces. If in
second try we add less interfaces than earlier we
may access unallocated memory when trying to get
interface descriptors.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Cc: <stable@vger.kernel.org> # 3.10+
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/usb/gadget/configfs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 28d3dd3..a7e1a96 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -1295,6 +1295,7 @@ static void purge_configs_funcs(struct gadget_info *gi)
}
}
c->next_interface_id = 0;
+ memset(c->interface, 0, sizeof(c->interface));
c->superspeed = 0;
c->highspeed = 0;
c->fullspeed = 0;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 135/178] powerpc: Align TOC to 256 bytes
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (133 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 134/178] usb: gadget: configfs: Fix interfaces array NULL-termination Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 136/178] mmc: atmel-mci: fix bad variable type for clkdiv Sasha Levin
` (43 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Anton Blanchard <anton@samba.org>
[ Upstream commit 5e95235ccd5442d4a4fe11ec4eb99ba1b7959368 ]
Recent toolchains force the TOC to be 256 byte aligned. We need
to enforce this alignment in our linker script, otherwise pointers
to our TOC variables (__toc_start, __prom_init_toc_start) could
be incorrect.
If they are bad, we die a few hundred instructions into boot.
Cc: stable@vger.kernel.org
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/powerpc/kernel/vmlinux.lds.S | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index f096e72..1db6851 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -213,6 +213,7 @@ SECTIONS
*(.opd)
}
+ . = ALIGN(256);
.got : AT(ADDR(.got) - LOAD_OFFSET) {
__toc_start = .;
#ifndef CONFIG_RELOCATABLE
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 136/178] mmc: atmel-mci: fix bad variable type for clkdiv
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (134 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 135/178] powerpc: Align TOC to 256 bytes Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 137/178] tty/n_gsm.c: fix a memory leak when gsmtty is removed Sasha Levin
` (42 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Ludovic Desroches <ludovic.desroches@atmel.com>
[ Upstream commit 60c8f783a18feb95ad967c87e9660caf09fb4700 ]
clkdiv is declared as an u32 but it can be set to a negative value
causing a huge divisor value. Change its type to int to avoid this case.
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Cc: <stable@vger.kernel.org> # 3.4 and later
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/mmc/host/atmel-mci.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index 77250d4..6423083 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1295,7 +1295,7 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (ios->clock) {
unsigned int clock_min = ~0U;
- u32 clkdiv;
+ int clkdiv;
clk_prepare(host->mck);
unprepare_clk = true;
@@ -1324,7 +1324,12 @@ static void atmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
/* Calculate clock divider */
if (host->caps.has_odd_clk_div) {
clkdiv = DIV_ROUND_UP(host->bus_hz, clock_min) - 2;
- if (clkdiv > 511) {
+ if (clkdiv < 0) {
+ dev_warn(&mmc->class_dev,
+ "clock %u too fast; using %lu\n",
+ clock_min, host->bus_hz / 2);
+ clkdiv = 0;
+ } else if (clkdiv > 511) {
dev_warn(&mmc->class_dev,
"clock %u too slow; using %lu\n",
clock_min, host->bus_hz / (511 + 2));
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 137/178] tty/n_gsm.c: fix a memory leak when gsmtty is removed
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (135 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 136/178] mmc: atmel-mci: fix bad variable type for clkdiv Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 138/178] ext4: fix NULL pointer dereference when journal restart fails Sasha Levin
` (41 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Pan Xinhui <xinhuix.pan@intel.com>
[ Upstream commit 8f9cfeed3eae86c70d3b04445a6f2036b27b6304 ]
when gsmtty_remove put dlci, it will cause memory leak if dlci->port's refcount is zero.
So we do the cleanup work in .cleanup callback instead.
dlci will be last put in two call chains.
1) gsmld_close -> gsm_cleanup_mux -> gsm_dlci_release -> dlci_put
2) gsmld_remove -> dlci_put
so there is a race. the memory leak depends on the race.
In call chain 2. we hit the memory leak. below comment tells.
release_tty -> tty_driver_remove_tty -> gsmtty_remove -> dlci_put -> tty_port_destructor (WARN_ON(port->itty) and return directly)
|
tty->port->itty = NULL;
|
tty_kref_put ---> release_one_tty -> gsmtty_cleanup (added by our patch)
So our patch fix the memory leak by doing the cleanup work after tty core did.
Signed-off-by: Pan Xinhui <xinhuix.pan@intel.com>
Fixes: dfabf7ffa30585
Cc: stable <stable@vger.kernel.org> # 3.14+
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/tty/n_gsm.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index c434376..bce16e4 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -3170,7 +3170,7 @@ static int gsmtty_break_ctl(struct tty_struct *tty, int state)
return gsmtty_modem_update(dlci, encode);
}
-static void gsmtty_remove(struct tty_driver *driver, struct tty_struct *tty)
+static void gsmtty_cleanup(struct tty_struct *tty)
{
struct gsm_dlci *dlci = tty->driver_data;
struct gsm_mux *gsm = dlci->gsm;
@@ -3178,7 +3178,6 @@ static void gsmtty_remove(struct tty_driver *driver, struct tty_struct *tty)
dlci_put(dlci);
dlci_put(gsm->dlci[0]);
mux_put(gsm);
- driver->ttys[tty->index] = NULL;
}
/* Virtual ttys for the demux */
@@ -3199,7 +3198,7 @@ static const struct tty_operations gsmtty_ops = {
.tiocmget = gsmtty_tiocmget,
.tiocmset = gsmtty_tiocmset,
.break_ctl = gsmtty_break_ctl,
- .remove = gsmtty_remove,
+ .cleanup = gsmtty_cleanup,
};
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 138/178] ext4: fix NULL pointer dereference when journal restart fails
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (136 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 137/178] tty/n_gsm.c: fix a memory leak when gsmtty is removed Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 139/178] ext4: check for zero length extent explicitly Sasha Levin
` (40 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Lukas Czerner <lczerner@redhat.com>
[ Upstream commit 9d506594069355d1fb2de3f9104667312ff08ed3 ]
Currently when journal restart fails, we'll have the h_transaction of
the handle set to NULL to indicate that the handle has been effectively
aborted. We handle this situation quietly in the jbd2_journal_stop() and just
free the handle and exit because everything else has been done before we
attempted (and failed) to restart the journal.
Unfortunately there are a number of problems with that approach
introduced with commit
41a5b913197c "jbd2: invalidate handle if jbd2_journal_restart()
fails"
First of all in ext4 jbd2_journal_stop() will be called through
__ext4_journal_stop() where we would try to get a hold of the superblock
by dereferencing h_transaction which in this case would lead to NULL
pointer dereference and crash.
In addition we're going to free the handle regardless of the refcount
which is bad as well, because others up the call chain will still
reference the handle so we might potentially reference already freed
memory.
Moreover it's expected that we'll get aborted handle as well as detached
handle in some of the journalling function as the error propagates up
the stack, so it's unnecessary to call WARN_ON every time we get
detached handle.
And finally we might leak some memory by forgetting to free reserved
handle in jbd2_journal_stop() in the case where handle was detached from
the transaction (h_transaction is NULL).
Fix the NULL pointer dereference in __ext4_journal_stop() by just
calling jbd2_journal_stop() quietly as suggested by Jan Kara. Also fix
the potential memory leak in jbd2_journal_stop() and use proper
handle refcounting before we attempt to free it to avoid use-after-free
issues.
And finally remove all WARN_ON(!transaction) from the code so that we do
not get random traces when something goes wrong because when journal
restart fails we will get to some of those functions.
Cc: stable@vger.kernel.org
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/ext4/ext4_jbd2.c | 6 ++++++
fs/jbd2/transaction.c | 25 ++++++++++++++++---------
2 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
index 3445035..d418431 100644
--- a/fs/ext4/ext4_jbd2.c
+++ b/fs/ext4/ext4_jbd2.c
@@ -87,6 +87,12 @@ int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)
ext4_put_nojournal(handle);
return 0;
}
+
+ if (!handle->h_transaction) {
+ err = jbd2_journal_stop(handle);
+ return handle->h_err ? handle->h_err : err;
+ }
+
sb = handle->h_transaction->t_journal->j_private;
err = handle->h_err;
rc = jbd2_journal_stop(handle);
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 5f09370..ff2f2e6 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -551,7 +551,6 @@ int jbd2_journal_extend(handle_t *handle, int nblocks)
int result;
int wanted;
- WARN_ON(!transaction);
if (is_handle_aborted(handle))
return -EROFS;
journal = transaction->t_journal;
@@ -627,7 +626,6 @@ int jbd2__journal_restart(handle_t *handle, int nblocks, gfp_t gfp_mask)
tid_t tid;
int need_to_start, ret;
- WARN_ON(!transaction);
/* If we've had an abort of any type, don't even think about
* actually doing the restart! */
if (is_handle_aborted(handle))
@@ -785,7 +783,6 @@ do_get_write_access(handle_t *handle, struct journal_head *jh,
int need_copy = 0;
unsigned long start_lock, time_lock;
- WARN_ON(!transaction);
if (is_handle_aborted(handle))
return -EROFS;
journal = transaction->t_journal;
@@ -1051,7 +1048,6 @@ int jbd2_journal_get_create_access(handle_t *handle, struct buffer_head *bh)
int err;
jbd_debug(5, "journal_head %p\n", jh);
- WARN_ON(!transaction);
err = -EROFS;
if (is_handle_aborted(handle))
goto out;
@@ -1266,7 +1262,6 @@ int jbd2_journal_dirty_metadata(handle_t *handle, struct buffer_head *bh)
struct journal_head *jh;
int ret = 0;
- WARN_ON(!transaction);
if (is_handle_aborted(handle))
return -EROFS;
journal = transaction->t_journal;
@@ -1397,7 +1392,6 @@ int jbd2_journal_forget (handle_t *handle, struct buffer_head *bh)
int err = 0;
int was_modified = 0;
- WARN_ON(!transaction);
if (is_handle_aborted(handle))
return -EROFS;
journal = transaction->t_journal;
@@ -1530,8 +1524,22 @@ int jbd2_journal_stop(handle_t *handle)
tid_t tid;
pid_t pid;
- if (!transaction)
- goto free_and_exit;
+ if (!transaction) {
+ /*
+ * Handle is already detached from the transaction so
+ * there is nothing to do other than decrease a refcount,
+ * or free the handle if refcount drops to zero
+ */
+ if (--handle->h_ref > 0) {
+ jbd_debug(4, "h_ref %d -> %d\n", handle->h_ref + 1,
+ handle->h_ref);
+ return err;
+ } else {
+ if (handle->h_rsv_handle)
+ jbd2_free_handle(handle->h_rsv_handle);
+ goto free_and_exit;
+ }
+ }
journal = transaction->t_journal;
J_ASSERT(journal_current_handle() == handle);
@@ -2373,7 +2381,6 @@ int jbd2_journal_file_inode(handle_t *handle, struct jbd2_inode *jinode)
transaction_t *transaction = handle->h_transaction;
journal_t *journal;
- WARN_ON(!transaction);
if (is_handle_aborted(handle))
return -EROFS;
journal = transaction->t_journal;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 139/178] ext4: check for zero length extent explicitly
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (137 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 138/178] ext4: fix NULL pointer dereference when journal restart fails Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 140/178] jbd2: fix r_count overflows leading to buffer overflow in journal recovery Sasha Levin
` (39 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Eryu Guan <guaneryu@gmail.com>
[ Upstream commit 2f974865ffdfe7b9f46a9940836c8b167342563d ]
The following commit introduced a bug when checking for zero length extent
5946d08 ext4: check for overlapping extents in ext4_valid_extent_entries()
Zero length extent could pass the check if lblock is zero.
Adding the explicit check for zero length back.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/ext4/extents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 6cfacbb..b5fcb1a 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -377,7 +377,7 @@ static int ext4_valid_extent(struct inode *inode, struct ext4_extent *ext)
ext4_lblk_t lblock = le32_to_cpu(ext->ee_block);
ext4_lblk_t last = lblock + len - 1;
- if (lblock > last)
+ if (len == 0 || lblock > last)
return 0;
return ext4_data_block_valid(EXT4_SB(inode->i_sb), block, len);
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 140/178] jbd2: fix r_count overflows leading to buffer overflow in journal recovery
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (138 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 139/178] ext4: check for zero length extent explicitly Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 141/178] ahci: avoton port-disable reset-quirk Sasha Levin
` (38 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Darrick J. Wong" <darrick.wong@oracle.com>
[ Upstream commit e531d0bceb402e643a4499de40dd3fa39d8d2e43 ]
The journal revoke block recovery code does not check r_count for
sanity, which means that an evil value of r_count could result in
the kernel reading off the end of the revoke table and into whatever
garbage lies beyond. This could crash the kernel, so fix that.
However, in testing this fix, I discovered that the code to write
out the revoke tables also was not correctly checking to see if the
block was full -- the current offset check is fine so long as the
revoke table space size is a multiple of the record size, but this
is not true when either journal_csum_v[23] are set.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/jbd2/recovery.c | 10 +++++++++-
fs/jbd2/revoke.c | 18 ++++++++++--------
2 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index bcbef08..a5f72a3 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -839,15 +839,23 @@ static int scan_revoke_records(journal_t *journal, struct buffer_head *bh,
{
jbd2_journal_revoke_header_t *header;
int offset, max;
+ int csum_size = 0;
+ __u32 rcount;
int record_len = 4;
header = (jbd2_journal_revoke_header_t *) bh->b_data;
offset = sizeof(jbd2_journal_revoke_header_t);
- max = be32_to_cpu(header->r_count);
+ rcount = be32_to_cpu(header->r_count);
if (!jbd2_revoke_block_csum_verify(journal, header))
return -EINVAL;
+ if (jbd2_journal_has_csum_v2or3(journal))
+ csum_size = sizeof(struct jbd2_journal_revoke_tail);
+ if (rcount > journal->j_blocksize - csum_size)
+ return -EINVAL;
+ max = rcount;
+
if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT))
record_len = 8;
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c
index c6cbaef..14214da 100644
--- a/fs/jbd2/revoke.c
+++ b/fs/jbd2/revoke.c
@@ -577,7 +577,7 @@ static void write_one_revoke_record(journal_t *journal,
{
int csum_size = 0;
struct buffer_head *descriptor;
- int offset;
+ int sz, offset;
journal_header_t *header;
/* If we are already aborting, this all becomes a noop. We
@@ -594,9 +594,14 @@ static void write_one_revoke_record(journal_t *journal,
if (jbd2_journal_has_csum_v2or3(journal))
csum_size = sizeof(struct jbd2_journal_revoke_tail);
+ if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT))
+ sz = 8;
+ else
+ sz = 4;
+
/* Make sure we have a descriptor with space left for the record */
if (descriptor) {
- if (offset >= journal->j_blocksize - csum_size) {
+ if (offset + sz > journal->j_blocksize - csum_size) {
flush_descriptor(journal, descriptor, offset, write_op);
descriptor = NULL;
}
@@ -619,16 +624,13 @@ static void write_one_revoke_record(journal_t *journal,
*descriptorp = descriptor;
}
- if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT)) {
+ if (JBD2_HAS_INCOMPAT_FEATURE(journal, JBD2_FEATURE_INCOMPAT_64BIT))
* ((__be64 *)(&descriptor->b_data[offset])) =
cpu_to_be64(record->blocknr);
- offset += 8;
-
- } else {
+ else
* ((__be32 *)(&descriptor->b_data[offset])) =
cpu_to_be32(record->blocknr);
- offset += 4;
- }
+ offset += sz;
*offsetp = offset;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 141/178] ahci: avoton port-disable reset-quirk
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (139 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 140/178] jbd2: fix r_count overflows leading to buffer overflow in journal recovery Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 142/178] libata: Add helper to determine when PHY events should be ignored Sasha Levin
` (37 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Dan Williams <dan.j.williams@intel.com>
[ Upstream commit dbfe8ef5599a5370abc441fcdbb382b656563eb4 ]
Avoton AHCI occasionally sees drive probe timeouts at driver load time.
When this happens SCR_STATUS indicates device detected, but no D2H FIS
reception. Reset the internal link state machines by bouncing
port-enable in the PCS register when this occurs.
Cc: <stable@vger.kernel.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/ata/ahci.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 95 insertions(+), 8 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 49f1e68..7318777 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -66,6 +66,7 @@ enum board_ids {
board_ahci_yes_fbs,
/* board IDs for specific chipsets in alphabetical order */
+ board_ahci_avn,
board_ahci_mcp65,
board_ahci_mcp77,
board_ahci_mcp89,
@@ -84,6 +85,8 @@ enum board_ids {
static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
static int ahci_vt8251_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline);
+static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline);
static void ahci_mcp89_apple_enable(struct pci_dev *pdev);
static bool is_mcp89_apple(struct pci_dev *pdev);
static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
@@ -107,6 +110,11 @@ static struct ata_port_operations ahci_p5wdh_ops = {
.hardreset = ahci_p5wdh_hardreset,
};
+static struct ata_port_operations ahci_avn_ops = {
+ .inherits = &ahci_ops,
+ .hardreset = ahci_avn_hardreset,
+};
+
static const struct ata_port_info ahci_port_info[] = {
/* by features */
[board_ahci] = {
@@ -151,6 +159,12 @@ static const struct ata_port_info ahci_port_info[] = {
.port_ops = &ahci_ops,
},
/* by chipsets */
+ [board_ahci_avn] = {
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = ATA_PIO4,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_avn_ops,
+ },
[board_ahci_mcp65] = {
AHCI_HFLAGS (AHCI_HFLAG_NO_FPDMA_AA | AHCI_HFLAG_NO_PMP |
AHCI_HFLAG_YES_NCQ),
@@ -290,14 +304,14 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x1f27), board_ahci }, /* Avoton RAID */
{ PCI_VDEVICE(INTEL, 0x1f2e), board_ahci }, /* Avoton RAID */
{ PCI_VDEVICE(INTEL, 0x1f2f), board_ahci }, /* Avoton RAID */
- { PCI_VDEVICE(INTEL, 0x1f32), board_ahci }, /* Avoton AHCI */
- { PCI_VDEVICE(INTEL, 0x1f33), board_ahci }, /* Avoton AHCI */
- { PCI_VDEVICE(INTEL, 0x1f34), board_ahci }, /* Avoton RAID */
- { PCI_VDEVICE(INTEL, 0x1f35), board_ahci }, /* Avoton RAID */
- { PCI_VDEVICE(INTEL, 0x1f36), board_ahci }, /* Avoton RAID */
- { PCI_VDEVICE(INTEL, 0x1f37), board_ahci }, /* Avoton RAID */
- { PCI_VDEVICE(INTEL, 0x1f3e), board_ahci }, /* Avoton RAID */
- { PCI_VDEVICE(INTEL, 0x1f3f), board_ahci }, /* Avoton RAID */
+ { PCI_VDEVICE(INTEL, 0x1f32), board_ahci_avn }, /* Avoton AHCI */
+ { PCI_VDEVICE(INTEL, 0x1f33), board_ahci_avn }, /* Avoton AHCI */
+ { PCI_VDEVICE(INTEL, 0x1f34), board_ahci_avn }, /* Avoton RAID */
+ { PCI_VDEVICE(INTEL, 0x1f35), board_ahci_avn }, /* Avoton RAID */
+ { PCI_VDEVICE(INTEL, 0x1f36), board_ahci_avn }, /* Avoton RAID */
+ { PCI_VDEVICE(INTEL, 0x1f37), board_ahci_avn }, /* Avoton RAID */
+ { PCI_VDEVICE(INTEL, 0x1f3e), board_ahci_avn }, /* Avoton RAID */
+ { PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */
{ PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */
{ PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */
@@ -671,6 +685,79 @@ static int ahci_p5wdh_hardreset(struct ata_link *link, unsigned int *class,
return rc;
}
+/*
+ * ahci_avn_hardreset - attempt more aggressive recovery of Avoton ports.
+ *
+ * It has been observed with some SSDs that the timing of events in the
+ * link synchronization phase can leave the port in a state that can not
+ * be recovered by a SATA-hard-reset alone. The failing signature is
+ * SStatus.DET stuck at 1 ("Device presence detected but Phy
+ * communication not established"). It was found that unloading and
+ * reloading the driver when this problem occurs allows the drive
+ * connection to be recovered (DET advanced to 0x3). The critical
+ * component of reloading the driver is that the port state machines are
+ * reset by bouncing "port enable" in the AHCI PCS configuration
+ * register. So, reproduce that effect by bouncing a port whenever we
+ * see DET==1 after a reset.
+ */
+static int ahci_avn_hardreset(struct ata_link *link, unsigned int *class,
+ unsigned long deadline)
+{
+ const unsigned long *timing = sata_ehc_deb_timing(&link->eh_context);
+ struct ata_port *ap = link->ap;
+ struct ahci_port_priv *pp = ap->private_data;
+ struct ahci_host_priv *hpriv = ap->host->private_data;
+ u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
+ unsigned long tmo = deadline - jiffies;
+ struct ata_taskfile tf;
+ bool online;
+ int rc, i;
+
+ DPRINTK("ENTER\n");
+
+ ahci_stop_engine(ap);
+
+ for (i = 0; i < 2; i++) {
+ u16 val;
+ u32 sstatus;
+ int port = ap->port_no;
+ struct ata_host *host = ap->host;
+ struct pci_dev *pdev = to_pci_dev(host->dev);
+
+ /* clear D2H reception area to properly wait for D2H FIS */
+ ata_tf_init(link->device, &tf);
+ tf.command = ATA_BUSY;
+ ata_tf_to_fis(&tf, 0, 0, d2h_fis);
+
+ rc = sata_link_hardreset(link, timing, deadline, &online,
+ ahci_check_ready);
+
+ if (sata_scr_read(link, SCR_STATUS, &sstatus) != 0 ||
+ (sstatus & 0xf) != 1)
+ break;
+
+ ata_link_printk(link, KERN_INFO, "avn bounce port%d\n",
+ port);
+
+ pci_read_config_word(pdev, 0x92, &val);
+ val &= ~(1 << port);
+ pci_write_config_word(pdev, 0x92, val);
+ ata_msleep(ap, 1000);
+ val |= 1 << port;
+ pci_write_config_word(pdev, 0x92, val);
+ deadline += tmo;
+ }
+
+ hpriv->start_engine(ap);
+
+ if (online)
+ *class = ahci_dev_classify(ap);
+
+ DPRINTK("EXIT, rc=%d, class=%u\n", rc, *class);
+ return rc;
+}
+
+
#ifdef CONFIG_PM
static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 142/178] libata: Add helper to determine when PHY events should be ignored
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (140 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 141/178] ahci: avoton port-disable reset-quirk Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 143/178] libata: Ignore spurious PHY event on LPM policy change Sasha Levin
` (36 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Gabriele Mazzotta <gabriele.mzt@gmail.com>
[ Upstream commit 8393b811f38acdf7fd8da2028708edad3e68ce1f ]
This is a preparation commit that will allow to add other criteria
according to which PHY events should be dropped.
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/ata/libahci.c | 3 +--
drivers/ata/libata-core.c | 19 +++++++++++++++++++
include/linux/libata.h | 1 +
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
index 97683e4..de88999 100644
--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -1707,8 +1707,7 @@ static void ahci_handle_port_interrupt(struct ata_port *ap,
if (unlikely(resetting))
status &= ~PORT_IRQ_BAD_PMP;
- /* if LPM is enabled, PHYRDY doesn't mean anything */
- if (ap->link.lpm_policy > ATA_LPM_MAX_POWER) {
+ if (sata_lpm_ignore_phy_events(&ap->link)) {
status &= ~PORT_IRQ_PHYRDY;
ahci_scr_write(&ap->link, SCR_ERROR, SERR_PHYRDY_CHG);
}
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 485f7ea..6a73f6b 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6747,6 +6747,25 @@ u32 ata_wait_register(struct ata_port *ap, void __iomem *reg, u32 mask, u32 val,
return tmp;
}
+/**
+ * sata_lpm_ignore_phy_events - test if PHY event should be ignored
+ * @link: Link receiving the event
+ *
+ * Test whether the received PHY event has to be ignored or not.
+ *
+ * LOCKING:
+ * None:
+ *
+ * RETURNS:
+ * True if the event has to be ignored.
+ */
+bool sata_lpm_ignore_phy_events(struct ata_link *link)
+{
+ /* if LPM is enabled, PHYRDY doesn't mean anything */
+ return !!(link->lpm_policy > ATA_LPM_MAX_POWER);
+}
+EXPORT_SYMBOL_GPL(sata_lpm_ignore_phy_events);
+
/*
* Dummy port_ops
*/
diff --git a/include/linux/libata.h b/include/linux/libata.h
index fe0bf8d..cc1d458 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1199,6 +1199,7 @@ extern struct ata_device *ata_dev_pair(struct ata_device *adev);
extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap);
extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q);
+extern bool sata_lpm_ignore_phy_events(struct ata_link *link);
extern int ata_cable_40wire(struct ata_port *ap);
extern int ata_cable_80wire(struct ata_port *ap);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 143/178] libata: Ignore spurious PHY event on LPM policy change
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (141 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 142/178] libata: Add helper to determine when PHY events should be ignored Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 144/178] libata: Update Crucial/Micron blacklist Sasha Levin
` (35 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Gabriele Mazzotta <gabriele.mzt@gmail.com>
[ Upstream commit 09c5b4803a80a5451d950d6a539d2eb311dc0fb1 ]
When the LPM policy is set to ATA_LPM_MAX_POWER, the device might
generate a spurious PHY event that cuases errors on the link.
Ignore this event if it occured within 10s after the policy change.
The timeout was chosen observing that on a Dell XPS13 9333 these
spurious events can occur up to roughly 6s after the policy change.
Link: http://lkml.kernel.org/g/3352987.ugV1Ipy7Z5@xps13
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/ata/libata-core.c | 15 ++++++++++++++-
drivers/ata/libata-eh.c | 3 +++
include/linux/libata.h | 9 +++++++++
3 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 6a73f6b..64af3bf 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6761,8 +6761,21 @@ u32 ata_wait_register(struct ata_port *ap, void __iomem *reg, u32 mask, u32 val,
*/
bool sata_lpm_ignore_phy_events(struct ata_link *link)
{
+ unsigned long lpm_timeout = link->last_lpm_change +
+ msecs_to_jiffies(ATA_TMOUT_SPURIOUS_PHY);
+
/* if LPM is enabled, PHYRDY doesn't mean anything */
- return !!(link->lpm_policy > ATA_LPM_MAX_POWER);
+ if (link->lpm_policy > ATA_LPM_MAX_POWER)
+ return true;
+
+ /* ignore the first PHY event after the LPM policy changed
+ * as it is might be spurious
+ */
+ if ((link->flags & ATA_LFLAG_CHANGED) &&
+ time_before(jiffies, lpm_timeout))
+ return true;
+
+ return false;
}
EXPORT_SYMBOL_GPL(sata_lpm_ignore_phy_events);
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index dad83df..4ec95b7 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -3490,6 +3490,9 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
}
}
+ link->last_lpm_change = jiffies;
+ link->flags |= ATA_LFLAG_CHANGED;
+
return 0;
fail:
diff --git a/include/linux/libata.h b/include/linux/libata.h
index cc1d458..b3a816f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -204,6 +204,7 @@ enum {
ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */
ATA_LFLAG_NO_LPM = (1 << 8), /* disable LPM on this link */
ATA_LFLAG_RST_ONCE = (1 << 9), /* limit recovery to one reset */
+ ATA_LFLAG_CHANGED = (1 << 10), /* LPM state changed on this link */
/* struct ata_port flags */
ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
@@ -308,6 +309,12 @@ enum {
*/
ATA_TMOUT_PMP_SRST_WAIT = 5000,
+ /* When the LPM policy is set to ATA_LPM_MAX_POWER, there might
+ * be a spurious PHY event, so ignore the first PHY event that
+ * occurs within 10s after the policy change.
+ */
+ ATA_TMOUT_SPURIOUS_PHY = 10000,
+
/* ATA bus states */
BUS_UNKNOWN = 0,
BUS_DMA = 1,
@@ -786,6 +793,8 @@ struct ata_link {
struct ata_eh_context eh_context;
struct ata_device device[ATA_MAX_DEVICES];
+
+ unsigned long last_lpm_change; /* when last LPM change happened */
};
#define ATA_LINK_CLEAR_BEGIN offsetof(struct ata_link, active_tag)
#define ATA_LINK_CLEAR_END offsetof(struct ata_link, device[0])
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 144/178] libata: Update Crucial/Micron blacklist
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (142 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 143/178] libata: Ignore spurious PHY event on LPM policy change Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 145/178] libata: Blacklist queued TRIM on all Samsung 800-series Sasha Levin
` (34 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Martin K. Petersen" <martin.petersen@oracle.com>
[ Upstream commit ff7f53fb82a7801a778e5902bdbbc5e195ab0de0 ]
Micron has released an updated firmware (MU02) for M510/M550/MX100
drives to fix the issues with queued TRIM. Queued TRIM remains broken on
M500 but is working fine on later drives such as M600 and MX200.
Tweak our blacklist to reflect the above.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=71371
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/ata/libata-core.c | 40 ++++++++++++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 64af3bf..93738f5 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4225,10 +4225,42 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER },
/* devices that don't properly handle queued TRIM commands */
- { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
- { "Crucial_CT???M500SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
- { "Micron_M550*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
- { "Crucial_CT*M550SSD*", NULL, ATA_HORKAGE_NO_NCQ_TRIM, },
+ { "Micron_M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
+ ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "Crucial_CT*M500*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
+ ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "Micron_M5[15]0*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
+ ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "Crucial_CT*M550*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
+ ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "Crucial_CT*MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
+ ATA_HORKAGE_ZERO_AFTER_TRIM, },
+
+ /*
+ * As defined, the DRAT (Deterministic Read After Trim) and RZAT
+ * (Return Zero After Trim) flags in the ATA Command Set are
+ * unreliable in the sense that they only define what happens if
+ * the device successfully executed the DSM TRIM command. TRIM
+ * is only advisory, however, and the device is free to silently
+ * ignore all or parts of the request.
+ *
+ * Whitelist drives that are known to reliably return zeroes
+ * after TRIM.
+ */
+
+ /*
+ * The intel 510 drive has buggy DRAT/RZAT. Explicitly exclude
+ * that model before whitelisting all other intel SSDs.
+ */
+ { "INTEL*SSDSC2MH*", NULL, 0, },
+
+ { "Micron*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "Crucial*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "INTEL*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "SSD*INTEL*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "Samsung*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "SAMSUNG*SSD*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "ST[1248][0248]0[FH]*", NULL, ATA_HORKAGE_ZERO_AFTER_TRIM, },
/*
* Some WD SATA-I drives spin up and down erratically when the link
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 145/178] libata: Blacklist queued TRIM on all Samsung 800-series
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (143 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 144/178] libata: Update Crucial/Micron blacklist Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 146/178] arm64: bpf: fix signedness bug in loading 64-bit immediate Sasha Levin
` (33 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Martin K. Petersen" <martin.petersen@oracle.com>
[ Upstream commit 9a9324d3969678d44b330e1230ad2c8ae67acf81 ]
The queued TRIM problems appear to be generic to Samsung's firmware and
not tied to a particular model. A recent update to the 840 EVO firmware
introduced the same issue as we saw on 850 Pro.
Blacklist queued TRIM on all 800-series drives while we work this issue
with Samsung.
Reported-by: Günter Waller <g.wal@web.de>
Reported-by: Sven Köhler <sven.koehler@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/ata/libata-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 93738f5..043d89d 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4235,6 +4235,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
ATA_HORKAGE_ZERO_AFTER_TRIM, },
{ "Crucial_CT*MX100*", "MU01", ATA_HORKAGE_NO_NCQ_TRIM |
ATA_HORKAGE_ZERO_AFTER_TRIM, },
+ { "Samsung SSD 8*", NULL, ATA_HORKAGE_NO_NCQ_TRIM |
+ ATA_HORKAGE_ZERO_AFTER_TRIM, },
/*
* As defined, the DRAT (Deterministic Read After Trim) and RZAT
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 146/178] arm64: bpf: fix signedness bug in loading 64-bit immediate
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (144 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 145/178] libata: Blacklist queued TRIM on all Samsung 800-series Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 147/178] rt2x00: add new rt2800usb device DWA 130 Sasha Levin
` (32 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Xi Wang <xi.wang@gmail.com>
[ Upstream commit 1e4df6b7208140f3c49f316d33a409d3a161f350 ]
Consider "(u64)insn1.imm << 32 | imm" in the arm64 JIT. Since imm is
signed 32-bit, it is sign-extended to 64-bit, losing the high 32 bits.
The fix is to convert imm to u32 first, which will be zero-extended to
u64 implicitly.
Cc: Zi Shen Lim <zlim.lnx@gmail.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: <stable@vger.kernel.org>
Fixes: 30d3d94cc3d5 ("arm64: bpf: add 'load 64-bit immediate' instruction")
Signed-off-by: Xi Wang <xi.wang@gmail.com>
[will: removed non-arm64 bits and redundant casting]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm64/net/bpf_jit_comp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index edba042..dc6a484 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -487,7 +487,7 @@ emit_cond_jmp:
return -EINVAL;
}
- imm64 = (u64)insn1.imm << 32 | imm;
+ imm64 = (u64)insn1.imm << 32 | (u32)imm;
emit_a64_mov_i64(dst, imm64, ctx);
return 1;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 147/178] rt2x00: add new rt2800usb device DWA 130
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (145 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 146/178] arm64: bpf: fix signedness bug in loading 64-bit immediate Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 148/178] gpio: gpio-kempld: Fix get_direction return value Sasha Levin
` (31 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Scott Branden <sbranden@broadcom.com>
[ Upstream commit ea345c145ff23197eab34d0c4d0c8a93d7bea8c6 ]
Add the USB Id to link the D-Link DWA 130 USB Wifi adapter
to the rt2830 driver.
Signed-off-by: Scott Branden <sbranden@broadcom.com>
Signed-off-by: Pieter Truter <ptruter@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/net/wireless/rt2x00/rt2800usb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 8444313..8694ddd 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -1040,6 +1040,7 @@ static struct usb_device_id rt2800usb_device_table[] = {
{ USB_DEVICE(0x07d1, 0x3c17) },
{ USB_DEVICE(0x2001, 0x3317) },
{ USB_DEVICE(0x2001, 0x3c1b) },
+ { USB_DEVICE(0x2001, 0x3c25) },
/* Draytek */
{ USB_DEVICE(0x07fa, 0x7712) },
/* DVICO */
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 148/178] gpio: gpio-kempld: Fix get_direction return value
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (146 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 147/178] rt2x00: add new rt2800usb device DWA 130 Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 149/178] crypto: s390/ghash - Fix incorrect ghash icv buffer handling Sasha Levin
` (30 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Michael Brunner <mibru@gmx.de>
[ Upstream commit f230e8ffc03f17bd9d6b90ea890b8252a8cc1821 ]
This patch fixes an inverted return value of the gpio get_direction
function.
The wrong value causes the direction sysfs entry and GPIO debugfs file
to indicate incorrect GPIO direction settings. In some cases it also
prevents setting GPIO output values.
The problem is also present in all other stable kernel versions since
linux-3.12.
Cc: Stable <stable@vger.kernel.org> # v3.12+
Reported-by: Jochen Henneberg <jh@henneberg-systemdesign.com>
Signed-off-by: Michael Brunner <michael.brunner@kontron.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpio/gpio-kempld.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-kempld.c b/drivers/gpio/gpio-kempld.c
index fd150ad..86a6007 100644
--- a/drivers/gpio/gpio-kempld.c
+++ b/drivers/gpio/gpio-kempld.c
@@ -117,7 +117,7 @@ static int kempld_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
= container_of(chip, struct kempld_gpio_data, chip);
struct kempld_device_data *pld = gpio->pld;
- return kempld_gpio_get_bit(pld, KEMPLD_GPIO_DIR_NUM(offset), offset);
+ return !kempld_gpio_get_bit(pld, KEMPLD_GPIO_DIR_NUM(offset), offset);
}
static int kempld_gpio_pincount(struct kempld_device_data *pld)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 149/178] crypto: s390/ghash - Fix incorrect ghash icv buffer handling.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (147 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 148/178] gpio: gpio-kempld: Fix get_direction return value Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 150/178] mac80211: move WEP tailroom size check Sasha Levin
` (29 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Harald Freudenberger <freude@linux.vnet.ibm.com>
[ Upstream commit a1cae34e23b1293eccbcc8ee9b39298039c3952a ]
Multitheaded tests showed that the icv buffer in the current ghash
implementation is not handled correctly. A move of this working ghash
buffer value to the descriptor context fixed this. Code is tested and
verified with an multithreaded application via af_alg interface.
Cc: stable@vger.kernel.org
Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Gerald Schaefer <geraldsc@linux.vnet.ibm.com>
Reported-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/s390/crypto/ghash_s390.c | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/arch/s390/crypto/ghash_s390.c b/arch/s390/crypto/ghash_s390.c
index 7940dc9..b258110 100644
--- a/arch/s390/crypto/ghash_s390.c
+++ b/arch/s390/crypto/ghash_s390.c
@@ -16,11 +16,12 @@
#define GHASH_DIGEST_SIZE 16
struct ghash_ctx {
- u8 icv[16];
- u8 key[16];
+ u8 key[GHASH_BLOCK_SIZE];
};
struct ghash_desc_ctx {
+ u8 icv[GHASH_BLOCK_SIZE];
+ u8 key[GHASH_BLOCK_SIZE];
u8 buffer[GHASH_BLOCK_SIZE];
u32 bytes;
};
@@ -28,8 +29,10 @@ struct ghash_desc_ctx {
static int ghash_init(struct shash_desc *desc)
{
struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
+ struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
memset(dctx, 0, sizeof(*dctx));
+ memcpy(dctx->key, ctx->key, GHASH_BLOCK_SIZE);
return 0;
}
@@ -45,7 +48,6 @@ static int ghash_setkey(struct crypto_shash *tfm,
}
memcpy(ctx->key, key, GHASH_BLOCK_SIZE);
- memset(ctx->icv, 0, GHASH_BLOCK_SIZE);
return 0;
}
@@ -54,7 +56,6 @@ static int ghash_update(struct shash_desc *desc,
const u8 *src, unsigned int srclen)
{
struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
- struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
unsigned int n;
u8 *buf = dctx->buffer;
int ret;
@@ -70,7 +71,7 @@ static int ghash_update(struct shash_desc *desc,
src += n;
if (!dctx->bytes) {
- ret = crypt_s390_kimd(KIMD_GHASH, ctx, buf,
+ ret = crypt_s390_kimd(KIMD_GHASH, dctx, buf,
GHASH_BLOCK_SIZE);
if (ret != GHASH_BLOCK_SIZE)
return -EIO;
@@ -79,7 +80,7 @@ static int ghash_update(struct shash_desc *desc,
n = srclen & ~(GHASH_BLOCK_SIZE - 1);
if (n) {
- ret = crypt_s390_kimd(KIMD_GHASH, ctx, src, n);
+ ret = crypt_s390_kimd(KIMD_GHASH, dctx, src, n);
if (ret != n)
return -EIO;
src += n;
@@ -94,7 +95,7 @@ static int ghash_update(struct shash_desc *desc,
return 0;
}
-static int ghash_flush(struct ghash_ctx *ctx, struct ghash_desc_ctx *dctx)
+static int ghash_flush(struct ghash_desc_ctx *dctx)
{
u8 *buf = dctx->buffer;
int ret;
@@ -104,24 +105,24 @@ static int ghash_flush(struct ghash_ctx *ctx, struct ghash_desc_ctx *dctx)
memset(pos, 0, dctx->bytes);
- ret = crypt_s390_kimd(KIMD_GHASH, ctx, buf, GHASH_BLOCK_SIZE);
+ ret = crypt_s390_kimd(KIMD_GHASH, dctx, buf, GHASH_BLOCK_SIZE);
if (ret != GHASH_BLOCK_SIZE)
return -EIO;
+
+ dctx->bytes = 0;
}
- dctx->bytes = 0;
return 0;
}
static int ghash_final(struct shash_desc *desc, u8 *dst)
{
struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
- struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
int ret;
- ret = ghash_flush(ctx, dctx);
+ ret = ghash_flush(dctx);
if (!ret)
- memcpy(dst, ctx->icv, GHASH_BLOCK_SIZE);
+ memcpy(dst, dctx->icv, GHASH_BLOCK_SIZE);
return ret;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 150/178] mac80211: move WEP tailroom size check
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (148 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 149/178] crypto: s390/ghash - Fix incorrect ghash icv buffer handling Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 151/178] mac80211: don't use napi_gro_receive() outside NAPI context Sasha Levin
` (28 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Janusz Dziedzic <janusz.dziedzic@tieto.com>
[ Upstream commit 47b4e1fc4972cc43a19121bc2608a60aef3bf216 ]
Remove checking tailroom when adding IV as it uses only
headroom, and move the check to the ICV generation that
actually needs the tailroom.
In other case I hit such warning and datapath don't work,
when testing:
- IBSS + WEP
- ath9k with hw crypt enabled
- IPv6 data (ping6)
WARNING: CPU: 3 PID: 13301 at net/mac80211/wep.c:102 ieee80211_wep_add_iv+0x129/0x190 [mac80211]()
[...]
Call Trace:
[<ffffffff817bf491>] dump_stack+0x45/0x57
[<ffffffff8107746a>] warn_slowpath_common+0x8a/0xc0
[<ffffffff8107755a>] warn_slowpath_null+0x1a/0x20
[<ffffffffc09ae109>] ieee80211_wep_add_iv+0x129/0x190 [mac80211]
[<ffffffffc09ae7ab>] ieee80211_crypto_wep_encrypt+0x6b/0xd0 [mac80211]
[<ffffffffc09d3fb1>] invoke_tx_handlers+0xc51/0xf30 [mac80211]
[...]
Cc: stable@vger.kernel.org
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
net/mac80211/wep.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index 9181fb6..837b7b1 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -98,8 +98,7 @@ static u8 *ieee80211_wep_add_iv(struct ieee80211_local *local,
hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PROTECTED);
- if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN ||
- skb_headroom(skb) < IEEE80211_WEP_IV_LEN))
+ if (WARN_ON(skb_headroom(skb) < IEEE80211_WEP_IV_LEN))
return NULL;
hdrlen = ieee80211_hdrlen(hdr->frame_control);
@@ -169,6 +168,9 @@ int ieee80211_wep_encrypt(struct ieee80211_local *local,
size_t len;
u8 rc4key[3 + WLAN_KEY_LEN_WEP104];
+ if (WARN_ON(skb_tailroom(skb) < IEEE80211_WEP_ICV_LEN))
+ return -1;
+
iv = ieee80211_wep_add_iv(local, skb, keylen, keyidx);
if (!iv)
return -1;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 151/178] mac80211: don't use napi_gro_receive() outside NAPI context
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (149 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 150/178] mac80211: move WEP tailroom size check Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 152/178] s390/mm: correct return value of pmd_pfn Sasha Levin
` (27 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Johannes Berg <johannes.berg@intel.com>
[ Upstream commit 22d3a3c829fa9ecdb493d1f1f2838d543f8d86a3 ]
No matter how the driver manages its NAPI context, there's no way
sending frames to it from a timer can be correct, since it would
corrupt the internal GRO lists.
To avoid that, always use the non-NAPI path when releasing frames
from the timer.
Cc: stable@vger.kernel.org
Reported-by: Jean Trivelly <jean.trivelly@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
net/mac80211/ieee80211_i.h | 3 +++
net/mac80211/rx.c | 5 +++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 91c1aca..aed656d 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -204,6 +204,8 @@ enum ieee80211_packet_rx_flags {
* @IEEE80211_RX_CMNTR: received on cooked monitor already
* @IEEE80211_RX_BEACON_REPORTED: This frame was already reported
* to cfg80211_report_obss_beacon().
+ * @IEEE80211_RX_REORDER_TIMER: this frame is released by the
+ * reorder buffer timeout timer, not the normal RX path
*
* These flags are used across handling multiple interfaces
* for a single frame.
@@ -211,6 +213,7 @@ enum ieee80211_packet_rx_flags {
enum ieee80211_rx_flags {
IEEE80211_RX_CMNTR = BIT(0),
IEEE80211_RX_BEACON_REPORTED = BIT(1),
+ IEEE80211_RX_REORDER_TIMER = BIT(2),
};
struct ieee80211_rx_data {
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 631d59f..a578c57 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2000,7 +2000,8 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
/* deliver to local stack */
skb->protocol = eth_type_trans(skb, dev);
memset(skb->cb, 0, sizeof(skb->cb));
- if (rx->local->napi)
+ if (!(rx->flags & IEEE80211_RX_REORDER_TIMER) &&
+ rx->local->napi)
napi_gro_receive(rx->local->napi, skb);
else
netif_receive_skb(skb);
@@ -3070,7 +3071,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)
/* This is OK -- must be QoS data frame */
.security_idx = tid,
.seqno_idx = tid,
- .flags = 0,
+ .flags = IEEE80211_RX_REORDER_TIMER,
};
struct tid_ampdu_rx *tid_agg_rx;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 152/178] s390/mm: correct return value of pmd_pfn
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (150 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 151/178] mac80211: don't use napi_gro_receive() outside NAPI context Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 153/178] sched: Handle priority boosted tasks proper in setscheduler() Sasha Levin
` (26 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
[ Upstream commit 7cded342c09f633666e71ee1ce048f218a9c5836 ]
Git commit 152125b7a882df36a55a8eadbea6d0edf1461ee7
"s390/mm: implement dirty bits for large segment table entries"
broke the pmd_pfn function, it changed the return value from
'unsigned long' to 'int'. This breaks all machine configurations
with memory above the 8TB line.
Cc: stable@vger.kernel.org # 3.17+
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/s390/include/asm/pgtable.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 57c8827..b0373b4 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -582,7 +582,7 @@ static inline int pmd_large(pmd_t pmd)
return (pmd_val(pmd) & _SEGMENT_ENTRY_LARGE) != 0;
}
-static inline int pmd_pfn(pmd_t pmd)
+static inline unsigned long pmd_pfn(pmd_t pmd)
{
unsigned long origin_mask;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 153/178] sched: Handle priority boosted tasks proper in setscheduler()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (151 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 152/178] s390/mm: correct return value of pmd_pfn Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 154/178] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Sasha Levin
` (25 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Thomas Gleixner <tglx@linutronix.de>
[ Upstream commit 0782e63bc6fe7e2d3408d250df11d388b7799c6b ]
Ronny reported that the following scenario is not handled correctly:
T1 (prio = 10)
lock(rtmutex);
T2 (prio = 20)
lock(rtmutex)
boost T1
T1 (prio = 20)
sys_set_scheduler(prio = 30)
T1 prio = 30
....
sys_set_scheduler(prio = 10)
T1 prio = 30
The last step is wrong as T1 should now be back at prio 20.
Commit c365c292d059 ("sched: Consider pi boosting in setscheduler()")
only handles the case where a boosted tasks tries to lower its
priority.
Fix it by taking the new effective priority into account for the
decision whether a change of the priority is required.
Reported-by: Ronny Meeus <ronny.meeus@gmail.com>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
Cc: <stable@vger.kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Fixes: c365c292d059 ("sched: Consider pi boosting in setscheduler()")
Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1505051806060.4225@nanos
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
include/linux/sched/rt.h | 7 ++++---
kernel/locking/rtmutex.c | 12 +++++++-----
kernel/sched/core.c | 26 ++++++++++++++------------
3 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/include/linux/sched/rt.h b/include/linux/sched/rt.h
index 6341f5b..a30b172 100644
--- a/include/linux/sched/rt.h
+++ b/include/linux/sched/rt.h
@@ -18,7 +18,7 @@ static inline int rt_task(struct task_struct *p)
#ifdef CONFIG_RT_MUTEXES
extern int rt_mutex_getprio(struct task_struct *p);
extern void rt_mutex_setprio(struct task_struct *p, int prio);
-extern int rt_mutex_check_prio(struct task_struct *task, int newprio);
+extern int rt_mutex_get_effective_prio(struct task_struct *task, int newprio);
extern struct task_struct *rt_mutex_get_top_task(struct task_struct *task);
extern void rt_mutex_adjust_pi(struct task_struct *p);
static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
@@ -31,9 +31,10 @@ static inline int rt_mutex_getprio(struct task_struct *p)
return p->normal_prio;
}
-static inline int rt_mutex_check_prio(struct task_struct *task, int newprio)
+static inline int rt_mutex_get_effective_prio(struct task_struct *task,
+ int newprio)
{
- return 0;
+ return newprio;
}
static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index 41d53e5..1929ee2 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -265,15 +265,17 @@ struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
}
/*
- * Called by sched_setscheduler() to check whether the priority change
- * is overruled by a possible priority boosting.
+ * Called by sched_setscheduler() to get the priority which will be
+ * effective after the change.
*/
-int rt_mutex_check_prio(struct task_struct *task, int newprio)
+int rt_mutex_get_effective_prio(struct task_struct *task, int newprio)
{
if (!task_has_pi_waiters(task))
- return 0;
+ return newprio;
- return task_top_pi_waiter(task)->task->prio <= newprio;
+ if (task_top_pi_waiter(task)->task->prio <= newprio)
+ return task_top_pi_waiter(task)->task->prio;
+ return newprio;
}
/*
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b794bde..6810e57 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3327,15 +3327,18 @@ static void __setscheduler_params(struct task_struct *p,
/* Actually do priority change: must hold pi & rq lock. */
static void __setscheduler(struct rq *rq, struct task_struct *p,
- const struct sched_attr *attr)
+ const struct sched_attr *attr, bool keep_boost)
{
__setscheduler_params(p, attr);
/*
- * If we get here, there was no pi waiters boosting the
- * task. It is safe to use the normal prio.
+ * Keep a potential priority boosting if called from
+ * sched_setscheduler().
*/
- p->prio = normal_prio(p);
+ if (keep_boost)
+ p->prio = rt_mutex_get_effective_prio(p, normal_prio(p));
+ else
+ p->prio = normal_prio(p);
if (dl_prio(p->prio))
p->sched_class = &dl_sched_class;
@@ -3421,7 +3424,7 @@ static int __sched_setscheduler(struct task_struct *p,
int newprio = dl_policy(attr->sched_policy) ? MAX_DL_PRIO - 1 :
MAX_RT_PRIO - 1 - attr->sched_priority;
int retval, oldprio, oldpolicy = -1, queued, running;
- int policy = attr->sched_policy;
+ int new_effective_prio, policy = attr->sched_policy;
unsigned long flags;
const struct sched_class *prev_class;
struct rq *rq;
@@ -3603,15 +3606,14 @@ change:
oldprio = p->prio;
/*
- * Special case for priority boosted tasks.
- *
- * If the new priority is lower or equal (user space view)
- * than the current (boosted) priority, we just store the new
+ * Take priority boosted tasks into account. If the new
+ * effective priority is unchanged, we just store the new
* normal parameters and do not touch the scheduler class and
* the runqueue. This will be done when the task deboost
* itself.
*/
- if (rt_mutex_check_prio(p, newprio)) {
+ new_effective_prio = rt_mutex_get_effective_prio(p, newprio);
+ if (new_effective_prio == oldprio) {
__setscheduler_params(p, attr);
task_rq_unlock(rq, p, &flags);
return 0;
@@ -3625,7 +3627,7 @@ change:
put_prev_task(rq, p);
prev_class = p->sched_class;
- __setscheduler(rq, p, attr);
+ __setscheduler(rq, p, attr, true);
if (running)
p->sched_class->set_curr_task(rq);
@@ -7237,7 +7239,7 @@ static void normalize_task(struct rq *rq, struct task_struct *p)
queued = task_on_rq_queued(p);
if (queued)
dequeue_task(rq, p, 0);
- __setscheduler(rq, p, &attr);
+ __setscheduler(rq, p, &attr, false);
if (queued) {
enqueue_task(rq, p, 0);
resched_curr(rq);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 154/178] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (152 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 153/178] sched: Handle priority boosted tasks proper in setscheduler() Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 155/178] ARM: dts: imx27: only map 4 Kbyte for fec registers Sasha Levin
` (24 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Mark Rutland <mark.rutland@arm.com>
[ Upstream commit 965278dcb8ab0b1f666cc47937933c4be4aea48d ]
At boot time we round the memblock limit down to section size in an
attempt to ensure that we will have mapped this RAM with section
mappings prior to allocating from it. When mapping RAM we iterate over
PMD-sized chunks, creating these section mappings.
Section mappings are only created when the end of a chunk is aligned to
section size. Unfortunately, with classic page tables (where PMD_SIZE is
2 * SECTION_SIZE) this means that if a chunk is between 1M and 2M in
size the first 1M will not be mapped despite having been accounted for
in the memblock limit. This has been observed to result in page tables
being allocated from unmapped memory, causing boot-time hangs.
This patch modifies the memblock limit rounding to always round down to
PMD_SIZE instead of SECTION_SIZE. For classic MMU this means that we
will round the memblock limit down to a 2M boundary, matching the limits
on section mappings, and preventing allocations from unmapped memory.
For LPAE there should be no change as PMD_SIZE == SECTION_SIZE.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Stefan Agner <stefan@agner.ch>
Tested-by: Stefan Agner <stefan@agner.ch>
Acked-by: Laura Abbott <labbott@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Steve Capper <steve.capper@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/mm/mmu.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 9f98cec..fb9d305 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1118,22 +1118,22 @@ void __init sanity_check_meminfo(void)
}
/*
- * Find the first non-section-aligned page, and point
+ * Find the first non-pmd-aligned page, and point
* memblock_limit at it. This relies on rounding the
- * limit down to be section-aligned, which happens at
- * the end of this function.
+ * limit down to be pmd-aligned, which happens at the
+ * end of this function.
*
* With this algorithm, the start or end of almost any
- * bank can be non-section-aligned. The only exception
- * is that the start of the bank 0 must be section-
+ * bank can be non-pmd-aligned. The only exception is
+ * that the start of the bank 0 must be section-
* aligned, since otherwise memory would need to be
* allocated when mapping the start of bank 0, which
* occurs before any free memory is mapped.
*/
if (!memblock_limit) {
- if (!IS_ALIGNED(block_start, SECTION_SIZE))
+ if (!IS_ALIGNED(block_start, PMD_SIZE))
memblock_limit = block_start;
- else if (!IS_ALIGNED(block_end, SECTION_SIZE))
+ else if (!IS_ALIGNED(block_end, PMD_SIZE))
memblock_limit = arm_lowmem_limit;
}
@@ -1143,12 +1143,12 @@ void __init sanity_check_meminfo(void)
high_memory = __va(arm_lowmem_limit - 1) + 1;
/*
- * Round the memblock limit down to a section size. This
+ * Round the memblock limit down to a pmd size. This
* helps to ensure that we will allocate memory from the
- * last full section, which should be mapped.
+ * last full pmd, which should be mapped.
*/
if (memblock_limit)
- memblock_limit = round_down(memblock_limit, SECTION_SIZE);
+ memblock_limit = round_down(memblock_limit, PMD_SIZE);
if (!memblock_limit)
memblock_limit = arm_lowmem_limit;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 155/178] ARM: dts: imx27: only map 4 Kbyte for fec registers
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (153 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 154/178] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 156/178] ARM: fix missing syscall trace exit Sasha Levin
` (23 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Philippe Reynes <tremyfr@gmail.com>
[ Upstream commit a29ef819f3f34f89a1b9b6a939b4c1cdfe1e85ce ]
According to the imx27 documentation, fec has a 4 Kbyte
memory space map. Moreover, the actual 16 Kbyte mapping
overlaps the SCC (Security Controller) memory register
space. So, we reduce the memory register space to 4 Kbyte.
Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 9f0749e3eb88 ("ARM i.MX27: Add devicetree support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/boot/dts/imx27.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 107d713..12ac5f7 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -531,7 +531,7 @@
fec: ethernet@1002b000 {
compatible = "fsl,imx27-fec";
- reg = <0x1002b000 0x4000>;
+ reg = <0x1002b000 0x1000>;
interrupts = <50>;
clocks = <&clks IMX27_CLK_FEC_IPG_GATE>,
<&clks IMX27_CLK_FEC_AHB_GATE>;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 156/178] ARM: fix missing syscall trace exit
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (154 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 155/178] ARM: dts: imx27: only map 4 Kbyte for fec registers Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 157/178] parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures Sasha Levin
` (22 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Russell King <rmk+kernel@arm.linux.org.uk>
[ Upstream commit 1b97937246d8b97c0760d16d8992c7937bdf5e6a ]
Josh Stone reports:
I've discovered a case where both arm and arm64 will miss a ptrace
syscall-exit that they should report. If the syscall is entered
without TIF_SYSCALL_TRACE set, then it goes on the fast path. It's
then possible to have TIF_SYSCALL_TRACE added in the middle of the
syscall, but ret_fast_syscall doesn't check this flag again.
Fix this by always checking for a syscall trace in the fast exit path.
Reported-by: Josh Stone <jistone@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arm/kernel/entry-common.S | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 6bb09d4..eb6f1927 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -33,7 +33,9 @@ ret_fast_syscall:
UNWIND(.fnstart )
UNWIND(.cantunwind )
disable_irq @ disable interrupts
- ldr r1, [tsk, #TI_FLAGS]
+ ldr r1, [tsk, #TI_FLAGS] @ re-check for syscall tracing
+ tst r1, #_TIF_SYSCALL_WORK
+ bne __sys_trace_return
tst r1, #_TIF_WORK_MASK
bne fast_work_pending
asm_trace_hardirqs_on
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 157/178] parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (155 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 156/178] ARM: fix missing syscall trace exit Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 158/178] tools/vm: fix page-flags build Sasha Levin
` (21 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Helge Deller <deller@gmx.de>
[ Upstream commit d045c77c1a69703143a36169c224429c48b9eecd ]
On architectures where the stack grows upwards (CONFIG_STACK_GROWSUP=y,
currently parisc and metag only) stack randomization sometimes leads to crashes
when the stack ulimit is set to lower values than STACK_RND_MASK (which is 8 MB
by default if not defined in arch-specific headers).
The problem is, that when the stack vm_area_struct is set up in fs/exec.c, the
additional space needed for the stack randomization (as defined by the value of
STACK_RND_MASK) was not taken into account yet and as such, when the stack
randomization code added a random offset to the stack start, the stack
effectively got smaller than what the user defined via rlimit_max(RLIMIT_STACK)
which then sometimes leads to out-of-stack situations and crashes.
This patch fixes it by adding the maximum possible amount of memory (based on
STACK_RND_MASK) which theoretically could be added by the stack randomization
code to the initial stack size. That way, the user-defined stack size is always
guaranteed to be at minimum what is defined via rlimit_max(RLIMIT_STACK).
This bug is currently not visible on the metag architecture, because on metag
STACK_RND_MASK is defined to 0 which effectively disables stack randomization.
The changes to fs/exec.c are inside an "#ifdef CONFIG_STACK_GROWSUP"
section, so it does not affect other platformws beside those where the
stack grows upwards (parisc and metag).
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: linux-parisc@vger.kernel.org
Cc: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
Cc: stable@vger.kernel.org # v3.16+
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/parisc/include/asm/elf.h | 4 ++++
arch/parisc/kernel/sys_parisc.c | 3 +++
fs/exec.c | 3 +++
3 files changed, 10 insertions(+)
diff --git a/arch/parisc/include/asm/elf.h b/arch/parisc/include/asm/elf.h
index 3391d06..78c9fd3 100644
--- a/arch/parisc/include/asm/elf.h
+++ b/arch/parisc/include/asm/elf.h
@@ -348,6 +348,10 @@ struct pt_regs; /* forward declaration... */
#define ELF_HWCAP 0
+#define STACK_RND_MASK (is_32bit_task() ? \
+ 0x7ff >> (PAGE_SHIFT - 12) : \
+ 0x3ffff >> (PAGE_SHIFT - 12))
+
struct mm_struct;
extern unsigned long arch_randomize_brk(struct mm_struct *);
#define arch_randomize_brk arch_randomize_brk
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
index e1ffea2..5aba01a 100644
--- a/arch/parisc/kernel/sys_parisc.c
+++ b/arch/parisc/kernel/sys_parisc.c
@@ -77,6 +77,9 @@ static unsigned long mmap_upper_limit(void)
if (stack_base > STACK_SIZE_MAX)
stack_base = STACK_SIZE_MAX;
+ /* Add space for stack randomization. */
+ stack_base += (STACK_RND_MASK << PAGE_SHIFT);
+
return PAGE_ALIGN(STACK_TOP - stack_base);
}
diff --git a/fs/exec.c b/fs/exec.c
index 2e83209..b7a5f46 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -658,6 +658,9 @@ int setup_arg_pages(struct linux_binprm *bprm,
if (stack_base > STACK_SIZE_MAX)
stack_base = STACK_SIZE_MAX;
+ /* Add space for stack randomization. */
+ stack_base += (STACK_RND_MASK << PAGE_SHIFT);
+
/* Make sure we didn't let the argument array grow too large. */
if (vma->vm_end - vma->vm_start > stack_base)
return -ENOMEM;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 158/178] tools/vm: fix page-flags build
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (156 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 157/178] parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 159/178] mm, numa: really disable NUMA balancing by default on single node machines Sasha Levin
` (20 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Andi Kleen <ak@linux.intel.com>
[ Upstream commit 4933f55fe72c86e57efc454dd6e673c7f17af5a3 ]
libabikfs.a doesn't exist anymore, so we now need to link with libapi.a.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
tools/vm/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/vm/Makefile b/tools/vm/Makefile
index 3d907da..c604f3e 100644
--- a/tools/vm/Makefile
+++ b/tools/vm/Makefile
@@ -3,7 +3,7 @@
TARGETS=page-types slabinfo
LIB_DIR = ../lib/api
-LIBS = $(LIB_DIR)/libapikfs.a
+LIBS = $(LIB_DIR)/libapi.a
CC = $(CROSS_COMPILE)gcc
CFLAGS = -Wall -Wextra -I../lib/
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 159/178] mm, numa: really disable NUMA balancing by default on single node machines
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (157 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 158/178] tools/vm: fix page-flags build Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 160/178] nfsd: fix the check for confirmed openowner in nfs4_preprocess_stateid_op Sasha Levin
` (19 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Mel Gorman <mgorman@suse.de>
[ Upstream commit b0dc2b9bb4ab782115b964310518ee0b17784277 ]
NUMA balancing is meant to be disabled by default on UMA machines but
the check is using nr_node_ids (highest node) instead of
num_online_nodes (online nodes).
The consequences are that a UMA machine with a node ID of 1 or higher
will enable NUMA balancing. This will incur useless overhead due to
minor faults with the impact depending on the workload. These are the
impact on the stats when running a kernel build on a single node machine
whose node ID happened to be 1:
vanilla patched
NUMA base PTE updates 5113158 0
NUMA huge PMD updates 643 0
NUMA page range updates 5442374 0
NUMA hint faults 2109622 0
NUMA hint local faults 2109622 0
NUMA hint local percent 100 100
NUMA pages migrated 0 0
Signed-off-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: <stable@vger.kernel.org> [3.8+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
mm/mempolicy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index e58725a..39198cb7 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2548,7 +2548,7 @@ static void __init check_numabalancing_enable(void)
if (numabalancing_override)
set_numabalancing_state(numabalancing_override == 1);
- if (nr_node_ids > 1 && !numabalancing_override) {
+ if (num_online_nodes() > 1 && !numabalancing_override) {
pr_info("%s automatic NUMA balancing. "
"Configure with numa_balancing= or the "
"kernel.numa_balancing sysctl",
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 160/178] nfsd: fix the check for confirmed openowner in nfs4_preprocess_stateid_op
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (158 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 159/178] mm, numa: really disable NUMA balancing by default on single node machines Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 161/178] svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures Sasha Levin
` (18 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Christoph Hellwig <hch@lst.de>
[ Upstream commit ebe9cb3bb13e7b9b281969cd279ce70834f7500f ]
If we find a non-confirmed openowner we jump to exit the function, but do
not set an error value. Fix this by factoring out a helper to do the
check and properly set the error from nfsd4_validate_stateid.
Cc: stable@vger.kernel.org
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/nfsd/nfs4state.c | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 4460d45..58f98ad 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4385,10 +4385,17 @@ static __be32 check_stateid_generation(stateid_t *in, stateid_t *ref, bool has_s
return nfserr_old_stateid;
}
+static __be32 nfsd4_check_openowner_confirmed(struct nfs4_ol_stateid *ols)
+{
+ if (ols->st_stateowner->so_is_open_owner &&
+ !(openowner(ols->st_stateowner)->oo_flags & NFS4_OO_CONFIRMED))
+ return nfserr_bad_stateid;
+ return nfs_ok;
+}
+
static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
{
struct nfs4_stid *s;
- struct nfs4_ol_stateid *ols;
__be32 status = nfserr_bad_stateid;
if (ZERO_STATEID(stateid) || ONE_STATEID(stateid))
@@ -4418,13 +4425,7 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
break;
case NFS4_OPEN_STID:
case NFS4_LOCK_STID:
- ols = openlockstateid(s);
- if (ols->st_stateowner->so_is_open_owner
- && !(openowner(ols->st_stateowner)->oo_flags
- & NFS4_OO_CONFIRMED))
- status = nfserr_bad_stateid;
- else
- status = nfs_ok;
+ status = nfsd4_check_openowner_confirmed(openlockstateid(s));
break;
default:
printk("unknown stateid type %x\n", s->sc_type);
@@ -4516,8 +4517,8 @@ nfs4_preprocess_stateid_op(struct net *net, struct nfsd4_compound_state *cstate,
status = nfs4_check_fh(current_fh, stp);
if (status)
goto out;
- if (stp->st_stateowner->so_is_open_owner
- && !(openowner(stp->st_stateowner)->oo_flags & NFS4_OO_CONFIRMED))
+ status = nfsd4_check_openowner_confirmed(stp);
+ if (status)
goto out;
status = nfs4_check_openmode(stp, flags);
if (status)
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 161/178] svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (159 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 160/178] nfsd: fix the check for confirmed openowner in nfs4_preprocess_stateid_op Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 162/178] firmware: dmi_scan: Fix ordering of product_uuid Sasha Levin
` (17 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Scott Mayhew <smayhew@redhat.com>
[ Upstream commit 9507271d960a1911a51683888837d75c171cd91f ]
In an environment where the KDC is running Active Directory, the
exported composite name field returned in the context could be large
enough to span a page boundary. Attaching a scratch buffer to the
decoding xdr_stream helps deal with those cases.
The case where we saw this was actually due to behavior that's been
fixed in newer gss-proxy versions, but we're fixing it here too.
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Simo Sorce <simo@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
net/sunrpc/auth_gss/gss_rpc_xdr.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c
index 1ec19f6..eeeba5a 100644
--- a/net/sunrpc/auth_gss/gss_rpc_xdr.c
+++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c
@@ -793,20 +793,26 @@ int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
{
u32 value_follows;
int err;
+ struct page *scratch;
+
+ scratch = alloc_page(GFP_KERNEL);
+ if (!scratch)
+ return -ENOMEM;
+ xdr_set_scratch_buffer(xdr, page_address(scratch), PAGE_SIZE);
/* res->status */
err = gssx_dec_status(xdr, &res->status);
if (err)
- return err;
+ goto out_free;
/* res->context_handle */
err = gssx_dec_bool(xdr, &value_follows);
if (err)
- return err;
+ goto out_free;
if (value_follows) {
err = gssx_dec_ctx(xdr, res->context_handle);
if (err)
- return err;
+ goto out_free;
} else {
res->context_handle = NULL;
}
@@ -814,11 +820,11 @@ int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
/* res->output_token */
err = gssx_dec_bool(xdr, &value_follows);
if (err)
- return err;
+ goto out_free;
if (value_follows) {
err = gssx_dec_buffer(xdr, res->output_token);
if (err)
- return err;
+ goto out_free;
} else {
res->output_token = NULL;
}
@@ -826,14 +832,17 @@ int gssx_dec_accept_sec_context(struct rpc_rqst *rqstp,
/* res->delegated_cred_handle */
err = gssx_dec_bool(xdr, &value_follows);
if (err)
- return err;
+ goto out_free;
if (value_follows) {
/* we do not support upcall servers sending this data. */
- return -EINVAL;
+ err = -EINVAL;
+ goto out_free;
}
/* res->options */
err = gssx_dec_option_array(xdr, &res->options);
+out_free:
+ __free_page(scratch);
return err;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 162/178] firmware: dmi_scan: Fix ordering of product_uuid
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (160 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 161/178] svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 163/178] thermal: armada: Update Armada 380 thermal sensor coefficients Sasha Levin
` (16 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Jean Delvare <jdelvare@suse.de>
[ Upstream commit 5c1ac56b51b9d222ab202dec1ac2f4215346129d ]
In function dmi_present(), dmi_walk_early() calls dmi_table(), which
calls dmi_decode(), which ultimately calls dmi_save_uuid(). This last
function makes a decision based on the value of global variable
dmi_ver. The problem is that this variable is set right _after_
dmi_walk_early() returns. So dmi_save_uuid() always sees dmi_ver == 0
regardless of the actual version implemented.
This causes /sys/class/dmi/id/product_uuid to always use the old
ordering even on systems implementing DMI/SMBIOS 2.6 or later, which
should use the new ordering.
This is broken since kernel v3.8 for legacy DMI implementations and
since kernel v3.10 for SMBIOS 2 implementations. SMBIOS 3
implementations with the 64-bit entry point are not affected.
The first breakage does not matter much as in practice legacy DMI
implementations are always for versions older than 2.6, which is when
the UUID ordering changed. The second breakage is more problematic as
it affects the vast majority of x86 systems manufactured since 2009.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Fixes: 9f9c9cbb6057 ("drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists")
Fixes: 79bae42d51a5 ("dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()")
Acked-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Artem Savkov <artem.savkov@gmail.com>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: stable@vger.kernel.org [v3.10+]
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/firmware/dmi_scan.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 17afc51..35286fe 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -489,6 +489,10 @@ static int __init dmi_present(const u8 *buf)
buf += 16;
if (memcmp(buf, "_DMI_", 5) == 0 && dmi_checksum(buf, 15)) {
+ if (smbios_ver)
+ dmi_ver = smbios_ver;
+ else
+ dmi_ver = (buf[14] & 0xF0) << 4 | (buf[14] & 0x0F);
dmi_num = (buf[13] << 8) | buf[12];
dmi_len = (buf[7] << 8) | buf[6];
dmi_base = (buf[11] << 24) | (buf[10] << 16) |
@@ -496,12 +500,9 @@ static int __init dmi_present(const u8 *buf)
if (dmi_walk_early(dmi_decode) == 0) {
if (smbios_ver) {
- dmi_ver = smbios_ver;
pr_info("SMBIOS %d.%d present.\n",
dmi_ver >> 8, dmi_ver & 0xFF);
} else {
- dmi_ver = (buf[14] & 0xF0) << 4 |
- (buf[14] & 0x0F);
pr_info("Legacy DMI %d.%d present.\n",
dmi_ver >> 8, dmi_ver & 0xFF);
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 163/178] thermal: armada: Update Armada 380 thermal sensor coefficients
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (161 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 162/178] firmware: dmi_scan: Fix ordering of product_uuid Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 164/178] md/raid5: don't record new size if resize_stripes fails Sasha Levin
` (15 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Nadav Haklai <nadavh@marvell.com>
[ Upstream commit efa86858e1d8970411a140fa1e0c4dd18a8f2a89 ]
Improve the Armada 380 thermal sensor accuracy by using updated formula.
The updated formula is:
Temperature[C degrees] = 0.4761 * tsen_vsen_out - 279.1
Signed-off-by: Nadav Haklai <nadavh@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: <stable@vger.kernel.org> #v3.16
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/thermal/armada_thermal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index 9d1420a..e6f1acc 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -240,9 +240,9 @@ static const struct armada_thermal_data armada380_data = {
.is_valid_shift = 10,
.temp_shift = 0,
.temp_mask = 0x3ff,
- .coef_b = 1169498786UL,
- .coef_m = 2000000UL,
- .coef_div = 4289,
+ .coef_b = 2931108200UL,
+ .coef_m = 5000000UL,
+ .coef_div = 10502,
.inverted = true,
};
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 164/178] md/raid5: don't record new size if resize_stripes fails.
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (162 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 163/178] thermal: armada: Update Armada 380 thermal sensor coefficients Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 165/178] rtlwifi: rtl8192cu: Fix kernel deadlock Sasha Levin
` (14 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: NeilBrown <neilb@suse.de>
[ Upstream commit 6e9eac2dcee5e19f125967dd2be3e36558c42fff ]
If any memory allocation in resize_stripes fails we will return
-ENOMEM, but in some cases we update conf->pool_size anyway.
This means that if we try again, the allocations will be assumed
to be larger than they are, and badness results.
So only update pool_size if there is no error.
This bug was introduced in 2.6.17 and the patch is suitable for
-stable.
Fixes: ad01c9e3752f ("[PATCH] md: Allow stripes to be expanded in preparation for expanding an array")
Cc: stable@vger.kernel.org (v2.6.17+)
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/md/raid5.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 8577cc7..e421016 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1936,7 +1936,8 @@ static int resize_stripes(struct r5conf *conf, int newsize)
conf->slab_cache = sc;
conf->active_name = 1-conf->active_name;
- conf->pool_size = newsize;
+ if (!err)
+ conf->pool_size = newsize;
return err;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 165/178] rtlwifi: rtl8192cu: Fix kernel deadlock
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (163 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 164/178] md/raid5: don't record new size if resize_stripes fails Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 166/178] storvsc: Set the SRB flags correctly when no data transfer is needed Sasha Levin
` (13 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Larry Finger <Larry.Finger@lwfinger.net>
[ Upstream commit 414b7e3b9ce8b0577f613e656fdbc36b34b444dd ]
The USB mini-driver in rtlwifi, which is used by rtl8192cu, issues a call to
usb_control_msg() with a timeout value of 0. In some instances where the
interface is shutting down, this infinite wait results in a CPU deadlock. A
one second timeout fixes this problem without affecting any normal operations.
This bug is reported at https://bugzilla.novell.com/show_bug.cgi?id=927786.
Reported-by: Bernhard Wiedemann <bwiedemann@suse.com>
Tested-by: Bernhard Wiedemann <bwiedemann@suse.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Cc: Bernhard Wiedemann <bwiedemann@suse.com>
Cc: Takashi Iwai<tiwai@suse.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/net/wireless/rtlwifi/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index 46ee956..27cd6ca 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -126,7 +126,7 @@ static int _usbctrl_vendorreq_sync_read(struct usb_device *udev, u8 request,
do {
status = usb_control_msg(udev, pipe, request, reqtype, value,
- index, pdata, len, 0); /*max. timeout*/
+ index, pdata, len, 1000);
if (status < 0) {
/* firmware download is checksumed, don't retry */
if ((value >= FW_8192C_START_ADDRESS &&
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 166/178] storvsc: Set the SRB flags correctly when no data transfer is needed
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (164 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 165/178] rtlwifi: rtl8192cu: Fix kernel deadlock Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 167/178] sd: Disable support for 256 byte/sector disks Sasha Levin
` (12 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "K. Y. Srinivasan" <kys@microsoft.com>
[ Upstream commit dc45708ca9988656d706940df5fd102672c5de92 ]
Set the SRB flags correctly when there is no data transfer. Without this
change some IHV drivers will fail valid commands such as TEST_UNIT_READY.
Cc: <stable@vger.kernel.org>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Long Li <longli@microsoft.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/scsi/storvsc_drv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 4534d9d..e511e34 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1623,8 +1623,7 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd)
break;
default:
vm_srb->data_in = UNKNOWN_TYPE;
- vm_srb->win8_extension.srb_flags |= (SRB_FLAGS_DATA_IN |
- SRB_FLAGS_DATA_OUT);
+ vm_srb->win8_extension.srb_flags |= SRB_FLAGS_NO_DATA_TRANSFER;
break;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 167/178] sd: Disable support for 256 byte/sector disks
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (165 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 166/178] storvsc: Set the SRB flags correctly when no data transfer is needed Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 168/178] ACPI / init: Fix the ordering of acpi_reserve_resources() Sasha Levin
` (11 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Mark Hounschell <dmarkh@cfl.rr.com>
[ Upstream commit 74856fbf441929918c49ff262ace9835048e4e6a ]
256 bytes per sector support has been broken since 2.6.X,
and no-one stepped up to fix this.
So disable support for it.
Signed-off-by: Mark Hounschell <dmarkh@cfl.rr.com>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/scsi/sd.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 7a4d88c..ce382e8 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1634,6 +1634,7 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd)
{
u64 start_lba = blk_rq_pos(scmd->request);
u64 end_lba = blk_rq_pos(scmd->request) + (scsi_bufflen(scmd) / 512);
+ u64 factor = scmd->device->sector_size / 512;
u64 bad_lba;
int info_valid;
/*
@@ -1655,16 +1656,9 @@ static unsigned int sd_completed_bytes(struct scsi_cmnd *scmd)
if (scsi_bufflen(scmd) <= scmd->device->sector_size)
return 0;
- if (scmd->device->sector_size < 512) {
- /* only legitimate sector_size here is 256 */
- start_lba <<= 1;
- end_lba <<= 1;
- } else {
- /* be careful ... don't want any overflows */
- unsigned int factor = scmd->device->sector_size / 512;
- do_div(start_lba, factor);
- do_div(end_lba, factor);
- }
+ /* be careful ... don't want any overflows */
+ do_div(start_lba, factor);
+ do_div(end_lba, factor);
/* The bad lba was reported incorrectly, we have no idea where
* the error is.
@@ -2231,8 +2225,7 @@ got_data:
if (sector_size != 512 &&
sector_size != 1024 &&
sector_size != 2048 &&
- sector_size != 4096 &&
- sector_size != 256) {
+ sector_size != 4096) {
sd_printk(KERN_NOTICE, sdkp, "Unsupported sector size %d.\n",
sector_size);
/*
@@ -2287,8 +2280,6 @@ got_data:
sdkp->capacity <<= 2;
else if (sector_size == 1024)
sdkp->capacity <<= 1;
- else if (sector_size == 256)
- sdkp->capacity >>= 1;
blk_queue_physical_block_size(sdp->request_queue,
sdkp->physical_block_size);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 168/178] ACPI / init: Fix the ordering of acpi_reserve_resources()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (166 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 167/178] sd: Disable support for 256 byte/sector disks Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 169/178] iwlwifi: pcie: prevent using unmapped memory in fw monitor Sasha Levin
` (10 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
[ Upstream commit b9a5e5e18fbf223502c0b2264c15024e393da928 ]
Since acpi_reserve_resources() is defined as a device_initcall(),
there's no guarantee that it will be executed in the right order
with respect to the rest of the ACPI initialization code. On some
systems this leads to breakage if, for example, the address range
that should be reserved for the ACPI fixed registers is given to
the PCI host bridge instead if the race is won by the wrong code
path.
Fix this by turning acpi_reserve_resources() into a void function
and calling it directly from within the ACPI initialization sequence.
Reported-and-tested-by: George McCollister <george.mccollister@gmail.com>
Link: http://marc.info/?t=143092384600002&r=1&w=2
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/acpi/osl.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 9964f70..8383598 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -182,7 +182,7 @@ static void __init acpi_request_region (struct acpi_generic_address *gas,
request_mem_region(addr, length, desc);
}
-static int __init acpi_reserve_resources(void)
+static void __init acpi_reserve_resources(void)
{
acpi_request_region(&acpi_gbl_FADT.xpm1a_event_block, acpi_gbl_FADT.pm1_event_length,
"ACPI PM1a_EVT_BLK");
@@ -211,10 +211,7 @@ static int __init acpi_reserve_resources(void)
if (!(acpi_gbl_FADT.gpe1_block_length & 0x1))
acpi_request_region(&acpi_gbl_FADT.xgpe1_block,
acpi_gbl_FADT.gpe1_block_length, "ACPI GPE1_BLK");
-
- return 0;
}
-device_initcall(acpi_reserve_resources);
void acpi_os_printf(const char *fmt, ...)
{
@@ -1839,6 +1836,7 @@ acpi_status __init acpi_os_initialize(void)
acpi_status __init acpi_os_initialize1(void)
{
+ acpi_reserve_resources();
kacpid_wq = alloc_workqueue("kacpid", 0, 1);
kacpi_notify_wq = alloc_workqueue("kacpi_notify", 0, 1);
kacpi_hotplug_wq = alloc_ordered_workqueue("kacpi_hotplug", 0);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 169/178] iwlwifi: pcie: prevent using unmapped memory in fw monitor
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (167 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 168/178] ACPI / init: Fix the ordering of acpi_reserve_resources() Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 170/178] drm/radeon: add new bonaire pci id Sasha Levin
` (9 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Liad Kaufman <liad.kaufman@intel.com>
[ Upstream commit 553452e5ffc0ed13214a287549627d02d9d7fbdc ]
In the case of a DMA mapping error on the last iteration of
the loop of the allocation of memory of the FW monitor we
indeed free the pages, but don't NULL out the page variable
thus allowing for the possibility of setting the FW monitor
variables with invalid data to use.
Fixes: c2d202017da1 ("iwlwifi: pcie: add firmware monitor capabilities")
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/net/wireless/iwlwifi/pcie/trans.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index dd2f3f8..c943baa 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -5,8 +5,8 @@
*
* GPL LICENSE SUMMARY
*
- * Copyright(c) 2007 - 2014 Intel Corporation. All rights reserved.
- * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
+ * Copyright(c) 2007 - 2015 Intel Corporation. All rights reserved.
+ * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
@@ -31,8 +31,8 @@
*
* BSD LICENSE
*
- * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
- * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
+ * Copyright(c) 2005 - 2015 Intel Corporation. All rights reserved.
+ * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -98,7 +98,7 @@ static void iwl_pcie_free_fw_monitor(struct iwl_trans *trans)
static void iwl_pcie_alloc_fw_monitor(struct iwl_trans *trans)
{
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
- struct page *page;
+ struct page *page = NULL;
dma_addr_t phys;
u32 size;
u8 power;
@@ -125,6 +125,7 @@ static void iwl_pcie_alloc_fw_monitor(struct iwl_trans *trans)
DMA_FROM_DEVICE);
if (dma_mapping_error(trans->dev, phys)) {
__free_pages(page, order);
+ page = NULL;
continue;
}
IWL_INFO(trans,
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 170/178] drm/radeon: add new bonaire pci id
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (168 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 169/178] iwlwifi: pcie: prevent using unmapped memory in fw monitor Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 171/178] drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling Sasha Levin
` (8 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Alex Deucher <alexander.deucher@amd.com>
[ Upstream commit fcf3b54282e4c5a95a1f45f67558bc105acdbc6a ]
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
include/drm/drm_pciids.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/drm/drm_pciids.h b/include/drm/drm_pciids.h
index 2dd405c..45c39a3 100644
--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -186,6 +186,7 @@
{0x1002, 0x6658, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \
{0x1002, 0x665c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \
{0x1002, 0x665d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \
+ {0x1002, 0x665f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_BONAIRE|RADEON_NEW_MEMMAP}, \
{0x1002, 0x6660, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HAINAN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
{0x1002, 0x6663, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HAINAN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
{0x1002, 0x6664, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_HAINAN|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 171/178] drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (169 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 170/178] drm/radeon: add new bonaire pci id Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 172/178] drm/radeon: retry dcpd fetch Sasha Levin
` (7 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Christian König <christian.koenig@amd.com>
[ Upstream commit 607d48063512707a414e346972e2210dc71ab491 ]
The mapping range is inclusive between starting and ending addresses.
Signed-off-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/cik.c | 4 ++--
drivers/gpu/drm/radeon/evergreen.c | 2 +-
drivers/gpu/drm/radeon/ni.c | 5 +++--
drivers/gpu/drm/radeon/r600.c | 2 +-
drivers/gpu/drm/radeon/rv770.c | 2 +-
drivers/gpu/drm/radeon/si.c | 4 ++--
6 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 0c6fbc0..8e80281 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -5749,7 +5749,7 @@ static int cik_pcie_gart_enable(struct radeon_device *rdev)
L2_CACHE_BIGK_FRAGMENT_SIZE(4));
/* setup context0 */
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR,
(u32)(rdev->dummy_page.addr >> 12));
@@ -5764,7 +5764,7 @@ static int cik_pcie_gart_enable(struct radeon_device *rdev)
/* restore context1-15 */
/* set vm size, must be a multiple of 4 */
WREG32(VM_CONTEXT1_PAGE_TABLE_START_ADDR, 0);
- WREG32(VM_CONTEXT1_PAGE_TABLE_END_ADDR, rdev->vm_manager.max_pfn);
+ WREG32(VM_CONTEXT1_PAGE_TABLE_END_ADDR, rdev->vm_manager.max_pfn - 1);
for (i = 1; i < 16; i++) {
if (i < 8)
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2),
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index c674f63..d9f431d 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2456,7 +2456,7 @@ static int evergreen_pcie_gart_enable(struct radeon_device *rdev)
WREG32(MC_VM_MB_L1_TLB2_CNTL, tmp);
WREG32(MC_VM_MB_L1_TLB3_CNTL, tmp);
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) |
RANGE_PROTECTION_FAULT_ENABLE_DEFAULT);
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 8a83c91..63c2693 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -1250,7 +1250,7 @@ static int cayman_pcie_gart_enable(struct radeon_device *rdev)
L2_CACHE_BIGK_FRAGMENT_SIZE(6));
/* setup context0 */
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR,
(u32)(rdev->dummy_page.addr >> 12));
@@ -1269,7 +1269,8 @@ static int cayman_pcie_gart_enable(struct radeon_device *rdev)
*/
for (i = 1; i < 8; i++) {
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR + (i << 2), 0);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR + (i << 2), rdev->vm_manager.max_pfn);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR + (i << 2),
+ rdev->vm_manager.max_pfn - 1);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2),
rdev->vm_manager.saved_table_addr[i]);
}
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index ee0868d..08d66fd 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1085,7 +1085,7 @@ static int r600_pcie_gart_enable(struct radeon_device *rdev)
WREG32(MC_VM_L1_TLB_MCB_RD_SEM_CNTL, tmp | ENABLE_SEMAPHORE_MODE);
WREG32(MC_VM_L1_TLB_MCB_WR_SEM_CNTL, tmp | ENABLE_SEMAPHORE_MODE);
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) |
RANGE_PROTECTION_FAULT_ENABLE_DEFAULT);
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 372016e..819c2c1 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -920,7 +920,7 @@ static int rv770_pcie_gart_enable(struct radeon_device *rdev)
WREG32(MC_VM_MB_L1_TLB2_CNTL, tmp);
WREG32(MC_VM_MB_L1_TLB3_CNTL, tmp);
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) |
RANGE_PROTECTION_FAULT_ENABLE_DEFAULT);
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 1c3d90c..3501956 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -4270,7 +4270,7 @@ static int si_pcie_gart_enable(struct radeon_device *rdev)
L2_CACHE_BIGK_FRAGMENT_SIZE(4));
/* setup context0 */
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR,
(u32)(rdev->dummy_page.addr >> 12));
@@ -4285,7 +4285,7 @@ static int si_pcie_gart_enable(struct radeon_device *rdev)
/* empty context1-15 */
/* set vm size, must be a multiple of 4 */
WREG32(VM_CONTEXT1_PAGE_TABLE_START_ADDR, 0);
- WREG32(VM_CONTEXT1_PAGE_TABLE_END_ADDR, rdev->vm_manager.max_pfn);
+ WREG32(VM_CONTEXT1_PAGE_TABLE_END_ADDR, rdev->vm_manager.max_pfn - 1);
/* Assign the pt base to something valid for now; the pts used for
* the VMs are determined by the application and setup and assigned
* on the fly in the vm part of radeon_gart.c
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 172/178] drm/radeon: retry dcpd fetch
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (170 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 171/178] drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 173/178] drm/radeon: don't share plls if monitors differ in audio support Sasha Levin
` (6 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Alex Deucher <alexander.deucher@amd.com>
[ Upstream commit 0f28d1281b6c54cc98746ae61e44e7f540758ed4 ]
Retry the dpcd fetch several times. Some eDP panels
fail several times before the fetch is successful.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=73530
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/atombios_dp.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
index 5bf825d..ceab25d 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -405,19 +405,21 @@ bool radeon_dp_getdpcd(struct radeon_connector *radeon_connector)
{
struct radeon_connector_atom_dig *dig_connector = radeon_connector->con_priv;
u8 msg[DP_DPCD_SIZE];
- int ret;
+ int ret, i;
- ret = drm_dp_dpcd_read(&radeon_connector->ddc_bus->aux, DP_DPCD_REV, msg,
- DP_DPCD_SIZE);
- if (ret > 0) {
- memcpy(dig_connector->dpcd, msg, DP_DPCD_SIZE);
+ for (i = 0; i < 7; i++) {
+ ret = drm_dp_dpcd_read(&radeon_connector->ddc_bus->aux, DP_DPCD_REV, msg,
+ DP_DPCD_SIZE);
+ if (ret == DP_DPCD_SIZE) {
+ memcpy(dig_connector->dpcd, msg, DP_DPCD_SIZE);
- DRM_DEBUG_KMS("DPCD: %*ph\n", (int)sizeof(dig_connector->dpcd),
- dig_connector->dpcd);
+ DRM_DEBUG_KMS("DPCD: %*ph\n", (int)sizeof(dig_connector->dpcd),
+ dig_connector->dpcd);
- radeon_dp_probe_oui(radeon_connector);
+ radeon_dp_probe_oui(radeon_connector);
- return true;
+ return true;
+ }
}
dig_connector->dpcd[0] = 0;
return false;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 173/178] drm/radeon: don't share plls if monitors differ in audio support
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (171 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 172/178] drm/radeon: retry dcpd fetch Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 174/178] drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling" Sasha Levin
` (5 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Alex Deucher <alexander.deucher@amd.com>
[ Upstream commit a10f0df0615abb194968fc08147f3cdd70fd5aa5 ]
Enabling audio may enable different pll dividers. Don't share
plls if the monitors differ in audio support.
bug:
https://bugzilla.kernel.org/show_bug.cgi?id=98751
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/atombios_crtc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 5d73e5f..4f9ec36 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1789,7 +1789,9 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)
if ((crtc->mode.clock == test_crtc->mode.clock) &&
(adjusted_clock == test_adjusted_clock) &&
(radeon_crtc->ss_enabled == test_radeon_crtc->ss_enabled) &&
- (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID))
+ (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID) &&
+ (drm_detect_monitor_audio(radeon_connector_edid(test_radeon_crtc->connector)) ==
+ drm_detect_monitor_audio(radeon_connector_edid(radeon_crtc->connector))))
return test_radeon_crtc->pll_id;
}
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 174/178] drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling"
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (172 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 173/178] drm/radeon: don't share plls if monitors differ in audio support Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 175/178] vfs: read file_handle only once in handle_to_path Sasha Levin
` (4 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Christian König <christian.koenig@amd.com>
[ Upstream commit 7c0411d2fabc2e2702c9871ffb603e251158b317 ]
We have that bug for years and some users report side effects when fixing it on older hardware.
So revert it for VM_CONTEXT0_PAGE_TABLE_END_ADDR, but keep it for VM 1-15.
Signed-off-by: Christian König <christian.koenig@amd.com>
CC: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/gpu/drm/radeon/cik.c | 2 +-
drivers/gpu/drm/radeon/evergreen.c | 2 +-
drivers/gpu/drm/radeon/ni.c | 2 +-
drivers/gpu/drm/radeon/r600.c | 2 +-
drivers/gpu/drm/radeon/rv770.c | 2 +-
drivers/gpu/drm/radeon/si.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 8e80281..63e8bff 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -5749,7 +5749,7 @@ static int cik_pcie_gart_enable(struct radeon_device *rdev)
L2_CACHE_BIGK_FRAGMENT_SIZE(4));
/* setup context0 */
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR,
(u32)(rdev->dummy_page.addr >> 12));
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index d9f431d..c674f63 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -2456,7 +2456,7 @@ static int evergreen_pcie_gart_enable(struct radeon_device *rdev)
WREG32(MC_VM_MB_L1_TLB2_CNTL, tmp);
WREG32(MC_VM_MB_L1_TLB3_CNTL, tmp);
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) |
RANGE_PROTECTION_FAULT_ENABLE_DEFAULT);
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index 63c2693..a019ba2 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -1250,7 +1250,7 @@ static int cayman_pcie_gart_enable(struct radeon_device *rdev)
L2_CACHE_BIGK_FRAGMENT_SIZE(6));
/* setup context0 */
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR,
(u32)(rdev->dummy_page.addr >> 12));
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index 08d66fd..ee0868d 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -1085,7 +1085,7 @@ static int r600_pcie_gart_enable(struct radeon_device *rdev)
WREG32(MC_VM_L1_TLB_MCB_RD_SEM_CNTL, tmp | ENABLE_SEMAPHORE_MODE);
WREG32(MC_VM_L1_TLB_MCB_WR_SEM_CNTL, tmp | ENABLE_SEMAPHORE_MODE);
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) |
RANGE_PROTECTION_FAULT_ENABLE_DEFAULT);
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 819c2c1..372016e 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -920,7 +920,7 @@ static int rv770_pcie_gart_enable(struct radeon_device *rdev)
WREG32(MC_VM_MB_L1_TLB2_CNTL, tmp);
WREG32(MC_VM_MB_L1_TLB3_CNTL, tmp);
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) |
RANGE_PROTECTION_FAULT_ENABLE_DEFAULT);
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 3501956..3ad2e07 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -4270,7 +4270,7 @@ static int si_pcie_gart_enable(struct radeon_device *rdev)
L2_CACHE_BIGK_FRAGMENT_SIZE(4));
/* setup context0 */
WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12);
- WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end >> 12) - 1);
+ WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12);
WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12);
WREG32(VM_CONTEXT0_PROTECTION_FAULT_DEFAULT_ADDR,
(u32)(rdev->dummy_page.addr >> 12));
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 175/178] vfs: read file_handle only once in handle_to_path
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (173 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 174/178] drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling" Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 176/178] power/reset: at91: fix return value check in at91_reset_platform_probe() Sasha Levin
` (3 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
[ Upstream commit 161f873b89136eb1e69477c847d5a5033239d9ba ]
We used to read file_handle twice. Once to get the amount of extra
bytes, and once to fetch the entire structure.
This may be problematic since we do size verifications only after the
first read, so if the number of extra bytes changes in userspace between
the first and second calls, we'll have an incoherent view of
file_handle.
Instead, read the constant size once, and copy that over to the final
structure without having to re-read it again.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
fs/fhandle.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/fhandle.c b/fs/fhandle.c
index 999ff5c..d59712d 100644
--- a/fs/fhandle.c
+++ b/fs/fhandle.c
@@ -195,8 +195,9 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh,
goto out_err;
}
/* copy the full handle */
- if (copy_from_user(handle, ufh,
- sizeof(struct file_handle) +
+ *handle = f_handle;
+ if (copy_from_user(&handle->f_handle,
+ &ufh->f_handle,
f_handle.handle_bytes)) {
retval = -EFAULT;
goto out_handle;
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 176/178] power/reset: at91: fix return value check in at91_reset_platform_probe()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (174 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 175/178] vfs: read file_handle only once in handle_to_path Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 177/178] ARC: unbork !LLSC build Sasha Levin
` (2 subsequent siblings)
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
[ Upstream commit 932df43005389300a3336421e4aedb25390ae144 ]
In case of error, the function devm_ioremap() returns NULL
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
Fixes: ecfe64d8c55f ("power: reset: Add AT91 reset driver")
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
drivers/power/reset/at91-reset.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c
index 3cb3669..80d490d 100644
--- a/drivers/power/reset/at91-reset.c
+++ b/drivers/power/reset/at91-reset.c
@@ -205,9 +205,9 @@ static int at91_reset_platform_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, idx + 1 );
at91_ramc_base[idx] = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
- if (IS_ERR(at91_ramc_base[idx])) {
+ if (!at91_ramc_base[idx]) {
dev_err(&pdev->dev, "Could not map ram controller address\n");
- return PTR_ERR(at91_ramc_base[idx]);
+ return -ENOMEM;
}
}
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 177/178] ARC: unbork !LLSC build
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (175 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 176/178] power/reset: at91: fix return value check in at91_reset_platform_probe() Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 178/178] xfrm: release dst_orig in case of error in xfrm_lookup() Sasha Levin
2015-06-09 17:17 ` [PATCH 3.18 000/178] 3.18.15-review Kevin Hilman
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: Vineet Gupta <vgupta@synopsys.com>
[ Upstream commit daaf40e53b5dbdf75255d58a45ce8ac65ca511a8 ]
Fixes: f7d11e93ee97a locking,arch,arc: Fold atomic_ops
Cc: <stable@kernel.vger.org> # 3.18
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
arch/arc/include/asm/atomic.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h
index 067551b..9917a45 100644
--- a/arch/arc/include/asm/atomic.h
+++ b/arch/arc/include/asm/atomic.h
@@ -99,7 +99,7 @@ static inline void atomic_##op(int i, atomic_t *v) \
atomic_ops_unlock(flags); \
}
-#define ATOMIC_OP_RETURN(op, c_op) \
+#define ATOMIC_OP_RETURN(op, c_op, asm_op) \
static inline int atomic_##op##_return(int i, atomic_t *v) \
{ \
unsigned long flags; \
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* [PATCH 3.18 178/178] xfrm: release dst_orig in case of error in xfrm_lookup()
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (176 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 177/178] ARC: unbork !LLSC build Sasha Levin
@ 2015-06-08 13:42 ` Sasha Levin
2015-06-09 17:17 ` [PATCH 3.18 000/178] 3.18.15-review Kevin Hilman
178 siblings, 0 replies; 185+ messages in thread
From: Sasha Levin @ 2015-06-08 13:42 UTC (permalink / raw)
To: stable, stable-commits; +Cc: sasha.levin
From: huaibin Wang <huaibin.wang@6wind.com>
[ Upstream commit ac37e2515c1a89c477459a2020b6bfdedabdb91b ]
dst_orig should be released on error. Function like __xfrm_route_forward()
expects that behavior.
Since a recent commit, xfrm_lookup() may also be called by xfrm_lookup_route(),
which expects the opposite.
Let's introduce a new flag (XFRM_LOOKUP_KEEP_DST_REF) to tell what should be
done in case of error.
Fixes: f92ee61982d("xfrm: Generate blackhole routes only from route lookup functions")
Signed-off-by: huaibin Wang <huaibin.wang@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
---
include/net/dst.h | 1 +
net/xfrm/xfrm_policy.c | 12 ++++++------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/include/net/dst.h b/include/net/dst.h
index a8ae4e7..0fb99a2 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -481,6 +481,7 @@ void dst_init(void);
enum {
XFRM_LOOKUP_ICMP = 1 << 0,
XFRM_LOOKUP_QUEUE = 1 << 1,
+ XFRM_LOOKUP_KEEP_DST_REF = 1 << 2,
};
struct flowi;
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 88bf289..f62fd2c 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2264,11 +2264,9 @@ struct dst_entry *xfrm_lookup(struct net *net, struct dst_entry *dst_orig,
* have the xfrm_state's. We need to wait for KM to
* negotiate new SA's or bail out with error.*/
if (net->xfrm.sysctl_larval_drop) {
- dst_release(dst);
- xfrm_pols_put(pols, drop_pols);
XFRM_INC_STATS(net, LINUX_MIB_XFRMOUTNOSTATES);
-
- return ERR_PTR(-EREMOTE);
+ err = -EREMOTE;
+ goto error;
}
err = -EAGAIN;
@@ -2319,7 +2317,8 @@ nopol:
error:
dst_release(dst);
dropdst:
- dst_release(dst_orig);
+ if (!(flags & XFRM_LOOKUP_KEEP_DST_REF))
+ dst_release(dst_orig);
xfrm_pols_put(pols, drop_pols);
return ERR_PTR(err);
}
@@ -2333,7 +2332,8 @@ struct dst_entry *xfrm_lookup_route(struct net *net, struct dst_entry *dst_orig,
struct sock *sk, int flags)
{
struct dst_entry *dst = xfrm_lookup(net, dst_orig, fl, sk,
- flags | XFRM_LOOKUP_QUEUE);
+ flags | XFRM_LOOKUP_QUEUE |
+ XFRM_LOOKUP_KEEP_DST_REF);
if (IS_ERR(dst) && PTR_ERR(dst) == -EREMOTE)
return make_blackhole(net, dst_orig->ops->family, dst_orig);
--
2.1.0
^ permalink raw reply related [flat|nested] 185+ messages in thread
* Re: [PATCH 3.18 000/178] 3.18.15-review
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
` (177 preceding siblings ...)
2015-06-08 13:42 ` [PATCH 3.18 178/178] xfrm: release dst_orig in case of error in xfrm_lookup() Sasha Levin
@ 2015-06-09 17:17 ` Kevin Hilman
2015-06-10 5:24 ` Guenter Roeck
2015-06-11 2:39 ` Sasha Levin
178 siblings, 2 replies; 185+ messages in thread
From: Kevin Hilman @ 2015-06-09 17:17 UTC (permalink / raw)
To: lkml; +Cc: stable, stable-commits, Sasha Levin, Tyler Baker
Hi Sasha,
On Mon, Jun 8, 2015 at 6:39 AM, Sasha Levin <sasha.levin@oracle.com> wrote:
> This is the start of the stable review cycle for the 3.18.15 release.
> There are 178 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
We've started build/boot testing your 3.18 stable queue with the
automated build/boot tools at the kernelci.org project. We'll soon be
sending automated reports to this list for your stable queue (and
other stable trees.) Until we have the email reports automated, below
is the report for this review series which has a whole pile of build
failures across x86, arm and arm64.
Kevin
stable-sasha build: 143 builds: 136 failed, 7 passed, 374 errors, 284
warnings (v3.18.14-178-gaf1f9d92cb53)
Full Build Summary:
http://kernelci.org/build/stable-sasha/kernel/v3.18.14-178-gaf1f9d92cb53/
Tree: stable-sasha
Branch: local/linux-3.18.y-queue
Git Describe: v3.18.14-178-gaf1f9d92cb53
Git Commit: af1f9d92cb53b5487a08bdb19c7aef73d15bca2d
Git URL: git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
Built: 3 unique architectures
Build Failures Detected:
x86:
allmodconfig: FAIL
defconfig+CONFIG_OF_UNITTEST=y: FAIL
defconfig+kvm_guest: FAIL
i386_defconfig: FAIL
x86_64_defconfig: FAIL
arm:
acs5k_defconfig: FAIL
acs5k_tiny_defconfig: FAIL
allmodconfig: FAIL
am200epdkit_defconfig: FAIL
ape6evm_defconfig: FAIL
armadillo800eva_defconfig: FAIL
assabet_defconfig: FAIL
at91_dt_defconfig: FAIL
at91rm9200_defconfig: FAIL
at91sam9260_9g20_defconfig: FAIL
at91sam9261_9g10_defconfig: FAIL
at91sam9263_defconfig: FAIL
at91sam9g45_defconfig: FAIL
at91sam9rl_defconfig: FAIL
at91x40_defconfig: FAIL
axm55xx_defconfig: FAIL
badge4_defconfig: FAIL
bcm2835_defconfig: FAIL
bcm_defconfig: FAIL
bockw_defconfig: FAIL
cerfcube_defconfig: FAIL
clps711x_defconfig: FAIL
cm_x2xx_defconfig: FAIL
cm_x300_defconfig: FAIL
cns3420vb_defconfig: FAIL
colibri_pxa270_defconfig: FAIL
colibri_pxa300_defconfig: FAIL
collie_defconfig: FAIL
corgi_defconfig: FAIL
davinci_all_defconfig: FAIL
dove_defconfig: FAIL
ebsa110_defconfig: FAIL
efm32_defconfig: FAIL
em_x270_defconfig: FAIL
ep93xx_defconfig: FAIL
eseries_pxa_defconfig: FAIL
exynos_defconfig: FAIL
ezx_defconfig: FAIL
footbridge_defconfig: FAIL
h3600_defconfig: FAIL
h5000_defconfig: FAIL
hackkit_defconfig: FAIL
hisi_defconfig: FAIL
imote2_defconfig: FAIL
imx_v4_v5_defconfig: FAIL
imx_v6_v7_defconfig: FAIL
integrator_defconfig: FAIL
iop13xx_defconfig: FAIL
iop32x_defconfig: FAIL
iop33x_defconfig: FAIL
ixp4xx_defconfig: FAIL
jornada720_defconfig: FAIL
keystone_defconfig: FAIL
koelsch_defconfig: FAIL
ks8695_defconfig: FAIL
kzm9g_defconfig: FAIL
lager_defconfig: FAIL
lart_defconfig: FAIL
lpc32xx_defconfig: FAIL
lpd270_defconfig: FAIL
lubbock_defconfig: FAIL
mackerel_defconfig: FAIL
magician_defconfig: FAIL
mainstone_defconfig: FAIL
marzen_defconfig: FAIL
mini2440_defconfig: FAIL
mmp2_defconfig: FAIL
moxart_defconfig: FAIL
msm_defconfig: FAIL
multi_v5_defconfig: FAIL
multi_v7_defconfig: FAIL
multi_v7_defconfig+CONFIG_ARM_LPAE=y: FAIL
multi_v7_defconfig+CONFIG_CPU_BIG_ENDIAN=y: FAIL
multi_v7_defconfig+CONFIG_PROVE_LOCKING=y: FAIL
multi_v7_defconfig+CONFIG_THUMB2_KERNEL=y: FAIL
mv78xx0_defconfig: FAIL
mvebu_v5_defconfig: FAIL
mvebu_v7_defconfig: FAIL
mvebu_v7_defconfig+CONFIG_CPU_BIG_ENDIAN=y: FAIL
mxs_defconfig: FAIL
neponset_defconfig: FAIL
netwinder_defconfig: FAIL
netx_defconfig: FAIL
nhk8815_defconfig: FAIL
nuc910_defconfig: FAIL
nuc950_defconfig: FAIL
nuc960_defconfig: FAIL
omap1_defconfig: FAIL
omap2plus_defconfig: FAIL
orion5x_defconfig: FAIL
palmz72_defconfig: FAIL
pcm027_defconfig: FAIL
pleb_defconfig: FAIL
prima2_defconfig: FAIL
pxa168_defconfig: FAIL
pxa255-idp_defconfig: FAIL
pxa3xx_defconfig: FAIL
pxa910_defconfig: FAIL
qcom_defconfig: FAIL
raumfeld_defconfig: FAIL
realview-smp_defconfig: FAIL
realview_defconfig: FAIL
rpc_defconfig: FAIL
s3c2410_defconfig: FAIL
s3c6400_defconfig: FAIL
s5pv210_defconfig: FAIL
sama5_defconfig: FAIL
shannon_defconfig: FAIL
shmobile_defconfig: FAIL
simpad_defconfig: FAIL
socfpga_defconfig: FAIL
spear13xx_defconfig: FAIL
spear3xx_defconfig: FAIL
spear6xx_defconfig: FAIL
spitz_defconfig: FAIL
sunxi_defconfig: FAIL
tct_hammer_defconfig: FAIL
tegra_defconfig: FAIL
trizeps4_defconfig: FAIL
u300_defconfig: FAIL
u8500_defconfig: FAIL
versatile_defconfig: FAIL
versatile_defconfig+CONFIG_OF_UNITTEST=y: FAIL
vexpress_defconfig: FAIL
viper_defconfig: FAIL
vt8500_v6_v7_defconfig: FAIL
zeus_defconfig: FAIL
arm64:
allmodconfig: FAIL
defconfig: FAIL
defconfig+CONFIG_CPU_BIG_ENDIAN=y: FAIL
defconfig+CONFIG_OF_UNITTEST=y: FAIL
Errors and Warnings Detected:
x86:
allmodconfig: 26 errors, 56 warnings
defconfig+CONFIG_OF_UNITTEST=y: 2 errors, 4 warnings
defconfig+kvm_guest: 2 errors, 4 warnings
i386_defconfig: 2 errors, 3 warnings
x86_64_defconfig: 2 errors, 4 warnings
arm:
acs5k_defconfig: 1 error, 1 warning
acs5k_tiny_defconfig: 1 error, 1 warning
allmodconfig: 26 errors, 28 warnings
am200epdkit_defconfig: 1 error, 1 warning
ape6evm_defconfig: 1 error, 1 warning
armadillo800eva_defconfig: 1 error, 2 warnings
assabet_defconfig: 1 error, 1 warning
at91_dt_defconfig: 1 error, 5 warnings
at91rm9200_defconfig: 1 error, 1 warning
at91sam9260_9g20_defconfig: 1 error, 1 warning
at91sam9261_9g10_defconfig: 1 error, 1 warning
at91sam9263_defconfig: 1 error, 1 warning
at91sam9g45_defconfig: 1 error, 1 warning
at91sam9rl_defconfig: 1 error, 1 warning
at91x40_defconfig: 1 error
axm55xx_defconfig: 2 errors, 1 warning
badge4_defconfig: 1 error, 1 warning
bcm2835_defconfig: 1 error, 1 warning
bcm_defconfig: 1 error, 1 warning
bockw_defconfig: 1 error, 2 warnings
cerfcube_defconfig: 1 error, 2 warnings
clps711x_defconfig: 1 error, 1 warning
cm_x2xx_defconfig: 2 errors, 1 warning
cm_x300_defconfig: 1 error, 1 warning
cns3420vb_defconfig: 2 errors
colibri_pxa270_defconfig: 1 error, 2 warnings
colibri_pxa300_defconfig: 1 error, 1 warning
collie_defconfig: 1 error, 1 warning
corgi_defconfig: 1 error, 3 warnings
davinci_all_defconfig: 1 error, 2 warnings
dove_defconfig: 2 errors, 1 warning
ebsa110_defconfig: 1 error, 1 warning
efm32_defconfig: 1 error, 1 warning
em_x270_defconfig: 1 error, 1 warning
ep93xx_defconfig: 1 error, 1 warning
eseries_pxa_defconfig: 2 errors, 1 warning
exynos_defconfig: 1 error, 1 warning
ezx_defconfig: 1 error, 1 warning
footbridge_defconfig: 1 error, 1 warning
h3600_defconfig: 1 error, 1 warning
h5000_defconfig: 1 error, 1 warning
hackkit_defconfig: 1 error, 1 warning
hisi_defconfig: 2 errors, 1 warning
imote2_defconfig: 1 error, 1 warning
imx_v4_v5_defconfig: 2 errors, 2 warnings
imx_v6_v7_defconfig: 2 errors, 2 warnings
integrator_defconfig: 1 error, 1 warning
iop13xx_defconfig: 1 error, 2 warnings
iop32x_defconfig: 2 errors, 2 warnings
iop33x_defconfig: 1 error, 1 warning
ixp4xx_defconfig: 2 errors, 1 warning
jornada720_defconfig: 1 error, 1 warning
keystone_defconfig: 1 error, 1 warning
koelsch_defconfig: 2 errors, 2 warnings
ks8695_defconfig: 1 error, 1 warning
kzm9g_defconfig: 1 error, 1 warning
lager_defconfig: 2 errors, 2 warnings
lart_defconfig: 1 error, 1 warning
lpc32xx_defconfig: 1 error, 1 warning
lpd270_defconfig: 1 error, 1 warning
lubbock_defconfig: 1 error, 1 warning
mackerel_defconfig: 1 error, 1 warning
magician_defconfig: 1 error, 2 warnings
mainstone_defconfig: 1 error, 1 warning
marzen_defconfig: 2 errors, 2 warnings
mini2440_defconfig: 1 error, 3 warnings
mmp2_defconfig: 1 error, 1 warning
moxart_defconfig: 1 error, 1 warning
msm_defconfig: 1 error, 1 warning
multi_v5_defconfig: 2 errors, 1 warning
multi_v7_defconfig: 2 errors, 2 warnings
multi_v7_defconfig+CONFIG_ARM_LPAE=y: 2 errors, 3 warnings
multi_v7_defconfig+CONFIG_CPU_BIG_ENDIAN=y: 2 errors, 2 warnings
multi_v7_defconfig+CONFIG_PROVE_LOCKING=y: 2 errors, 2 warnings
multi_v7_defconfig+CONFIG_THUMB2_KERNEL=y: 124 errors, 2 warnings
mv78xx0_defconfig: 2 errors, 1 warning
mvebu_v5_defconfig: 2 errors, 1 warning
mvebu_v7_defconfig: 2 errors, 1 warning
mvebu_v7_defconfig+CONFIG_CPU_BIG_ENDIAN=y: 2 errors, 1 warning
mxs_defconfig: 1 error, 1 warning
neponset_defconfig: 1 error, 1 warning
netwinder_defconfig: 1 error, 1 warning
netx_defconfig: 1 error, 1 warning
nhk8815_defconfig: 1 error, 1 warning
nuc910_defconfig: 1 error
nuc950_defconfig: 1 error
nuc960_defconfig: 1 error
omap1_defconfig: 1 error, 1 warning
omap2plus_defconfig: 1 error, 1 warning
orion5x_defconfig: 2 errors, 1 warning
palmz72_defconfig: 1 error, 1 warning
pcm027_defconfig: 1 error, 1 warning
pleb_defconfig: 1 error, 1 warning
prima2_defconfig: 1 error
pxa168_defconfig: 1 error, 1 warning
pxa255-idp_defconfig: 1 error, 1 warning
pxa3xx_defconfig: 1 error, 1 warning
pxa910_defconfig: 1 error, 1 warning
qcom_defconfig: 1 error, 1 warning
raumfeld_defconfig: 1 error, 1 warning
realview-smp_defconfig: 1 error, 4 warnings
realview_defconfig: 1 error, 4 warnings
rpc_defconfig: 2 errors, 1 warning
s3c2410_defconfig: 1 error, 2 warnings
s3c6400_defconfig: 1 error
s5pv210_defconfig: 1 error
sama5_defconfig: 1 error, 5 warnings
shannon_defconfig: 1 error, 1 warning
shmobile_defconfig: 2 errors, 2 warnings
simpad_defconfig: 1 error, 1 warning
socfpga_defconfig: 1 error, 1 warning
spear13xx_defconfig: 2 errors, 1 warning
spear3xx_defconfig: 1 error, 1 warning
spear6xx_defconfig: 1 error, 1 warning
spitz_defconfig: 1 error, 3 warnings
sunxi_defconfig: 2 errors, 1 warning
tct_hammer_defconfig: 1 error
tegra_defconfig: 2 errors, 2 warnings
trizeps4_defconfig: 2 errors, 2 warnings
u300_defconfig: 1 error
u8500_defconfig: 2 errors, 1 warning
versatile_defconfig: 1 error, 1 warning
versatile_defconfig+CONFIG_OF_UNITTEST=y: 1 error, 1 warning
vexpress_defconfig: 2 errors, 1 warning
viper_defconfig: 2 errors, 2 warnings
vt8500_v6_v7_defconfig: 1 error, 1 warning
xcep_defconfig: 1 warning
zeus_defconfig: 2 errors, 2 warnings
arm64:
allmodconfig: 26 errors, 20 warnings
defconfig: 2 errors, 1 warning
defconfig+CONFIG_CPU_BIG_ENDIAN=y: 2 errors, 1 warning
defconfig+CONFIG_OF_UNITTEST=y: 2 errors, 1 warning
Errors summary:
136 block/blk-mq.c:606:4: error: implicit declaration of function
'blk_mq_hw_queue_mapped' [-Werror=implicit-function-declaration]
43 drivers/ata/libata-core.c:4229:7: error:
'ATA_HORKAGE_ZERO_AFTER_TRIM' undeclared here (not in a function)
3 sound/pci/hda/patch_via.c:507:2: error: unknown field
'stream_pm' specified in initializer
3 sound/pci/hda/patch_via.c:507:15: error:
'snd_hda_gen_stream_pm' undeclared here (not in a function)
3 sound/pci/hda/patch_realtek.c:5580:31: error:
'snd_hda_gen_stream_pm' undeclared (first use in this function)
3 sound/pci/hda/patch_realtek.c:5580:18: error: 'struct
hda_codec_ops' has no member named 'stream_pm'
3 sound/pci/hda/patch_realtek.c:5481:8: error: 'struct
hda_codec' has no member named 'power_save_node'
3 sound/pci/hda/patch_realtek.c:5480:11: error: 'struct
hda_codec' has no member named 'core'
3 fs/overlayfs/super.c:855:1: error: expected declaration or
statement at end of input
3 fs/overlayfs/super.c:849:20: error: invalid storage class for
function 'ovl_exit'
3 fs/overlayfs/super.c:844:19: error: invalid storage class for
function 'ovl_init'
3 fs/overlayfs/super.c:839:2: error: initializer element is not constant
3 fs/overlayfs/super.c:839:2: error: (near initialization for
'ovl_fs_type.mount')
3 fs/overlayfs/super.c:830:23: error: invalid storage class for
function 'ovl_mount'
3 fs/overlayfs/super.c:811:9: error: invalid suffix "f42..." on
integer constant
3 fs/overlayfs/super.c:811:1: error: missing terminating ' character
3 fs/overlayfs/super.c:810:1: error: expected expression before
'==' token
3 fs/overlayfs/super.c:806:1: error: expected expression before
'<<' token
3 fs/overlayfs/super.c:764:3: error: label 'out_put_lower_mnt'
used but not defined
3 fs/overlayfs/super.c:749:9: error: invalid suffix "f42..." on
integer constant
3 fs/overlayfs/super.c:749:1: error: missing terminating ' character
3 fs/overlayfs/super.c:732:1: error: expected expression before
'==' token
3 fs/overlayfs/super.c:726:1: error: expected expression before
'<<' token
2 fs/overlayfs/super.c:855:1: error: invalid storage class for
function '__exittest'
2 fs/overlayfs/super.c:854:1: error: invalid storage class for
function '__inittest'
2 drivers/iio/pressure/st_pressure_core.c:421:2: error:
'press_data' undeclared (first use in this function)
1 include/linux/init.h:334:27: error: invalid storage class for
function '__exittest'
1 include/linux/init.h:328:27: error: invalid storage class for
function '__inittest'
1 drivers/iio/pressure/st_pressure_core.c:421:58: error:
'press_data' undeclared (first use in this function)
1 drivers/iio/pressure/st_pressure_core.c:421:14: error:
'press_data' undeclared (first use in this function)
1 arch/arm/kernel/iwmmxt.S:96: Error: MOV Rd, Rs with two low
registers is not permitted on this architecture -- `mov r2,r2'
1 arch/arm/kernel/iwmmxt.S:95: Error: selected processor does
not support Thumb mode `mrc p15,0,r2,c2,c0,0'
1 arch/arm/kernel/iwmmxt.S:92: Error: lo register required --
`sub r2,r2,#4'
1 arch/arm/kernel/iwmmxt.S:88: Error: lo register required --
`add r0,r10,#104'
1 arch/arm/kernel/iwmmxt.S:85: Error: selected processor does
not support Thumb mode `mcr p15,0,r2,c1,c0,2'
1 arch/arm/kernel/iwmmxt.S:84: Error: cannot honor width suffix
-- `orr r2,r2,#0xf'
1 arch/arm/kernel/iwmmxt.S:79: Error: cannot honor width suffix
-- `tst r2,#0xf'
1 arch/arm/kernel/iwmmxt.S:76: Error: selected processor does
not support Thumb mode `mrc p15,0,r2,c1,c0,2'
1 arch/arm/kernel/iwmmxt.S:353: Error: selected processor does
not support Thumb mode `msr cpsr_c,r2'
1 arch/arm/kernel/iwmmxt.S:352: Error: thumb conditional
instruction should be in IT block -- `streq r0,[r3]'
1 arch/arm/kernel/iwmmxt.S:349: Error: lo register required --
`add r0,r0,#104'
1 arch/arm/kernel/iwmmxt.S:347: Error: selected processor does
not support Thumb mode `msr cpsr_c,ip'
1 arch/arm/kernel/iwmmxt.S:346: Error: cannot honor width
suffix -- `orr ip,r2,#0x00000080'
1 arch/arm/kernel/iwmmxt.S:345: Error: selected processor does
not support Thumb mode `mrs r2,cpsr'
1 arch/arm/kernel/iwmmxt.S:336: Error: r15 not allowed here --
`sub pc,lr,r1,lsr#32'
1 arch/arm/kernel/iwmmxt.S:335: Error: selected processor does
not support Thumb mode `mrc p15,0,r1,c2,c0,0'
1 arch/arm/kernel/iwmmxt.S:333: Error: selected processor does
not support Thumb mode `mcr p15,0,r1,c1,c0,2'
1 arch/arm/kernel/iwmmxt.S:332: Error: cannot honor width
suffix -- `eor r1,r1,#0xf'
1 arch/arm/kernel/iwmmxt.S:327: Error: thumb conditional
instruction should be in IT block -- `bxne lr'
1 arch/arm/kernel/iwmmxt.S:326: Error: selected processor does
not support Thumb mode `teq r2,r3'
1 arch/arm/kernel/iwmmxt.S:324: Error: lo register required --
`add r3,r0,#104'
1 arch/arm/kernel/iwmmxt.S:320: Error: cannot honor width
suffix -- `tst r1,#0xf'
1 arch/arm/kernel/iwmmxt.S:317: Error: selected processor does
not support Thumb mode `mrc p15,0,r1,c1,c0,2'
1 arch/arm/kernel/iwmmxt.S:304: Error: selected processor does
not support Thumb mode `msr cpsr_c,ip'
1 arch/arm/kernel/iwmmxt.S:301: Error: cannot honor width
suffix -- `mov r1,#0'
1 arch/arm/kernel/iwmmxt.S:300: Error: MOV Rd, Rs with two low
registers is not permitted on this architecture -- `mov r0,r1'
1 arch/arm/kernel/iwmmxt.S:296: Error: cannot honor width
suffix -- `mov r2,#(0x98)'
1 arch/arm/kernel/iwmmxt.S:295: Error: MOV Rd, Rs with two low
registers is not permitted on this architecture -- `mov r0,r2'
1 arch/arm/kernel/iwmmxt.S:294: Error: selected processor does
not support Thumb mode `msr cpsr_c,ip'
1 arch/arm/kernel/iwmmxt.S:290: Error: selected processor does
not support Thumb mode `teq r2,r3'
1 arch/arm/kernel/iwmmxt.S:289: Error: cannot honor width
suffix -- `bic r2,r2,#0x7'
1 arch/arm/kernel/iwmmxt.S:287: Error: lo register required --
`add r2,r0,#104'
1 arch/arm/kernel/iwmmxt.S:284: Error: selected processor does
not support Thumb mode `msr cpsr_c,r2'
1 arch/arm/kernel/iwmmxt.S:283: Error: cannot honor width
suffix -- `orr r2,ip,#0x00000080'
1 arch/arm/kernel/iwmmxt.S:282: Error: selected processor does
not support Thumb mode `mrs ip,cpsr'
1 arch/arm/kernel/iwmmxt.S:268: Error: selected processor does
not support Thumb mode `msr cpsr_c,ip'
1 arch/arm/kernel/iwmmxt.S:265: Error: cannot honor width
suffix -- `mov r2,#3'
1 arch/arm/kernel/iwmmxt.S:264: Error: cannot honor width
suffix -- `mov r0,#0'
1 arch/arm/kernel/iwmmxt.S:260: Error: cannot honor width
suffix -- `mov r2,#(0x98)'
1 arch/arm/kernel/iwmmxt.S:259: Error: MOV Rd, Rs with two low
registers is not permitted on this architecture -- `mov r1,r2'
1 arch/arm/kernel/iwmmxt.S:258: Error: MOV Rd, Rs with two low
registers is not permitted on this architecture -- `mov r0,r1'
1 arch/arm/kernel/iwmmxt.S:257: Error: selected processor does
not support Thumb mode `msr cpsr_c,ip'
1 arch/arm/kernel/iwmmxt.S:253: Error: selected processor does
not support Thumb mode `teq r2,r3'
1 arch/arm/kernel/iwmmxt.S:251: Error: lo register required --
`add r2,r0,#104'
1 arch/arm/kernel/iwmmxt.S:248: Error: selected processor does
not support Thumb mode `msr cpsr_c,r2'
1 arch/arm/kernel/iwmmxt.S:247: Error: cannot honor width
suffix -- `orr r2,ip,#0x00000080'
1 arch/arm/kernel/iwmmxt.S:246: Error: selected processor does
not support Thumb mode `mrs ip,cpsr'
1 arch/arm/kernel/iwmmxt.S:233: Error: cannot honor width
suffix -- `ldmfd sp!,{r4,pc}'
1 arch/arm/kernel/iwmmxt.S:232: Error: selected processor does
not support Thumb mode `msr cpsr_c,ip'
1 arch/arm/kernel/iwmmxt.S:230: Error: MOV Rd, Rs with two low
registers is not permitted on this architecture -- `mov r2,r2'
1 arch/arm/kernel/iwmmxt.S:229: Error: selected processor does
not support Thumb mode `mrc p15,0,r2,c2,c0,0'
1 arch/arm/kernel/iwmmxt.S:227: Error: selected processor does
not support Thumb mode `mcr p15,0,r4,c1,c0,2'
1 arch/arm/kernel/iwmmxt.S:226: Error: cannot honor width
suffix -- `bic r4,r4,#0xf'
1 arch/arm/kernel/iwmmxt.S:220: Error: MOV Rd, Rs with two low
registers is not permitted on this architecture -- `mov r2,r2'
1 arch/arm/kernel/iwmmxt.S:219: Error: selected processor does
not support Thumb mode `mrc p15,0,r2,c2,c0,0'
1 arch/arm/kernel/iwmmxt.S:217: Error: cannot honor width
suffix -- `mov r0,#0'
1 arch/arm/kernel/iwmmxt.S:215: Error: selected processor does
not support Thumb mode `mcr p15,0,r4,c1,c0,2'
1 arch/arm/kernel/iwmmxt.S:214: Error: cannot honor width
suffix -- `orr r4,r4,#0xf'
1 arch/arm/kernel/iwmmxt.S:213: Error: selected processor does
not support Thumb mode `mrc p15,0,r4,c1,c0,2'
1 arch/arm/kernel/iwmmxt.S:206: Error: selected processor does
not support Thumb mode `teqne r1,r2'
1 arch/arm/kernel/iwmmxt.S:205: Error: selected processor does
not support Thumb mode `teq r0,#0'
1 arch/arm/kernel/iwmmxt.S:203: Error: selected processor does
not support Thumb mode `teq r1,#0'
1 arch/arm/kernel/iwmmxt.S:201: Error: lo register required --
`add r2,r0,#104'
1 arch/arm/kernel/iwmmxt.S:198: Error: selected processor does
not support Thumb mode `msr cpsr_c,r2'
1 arch/arm/kernel/iwmmxt.S:197: Error: cannot honor width
suffix -- `orr r2,ip,#0x00000080'
1 arch/arm/kernel/iwmmxt.S:196: Error: selected processor does
not support Thumb mode `mrs ip,cpsr'
1 arch/arm/kernel/iwmmxt.S:194: Error: selected processor does
not support Thumb mode `stmfd sp!,{r4,lr}'
1 arch/arm/kernel/iwmmxt.S:182: Error: cannot honor width
suffix -- `tmcr wCon,r2'
1 arch/arm/kernel/iwmmxt.S:180: Error: thumb conditional
instruction should be in IT block -- `bxeq lr'
1 arch/arm/kernel/iwmmxt.S:179: Error: cannot honor width
suffix -- `mov r2,#0'
1 arch/arm/kernel/iwmmxt.S:178: Error: selected processor does
not support Thumb mode `teq r1,#0'
1 arch/arm/kernel/iwmmxt.S:175: Error: cannot honor width
suffix -- `wldrw wCGR3,[r0,#(0x94)]'
1 arch/arm/kernel/iwmmxt.S:174: Error: cannot honor width
suffix -- `wldrw wCGR2,[r0,#(0x90)]'
1 arch/arm/kernel/iwmmxt.S:173: Error: cannot honor width
suffix -- `wldrw wCGR1,[r0,#(0x8C)]'
1 arch/arm/kernel/iwmmxt.S:172: Error: cannot honor width
suffix -- `wldrw wCGR0,[r0,#(0x88)]'
1 arch/arm/kernel/iwmmxt.S:171: Error: cannot honor width
suffix -- `wldrw wCASF,[r0,#(0x84)]'
1 arch/arm/kernel/iwmmxt.S:170: Error: cannot honor width
suffix -- `wldrw wCSSF,[r0,#(0x80)]'
1 arch/arm/kernel/iwmmxt.S:167: Error: cannot honor width
suffix -- `wldrd wR15,[r0,#(0x78)]'
1 arch/arm/kernel/iwmmxt.S:166: Error: cannot honor width
suffix -- `wldrd wR14,[r0,#(0x70)]'
1 arch/arm/kernel/iwmmxt.S:165: Error: cannot honor width
suffix -- `wldrd wR13,[r0,#(0x68)]'
1 arch/arm/kernel/iwmmxt.S:164: Error: cannot honor width
suffix -- `wldrd wR12,[r0,#(0x60)]'
1 arch/arm/kernel/iwmmxt.S:163: Error: cannot honor width
suffix -- `wldrd wR11,[r0,#(0x58)]'
1 arch/arm/kernel/iwmmxt.S:162: Error: cannot honor width
suffix -- `wldrd wR10,[r0,#(0x50)]'
1 arch/arm/kernel/iwmmxt.S:161: Error: cannot honor width
suffix -- `wldrd wR9,[r0,#(0x48)]'
1 arch/arm/kernel/iwmmxt.S:160: Error: cannot honor width
suffix -- `wldrd wR8,[r0,#(0x40)]'
1 arch/arm/kernel/iwmmxt.S:159: Error: cannot honor width
suffix -- `wldrd wR7,[r0,#(0x38)]'
1 arch/arm/kernel/iwmmxt.S:158: Error: cannot honor width
suffix -- `wldrd wR6,[r0,#(0x30)]'
1 arch/arm/kernel/iwmmxt.S:157: Error: cannot honor width
suffix -- `wldrd wR5,[r0,#(0x28)]'
1 arch/arm/kernel/iwmmxt.S:156: Error: cannot honor width
suffix -- `wldrd wR4,[r0,#(0x20)]'
1 arch/arm/kernel/iwmmxt.S:155: Error: cannot honor width
suffix -- `wldrd wR3,[r0,#(0x18)]'
1 arch/arm/kernel/iwmmxt.S:154: Error: cannot honor width
suffix -- `wldrd wR2,[r0,#(0x10)]'
1 arch/arm/kernel/iwmmxt.S:153: Error: cannot honor width
suffix -- `wldrd wR1,[r0,#(0x08)]'
1 arch/arm/kernel/iwmmxt.S:152: Error: cannot honor width
suffix -- `wldrd wR0,[r0,#(0x00)]'
1 arch/arm/kernel/iwmmxt.S:147: Error: thumb conditional
instruction should be in IT block -- `bxeq lr'
1 arch/arm/kernel/iwmmxt.S:146: Error: selected processor does
not support Thumb mode `teq r0,#0'
1 arch/arm/kernel/iwmmxt.S:144: Error: cannot honor width
suffix -- `wstrd wR15,[r1,#(0x78)]'
1 arch/arm/kernel/iwmmxt.S:143: Error: cannot honor width
suffix -- `wstrd wR14,[r1,#(0x70)]'
1 arch/arm/kernel/iwmmxt.S:142: Error: cannot honor width
suffix -- `wstrd wR13,[r1,#(0x68)]'
1 arch/arm/kernel/iwmmxt.S:141: Error: cannot honor width
suffix -- `wstrd wR12,[r1,#(0x60)]'
1 arch/arm/kernel/iwmmxt.S:140: Error: cannot honor width
suffix -- `wstrd wR11,[r1,#(0x58)]'
1 arch/arm/kernel/iwmmxt.S:139: Error: cannot honor width
suffix -- `wstrd wR10,[r1,#(0x50)]'
1 arch/arm/kernel/iwmmxt.S:138: Error: cannot honor width
suffix -- `wstrd wR9,[r1,#(0x48)]'
1 arch/arm/kernel/iwmmxt.S:137: Error: cannot honor width
suffix -- `wstrd wR8,[r1,#(0x40)]'
1 arch/arm/kernel/iwmmxt.S:136: Error: cannot honor width
suffix -- `wstrd wR7,[r1,#(0x38)]'
1 arch/arm/kernel/iwmmxt.S:135: Error: cannot honor width
suffix -- `wstrd wR6,[r1,#(0x30)]'
1 arch/arm/kernel/iwmmxt.S:134: Error: cannot honor width
suffix -- `wstrd wR5,[r1,#(0x28)]'
1 arch/arm/kernel/iwmmxt.S:133: Error: cannot honor width
suffix -- `wstrd wR4,[r1,#(0x20)]'
1 arch/arm/kernel/iwmmxt.S:132: Error: cannot honor width
suffix -- `wstrd wR3,[r1,#(0x18)]'
1 arch/arm/kernel/iwmmxt.S:131: Error: cannot honor width
suffix -- `wstrd wR2,[r1,#(0x10)]'
1 arch/arm/kernel/iwmmxt.S:130: Error: cannot honor width
suffix -- `wstrd wR1,[r1,#(0x08)]'
1 arch/arm/kernel/iwmmxt.S:129: Error: cannot honor width
suffix -- `wstrd wR0,[r1,#(0x00)]'
1 arch/arm/kernel/iwmmxt.S:126: Error: cannot honor width
suffix -- `tst r2,#0x2'
1 arch/arm/kernel/iwmmxt.S:123: Error: cannot honor width
suffix -- `wstrw wCGR3,[r1,#(0x94)]'
1 arch/arm/kernel/iwmmxt.S:122: Error: cannot honor width
suffix -- `wstrw wCGR2,[r1,#(0x90)]'
1 arch/arm/kernel/iwmmxt.S:121: Error: cannot honor width
suffix -- `wstrw wCGR1,[r1,#(0x8C)]'
1 arch/arm/kernel/iwmmxt.S:120: Error: cannot honor width
suffix -- `wstrw wCGR0,[r1,#(0x88)]'
1 arch/arm/kernel/iwmmxt.S:119: Error: cannot honor width
suffix -- `wstrw wCASF,[r1,#(0x84)]'
1 arch/arm/kernel/iwmmxt.S:118: Error: cannot honor width
suffix -- `wstrw wCSSF,[r1,#(0x80)]'
1 arch/arm/kernel/iwmmxt.S:113: Error: cannot honor width
suffix -- `tst r2,#0x1'
1 arch/arm/kernel/iwmmxt.S:110: Error: cannot honor width
suffix -- `tmrc r2,wCon'
1 arch/arm/kernel/iwmmxt.S:107: Error: selected processor does
not support Thumb mode `teq r1,#0'
1 /tmp/ccfGDDeH.s:30: Error: only SUBS PC, LR, #const allowed
-- `sub pc,pc,#4'
Warnings summary:
136 cc1: some warnings being treated as errors
127 net/core/sysctl_net_core.c:26:12: warning: 'one' defined but
not used [-Wunused-variable]
17 drivers/media/v4l2-core/videobuf2-core.c:3224:26: warning:
unused variable 'fileio' [-Wunused-variable]
7 drivers/usb/gadget/legacy/inode.c:641:10: warning: 'value'
may be used uninitialized in this function [-Wmaybe-uninitialized]
5 crypto/wp512.c:987:1: warning: the frame size of 1168 bytes
is larger than 1024 bytes [-Wframe-larger-than=]
4 net/mac80211/mlme.c:1291:14: warning: 'pwr_level_cisco' may
be used uninitialized in this function [-Wuninitialized]
4 include/linux/cgroup.h:158:11: warning: 'root' may be used
uninitialized in this function [-Wuninitialized]
4 fs/nfsd/nfs4xdr.c:1770:9: warning: 'str' may be used
uninitialized in this function [-Wmaybe-uninitialized]
4 drivers/iommu/intel-iommu.c:1748:25: warning: unused variable
'drhd' [-Wunused-variable]
3 fs/overlayfs/super.c:855:1: warning: 'alias' attribute
ignored [-Wattributes]
3 fs/overlayfs/super.c:854:1: warning: 'alias' attribute
ignored [-Wattributes]
3 fs/overlayfs/super.c:830:1: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
3 fs/overlayfs/super.c:811:55: warning: missing terminating '
character [enabled by default]
3 fs/overlayfs/super.c:749:55: warning: missing terminating '
character [enabled by default]
2 fs/overlayfs/super.c:855:1: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
2 drivers/usb/renesas_usbhs/common.c:469:25: warning: cast from
pointer to integer of different size [-Wpointer-to-int-cast]
2 drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer
from integer of different size [-Wint-to-pointer-cast]
2 drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer
from integer of different size [-Wint-to-pointer-cast]
2 drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer
from integer of different size [-Wint-to-pointer-cast]
2 drivers/scsi/ips.c:210:2: warning: #warning "This driver has
only been tested on the x86/ia64/x86_64 platforms" [-Wcpp]
2 drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning:
#warning Processor architecture undefined [-Wcpp]
2 drivers/clk/at91/clk-usb.c:193:2: warning: initialization
from incompatible pointer type [enabled by default]
2 drivers/clk/at91/clk-usb.c:193:2: warning: (near
initialization for 'at91sam9n12_usb_ops.determine_rate') [enabled by
default]
2 drivers/clk/at91/clk-usb.c:155:2: warning: initialization
from incompatible pointer type [enabled by default]
2 drivers/clk/at91/clk-usb.c:155:2: warning: (near
initialization for 'at91sam9x5_usb_ops.determine_rate') [enabled by
default]
2 arch/arm/mm/cache-l2x0.c:195:13: warning: 'l2x0_disable'
defined but not used [-Wunused-function]
2 arch/arm/mm/cache-l2x0.c:185:13: warning: 'l2x0_flush_all'
defined but not used [-Wunused-function]
2 arch/arm/mm/cache-l2x0.c:168:13: warning: 'l2x0_cache_sync'
defined but not used [-Wunused-function]
1 sound/soc/codecs/wm8978.c:814:5: warning: 'diff' may be used
uninitialized in this function [-Wuninitialized]
1 sound/soc/codecs/cs35l32.c:314:2: warning: 'val' is used
uninitialized in this function [-Wuninitialized]
1 sound/soc/codecs/arizona.c:1372:21: warning: 'aif_rx_state'
may be used uninitialized in this function [-Wuninitialized]
1 sound/soc/codecs/arizona.c:1369:27: warning: 'aif_tx_state'
may be used uninitialized in this function [-Wuninitialized]
1 net/mac80211/tx.c:1873:27: warning: 'chanctx_conf' may be
used uninitialized in this function [-Wuninitialized]
1 net/mac80211/mlme.c:1291:3: warning: 'pwr_level_cisco' may be
used uninitialized in this function [-Wuninitialized]
1 net/core/dev.c:2741:15: warning: 'tail' may be used
uninitialized in this function [-Wuninitialized]
1 kernel/cgroup.c:1018:9: warning: 'root' may be used
uninitialized in this function [-Wuninitialized]
1 include/linux/spinlock.h:349:2: warning: 'vf' may be used
uninitialized in this function [-Wuninitialized]
1 include/linux/mfd/da9052/da9052.h:174:6: warning: 'ret' may
be used uninitialized in this function [-Wuninitialized]
1 include/linux/mfd/da9052/da9052.h:151:6: warning: 'ret' may
be used uninitialized in this function [-Wuninitialized]
1 include/linux/init.h:334:2: warning: ISO C90 forbids mixed
declarations and code [-Wdeclaration-after-statement]
1 fs/cifs/inode.c:2066:12: warning: 'server' may be used
uninitialized in this function [-Wuninitialized]
1 fs/btrfs/extent_io.c:2166:13: warning: cast to pointer from
integer of different size [-Wint-to-pointer-cast]
1 drivers/w1/slaves/w1_therm.c:269:15: warning: 'crc' may be
used uninitialized in this function [-Wuninitialized]
1 drivers/usb/gadget/udc/udc-xilinx.c:2136:34: warning: cast
from pointer to integer of different size [-Wpointer-to-int-cast]
1 drivers/usb/gadget/udc/udc-xilinx.c:2135:2: warning: cast
from pointer to integer of different size [-Wpointer-to-int-cast]
1 drivers/usb/gadget/legacy/inode.c:641:12: warning: 'value'
may be used uninitialized in this function [-Wuninitialized]
1 drivers/usb/gadget/function/f_ncm.c:203:0: warning: "NCAPS"
redefined [enabled by default]
1 drivers/tty/serial/ifx6x60.c:715:8: warning: 'more' may be
used uninitialized in this function [-Wuninitialized]
1 drivers/tty/isicom.c:1058:2: warning: integer overflow in
expression [-Woverflow]
1 drivers/staging/vt6655/device_main.c:2993:1: warning: the
frame size of 1304 bytes is larger than 1024 bytes
[-Wframe-larger-than=]
1 drivers/staging/comedi/drivers/pcl818.c:411:6: warning:
'last_chan' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/staging/android/binder.c:710:37: warning:
'buffer_size' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/staging/android/binder.c:710:24: warning: 'buffer'
may be used uninitialized in this function [-Wuninitialized]
1 drivers/spi/spi-dw-mid.c:180:3: warning: return makes integer
from pointer without a cast [enabled by default]
1 drivers/spi/spi-dw-mid.c:155:3: warning: return makes integer
from pointer without a cast [enabled by default]
1 drivers/scsi/qla2xxx/qla_target.c:1504:9: warning: 'cnt_in'
may be used uninitialized in this function [-Wuninitialized]
1 drivers/scsi/qla2xxx/qla_target.c:1504:9: warning: 'cnt' may
be used uninitialized in this function [-Wuninitialized]
1 drivers/scsi/hpsa.c:6663:5: warning: 'rc' may be used
uninitialized in this function [-Wuninitialized]
1 drivers/scsi/aic94xx/aic94xx_sds.c:597:21: warning: 'offs'
may be used uninitialized in this function [-Wuninitialized]
1 drivers/scsi/advansys.c:71:2: warning: #warning this driver
is still not properly converted to the DMA API [-Wcpp]
1 drivers/power/bq24190_charger.c:1280:2: warning: 'ss_reg' may
be used uninitialized in this function [-Wuninitialized]
1 drivers/power/bq24190_charger.c:1280:2: warning: 'f_reg' may
be used uninitialized in this function [-Wuninitialized]
1 drivers/pci/host/pcie-xilinx.c:154:3: warning: format '%d'
expects argument of type 'int', but argument 4 has type 'long unsigned
int' [-Wformat]
1 drivers/nfc/st21nfca/st21nfca.c:657:10: warning: 'len' may be
used uninitialized in this function [-Wuninitialized]
1 drivers/nfc/st21nfca/st21nfca.c:656:20: warning: 'sak' may be
used uninitialized in this function [-Wuninitialized]
1 drivers/net/wireless/iwlegacy/4965-mac.c:1857:33: warning:
'phys_addr' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/net/wireless/iwlegacy/3945-mac.c:620:33: warning:
'phys_addr' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/net/wireless/b43/phy_n.c:202:21: warning: 'val_addr'
may be used uninitialized in this function [-Wuninitialized]
1 drivers/net/wireless/ath/wil6210/fw_inc.c:447:4: warning:
'hdr_sz' may be used uninitialized in this function [-Wuninitialized]
1 drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:467:46:
warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
1 drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:307:11:
warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]
1 drivers/net/ethernet/mellanox/mlx5/core/debugfs.c:303:11:
warning: cast from pointer to integer of different size
[-Wpointer-to-int-cast]
1 drivers/net/ethernet/dec/tulip/tulip_core.c:101:2: warning:
#warning Processor architecture undefined! [-Wcpp]
1 drivers/net/ethernet/apm/xgene/xgene_enet_sgmac.c:243:34:
warning: 'data' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: the frame
size of 1240 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 drivers/mmc/host/sunxi-mmc.c:297:35: warning: cast to pointer
from integer of different size [-Wint-to-pointer-cast]
1 drivers/misc/ioc4.c:194:16: warning: 'start' may be used
uninitialized in this function [-Wuninitialized]
1 drivers/message/i2o/i2o_config.c:953:10: warning: cast to
pointer from integer of different size [-Wint-to-pointer-cast]
1 drivers/message/i2o/i2o_config.c:893:19: warning: cast to
pointer from integer of different size [-Wint-to-pointer-cast]
1 drivers/media/platform/exynos-gsc/gsc-core.c:371:31: warning:
'high_plane' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/media/platform/exynos-gsc/gsc-core.c:359:30: warning:
'low_plane' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/isdn/hardware/mISDN/w6692.c:1181:2: warning:
unsupported argument to '__builtin_return_address' [enabled by
default]
1 drivers/isdn/hardware/mISDN/mISDNipac.c:759:2: warning:
unsupported argument to '__builtin_return_address' [enabled by
default]
1 drivers/infiniband/ulp/iser/iser_verbs.c:1206:14: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 drivers/infiniband/ulp/iser/iser_verbs.c:1201:14: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 drivers/infiniband/ulp/iser/iser_verbs.c:1175:31: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 drivers/infiniband/ulp/iser/iser_verbs.c:1174:33: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 drivers/infiniband/hw/qib/qib_qp.c:44:0: warning:
"BITS_PER_PAGE" redefined [enabled by default]
1 drivers/infiniband/hw/mlx5/mem.c:72:9: warning: comparison of
distinct pointer types lacks a cast [enabled by default]
1 drivers/hsi/controllers/omap_ssi_port.c:1121:10: warning:
'err' may be used uninitialized in this function [-Wuninitialized]
1 drivers/gpu/drm/radeon/r100.c:3581:47: warning:
'crit_point_ff.full' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/gpu/drm/radeon/r100.c:3580:42: warning:
'disp_drain_rate.full' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/gpu/drm/nouveau/core/subdev/i2c/nv94.c:185:31:
warning: 'stat' may be used uninitialized in this function
[-Wuninitialized]
1 drivers/block/drbd/drbd_bitmap.c:483:0: warning:
"BITS_PER_PAGE_MASK" redefined [enabled by default]
1 drivers/block/drbd/drbd_bitmap.c:482:0: warning:
"BITS_PER_PAGE" redefined [enabled by default]
1 crypto/wp512.c:987:1: warning: the frame size of 1112 bytes
is larger than 1024 bytes [-Wframe-larger-than=]
1 arch/arm/mach-cns3xxx/pcie.c:313:1: warning: the frame size
of 1080 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 arch/arm/kernel/head-nommu.S:167: Warning: Use of r13 as a
source register is deprecated when r15 is the destination register.
1 #warning Processor architecture undefined!
1 #warning Processor architecture undefined
1 #warning "This driver has only been tested on the
x86/ia64/x86_64 platforms"
^ permalink raw reply [flat|nested] 185+ messages in thread
* Re: [PATCH 3.18 000/178] 3.18.15-review
2015-06-09 17:17 ` [PATCH 3.18 000/178] 3.18.15-review Kevin Hilman
@ 2015-06-10 5:24 ` Guenter Roeck
2015-06-11 2:39 ` Sasha Levin
1 sibling, 0 replies; 185+ messages in thread
From: Guenter Roeck @ 2015-06-10 5:24 UTC (permalink / raw)
To: Kevin Hilman; +Cc: lkml, stable, stable-commits, Sasha Levin, Tyler Baker
On Tue, Jun 09, 2015 at 10:17:11AM -0700, Kevin Hilman wrote:
> Hi Sasha,
>
> On Mon, Jun 8, 2015 at 6:39 AM, Sasha Levin <sasha.levin@oracle.com> wrote:
> > This is the start of the stable review cycle for the 3.18.15 release.
> > There are 178 patches in this series, all will be posted as a response
> > to this one. If anyone has any issues with these being applied, please
> > let me know.
>
> We've started build/boot testing your 3.18 stable queue with the
> automated build/boot tools at the kernelci.org project. We'll soon be
> sending automated reports to this list for your stable queue (and
> other stable trees.) Until we have the email reports automated, below
> is the report for this review series which has a whole pile of build
> failures across x86, arm and arm64.
>
> Kevin
>
>
>
> stable-sasha build: 143 builds: 136 failed, 7 passed, 374 errors, 284
> warnings (v3.18.14-178-gaf1f9d92cb53)
>
Somehow I completely missed that announcement.
Build results:
total: 123 pass: 7 fail: 116
Failed builds:
alpha:defconfig
alpha:allmodconfig
arc:defconfig
arm:allmodconfig
arm:s3c2410_defconfig
arm:omap2plus_defconfig
arm:imx_v6_v7_defconfig
arm:ixp4xx_defconfig
arm:u8500_defconfig
arm:multi_v5_defconfig
arm:multi_v7_defconfig
arm:omap1_defconfig
arm:footbridge_defconfig
arm:davinci_all_defconfig
arm:mini2440_defconfig
arm:rpc_defconfig
arm:axm55xx_defconfig
arm:mxs_defconfig
arm:keystone_defconfig
arm:vexpress_defconfig
arm:imx_v4_v5_defconfig
arm:at91_dt_defconfig
arm:s3c6400_defconfig
arm:lpc32xx_defconfig
arm:shmobile_defconfig
arm:nhk8815_defconfig
arm:bcm2835_defconfig
arm:sama5_defconfig
arm:orion5x_defconfig
arm:exynos_defconfig
arm:cm_x2xx_defconfig
arm:s5pv210_defconfig
arm:integrator_defconfig
arm:efm32_defconfig
arm:pxa910_defconfig
arm:clps711x_defconfig
arm64:defconfig
arm64:allmodconfig
avr32:defconfig
avr32:merisc_defconfig
avr32:atngw100mkii_evklcd101_defconfig
blackfin:defconfig
blackfin:BF561-EZKIT-SMP_defconfig
c6x:dsk6455_defconfig
c6x:evmc6457_defconfig
c6x:evmc6678_defconfig
cris:defconfig
cris:etrax-100lx_defconfig
cris:artpec_3_defconfig
cris:etraxfs_defconfig
frv:defconfig
hexagon:defconfig
i386:defconfig
i386:allyesconfig
i386:allmodconfig
ia64:defconfig
m32r:defconfig
m68k:defconfig
m68k:allmodconfig
m68k:sun3_defconfig
m68k:m5272c3_defconfig
m68k:m5307c3_defconfig
m68k:m5249evb_defconfig
m68k:m5407c3_defconfig
m68k:m5475evb_defconfig
metag:defconfig
metag:meta1_defconfig
metag:meta2_defconfig
metag:meta2_smp_defconfig
microblaze:mmu_defconfig
microblaze:nommu_defconfig
mips:defconfig
mips:allmodconfig
mips:bcm47xx_defconfig
mips:bcm63xx_defconfig
mips:nlm_xlp_defconfig
mips:ath79_defconfig
mips:ar7_defconfig
mips:fuloong2e_defconfig
mips:e55_defconfig
mips:cavium_octeon_defconfig
mips:malta_defconfig
parisc:defconfig
parisc:generic-32bit_defconfig
parisc:a500_defconfig
parisc:generic-64bit_defconfig
powerpc:defconfig
powerpc:allmodconfig
powerpc:ppc64e_defconfig
powerpc:cell_defconfig
powerpc:maple_defconfig
powerpc:ppc6xx_defconfig
powerpc:mpc83xx_defconfig
powerpc:mpc85xx_defconfig
powerpc:mpc85xx_smp_defconfig
powerpc:tqm8xx_defconfig
powerpc:85xx/sbc8548_defconfig
powerpc:83xx/mpc834x_mds_defconfig
powerpc:86xx/sbc8641d_defconfig
s390:defconfig
s390:allmodconfig
score:defconfig
sh:defconfig
sh:dreamcast_defconfig
sh:microdev_defconfig
sparc32:defconfig
sparc64:defconfig
sparc64:allmodconfig
tile:tilegx_defconfig
um:defconfig
unicore32:defconfig
x86_64:defconfig
x86_64:allyesconfig
x86_64:allmodconfig
xtensa:defconfig
xtensa:allmodconfig
Qemu test results:
total: 30 pass: 1 fail: 29
Failed tests:
alpha:alpha_defconfig
arm:arm_versatile_defconfig
arm:arm_vexpress_defconfig
arm64:arm64_smp_defconfig
arm64:arm64_nosmp_defconfig
metag:metag_defconfig
microblaze:microblaze_defconfig
microblaze:microblazeel_defconfig
mips:mips_malta_defconfig
mips:mips_malta_smp_defconfig
mips:mipsel_malta_defconfig
mips:mipsel_malta_smp_defconfig
mips64:mips_malta64_defconfig
mips64:mips_malta64_smp_defconfig
powerpc:ppc_book3s_defconfig
powerpc:ppc_book3s_smp_defconfig
powerpc:ppc64_book3s_defconfig
powerpc:ppc64_book3s_smp_defconfig
sh:sh_defconfig
sh:sheb_defconfig
sparc32:sparc_defconfig
sparc32:sparc_smp_defconfig
sparc64:sparc_smp_defconfig
sparc64:sparc_nosmp_defconfig
x86:x86_pc_defconfig
x86:x86_pc_nosmp_defconfig
x86_64:x86_64_pc_defconfig
x86_64:x86_64_pc_nosmp_defconfig
xtensa:xtensa_defconfig
Guenter
^ permalink raw reply [flat|nested] 185+ messages in thread
* Re: [PATCH 3.18 000/178] 3.18.15-review
2015-06-09 17:17 ` [PATCH 3.18 000/178] 3.18.15-review Kevin Hilman
2015-06-10 5:24 ` Guenter Roeck
@ 2015-06-11 2:39 ` Sasha Levin
2015-06-11 17:52 ` Kevin Hilman
1 sibling, 1 reply; 185+ messages in thread
From: Sasha Levin @ 2015-06-11 2:39 UTC (permalink / raw)
To: Kevin Hilman, lkml; +Cc: stable, stable-commits, Tyler Baker, Guenter Roeck
On 06/09/2015 01:17 PM, Kevin Hilman wrote:
> Hi Sasha,
>
> On Mon, Jun 8, 2015 at 6:39 AM, Sasha Levin <sasha.levin@oracle.com> wrote:
>> This is the start of the stable review cycle for the 3.18.15 release.
>> There are 178 patches in this series, all will be posted as a response
>> to this one. If anyone has any issues with these being applied, please
>> let me know.
>
> We've started build/boot testing your 3.18 stable queue with the
> automated build/boot tools at the kernelci.org project. We'll soon be
> sending automated reports to this list for your stable queue (and
> other stable trees.) Until we have the email reports automated, below
> is the report for this review series which has a whole pile of build
> failures across x86, arm and arm64.
>
> Kevin
Thanks for the report(s)!
I've fixed the issues and re-pushed.
Thanks,
Sasha
^ permalink raw reply [flat|nested] 185+ messages in thread
* Re: [PATCH 3.18 000/178] 3.18.15-review
2015-06-11 2:39 ` Sasha Levin
@ 2015-06-11 17:52 ` Kevin Hilman
2015-06-11 17:58 ` Guenter Roeck
0 siblings, 1 reply; 185+ messages in thread
From: Kevin Hilman @ 2015-06-11 17:52 UTC (permalink / raw)
To: Sasha Levin; +Cc: lkml, stable, stable-commits, Tyler Baker, Guenter Roeck
Sasha Levin <sasha.levin@oracle.com> writes:
> On 06/09/2015 01:17 PM, Kevin Hilman wrote:
>> Hi Sasha,
>>
>> On Mon, Jun 8, 2015 at 6:39 AM, Sasha Levin <sasha.levin@oracle.com> wrote:
>>> This is the start of the stable review cycle for the 3.18.15 release.
>>> There are 178 patches in this series, all will be posted as a response
>>> to this one. If anyone has any issues with these being applied, please
>>> let me know.
>>
>> We've started build/boot testing your 3.18 stable queue with the
>> automated build/boot tools at the kernelci.org project. We'll soon be
>> sending automated reports to this list for your stable queue (and
>> other stable trees.) Until we have the email reports automated, below
>> is the report for this review series which has a whole pile of build
>> failures across x86, arm and arm64.
>>
>> Kevin
>
> Thanks for the report(s)!
>
> I've fixed the issues and re-pushed.
>
Build looks good now. I only have one remaining build failure[1] for
ARM multi_v7_defconfig with CONFIG_THUMB2_KERNEL=y enabled[1]. I had
already posted a fix for that patch to stable, but it's missing in your
queue so I replied to that patch to help you find it.
It also looks good for boot testing at kernelci.org[2]. The boot failures
here aren't specific to your queue, but are NFSroot issues for these
boards with v3.18 in general.
Thanks,
Kevin
[1] http://kernelci.org/build/stable-sasha/kernel/v3.18.14-167-g25798d3d2163/?fail
[2]
stable-sasha boot: 206 boots: 4 failed, 202 passed (v3.18.14-167-g25798d3d2163)
Full Boot Summary:
http://kernelci.org/boot/all/job/stable-sasha/kernel/v3.18.14-167-g25798d3d2163/
Full Build Summary:
http://kernelci.org/build/stable-sasha/kernel/v3.18.14-167-g25798d3d2163/
Tree: stable-sasha
Branch: local/linux-3.18.y-queue
Git Describe: v3.18.14-167-g25798d3d2163
Git Commit: 25798d3d216334361a51ac37429a83c1faa5e97d
Git URL:
git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
Tested: 67 unique boards, 19 SoC families, 26 builds out of 143
Boot Failures Detected:
http://kernelci.org/boot/?v3.18.14-167-g25798d3d2163&fail
^ permalink raw reply [flat|nested] 185+ messages in thread
* Re: [PATCH 3.18 000/178] 3.18.15-review
2015-06-11 17:52 ` Kevin Hilman
@ 2015-06-11 17:58 ` Guenter Roeck
0 siblings, 0 replies; 185+ messages in thread
From: Guenter Roeck @ 2015-06-11 17:58 UTC (permalink / raw)
To: Kevin Hilman; +Cc: Sasha Levin, lkml, stable, stable-commits, Tyler Baker
On Thu, Jun 11, 2015 at 10:52:00AM -0700, Kevin Hilman wrote:
> Sasha Levin <sasha.levin@oracle.com> writes:
>
> > On 06/09/2015 01:17 PM, Kevin Hilman wrote:
> >> Hi Sasha,
> >>
> >> On Mon, Jun 8, 2015 at 6:39 AM, Sasha Levin <sasha.levin@oracle.com> wrote:
> >>> This is the start of the stable review cycle for the 3.18.15 release.
> >>> There are 178 patches in this series, all will be posted as a response
> >>> to this one. If anyone has any issues with these being applied, please
> >>> let me know.
> >>
> >> We've started build/boot testing your 3.18 stable queue with the
> >> automated build/boot tools at the kernelci.org project. We'll soon be
> >> sending automated reports to this list for your stable queue (and
> >> other stable trees.) Until we have the email reports automated, below
> >> is the report for this review series which has a whole pile of build
> >> failures across x86, arm and arm64.
> >>
> >> Kevin
> >
> > Thanks for the report(s)!
> >
> > I've fixed the issues and re-pushed.
> >
>
> Build looks good now. I only have one remaining build failure[1] for
> ARM multi_v7_defconfig with CONFIG_THUMB2_KERNEL=y enabled[1]. I had
> already posted a fix for that patch to stable, but it's missing in your
> queue so I replied to that patch to help you find it.
>
Same here. All builds and all qemu tests now pass.
Guenter
^ permalink raw reply [flat|nested] 185+ messages in thread
end of thread, other threads:[~2015-06-11 17:58 UTC | newest]
Thread overview: 185+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08 13:39 [PATCH 3.18 000/178] 3.18.15-review Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 001/178] ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 002/178] ACPI / PNP: add two IDs to list for PNPACPI device enumeration Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 003/178] ocfs2: dlm: fix race between purge and get lock resource Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 004/178] nilfs2: fix sanity check of btree level in nilfs_btree_root_broken() Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 005/178] RDMA/CMA: Canonize IPv4 on IPV6 sockets properly Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 006/178] gpio: sysfs: fix memory leaks and device hotplug Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 007/178] mnt: Fix fs_fully_visible to verify the root directory is visible Sasha Levin
2015-06-08 13:39 ` [PATCH 3.18 008/178] mm/memory-failure: call shake_page() when error hits thp tail page Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 009/178] path_openat(): fix double fput() Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 010/178] writeback: use |1 instead of +1 to protect against div by zero Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 011/178] mm: soft-offline: fix num_poisoned_pages counting on concurrent events Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 012/178] xen/events: Clear cpu_evtchn_mask before resuming Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 013/178] xen/xenbus: Update xenbus event channel on resume Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 014/178] xen/console: Update console " Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 015/178] xen/events: Set irq_info->evtchn before binding the channel to CPU in __startup_pirq() Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 016/178] xen-pciback: Add name prefix to global 'permissive' variable Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 017/178] Revert "dm crypt: fix deadlock when async crypto algorithm returns -EBUSY" Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 018/178] blk-mq: fix race between timeout and CPU hotplug Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 019/178] blk-mq: fix CPU hotplug handling Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 020/178] ARM: dts: OMAP3-N900: Add microphone bias voltages Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 021/178] ARM: dts: imx25: Add #pwm-cells to pwm4 Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 022/178] ARM: dts: imx6: phyFLEX: USB VBUS control is active-high Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 023/178] ARM: dts: imx28: Fix AUART4 TX-DMA interrupt name Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 024/178] ARM: dts: imx23-olinuxino: Fix dr_mode of usb0 Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 025/178] ARM: dts: imx23-olinuxino: Fix polarity of LED GPIO Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 026/178] ARM: mvebu: armada-xp-openblocks-ax3-4: Disable internal RTC Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 027/178] ARM: OMAP2+: Fix omap off idle power consumption creeping up Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 028/178] ARM: net fix emit_udiv() for BPF_ALU | BPF_DIV | BPF_K intruction Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 029/178] ARM: ux500: Move GPIO regulator for SD-card into board DTSs Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 030/178] ARM: ux500: Enable GPIO regulator for SD-card for HREF boards Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 031/178] ARM: ux500: Enable GPIO regulator for SD-card for snowball Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 032/178] drm: Zero out invalid vblank timestamp in drm_update_vblank_count Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 033/178] drm/i915: Add missing MacBook Pro models with dual channel LVDS Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 034/178] drm/i915/dp: there is no audio on port A Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 035/178] drm/radeon: disable semaphores for UVD V1 (v2) Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 036/178] drm/radeon: fix userptr BO unpin bug v3 Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 037/178] drm/radeon: make VCE handle check more strict Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 038/178] drm/radeon: make UVD handle checking " Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 039/178] drm/radeon: more strictly validate the UVD codec Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 040/178] pinctrl: Don't just pretend to protect pinctrl_maps, do it for real Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 041/178] mmc: card: Don't access RPMB partitions for normal read/write Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 042/178] mmc: core: add missing pm event in mmc_pm_notify to fix hib restore Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 043/178] mmc: sh_mmcif: Fix timeout value for command request Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 044/178] ARM: 8307/1: psci: move psci firmware calls out of line Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 045/178] sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 046/178] coredump: accept any write method Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 047/178] ACPICA: Tables: Change acpi_find_root_pointer() to use acpi_physical_address Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 048/178] ACPICA: Utilities: Cleanup to enforce ACPI_PHYSADDR_TO_PTR()/ACPI_PTR_TO_PHYSADDR() Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 049/178] ACPICA: Utilities: Cleanup to convert physical address printing formats Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 050/178] ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 051/178] ARM: mvebu: do not register custom DMA operations when coherency is disabled Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 052/178] mnt: Fail collect_mounts when applied to unmounted mounts Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 053/178] fs_pin: Allow for the possibility that m_list or s_list go unused Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 054/178] Revert "KVM: x86: drop fpu_activate hook" Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 055/178] x86, mce, severity: Extend the the mce_severity mechanism to handle UCNA/DEFERRED error Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 056/178] x86/mce: Fix MCE severity messages Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 057/178] x86/fpu: Disable XSAVES* support for now Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 058/178] KVM: MMU: fix CR4.SMEP=1, CR0.WP=0 with shadow pages Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 059/178] KVM: MMU: fix smap permission check Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 060/178] kvm: fix crash in kvm_vcpu_reload_apic_access_page Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 061/178] KVM: MMU: fix SMAP virtualization Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 062/178] kvm/fpu: Enable eager restore kvm FPU for MPX Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 063/178] ktime: Optimize ktime_divns for constant divisors Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 064/178] ktime: Fix ktime_divns to do signed division Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 065/178] fs, omfs: add NULL terminator in the end up the token list Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 066/178] omfs: fix sign confusion for bitmap loop counter Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 067/178] lguest: fix out-by-one error in address checking Sasha Levin
2015-06-08 13:40 ` [PATCH 3.18 068/178] ovl: mount read-only if workdir can't be created Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 069/178] xfs: xfs_attr_inactive leaves inconsistent attr fork state behind Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 070/178] xfs: xfs_iozero can return positive errno Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 071/178] Revert "libceph: clear r_req_lru_item in __unregister_linger_request()" Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 072/178] " Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 073/178] xen/events: don't bind non-percpu VIRQs with percpu chip Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 074/178] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 075/178] iio:st_sensors: Fix oops when probing SPI devices Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 076/178] iio: light: hid-sensor-prox: Fix modifier Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 077/178] iio: pressure: hid-sensor-press: " Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 078/178] iio: adc: xilinx: Fix register addresses Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 079/178] iio: adc: xilinx: Fix "vccaux" channel .address Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 080/178] iio: adc: xilinx: Fix VREFP scale Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 081/178] iio: adc: xilinx: Fix VREFN sign Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 082/178] hwmon: (nct6775) Add missing sysfs attribute initialization Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 083/178] hwmon: (nct6683) " Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 084/178] lib: Fix strnlen_user() to not touch memory after specified maximum Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 085/178] d_walk() might skip too much Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 086/178] module: Call module notifier on failure after complete_formation() Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 087/178] ALSA: usb-audio: Add native DSD support for Denon/Marantz DACs Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 088/178] ALSA: usb-audio: Add mode select quirk " Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 089/178] ALSA: usb-audio: Add support for Zoom R16/24 capture and midi interfaces Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 090/178] ALSA: usb-audio: add native DSD support for Matrix Audio DACs Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 091/178] ALSA: usb-audio: Don't attempt to get Lifecam HD-5000 sample rate Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 092/178] ALSA: usb: Fix support for Denon DA-300USB DAC (ID 154e:1003) Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 093/178] ALSA: usb-audio: Check Marantz/Denon USB DACs in a single place Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 094/178] ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 095/178] ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema " Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 096/178] ALSA: usb-audio: Add quirk for MS LifeCam Studio Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 097/178] ALSA: usb-audio: Add quirk for MS LifeCam HD-3000 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 098/178] ALSA: hda - Enable widget power saving for Realtek codecs Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 099/178] ALSA: hda/realtek - Support Dell headset mode for ALC256 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 100/178] ALSA: hda/realtek - Support headset mode for ALC286/288 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 101/178] ALSA: hda/realtek - Fix the regression by widget power-saving Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 102/178] ALSA: hda - fix headset mic detection problem for one more machine Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 103/178] ALSA: hda - Add headphone quirk for Lifebook E752 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 104/178] ALSA: hda/realtek - Fix typo for ALC286/ALC288 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 105/178] ALSA: hda/realtek - Fix a typo Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 106/178] ALSA: hda/realtek - Add ALC298 alias name for Dell Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 107/178] ALSA: hda - Add headset mic quirk for Dell Inspiron 5548 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 108/178] ALSA: hda/realtek - Support headset mode for ALC298 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 109/178] ALSA: hda - Fix headset mic and mic-in for a Dell desktop Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 110/178] ALSA: hda/realtek - ALC292 dock fix for Thinkpad L450 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 111/178] ALSA: hda - Disable widget power-saving for ALC292 & co Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 112/178] ALSA: hda/realtek - Add ALC256 alias name for Dell Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 113/178] ALSA: hda - Disable Headphone Mic boost for ALC662 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 114/178] ALSA: hda - Fix lost sound due to stream_pm ops cleanup Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 115/178] Revert "ALSA: hda - Add mute-LED mode control to Thinkpad" Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 116/178] ALSA: hda - Add AZX_DCAPS_SNOOP_OFF (and refactor snoop setup) Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 117/178] ALSA: hda - Fix noise on AMD radeon 290x controller Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 118/178] ASoC: mc13783: Fix wrong mask value used in mc13xxx_reg_rmw() calls Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 119/178] ASoC: dapm: Modify widget stream name according to prefix Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 120/178] ASoC: wm8960: fix "RINPUT3" audio route error Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 121/178] ASoC: wm8994: correct BCLK DIV 348 to 384 Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 122/178] RDMA/core: Fix for parsing netlink string attribute Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 123/178] staging: gdm724x: Correction of variable usage after applying ALIGN() Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 124/178] staging: vt6656: use ieee80211_tx_info to select packet type Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 125/178] perf/x86/rapl: Enable Broadwell-U RAPL support Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 126/178] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 127/178] xhci: fix isoc endpoint dequeue from advancing too far on transaction error Sasha Levin
2015-06-08 13:41 ` [PATCH 3.18 128/178] xhci: Solve full event ring by increasing TRBS_PER_SEGMENT to 256 Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 129/178] xhci: gracefully handle xhci_irq dead device Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 130/178] USB: visor: Match I330 phone more precisely Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 131/178] USB: pl2303: Remove support for Samsung I330 Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 132/178] USB: cp210x: add ID for KCF Technologies PRN device Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 133/178] usb-storage: Add NO_WP_DETECT quirk for Lacie 059f:0651 devices Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 134/178] usb: gadget: configfs: Fix interfaces array NULL-termination Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 135/178] powerpc: Align TOC to 256 bytes Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 136/178] mmc: atmel-mci: fix bad variable type for clkdiv Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 137/178] tty/n_gsm.c: fix a memory leak when gsmtty is removed Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 138/178] ext4: fix NULL pointer dereference when journal restart fails Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 139/178] ext4: check for zero length extent explicitly Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 140/178] jbd2: fix r_count overflows leading to buffer overflow in journal recovery Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 141/178] ahci: avoton port-disable reset-quirk Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 142/178] libata: Add helper to determine when PHY events should be ignored Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 143/178] libata: Ignore spurious PHY event on LPM policy change Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 144/178] libata: Update Crucial/Micron blacklist Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 145/178] libata: Blacklist queued TRIM on all Samsung 800-series Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 146/178] arm64: bpf: fix signedness bug in loading 64-bit immediate Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 147/178] rt2x00: add new rt2800usb device DWA 130 Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 148/178] gpio: gpio-kempld: Fix get_direction return value Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 149/178] crypto: s390/ghash - Fix incorrect ghash icv buffer handling Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 150/178] mac80211: move WEP tailroom size check Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 151/178] mac80211: don't use napi_gro_receive() outside NAPI context Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 152/178] s390/mm: correct return value of pmd_pfn Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 153/178] sched: Handle priority boosted tasks proper in setscheduler() Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 154/178] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 155/178] ARM: dts: imx27: only map 4 Kbyte for fec registers Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 156/178] ARM: fix missing syscall trace exit Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 157/178] parisc,metag: Fix crashes due to stack randomization on stack-grows-upwards architectures Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 158/178] tools/vm: fix page-flags build Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 159/178] mm, numa: really disable NUMA balancing by default on single node machines Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 160/178] nfsd: fix the check for confirmed openowner in nfs4_preprocess_stateid_op Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 161/178] svcrpc: fix potential GSSX_ACCEPT_SEC_CONTEXT decoding failures Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 162/178] firmware: dmi_scan: Fix ordering of product_uuid Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 163/178] thermal: armada: Update Armada 380 thermal sensor coefficients Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 164/178] md/raid5: don't record new size if resize_stripes fails Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 165/178] rtlwifi: rtl8192cu: Fix kernel deadlock Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 166/178] storvsc: Set the SRB flags correctly when no data transfer is needed Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 167/178] sd: Disable support for 256 byte/sector disks Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 168/178] ACPI / init: Fix the ordering of acpi_reserve_resources() Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 169/178] iwlwifi: pcie: prevent using unmapped memory in fw monitor Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 170/178] drm/radeon: add new bonaire pci id Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 171/178] drm/radeon: fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 172/178] drm/radeon: retry dcpd fetch Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 173/178] drm/radeon: don't share plls if monitors differ in audio support Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 174/178] drm/radeon: partially revert "fix VM_CONTEXT*_PAGE_TABLE_END_ADDR handling" Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 175/178] vfs: read file_handle only once in handle_to_path Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 176/178] power/reset: at91: fix return value check in at91_reset_platform_probe() Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 177/178] ARC: unbork !LLSC build Sasha Levin
2015-06-08 13:42 ` [PATCH 3.18 178/178] xfrm: release dst_orig in case of error in xfrm_lookup() Sasha Levin
2015-06-09 17:17 ` [PATCH 3.18 000/178] 3.18.15-review Kevin Hilman
2015-06-10 5:24 ` Guenter Roeck
2015-06-11 2:39 ` Sasha Levin
2015-06-11 17:52 ` Kevin Hilman
2015-06-11 17:58 ` Guenter Roeck
-- strict thread matches above, loose matches on Subject: below --
2015-06-08 13:39 Sasha Levin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.