* [3.11.y.z extended stable] Linux 3.11.10.6 stable review
@ 2014-03-05 14:22 Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 001/131] ata: enable quirk from jmicron JMB350 for JMB394 Luis Henriques
` (130 more replies)
0 siblings, 131 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Luis Henriques
This is the start of the review cycle for the Linux 3.11.10.6 stable kernel.
This version contains 131 new patches, summarized below. The new patches are
posted as replies to this message and also available in this git branch:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;h=linux-3.11.y-review;a=shortlog
git://kernel.ubuntu.com/ubuntu/linux.git linux-3.11.y-review
The review period for version 3.11.10.6 will be open for the next three days.
To report a problem, please reply to the relevant follow-up patch message.
For more information about the Linux 3.11.y.z extended stable kernel version,
see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable .
-Luis
--
arch/arm/include/asm/cacheflush.h | 1 +
arch/arm/include/asm/pgtable-3level.h | 15 ++-
arch/arm/mach-omap2/gpmc.c | 4 +-
arch/arm/mach-tegra/common.c | 11 ++
arch/arm/mm/dma-mapping.c | 2 +-
arch/arm/mm/mm.h | 1 +
arch/arm/mm/mmu.c | 7 +-
arch/arm/mm/proc-v6.S | 3 +-
arch/arm/mm/proc-v7.S | 2 +-
arch/arm64/kernel/stacktrace.c | 6 +-
arch/avr32/Makefile | 2 +-
arch/avr32/boards/mimc200/fram.c | 1 +
arch/powerpc/kernel/crash_dump.c | 8 +-
arch/powerpc/platforms/powernv/eeh-ioda.c | 29 +-----
arch/powerpc/platforms/pseries/hotplug-cpu.c | 22 ++--
arch/x86/kernel/cpu/perf_event.c | 3 +
arch/x86/kernel/pci-dma.c | 4 +-
arch/x86/kvm/mmu.c | 3 +
arch/x86/kvm/vmx.c | 2 +-
arch/x86/kvm/x86.c | 2 +-
arch/xtensa/include/asm/traps.h | 44 +++++---
arch/xtensa/kernel/entry.S | 60 ++++++++---
drivers/acpi/pci_irq.c | 1 +
drivers/acpi/processor_throttling.c | 69 ++++++------
drivers/acpi/video.c | 8 +-
drivers/ata/ahci.c | 14 +++
drivers/ata/libata-pmp.c | 7 +-
drivers/ata/sata_sil.c | 1 +
drivers/base/firmware_class.c | 1 +
drivers/cpufreq/powernow-k8.c | 10 +-
drivers/dma/ioat/dma.c | 52 +++++++--
drivers/dma/ioat/dma.h | 1 +
drivers/dma/ioat/dma_v2.c | 11 +-
drivers/dma/ioat/dma_v3.c | 3 +
drivers/dma/ste_dma40.c | 4 +-
drivers/edac/i7300_edac.c | 38 +++----
drivers/edac/i7core_edac.c | 9 +-
drivers/extcon/extcon-arizona.c | 12 ---
drivers/gpu/drm/i915/intel_display.c | 14 +++
drivers/gpu/drm/i915/intel_dp.c | 19 ++--
drivers/gpu/drm/i915/intel_ringbuffer.c | 21 ++++
drivers/gpu/drm/i915/intel_ringbuffer.h | 1 +
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_drm.c | 3 +
drivers/gpu/drm/radeon/atombios_crtc.c | 16 ++-
drivers/gpu/drm/radeon/ni_dpm.c | 2 +-
drivers/gpu/drm/radeon/radeon_atpx_handler.c | 3 +-
drivers/gpu/drm/radeon/radeon_kms.c | 6 ++
drivers/gpu/drm/radeon/si_dpm.c | 4 +-
drivers/hwmon/max1668.c | 2 +-
drivers/iio/gyro/Kconfig | 2 +-
drivers/iio/gyro/st_gyro.h | 1 -
drivers/iio/gyro/st_gyro_core.c | 9 +-
drivers/iio/gyro/st_gyro_i2c.c | 1 -
drivers/iio/gyro/st_gyro_spi.c | 1 -
drivers/input/misc/arizona-haptics.c | 19 ----
drivers/input/mouse/elantech.c | 45 +++++++-
drivers/input/tablet/wacom_sys.c | 7 +-
drivers/iommu/arm-smmu.c | 85 ++++++++-------
drivers/irqchip/irq-metag-ext.c | 2 +-
drivers/irqchip/irq-metag.c | 2 +-
drivers/irqchip/irq-orion.c | 22 +++-
drivers/md/dm-mpath.c | 7 +-
drivers/md/dm-thin-metadata.c | 17 +++
drivers/md/dm-thin-metadata.h | 2 +
drivers/md/dm-thin.c | 8 +-
drivers/mfd/da9055-i2c.c | 10 +-
drivers/misc/mei/client.c | 4 +-
drivers/net/bonding/bond_3ad.c | 6 +-
drivers/net/bonding/bond_3ad.h | 1 +
drivers/net/can/dev.c | 15 +--
drivers/net/can/janz-ican3.c | 18 +---
drivers/net/can/usb/kvaser_usb.c | 2 +
drivers/net/can/vcan.c | 9 +-
drivers/net/ethernet/broadcom/tg3.c | 4 +-
drivers/net/ethernet/intel/e100.c | 2 +-
drivers/net/usb/asix_devices.c | 3 +-
drivers/net/usb/ax88179_178a.c | 4 +
drivers/net/usb/gl620a.c | 4 +
drivers/net/usb/mcs7830.c | 5 +-
drivers/net/usb/net1080.c | 4 +
drivers/net/usb/qmi_wwan.c | 9 +-
drivers/net/usb/rndis_host.c | 4 +
drivers/net/usb/smsc75xx.c | 4 +
drivers/net/usb/smsc95xx.c | 4 +
drivers/net/usb/usbnet.c | 25 ++---
drivers/net/wireless/rtl818x/rtl8187/rtl8187.h | 10 +-
drivers/net/wireless/rtlwifi/ps.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 18 +++-
drivers/pci/host/pci-mvebu.c | 11 +-
drivers/pci/pci.c | 10 ++
drivers/scsi/qla2xxx/qla_target.c | 3 +-
drivers/staging/android/binder.c | 3 +-
drivers/usb/chipidea/udc.c | 4 +-
drivers/usb/gadget/bcm63xx_udc.c | 58 ++++++-----
drivers/usb/host/ehci-hcd.c | 13 ++-
drivers/usb/serial/ftdi_sio.c | 2 +
drivers/usb/serial/ftdi_sio_ids.h | 6 ++
drivers/usb/serial/option.c | 3 +-
fs/attr.c | 5 -
fs/bio-integrity.c | 2 +-
fs/btrfs/inode.c | 8 +-
fs/cifs/file.c | 37 ++++++-
fs/cifs/smb2glob.h | 3 +
fs/cifs/smb2ops.c | 14 +--
fs/cifs/smb2pdu.c | 4 +-
fs/ext4/ext4.h | 2 +
fs/ext4/extents.c | 1 +
fs/ext4/inode.c | 4 +
fs/ext4/ioctl.c | 3 +-
fs/ext4/resize.c | 34 +++---
fs/ext4/super.c | 20 ++--
fs/jbd2/transaction.c | 6 +-
fs/nfs/blocklayout/blocklayout.h | 1 +
fs/nfs/dns_resolve.c | 2 +
fs/nfs/inode.c | 14 ++-
fs/nfs/internal.h | 24 +++++
fs/nfs/nfs4_fs.h | 8 ++
fs/proc/proc_devtree.c | 1 +
fs/quota/dquot.c | 14 ++-
include/linux/can/skb.h | 38 +++++++
include/linux/ipc_namespace.h | 2 -
include/linux/netdevice.h | 7 +-
include/linux/nfs4.h | 10 --
include/linux/nfs_fs.h | 18 ----
include/linux/skbuff.h | 19 ++++
include/sound/soc-dapm.h | 8 ++
ipc/mq_sysctl.c | 18 ++--
ipc/mqueue.c | 6 +-
kernel/cgroup.c | 5 +
kernel/events/core.c | 14 +--
kernel/sysctl.c | 1 +
kernel/workqueue.c | 7 ++
net/can/af_can.c | 3 +-
net/can/bcm.c | 4 +-
net/core/dev.c | 22 ++--
net/core/fib_rules.c | 7 ++
net/core/netpoll.c | 4 +-
net/core/skbuff.c | 25 +++++
net/core/sock.c | 2 +-
net/ieee802154/6lowpan.c | 20 ++++
net/ipv4/devinet.c | 3 +-
net/ipv4/ip_forward.c | 71 ++++++++++++-
net/ipv4/route.c | 4 +-
net/ipv4/tcp_output.c | 13 ++-
net/ipv6/ip6_output.c | 17 ++-
net/sched/sch_tbf.c | 13 +--
net/sctp/socket.c | 41 ++++++--
net/sunrpc/xprtsock.c | 6 +-
security/selinux/ss/policydb.c | 8 +-
sound/pci/hda/patch_ca0132.c | 68 ++----------
sound/pci/hda/patch_realtek.c | 48 +++++++++
sound/pci/hda/patch_sigmatel.c | 33 ++++++
sound/soc/codecs/da732x.c | 12 +++
sound/soc/codecs/da9055.c | 11 +-
sound/soc/codecs/max98090.c | 20 ++--
sound/soc/codecs/sta32x.c | 76 +++++++-------
sound/soc/codecs/wm8770.c | 4 +-
sound/soc/codecs/wm8958-dsp2.c | 2 +-
sound/soc/soc-dapm.c | 133 ++++++++++++++++++++++--
sound/soc/txx9/txx9aclc-ac97.c | 8 +-
sound/usb/mixer_maps.c | 9 ++
162 files changed, 1473 insertions(+), 650 deletions(-)
Adam Thomson (1):
ASoC: da9055: Fix device registration of PMIC and CODEC devices
Aleksander Morgado (1):
USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8
Alex Deucher (5):
drm/radeon: fix minor typos in si_dpm.c
drm/radeon/si: fix typo in dpm sq ramping setup
drm/radeon/ni: fix typo in dpm sq ramping setup
drm/radeon: print the supported atpx function mask
drm/radeon: disable pll sharing for DP on DCE4.1
Alexander Shiyan (1):
ASoC: txx9aclc_ac97: Fix kernel crash on probe
Andrew Honig (1):
kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
Andrew Lunn (2):
irqchip: orion: Fix getting generic chip pointer.
PCI: mvebu: Use Device ID and revision from underlying endpoint
Ankur Raina (1):
mfd: Update DA9055 i2c device id name
Anna Schumaker (1):
NFS: Enabling v4.2 should not recompile nfsd and lockd
Arve Hjønnevåg (1):
staging: binder: Fix death notifications
Bjorn Helgaas (1):
PCI: Enable INTx if BIOS left them disabled
Bjørn Mork (1):
net: qmi_wwan: add Netgear Aircard 340U
Chao Bi (1):
mei: set client's read_cb to NULL when flow control fails
Charles Keepax (2):
Input - arizona-haptics: Fix double lock of dapm_mutex
ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
Chen Gang (1):
avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use
Christian König (1):
drm/radeon: fix missing bo reservation
Christoffer Dall (1):
ARM: 7950/1: mm: Fix stage-2 device memory attributes
Christoph Hellwig (1):
fs: fix iversion handling
Clemens Ladisch (1):
ALSA: usb-audio: work around KEF X300A firmware bug
Dan Carpenter (1):
jbd2: fix use after free in jbd2_journal_start_reserved()
Dan Williams (1):
ioat: fix tasklet tear down
Daniel Borkmann (1):
net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode
Dave Jones (1):
fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists.
Davidlohr Bueso (1):
ipc,mqueue: remove limits for the amount of system-wide queues
Denis CIOCCA (1):
iio:gyro: bug on L3GD20H gyroscope support
Denis V. Lunev (1):
ata: enable quirk from jmicron JMB350 for JMB394
Dr. Greg Wettstein (1):
qla2xxx: Fix kernel panic on selective retransmission request
Duan Jiong (1):
ipv4: fix counter in_slow_tot
Dylan Reid (1):
ASoC: max98090: sync regcache on entering STANDBY
Emil Goode (2):
net: asix: add missing flag to struct driver_info
usbnet: remove generic hard_header_len check
Eric Dumazet (2):
6lowpan: fix lockdep splats
net: use __GFP_NORETRY for high order allocations
Eric Paris (1):
SELinux: bigendian problems with filename trans rules
Eric Whitney (1):
ext4: fix xfstest generic/299 block validity failures
Florian Fainelli (1):
usb: gadget: bcm63xx_udc: fix build failure on DMA channel code
Florian Westphal (3):
net: add and use skb_gso_transport_seglen()
net: core: introduce netif_skb_dev_features
net: ip, ipv6: handle gso skbs in forwarding path
Gavin Shan (1):
powerpc/powernv: Rework EEH reset
Geert Uytterhoeven (1):
ipv4: Fix runtime WARNING in rtmsg_ifa()
Guenter Roeck (1):
hwmon: (max1668) Fix writing the minimum temperature
Hannes Reinecke (1):
dm mpath: fix stalls when handling invalid ioctls
Hans de Goede (2):
ACPI / video: Filter the _BCL table for duplicate brightness values
Input: elantech - improve clickpad detection
Hsin-Yu Chao (2):
ALSA: hda/ca0132 - setup/cleanup streams
ALSA: hda/ca0132 - Fix recording from mode id 0x8
Hui Wang (1):
ALSA: hda - Enable front audio jacks on one HP desktop model
Ilia Mirkin (2):
drm/nouveau: set irq_enabled manually
drm/nv50/disp: use correct register to determine DP display bpp
James Hogan (1):
irq-metag*: stop set_affinity vectoring to offline cpus
Jan Kara (1):
quota: Fix race between dqput() and dquot_scan_active()
Jani Nikula (2):
drm/i915/dp: increase native aux defer retry timeout
drm/i915/dp: add native aux defer retry limit
Jean Delvare (2):
i7core_edac: Fix PCI device reference count
i7300_edac: Fix device reference count
Jeff Layton (1):
cifs: ensure that uncached writes handle unmapped areas correctly
Jiri Bohac (1):
bonding: 802.3ad: make aggregator_identifier bond-private
Joerg Dorchain (1):
USB: ftdi_sio: add Cressi Leonardo PID
John Ogness (1):
tcp: tsq: fix nonagle handling
Kailang Yang (2):
ALSA: hda/realtek - Add more entry for enable HP mute led
ALSA: hda/realtek - Add more entry for enable HP mute led
Knut Petersen (1):
perf: Enforce 1 as lower limit for perf_event_max_sample_rate
Lai Jiangshan (1):
workqueue: ensure @task is valid across kthread_stop()
Lan Tianyu (1):
ACPI / processor: Rework processor throttling with work_on_cpu()
Lars-Peter Clausen (2):
ASoC: sta32x: Fix cache sync
ASoC: wm8958-dsp: Fix firmware block loading
Laurent Dufour (1):
powerpc/crashdump : Fix page frame number check in copy_oldmem_page
Levente Kurusa (1):
ahci: disable NCQ on Samsung pci-e SSDs on macbooks
Linus Walleij (1):
dma: ste_dma40: don't dereference free:d descriptor
Maciej Żenczykowski (1):
net: fix 'ip rule' iif/oif device rename
Marcelo Tosatti (2):
KVM: MMU: handle invalid root_hpa at __direct_map
KVM: VMX: fix use after free of vmx->loaded_vmcs
Marek Szyprowski (2):
ARM: dma-mapping: fix GFP_ATOMIC macro usage
x86: dma-mapping: fix GFP_ATOMIC macro usage
Mark Brown (1):
ASoC: da732x: Mark DC offset control registers volatile
Matthieu CASTET (1):
usb: chipidea: need to mask when writting endptflush and endptprime
Max Filippov (1):
xtensa: introduce spill_registers_kernel macro
Michele Baldessari (1):
e100: Fix "disabling already-disabled device" warning
Mike Snitzer (2):
dm thin: avoid metadata commit if a pool's thin devices haven't changed
dm thin: fix the error path for the thin device constructor
Nicholas Bellinger (1):
bio-integrity: Fix bio_integrity_verify segment start bug
Nithin Sujir (1):
tg3: Fix deadlock in tg3_change_mtu()
Oliver Hartkopp (1):
can: add destructor for self generated skbs
Olivier Langlois (2):
rtlwifi: rtl8192ce: Fix too long disable of IRQs
rtlwifi: Fix incorrect return from rtl_ps_enable_nic()
Olivier Sobrie (1):
can: kvaser_usb: check number of channels returned by HW
Olof Johansson (1):
ARM64: unwind: Fix PC calculation
Paul Gortmaker (1):
avr32: fix missing module.h causing build failure in mimc200/fram.c
Pavel Shilovsky (1):
CIFS: Fix too big maxBuf size for SMB3 mounts
Pekon Gupta (2):
ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module
ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND is built as module
Peter Zijlstra (2):
perf/x86: Fix event scheduling
perf: Fix hotplug splat
Ping Cheng (1):
Input: wacom - make sure touch_max is set for touch devices
Sabrina Dubroca (1):
netpoll: fix netconsole IPv6 setup
Sebastian Capella (1):
PM / hibernate: Fix restore hang in freeze_processes()
Sebastian Hesselbarth (3):
irqchip: orion: clear bridge cause register on init
irqchip: orion: use handle_edge_irq on bridge irqs
irqchip: orion: clear stale interrupts in irq_startup
Srivatsa S. Bhat (1):
cpufreq: powernow-k8: Initialize per-cpu data-structures properly
Stanislaw Gruszka (2):
rtl8187: fix regression on MIPS without coherent DMA
usb: ehci: fix deadlock when threadirqs option is used
Stephen Warren (1):
ARM: tegra: only run PL310 init on systems with one
Takashi Iwai (4):
ASoC: sta32x: Fix array access overflow
ASoC: wm8770: Fix wrong number of enum items
ALSA: hda - Add a fixup for HP Folio 13 mute LED
ASoC: sta32x: Fix wrong enum for limiter2 release rate
Tejun Heo (2):
sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN
cgroup: update cgroup_enable_task_cg_lists() to grab siglock
Theodore Ts'o (4):
ext4: don't try to modify s_flags if the the file system is read-only
ext4: fix online resize with very large inode tables
ext4: fix online resize with a non-standard blocks per group setting
ext4: don't leave i_crtime.tv_sec uninitialized
Tomasz Nowicki (1):
ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
Tony Breeds (1):
powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
Trond Myklebust (2):
NFS: Do not set NFS_INO_INVALID_LABEL unless server supports labeled NFS
SUNRPC: Fix races in xs_nospace()
Ville Syrjälä (2):
drm/i915: Add intel_ring_cachline_align()
drm/i915: Prevent MI_DISPLAY_FLIP straddling two cachelines on IVB
Vinayak Kale (1):
ARM: 7957/1: add DSB after icache flush in __flush_icache_all()
Will Deacon (3):
ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU
iommu/arm-smmu: really fix page table locking
iommu/arm-smmu: fix table flushing during initial allocations
Yifan Zhang (1):
iommu/arm-smmu: fix pud/pmd entry fill sequence
Zheng Liu (1):
ext4: fix error paths in swap_inode_boot_loader()
^ permalink raw reply [flat|nested] 133+ messages in thread
* [PATCH 3.11 001/131] ata: enable quirk from jmicron JMB350 for JMB394
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 002/131] sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN Luis Henriques
` (129 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Denis V. Lunev, Tejun Heo, linux-ide, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: "Denis V. Lunev" <den@openvz.org>
commit efb9e0f4f43780f0ae0c6428d66bd03e805c7539 upstream.
Without the patch the kernel generates the following error.
ata11.15: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata11.15: Port Multiplier vendor mismatch '0x197b' != '0x123'
ata11.15: PMP revalidation failed (errno=-19)
ata11.15: failed to recover PMP after 5 tries, giving up
This patch helps to bypass this error and the device becomes
functional.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: <linux-ide@vger.kernel.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/ata/libata-pmp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 20fd337..7ccc084 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -447,8 +447,11 @@ static void sata_pmp_quirks(struct ata_port *ap)
* otherwise. Don't try hard to recover it.
*/
ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY;
- } else if (vendor == 0x197b && devid == 0x2352) {
- /* chip found in Thermaltake BlackX Duet, jmicron JMB350? */
+ } else if (vendor == 0x197b && (devid == 0x2352 || devid == 0x0325)) {
+ /*
+ * 0x2352: found in Thermaltake BlackX Duet, jmicron JMB350?
+ * 0x0325: jmicron JMB394.
+ */
ata_for_each_link(link, ap, EDGE) {
/* SRST breaks detection and disks get misclassified
* LPM disabled to avoid potential problems
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 002/131] sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 001/131] ata: enable quirk from jmicron JMB350 for JMB394 Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 003/131] irqchip: orion: clear bridge cause register on init Luis Henriques
` (128 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Tejun Heo, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <tj@kernel.org>
commit 9f9c47f00ce99329b1a82e2ac4f70f0fe3db549c upstream.
It's a bit odd to see a newer device showing mod15write; however, the
reported behavior is highly consistent and other factors which could
contribute seem to have been verified well enough. Also, both
sata_sil itself and the drive are fairly outdated at this point making
the risk of this change fairly low. It is possible, probably likely,
that other drive models in the same family have the same problem;
however, for now, let's just add the specific model which was tested.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: matson <lists-matsonpa@luxsci.me>
References: http://lkml.kernel.org/g/201401211912.s0LJCk7F015058@rs103.luxsci.com
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/ata/sata_sil.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index d67fc35..b7695e8 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -157,6 +157,7 @@ static const struct sil_drivelist {
{ "ST380011ASL", SIL_QUIRK_MOD15WRITE },
{ "ST3120022ASL", SIL_QUIRK_MOD15WRITE },
{ "ST3160021ASL", SIL_QUIRK_MOD15WRITE },
+ { "TOSHIBA MK2561GSYN", SIL_QUIRK_MOD15WRITE },
{ "Maxtor 4D060H3", SIL_QUIRK_UDMA5MAX },
{ }
};
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 003/131] irqchip: orion: clear bridge cause register on init
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 001/131] ata: enable quirk from jmicron JMB350 for JMB394 Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 002/131] sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 004/131] irqchip: orion: use handle_edge_irq on bridge irqs Luis Henriques
` (127 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Sebastian Hesselbarth, Jason Cooper, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
commit 7b119fd1bdc59a8060df5b659b9f7a70e0169fd6 upstream.
It is good practice to mask and clear pending irqs on init. We already
mask all irqs, so also clear the bridge irq cause register.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/irqchip/irq-orion.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index e51d400..4137c3d 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -180,8 +180,9 @@ static int __init orion_bridge_irq_init(struct device_node *np,
gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
- /* mask all interrupts */
+ /* mask and clear all interrupts */
writel(0, gc->reg_base + ORION_BRIDGE_IRQ_MASK);
+ writel(0, gc->reg_base + ORION_BRIDGE_IRQ_CAUSE);
irq_set_handler_data(irq, domain);
irq_set_chained_handler(irq, orion_bridge_irq_handler);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 004/131] irqchip: orion: use handle_edge_irq on bridge irqs
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (2 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 003/131] irqchip: orion: clear bridge cause register on init Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 005/131] irqchip: orion: clear stale interrupts in irq_startup Luis Henriques
` (126 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Sebastian Hesselbarth, Jason Cooper, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
commit 5f40067fc86f0e49329ad4a852c278998ff4394e upstream.
Bridge irqs are edge-triggered, i.e. they get asserted on low-to-high
transitions and not on the level of the downstream interrupt line.
This replaces handle_level_irq by the more appropriate handle_edge_irq.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/irqchip/irq-orion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index 4137c3d..1f636f7 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -143,7 +143,7 @@ static int __init orion_bridge_irq_init(struct device_node *np,
}
ret = irq_alloc_domain_generic_chips(domain, nrirqs, 1, np->name,
- handle_level_irq, clr, 0, IRQ_GC_INIT_MASK_CACHE);
+ handle_edge_irq, clr, 0, IRQ_GC_INIT_MASK_CACHE);
if (ret) {
pr_err("%s: unable to alloc irq domain gc\n", np->name);
return ret;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 005/131] irqchip: orion: clear stale interrupts in irq_startup
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (3 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 004/131] irqchip: orion: use handle_edge_irq on bridge irqs Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 006/131] ARM: 7950/1: mm: Fix stage-2 device memory attributes Luis Henriques
` (125 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Sebastian Hesselbarth, Jason Cooper, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
commit e0318ec3bf3f1502cd11b21b1eb00aa355b40b67 upstream.
Bridge IRQ_CAUSE bits are asserted regardless of the corresponding bit in
IRQ_MASK register. To avoid interrupt events on stale irqs, we have to clear
them before unmask. This installs an .irq_startup callback to ensure stale
irqs are cleared before initial unmask.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/irqchip/irq-orion.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index 1f636f7..0dfdc5c 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -123,6 +123,19 @@ static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc *desc)
}
}
+/*
+ * Bridge IRQ_CAUSE is asserted regardless of IRQ_MASK register.
+ * To avoid interrupt events on stale irqs, we clear them before unmask.
+ */
+static unsigned int orion_bridge_irq_startup(struct irq_data *d)
+{
+ struct irq_chip_type *ct = irq_data_get_chip_type(d);
+
+ ct->chip.irq_ack(d);
+ ct->chip.irq_unmask(d);
+ return 0;
+}
+
static int __init orion_bridge_irq_init(struct device_node *np,
struct device_node *parent)
{
@@ -176,6 +189,7 @@ static int __init orion_bridge_irq_init(struct device_node *np,
gc->chip_types[0].regs.ack = ORION_BRIDGE_IRQ_CAUSE;
gc->chip_types[0].regs.mask = ORION_BRIDGE_IRQ_MASK;
+ gc->chip_types[0].chip.irq_startup = orion_bridge_irq_startup;
gc->chip_types[0].chip.irq_ack = irq_gc_ack_clr_bit;
gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 006/131] ARM: 7950/1: mm: Fix stage-2 device memory attributes
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (4 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 005/131] irqchip: orion: clear stale interrupts in irq_startup Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 007/131] ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU Luis Henriques
` (124 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Christoffer Dall, Russell King, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoffer Dall <christoffer.dall@linaro.org>
commit 4d9c5b89cf3605bbc39c6e274351ff25f0d83e6a upstream.
The stage-2 memory attributes are distinct from the Hyp memory
attributes and the Stage-1 memory attributes. We were using the stage-1
memory attributes for stage-2 mappings causing device mappings to be
mapped as normal memory. Add the S2 equivalent defines for memory
attributes and fix the comments explaining the defines while at it.
Add a prot_pte_s2 field to the mem_type struct and fill out the field
for device mappings accordingly.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm/include/asm/pgtable-3level.h | 15 ++++++++++-----
arch/arm/mm/mm.h | 1 +
arch/arm/mm/mmu.c | 7 ++++++-
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
index 5689c18..d4f7814 100644
--- a/arch/arm/include/asm/pgtable-3level.h
+++ b/arch/arm/include/asm/pgtable-3level.h
@@ -120,11 +120,16 @@
/*
* 2nd stage PTE definitions for LPAE.
*/
-#define L_PTE_S2_MT_UNCACHED (_AT(pteval_t, 0x5) << 2) /* MemAttr[3:0] */
-#define L_PTE_S2_MT_WRITETHROUGH (_AT(pteval_t, 0xa) << 2) /* MemAttr[3:0] */
-#define L_PTE_S2_MT_WRITEBACK (_AT(pteval_t, 0xf) << 2) /* MemAttr[3:0] */
-#define L_PTE_S2_RDONLY (_AT(pteval_t, 1) << 6) /* HAP[1] */
-#define L_PTE_S2_RDWR (_AT(pteval_t, 3) << 6) /* HAP[2:1] */
+#define L_PTE_S2_MT_UNCACHED (_AT(pteval_t, 0x0) << 2) /* strongly ordered */
+#define L_PTE_S2_MT_WRITETHROUGH (_AT(pteval_t, 0xa) << 2) /* normal inner write-through */
+#define L_PTE_S2_MT_WRITEBACK (_AT(pteval_t, 0xf) << 2) /* normal inner write-back */
+#define L_PTE_S2_MT_DEV_SHARED (_AT(pteval_t, 0x1) << 2) /* device */
+#define L_PTE_S2_MT_MASK (_AT(pteval_t, 0xf) << 2)
+
+#define L_PTE_S2_RDONLY (_AT(pteval_t, 1) << 6) /* HAP[1] */
+#define L_PTE_S2_RDWR (_AT(pteval_t, 3) << 6) /* HAP[2:1] */
+
+#define L_PMD_S2_RDWR (_AT(pmdval_t, 3) << 6) /* HAP[2:1] */
/*
* Hyp-mode PL2 PTE definitions for LPAE.
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index d5a4e9a..33eab61 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -38,6 +38,7 @@ static inline pmd_t *pmd_off_k(unsigned long virt)
struct mem_type {
pteval_t prot_pte;
+ pteval_t prot_pte_s2;
pmdval_t prot_l1;
pmdval_t prot_sect;
unsigned int domain;
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 53cdbd3..c3b41f8 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -229,12 +229,16 @@ __setup("noalign", noalign_setup);
#endif /* ifdef CONFIG_CPU_CP15 / else */
#define PROT_PTE_DEVICE L_PTE_PRESENT|L_PTE_YOUNG|L_PTE_DIRTY|L_PTE_XN
+#define PROT_PTE_S2_DEVICE PROT_PTE_DEVICE
#define PROT_SECT_DEVICE PMD_TYPE_SECT|PMD_SECT_AP_WRITE
static struct mem_type mem_types[] = {
[MT_DEVICE] = { /* Strongly ordered / ARMv6 shared device */
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_SHARED |
L_PTE_SHARED,
+ .prot_pte_s2 = s2_policy(PROT_PTE_S2_DEVICE) |
+ s2_policy(L_PTE_S2_MT_DEV_SHARED) |
+ L_PTE_SHARED,
.prot_l1 = PMD_TYPE_TABLE,
.prot_sect = PROT_SECT_DEVICE | PMD_SECT_S,
.domain = DOMAIN_IO,
@@ -456,7 +460,8 @@ static void __init build_mem_type_table(void)
cp = &cache_policies[cachepolicy];
vecs_pgprot = kern_pgprot = user_pgprot = cp->pte;
s2_pgprot = cp->pte_s2;
- hyp_device_pgprot = s2_device_pgprot = mem_types[MT_DEVICE].prot_pte;
+ hyp_device_pgprot = mem_types[MT_DEVICE].prot_pte;
+ s2_device_pgprot = mem_types[MT_DEVICE].prot_pte_s2;
/*
* ARMv6 and above have extended page tables.
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 007/131] ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (5 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 006/131] ARM: 7950/1: mm: Fix stage-2 device memory attributes Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 008/131] mfd: Update DA9055 i2c device id name Luis Henriques
` (123 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Will Deacon, Russell King, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <will.deacon@arm.com>
commit bae0ca2bc550d1ec6a118fb8f2696f18c4da3d8e upstream.
During __v{6,7}_setup, we invalidate the TLBs since we are about to
enable the MMU on return to head.S. Unfortunately, without a subsequent
dsb instruction, the invalidation is not guaranteed to have completed by
the time we write to the sctlr, potentially exposing us to junk/stale
translations cached in the TLB.
This patch reworks the init functions so that the dsb used to ensure
completion of cache/predictor maintenance is also used to ensure
completion of the TLB invalidation.
Reported-by: Albin Tonnerre <Albin.Tonnerre@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: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm/mm/proc-v6.S | 3 ++-
arch/arm/mm/proc-v7.S | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index 1128064..c0b44fb 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -208,7 +208,6 @@ __v6_setup:
mcr p15, 0, r0, c7, c14, 0 @ clean+invalidate D cache
mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache
mcr p15, 0, r0, c7, c15, 0 @ clean+invalidate cache
- mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
#ifdef CONFIG_MMU
mcr p15, 0, r0, c8, c7, 0 @ invalidate I + D TLBs
mcr p15, 0, r0, c2, c0, 2 @ TTB control register
@@ -218,6 +217,8 @@ __v6_setup:
ALT_UP(orr r8, r8, #TTB_FLAGS_UP)
mcr p15, 0, r8, c2, c0, 1 @ load TTB1
#endif /* CONFIG_MMU */
+ mcr p15, 0, r0, c7, c10, 4 @ drain write buffer and
+ @ complete invalidations
adr r5, v6_crval
ldmia r5, {r5, r6}
#ifdef CONFIG_CPU_ENDIAN_BE8
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index 73398bc..4c662f3 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -332,7 +332,6 @@ __v7_setup:
3: mov r10, #0
mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate
- dsb
#ifdef CONFIG_MMU
mcr p15, 0, r10, c8, c7, 0 @ invalidate I + D TLBs
v7_ttb_setup r10, r4, r8, r5 @ TTBCR, TTBRx setup
@@ -341,6 +340,7 @@ __v7_setup:
mcr p15, 0, r5, c10, c2, 0 @ write PRRR
mcr p15, 0, r6, c10, c2, 1 @ write NMRR
#endif
+ dsb @ Complete invalidations
#ifndef CONFIG_ARM_THUMBEE
mrc p15, 0, r0, c0, c1, 0 @ read ID_PFR0 for ThumbEE
and r0, r0, #(0xf << 12) @ ThumbEE enabled field
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 008/131] mfd: Update DA9055 i2c device id name
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (6 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 007/131] ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 009/131] ASoC: da9055: Fix device registration of PMIC and CODEC devices Luis Henriques
` (122 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Ankur Raina, Lee Jones, Samuel Ortiz, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Ankur Raina <Ankur.Raina@kpitcummins.com>
commit 1d057b853962a84a2c41a0a0a7fc15a631ac96e8 upstream.
DA9055 is a combination of pmic and codec. This patch updates the DA9055 i2c
device id name to match the standard naming convention followed for such chips.
Signed-off-by: Ankur Raina <Ankur.Raina@kpitcummins.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/mfd/da9055-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/da9055-i2c.c b/drivers/mfd/da9055-i2c.c
index 607387f..13af7e5 100644
--- a/drivers/mfd/da9055-i2c.c
+++ b/drivers/mfd/da9055-i2c.c
@@ -54,7 +54,7 @@ static int da9055_i2c_remove(struct i2c_client *i2c)
}
static struct i2c_device_id da9055_i2c_id[] = {
- {"da9055-pmic", 0},
+ {"da9055", 0},
{ }
};
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 009/131] ASoC: da9055: Fix device registration of PMIC and CODEC devices
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (7 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 008/131] mfd: Update DA9055 i2c device id name Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 010/131] NFS: Enabling v4.2 should not recompile nfsd and lockd Luis Henriques
` (121 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Adam Thomson, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
commit 07b0e5b10258b48e5edfb6c8ac156f05510eb775 upstream.
Currently the I2C device Ids conflict for the MFD and CODEC so
cannot be both instantiated on one platform. This patch updates
the Ids and names to make them unique from each other.
It should be noted that the I2C addresses for both PMIC and CODEC
are modifiable so instantiation of the two are kept as separate
devices, rather than instantiating the CODEC from the MFD code.
Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/mfd/da9055-i2c.c | 12 ++++++++++--
sound/soc/codecs/da9055.c | 11 +++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/da9055-i2c.c b/drivers/mfd/da9055-i2c.c
index 13af7e5..8103e43 100644
--- a/drivers/mfd/da9055-i2c.c
+++ b/drivers/mfd/da9055-i2c.c
@@ -53,17 +53,25 @@ static int da9055_i2c_remove(struct i2c_client *i2c)
return 0;
}
+/*
+ * DO NOT change the device Ids. The naming is intentionally specific as both
+ * the PMIC and CODEC parts of this chip are instantiated separately as I2C
+ * devices (both have configurable I2C addresses, and are to all intents and
+ * purposes separate). As a result there are specific DA9055 ids for PMIC
+ * and CODEC, which must be different to operate together.
+ */
static struct i2c_device_id da9055_i2c_id[] = {
- {"da9055", 0},
+ {"da9055-pmic", 0},
{ }
};
+MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
static struct i2c_driver da9055_i2c_driver = {
.probe = da9055_i2c_probe,
.remove = da9055_i2c_remove,
.id_table = da9055_i2c_id,
.driver = {
- .name = "da9055",
+ .name = "da9055-pmic",
.owner = THIS_MODULE,
},
};
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index fc9802d..620f804 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -1523,8 +1523,15 @@ static int da9055_remove(struct i2c_client *client)
return 0;
}
+/*
+ * DO NOT change the device Ids. The naming is intentionally specific as both
+ * the CODEC and PMIC parts of this chip are instantiated separately as I2C
+ * devices (both have configurable I2C addresses, and are to all intents and
+ * purposes separate). As a result there are specific DA9055 Ids for CODEC
+ * and PMIC, which must be different to operate together.
+ */
static const struct i2c_device_id da9055_i2c_id[] = {
- { "da9055", 0 },
+ { "da9055-codec", 0 },
{ }
};
MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
@@ -1532,7 +1539,7 @@ MODULE_DEVICE_TABLE(i2c, da9055_i2c_id);
/* I2C codec control layer */
static struct i2c_driver da9055_i2c_driver = {
.driver = {
- .name = "da9055",
+ .name = "da9055-codec",
.owner = THIS_MODULE,
},
.probe = da9055_i2c_probe,
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 010/131] NFS: Enabling v4.2 should not recompile nfsd and lockd
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (8 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 009/131] ASoC: da9055: Fix device registration of PMIC and CODEC devices Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 011/131] NFS: Do not set NFS_INO_INVALID_LABEL unless server supports labeled NFS Luis Henriques
` (120 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Anna Schumaker, Trond Myklebust, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Anna Schumaker <bjschuma@netapp.com>
commit 694e096fd7c2a7d40760fc9c9dfc826bdd495ea4 upstream.
When CONFIG_NFS_V4_2 is toggled nfsd and lockd will be recompiled,
instead of only the nfs client. This patch moves a small amount of code
into the client directory to avoid unnecessary recompiles.
Signed-off-by: Anna Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/nfs/blocklayout/blocklayout.h | 1 +
fs/nfs/dns_resolve.c | 2 ++
fs/nfs/internal.h | 15 +++++++++++++++
fs/nfs/nfs4_fs.h | 8 ++++++++
include/linux/nfs4.h | 10 ----------
include/linux/nfs_fs.h | 18 ------------------
6 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/fs/nfs/blocklayout/blocklayout.h b/fs/nfs/blocklayout/blocklayout.h
index 8485978..9838fb0 100644
--- a/fs/nfs/blocklayout/blocklayout.h
+++ b/fs/nfs/blocklayout/blocklayout.h
@@ -36,6 +36,7 @@
#include <linux/nfs_fs.h>
#include <linux/sunrpc/rpc_pipe_fs.h>
+#include "../nfs4_fs.h"
#include "../pnfs.h"
#include "../netns.h"
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c
index fc0f95e..d25f10f 100644
--- a/fs/nfs/dns_resolve.c
+++ b/fs/nfs/dns_resolve.c
@@ -46,7 +46,9 @@ ssize_t nfs_dns_resolve_name(struct net *net, char *name, size_t namelen,
#include <linux/sunrpc/cache.h>
#include <linux/sunrpc/svcauth.h>
#include <linux/sunrpc/rpc_pipe_fs.h>
+#include <linux/nfs_fs.h>
+#include "nfs4_fs.h"
#include "dns_resolve.h"
#include "cache_lib.h"
#include "netns.h"
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 3c8373f..f47305e 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -263,6 +263,21 @@ extern const u32 nfs41_maxgetdevinfo_overhead;
extern struct rpc_procinfo nfs4_procedures[];
#endif
+#ifdef CONFIG_NFS_V4_SECURITY_LABEL
+extern struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags);
+static inline void nfs4_label_free(struct nfs4_label *label)
+{
+ if (label) {
+ kfree(label->label);
+ kfree(label);
+ }
+ return;
+}
+#else
+static inline struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags) { return NULL; }
+static inline void nfs4_label_free(void *label) {}
+#endif /* CONFIG_NFS_V4_SECURITY_LABEL */
+
/* proc.c */
void nfs_close_context(struct nfs_open_context *ctx, int is_sync);
extern struct nfs_client *nfs_init_client(struct nfs_client *clp,
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index ee81e35..69c7c38 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -9,6 +9,14 @@
#ifndef __LINUX_FS_NFS_NFS4_FS_H
#define __LINUX_FS_NFS_NFS4_FS_H
+#if defined(CONFIG_NFS_V4_2)
+#define NFS4_MAX_MINOR_VERSION 2
+#elif defined(CONFIG_NFS_V4_1)
+#define NFS4_MAX_MINOR_VERSION 1
+#else
+#define NFS4_MAX_MINOR_VERSION 0
+#endif
+
#if IS_ENABLED(CONFIG_NFS_V4)
#define NFS4_MAX_LOOP_ON_RECOVER (10)
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 3859ddb..32c7ef6 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -408,16 +408,6 @@ enum lock_type4 {
#define NFS4_VERSION 4
#define NFS4_MINOR_VERSION 0
-#if defined(CONFIG_NFS_V4_2)
-#define NFS4_MAX_MINOR_VERSION 2
-#else
-#if defined(CONFIG_NFS_V4_1)
-#define NFS4_MAX_MINOR_VERSION 1
-#else
-#define NFS4_MAX_MINOR_VERSION 0
-#endif /* CONFIG_NFS_V4_1 */
-#endif /* CONFIG_NFS_V4_2 */
-
#define NFS4_DEBUG 1
/* Index of predefined Linux client operations */
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 7125cef..dcb32f3 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -503,24 +503,6 @@ extern int nfs_mountpoint_expiry_timeout;
extern void nfs_release_automount_timer(void);
/*
- * linux/fs/nfs/nfs4proc.c
- */
-#ifdef CONFIG_NFS_V4_SECURITY_LABEL
-extern struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags);
-static inline void nfs4_label_free(struct nfs4_label *label)
-{
- if (label) {
- kfree(label->label);
- kfree(label);
- }
- return;
-}
-#else
-static inline struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags) { return NULL; }
-static inline void nfs4_label_free(void *label) {}
-#endif
-
-/*
* linux/fs/nfs/unlink.c
*/
extern void nfs_complete_unlink(struct dentry *dentry, struct inode *);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 011/131] NFS: Do not set NFS_INO_INVALID_LABEL unless server supports labeled NFS
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (9 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 010/131] NFS: Enabling v4.2 should not recompile nfsd and lockd Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 012/131] iommu/arm-smmu: fix pud/pmd entry fill sequence Luis Henriques
` (119 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Trond Myklebust, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <trond.myklebust@primarydata.com>
commit fd1defc257e2b12ab69bc0b379105c00eca4e112 upstream.
Commit aa9c2669626c (NFS: Client implementation of Labeled-NFS) introduces
a performance regression. When nfs_zap_caches_locked is called, it sets
the NFS_INO_INVALID_LABEL flag irrespectively of whether or not the
NFS server supports security labels. Since that flag is never cleared,
it means that all calls to nfs_revalidate_inode() will now trigger
an on-the-wire GETATTR call.
This patch ensures that we never set the NFS_INO_INVALID_LABEL unless the
server advertises support for labeled NFS.
It also causes nfs_setsecurity() to clear NFS_INO_INVALID_LABEL when it
has successfully set the security label for the inode.
Finally it gets rid of the NFS_INO_INVALID_LABEL cruft from nfs_update_inode,
which has nothing to do with labeled NFS.
Reported-by: Neil Brown <neilb@suse.de>
Tested-by: Neil Brown <neilb@suse.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/nfs/inode.c | 14 ++++++++++----
fs/nfs/internal.h | 9 +++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 941246f..993581f 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -163,17 +163,16 @@ static void nfs_zap_caches_locked(struct inode *inode)
if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) {
nfs_fscache_invalidate(inode);
nfsi->cache_validity |= NFS_INO_INVALID_ATTR
- | NFS_INO_INVALID_LABEL
| NFS_INO_INVALID_DATA
| NFS_INO_INVALID_ACCESS
| NFS_INO_INVALID_ACL
| NFS_INO_REVAL_PAGECACHE;
} else
nfsi->cache_validity |= NFS_INO_INVALID_ATTR
- | NFS_INO_INVALID_LABEL
| NFS_INO_INVALID_ACCESS
| NFS_INO_INVALID_ACL
| NFS_INO_REVAL_PAGECACHE;
+ nfs_zap_label_cache_locked(nfsi);
}
void nfs_zap_caches(struct inode *inode)
@@ -265,6 +264,13 @@ nfs_init_locked(struct inode *inode, void *opaque)
}
#ifdef CONFIG_NFS_V4_SECURITY_LABEL
+static void nfs_clear_label_invalid(struct inode *inode)
+{
+ spin_lock(&inode->i_lock);
+ NFS_I(inode)->cache_validity &= ~NFS_INO_INVALID_LABEL;
+ spin_unlock(&inode->i_lock);
+}
+
void nfs_setsecurity(struct inode *inode, struct nfs_fattr *fattr,
struct nfs4_label *label)
{
@@ -288,6 +294,7 @@ void nfs_setsecurity(struct inode *inode, struct nfs_fattr *fattr,
__func__,
(char *)label->label,
label->len, error);
+ nfs_clear_label_invalid(inode);
}
}
@@ -1579,7 +1586,7 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
inode->i_blocks = fattr->du.nfs2.blocks;
/* Update attrtimeo value if we're out of the unstable period */
- if (invalid & (NFS_INO_INVALID_ATTR|NFS_INO_INVALID_LABEL)) {
+ if (invalid & NFS_INO_INVALID_ATTR) {
nfs_inc_stats(inode, NFSIOS_ATTRINVALIDATE);
nfsi->attrtimeo = NFS_MINATTRTIMEO(inode);
nfsi->attrtimeo_timestamp = now;
@@ -1592,7 +1599,6 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
}
}
invalid &= ~NFS_INO_INVALID_ATTR;
- invalid &= ~NFS_INO_INVALID_LABEL;
/* Don't invalidate the data if we were to blame */
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)
|| S_ISLNK(inode->i_mode)))
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index f47305e..2365246 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -273,9 +273,18 @@ static inline void nfs4_label_free(struct nfs4_label *label)
}
return;
}
+
+static inline void nfs_zap_label_cache_locked(struct nfs_inode *nfsi)
+{
+ if (nfs_server_capable(&nfsi->vfs_inode, NFS_CAP_SECURITY_LABEL))
+ nfsi->cache_validity |= NFS_INO_INVALID_LABEL;
+}
#else
static inline struct nfs4_label *nfs4_label_alloc(struct nfs_server *server, gfp_t flags) { return NULL; }
static inline void nfs4_label_free(void *label) {}
+static inline void nfs_zap_label_cache_locked(struct nfs_inode *nfsi)
+{
+}
#endif /* CONFIG_NFS_V4_SECURITY_LABEL */
/* proc.c */
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 012/131] iommu/arm-smmu: fix pud/pmd entry fill sequence
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (10 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 011/131] NFS: Do not set NFS_INO_INVALID_LABEL unless server supports labeled NFS Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 013/131] iommu/arm-smmu: really fix page table locking Luis Henriques
` (118 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Yifan Zhang, Will Deacon, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Yifan Zhang <zhangyf@marvell.com>
commit 97a644208d1a08b7104d1fe2ace8cef011222711 upstream.
The ARM SMMU driver's population of puds and pmds is broken, since we
iterate over the next level of table repeatedly setting the current
level descriptor to point at the pmd being initialised. This is clearly
wrong when dealing with multiple pmds/puds.
This patch fixes the problem by moving the pud/pmd population out of the
loop and instead performing it when we allocate the next level (like we
correctly do for ptes already). The starting address for the next level
is then calculated prior to entering the loop.
Signed-off-by: Yifan Zhang <zhangyf@marvell.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/iommu/arm-smmu.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 320894b..896a229 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -1293,6 +1293,11 @@ static int arm_smmu_alloc_init_pmd(struct arm_smmu_device *smmu, pud_t *pud,
pmd = pmd_alloc_one(NULL, addr);
if (!pmd)
return -ENOMEM;
+
+ pud_populate(NULL, pud, pmd);
+ arm_smmu_flush_pgtable(smmu, pud, sizeof(*pud));
+
+ pmd += pmd_index(addr);
} else
#endif
pmd = pmd_offset(pud, addr);
@@ -1301,8 +1306,6 @@ static int arm_smmu_alloc_init_pmd(struct arm_smmu_device *smmu, pud_t *pud,
next = pmd_addr_end(addr, end);
ret = arm_smmu_alloc_init_pte(smmu, pmd, addr, end, pfn,
flags, stage);
- pud_populate(NULL, pud, pmd);
- arm_smmu_flush_pgtable(smmu, pud, sizeof(*pud));
phys += next - addr;
} while (pmd++, addr = next, addr < end);
@@ -1322,6 +1325,11 @@ static int arm_smmu_alloc_init_pud(struct arm_smmu_device *smmu, pgd_t *pgd,
pud = pud_alloc_one(NULL, addr);
if (!pud)
return -ENOMEM;
+
+ pgd_populate(NULL, pgd, pud);
+ arm_smmu_flush_pgtable(smmu, pgd, sizeof(*pgd));
+
+ pud += pud_index(addr);
} else
#endif
pud = pud_offset(pgd, addr);
@@ -1330,8 +1338,6 @@ static int arm_smmu_alloc_init_pud(struct arm_smmu_device *smmu, pgd_t *pgd,
next = pud_addr_end(addr, end);
ret = arm_smmu_alloc_init_pmd(smmu, pud, addr, next, phys,
flags, stage);
- pgd_populate(NULL, pud, pgd);
- arm_smmu_flush_pgtable(smmu, pgd, sizeof(*pgd));
phys += next - addr;
} while (pud++, addr = next, addr < end);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 013/131] iommu/arm-smmu: really fix page table locking
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (11 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 012/131] iommu/arm-smmu: fix pud/pmd entry fill sequence Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 014/131] iommu/arm-smmu: fix table flushing during initial allocations Luis Henriques
` (117 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Will Deacon, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <will.deacon@arm.com>
commit c9d09e2748eaa55cac2af274574baa6368189bc1 upstream.
Commit a44a9791e778 ("iommu/arm-smmu: use mutex instead of spinlock for
locking page tables") replaced the page table spinlock with a mutex, to
allow blocking allocations to satisfy lazy mapping requests.
Unfortunately, it turns out that IOMMU mappings are created from atomic
context (e.g. spinlock held during a dma_map), so this change doesn't
really help us in practice.
This patch is a partial revert of the offending commit, bringing back
the original spinlock but replacing our page table allocations for any
levels below the pgd (which is allocated during domain init) with
GFP_ATOMIC instead of GFP_KERNEL.
Reported-by: Andreas Herrmann <andreas.herrmann@calxeda.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/iommu/arm-smmu.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 896a229..b066eef 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -391,7 +391,7 @@ struct arm_smmu_domain {
struct arm_smmu_cfg root_cfg;
phys_addr_t output_mask;
- struct mutex lock;
+ spinlock_t lock;
};
static DEFINE_SPINLOCK(arm_smmu_devices_lock);
@@ -884,7 +884,7 @@ static int arm_smmu_domain_init(struct iommu_domain *domain)
goto out_free_domain;
smmu_domain->root_cfg.pgd = pgd;
- mutex_init(&smmu_domain->lock);
+ spin_lock_init(&smmu_domain->lock);
domain->priv = smmu_domain;
return 0;
@@ -1116,7 +1116,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
* Sanity check the domain. We don't currently support domains
* that cross between different SMMU chains.
*/
- mutex_lock(&smmu_domain->lock);
+ spin_lock(&smmu_domain->lock);
if (!smmu_domain->leaf_smmu) {
/* Now that we have a master, we can finalise the domain */
ret = arm_smmu_init_domain_context(domain, dev);
@@ -1131,7 +1131,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
dev_name(device_smmu->dev));
goto err_unlock;
}
- mutex_unlock(&smmu_domain->lock);
+ spin_unlock(&smmu_domain->lock);
/* Looks ok, so add the device to the domain */
master = find_smmu_master(smmu_domain->leaf_smmu, dev->of_node);
@@ -1141,7 +1141,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
return arm_smmu_domain_add_master(smmu_domain, master);
err_unlock:
- mutex_unlock(&smmu_domain->lock);
+ spin_unlock(&smmu_domain->lock);
return ret;
}
@@ -1188,7 +1188,7 @@ static int arm_smmu_alloc_init_pte(struct arm_smmu_device *smmu, pmd_t *pmd,
if (pmd_none(*pmd)) {
/* Allocate a new set of tables */
- pgtable_t table = alloc_page(PGALLOC_GFP);
+ pgtable_t table = alloc_page(GFP_ATOMIC|__GFP_ZERO);
if (!table)
return -ENOMEM;
@@ -1290,7 +1290,7 @@ static int arm_smmu_alloc_init_pmd(struct arm_smmu_device *smmu, pud_t *pud,
#ifndef __PAGETABLE_PMD_FOLDED
if (pud_none(*pud)) {
- pmd = pmd_alloc_one(NULL, addr);
+ pmd = (pmd_t *)get_zeroed_page(GFP_ATOMIC);
if (!pmd)
return -ENOMEM;
@@ -1322,7 +1322,7 @@ static int arm_smmu_alloc_init_pud(struct arm_smmu_device *smmu, pgd_t *pgd,
#ifndef __PAGETABLE_PUD_FOLDED
if (pgd_none(*pgd)) {
- pud = pud_alloc_one(NULL, addr);
+ pud = (pud_t *)get_zeroed_page(GFP_ATOMIC);
if (!pud)
return -ENOMEM;
@@ -1376,7 +1376,7 @@ static int arm_smmu_handle_mapping(struct arm_smmu_domain *smmu_domain,
if (paddr & ~output_mask)
return -ERANGE;
- mutex_lock(&smmu_domain->lock);
+ spin_lock(&smmu_domain->lock);
pgd += pgd_index(iova);
end = iova + size;
do {
@@ -1392,7 +1392,7 @@ static int arm_smmu_handle_mapping(struct arm_smmu_domain *smmu_domain,
} while (pgd++, iova != end);
out_unlock:
- mutex_unlock(&smmu_domain->lock);
+ spin_unlock(&smmu_domain->lock);
/* Ensure new page tables are visible to the hardware walker */
if (smmu->features & ARM_SMMU_FEAT_COHERENT_WALK)
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 014/131] iommu/arm-smmu: fix table flushing during initial allocations
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (12 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 013/131] iommu/arm-smmu: really fix page table locking Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 015/131] ARM: dma-mapping: fix GFP_ATOMIC macro usage Luis Henriques
` (116 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Will Deacon, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <will.deacon@arm.com>
commit 6dd35f45b8dac827b6f9dd86f5aca6436cdd2410 upstream.
Now that we populate page tables as we traverse them ("iommu/arm-smmu:
fix pud/pmd entry fill sequence"), we need to ensure that we flush out
our zeroed tables after initial allocation, to prevent speculative TLB
fills using bogus data.
This patch adds additional calls to arm_smmu_flush_pgtable during
initial table allocation, and moves the dsb required by coherent table
walkers into the helper.
Signed-off-by: Will Deacon <will.deacon@arm.com>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/iommu/arm-smmu.c | 51 +++++++++++++++++++++++++-----------------------
1 file changed, 27 insertions(+), 24 deletions(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index b066eef..0b98867 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -81,7 +81,6 @@
#define ARM_SMMU_PTE_CONT_SIZE (PAGE_SIZE * ARM_SMMU_PTE_CONT_ENTRIES)
#define ARM_SMMU_PTE_CONT_MASK (~(ARM_SMMU_PTE_CONT_SIZE - 1))
-#define ARM_SMMU_PTE_HWTABLE_SIZE (PTRS_PER_PTE * sizeof(pte_t))
/* Stage-1 PTE */
#define ARM_SMMU_PTE_AP_UNPRIV (((pteval_t)1) << 6)
@@ -605,6 +604,28 @@ static irqreturn_t arm_smmu_global_fault(int irq, void *dev)
return IRQ_NONE;
}
+static void arm_smmu_flush_pgtable(struct arm_smmu_device *smmu, void *addr,
+ size_t size)
+{
+ unsigned long offset = (unsigned long)addr & ~PAGE_MASK;
+
+
+ /* Ensure new page tables are visible to the hardware walker */
+ if (smmu->features & ARM_SMMU_FEAT_COHERENT_WALK) {
+ dsb();
+ } else {
+ /*
+ * If the SMMU can't walk tables in the CPU caches, treat them
+ * like non-coherent DMA since we need to flush the new entries
+ * all the way out to memory. There's no possibility of
+ * recursion here as the SMMU table walker will not be wired
+ * through another SMMU.
+ */
+ dma_map_page(smmu->dev, virt_to_page(addr), offset, size,
+ DMA_TO_DEVICE);
+ }
+}
+
static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain)
{
u32 reg;
@@ -687,6 +708,8 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain)
}
/* TTBR0 */
+ arm_smmu_flush_pgtable(smmu, root_cfg->pgd,
+ PTRS_PER_PGD * sizeof(pgd_t));
reg = __pa(root_cfg->pgd);
#ifndef __BIG_ENDIAN
writel_relaxed(reg, cb_base + ARM_SMMU_CB_TTBR0_LO);
@@ -1155,23 +1178,6 @@ static void arm_smmu_detach_dev(struct iommu_domain *domain, struct device *dev)
arm_smmu_domain_remove_master(smmu_domain, master);
}
-static void arm_smmu_flush_pgtable(struct arm_smmu_device *smmu, void *addr,
- size_t size)
-{
- unsigned long offset = (unsigned long)addr & ~PAGE_MASK;
-
- /*
- * If the SMMU can't walk tables in the CPU caches, treat them
- * like non-coherent DMA since we need to flush the new entries
- * all the way out to memory. There's no possibility of recursion
- * here as the SMMU table walker will not be wired through another
- * SMMU.
- */
- if (!(smmu->features & ARM_SMMU_FEAT_COHERENT_WALK))
- dma_map_page(smmu->dev, virt_to_page(addr), offset, size,
- DMA_TO_DEVICE);
-}
-
static bool arm_smmu_pte_is_contiguous_range(unsigned long addr,
unsigned long end)
{
@@ -1192,8 +1198,7 @@ static int arm_smmu_alloc_init_pte(struct arm_smmu_device *smmu, pmd_t *pmd,
if (!table)
return -ENOMEM;
- arm_smmu_flush_pgtable(smmu, page_address(table),
- ARM_SMMU_PTE_HWTABLE_SIZE);
+ arm_smmu_flush_pgtable(smmu, page_address(table), PAGE_SIZE);
pgtable_page_ctor(table);
pmd_populate(NULL, pmd, table);
arm_smmu_flush_pgtable(smmu, pmd, sizeof(*pmd));
@@ -1294,6 +1299,7 @@ static int arm_smmu_alloc_init_pmd(struct arm_smmu_device *smmu, pud_t *pud,
if (!pmd)
return -ENOMEM;
+ arm_smmu_flush_pgtable(smmu, pmd, PAGE_SIZE);
pud_populate(NULL, pud, pmd);
arm_smmu_flush_pgtable(smmu, pud, sizeof(*pud));
@@ -1326,6 +1332,7 @@ static int arm_smmu_alloc_init_pud(struct arm_smmu_device *smmu, pgd_t *pgd,
if (!pud)
return -ENOMEM;
+ arm_smmu_flush_pgtable(smmu, pud, PAGE_SIZE);
pgd_populate(NULL, pgd, pud);
arm_smmu_flush_pgtable(smmu, pgd, sizeof(*pgd));
@@ -1394,10 +1401,6 @@ static int arm_smmu_handle_mapping(struct arm_smmu_domain *smmu_domain,
out_unlock:
spin_unlock(&smmu_domain->lock);
- /* Ensure new page tables are visible to the hardware walker */
- if (smmu->features & ARM_SMMU_FEAT_COHERENT_WALK)
- dsb();
-
return ret;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 015/131] ARM: dma-mapping: fix GFP_ATOMIC macro usage
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (13 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 014/131] iommu/arm-smmu: fix table flushing during initial allocations Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 016/131] x86: " Luis Henriques
` (115 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Marek Szyprowski, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <m.szyprowski@samsung.com>
commit 10c8562f932d89c030083e15f9279971ed637136 upstream.
GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other
flags and LACK of __GFP_WAIT flag. To check if caller wanted to perform an
atomic allocation, the code must test __GFP_WAIT flag presence. This patch
fixes the issue introduced in v3.6-rc5
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm/mm/dma-mapping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 7f9b179..6e889d0 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1325,7 +1325,7 @@ static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
*handle = DMA_ERROR_CODE;
size = PAGE_ALIGN(size);
- if (gfp & GFP_ATOMIC)
+ if (!(gfp & __GFP_WAIT))
return __iommu_alloc_atomic(dev, size, handle);
/*
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 016/131] x86: dma-mapping: fix GFP_ATOMIC macro usage
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (14 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 015/131] ARM: dma-mapping: fix GFP_ATOMIC macro usage Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 017/131] SUNRPC: Fix races in xs_nospace() Luis Henriques
` (114 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Marek Szyprowski, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <m.szyprowski@samsung.com>
commit c091c71ad2218fc50a07b3d1dab85783f3b77efd upstream.
GFP_ATOMIC is not a single gfp flag, but a macro which expands to the other
flags, where meaningful is the LACK of __GFP_WAIT flag. To check if caller
wants to perform an atomic allocation, the code must test for a lack of the
__GFP_WAIT flag. This patch fixes the issue introduced in v3.5-rc1.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/x86/kernel/pci-dma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index 872079a..f7d0672 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -100,8 +100,10 @@ void *dma_generic_alloc_coherent(struct device *dev, size_t size,
flag |= __GFP_ZERO;
again:
page = NULL;
- if (!(flag & GFP_ATOMIC))
+ /* CMA can be used only in the context which permits sleeping */
+ if (flag & __GFP_WAIT)
page = dma_alloc_from_contiguous(dev, count, get_order(size));
+ /* fallback */
if (!page)
page = alloc_pages_node(dev_to_node(dev), flag, get_order(size));
if (!page)
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 017/131] SUNRPC: Fix races in xs_nospace()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (15 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 016/131] x86: " Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 018/131] drm/i915: Add intel_ring_cachline_align() Luis Henriques
` (113 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Trond Myklebust, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <trond.myklebust@primarydata.com>
commit 06ea0bfe6e6043cb56a78935a19f6f8ebc636226 upstream.
When a send failure occurs due to the socket being out of buffer space,
we call xs_nospace() in order to have the RPC task wait until the
socket has drained enough to make it worth while trying again.
The current patch fixes a race in which the socket is drained before
we get round to setting up the machinery in xs_nospace(), and which
is reported to cause hangs.
Link: http://lkml.kernel.org/r/20140210170315.33dfc621@notabene.brown
Fixes: a9a6b52ee1ba (SUNRPC: Don't start the retransmission timer...)
Reported-by: Neil Brown <neilb@suse.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/sunrpc/xprtsock.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index e865e08..2eeea23 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -502,6 +502,7 @@ static int xs_nospace(struct rpc_task *task)
struct rpc_rqst *req = task->tk_rqstp;
struct rpc_xprt *xprt = req->rq_xprt;
struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
+ struct sock *sk = transport->inet;
int ret = -EAGAIN;
dprintk("RPC: %5u xmit incomplete (%u left of %u)\n",
@@ -519,7 +520,7 @@ static int xs_nospace(struct rpc_task *task)
* window size
*/
set_bit(SOCK_NOSPACE, &transport->sock->flags);
- transport->inet->sk_write_pending++;
+ sk->sk_write_pending++;
/* ...and wait for more buffer space */
xprt_wait_for_buffer_space(task, xs_nospace_callback);
}
@@ -529,6 +530,9 @@ static int xs_nospace(struct rpc_task *task)
}
spin_unlock_bh(&xprt->transport_lock);
+
+ /* Race breaker in case memory is freed before above code is called */
+ sk->sk_write_space(sk);
return ret;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 018/131] drm/i915: Add intel_ring_cachline_align()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (16 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 017/131] SUNRPC: Fix races in xs_nospace() Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 019/131] drm/i915: Prevent MI_DISPLAY_FLIP straddling two cachelines on IVB Luis Henriques
` (112 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Bjoern C, Alexandru DAMIAN, Enrico Tagliavini,
Ville Syrjälä, Daniel Vetter, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
commit 753b1ad4a281b0663329409d410243e91825c323 upstream.
intel_ring_cachline_align() emits MI_NOOPs until the ring tail is
aligned to a cacheline boundary.
Cc: Bjoern C <lkml@call-home.ch>
Cc: Alexandru DAMIAN <alexandru.damian@intel.com>
Cc: Enrico Tagliavini <enrico.tagliavini@gmail.com>
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/i915/intel_ringbuffer.c | 21 +++++++++++++++++++++
drivers/gpu/drm/i915/intel_ringbuffer.h | 1 +
2 files changed, 22 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 9e171c2..25bd78f 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1601,6 +1601,27 @@ int intel_ring_begin(struct intel_ring_buffer *ring,
return 0;
}
+/* Align the ring tail to a cacheline boundary */
+int intel_ring_cacheline_align(struct intel_ring_buffer *ring)
+{
+ int num_dwords = (64 - (ring->tail & 63)) / sizeof(uint32_t);
+ int ret;
+
+ if (num_dwords == 0)
+ return 0;
+
+ ret = intel_ring_begin(ring, num_dwords);
+ if (ret)
+ return ret;
+
+ while (num_dwords--)
+ intel_ring_emit(ring, MI_NOOP);
+
+ intel_ring_advance(ring);
+
+ return 0;
+}
+
void intel_ring_init_seqno(struct intel_ring_buffer *ring, u32 seqno)
{
struct drm_i915_private *dev_priv = ring->dev->dev_private;
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
index 799f04c..784bbb56 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -229,6 +229,7 @@ intel_write_status_page(struct intel_ring_buffer *ring,
void intel_cleanup_ring_buffer(struct intel_ring_buffer *ring);
int __must_check intel_ring_begin(struct intel_ring_buffer *ring, int n);
+int __must_check intel_ring_cacheline_align(struct intel_ring_buffer *ring);
static inline void intel_ring_emit(struct intel_ring_buffer *ring,
u32 data)
{
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 019/131] drm/i915: Prevent MI_DISPLAY_FLIP straddling two cachelines on IVB
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (17 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 018/131] drm/i915: Add intel_ring_cachline_align() Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 020/131] can: kvaser_usb: check number of channels returned by HW Luis Henriques
` (111 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Bjoern C, Alexandru DAMIAN, Enrico Tagliavini,
Ville Syrjälä, Daniel Vetter, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
commit f66fab8e1cd6b3127ba4c5c0d11539fbe1de1e36 upstream.
According to BSpec the entire MI_DISPLAY_FLIP packet must be contained
in a single cacheline. Make sure that happens.
v2: Use intel_ring_begin_cacheline_safe()
v3: Use intel_ring_cacheline_align() (Chris)
Cc: Bjoern C <lkml@call-home.ch>
Cc: Alexandru DAMIAN <alexandru.damian@intel.com>
Cc: Enrico Tagliavini <enrico.tagliavini@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74053
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/i915/intel_display.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0e3f213..5df9798 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7477,6 +7477,20 @@ static int intel_gen7_queue_flip(struct drm_device *dev,
goto err_unpin;
}
+ /*
+ * BSpec MI_DISPLAY_FLIP for IVB:
+ * "The full packet must be contained within the same cache line."
+ *
+ * Currently the LRI+SRM+MI_DISPLAY_FLIP all fit within the same
+ * cacheline, if we ever start emitting more commands before
+ * the MI_DISPLAY_FLIP we may need to first emit everything else,
+ * then do the cacheline alignment, and finally emit the
+ * MI_DISPLAY_FLIP.
+ */
+ ret = intel_ring_cacheline_align(ring);
+ if (ret)
+ goto err_unpin;
+
ret = intel_ring_begin(ring, 4);
if (ret)
goto err_unpin;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 020/131] can: kvaser_usb: check number of channels returned by HW
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (18 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 019/131] drm/i915: Prevent MI_DISPLAY_FLIP straddling two cachelines on IVB Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 021/131] ext4: fix xfstest generic/299 block validity failures Luis Henriques
` (110 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Olivier Sobrie, Marc Kleine-Budde, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Olivier Sobrie <olivier@sobrie.be>
commit 862474f8b46f6c1e600d4934e40ba40646c696ec upstream.
It is needed to check the number of channels returned by the HW because it
cannot be greater than MAX_NET_DEVICES otherwise it will crash.
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/can/usb/kvaser_usb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c
index 4b2d5ed..cc3df8a 100644
--- a/drivers/net/can/usb/kvaser_usb.c
+++ b/drivers/net/can/usb/kvaser_usb.c
@@ -474,6 +474,8 @@ static int kvaser_usb_get_card_info(struct kvaser_usb *dev)
return err;
dev->nchannels = msg.u.cardinfo.nchannels;
+ if (dev->nchannels > MAX_NET_DEVICES)
+ return -EINVAL;
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 021/131] ext4: fix xfstest generic/299 block validity failures
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (19 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 020/131] can: kvaser_usb: check number of channels returned by HW Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 022/131] ext4: fix error paths in swap_inode_boot_loader() Luis Henriques
` (109 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Eric Whitney, Theodore Ts'o, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Whitney <enwlinux@gmail.com>
commit 15cc17678547676c82a5da9ccf357447333fc342 upstream.
Commit a115f749c1 (ext4: remove wait for unwritten extent conversion from
ext4_truncate) exposed a bug in ext4_ext_handle_uninitialized_extents().
It can be triggered by xfstest generic/299 when run on a test file
system created without a journal. This test continuously fallocates and
truncates files to which random dio/aio writes are simultaneously
performed by a separate process. The test completes successfully, but
if the test filesystem is mounted with the block_validity option, a
warning message stating that a logical block has been mapped to an
illegal physical block is posted in the kernel log.
The bug occurs when an extent is being converted to the written state
by ext4_end_io_dio() and ext4_ext_handle_uninitialized_extents()
discovers a mapping for an existing uninitialized extent. Although it
sets EXT4_MAP_MAPPED in map->m_flags, it fails to set map->m_pblk to
the discovered physical block number. Because map->m_pblk is not
otherwise initialized or set by this function or its callers, its
uninitialized value is returned to ext4_map_blocks(), where it is
stored as a bogus mapping in the extent status tree.
Since map->m_pblk can accidentally contain illegal values that are
larger than the physical size of the file system, calls to
check_block_validity() in ext4_map_blocks() that are enabled if the
block_validity mount option is used can fail, resulting in the logged
warning message.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/ext4/extents.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 878338f..9b2d6e6 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3833,6 +3833,7 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
} else
err = ret;
map->m_flags |= EXT4_MAP_MAPPED;
+ map->m_pblk = newblock;
if (allocated > map->m_len)
allocated = map->m_len;
map->m_len = allocated;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 022/131] ext4: fix error paths in swap_inode_boot_loader()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (20 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 021/131] ext4: fix xfstest generic/299 block validity failures Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 023/131] ext4: don't try to modify s_flags if the the file system is read-only Luis Henriques
` (108 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Andreas Dilger, Dr. Tilmann Bubeck, Zheng Liu, Theodore Ts'o,
Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Zheng Liu <wenqing.lz@taobao.com>
commit 30d29b119ef01776e0a301444ab24defe8d8bef3 upstream.
In swap_inode_boot_loader() we forgot to release ->i_mutex and resume
unlocked dio for inode and inode_bl if there is an error starting the
journal handle. This commit fixes this issue.
Reported-by: Ahmed Tamrawi <ahmedtamrawi@gmail.com>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: Dr. Tilmann Bubeck <t.bubeck@reinform.de>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/ext4/ioctl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index c0427e2..42624a9 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -145,7 +145,7 @@ static long swap_inode_boot_loader(struct super_block *sb,
handle = ext4_journal_start(inode_bl, EXT4_HT_MOVE_EXTENTS, 2);
if (IS_ERR(handle)) {
err = -EINVAL;
- goto swap_boot_out;
+ goto journal_err_out;
}
/* Protect extent tree against block allocations via delalloc */
@@ -203,6 +203,7 @@ static long swap_inode_boot_loader(struct super_block *sb,
ext4_double_up_write_data_sem(inode, inode_bl);
+journal_err_out:
ext4_inode_resume_unlocked_dio(inode);
ext4_inode_resume_unlocked_dio(inode_bl);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 023/131] ext4: don't try to modify s_flags if the the file system is read-only
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (21 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 022/131] ext4: fix error paths in swap_inode_boot_loader() Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 024/131] ASoC: max98090: sync regcache on entering STANDBY Luis Henriques
` (107 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Theodore Ts'o, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <tytso@mit.edu>
commit 23301410972330c0ae9a8afc379ba2005e249cc6 upstream.
If an ext4 file system is created by some tool other than mke2fs
(perhaps by someone who has a pathalogical fear of the GPL) that
doesn't set one or the other of the EXT2_FLAGS_{UN}SIGNED_HASH flags,
and that file system is then mounted read-only, don't try to modify
the s_flags field. Otherwise, if dm_verity is in use, the superblock
will change, causing an dm_verity failure.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/ext4/super.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index d5dd232..09d4762 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3630,16 +3630,22 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
for (i = 0; i < 4; i++)
sbi->s_hash_seed[i] = le32_to_cpu(es->s_hash_seed[i]);
sbi->s_def_hash_version = es->s_def_hash_version;
- i = le32_to_cpu(es->s_flags);
- if (i & EXT2_FLAGS_UNSIGNED_HASH)
- sbi->s_hash_unsigned = 3;
- else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) {
+ if (EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_DIR_INDEX)) {
+ i = le32_to_cpu(es->s_flags);
+ if (i & EXT2_FLAGS_UNSIGNED_HASH)
+ sbi->s_hash_unsigned = 3;
+ else if ((i & EXT2_FLAGS_SIGNED_HASH) == 0) {
#ifdef __CHAR_UNSIGNED__
- es->s_flags |= cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH);
- sbi->s_hash_unsigned = 3;
+ if (!(sb->s_flags & MS_RDONLY))
+ es->s_flags |=
+ cpu_to_le32(EXT2_FLAGS_UNSIGNED_HASH);
+ sbi->s_hash_unsigned = 3;
#else
- es->s_flags |= cpu_to_le32(EXT2_FLAGS_SIGNED_HASH);
+ if (!(sb->s_flags & MS_RDONLY))
+ es->s_flags |=
+ cpu_to_le32(EXT2_FLAGS_SIGNED_HASH);
#endif
+ }
}
/* Handle clustersize */
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 024/131] ASoC: max98090: sync regcache on entering STANDBY
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (22 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 023/131] ext4: don't try to modify s_flags if the the file system is read-only Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 025/131] drm/i915/dp: increase native aux defer retry timeout Luis Henriques
` (106 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Dylan Reid, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Dylan Reid <dgreid@chromium.org>
commit c42c8922c46d33ed769e99618bdfba06866a0c72 upstream.
Sync regcache when entering STANDBY from OFF. ON isn't entered with
OFF as the current state, so the registers were not being re-synced
after suspend/resume.
The 98088 and 98095 already call regcache_sync from STANDBY.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/soc/codecs/max98090.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index ad5313f..b8f9fc5 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -1769,16 +1769,6 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
switch (level) {
case SND_SOC_BIAS_ON:
- if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
- ret = regcache_sync(max98090->regmap);
-
- if (ret != 0) {
- dev_err(codec->dev,
- "Failed to sync cache: %d\n", ret);
- return ret;
- }
- }
-
if (max98090->jack_state == M98090_JACK_STATE_HEADSET) {
/*
* Set to normal bias level.
@@ -1792,6 +1782,16 @@ static int max98090_set_bias_level(struct snd_soc_codec *codec,
break;
case SND_SOC_BIAS_STANDBY:
+ if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) {
+ ret = regcache_sync(max98090->regmap);
+ if (ret != 0) {
+ dev_err(codec->dev,
+ "Failed to sync cache: %d\n", ret);
+ return ret;
+ }
+ }
+ break;
+
case SND_SOC_BIAS_OFF:
/* Set internal pull-up to lowest power mode */
snd_soc_update_bits(codec, M98090_REG_JACK_DETECT,
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 025/131] drm/i915/dp: increase native aux defer retry timeout
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (23 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 024/131] ASoC: max98090: sync regcache on entering STANDBY Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 026/131] drm/i915/dp: add native aux defer retry limit Luis Henriques
` (105 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Jani Nikula, Daniel Vetter, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jani Nikula <jani.nikula@intel.com>
commit 04eada25d1f72efdecd32d702706594f81de65d5 upstream.
Give more slack to sink devices before retrying on native aux
defer. AFAICT the 100 us timeout was not based on the DP spec.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/i915/intel_dp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e7c46aa..d701eb6 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -464,7 +464,7 @@ intel_dp_aux_native_write(struct intel_dp *intel_dp,
if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
break;
else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
- udelay(100);
+ usleep_range(400, 500);
else
return -EIO;
}
@@ -513,7 +513,7 @@ intel_dp_aux_native_read(struct intel_dp *intel_dp,
return ret - 1;
}
else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
- udelay(100);
+ usleep_range(400, 500);
else
return -EIO;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 026/131] drm/i915/dp: add native aux defer retry limit
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (24 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 025/131] drm/i915/dp: increase native aux defer retry timeout Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 027/131] rtlwifi: rtl8192ce: Fix too long disable of IRQs Luis Henriques
` (104 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Jani Nikula, Daniel Vetter, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jani Nikula <jani.nikula@intel.com>
commit f51a44b9a6c4982cc25bfb3727de9bb893621ebc upstream.
Retrying indefinitely places too much trust on the aux implementation of
the sink devices.
Reported-by: Daniel Martin <consume.noise@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71267
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Theodore Ts'o <tytso@mit.edu>
Tested-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/i915/intel_dp.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index d701eb6..eda89b6 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -447,6 +447,7 @@ intel_dp_aux_native_write(struct intel_dp *intel_dp,
uint8_t msg[20];
int msg_bytes;
uint8_t ack;
+ int retry;
intel_dp_check_edp(intel_dp);
if (send_bytes > 16)
@@ -457,18 +458,20 @@ intel_dp_aux_native_write(struct intel_dp *intel_dp,
msg[3] = send_bytes - 1;
memcpy(&msg[4], send, send_bytes);
msg_bytes = send_bytes + 4;
- for (;;) {
+ for (retry = 0; retry < 7; retry++) {
ret = intel_dp_aux_ch(intel_dp, msg, msg_bytes, &ack, 1);
if (ret < 0)
return ret;
if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK)
- break;
+ return send_bytes;
else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
usleep_range(400, 500);
else
return -EIO;
}
- return send_bytes;
+
+ DRM_ERROR("too many retries, giving up\n");
+ return -EIO;
}
/* Write a single byte to the aux channel in native mode */
@@ -490,6 +493,7 @@ intel_dp_aux_native_read(struct intel_dp *intel_dp,
int reply_bytes;
uint8_t ack;
int ret;
+ int retry;
intel_dp_check_edp(intel_dp);
msg[0] = AUX_NATIVE_READ << 4;
@@ -500,7 +504,7 @@ intel_dp_aux_native_read(struct intel_dp *intel_dp,
msg_bytes = 4;
reply_bytes = recv_bytes + 1;
- for (;;) {
+ for (retry = 0; retry < 7; retry++) {
ret = intel_dp_aux_ch(intel_dp, msg, msg_bytes,
reply, reply_bytes);
if (ret == 0)
@@ -517,6 +521,9 @@ intel_dp_aux_native_read(struct intel_dp *intel_dp,
else
return -EIO;
}
+
+ DRM_ERROR("too many retries, giving up\n");
+ return -EIO;
}
static int
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 027/131] rtlwifi: rtl8192ce: Fix too long disable of IRQs
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (25 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 026/131] drm/i915/dp: add native aux defer retry limit Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 028/131] rtlwifi: Fix incorrect return from rtl_ps_enable_nic() Luis Henriques
` (103 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Olivier Langlois, John W. Linville, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Olivier Langlois <olivier@trillion01.com>
commit f78bccd79ba3cd9d9664981b501d57bdb81ab8a4 upstream.
rtl8192ce is disabling for too long the local interrupts during hw initiatialisation when performing scans
The observable symptoms in dmesg can be:
- underruns from ALSA playback
- clock freezes (tstamps do not change for several dmesg entries until irqs are finaly reenabled):
[ 250.817669] rtlwifi:rtl_op_config():<0-0-0> 0x100
[ 250.817685] rtl8192ce:_rtl92ce_phy_set_rf_power_state():<0-1-0> IPS Set eRf nic enable
[ 250.817732] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.817796] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.817910] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818024] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818139] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818253] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818367] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:18051d59:11
[ 250.818472] rtl8192ce:_rtl92ce_init_mac():<0-1-0> reg0xec:98053f15:10
[ 250.818472] rtl8192ce:rtl92ce_sw_led_on():<0-1-0> LedAddr:4E ledpin=1
[ 250.818472] rtl8192c_common:rtl92c_download_fw():<0-1-0> Firmware Version(49), Signature(0x88c1),Size(32)
[ 250.818472] rtl8192ce:rtl92ce_enable_hw_security_config():<0-1-0> PairwiseEncAlgorithm = 0 GroupEncAlgorithm = 0
[ 250.818472] rtl8192ce:rtl92ce_enable_hw_security_config():<0-1-0> The SECR-value cc
[ 250.818472] rtl8192c_common:rtl92c_dm_check_txpower_tracking_thermal_meter():<0-1-0> Schedule TxPowerTracking direct call!!
[ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> rtl92c_dm_txpower_tracking_callback_thermalmeter
[ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf
[ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> Initial pathA ele_d reg0xc80 = 0x40000000, ofdm_index=0xc
[ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> Initial reg0xa24 = 0x90e1317, cck_index=0xc, ch14 0
[ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> Readback Thermal Meter = 0xe pre thermal meter 0xf eeprom_thermalmeter 0xf delta 0x1 delta_lck 0x0 delta_iqk 0x0
[ 250.818472] rtl8192c_common:rtl92c_dm_txpower_tracking_callback_thermalmeter():<0-1-0> <===
[ 250.818472] rtl8192c_common:rtl92c_dm_initialize_txpower_tracking_thermalmeter():<0-1-0> pMgntInfo->txpower_tracking = 1
[ 250.818472] rtl8192ce:rtl92ce_led_control():<0-1-0> ledaction 3
[ 250.818472] rtl8192ce:rtl92ce_sw_led_on():<0-1-0> LedAddr:4E ledpin=1
[ 250.818472] rtlwifi:rtl_ips_nic_on():<0-1-0> before spin_unlock_irqrestore
[ 251.154656] PCM: Lost interrupts? [Q]-0 (stream=0, delta=15903, new_hw_ptr=293408, old_hw_ptr=277505)
The exact code flow that causes that is:
1. wpa_supplicant send a start_scan request to the nl80211 driver
2. mac80211 module call rtl_op_config with IEEE80211_CONF_CHANGE_IDLE
3. rtl_ips_nic_on is called which disable local irqs
4. rtl92c_phy_set_rf_power_state() is called
5. rtl_ps_enable_nic() is called and hw_init()is executed and then the interrupts on the device are enabled
A good solution could be to refactor the code to avoid calling rtl92ce_hw_init() with the irqs disabled
but a quick and dirty solution that has proven to work is
to reenable the irqs during the function rtl92ce_hw_init().
I think that it is safe doing so since the device interrupt will only be enabled after the init function succeed.
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
index a82b30a..2eb0b38 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
@@ -937,14 +937,26 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
bool is92c;
int err;
u8 tmp_u1b;
+ unsigned long flags;
rtlpci->being_init_adapter = true;
+
+ /* Since this function can take a very long time (up to 350 ms)
+ * and can be called with irqs disabled, reenable the irqs
+ * to let the other devices continue being serviced.
+ *
+ * It is safe doing so since our own interrupts will only be enabled
+ * in a subsequent step.
+ */
+ local_save_flags(flags);
+ local_irq_enable();
+
rtlpriv->intf_ops->disable_aspm(hw);
rtstatus = _rtl92ce_init_mac(hw);
if (!rtstatus) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Init MAC failed\n");
err = 1;
- return err;
+ goto exit;
}
err = rtl92c_download_fw(hw);
@@ -952,7 +964,7 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
RT_TRACE(rtlpriv, COMP_ERR, DBG_WARNING,
"Failed to download FW. Init HW without FW now..\n");
err = 1;
- return err;
+ goto exit;
}
rtlhal->last_hmeboxnum = 0;
@@ -1032,6 +1044,8 @@ int rtl92ce_hw_init(struct ieee80211_hw *hw)
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "under 1.5V\n");
}
rtl92c_dm_init(hw);
+exit:
+ local_irq_restore(flags);
rtlpci->being_init_adapter = false;
return err;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 028/131] rtlwifi: Fix incorrect return from rtl_ps_enable_nic()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (26 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 027/131] rtlwifi: rtl8192ce: Fix too long disable of IRQs Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 029/131] rtl8187: fix regression on MIPS without coherent DMA Luis Henriques
` (102 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Olivier Langlois, John W. Linville, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Olivier Langlois <olivier@trillion01.com>
commit 2e8c5e56b307271c2dab6f8bfd1d8a3822ca2390 upstream.
rtl_ps_enable_nic() is called from loops that will loop until this function returns true or a
maximum number of retries is performed.
hw_init() returns non-zero on error. In that situation return false to
restore the original design intent to retry hw init when it fails.
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/wireless/rtlwifi/ps.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rtlwifi/ps.c b/drivers/net/wireless/rtlwifi/ps.c
index 298b615..2795e78 100644
--- a/drivers/net/wireless/rtlwifi/ps.c
+++ b/drivers/net/wireless/rtlwifi/ps.c
@@ -48,7 +48,7 @@ bool rtl_ps_enable_nic(struct ieee80211_hw *hw)
/*<2> Enable Adapter */
if (rtlpriv->cfg->ops->hw_init(hw))
- return 1;
+ return false;
RT_CLEAR_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC);
/*<3> Enable Interrupt */
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 029/131] rtl8187: fix regression on MIPS without coherent DMA
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (27 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 028/131] rtlwifi: Fix incorrect return from rtl_ps_enable_nic() Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 030/131] ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module Luis Henriques
` (101 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Stanislaw Gruszka, John W. Linville, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanislaw Gruszka <stf_xl@wp.pl>
commit b6213e413a4e0c66548153516b074df14f9d08e0 upstream.
This patch fixes regression caused by commit a16dad77634 "MIPS: Fix
potencial corruption". That commit fixes one corruption scenario in
cost of adding another one, which actually start to cause crashes
on Yeeloong laptop when rtl8187 driver is used.
For correct DMA read operation on machines without DMA coherence, kernel
have to invalidate cache, such it will refill later with new data that
device wrote to memory, when that data is needed to process. We can only
invalidate full cache line. Hence when cache line includes both dma
buffer and some other data (written in cache, but not yet in main
memory), the other data can not hit memory due to invalidation. That
happen on rtl8187 where struct rtl8187_priv fields are located just
before and after small buffers that are passed to USB layer and DMA
is performed on them.
To fix the problem we align buffers and reserve space after them to make
them match cache line.
This patch does not resolve all possible MIPS problems entirely, for
that we have to assure that we always map cache aligned buffers for DMA,
what can be complex or even not possible. But patch fixes visible and
reproducible regression and seems other possible corruptions do not
happen in practice, since Yeeloong laptop works stable without rtl8187
driver.
Bug report:
https://bugzilla.kernel.org/show_bug.cgi?id=54391
Reported-by: Petr Pisar <petr.pisar@atlas.cz>
Bisected-by: Tom Li <biergaizi2009@gmail.com>
Reported-and-tested-by: Tom Li <biergaizi2009@gmail.com>
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Larry Finger <Larry.Finger@lwfinger.next>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/wireless/rtl818x/rtl8187/rtl8187.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
index e19a20a..ecd1ac4 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
+++ b/drivers/net/wireless/rtl818x/rtl8187/rtl8187.h
@@ -15,6 +15,8 @@
#ifndef RTL8187_H
#define RTL8187_H
+#include <linux/cache.h>
+
#include "rtl818x.h"
#include "leds.h"
@@ -139,7 +141,10 @@ struct rtl8187_priv {
u8 aifsn[4];
u8 rfkill_mask;
struct {
- __le64 buf;
+ union {
+ __le64 buf;
+ u8 dummy1[L1_CACHE_BYTES];
+ } ____cacheline_aligned;
struct sk_buff_head queue;
} b_tx_status; /* This queue is used by both -b and non-b devices */
struct mutex io_mutex;
@@ -147,7 +152,8 @@ struct rtl8187_priv {
u8 bits8;
__le16 bits16;
__le32 bits32;
- } *io_dmabuf;
+ u8 dummy2[L1_CACHE_BYTES];
+ } *io_dmabuf ____cacheline_aligned;
bool rfkill_off;
u16 seqno;
};
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 030/131] ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (28 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 029/131] rtl8187: fix regression on MIPS without coherent DMA Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 031/131] ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND " Luis Henriques
` (100 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Pekon Gupta, Tony Lindgren, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Pekon Gupta <pekon@ti.com>
commit 6b187b21c92b6e2c7e8ef0b450181c37a3f31681 upstream.
Fixes: commit bc6b1e7b86f5d8e4a6fc1c0189e64bba4077efe0
ARM: OMAP: gpmc: add DT bindings for GPMC timings and NAND
OMAP SoC(s) depend on GPMC controller driver to parse GPMC DT child nodes and
register them platform_device for NAND driver to probe later. However this does
not happen if generic MTD_NAND framework is built as module (CONFIG_MTD_NAND=m).
Therefore, when MTD/NAND and MTD/NAND/OMAP2 modules are loaded, they are unable
to find any matching platform_device and remain un-binded. This causes on board
NAND flash to remain un-detected.
This patch causes GPMC controller to parse DT nodes when
CONFIG_MTD_NAND=y || CONFIG_MTD_NAND=m
Signed-off-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm/mach-omap2/gpmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index f3fdd6a..0fe1f7f 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1339,7 +1339,7 @@ static void __maybe_unused gpmc_read_timings_dt(struct device_node *np,
of_property_read_bool(np, "gpmc,time-para-granularity");
}
-#ifdef CONFIG_MTD_NAND
+#if IS_ENABLED(CONFIG_MTD_NAND)
static const char * const nand_ecc_opts[] = {
[OMAP_ECC_HAMMING_CODE_DEFAULT] = "sw",
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 031/131] ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND is built as module
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (29 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 030/131] ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 032/131] PCI: Enable INTx if BIOS left them disabled Luis Henriques
` (99 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Pekon Gupta, Tony Lindgren, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Pekon Gupta <pekon@ti.com>
commit 980386d2d6d49e0b42f48550853ef1ad6aa5d79a upstream.
Fixes: commit 75d3625e0e86b2d8d77b4e9c6f685fd7ea0d5a96
ARM: OMAP2+: gpmc: add DT bindings for OneNAND
OMAP SoC(s) depend on GPMC controller driver to parse GPMC DT child nodes and
register them platform_device for ONENAND driver to probe later. However this does
not happen if generic MTD_ONENAND framework is built as module (CONFIG_MTD_ONENAND=m).
Therefore, when MTD/ONENAND and MTD/ONENAND/OMAP2 modules are loaded, they are unable
to find any matching platform_device and remain un-binded. This causes on board
ONENAND flash to remain un-detected.
This patch causes GPMC controller to parse DT nodes when
CONFIG_MTD_ONENAND=y || CONFIG_MTD_ONENAND=m
Signed-off-by: Pekon Gupta <pekon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm/mach-omap2/gpmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 0fe1f7f..8d993d7 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1409,7 +1409,7 @@ static int gpmc_probe_nand_child(struct platform_device *pdev,
}
#endif
-#ifdef CONFIG_MTD_ONENAND
+#if IS_ENABLED(CONFIG_MTD_ONENAND)
static int gpmc_probe_onenand_child(struct platform_device *pdev,
struct device_node *child)
{
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 032/131] PCI: Enable INTx if BIOS left them disabled
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (30 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 031/131] ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND " Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 033/131] cifs: ensure that uncached writes handle unmapped areas correctly Luis Henriques
` (98 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Bjorn Helgaas, Sarah Sharp, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Helgaas <bhelgaas@google.com>
commit 1f42db786b14a31bf807fc41ee5583a00c08fcb1 upstream.
Some firmware leaves the Interrupt Disable bit set even if the device uses
INTx interrupts. Clear Interrupt Disable so we get those interrupts.
Based on the report mentioned below, if the user selects the "EHCI only"
option in the Intel Baytrail BIOS, the EHCI device is handed off to the OS
with the PCI_COMMAND_INTX_DISABLE bit set.
Link: http://lkml.kernel.org/r/20140114181721.GC12126@xanatos
Link: https://bugzilla.kernel.org/show_bug.cgi?id=70601
Reported-by: Chris Cheng <chris.cheng@atrustcorp.com>
Reported-and-tested-by: Jamie Chen <jamie.chen@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/pci/pci.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index e37fea6..1088e0d 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1119,6 +1119,8 @@ EXPORT_SYMBOL_GPL(pci_load_and_free_saved_state);
static int do_pci_enable_device(struct pci_dev *dev, int bars)
{
int err;
+ u16 cmd;
+ u8 pin;
err = pci_set_power_state(dev, PCI_D0);
if (err < 0 && err != -EIO)
@@ -1128,6 +1130,14 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars)
return err;
pci_fixup_device(pci_fixup_enable, dev);
+ pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
+ if (pin) {
+ pci_read_config_word(dev, PCI_COMMAND, &cmd);
+ if (cmd & PCI_COMMAND_INTX_DISABLE)
+ pci_write_config_word(dev, PCI_COMMAND,
+ cmd & ~PCI_COMMAND_INTX_DISABLE);
+ }
+
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 033/131] cifs: ensure that uncached writes handle unmapped areas correctly
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (31 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 032/131] PCI: Enable INTx if BIOS left them disabled Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 034/131] CIFS: Fix too big maxBuf size for SMB3 mounts Luis Henriques
` (97 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Jeff Layton, Steve French, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <jlayton@redhat.com>
commit 5d81de8e8667da7135d3a32a964087c0faf5483f upstream.
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is CVE-2014-0069
cifs_iovec_write isn't set up to handle that situation however. It'll
blindly keep chugging through the page array and not filling those pages
with anything useful. Worse yet, we'll later end up with a negative
number in wdata->tailsz, which will confuse the sending routines and
cause an oops at the very least.
Fix this by having the copy phase of cifs_iovec_write stop copying data
in this situation and send the last write as a short one. At the same
time, we want to avoid sending a zero-length write to the server, so
break out of the loop and set rc to -EFAULT if that happens. This also
allows us to handle the case where no address in the iovec is valid.
[Note: Marking this for stable on v3.4+ kernels, but kernels as old as
v2.6.38 may have a similar problem and may need similar fix]
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/cifs/file.c | 37 ++++++++++++++++++++++++++++++++++---
1 file changed, 34 insertions(+), 3 deletions(-)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 7e36ae3..829b57d 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2378,7 +2378,7 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *poffset)
{
unsigned long nr_pages, i;
- size_t copied, len, cur_len;
+ size_t bytes, copied, len, cur_len;
ssize_t total_written = 0;
loff_t offset;
struct iov_iter it;
@@ -2433,14 +2433,45 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
save_len = cur_len;
for (i = 0; i < nr_pages; i++) {
- copied = min_t(const size_t, cur_len, PAGE_SIZE);
+ bytes = min_t(const size_t, cur_len, PAGE_SIZE);
copied = iov_iter_copy_from_user(wdata->pages[i], &it,
- 0, copied);
+ 0, bytes);
cur_len -= copied;
iov_iter_advance(&it, copied);
+ /*
+ * If we didn't copy as much as we expected, then that
+ * may mean we trod into an unmapped area. Stop copying
+ * at that point. On the next pass through the big
+ * loop, we'll likely end up getting a zero-length
+ * write and bailing out of it.
+ */
+ if (copied < bytes)
+ break;
}
cur_len = save_len - cur_len;
+ /*
+ * If we have no data to send, then that probably means that
+ * the copy above failed altogether. That's most likely because
+ * the address in the iovec was bogus. Set the rc to -EFAULT,
+ * free anything we allocated and bail out.
+ */
+ if (!cur_len) {
+ for (i = 0; i < nr_pages; i++)
+ put_page(wdata->pages[i]);
+ kfree(wdata);
+ rc = -EFAULT;
+ break;
+ }
+
+ /*
+ * i + 1 now represents the number of pages we actually used in
+ * the copy phase above. Bring nr_pages down to that, and free
+ * any pages that we didn't use.
+ */
+ for ( ; nr_pages > i + 1; nr_pages--)
+ put_page(wdata->pages[nr_pages - 1]);
+
wdata->sync_mode = WB_SYNC_ALL;
wdata->nr_pages = nr_pages;
wdata->offset = (__u64)offset;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 034/131] CIFS: Fix too big maxBuf size for SMB3 mounts
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (32 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 033/131] cifs: ensure that uncached writes handle unmapped areas correctly Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 035/131] ASoC: txx9aclc_ac97: Fix kernel crash on probe Luis Henriques
` (96 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Pavel Shilovsky, Steve French, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Shilovsky <piastry@etersoft.ru>
commit 2365c4eaf077c48574ab6f143960048fc0f31518 upstream.
SMB3 servers can respond with MaxTransactSize of more than 4M
that can cause a memory allocation error returned from kmalloc
in a lock codepath. Also the client doesn't support multicredit
requests now and allows buffer sizes of 65536 bytes only. Set
MaxTransactSize to this maximum supported value.
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/cifs/smb2glob.h | 3 +++
fs/cifs/smb2ops.c | 14 ++++----------
fs/cifs/smb2pdu.c | 4 +++-
3 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/fs/cifs/smb2glob.h b/fs/cifs/smb2glob.h
index c383508..bc0bb9c 100644
--- a/fs/cifs/smb2glob.h
+++ b/fs/cifs/smb2glob.h
@@ -57,4 +57,7 @@
#define SMB2_CMACAES_SIZE (16)
#define SMB3_SIGNKEY_SIZE (16)
+/* Maximum buffer size value we can send with 1 credit */
+#define SMB2_MAX_BUFFER_SIZE 65536
+
#endif /* _SMB2_GLOB_H */
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index f259e6c..ef476d3 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -181,11 +181,8 @@ smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb_vol *volume_info)
/* start with specified wsize, or default */
wsize = volume_info->wsize ? volume_info->wsize : CIFS_DEFAULT_IOSIZE;
wsize = min_t(unsigned int, wsize, server->max_write);
- /*
- * limit write size to 2 ** 16, because we don't support multicredit
- * requests now.
- */
- wsize = min_t(unsigned int, wsize, 2 << 15);
+ /* set it to the maximum buffer size value we can send with 1 credit */
+ wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE);
return wsize;
}
@@ -199,11 +196,8 @@ smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb_vol *volume_info)
/* start with specified rsize, or default */
rsize = volume_info->rsize ? volume_info->rsize : CIFS_DEFAULT_IOSIZE;
rsize = min_t(unsigned int, rsize, server->max_read);
- /*
- * limit write size to 2 ** 16, because we don't support multicredit
- * requests now.
- */
- rsize = min_t(unsigned int, rsize, 2 << 15);
+ /* set it to the maximum buffer size value we can send with 1 credit */
+ rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE);
return rsize;
}
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index abc9c28..a826043 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -413,7 +413,9 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
/* SMB2 only has an extended negflavor */
server->negflavor = CIFS_NEGFLAVOR_EXTENDED;
- server->maxBuf = le32_to_cpu(rsp->MaxTransactSize);
+ /* set it to the maximum buffer size value we can send with 1 credit */
+ server->maxBuf = min_t(unsigned int, le32_to_cpu(rsp->MaxTransactSize),
+ SMB2_MAX_BUFFER_SIZE);
server->max_read = le32_to_cpu(rsp->MaxReadSize);
server->max_write = le32_to_cpu(rsp->MaxWriteSize);
/* BB Do we need to validate the SecurityMode? */
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 035/131] ASoC: txx9aclc_ac97: Fix kernel crash on probe
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (33 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 034/131] CIFS: Fix too big maxBuf size for SMB3 mounts Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 036/131] ext4: fix online resize with very large inode tables Luis Henriques
` (95 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Alexander Shiyan, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Shiyan <shc_work@mail.ru>
commit 9febd494d15c4a351e9c9cae7184643144eea892 upstream.
This patch fixes a crash caused by commit 3bed3344c826
(ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource()).
This is an attempt to assign "drvdata->base" while memory
for "drvdata" is not already allocated.
Fixes: 3bed3344c826 (ASoC: txx9aclc_ac97: Convert to devm_ioremap_resource())
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/soc/txx9/txx9aclc-ac97.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sound/soc/txx9/txx9aclc-ac97.c b/sound/soc/txx9/txx9aclc-ac97.c
index 4bcce8a..91977ea 100644
--- a/sound/soc/txx9/txx9aclc-ac97.c
+++ b/sound/soc/txx9/txx9aclc-ac97.c
@@ -183,6 +183,11 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0)
return irq;
+
+ drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
+ if (!drvdata)
+ return -ENOMEM;
+
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r)
return -EBUSY;
@@ -191,9 +196,6 @@ static int txx9aclc_ac97_dev_probe(struct platform_device *pdev)
if (IS_ERR(drvdata->base))
return PTR_ERR(drvdata->base);
- drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
- if (!drvdata)
- return -ENOMEM;
platform_set_drvdata(pdev, drvdata);
drvdata->physbase = r->start;
if (sizeof(drvdata->physbase) > sizeof(r->start) &&
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 036/131] ext4: fix online resize with very large inode tables
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (34 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 035/131] ASoC: txx9aclc_ac97: Fix kernel crash on probe Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 037/131] ext4: fix online resize with a non-standard blocks per group setting Luis Henriques
` (94 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Theodore Ts'o, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <tytso@mit.edu>
commit b93c95353413041a8cebad915a8109619f66bcc6 upstream.
If a file system has a large number of inodes per block group, all of
the metadata blocks in a flex_bg may be larger than what can fit in a
single block group. Unfortunately, ext4_alloc_group_tables() in
resize.c was never tested to see if it would handle this case
correctly, and there were a large number of bugs which caused the
following sequence to result in a BUG_ON:
kernel bug at fs/ext4/resize.c:409!
...
call trace:
[<ffffffff81256768>] ext4_flex_group_add+0x1448/0x1830
[<ffffffff81257de2>] ext4_resize_fs+0x7b2/0xe80
[<ffffffff8123ac50>] ext4_ioctl+0xbf0/0xf00
[<ffffffff811c111d>] do_vfs_ioctl+0x2dd/0x4b0
[<ffffffff811b9df2>] ? final_putname+0x22/0x50
[<ffffffff811c1371>] sys_ioctl+0x81/0xa0
[<ffffffff81676aa9>] system_call_fastpath+0x16/0x1b
code: c8 4c 89 df e8 41 96 f8 ff 44 89 e8 49 01 c4 44 29 6d d4 0
rip [<ffffffff81254fa1>] set_flexbg_block_bitmap+0x171/0x180
This can be reproduced with the following command sequence:
mke2fs -t ext4 -i 4096 /dev/vdd 1G
mount -t ext4 /dev/vdd /vdd
resize2fs /dev/vdd 8G
To fix this, we need to make sure the right thing happens when a block
group's inode table straddles two block groups, which means the
following bugs had to be fixed:
1) Not clearing the BLOCK_UNINIT flag in the second block group in
ext4_alloc_group_tables --- the was proximate cause of the BUG_ON.
2) Incorrectly determining how many block groups contained contiguous
free blocks in ext4_alloc_group_tables().
3) Incorrectly setting the start of the next block range to be marked
in use after a discontinuity in setup_new_flex_group_blocks().
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/ext4/resize.c | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index c5adbb3..69a6261 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -243,6 +243,7 @@ static int ext4_alloc_group_tables(struct super_block *sb,
ext4_group_t group;
ext4_group_t last_group;
unsigned overhead;
+ __u16 uninit_mask = (flexbg_size > 1) ? ~EXT4_BG_BLOCK_UNINIT : ~0;
BUG_ON(flex_gd->count == 0 || group_data == NULL);
@@ -266,7 +267,7 @@ next_group:
src_group++;
for (; src_group <= last_group; src_group++) {
overhead = ext4_group_overhead_blocks(sb, src_group);
- if (overhead != 0)
+ if (overhead == 0)
last_blk += group_data[src_group - group].blocks_count;
else
break;
@@ -280,8 +281,7 @@ next_group:
group = ext4_get_group_number(sb, start_blk - 1);
group -= group_data[0].group;
group_data[group].free_blocks_count--;
- if (flexbg_size > 1)
- flex_gd->bg_flags[group] &= ~EXT4_BG_BLOCK_UNINIT;
+ flex_gd->bg_flags[group] &= uninit_mask;
}
/* Allocate inode bitmaps */
@@ -292,22 +292,30 @@ next_group:
group = ext4_get_group_number(sb, start_blk - 1);
group -= group_data[0].group;
group_data[group].free_blocks_count--;
- if (flexbg_size > 1)
- flex_gd->bg_flags[group] &= ~EXT4_BG_BLOCK_UNINIT;
+ flex_gd->bg_flags[group] &= uninit_mask;
}
/* Allocate inode tables */
for (; it_index < flex_gd->count; it_index++) {
- if (start_blk + EXT4_SB(sb)->s_itb_per_group > last_blk)
+ unsigned int itb = EXT4_SB(sb)->s_itb_per_group;
+ ext4_fsblk_t next_group_start;
+
+ if (start_blk + itb > last_blk)
goto next_group;
group_data[it_index].inode_table = start_blk;
- group = ext4_get_group_number(sb, start_blk - 1);
+ group = ext4_get_group_number(sb, start_blk);
+ next_group_start = ext4_group_first_block_no(sb, group + 1);
group -= group_data[0].group;
- group_data[group].free_blocks_count -=
- EXT4_SB(sb)->s_itb_per_group;
- if (flexbg_size > 1)
- flex_gd->bg_flags[group] &= ~EXT4_BG_BLOCK_UNINIT;
+ if (start_blk + itb > next_group_start) {
+ flex_gd->bg_flags[group + 1] &= uninit_mask;
+ overhead = start_blk + itb - next_group_start;
+ group_data[group + 1].free_blocks_count -= overhead;
+ itb -= overhead;
+ }
+
+ group_data[group].free_blocks_count -= itb;
+ flex_gd->bg_flags[group] &= uninit_mask;
start_blk += EXT4_SB(sb)->s_itb_per_group;
}
@@ -620,7 +628,7 @@ handle_ib:
if (err)
goto out;
count = group_table_count[j];
- start = group_data[i].block_bitmap;
+ start = (&group_data[i].block_bitmap)[j];
block = start;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 037/131] ext4: fix online resize with a non-standard blocks per group setting
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (35 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 036/131] ext4: fix online resize with very large inode tables Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 038/131] powerpc/powernv: Rework EEH reset Luis Henriques
` (93 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Theodore Ts'o, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <tytso@mit.edu>
commit 3d2660d0c9c2f296837078c189b68a47f6b2e3b5 upstream.
The set_flexbg_block_bitmap() function assumed that the number of
blocks in a blockgroup was sb->blocksize * 8, which is normally true,
but not always! Use EXT4_BLOCKS_PER_GROUP(sb) instead, to fix block
bitmap corruption after:
mke2fs -t ext4 -g 3072 -i 4096 /dev/vdd 1G
mount -t ext4 /dev/vdd /vdd
resize2fs /dev/vdd 8G
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/ext4/resize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 69a6261..f3b84cd 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -409,7 +409,7 @@ static int set_flexbg_block_bitmap(struct super_block *sb, handle_t *handle,
start = ext4_group_first_block_no(sb, group);
group -= flex_gd->groups[0].group;
- count2 = sb->s_blocksize * 8 - (block - start);
+ count2 = EXT4_BLOCKS_PER_GROUP(sb) - (block - start);
if (count2 > count)
count2 = count;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 038/131] powerpc/powernv: Rework EEH reset
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (36 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 037/131] ext4: fix online resize with a non-standard blocks per group setting Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 039/131] ext4: don't leave i_crtime.tv_sec uninitialized Luis Henriques
` (92 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Gavin Shan, Benjamin Herrenschmidt, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Gavin Shan <shangw@linux.vnet.ibm.com>
commit 5b2e198e50f6ba57081586b853163ea1bb95f1a8 upstream.
When doing reset in order to recover the affected PE, we issue
hot reset on PE primary bus if it's not root bus. Otherwise, we
issue hot or fundamental reset on root port or PHB accordingly.
For the later case, we didn't cover the situation where PE only
includes root port and it potentially causes kernel crash upon
EEH error to the PE.
The patch reworks the logic of EEH reset to improve the code
readability and also avoid the kernel crash.
Reported-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/powerpc/platforms/powernv/eeh-ioda.c | 29 ++++-------------------------
1 file changed, 4 insertions(+), 25 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/eeh-ioda.c b/arch/powerpc/platforms/powernv/eeh-ioda.c
index 0cd1c4a..d972157 100644
--- a/arch/powerpc/platforms/powernv/eeh-ioda.c
+++ b/arch/powerpc/platforms/powernv/eeh-ioda.c
@@ -470,8 +470,7 @@ static int ioda_eeh_bridge_reset(struct pci_controller *hose,
static int ioda_eeh_reset(struct eeh_pe *pe, int option)
{
struct pci_controller *hose = pe->phb;
- struct eeh_dev *edev;
- struct pci_dev *dev;
+ struct pci_bus *bus;
int ret;
/*
@@ -500,31 +499,11 @@ static int ioda_eeh_reset(struct eeh_pe *pe, int option)
if (pe->type & EEH_PE_PHB) {
ret = ioda_eeh_phb_reset(hose, option);
} else {
- if (pe->type & EEH_PE_DEVICE) {
- /*
- * If it's device PE, we didn't refer to the parent
- * PCI bus yet. So we have to figure it out indirectly.
- */
- edev = list_first_entry(&pe->edevs,
- struct eeh_dev, list);
- dev = eeh_dev_to_pci_dev(edev);
- dev = dev->bus->self;
- } else {
- /*
- * If it's bus PE, the parent PCI bus is already there
- * and just pick it up.
- */
- dev = pe->bus->self;
- }
-
- /*
- * Do reset based on the fact that the direct upstream bridge
- * is root bridge (port) or not.
- */
- if (dev->bus->number == 0)
+ bus = eeh_pe_bus_get(pe);
+ if (pci_is_root_bus(bus))
ret = ioda_eeh_root_reset(hose, option);
else
- ret = ioda_eeh_bridge_reset(hose, dev, option);
+ ret = ioda_eeh_bridge_reset(hose, bus->self, option);
}
return ret;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 039/131] ext4: don't leave i_crtime.tv_sec uninitialized
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (37 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 038/131] powerpc/powernv: Rework EEH reset Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 040/131] ALSA: usb-audio: work around KEF X300A firmware bug Luis Henriques
` (91 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Theodore Ts'o, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <tytso@mit.edu>
commit 19ea80603715d473600cd993b9987bc97d042e02 upstream.
If the i_crtime field is not present in the inode, don't leave the
field uninitialized.
Fixes: ef7f38359 ("ext4: Add nanosecond timestamps")
Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/ext4/ext4.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index caa5e5b..db03437 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -759,6 +759,8 @@ do { \
if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime)) \
(einode)->xtime.tv_sec = \
(signed)le32_to_cpu((raw_inode)->xtime); \
+ else \
+ (einode)->xtime.tv_sec = 0; \
if (EXT4_FITS_IN_INODE(raw_inode, einode, xtime ## _extra)) \
ext4_decode_extra_time(&(einode)->xtime, \
raw_inode->xtime ## _extra); \
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 040/131] ALSA: usb-audio: work around KEF X300A firmware bug
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (38 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 039/131] ext4: don't leave i_crtime.tv_sec uninitialized Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 041/131] avr32: fix missing module.h causing build failure in mimc200/fram.c Luis Henriques
` (90 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Clemens Ladisch, Takashi Iwai, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit 624aef494f86ed0c58056361c06347ad62b26806 upstream.
When the driver tries to access Function Unit 10, the KEF X300A
speakers' firmware apparently locks up, making even PCM streaming
impossible. Work around this by ignoring this FU.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/usb/mixer_maps.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index cc2dd1f..0339d46 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -322,6 +322,11 @@ static struct usbmix_name_map hercules_usb51_map[] = {
{ 0 } /* terminator */
};
+static const struct usbmix_name_map kef_x300a_map[] = {
+ { 10, NULL }, /* firmware locks up (?) when we try to access this FU */
+ { 0 }
+};
+
/*
* Control map entries
*/
@@ -409,6 +414,10 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
.id = USB_ID(0x200c, 0x1018),
.map = ebox44_map,
},
+ {
+ .id = USB_ID(0x27ac, 0x1000),
+ .map = kef_x300a_map,
+ },
{ 0 } /* terminator */
};
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 041/131] avr32: fix missing module.h causing build failure in mimc200/fram.c
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (39 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 040/131] ALSA: usb-audio: work around KEF X300A firmware bug Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 042/131] avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use Luis Henriques
` (89 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Haavard Skinnemoen, Hans-Christian Egtvedt, Paul Gortmaker,
Sergei Trofimovich, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Gortmaker <paul.gortmaker@windriver.com>
commit 5745d6a41a4f4aec29e2ccd591c6fb09ed73a955 upstream.
Causing this:
In file included from arch/avr32/boards/mimc200/fram.c:13:
include/linux/miscdevice.h:51: error: field 'list' has incomplete type
include/linux/miscdevice.h:55: error: expected specifier-qualifier-list before 'mode_t'
arch/avr32/boards/mimc200/fram.c:42: error: 'THIS_MODULE' undeclared here (not in a function)
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/avr32/boards/mimc200/fram.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/avr32/boards/mimc200/fram.c b/arch/avr32/boards/mimc200/fram.c
index 9764a1a..c1466a8 100644
--- a/arch/avr32/boards/mimc200/fram.c
+++ b/arch/avr32/boards/mimc200/fram.c
@@ -11,6 +11,7 @@
#define FRAM_VERSION "1.0"
#include <linux/miscdevice.h>
+#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/mm.h>
#include <linux/io.h>
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 042/131] avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (40 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 041/131] avr32: fix missing module.h causing build failure in mimc200/fram.c Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-08 14:02 ` Chen Gang
2014-03-05 14:22 ` [PATCH 3.11 043/131] ARM: 7957/1: add DSB after icache flush in __flush_icache_all() Luis Henriques
` (88 subsequent siblings)
130 siblings, 1 reply; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Chen Gang, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Gang <gang.chen.5i5j@gmail.com>
commit 8d80390cfc9434d5aa4fb9e5f9768a66b30cb8a6 upstream.
For avr32 cross compiler, do not define '__linux__' internally, so it
will cause issue with allmodconfig.
The related error:
CC [M] fs/coda/psdev.o
In file included from include/linux/coda.h:64,
from fs/coda/psdev.c:45:
include/uapi/linux/coda.h:221: error: expected specifier-qualifier-list before 'u_quad_t'
The related toolchain version (which only download, not re-compile):
[root@gchen linux-next]# /upstream/toolchain/download/avr32-gnu-toolchain-linux_x86/bin/avr32-gcc -v
Using built-in specs.
Target: avr32
Configured with: /data2/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/src/gcc/configure --target=avr32 --host=i686-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-languages=c,c++ --disable-nls --disable-libssp --disable-libstdcxx-pch --with-dwarf2 --enable-version-specific-runtime-libs --disable-shared --enable-doc --with-mpfr-lib=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/lib --with-mpfr-include=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/include --with-gmp=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --with-mpc=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-__cxa_atexit --disable-shared --with-newlib --with-pkgversion=AVR_32_bit_GNU_Toolchain_3.4.2_435 --with-bugurl=http://www
.atmel.com/avr
Thread model: single
gcc version 4.4.7 (AVR_32_bit_GNU_Toolchain_3.4.2_435)
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Acked-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/avr32/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile
index 22fb665..dba48a5 100644
--- a/arch/avr32/Makefile
+++ b/arch/avr32/Makefile
@@ -11,7 +11,7 @@ all: uImage vmlinux.elf
KBUILD_DEFCONFIG := atstk1002_defconfig
-KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
+KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic -D__linux__
KBUILD_AFLAGS += -mrelax -mno-pic
KBUILD_CFLAGS_MODULE += -mno-relax
LDFLAGS_vmlinux += --relax
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 043/131] ARM: 7957/1: add DSB after icache flush in __flush_icache_all()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (41 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 042/131] avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 044/131] drm/nouveau: set irq_enabled manually Luis Henriques
` (87 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Vinayak Kale, Russell King, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Vinayak Kale <vkale@apm.com>
commit 39544ac9df20f73e49fc6b9ac19ff533388c82c0 upstream.
Add DSB after icache flush to complete the cache maintenance operation.
Signed-off-by: Vinayak Kale <vkale@apm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm/include/asm/cacheflush.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index 17d0ae8..a25e62d 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -212,6 +212,7 @@ extern void copy_to_user_page(struct vm_area_struct *, struct page *,
static inline void __flush_icache_all(void)
{
__flush_icache_preferred();
+ dsb();
}
/*
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 044/131] drm/nouveau: set irq_enabled manually
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (42 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 043/131] ARM: 7957/1: add DSB after icache flush in __flush_icache_all() Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 045/131] drm/nv50/disp: use correct register to determine DP display bpp Luis Henriques
` (86 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Ilia Mirkin, Ben Skeggs, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilia Mirkin <imirkin@alum.mit.edu>
commit 7d3428cd4b2ad51af86fdbdf8284ca38fa95e601 upstream.
Since commit 0fa9061ae8c ("drm/nouveau/mc: handle irq-related setup
ourselves"), drm_device->irq_enabled remained unset. This is needed in
order to properly wait for a vblank event in the generic drm code.
See https://bugs.freedesktop.org/show_bug.cgi?id=74195
Reported-by: Jan Janecek <janjanjanx@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/nouveau/nouveau_drm.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 6197266..576009c 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -348,6 +348,8 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags)
if (ret)
goto fail_device;
+ dev->irq_enabled = true;
+
/* workaround an odd issue on nvc1 by disabling the device's
* nosnoop capability. hopefully won't cause issues until a
* better fix is found - assuming there is one...
@@ -435,6 +437,7 @@ nouveau_drm_remove(struct pci_dev *pdev)
struct nouveau_drm *drm = nouveau_drm(dev);
struct nouveau_object *device;
+ dev->irq_enabled = false;
device = drm->client.base.device;
drm_put_dev(dev);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 045/131] drm/nv50/disp: use correct register to determine DP display bpp
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (43 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 044/131] drm/nouveau: set irq_enabled manually Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 046/131] jbd2: fix use after free in jbd2_journal_start_reserved() Luis Henriques
` (85 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Ilia Mirkin, Ben Skeggs, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilia Mirkin <imirkin@alum.mit.edu>
commit a7f1c1e65b68e1e1ab70898528d5977ed68a0a7d upstream.
Commit 0a0afd282f ("drm/nv50-/disp: move DP link training to core and
train from supervisor") added code that uses the wrong register for
computing the display bpp, used for bandwidth calculation. Adjust to use
the same register as used by exec_clkcmp and nv50_disp_intr_unk20_2_dp.
Reported-by: Torsten Wagner <torsten.wagner@gmail.com>
Reported-by: Michael Gulick <mgulick@mathworks.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67628
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
index 7ffe2f3..bcebe96 100644
--- a/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
+++ b/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
@@ -1112,7 +1112,7 @@ nv50_disp_intr_unk20_2(struct nv50_disp_priv *priv, int head)
if (conf != ~0) {
if (outp.location == 0 && outp.type == DCB_OUTPUT_DP) {
u32 soff = (ffs(outp.or) - 1) * 0x08;
- u32 ctrl = nv_rd32(priv, 0x610798 + soff);
+ u32 ctrl = nv_rd32(priv, 0x610794 + soff);
u32 datarate;
switch ((ctrl & 0x000f0000) >> 16) {
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 046/131] jbd2: fix use after free in jbd2_journal_start_reserved()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (44 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 045/131] drm/nv50/disp: use correct register to determine DP display bpp Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 047/131] ACPI / PCI: Fix memory leak in acpi_pci_irq_enable() Luis Henriques
` (84 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Dan Carpenter, Theodore Ts'o, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 92e3b40537707001d17bbad800d150ab04e53bf4 upstream.
If start_this_handle() fails then it leads to a use after free of
"handle".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/jbd2/transaction.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index b0b74e5..7272cc6 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -514,11 +514,13 @@ int jbd2_journal_start_reserved(handle_t *handle, unsigned int type,
* similarly constrained call sites
*/
ret = start_this_handle(journal, handle, GFP_NOFS);
- if (ret < 0)
+ if (ret < 0) {
jbd2_journal_free_reserved(handle);
+ return ret;
+ }
handle->h_type = type;
handle->h_line_no = line_no;
- return ret;
+ return 0;
}
EXPORT_SYMBOL(jbd2_journal_start_reserved);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 047/131] ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (45 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 046/131] jbd2: fix use after free in jbd2_journal_start_reserved() Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 048/131] ahci: disable NCQ on Samsung pci-e SSDs on macbooks Luis Henriques
` (83 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Tomasz Nowicki, Rafael J. Wysocki, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
commit b685f3b1744061aa9ad822548ba9c674de5be7c6 upstream.
acpi_pci_link_allocate_irq() can return negative gsi even if
entry != NULL. For that case we have a memory leak, so free
entry before returning from acpi_pci_irq_enable() for gsi < 0.
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
[rjw: Subject and changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/acpi/pci_irq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 41c5e1b..f658e09 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -432,6 +432,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
pin_name(pin));
}
+ kfree(entry);
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 048/131] ahci: disable NCQ on Samsung pci-e SSDs on macbooks
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (46 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 047/131] ACPI / PCI: Fix memory leak in acpi_pci_irq_enable() Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 049/131] usb: gadget: bcm63xx_udc: fix build failure on DMA channel code Luis Henriques
` (82 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Tejun Heo, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Levente Kurusa <levex@linux.com>
commit 67809f85d31eac600f6b28defa5386c9d2a13b1d upstream.
Samsung's pci-e SSDs with device ID 0x1600 which are found on some
macbooks time out on NCQ commands. Blacklist NCQ on the device so
that the affected machines can at least boot.
Original-patch-by: Levente Kurusa <levex@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60731
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/ata/ahci.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 54bf3f8..75979cd 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -61,6 +61,7 @@ enum board_ids {
/* board IDs by feature in alphabetical order */
board_ahci,
board_ahci_ign_iferr,
+ board_ahci_noncq,
board_ahci_nosntf,
board_ahci_yes_fbs,
@@ -119,6 +120,13 @@ static const struct ata_port_info ahci_port_info[] = {
.udma_mask = ATA_UDMA6,
.port_ops = &ahci_ops,
},
+ [board_ahci_noncq] = {
+ AHCI_HFLAGS (AHCI_HFLAG_NO_NCQ),
+ .flags = AHCI_FLAG_COMMON,
+ .pio_mask = ATA_PIO4,
+ .udma_mask = ATA_UDMA6,
+ .port_ops = &ahci_ops,
+ },
[board_ahci_nosntf] = {
AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF),
.flags = AHCI_FLAG_COMMON,
@@ -450,6 +458,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */
{ PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */
+ /*
+ * Samsung SSDs found on some macbooks. NCQ times out.
+ * https://bugzilla.kernel.org/show_bug.cgi?id=60731
+ */
+ { PCI_VDEVICE(SAMSUNG, 0x1600), board_ahci_noncq },
+
/* Enmotus */
{ PCI_DEVICE(0x1c44, 0x8000), board_ahci },
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 049/131] usb: gadget: bcm63xx_udc: fix build failure on DMA channel code
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (47 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 048/131] ahci: disable NCQ on Samsung pci-e SSDs on macbooks Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 050/131] mei: set client's read_cb to NULL when flow control fails Luis Henriques
` (81 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Kevin Cernekee, Jonas Gorski, Florian Fainelli, Felipe Balbi,
Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Fainelli <florian@openwrt.org>
commit 2d1f7af3d60dd09794e0738a915d272c6c27abc5 upstream.
Commit 3dc6475 ("bcm63xx_enet: add support Broadcom BCM6345 Ethernet")
changed the ENETDMA[CS] macros such that they are no longer macros, but
actual register offset definitions. The bcm63xx_udc driver was not
updated, and as a result, causes the following build error to pop up:
CC drivers/usb/gadget/u_ether.o
drivers/usb/gadget/bcm63xx_udc.c: In function 'iudma_write':
drivers/usb/gadget/bcm63xx_udc.c:642:24: error: called object '0' is not
a function
drivers/usb/gadget/bcm63xx_udc.c: In function 'iudma_reset_channel':
drivers/usb/gadget/bcm63xx_udc.c:698:46: error: called object '0' is not
a function
drivers/usb/gadget/bcm63xx_udc.c:700:49: error: called object '0' is not
a function
Fix this by updating usb_dmac_{read,write}l and usb_dmas_{read,write}l to
take an extra channel argument, and use the channel width
(ENETDMA_CHAN_WIDTH) to offset the register we want to access, hence
doing again what the macro implicitely did for us.
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/usb/gadget/bcm63xx_udc.c | 58 ++++++++++++++++++++++------------------
1 file changed, 32 insertions(+), 26 deletions(-)
diff --git a/drivers/usb/gadget/bcm63xx_udc.c b/drivers/usb/gadget/bcm63xx_udc.c
index fd24cb4..5396709 100644
--- a/drivers/usb/gadget/bcm63xx_udc.c
+++ b/drivers/usb/gadget/bcm63xx_udc.c
@@ -361,24 +361,30 @@ static inline void usb_dma_writel(struct bcm63xx_udc *udc, u32 val, u32 off)
bcm_writel(val, udc->iudma_regs + off);
}
-static inline u32 usb_dmac_readl(struct bcm63xx_udc *udc, u32 off)
+static inline u32 usb_dmac_readl(struct bcm63xx_udc *udc, u32 off, int chan)
{
- return bcm_readl(udc->iudma_regs + IUDMA_DMAC_OFFSET + off);
+ return bcm_readl(udc->iudma_regs + IUDMA_DMAC_OFFSET + off +
+ (ENETDMA_CHAN_WIDTH * chan));
}
-static inline void usb_dmac_writel(struct bcm63xx_udc *udc, u32 val, u32 off)
+static inline void usb_dmac_writel(struct bcm63xx_udc *udc, u32 val, u32 off,
+ int chan)
{
- bcm_writel(val, udc->iudma_regs + IUDMA_DMAC_OFFSET + off);
+ bcm_writel(val, udc->iudma_regs + IUDMA_DMAC_OFFSET + off +
+ (ENETDMA_CHAN_WIDTH * chan));
}
-static inline u32 usb_dmas_readl(struct bcm63xx_udc *udc, u32 off)
+static inline u32 usb_dmas_readl(struct bcm63xx_udc *udc, u32 off, int chan)
{
- return bcm_readl(udc->iudma_regs + IUDMA_DMAS_OFFSET + off);
+ return bcm_readl(udc->iudma_regs + IUDMA_DMAS_OFFSET + off +
+ (ENETDMA_CHAN_WIDTH * chan));
}
-static inline void usb_dmas_writel(struct bcm63xx_udc *udc, u32 val, u32 off)
+static inline void usb_dmas_writel(struct bcm63xx_udc *udc, u32 val, u32 off,
+ int chan)
{
- bcm_writel(val, udc->iudma_regs + IUDMA_DMAS_OFFSET + off);
+ bcm_writel(val, udc->iudma_regs + IUDMA_DMAS_OFFSET + off +
+ (ENETDMA_CHAN_WIDTH * chan));
}
static inline void set_clocks(struct bcm63xx_udc *udc, bool is_enabled)
@@ -639,7 +645,7 @@ static void iudma_write(struct bcm63xx_udc *udc, struct iudma_ch *iudma,
} while (!last_bd);
usb_dmac_writel(udc, ENETDMAC_CHANCFG_EN_MASK,
- ENETDMAC_CHANCFG_REG(iudma->ch_idx));
+ ENETDMAC_CHANCFG_REG, iudma->ch_idx);
}
/**
@@ -695,9 +701,9 @@ static void iudma_reset_channel(struct bcm63xx_udc *udc, struct iudma_ch *iudma)
bcm63xx_fifo_reset_ep(udc, max(0, iudma->ep_num));
/* stop DMA, then wait for the hardware to wrap up */
- usb_dmac_writel(udc, 0, ENETDMAC_CHANCFG_REG(ch_idx));
+ usb_dmac_writel(udc, 0, ENETDMAC_CHANCFG_REG, ch_idx);
- while (usb_dmac_readl(udc, ENETDMAC_CHANCFG_REG(ch_idx)) &
+ while (usb_dmac_readl(udc, ENETDMAC_CHANCFG_REG, ch_idx) &
ENETDMAC_CHANCFG_EN_MASK) {
udelay(1);
@@ -714,10 +720,10 @@ static void iudma_reset_channel(struct bcm63xx_udc *udc, struct iudma_ch *iudma)
dev_warn(udc->dev, "forcibly halting IUDMA channel %d\n",
ch_idx);
usb_dmac_writel(udc, ENETDMAC_CHANCFG_BUFHALT_MASK,
- ENETDMAC_CHANCFG_REG(ch_idx));
+ ENETDMAC_CHANCFG_REG, ch_idx);
}
}
- usb_dmac_writel(udc, ~0, ENETDMAC_IR_REG(ch_idx));
+ usb_dmac_writel(udc, ~0, ENETDMAC_IR_REG, ch_idx);
/* don't leave "live" HW-owned entries for the next guy to step on */
for (d = iudma->bd_ring; d <= iudma->end_bd; d++)
@@ -729,11 +735,11 @@ static void iudma_reset_channel(struct bcm63xx_udc *udc, struct iudma_ch *iudma)
/* set up IRQs, UBUS burst size, and BD base for this channel */
usb_dmac_writel(udc, ENETDMAC_IR_BUFDONE_MASK,
- ENETDMAC_IRMASK_REG(ch_idx));
- usb_dmac_writel(udc, 8, ENETDMAC_MAXBURST_REG(ch_idx));
+ ENETDMAC_IRMASK_REG, ch_idx);
+ usb_dmac_writel(udc, 8, ENETDMAC_MAXBURST_REG, ch_idx);
- usb_dmas_writel(udc, iudma->bd_ring_dma, ENETDMAS_RSTART_REG(ch_idx));
- usb_dmas_writel(udc, 0, ENETDMAS_SRAM2_REG(ch_idx));
+ usb_dmas_writel(udc, iudma->bd_ring_dma, ENETDMAS_RSTART_REG, ch_idx);
+ usb_dmas_writel(udc, 0, ENETDMAS_SRAM2_REG, ch_idx);
}
/**
@@ -2036,7 +2042,7 @@ static irqreturn_t bcm63xx_udc_data_isr(int irq, void *dev_id)
spin_lock(&udc->lock);
usb_dmac_writel(udc, ENETDMAC_IR_BUFDONE_MASK,
- ENETDMAC_IR_REG(iudma->ch_idx));
+ ENETDMAC_IR_REG, iudma->ch_idx);
bep = iudma->bep;
rc = iudma_read(udc, iudma);
@@ -2176,18 +2182,18 @@ static int bcm63xx_iudma_dbg_show(struct seq_file *s, void *p)
seq_printf(s, " [ep%d]:\n",
max_t(int, iudma_defaults[ch_idx].ep_num, 0));
seq_printf(s, " cfg: %08x; irqstat: %08x; irqmask: %08x; maxburst: %08x\n",
- usb_dmac_readl(udc, ENETDMAC_CHANCFG_REG(ch_idx)),
- usb_dmac_readl(udc, ENETDMAC_IR_REG(ch_idx)),
- usb_dmac_readl(udc, ENETDMAC_IRMASK_REG(ch_idx)),
- usb_dmac_readl(udc, ENETDMAC_MAXBURST_REG(ch_idx)));
+ usb_dmac_readl(udc, ENETDMAC_CHANCFG_REG, ch_idx),
+ usb_dmac_readl(udc, ENETDMAC_IR_REG, ch_idx),
+ usb_dmac_readl(udc, ENETDMAC_IRMASK_REG, ch_idx),
+ usb_dmac_readl(udc, ENETDMAC_MAXBURST_REG, ch_idx));
- sram2 = usb_dmas_readl(udc, ENETDMAS_SRAM2_REG(ch_idx));
- sram3 = usb_dmas_readl(udc, ENETDMAS_SRAM3_REG(ch_idx));
+ sram2 = usb_dmas_readl(udc, ENETDMAS_SRAM2_REG, ch_idx);
+ sram3 = usb_dmas_readl(udc, ENETDMAS_SRAM3_REG, ch_idx);
seq_printf(s, " base: %08x; index: %04x_%04x; desc: %04x_%04x %08x\n",
- usb_dmas_readl(udc, ENETDMAS_RSTART_REG(ch_idx)),
+ usb_dmas_readl(udc, ENETDMAS_RSTART_REG, ch_idx),
sram2 >> 16, sram2 & 0xffff,
sram3 >> 16, sram3 & 0xffff,
- usb_dmas_readl(udc, ENETDMAS_SRAM4_REG(ch_idx)));
+ usb_dmas_readl(udc, ENETDMAS_SRAM4_REG, ch_idx));
seq_printf(s, " desc: %d/%d used", iudma->n_bds_used,
iudma->n_bds);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 050/131] mei: set client's read_cb to NULL when flow control fails
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (48 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 049/131] usb: gadget: bcm63xx_udc: fix build failure on DMA channel code Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 051/131] drm/radeon: fix minor typos in si_dpm.c Luis Henriques
` (80 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Chao Bi, Tomas Winkler, Greg Kroah-Hartman, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Chao Bi <chao.bi@intel.com>
commit accb884b32e82f943340688c9cd30290531e73e0 upstream.
In mei_cl_read_start(), if it fails to send flow control request, it
will release "cl->read_cb" but forget to set pointer to NULL, leaving
"cl->read_cb" still pointing to random memory, next time this client is
operated like mei_release(), it has chance to refer to this wrong pointer.
Fixes: PANIC at kfree in mei_release()
[228781.826904] Call Trace:
[228781.829737] [<c16249b8>] ? mei_cl_unlink+0x48/0xa0
[228781.835283] [<c1624487>] mei_io_cb_free+0x17/0x30
[228781.840733] [<c16265d8>] mei_release+0xa8/0x180
[228781.845989] [<c135c610>] ? __fsnotify_parent+0xa0/0xf0
[228781.851925] [<c1325a69>] __fput+0xd9/0x200
[228781.856696] [<c1325b9d>] ____fput+0xd/0x10
[228781.861467] [<c125cae1>] task_work_run+0x81/0xb0
[228781.866821] [<c1242e53>] do_exit+0x283/0xa00
[228781.871786] [<c1a82b36>] ? kprobe_flush_task+0x66/0xc0
[228781.877722] [<c124eeb8>] ? __dequeue_signal+0x18/0x1a0
[228781.883657] [<c124f072>] ? dequeue_signal+0x32/0x190
[228781.889397] [<c1243744>] do_group_exit+0x34/0xa0
[228781.894750] [<c12517b6>] get_signal_to_deliver+0x206/0x610
[228781.901075] [<c12018d8>] do_signal+0x38/0x100
[228781.906136] [<c1626d1c>] ? mei_read+0x42c/0x4e0
[228781.911393] [<c12600a0>] ? wake_up_bit+0x30/0x30
[228781.916745] [<c16268f0>] ? mei_poll+0x120/0x120
[228781.922001] [<c1324be9>] ? vfs_read+0x89/0x160
[228781.927158] [<c16268f0>] ? mei_poll+0x120/0x120
[228781.932414] [<c133ca34>] ? fget_light+0x44/0xe0
[228781.937670] [<c1324e58>] ? SyS_read+0x68/0x80
[228781.942730] [<c12019f5>] do_notify_resume+0x55/0x70
[228781.948376] [<c1a7de5d>] work_notifysig+0x29/0x30
[228781.953827] [<c1a70000>] ? bad_area+0x5/0x3e
Signed-off-by: Chao Bi <chao.bi@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/misc/mei/client.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index d307760..b254132 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -663,7 +663,6 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length)
goto err;
cb->fop_type = MEI_FOP_READ;
- cl->read_cb = cb;
if (dev->hbuf_is_ready) {
dev->hbuf_is_ready = false;
if (mei_hbm_cl_flow_control_req(dev, cl)) {
@@ -674,6 +673,9 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length)
} else {
list_add_tail(&cb->list, &dev->ctrl_wr_list.list);
}
+
+ cl->read_cb = cb;
+
return rets;
err:
mei_io_cb_free(cb);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 051/131] drm/radeon: fix minor typos in si_dpm.c
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (49 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 050/131] mei: set client's read_cb to NULL when flow control fails Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 052/131] drm/radeon/si: fix typo in dpm sq ramping setup Luis Henriques
` (79 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Alex Deucher, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 407b6dfd9afa30cf963fa99bca91870e47965612 upstream.
Copy/paste typos from the ni code. Should not
have any functional change.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/radeon/si_dpm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 1c23b61..e7b41c7 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -2393,7 +2393,7 @@ static int si_populate_sq_ramping_values(struct radeon_device *rdev,
if (SISLANDS_DPM2_SQ_RAMP_STI_SIZE > (STI_SIZE_MASK >> STI_SIZE_SHIFT))
enable_sq_ramping = false;
- if (NISLANDS_DPM2_SQ_RAMP_LTI_RATIO <= (LTI_RATIO_MASK >> LTI_RATIO_SHIFT))
+ if (SISLANDS_DPM2_SQ_RAMP_LTI_RATIO <= (LTI_RATIO_MASK >> LTI_RATIO_SHIFT))
enable_sq_ramping = false;
for (i = 0; i < state->performance_level_count; i++) {
@@ -5375,7 +5375,7 @@ static void si_populate_mc_reg_addresses(struct radeon_device *rdev,
for (i = 0, j = 0; j < si_pi->mc_reg_table.last; j++) {
if (si_pi->mc_reg_table.valid_flag & (1 << j)) {
- if (i >= SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE)
+ if (i >= SMC_SISLANDS_MC_REGISTER_ARRAY_SIZE)
break;
mc_reg_table->address[i].s0 =
cpu_to_be16(si_pi->mc_reg_table.mc_reg_address[j].s0);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 052/131] drm/radeon/si: fix typo in dpm sq ramping setup
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (50 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 051/131] drm/radeon: fix minor typos in si_dpm.c Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 053/131] drm/radeon/ni: " Luis Henriques
` (78 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Alex Deucher, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 5b43c3cd07981619dbdb1fb935ef705a3e80955f upstream.
inverted logic.
Noticed-by: Sylvain BERTRAND <sylware@legeek.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/radeon/si_dpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index e7b41c7..aca8fb4 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -2393,7 +2393,7 @@ static int si_populate_sq_ramping_values(struct radeon_device *rdev,
if (SISLANDS_DPM2_SQ_RAMP_STI_SIZE > (STI_SIZE_MASK >> STI_SIZE_SHIFT))
enable_sq_ramping = false;
- if (SISLANDS_DPM2_SQ_RAMP_LTI_RATIO <= (LTI_RATIO_MASK >> LTI_RATIO_SHIFT))
+ if (SISLANDS_DPM2_SQ_RAMP_LTI_RATIO > (LTI_RATIO_MASK >> LTI_RATIO_SHIFT))
enable_sq_ramping = false;
for (i = 0; i < state->performance_level_count; i++) {
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 053/131] drm/radeon/ni: fix typo in dpm sq ramping setup
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (51 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 052/131] drm/radeon/si: fix typo in dpm sq ramping setup Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 054/131] USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8 Luis Henriques
` (77 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Alex Deucher, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 21ed4947fdfe19b60a27b84162622e56439c7937 upstream.
inverted logic.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/radeon/ni_dpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index 56d0d95..4c64254 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -2567,7 +2567,7 @@ static int ni_populate_sq_ramping_values(struct radeon_device *rdev,
if (NISLANDS_DPM2_SQ_RAMP_STI_SIZE > (STI_SIZE_MASK >> STI_SIZE_SHIFT))
enable_sq_ramping = false;
- if (NISLANDS_DPM2_SQ_RAMP_LTI_RATIO <= (LTI_RATIO_MASK >> LTI_RATIO_SHIFT))
+ if (NISLANDS_DPM2_SQ_RAMP_LTI_RATIO > (LTI_RATIO_MASK >> LTI_RATIO_SHIFT))
enable_sq_ramping = false;
for (i = 0; i < state->performance_level_count; i++) {
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 054/131] USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (52 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 053/131] drm/radeon/ni: " Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 055/131] workqueue: ensure @task is valid across kthread_stop() Luis Henriques
` (76 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Hans-Christoph Schemmel, Christian Schmiedl, Nicolaus Colberg,
David McCullough, Aleksander Morgado, Greg Kroah-Hartman,
Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Aleksander Morgado <aleksander@aleksander.es>
commit 12df84d4a80278a5b1abfec3206795291da52fc9 upstream.
This interface is to be handled by the qmi_wwan driver.
CC: Hans-Christoph Schemmel <hans-christoph.schemmel@gemalto.com>
CC: Christian Schmiedl <christian.schmiedl@gemalto.com>
CC: Nicolaus Colberg <nicolaus.colberg@gemalto.com>
CC: David McCullough <david.mccullough@accelecon.com>
Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/usb/serial/option.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 216d20a..68fc9fe 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1526,7 +1526,8 @@ static const struct usb_device_id option_ids[] = {
/* Cinterion */
{ USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_E) },
{ USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_EU3_P) },
- { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8) },
+ { USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PH8),
+ .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
{ USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_AHXX) },
{ USB_DEVICE(CINTERION_VENDOR_ID, CINTERION_PRODUCT_PLXX),
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 055/131] workqueue: ensure @task is valid across kthread_stop()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (53 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 054/131] USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8 Luis Henriques
@ 2014-03-05 14:22 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 056/131] cgroup: update cgroup_enable_task_cg_lists() to grab siglock Luis Henriques
` (75 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:22 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Lai Jiangshan, Tejun Heo, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Lai Jiangshan <laijs@cn.fujitsu.com>
commit 5bdfff96c69a4d5ab9c49e60abf9e070ecd2acbb upstream.
When a kworker should die, the kworkre is notified through WORKER_DIE
flag instead of kthread_should_stop(). This, IIRC, is primarily to
keep the test synchronized inside worker_pool lock. WORKER_DIE is
first set while holding pool->lock, the lock is dropped and
kthread_stop() is called.
Unfortunately, this means that there's a slight chance that the target
kworker may see WORKER_DIE before kthread_stop() finishes and exits
and frees the target task before or during kthread_stop().
Fix it by pinning the target task before setting WORKER_DIE and
putting it after kthread_stop() is done.
tj: Improved patch description and comment. Moved pinning above
WORKER_DIE for better signify what it's protecting.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
kernel/workqueue.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4235d5e..d06e6e1 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1836,6 +1836,12 @@ static void destroy_worker(struct worker *worker)
if (worker->flags & WORKER_IDLE)
pool->nr_idle--;
+ /*
+ * Once WORKER_DIE is set, the kworker may destroy itself at any
+ * point. Pin to ensure the task stays until we're done with it.
+ */
+ get_task_struct(worker->task);
+
list_del_init(&worker->entry);
worker->flags |= WORKER_DIE;
@@ -1844,6 +1850,7 @@ static void destroy_worker(struct worker *worker)
spin_unlock_irq(&pool->lock);
kthread_stop(worker->task);
+ put_task_struct(worker->task);
kfree(worker);
spin_lock_irq(&pool->lock);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 056/131] cgroup: update cgroup_enable_task_cg_lists() to grab siglock
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (54 preceding siblings ...)
2014-03-05 14:22 ` [PATCH 3.11 055/131] workqueue: ensure @task is valid across kthread_stop() Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 057/131] hwmon: (max1668) Fix writing the minimum temperature Luis Henriques
` (74 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Tejun Heo, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <tj@kernel.org>
commit 532de3fc72adc2a6525c4d53c07bf81e1732083d upstream.
Currently, there's nothing preventing cgroup_enable_task_cg_lists()
from missing set PF_EXITING and race against cgroup_exit(). Depending
on the timing, cgroup_exit() may finish with the task still linked on
css_set leading to list corruption. Fix it by grabbing siglock in
cgroup_enable_task_cg_lists() so that PF_EXITING is guaranteed to be
visible.
This whole on-demand cg_list optimization is extremely fragile and has
ample possibility to lead to bugs which can cause things like
once-a-year oops during boot. I'm wondering whether the better
approach would be just adding "cgroup_disable=all" handling which
disables the whole cgroup rather than tempting fate with this
on-demand craziness.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
kernel/cgroup.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index d22f597..95f16f6 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3014,9 +3014,14 @@ static void cgroup_enable_task_cg_lists(void)
* We should check if the process is exiting, otherwise
* it will race with cgroup_exit() in that the list
* entry won't be deleted though the process has exited.
+ * Do it while holding siglock so that we don't end up
+ * racing against cgroup_exit().
*/
+ spin_lock_irq(&p->sighand->siglock);
if (!(p->flags & PF_EXITING) && list_empty(&p->cg_list))
list_add(&p->cg_list, &task_css_set(p)->tasks);
+ spin_unlock_irq(&p->sighand->siglock);
+
task_unlock(p);
} while_each_thread(g, p);
read_unlock(&tasklist_lock);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 057/131] hwmon: (max1668) Fix writing the minimum temperature
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (55 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 056/131] cgroup: update cgroup_enable_task_cg_lists() to grab siglock Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 058/131] cpufreq: powernow-k8: Initialize per-cpu data-structures properly Luis Henriques
` (73 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Guenter Roeck, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Guenter Roeck <linux@roeck-us.net>
commit 500a91571f0a5d0d3242d83802ea2fd1faccc66e upstream.
When trying to set the minimum temperature, the driver was erroneously
writing the maximum temperature into the chip.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/hwmon/max1668.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/max1668.c b/drivers/hwmon/max1668.c
index a762635..029b65e 100644
--- a/drivers/hwmon/max1668.c
+++ b/drivers/hwmon/max1668.c
@@ -243,7 +243,7 @@ static ssize_t set_temp_min(struct device *dev,
data->temp_min[index] = clamp_val(temp/1000, -128, 127);
if (i2c_smbus_write_byte_data(client,
MAX1668_REG_LIML_WR(index),
- data->temp_max[index]))
+ data->temp_min[index]))
count = -EIO;
mutex_unlock(&data->update_lock);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 058/131] cpufreq: powernow-k8: Initialize per-cpu data-structures properly
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (56 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 057/131] hwmon: (max1668) Fix writing the minimum temperature Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 059/131] ALSA: hda/ca0132 - setup/cleanup streams Luis Henriques
` (72 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Srivatsa S. Bhat, Rafael J. Wysocki, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
commit c3274763bfc3bf1ececa269ed6e6c4d7ec1c3e5e upstream.
The powernow-k8 driver maintains a per-cpu data-structure called
powernow_data that is used to perform the frequency transitions.
It initializes this data structure only for the policy->cpu. So,
accesses to this data structure by other CPUs results in various
problems because they would have been uninitialized.
Specifically, if a cpu (!= policy->cpu) invokes the drivers' ->get()
function, it returns 0 as the KHz value, since its per-cpu memory
doesn't point to anything valid. This causes problems during
suspend/resume since cpufreq_update_policy() tries to enforce this
(0 KHz) as the current frequency of the CPU, and this madness gets
propagated to adjust_jiffies() as well. Eventually, lots of things
start breaking down, including the r8169 ethernet card, in one
particularly interesting case reported by Pierre Ossman.
Fix this by initializing the per-cpu data-structures of all the CPUs
in the policy appropriately.
References: https://bugzilla.kernel.org/show_bug.cgi?id=70311
Reported-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/cpufreq/powernow-k8.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/powernow-k8.c b/drivers/cpufreq/powernow-k8.c
index c39d189..9292f1f 100644
--- a/drivers/cpufreq/powernow-k8.c
+++ b/drivers/cpufreq/powernow-k8.c
@@ -1100,7 +1100,7 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
{
struct powernow_k8_data *data;
struct init_on_cpu init_on_cpu;
- int rc;
+ int rc, cpu;
smp_call_function_single(pol->cpu, check_supported_cpu, &rc, 1);
if (rc)
@@ -1169,7 +1169,9 @@ static int powernowk8_cpu_init(struct cpufreq_policy *pol)
pr_debug("cpu_init done, current fid 0x%x, vid 0x%x\n",
data->currfid, data->currvid);
- per_cpu(powernow_data, pol->cpu) = data;
+ /* Point all the CPUs in this policy to the same data */
+ for_each_cpu(cpu, pol->cpus)
+ per_cpu(powernow_data, cpu) = data;
return 0;
@@ -1184,6 +1186,7 @@ err_out:
static int powernowk8_cpu_exit(struct cpufreq_policy *pol)
{
struct powernow_k8_data *data = per_cpu(powernow_data, pol->cpu);
+ int cpu;
if (!data)
return -EINVAL;
@@ -1194,7 +1197,8 @@ static int powernowk8_cpu_exit(struct cpufreq_policy *pol)
kfree(data->powernow_table);
kfree(data);
- per_cpu(powernow_data, pol->cpu) = NULL;
+ for_each_cpu(cpu, pol->cpus)
+ per_cpu(powernow_data, cpu) = NULL;
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 059/131] ALSA: hda/ca0132 - setup/cleanup streams
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (57 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 058/131] cpufreq: powernow-k8: Initialize per-cpu data-structures properly Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 060/131] ALSA: hda/ca0132 - Fix recording from mode id 0x8 Luis Henriques
` (71 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Hsin-Yu Chao, Takashi Iwai, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Hsin-Yu Chao <hychao@chromium.org>
commit 28fba95087a7f3d107a3a6728aef7dbfaf3fd782 upstream.
When a HDMI stream is opened with the same stream tag
as a following opened stream to ca0132, audio will be
heard from two ports simultaneously.
Fix this issue by change to use snd_hda_codec_setup_stream
and snd_hda_codec_cleanup_stream instead, so that an
inactive stream can be marked as 'dirty' when found
with a conflict stream tag, and then get purified.
Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/pci/hda/patch_ca0132.c | 66 +++++---------------------------------------
1 file changed, 7 insertions(+), 59 deletions(-)
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 6e9876f..1e1e4b2 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -2662,60 +2662,6 @@ static bool dspload_wait_loaded(struct hda_codec *codec)
}
/*
- * PCM stuffs
- */
-static void ca0132_setup_stream(struct hda_codec *codec, hda_nid_t nid,
- u32 stream_tag,
- int channel_id, int format)
-{
- unsigned int oldval, newval;
-
- if (!nid)
- return;
-
- snd_printdd(
- "ca0132_setup_stream: NID=0x%x, stream=0x%x, "
- "channel=%d, format=0x%x\n",
- nid, stream_tag, channel_id, format);
-
- /* update the format-id if changed */
- oldval = snd_hda_codec_read(codec, nid, 0,
- AC_VERB_GET_STREAM_FORMAT,
- 0);
- if (oldval != format) {
- msleep(20);
- snd_hda_codec_write(codec, nid, 0,
- AC_VERB_SET_STREAM_FORMAT,
- format);
- }
-
- oldval = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0);
- newval = (stream_tag << 4) | channel_id;
- if (oldval != newval) {
- snd_hda_codec_write(codec, nid, 0,
- AC_VERB_SET_CHANNEL_STREAMID,
- newval);
- }
-}
-
-static void ca0132_cleanup_stream(struct hda_codec *codec, hda_nid_t nid)
-{
- unsigned int val;
-
- if (!nid)
- return;
-
- snd_printdd(KERN_INFO "ca0132_cleanup_stream: NID=0x%x\n", nid);
-
- val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0);
- if (!val)
- return;
-
- snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_STREAM_FORMAT, 0);
- snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_CHANNEL_STREAMID, 0);
-}
-
-/*
* PCM callbacks
*/
static int ca0132_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
@@ -2726,7 +2672,7 @@ static int ca0132_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
{
struct ca0132_spec *spec = codec->spec;
- ca0132_setup_stream(codec, spec->dacs[0], stream_tag, 0, format);
+ snd_hda_codec_setup_stream(codec, spec->dacs[0], stream_tag, 0, format);
return 0;
}
@@ -2745,7 +2691,7 @@ static int ca0132_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
if (spec->effects_switch[PLAY_ENHANCEMENT - EFFECT_START_NID])
msleep(50);
- ca0132_cleanup_stream(codec, spec->dacs[0]);
+ snd_hda_codec_cleanup_stream(codec, spec->dacs[0]);
return 0;
}
@@ -2824,8 +2770,8 @@ static int ca0132_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
{
struct ca0132_spec *spec = codec->spec;
- ca0132_setup_stream(codec, spec->adcs[substream->number],
- stream_tag, 0, format);
+ snd_hda_codec_setup_stream(codec, spec->adcs[substream->number],
+ stream_tag, 0, format);
return 0;
}
@@ -2839,7 +2785,7 @@ static int ca0132_capture_pcm_cleanup(struct hda_pcm_stream *hinfo,
if (spec->dsp_state == DSP_DOWNLOADING)
return 0;
- ca0132_cleanup_stream(codec, hinfo->nid);
+ snd_hda_codec_cleanup_stream(codec, hinfo->nid);
return 0;
}
@@ -4742,6 +4688,8 @@ static int patch_ca0132(struct hda_codec *codec)
return err;
codec->patch_ops = ca0132_patch_ops;
+ codec->pcm_format_first = 1;
+ codec->no_sticky_stream = 1;
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 060/131] ALSA: hda/ca0132 - Fix recording from mode id 0x8
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (58 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 059/131] ALSA: hda/ca0132 - setup/cleanup streams Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 061/131] ACPI / video: Filter the _BCL table for duplicate brightness values Luis Henriques
` (70 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Hsin-Yu Chao, Takashi Iwai, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Hsin-Yu Chao <hychao@chromium.org>
commit 13c12dbe3a2ce17227f7ddef652b6a53c78fa51f upstream.
Incorrect ADC is picked in ca0132_capture_pcm_prepare(),
where it assumes multiple streams while there is one stream
per ADC. Note that ca0132_capture_pcm_cleanup() already does
the right thing.
The Chromebook Pixel has a microphone under the keyboard that
is attached to node id 0x8. Before this fix, recording would
always go to the main internal mic (node id 0x7).
Signed-off-by: Hsin-Yu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/pci/hda/patch_ca0132.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 1e1e4b2..a91ad74 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -2768,9 +2768,7 @@ static int ca0132_capture_pcm_prepare(struct hda_pcm_stream *hinfo,
unsigned int format,
struct snd_pcm_substream *substream)
{
- struct ca0132_spec *spec = codec->spec;
-
- snd_hda_codec_setup_stream(codec, spec->adcs[substream->number],
+ snd_hda_codec_setup_stream(codec, hinfo->nid,
stream_tag, 0, format);
return 0;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 061/131] ACPI / video: Filter the _BCL table for duplicate brightness values
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (59 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 060/131] ALSA: hda/ca0132 - Fix recording from mode id 0x8 Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 062/131] ALSA: hda - Enable front audio jacks on one HP desktop model Luis Henriques
` (69 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Hans de Goede, Rafael J. Wysocki, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <hdegoede@redhat.com>
commit bd8ba20597f0cfef3ef65c3fd2aa92ab23d4c8e1 upstream.
Some devices have duplicate entries in there brightness levels table, ie
on my Dell Latitude E6430 the table looks like this:
[ 3.686060] acpi backlight index 0, val 80
[ 3.686095] acpi backlight index 1, val 50
[ 3.686122] acpi backlight index 2, val 5
[ 3.686147] acpi backlight index 3, val 5
[ 3.686172] acpi backlight index 4, val 5
[ 3.686197] acpi backlight index 5, val 5
[ 3.686223] acpi backlight index 6, val 5
[ 3.686248] acpi backlight index 7, val 5
[ 3.686273] acpi backlight index 8, val 6
[ 3.686332] acpi backlight index 9, val 7
[ 3.686356] acpi backlight index 10, val 8
[ 3.686380] acpi backlight index 11, val 9
etc.
Notice that brightness values 0-5 are all mapped to 5. This means that
if userspace writes any value between 0 and 5 to the brightness sysfs attribute
and then reads it, it will always return 0, which is somewhat unexpected.
This is a problem for ie gnome-settings-daemon, which uses read-modify-write
logic when the users presses the brightness up or down keys. This is done
this way to take brightness changes from other sources into account.
On this specific laptop what happens once the brightness has been set to 0,
is that gsd reads 0, adds 5, writes 5, and on the next brightness up key press
again reads 0, so things get stuck at the lowest brightness setting.
Filtering out the duplicate table entries, makes any write to brightness
read back as the written value as one would expect, fixing this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/acpi/video.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 28e5184..e37996d 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -735,6 +735,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
union acpi_object *o;
struct acpi_video_device_brightness *br = NULL;
int result = -EINVAL;
+ u32 value;
if (!ACPI_SUCCESS(acpi_video_device_lcd_query_levels(device, &obj))) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Could not query available "
@@ -765,7 +766,12 @@ acpi_video_init_brightness(struct acpi_video_device *device)
printk(KERN_ERR PREFIX "Invalid data\n");
continue;
}
- br->levels[count] = (u32) o->integer.value;
+ value = (u32) o->integer.value;
+ /* Skip duplicate entries */
+ if (count > 2 && br->levels[count - 1] == value)
+ continue;
+
+ br->levels[count] = value;
if (br->levels[count] > max_level)
max_level = br->levels[count];
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 062/131] ALSA: hda - Enable front audio jacks on one HP desktop model
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (60 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 061/131] ACPI / video: Filter the _BCL table for duplicate brightness values Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 063/131] usb: chipidea: need to mask when writting endptflush and endptprime Luis Henriques
` (68 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: David Henningsson, Hui Wang, Takashi Iwai, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Hui Wang <hui.wang@canonical.com>
commit 1de7ca5e844866f56bebb2fc47fa18e090677e88 upstream.
The front headphone and mic jackes on a HP desktop model (Vendor Id:
0x111d76c7 Subsystem Id: 0x103c2b17) can not work, the codec on this
machine has 8 physical ports, 6 of them are routed to rear jackes
and all of them work very well, while the remaining 2 ports are
routed to front headphone and mic jackes, but the corresponding
pin complex node are not defined correctly.
After apply this fix, the front audio jackes can work very well.
[trivial fix of enum definition by tiwai]
BugLink: https://bugs.launchpad.net/bugs/1282369
Cc: David Henningsson <david.henningsson@canonical.com>
Tested-by: Gerald Yang <gerald.yang@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/pci/hda/patch_sigmatel.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 6d1924c..5c005d4 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -83,6 +83,7 @@ enum {
STAC_DELL_M6_BOTH,
STAC_DELL_EQ,
STAC_ALIENWARE_M17X,
+ STAC_92HD89XX_HP_FRONT_JACK,
STAC_92HD73XX_MODELS
};
@@ -1775,6 +1776,12 @@ static const struct hda_pintbl intel_dg45id_pin_configs[] = {
{}
};
+static const struct hda_pintbl stac92hd89xx_hp_front_jack_pin_configs[] = {
+ { 0x0a, 0x02214030 },
+ { 0x0b, 0x02A19010 },
+ {}
+};
+
static void stac92hd73xx_fixup_ref(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -1893,6 +1900,10 @@ static const struct hda_fixup stac92hd73xx_fixups[] = {
[STAC_92HD73XX_NO_JD] = {
.type = HDA_FIXUP_FUNC,
.v.func = stac92hd73xx_fixup_no_jd,
+ },
+ [STAC_92HD89XX_HP_FRONT_JACK] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = stac92hd89xx_hp_front_jack_pin_configs,
}
};
@@ -1953,6 +1964,8 @@ static const struct snd_pci_quirk stac92hd73xx_fixup_tbl[] = {
"Alienware M17x", STAC_ALIENWARE_M17X),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0490,
"Alienware M17x R3", STAC_DELL_EQ),
+ SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x2b17,
+ "unknown HP", STAC_92HD89XX_HP_FRONT_JACK),
{} /* terminator */
};
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 063/131] usb: chipidea: need to mask when writting endptflush and endptprime
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (61 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 062/131] ALSA: hda - Enable front audio jacks on one HP desktop model Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 064/131] irqchip: orion: Fix getting generic chip pointer Luis Henriques
` (67 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Peter Chen, Matthieu CASTET, Greg Kroah-Hartman, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Matthieu CASTET <matthieu.castet@parrot.com>
commit 5bf5dbeda2454296f1984adfbfc8e6f5965ac389 upstream.
ENDPTFLUSH and ENDPTPRIME registers are set by software and clear
by hardware. There is a bit for each endpoint. When we are setting
a bit for an endpoint we should make sure we do not touch other
endpoint bit. There is a race condition if the hardware clear the
bit between the read and the write in hw_write.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Tested-by: Michael Grzeschik <mgrzeschik@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/usb/chipidea/udc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 3a223a8..b13fc29 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -103,7 +103,7 @@ static int hw_ep_flush(struct ci_hdrc *ci, int num, int dir)
do {
/* flush any pending transfer */
- hw_write(ci, OP_ENDPTFLUSH, BIT(n), BIT(n));
+ hw_write(ci, OP_ENDPTFLUSH, ~0, BIT(n));
while (hw_read(ci, OP_ENDPTFLUSH, BIT(n)))
cpu_relax();
} while (hw_read(ci, OP_ENDPTSTAT, BIT(n)));
@@ -203,7 +203,7 @@ static int hw_ep_prime(struct ci_hdrc *ci, int num, int dir, int is_ctrl)
if (is_ctrl && dir == RX && hw_read(ci, OP_ENDPTSETUPSTAT, BIT(num)))
return -EAGAIN;
- hw_write(ci, OP_ENDPTPRIME, BIT(n), BIT(n));
+ hw_write(ci, OP_ENDPTPRIME, ~0, BIT(n));
while (hw_read(ci, OP_ENDPTPRIME, BIT(n)))
cpu_relax();
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 064/131] irqchip: orion: Fix getting generic chip pointer.
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (62 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 063/131] usb: chipidea: need to mask when writting endptflush and endptprime Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 065/131] staging: binder: Fix death notifications Luis Henriques
` (66 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Andrew Lunn, Jason Cooper, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Lunn <andrew@lunn.ch>
commit d86e9af6336c0ad586a5dbd70064253d40bbb5ff upstream.
Enabling SPARSE_IRQ shows up a bug in the irq-orion bridge interrupt
handler. The bridge interrupt is implemented using a single generic
chip. Thus the parameter passed to irq_get_domain_generic_chip()
should always be zero.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Fixes: 9dbd90f17e4f ("irqchip: Add support for Marvell Orion SoCs")
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/irqchip/irq-orion.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index 0dfdc5c..8e41be6 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -111,7 +111,8 @@ IRQCHIP_DECLARE(orion_intc, "marvell,orion-intc", orion_irq_init);
static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc *desc)
{
struct irq_domain *d = irq_get_handler_data(irq);
- struct irq_chip_generic *gc = irq_get_domain_generic_chip(d, irq);
+
+ struct irq_chip_generic *gc = irq_get_domain_generic_chip(d, 0);
u32 stat = readl_relaxed(gc->reg_base + ORION_BRIDGE_IRQ_CAUSE) &
gc->mask_cache;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 065/131] staging: binder: Fix death notifications
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (63 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 064/131] irqchip: orion: Fix getting generic chip pointer Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 066/131] perf: Enforce 1 as lower limit for perf_event_max_sample_rate Luis Henriques
` (65 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Colin Cross, Android Kernel Team, Arve Hjønnevåg,
John Stultz, Jeremy Compostella, Greg Kroah-Hartman,
Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com>
commit e194fd8a5d8e0a7eeed239a8534460724b62fe2d upstream.
The change (008fa749e0fe5b2fffd20b7fe4891bb80d072c6a) that moved the
node release code to a separate function broke death notifications in
some cases. When it encountered a reference without a death
notification request, it would skip looking at the remaining
references, and therefore fail to send death notifications for them.
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/staging/android/binder.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c
index 119d486..8b986af 100644
--- a/drivers/staging/android/binder.c
+++ b/drivers/staging/android/binder.c
@@ -2903,7 +2903,7 @@ static int binder_node_release(struct binder_node *node, int refs)
refs++;
if (!ref->death)
- goto out;
+ continue;
death++;
@@ -2916,7 +2916,6 @@ static int binder_node_release(struct binder_node *node, int refs)
BUG();
}
-out:
binder_debug(BINDER_DEBUG_DEAD_BINDER,
"node %d now dead, refs %d, death %d\n",
node->debug_id, refs, death);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 066/131] perf: Enforce 1 as lower limit for perf_event_max_sample_rate
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (64 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 065/131] staging: binder: Fix death notifications Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 067/131] 6lowpan: fix lockdep splats Luis Henriques
` (64 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Knut Petersen, Peter Zijlstra, Ingo Molnar, Weng Meiling,
Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Knut Petersen <Knut_Petersen@t-online.de>
commit 723478c8a471403c53cf144999701f6e0c4bbd11 upstream.
/proc/sys/kernel/perf_event_max_sample_rate will accept
negative values as well as 0.
Negative values are unreasonable, and 0 causes a
divide by zero exception in perf_proc_update_handler.
This patch enforces a lower limit of 1.
Signed-off-by: Knut Petersen <Knut_Petersen@t-online.de>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/5242DB0C.4070005@t-online.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
kernel/events/core.c | 2 +-
kernel/sysctl.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f86599e..fc645f1 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -192,7 +192,7 @@ int perf_proc_update_handler(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
- int ret = proc_dointvec(table, write, buffer, lenp, ppos);
+ int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
if (ret || !write)
return ret;
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 07f6fc4..f252045 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1049,6 +1049,7 @@ static struct ctl_table kern_table[] = {
.maxlen = sizeof(sysctl_perf_event_sample_rate),
.mode = 0644,
.proc_handler = perf_proc_update_handler,
+ .extra1 = &one,
},
{
.procname = "perf_cpu_time_max_percent",
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 067/131] 6lowpan: fix lockdep splats
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (65 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 066/131] perf: Enforce 1 as lower limit for perf_event_max_sample_rate Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 068/131] can: add destructor for self generated skbs Luis Henriques
` (63 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Eric Dumazet, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
commit 20e7c4e80dcd01dad5e6c8b32455228b8fe9c619 upstream.
When a device ndo_start_xmit() calls again dev_queue_xmit(),
lockdep can complain because dev_queue_xmit() is re-entered and the
spinlocks protecting tx queues share a common lockdep class.
Same issue was fixed for bonding/l2tp/ppp in commits
0daa2303028a6 ("[PATCH] bonding: lockdep annotation")
49ee49202b4ac ("bonding: set qdisc_tx_busylock to avoid LOCKDEP splat")
23d3b8bfb8eb2 ("net: qdisc busylock needs lockdep annotations ")
303c07db487be ("ppp: set qdisc_tx_busylock to avoid LOCKDEP splat ")
Reported-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/ieee802154/6lowpan.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index a47f582..e3eef6f 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -1173,7 +1173,27 @@ static struct header_ops lowpan_header_ops = {
.create = lowpan_header_create,
};
+static struct lock_class_key lowpan_tx_busylock;
+static struct lock_class_key lowpan_netdev_xmit_lock_key;
+
+static void lowpan_set_lockdep_class_one(struct net_device *dev,
+ struct netdev_queue *txq,
+ void *_unused)
+{
+ lockdep_set_class(&txq->_xmit_lock,
+ &lowpan_netdev_xmit_lock_key);
+}
+
+
+static int lowpan_dev_init(struct net_device *dev)
+{
+ netdev_for_each_tx_queue(dev, lowpan_set_lockdep_class_one, NULL);
+ dev->qdisc_tx_busylock = &lowpan_tx_busylock;
+ return 0;
+}
+
static const struct net_device_ops lowpan_netdev_ops = {
+ .ndo_init = lowpan_dev_init,
.ndo_start_xmit = lowpan_xmit,
.ndo_set_mac_address = lowpan_set_address,
};
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 068/131] can: add destructor for self generated skbs
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (66 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 067/131] 6lowpan: fix lockdep splats Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 069/131] ipv4: Fix runtime WARNING in rtmsg_ifa() Luis Henriques
` (62 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Oliver Hartkopp, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Hartkopp <socketcan@hartkopp.net>
commit 0ae89beb283a0db5980d1d4781c7d7be2f2810d6 upstream.
Self generated skbuffs in net/can/bcm.c are setting a skb->sk reference but
no explicit destructor which is enforced since Linux 3.11 with commit
376c7311bdb6 (net: add a temporary sanity check in skb_orphan()).
This patch adds some helper functions to make sure that a destructor is
properly defined when a sock reference is assigned to a CAN related skb.
To create an unshared skb owned by the original sock a common helper function
has been introduced to replace open coded functions to create CAN echo skbs.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Andre Naujoks <nautsch2@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/can/dev.c | 15 +++------------
drivers/net/can/janz-ican3.c | 18 ++++--------------
drivers/net/can/vcan.c | 9 ++++-----
include/linux/can/skb.h | 38 ++++++++++++++++++++++++++++++++++++++
net/can/af_can.c | 3 ++-
net/can/bcm.c | 4 ++--
6 files changed, 53 insertions(+), 34 deletions(-)
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 1870c47..539239d 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -324,19 +324,10 @@ void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
}
if (!priv->echo_skb[idx]) {
- struct sock *srcsk = skb->sk;
- if (atomic_read(&skb->users) != 1) {
- struct sk_buff *old_skb = skb;
-
- skb = skb_clone(old_skb, GFP_ATOMIC);
- kfree_skb(old_skb);
- if (!skb)
- return;
- } else
- skb_orphan(skb);
-
- skb->sk = srcsk;
+ skb = can_create_echo_skb(skb);
+ if (!skb)
+ return;
/* make settings for echo to reduce code in irq context */
skb->protocol = htons(ETH_P_CAN);
diff --git a/drivers/net/can/janz-ican3.c b/drivers/net/can/janz-ican3.c
index 36bd6fa..db2ff03 100644
--- a/drivers/net/can/janz-ican3.c
+++ b/drivers/net/can/janz-ican3.c
@@ -19,6 +19,7 @@
#include <linux/netdevice.h>
#include <linux/can.h>
#include <linux/can/dev.h>
+#include <linux/can/skb.h>
#include <linux/can/error.h>
#include <linux/mfd/janz.h>
@@ -1134,20 +1135,9 @@ static void ican3_handle_message(struct ican3_dev *mod, struct ican3_msg *msg)
*/
static void ican3_put_echo_skb(struct ican3_dev *mod, struct sk_buff *skb)
{
- struct sock *srcsk = skb->sk;
-
- if (atomic_read(&skb->users) != 1) {
- struct sk_buff *old_skb = skb;
-
- skb = skb_clone(old_skb, GFP_ATOMIC);
- kfree_skb(old_skb);
- if (!skb)
- return;
- } else {
- skb_orphan(skb);
- }
-
- skb->sk = srcsk;
+ skb = can_create_echo_skb(skb);
+ if (!skb)
+ return;
/* save this skb for tx interrupt echo handling */
skb_queue_tail(&mod->echoq, skb);
diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c
index 0a2a5ee..4e94057 100644
--- a/drivers/net/can/vcan.c
+++ b/drivers/net/can/vcan.c
@@ -46,6 +46,7 @@
#include <linux/if_ether.h>
#include <linux/can.h>
#include <linux/can/dev.h>
+#include <linux/can/skb.h>
#include <linux/slab.h>
#include <net/rtnetlink.h>
@@ -109,25 +110,23 @@ static netdev_tx_t vcan_tx(struct sk_buff *skb, struct net_device *dev)
stats->rx_packets++;
stats->rx_bytes += cfd->len;
}
- kfree_skb(skb);
+ consume_skb(skb);
return NETDEV_TX_OK;
}
/* perform standard echo handling for CAN network interfaces */
if (loop) {
- struct sock *srcsk = skb->sk;
- skb = skb_share_check(skb, GFP_ATOMIC);
+ skb = can_create_echo_skb(skb);
if (!skb)
return NETDEV_TX_OK;
/* receive with packet counting */
- skb->sk = srcsk;
vcan_rx(skb, dev);
} else {
/* no looped packets => no counting */
- kfree_skb(skb);
+ consume_skb(skb);
}
return NETDEV_TX_OK;
}
diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h
index 2f0543f..f9bbbb4 100644
--- a/include/linux/can/skb.h
+++ b/include/linux/can/skb.h
@@ -11,7 +11,9 @@
#define CAN_SKB_H
#include <linux/types.h>
+#include <linux/skbuff.h>
#include <linux/can.h>
+#include <net/sock.h>
/*
* The struct can_skb_priv is used to transport additional information along
@@ -42,4 +44,40 @@ static inline void can_skb_reserve(struct sk_buff *skb)
skb_reserve(skb, sizeof(struct can_skb_priv));
}
+static inline void can_skb_destructor(struct sk_buff *skb)
+{
+ sock_put(skb->sk);
+}
+
+static inline void can_skb_set_owner(struct sk_buff *skb, struct sock *sk)
+{
+ if (sk) {
+ sock_hold(sk);
+ skb->destructor = can_skb_destructor;
+ skb->sk = sk;
+ }
+}
+
+/*
+ * returns an unshared skb owned by the original sock to be echo'ed back
+ */
+static inline struct sk_buff *can_create_echo_skb(struct sk_buff *skb)
+{
+ if (skb_shared(skb)) {
+ struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);
+
+ if (likely(nskb)) {
+ can_skb_set_owner(nskb, skb->sk);
+ consume_skb(skb);
+ return nskb;
+ } else {
+ kfree_skb(skb);
+ return NULL;
+ }
+ }
+
+ /* we can assume to have an unshared skb with proper owner */
+ return skb;
+}
+
#endif /* CAN_SKB_H */
diff --git a/net/can/af_can.c b/net/can/af_can.c
index 3ab8dd2..ae3f07e 100644
--- a/net/can/af_can.c
+++ b/net/can/af_can.c
@@ -57,6 +57,7 @@
#include <linux/skbuff.h>
#include <linux/can.h>
#include <linux/can/core.h>
+#include <linux/can/skb.h>
#include <linux/ratelimit.h>
#include <net/net_namespace.h>
#include <net/sock.h>
@@ -290,7 +291,7 @@ int can_send(struct sk_buff *skb, int loop)
return -ENOMEM;
}
- newskb->sk = skb->sk;
+ can_skb_set_owner(newskb, skb->sk);
newskb->ip_summed = CHECKSUM_UNNECESSARY;
newskb->pkt_type = PACKET_BROADCAST;
}
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 46f20bf..b57452a 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -268,7 +268,7 @@ static void bcm_can_tx(struct bcm_op *op)
/* send with loopback */
skb->dev = dev;
- skb->sk = op->sk;
+ can_skb_set_owner(skb, op->sk);
can_send(skb, 1);
/* update statistics */
@@ -1223,7 +1223,7 @@ static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk)
can_skb_prv(skb)->ifindex = dev->ifindex;
skb->dev = dev;
- skb->sk = sk;
+ can_skb_set_owner(skb, sk);
err = can_send(skb, 1); /* send with loopback */
dev_put(dev);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 069/131] ipv4: Fix runtime WARNING in rtmsg_ifa()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (67 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 068/131] can: add destructor for self generated skbs Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 070/131] net: fix 'ip rule' iif/oif device rename Luis Henriques
` (61 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Geert Uytterhoeven, Cong Wang, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <geert@linux-m68k.org>
commit 63b5f152eb4a5bb79b9caf7ec37b4201d12f6e66 upstream.
On m68k/ARAnyM:
WARNING: CPU: 0 PID: 407 at net/ipv4/devinet.c:1599 0x316a99()
Modules linked in:
CPU: 0 PID: 407 Comm: ifconfig Not tainted
3.13.0-atari-09263-g0c71d68014d1 #1378
Stack from 10c4fdf0:
10c4fdf0 002ffabb 000243e8 00000000 008ced6c 00024416 00316a99 0000063f
00316a99 00000009 00000000 002501b4 00316a99 0000063f c0a86117 00000080
c0a86117 00ad0c90 00250a5a 00000014 00ad0c90 00000000 00000000 00000001
00b02dd0 00356594 00000000 00356594 c0a86117 eff6c9e4 008ced6c 00000002
008ced60 0024f9b4 00250b52 00ad0c90 00000000 00000000 00252390 00ad0c90
eff6c9e4 0000004f 00000000 00000000 eff6c9e4 8000e25c eff6c9e4 80001020
Call Trace: [<000243e8>] warn_slowpath_common+0x52/0x6c
[<00024416>] warn_slowpath_null+0x14/0x1a
[<002501b4>] rtmsg_ifa+0xdc/0xf0
[<00250a5a>] __inet_insert_ifa+0xd6/0x1c2
[<0024f9b4>] inet_abc_len+0x0/0x42
[<00250b52>] inet_insert_ifa+0xc/0x12
[<00252390>] devinet_ioctl+0x2ae/0x5d6
Adding some debugging code reveals that net_fill_ifaddr() fails in
put_cacheinfo(skb, ifa->ifa_cstamp, ifa->ifa_tstamp,
preferred, valid))
nla_put complains:
lib/nlattr.c:454: skb_tailroom(skb) = 12, nla_total_size(attrlen) = 20
Apparently commit 5c766d642bcaffd0c2a5b354db2068515b3846cf ("ipv4:
introduce address lifetime") forgot to take into account the addition of
struct ifa_cacheinfo in inet_nlmsg_size(). Hence add it, like is already
done for ipv6.
Suggested-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ luis: backported to 3.11: used davem's backport to 3.10 ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/ipv4/devinet.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 34ca6d5..d281cb8 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -1434,7 +1434,8 @@ static size_t inet_nlmsg_size(void)
+ nla_total_size(4) /* IFA_ADDRESS */
+ nla_total_size(4) /* IFA_LOCAL */
+ nla_total_size(4) /* IFA_BROADCAST */
- + nla_total_size(IFNAMSIZ); /* IFA_LABEL */
+ + nla_total_size(IFNAMSIZ) /* IFA_LABEL */
+ + nla_total_size(sizeof(struct ifa_cacheinfo)); /* IFA_CACHEINFO */
}
static inline u32 cstamp_delta(unsigned long cstamp)
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 070/131] net: fix 'ip rule' iif/oif device rename
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (68 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 069/131] ipv4: Fix runtime WARNING in rtmsg_ifa() Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 071/131] netpoll: fix netconsole IPv6 setup Luis Henriques
` (60 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Maciej Żenczykowski, Willem de Bruijn, Eric Dumazet,
Chris Davis, Carlo Contavalli, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?Maciej=20=C5=BBenczykowski?= <maze@google.com>
commit 946c032e5a53992ea45e062ecb08670ba39b99e3 upstream.
ip rules with iif/oif references do not update:
(detach/attach) across interface renames.
Signed-off-by: Maciej Żenczykowski <maze@google.com>
CC: Willem de Bruijn <willemb@google.com>
CC: Eric Dumazet <edumazet@google.com>
CC: Chris Davis <chrismd@google.com>
CC: Carlo Contavalli <ccontavalli@google.com>
Google-Bug-Id: 12936021
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/core/fib_rules.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c
index b1cd856..2631add 100644
--- a/net/core/fib_rules.c
+++ b/net/core/fib_rules.c
@@ -720,6 +720,13 @@ static int fib_rules_event(struct notifier_block *this, unsigned long event,
attach_rules(&ops->rules_list, dev);
break;
+ case NETDEV_CHANGENAME:
+ list_for_each_entry(ops, &net->rules_ops, list) {
+ detach_rules(&ops->rules_list, dev);
+ attach_rules(&ops->rules_list, dev);
+ }
+ break;
+
case NETDEV_UNREGISTER:
list_for_each_entry(ops, &net->rules_ops, list)
detach_rules(&ops->rules_list, dev);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 071/131] netpoll: fix netconsole IPv6 setup
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (69 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 070/131] net: fix 'ip rule' iif/oif device rename Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 072/131] net: qmi_wwan: add Netgear Aircard 340U Luis Henriques
` (59 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Sabrina Dubroca, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Sabrina Dubroca <sd@queasysnail.net>
commit 00fe11b3c67dc670fe6391d22f1fe64e7c99a8ec upstream.
Currently, to make netconsole start over IPv6, the source address
needs to be specified. Without a source address, netpoll_parse_options
assumes we're setting up over IPv4 and the destination IPv6 address is
rejected.
Check if the IP version has been forced by a source address before
checking for a version mismatch when parsing the destination address.
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/core/netpoll.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 0c1482c..462cdc9 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -943,6 +943,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
{
char *cur=opt, *delim;
int ipv6;
+ bool ipversion_set = false;
if (*cur != '@') {
if ((delim = strchr(cur, '@')) == NULL)
@@ -955,6 +956,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
cur++;
if (*cur != '/') {
+ ipversion_set = true;
if ((delim = strchr(cur, '/')) == NULL)
goto parse_failed;
*delim = 0;
@@ -997,7 +999,7 @@ int netpoll_parse_options(struct netpoll *np, char *opt)
ipv6 = netpoll_parse_ip_addr(cur, &np->remote_ip);
if (ipv6 < 0)
goto parse_failed;
- else if (np->ipv6 != (bool)ipv6)
+ else if (ipversion_set && np->ipv6 != (bool)ipv6)
goto parse_failed;
else
np->ipv6 = (bool)ipv6;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 072/131] net: qmi_wwan: add Netgear Aircard 340U
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (70 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 071/131] netpoll: fix netconsole IPv6 setup Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 073/131] tcp: tsq: fix nonagle handling Luis Henriques
` (58 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Bjørn Mork, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
commit fbd3a77d813f211060f86cc7a2f8416caf0e03b1 upstream.
This device was mentioned in an OpenWRT forum. Seems to have a "standard"
Sierra Wireless ifnumber to function layout:
0: qcdm
2: nmea
3: modem
8: qmi
9: storage
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/usb/qmi_wwan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index eff8ede..5dba7a8 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -710,6 +710,7 @@ static const struct usb_device_id products[] = {
{QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
{QMI_FIXED_INTF(0x1199, 0x68a2, 19)}, /* Sierra Wireless MC7710 in QMI mode */
{QMI_FIXED_INTF(0x1199, 0x901c, 8)}, /* Sierra Wireless EM7700 */
+ {QMI_FIXED_INTF(0x1199, 0x9051, 8)}, /* Netgear AirCard 340U */
{QMI_FIXED_INTF(0x1bbb, 0x011e, 4)}, /* Telekom Speedstick LTE II (Alcatel One Touch L100V LTE) */
{QMI_FIXED_INTF(0x2357, 0x0201, 4)}, /* TP-LINK HSUPA Modem MA180 */
{QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 073/131] tcp: tsq: fix nonagle handling
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (71 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 072/131] net: qmi_wwan: add Netgear Aircard 340U Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 074/131] tg3: Fix deadlock in tg3_change_mtu() Luis Henriques
` (57 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: John Ogness, Eric Dumazet, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: John Ogness <john.ogness@linutronix.de>
commit bf06200e732de613a1277984bf34d1a21c2de03d upstream.
Commit 46d3ceabd8d9 ("tcp: TCP Small Queues") introduced a possible
regression for applications using TCP_NODELAY.
If TCP session is throttled because of tsq, we should consult
tp->nonagle when TX completion is done and allow us to send additional
segment, especially if this segment is not a full MSS.
Otherwise this segment is sent after an RTO.
[edumazet] : Cooked the changelog, added another fix about testing
sk_wmem_alloc twice because TX completion can happen right before
setting TSQ_THROTTLED bit.
This problem is particularly visible with recent auto corking,
but might also be triggered with low tcp_limit_output_bytes
values or NIC drivers delaying TX completion by hundred of usec,
and very low rtt.
Thomas Glanzmann for example reported an iscsi regression, caused
by tcp auto corking making this bug quite visible.
Fixes: 46d3ceabd8d9 ("tcp: TCP Small Queues")
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Thomas Glanzmann <thomas@glanzmann.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/ipv4/tcp_output.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index d26060b..20d01ff 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -691,7 +691,8 @@ static void tcp_tsq_handler(struct sock *sk)
if ((1 << sk->sk_state) &
(TCPF_ESTABLISHED | TCPF_FIN_WAIT1 | TCPF_CLOSING |
TCPF_CLOSE_WAIT | TCPF_LAST_ACK))
- tcp_write_xmit(sk, tcp_current_mss(sk), 0, 0, GFP_ATOMIC);
+ tcp_write_xmit(sk, tcp_current_mss(sk), tcp_sk(sk)->nonagle,
+ 0, GFP_ATOMIC);
}
/*
* One tasklest per cpu tries to send more skbs.
@@ -1880,7 +1881,15 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
if (atomic_read(&sk->sk_wmem_alloc) > limit) {
set_bit(TSQ_THROTTLED, &tp->tsq_flags);
- break;
+ /* It is possible TX completion already happened
+ * before we set TSQ_THROTTLED, so we must
+ * test again the condition.
+ * We abuse smp_mb__after_clear_bit() because
+ * there is no smp_mb__after_set_bit() yet
+ */
+ smp_mb__after_clear_bit();
+ if (atomic_read(&sk->sk_wmem_alloc) > limit)
+ break;
}
limit = mss_now;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 074/131] tg3: Fix deadlock in tg3_change_mtu()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (72 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 073/131] tcp: tsq: fix nonagle handling Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 075/131] net: asix: add missing flag to struct driver_info Luis Henriques
` (56 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Michael Chan, Nithin Nayak Sujir, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Nithin Sujir <nsujir@broadcom.com>
commit c6993dfd7db9b0c6b7ca7503a56fda9236a4710f upstream.
Quoting David Vrabel -
"5780 cards cannot have jumbo frames and TSO enabled together. When
jumbo frames are enabled by setting the MTU, the TSO feature must be
cleared. This is done indirectly by calling netdev_update_features()
which will call tg3_fix_features() to actually clear the flags.
netdev_update_features() will also trigger a new netlink message for the
feature change event which will result in a call to tg3_get_stats64()
which deadlocks on the tg3 lock."
tg3_set_mtu() does not need to be under the tg3 lock since converting
the flags to use set_bit(). Move it out to after tg3_netif_stop().
Reported-by: David Vrabel <david.vrabel@citrix.com>
Tested-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/ethernet/broadcom/tg3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index f9aec90..849b141 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -13907,12 +13907,12 @@ static int tg3_change_mtu(struct net_device *dev, int new_mtu)
tg3_netif_stop(tp);
+ tg3_set_mtu(dev, tp, new_mtu);
+
tg3_full_lock(tp, 1);
tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
- tg3_set_mtu(dev, tp, new_mtu);
-
/* Reset PHY, otherwise the read DMA engine will be in a mode that
* breaks all requests to 256 bytes.
*/
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 075/131] net: asix: add missing flag to struct driver_info
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (73 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 074/131] tg3: Fix deadlock in tg3_change_mtu() Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 076/131] usbnet: remove generic hard_header_len check Luis Henriques
` (55 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Emil Goode, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Emil Goode <emilgoode@gmail.com>
commit d43ff4cd798911736fb39025ec8004284b1b0bc2 upstream.
The struct driver_info ax88178_info is assigned the function
asix_rx_fixup_common as it's rx_fixup callback. This means that
FLAG_MULTI_PACKET must be set as this function is cloning the
data and calling usbnet_skb_return. Not setting this flag leads
to usbnet_skb_return beeing called a second time from within
the rx_process function in the usbnet module.
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Reported-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/usb/asix_devices.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index ad5d1e4..97b5de7 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -915,7 +915,8 @@ static const struct driver_info ax88178_info = {
.status = asix_status,
.link_reset = ax88178_link_reset,
.reset = ax88178_reset,
- .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR,
+ .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_LINK_INTR |
+ FLAG_MULTI_PACKET,
.rx_fixup = asix_rx_fixup_common,
.tx_fixup = asix_tx_fixup,
};
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 076/131] usbnet: remove generic hard_header_len check
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (74 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 075/131] net: asix: add missing flag to struct driver_info Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 077/131] bonding: 802.3ad: make aggregator_identifier bond-private Luis Henriques
` (54 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Emil Goode, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Emil Goode <emilgoode@gmail.com>
commit eb85569fe2d06c2fbf4de7b66c263ca095b397aa upstream.
This patch removes a generic hard_header_len check from the usbnet
module that is causing dropped packages under certain circumstances
for devices that send rx packets that cross urb boundaries.
One example is the AX88772B which occasionally send rx packets that
cross urb boundaries where the remaining partial packet is sent with
no hardware header. When the buffer with a partial packet is of less
number of octets than the value of hard_header_len the buffer is
discarded by the usbnet module.
With AX88772B this can be reproduced by using ping with a packet
size between 1965-1976.
The bug has been reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=29082
This patch introduces the following changes:
- Removes the generic hard_header_len check in the rx_complete
function in the usbnet module.
- Introduces a ETH_HLEN check for skbs that are not cloned from
within a rx_fixup callback.
- For safety a hard_header_len check is added to each rx_fixup
callback function that could be affected by this change.
These extra checks could possibly be removed by someone
who has the hardware to test.
- Removes a call to dev_kfree_skb_any() and instead utilizes the
dev->done list to queue skbs for cleanup.
The changes place full responsibility on the rx_fixup callback
functions that clone skbs to only pass valid skbs to the
usbnet_skb_return function.
Signed-off-by: Emil Goode <emilgoode@gmail.com>
Reported-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ luis: backported to 3.11: dropped changes to drivers/net/usb/sr9800.c ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/usb/ax88179_178a.c | 4 ++++
drivers/net/usb/gl620a.c | 4 ++++
drivers/net/usb/mcs7830.c | 5 +++--
drivers/net/usb/net1080.c | 4 ++++
drivers/net/usb/qmi_wwan.c | 8 ++++----
drivers/net/usb/rndis_host.c | 4 ++++
drivers/net/usb/smsc75xx.c | 4 ++++
drivers/net/usb/smsc95xx.c | 4 ++++
drivers/net/usb/usbnet.c | 25 ++++++++++---------------
9 files changed, 41 insertions(+), 21 deletions(-)
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index 2bc87e3..8bd8a11 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1109,6 +1109,10 @@ static int ax88179_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
u16 hdr_off;
u32 *pkt_hdr;
+ /* This check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
skb_trim(skb, skb->len - 4);
memcpy(&rx_hdr, skb_tail_pointer(skb), 4);
le32_to_cpus(&rx_hdr);
diff --git a/drivers/net/usb/gl620a.c b/drivers/net/usb/gl620a.c
index a7e3f4e..82ab61d 100644
--- a/drivers/net/usb/gl620a.c
+++ b/drivers/net/usb/gl620a.c
@@ -86,6 +86,10 @@ static int genelink_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
u32 size;
u32 count;
+ /* This check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
header = (struct gl_header *) skb->data;
// get the packet count of the received skb
diff --git a/drivers/net/usb/mcs7830.c b/drivers/net/usb/mcs7830.c
index 03832d3..9237c45 100644
--- a/drivers/net/usb/mcs7830.c
+++ b/drivers/net/usb/mcs7830.c
@@ -529,8 +529,9 @@ static int mcs7830_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{
u8 status;
- if (skb->len == 0) {
- dev_err(&dev->udev->dev, "unexpected empty rx frame\n");
+ /* This check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len) {
+ dev_err(&dev->udev->dev, "unexpected tiny rx frame\n");
return 0;
}
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c
index 93e0716..7f4a3a4 100644
--- a/drivers/net/usb/net1080.c
+++ b/drivers/net/usb/net1080.c
@@ -366,6 +366,10 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
struct nc_trailer *trailer;
u16 hdr_len, packet_len;
+ /* This check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
if (!(skb->len & 0x01)) {
netdev_dbg(dev->net, "rx framesize %d range %d..%d mtu %d\n",
skb->len, dev->net->hard_header_len, dev->hard_mtu,
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 5dba7a8..7a38ea6 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -80,10 +80,10 @@ static int qmi_wwan_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{
__be16 proto;
- /* usbnet rx_complete guarantees that skb->len is at least
- * hard_header_len, so we can inspect the dest address without
- * checking skb->len
- */
+ /* This check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
switch (skb->data[0] & 0xf0) {
case 0x40:
proto = htons(ETH_P_IP);
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index cc49aac..691fca4 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -494,6 +494,10 @@ EXPORT_SYMBOL_GPL(rndis_unbind);
*/
int rndis_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{
+ /* This check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
/* peripheral may have batched packets to us... */
while (likely(skb->len)) {
struct rndis_data_hdr *hdr = (void *)skb->data;
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index 66ebbac..12afae0 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -2108,6 +2108,10 @@ static void smsc75xx_rx_csum_offload(struct usbnet *dev, struct sk_buff *skb,
static int smsc75xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{
+ /* This check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
while (skb->len > 0) {
u32 rx_cmd_a, rx_cmd_b, align_count, size;
struct sk_buff *ax_skb;
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 3f38ba8..9375b8c 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -1725,6 +1725,10 @@ static void smsc95xx_rx_csum_offload(struct sk_buff *skb)
static int smsc95xx_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
{
+ /* This check is no longer done by usbnet */
+ if (skb->len < dev->net->hard_header_len)
+ return 0;
+
while (skb->len > 0) {
u32 header, align_count;
struct sk_buff *ax_skb;
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 28f16ed..f6dce47 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -517,17 +517,19 @@ static inline void rx_process (struct usbnet *dev, struct sk_buff *skb)
}
// else network stack removes extra byte if we forced a short packet
- if (skb->len) {
- /* all data was already cloned from skb inside the driver */
- if (dev->driver_info->flags & FLAG_MULTI_PACKET)
- dev_kfree_skb_any(skb);
- else
- usbnet_skb_return(dev, skb);
+ /* all data was already cloned from skb inside the driver */
+ if (dev->driver_info->flags & FLAG_MULTI_PACKET)
+ goto done;
+
+ if (skb->len < ETH_HLEN) {
+ dev->net->stats.rx_errors++;
+ dev->net->stats.rx_length_errors++;
+ netif_dbg(dev, rx_err, dev->net, "rx length %d\n", skb->len);
+ } else {
+ usbnet_skb_return(dev, skb);
return;
}
- netif_dbg(dev, rx_err, dev->net, "drop\n");
- dev->net->stats.rx_errors++;
done:
skb_queue_tail(&dev->done, skb);
}
@@ -549,13 +551,6 @@ static void rx_complete (struct urb *urb)
switch (urb_status) {
/* success */
case 0:
- if (skb->len < dev->net->hard_header_len) {
- state = rx_cleanup;
- dev->net->stats.rx_errors++;
- dev->net->stats.rx_length_errors++;
- netif_dbg(dev, rx_err, dev->net,
- "rx length %d\n", skb->len);
- }
break;
/* stalls need manual reset. this is rare ... except that
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 077/131] bonding: 802.3ad: make aggregator_identifier bond-private
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (75 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 076/131] usbnet: remove generic hard_header_len check Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 078/131] ipv4: fix counter in_slow_tot Luis Henriques
` (53 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Jiri Bohac, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Bohac <jiri@boha.cz>
commit 163c8ff30dbe473abfbb24a7eac5536c87f3baa9 upstream.
aggregator_identifier is used to assign unique aggregator identifiers
to aggregators of a bond during device enslaving.
aggregator_identifier is currently a global variable that is zeroed in
bond_3ad_initialize().
This sequence will lead to duplicate aggregator identifiers for eth1 and eth3:
create bond0
change bond0 mode to 802.3ad
enslave eth0 to bond0 //eth0 gets agg id 1
enslave eth1 to bond0 //eth1 gets agg id 2
create bond1
change bond1 mode to 802.3ad
enslave eth2 to bond1 //aggregator_identifier is reset to 0
//eth2 gets agg id 1
enslave eth3 to bond0 //eth3 gets agg id 2
Fix this by making aggregator_identifier private to the bond.
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Acked-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/bonding/bond_3ad.c | 6 ++----
drivers/net/bonding/bond_3ad.h | 1 +
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 390061d..00c6c08 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -1854,8 +1854,6 @@ void bond_3ad_initiate_agg_selection(struct bonding *bond, int timeout)
BOND_AD_INFO(bond).agg_select_timer = timeout;
}
-static u16 aggregator_identifier;
-
/**
* bond_3ad_initialize - initialize a bond's 802.3ad parameters and structures
* @bond: bonding struct to work on
@@ -1869,7 +1867,7 @@ void bond_3ad_initialize(struct bonding *bond, u16 tick_resolution)
if (MAC_ADDRESS_COMPARE(&(BOND_AD_INFO(bond).system.sys_mac_addr),
bond->dev->dev_addr)) {
- aggregator_identifier = 0;
+ BOND_AD_INFO(bond).aggregator_identifier = 0;
BOND_AD_INFO(bond).system.sys_priority = 0xFFFF;
BOND_AD_INFO(bond).system.sys_mac_addr = *((struct mac_addr *)bond->dev->dev_addr);
@@ -1940,7 +1938,7 @@ int bond_3ad_bind_slave(struct slave *slave)
ad_initialize_agg(aggregator);
aggregator->aggregator_mac_address = *((struct mac_addr *)bond->dev->dev_addr);
- aggregator->aggregator_identifier = (++aggregator_identifier);
+ aggregator->aggregator_identifier = ++BOND_AD_INFO(bond).aggregator_identifier;
aggregator->slave = slave;
aggregator->is_active = 0;
aggregator->num_of_ports = 0;
diff --git a/drivers/net/bonding/bond_3ad.h b/drivers/net/bonding/bond_3ad.h
index 5d91ad0..1f081c8 100644
--- a/drivers/net/bonding/bond_3ad.h
+++ b/drivers/net/bonding/bond_3ad.h
@@ -253,6 +253,7 @@ struct ad_system {
struct ad_bond_info {
struct ad_system system; /* 802.3ad system structure */
u32 agg_select_timer; // Timer to select aggregator after all adapter's hand shakes
+ u16 aggregator_identifier;
};
struct ad_slave_info {
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 078/131] ipv4: fix counter in_slow_tot
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (76 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 077/131] bonding: 802.3ad: make aggregator_identifier bond-private Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 079/131] net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode Luis Henriques
` (52 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Duan Jiong, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
commit a6254864c08109c66a194612585afc0439005286 upstream.
since commit 89aef8921bf("ipv4: Delete routing cache."), the counter
in_slow_tot can't work correctly.
The counter in_slow_tot increase by one when fib_lookup() return successfully
in ip_route_input_slow(), but actually the dst struct maybe not be created and
cached, so we can increase in_slow_tot after the dst struct is created.
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/ipv4/route.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 52e15e8..a8bcc22 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1598,6 +1598,7 @@ static int __mkroute_input(struct sk_buff *skb,
rth->rt_gateway = 0;
rth->rt_uses_gateway = 0;
INIT_LIST_HEAD(&rth->rt_uncached);
+ RT_CACHE_STAT_INC(in_slow_tot);
rth->dst.input = ip_forward;
rth->dst.output = ip_output;
@@ -1699,8 +1700,6 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
if (err != 0)
goto no_route;
- RT_CACHE_STAT_INC(in_slow_tot);
-
if (res.type == RTN_BROADCAST)
goto brd_input;
@@ -1769,6 +1768,7 @@ local_input:
rth->rt_gateway = 0;
rth->rt_uses_gateway = 0;
INIT_LIST_HEAD(&rth->rt_uncached);
+ RT_CACHE_STAT_INC(in_slow_tot);
if (res.type == RTN_UNREACHABLE) {
rth->dst.input= ip_error;
rth->dst.error= -err;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 079/131] net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (77 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 078/131] ipv4: fix counter in_slow_tot Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 080/131] net: add and use skb_gso_transport_seglen() Luis Henriques
` (51 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Daniel Borkmann, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Borkmann <dborkman@redhat.com>
commit ffd5939381c609056b33b7585fb05a77b4c695f3 upstream.
SCTP's sctp_connectx() abi breaks for 64bit kernels compiled with 32bit
emulation (e.g. ia32 emulation or x86_x32). Due to internal usage of
'struct sctp_getaddrs_old' which includes a struct sockaddr pointer,
sizeof(param) check will always fail in kernel as the structure in
64bit kernel space is 4bytes larger than for user binaries compiled
in 32bit mode. Thus, applications making use of sctp_connectx() won't
be able to run under such circumstances.
Introduce a compat interface in the kernel to deal with such
situations by using a 'struct compat_sctp_getaddrs_old' structure
where user data is copied into it, and then sucessively transformed
into a 'struct sctp_getaddrs_old' structure with the help of
compat_ptr(). That fixes sctp_connectx() abi without any changes
needed in user space, and lets the SCTP test suite pass when compiled
in 32bit and run on 64bit kernels.
Fixes: f9c67811ebc0 ("sctp: Fix regression introduced by new sctp_connectx api")
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/sctp/socket.c | 41 ++++++++++++++++++++++++++++++++---------
1 file changed, 32 insertions(+), 9 deletions(-)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index cf6c6b0..bd4a48d 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -71,6 +71,7 @@
#include <linux/crypto.h>
#include <linux/slab.h>
#include <linux/file.h>
+#include <linux/compat.h>
#include <net/ip.h>
#include <net/icmp.h>
@@ -1375,11 +1376,19 @@ static int sctp_setsockopt_connectx(struct sock* sk,
/*
* New (hopefully final) interface for the API.
* We use the sctp_getaddrs_old structure so that use-space library
- * can avoid any unnecessary allocations. The only defferent part
+ * can avoid any unnecessary allocations. The only different part
* is that we store the actual length of the address buffer into the
- * addrs_num structure member. That way we can re-use the existing
+ * addrs_num structure member. That way we can re-use the existing
* code.
*/
+#ifdef CONFIG_COMPAT
+struct compat_sctp_getaddrs_old {
+ sctp_assoc_t assoc_id;
+ s32 addr_num;
+ compat_uptr_t addrs; /* struct sockaddr * */
+};
+#endif
+
static int sctp_getsockopt_connectx3(struct sock* sk, int len,
char __user *optval,
int __user *optlen)
@@ -1388,16 +1397,30 @@ static int sctp_getsockopt_connectx3(struct sock* sk, int len,
sctp_assoc_t assoc_id = 0;
int err = 0;
- if (len < sizeof(param))
- return -EINVAL;
+#ifdef CONFIG_COMPAT
+ if (is_compat_task()) {
+ struct compat_sctp_getaddrs_old param32;
- if (copy_from_user(¶m, optval, sizeof(param)))
- return -EFAULT;
+ if (len < sizeof(param32))
+ return -EINVAL;
+ if (copy_from_user(¶m32, optval, sizeof(param32)))
+ return -EFAULT;
- err = __sctp_setsockopt_connectx(sk,
- (struct sockaddr __user *)param.addrs,
- param.addr_num, &assoc_id);
+ param.assoc_id = param32.assoc_id;
+ param.addr_num = param32.addr_num;
+ param.addrs = compat_ptr(param32.addrs);
+ } else
+#endif
+ {
+ if (len < sizeof(param))
+ return -EINVAL;
+ if (copy_from_user(¶m, optval, sizeof(param)))
+ return -EFAULT;
+ }
+ err = __sctp_setsockopt_connectx(sk, (struct sockaddr __user *)
+ param.addrs, param.addr_num,
+ &assoc_id);
if (err == 0 || err == -EINPROGRESS) {
if (copy_to_user(optval, &assoc_id, sizeof(assoc_id)))
return -EFAULT;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 080/131] net: add and use skb_gso_transport_seglen()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (78 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 079/131] net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 081/131] net: core: introduce netif_skb_dev_features Luis Henriques
` (50 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Florian Westphal, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <fw@strlen.de>
commit de960aa9ab4decc3304959f69533eef64d05d8e8 upstream.
This moves part of Eric Dumazets skb_gso_seglen helper from tbf sched to
skbuff core so it may be reused by upcoming ip forwarding path patch.
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
include/linux/skbuff.h | 2 ++
net/core/skbuff.c | 25 +++++++++++++++++++++++++
net/sched/sch_tbf.c | 13 +++----------
3 files changed, 30 insertions(+), 10 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index e27c8f6..3d9dcd4 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2391,6 +2391,8 @@ extern void skb_scrub_packet(struct sk_buff *skb);
extern struct sk_buff *skb_segment(struct sk_buff *skb,
netdev_features_t features);
+unsigned int skb_gso_transport_seglen(const struct sk_buff *skb);
+
static inline void *skb_header_pointer(const struct sk_buff *skb, int offset,
int len, void *buffer)
{
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 290f73b..ba05e04 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -47,6 +47,8 @@
#include <linux/in.h>
#include <linux/inet.h>
#include <linux/slab.h>
+#include <linux/tcp.h>
+#include <linux/udp.h>
#include <linux/netdevice.h>
#ifdef CONFIG_NET_CLS_ACT
#include <net/pkt_sched.h>
@@ -3489,3 +3491,26 @@ void skb_scrub_packet(struct sk_buff *skb)
nf_reset_trace(skb);
}
EXPORT_SYMBOL_GPL(skb_scrub_packet);
+
+/**
+ * skb_gso_transport_seglen - Return length of individual segments of a gso packet
+ *
+ * @skb: GSO skb
+ *
+ * skb_gso_transport_seglen is used to determine the real size of the
+ * individual segments, including Layer4 headers (TCP/UDP).
+ *
+ * The MAC/L2 or network (IP, IPv6) headers are not accounted for.
+ */
+unsigned int skb_gso_transport_seglen(const struct sk_buff *skb)
+{
+ const struct skb_shared_info *shinfo = skb_shinfo(skb);
+ unsigned int hdr_len;
+
+ if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))
+ hdr_len = tcp_hdrlen(skb);
+ else
+ hdr_len = sizeof(struct udphdr);
+ return hdr_len + shinfo->gso_size;
+}
+EXPORT_SYMBOL_GPL(skb_gso_transport_seglen);
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index 6ddda28..fecd35a 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -21,7 +21,6 @@
#include <net/netlink.h>
#include <net/sch_generic.h>
#include <net/pkt_sched.h>
-#include <net/tcp.h>
/* Simple Token Bucket Filter.
@@ -122,16 +121,10 @@ struct tbf_sched_data {
* Return length of individual segments of a gso packet,
* including all headers (MAC, IP, TCP/UDP)
*/
-static unsigned int skb_gso_seglen(const struct sk_buff *skb)
+static unsigned int skb_gso_mac_seglen(const struct sk_buff *skb)
{
unsigned int hdr_len = skb_transport_header(skb) - skb_mac_header(skb);
- const struct skb_shared_info *shinfo = skb_shinfo(skb);
-
- if (likely(shinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)))
- hdr_len += tcp_hdrlen(skb);
- else
- hdr_len += sizeof(struct udphdr);
- return hdr_len + shinfo->gso_size;
+ return hdr_len + skb_gso_transport_seglen(skb);
}
/* GSO packet is too big, segment it so that tbf can transmit
@@ -176,7 +169,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc *sch)
int ret;
if (qdisc_pkt_len(skb) > q->max_size) {
- if (skb_is_gso(skb) && skb_gso_seglen(skb) <= q->max_size)
+ if (skb_is_gso(skb) && skb_gso_mac_seglen(skb) <= q->max_size)
return tbf_segment(skb, sch);
return qdisc_reshape_fail(skb, sch);
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 081/131] net: core: introduce netif_skb_dev_features
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (79 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 080/131] net: add and use skb_gso_transport_seglen() Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 082/131] net: ip, ipv6: handle gso skbs in forwarding path Luis Henriques
` (49 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Florian Westphal, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <fw@strlen.de>
commit d206940319c41df4299db75ed56142177bb2e5f6 upstream.
Will be used by upcoming ipv4 forward path change that needs to
determine feature mask using skb->dst->dev instead of skb->dev.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
include/linux/netdevice.h | 7 ++++++-
net/core/dev.c | 22 ++++++++++++----------
2 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 324521b..c5310ed 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2842,7 +2842,12 @@ void netdev_change_features(struct net_device *dev);
void netif_stacked_transfer_operstate(const struct net_device *rootdev,
struct net_device *dev);
-netdev_features_t netif_skb_features(struct sk_buff *skb);
+netdev_features_t netif_skb_dev_features(struct sk_buff *skb,
+ const struct net_device *dev);
+static inline netdev_features_t netif_skb_features(struct sk_buff *skb)
+{
+ return netif_skb_dev_features(skb, skb->dev);
+}
static inline bool net_gso_ok(netdev_features_t features, int gso_type)
{
diff --git a/net/core/dev.c b/net/core/dev.c
index bf33219..d31d822 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2401,7 +2401,7 @@ EXPORT_SYMBOL(netdev_rx_csum_fault);
* 2. No high memory really exists on this machine.
*/
-static int illegal_highdma(struct net_device *dev, struct sk_buff *skb)
+static int illegal_highdma(const struct net_device *dev, struct sk_buff *skb)
{
#ifdef CONFIG_HIGHMEM
int i;
@@ -2481,34 +2481,36 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features)
}
static netdev_features_t harmonize_features(struct sk_buff *skb,
- netdev_features_t features)
+ const struct net_device *dev,
+ netdev_features_t features)
{
if (skb->ip_summed != CHECKSUM_NONE &&
!can_checksum_protocol(features, skb_network_protocol(skb))) {
features &= ~NETIF_F_ALL_CSUM;
- } else if (illegal_highdma(skb->dev, skb)) {
+ } else if (illegal_highdma(dev, skb)) {
features &= ~NETIF_F_SG;
}
return features;
}
-netdev_features_t netif_skb_features(struct sk_buff *skb)
+netdev_features_t netif_skb_dev_features(struct sk_buff *skb,
+ const struct net_device *dev)
{
__be16 protocol = skb->protocol;
- netdev_features_t features = skb->dev->features;
+ netdev_features_t features = dev->features;
- if (skb_shinfo(skb)->gso_segs > skb->dev->gso_max_segs)
+ if (skb_shinfo(skb)->gso_segs > dev->gso_max_segs)
features &= ~NETIF_F_GSO_MASK;
if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD)) {
struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;
protocol = veh->h_vlan_encapsulated_proto;
} else if (!vlan_tx_tag_present(skb)) {
- return harmonize_features(skb, features);
+ return harmonize_features(skb, dev, features);
}
- features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_CTAG_TX |
+ features &= (dev->vlan_features | NETIF_F_HW_VLAN_CTAG_TX |
NETIF_F_HW_VLAN_STAG_TX);
if (protocol == htons(ETH_P_8021Q) || protocol == htons(ETH_P_8021AD))
@@ -2516,9 +2518,9 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_CTAG_TX |
NETIF_F_HW_VLAN_STAG_TX;
- return harmonize_features(skb, features);
+ return harmonize_features(skb, dev, features);
}
-EXPORT_SYMBOL(netif_skb_features);
+EXPORT_SYMBOL(netif_skb_dev_features);
/*
* Returns true if either:
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 082/131] net: ip, ipv6: handle gso skbs in forwarding path
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (80 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 081/131] net: core: introduce netif_skb_dev_features Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 083/131] net: use __GFP_NORETRY for high order allocations Luis Henriques
` (48 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Florian Westphal, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <fw@strlen.de>
commit fe6cc55f3a9a053482a76f5a6b2257cee51b4663 upstream.
Marcelo Ricardo Leitner reported problems when the forwarding link path
has a lower mtu than the incoming one if the inbound interface supports GRO.
Given:
Host <mtu1500> R1 <mtu1200> R2
Host sends tcp stream which is routed via R1 and R2. R1 performs GRO.
In this case, the kernel will fail to send ICMP fragmentation needed
messages (or pkt too big for ipv6), as GSO packets currently bypass dstmtu
checks in forward path. Instead, Linux tries to send out packets exceeding
the mtu.
When locking route MTU on Host (i.e., no ipv4 DF bit set), R1 does
not fragment the packets when forwarding, and again tries to send out
packets exceeding R1-R2 link mtu.
This alters the forwarding dstmtu checks to take the individual gso
segment lengths into account.
For ipv6, we send out pkt too big error for gso if the individual
segments are too big.
For ipv4, we either send icmp fragmentation needed, or, if the DF bit
is not set, perform software segmentation and let the output path
create fragments when the packet is leaving the machine.
It is not 100% correct as the error message will contain the headers of
the GRO skb instead of the original/segmented one, but it seems to
work fine in my (limited) tests.
Eric Dumazet suggested to simply shrink mss via ->gso_size to avoid
sofware segmentation.
However it turns out that skb_segment() assumes skb nr_frags is related
to mss size so we would BUG there. I don't want to mess with it considering
Herbert and Eric disagree on what the correct behavior should be.
Hannes Frederic Sowa notes that when we would shrink gso_size
skb_segment would then also need to deal with the case where
SKB_MAX_FRAGS would be exceeded.
This uses sofware segmentation in the forward path when we hit ipv4
non-DF packets and the outgoing link mtu is too small. Its not perfect,
but given the lack of bug reports wrt. GRO fwd being broken this is a
rare case anyway. Also its not like this could not be improved later
once the dust settles.
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Reported-by: Marcelo Ricardo Leitner <mleitner@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ luis: backported to 3.11: used davem's backport to 3.10 ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
include/linux/skbuff.h | 17 ++++++++++++
net/ipv4/ip_forward.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++--
net/ipv6/ip6_output.c | 17 ++++++++++--
3 files changed, 101 insertions(+), 4 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 3d9dcd4..29db63f 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -2816,5 +2816,22 @@ static inline bool skb_head_is_locked(const struct sk_buff *skb)
{
return !skb->head_frag || skb_cloned(skb);
}
+
+/**
+ * skb_gso_network_seglen - Return length of individual segments of a gso packet
+ *
+ * @skb: GSO skb
+ *
+ * skb_gso_network_seglen is used to determine the real size of the
+ * individual segments, including Layer3 (IP, IPv6) and L4 headers (TCP/UDP).
+ *
+ * The MAC/L2 header is not accounted for.
+ */
+static inline unsigned int skb_gso_network_seglen(const struct sk_buff *skb)
+{
+ unsigned int hdr_len = skb_transport_header(skb) -
+ skb_network_header(skb);
+ return hdr_len + skb_gso_transport_seglen(skb);
+}
#endif /* __KERNEL__ */
#endif /* _LINUX_SKBUFF_H */
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index 694de3b..98d7e53 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -39,6 +39,71 @@
#include <net/route.h>
#include <net/xfrm.h>
+static bool ip_may_fragment(const struct sk_buff *skb)
+{
+ return unlikely((ip_hdr(skb)->frag_off & htons(IP_DF)) == 0) ||
+ !skb->local_df;
+}
+
+static bool ip_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu)
+{
+ if (skb->len <= mtu || skb->local_df)
+ return false;
+
+ if (skb_is_gso(skb) && skb_gso_network_seglen(skb) <= mtu)
+ return false;
+
+ return true;
+}
+
+static bool ip_gso_exceeds_dst_mtu(const struct sk_buff *skb)
+{
+ unsigned int mtu;
+
+ if (skb->local_df || !skb_is_gso(skb))
+ return false;
+
+ mtu = dst_mtu(skb_dst(skb));
+
+ /* if seglen > mtu, do software segmentation for IP fragmentation on
+ * output. DF bit cannot be set since ip_forward would have sent
+ * icmp error.
+ */
+ return skb_gso_network_seglen(skb) > mtu;
+}
+
+/* called if GSO skb needs to be fragmented on forward */
+static int ip_forward_finish_gso(struct sk_buff *skb)
+{
+ struct dst_entry *dst = skb_dst(skb);
+ netdev_features_t features;
+ struct sk_buff *segs;
+ int ret = 0;
+
+ features = netif_skb_dev_features(skb, dst->dev);
+ segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
+ if (IS_ERR(segs)) {
+ kfree_skb(skb);
+ return -ENOMEM;
+ }
+
+ consume_skb(skb);
+
+ do {
+ struct sk_buff *nskb = segs->next;
+ int err;
+
+ segs->next = NULL;
+ err = dst_output(segs);
+
+ if (err && ret == 0)
+ ret = err;
+ segs = nskb;
+ } while (segs);
+
+ return ret;
+}
+
static int ip_forward_finish(struct sk_buff *skb)
{
struct ip_options *opt = &(IPCB(skb)->opt);
@@ -49,6 +114,9 @@ static int ip_forward_finish(struct sk_buff *skb)
if (unlikely(opt->optlen))
ip_forward_options(skb);
+ if (ip_gso_exceeds_dst_mtu(skb))
+ return ip_forward_finish_gso(skb);
+
return dst_output(skb);
}
@@ -88,8 +156,7 @@ int ip_forward(struct sk_buff *skb)
if (opt->is_strictroute && rt->rt_uses_gateway)
goto sr_failed;
- if (unlikely(skb->len > dst_mtu(&rt->dst) && !skb_is_gso(skb) &&
- (ip_hdr(skb)->frag_off & htons(IP_DF))) && !skb->local_df) {
+ if (!ip_may_fragment(skb) && ip_exceeds_mtu(skb, dst_mtu(&rt->dst))) {
IP_INC_STATS(dev_net(rt->dst.dev), IPSTATS_MIB_FRAGFAILS);
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
htonl(dst_mtu(&rt->dst)));
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index e50a9e3..554eb0d 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -346,6 +346,20 @@ static inline int ip6_forward_finish(struct sk_buff *skb)
return dst_output(skb);
}
+static bool ip6_pkt_too_big(const struct sk_buff *skb, unsigned int mtu)
+{
+ if (skb->len <= mtu || skb->local_df)
+ return false;
+
+ if (IP6CB(skb)->frag_max_size && IP6CB(skb)->frag_max_size > mtu)
+ return true;
+
+ if (skb_is_gso(skb) && skb_gso_network_seglen(skb) <= mtu)
+ return false;
+
+ return true;
+}
+
int ip6_forward(struct sk_buff *skb)
{
struct dst_entry *dst = skb_dst(skb);
@@ -468,8 +482,7 @@ int ip6_forward(struct sk_buff *skb)
if (mtu < IPV6_MIN_MTU)
mtu = IPV6_MIN_MTU;
- if ((!skb->local_df && skb->len > mtu && !skb_is_gso(skb)) ||
- (IP6CB(skb)->frag_max_size && IP6CB(skb)->frag_max_size > mtu)) {
+ if (ip6_pkt_too_big(skb, mtu)) {
/* Again, force OUTPUT device used as source address */
skb->dev = dst->dev;
icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 083/131] net: use __GFP_NORETRY for high order allocations
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (81 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 082/131] net: ip, ipv6: handle gso skbs in forwarding path Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 084/131] ARM: tegra: only run PL310 init on systems with one Luis Henriques
` (47 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Eric Dumazet, David S. Miller, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
commit ed98df3361f059db42786c830ea96e2d18b8d4db upstream.
sock_alloc_send_pskb() & sk_page_frag_refill()
have a loop trying high order allocations to prepare
skb with low number of fragments as this increases performance.
Problem is that under memory pressure/fragmentation, this can
trigger OOM while the intent was only to try the high order
allocations, then fallback to order-0 allocations.
We had various reports from unexpected regressions.
According to David, setting __GFP_NORETRY should be fine,
as the asynchronous compaction is still enabled, and this
will prevent OOM from kicking as in :
CFSClientEventm invoked oom-killer: gfp_mask=0x42d0, order=3, oom_adj=0,
oom_score_adj=0, oom_score_badness=2 (enabled),memcg_scoring=disabled
CFSClientEventm
Call Trace:
[<ffffffff8043766c>] dump_header+0xe1/0x23e
[<ffffffff80437a02>] oom_kill_process+0x6a/0x323
[<ffffffff80438443>] out_of_memory+0x4b3/0x50d
[<ffffffff8043a4a6>] __alloc_pages_may_oom+0xa2/0xc7
[<ffffffff80236f42>] __alloc_pages_nodemask+0x1002/0x17f0
[<ffffffff8024bd23>] alloc_pages_current+0x103/0x2b0
[<ffffffff8028567f>] sk_page_frag_refill+0x8f/0x160
[<ffffffff80295fa0>] tcp_sendmsg+0x560/0xee0
[<ffffffff802a5037>] inet_sendmsg+0x67/0x100
[<ffffffff80283c9c>] __sock_sendmsg_nosec+0x6c/0x90
[<ffffffff80283e85>] sock_sendmsg+0xc5/0xf0
[<ffffffff802847b6>] __sys_sendmsg+0x136/0x430
[<ffffffff80284ec8>] sys_sendmsg+0x88/0x110
[<ffffffff80711472>] system_call_fastpath+0x16/0x1b
Out of Memory: Kill process 2856 (bash) score 9999 or sacrifice child
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[ luis: backported to 3.11: dropped changes to sock_alloc_send_pskb() ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
net/core/sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index dca3102..2d92ff8 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1835,7 +1835,7 @@ bool sk_page_frag_refill(struct sock *sk, struct page_frag *pfrag)
gfp_t gfp = sk->sk_allocation;
if (order)
- gfp |= __GFP_COMP | __GFP_NOWARN;
+ gfp |= __GFP_COMP | __GFP_NOWARN | __GFP_NORETRY;
pfrag->page = alloc_pages(gfp, order);
if (likely(pfrag->page)) {
pfrag->offset = 0;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 084/131] ARM: tegra: only run PL310 init on systems with one
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (82 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 083/131] net: use __GFP_NORETRY for high order allocations Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 085/131] fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists Luis Henriques
` (46 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Stephen Warren, Olof Johansson, Stephen Warren, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Warren <swarren@nvidia.com>
commit 8859685785bfafadf9bc922dd3a2278e59886947 upstream.
Fix tegra_init_cache() to check whether the system has a PL310 cache
before touching the PL310 registers. This prevents access to non-existent
registers on Tegra114 and later.
Note for stable kernels:
In <= v3.12, the file to patch is arch/arm/mach-tegra/common.c.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
[ swarren: When applying this to 3.10, there will be a trivial conflict,
just due to context differences, at the added include of (linux/of.h>) ]
Cc: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm/mach-tegra/common.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 94a119a..3c405f4 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -22,6 +22,7 @@
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/delay.h>
+#include <linux/of.h>
#include <linux/reboot.h>
#include <linux/irqchip.h>
#include <linux/clk-provider.h>
@@ -82,10 +83,20 @@ void tegra_assert_system_reset(enum reboot_mode mode, const char *cmd)
static void __init tegra_init_cache(void)
{
#ifdef CONFIG_CACHE_L2X0
+ static const struct of_device_id pl310_ids[] __initconst = {
+ { .compatible = "arm,pl310-cache", },
+ {}
+ };
+
+ struct device_node *np;
int ret;
void __iomem *p = IO_ADDRESS(TEGRA_ARM_PERIF_BASE) + 0x3000;
u32 aux_ctrl, cache_type;
+ np = of_find_matching_node(NULL, pl310_ids);
+ if (!np)
+ return;
+
cache_type = readl(p + L2X0_CACHE_TYPE);
aux_ctrl = (cache_type & 0x700) << (17-8);
aux_ctrl |= 0x7C400001;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 085/131] fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists.
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (83 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 084/131] ARM: tegra: only run PL310 init on systems with one Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 086/131] Input: elantech - improve clickpad detection Luis Henriques
` (45 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Dave Jones, Al Viro, Paul Mackerras, Josh Boyer,
Benjamin Herrenschmidt, Andrew Morton, Linus Torvalds,
Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Jones <davej@redhat.com>
commit c1d867a54d426b45da017fbe8e585f8a3064ce8d upstream.
Distribution kernels might want to build in support for /proc/device-tree
for kernels that might end up running on hardware that doesn't support
openfirmware. This results in an empty /proc/device-tree existing.
Remove it if the OFW root node doesn't exist.
This situation actually confuses grub2, resulting in install failures.
grub2 sees the /proc/device-tree and picks the wrong install target cf.
http://bzr.savannah.gnu.org/lh/grub/trunk/grub/annotate/4300/util/grub-install.in#L311
grub should be more robust, but still, leaving an empty proc dir seems
pointless.
Addresses https://bugzilla.redhat.com/show_bug.cgi?id=818378.
Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/proc/proc_devtree.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c
index 106a835..9fa2154 100644
--- a/fs/proc/proc_devtree.c
+++ b/fs/proc/proc_devtree.c
@@ -235,6 +235,7 @@ void __init proc_device_tree_init(void)
return;
root = of_find_node_by_path("/");
if (root == NULL) {
+ remove_proc_entry("device-tree", NULL);
pr_debug("/proc/device-tree: can't find root\n");
return;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 086/131] Input: elantech - improve clickpad detection
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (84 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 085/131] fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 087/131] KVM: MMU: handle invalid root_hpa at __direct_map Luis Henriques
` (44 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Hans de Goede, Dmitry Torokhov, Josh Boyer, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Hans de Goede <hdegoede@redhat.com>
commit c15bdfd5b9831e4cab8cfc118243956e267dd30e upstream.
The current assumption in the elantech driver that hw version 3 touchpads
are never clickpads and hw version 4 touchpads are always clickpads is
wrong.
There are several bug reports for this, ie:
https://bugzilla.redhat.com/show_bug.cgi?id=1030802
http://superuser.com/questions/619582/right-elantech-touchpad-button-not-working-in-linux
I've spend a couple of hours wading through various bugzillas, launchpads
and forum posts to create a list of fw-versions and capabilities for
different laptop models to find a good method to differentiate between
clickpads and versions with separate hardware buttons.
Which shows that a device being a clickpad is reliable indicated by bit 12
being set in the fw_version. I've included the gathered list inside the
driver, so that we've this info at hand if we need to revisit this later.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/input/mouse/elantech.c | 45 +++++++++++++++++++++++++++++++++++++++---
1 file changed, 42 insertions(+), 3 deletions(-)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 8551dca..6cd2d2d 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -486,6 +486,7 @@ static void elantech_input_sync_v4(struct psmouse *psmouse)
unsigned char *packet = psmouse->packet;
input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
+ input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
input_mt_report_pointer_emulation(dev, true);
input_sync(dev);
}
@@ -984,6 +985,44 @@ static int elantech_get_resolution_v4(struct psmouse *psmouse,
}
/*
+ * Advertise INPUT_PROP_BUTTONPAD for clickpads. The testing of bit 12 in
+ * fw_version for this is based on the following fw_version & caps table:
+ *
+ * Laptop-model: fw_version: caps: buttons:
+ * Acer S3 0x461f00 10, 13, 0e clickpad
+ * Acer S7-392 0x581f01 50, 17, 0d clickpad
+ * Acer V5-131 0x461f02 01, 16, 0c clickpad
+ * Acer V5-551 0x461f00 ? clickpad
+ * Asus K53SV 0x450f01 78, 15, 0c 2 hw buttons
+ * Asus G46VW 0x460f02 00, 18, 0c 2 hw buttons
+ * Asus G750JX 0x360f00 00, 16, 0c 2 hw buttons
+ * Asus UX31 0x361f00 20, 15, 0e clickpad
+ * Asus UX32VD 0x361f02 00, 15, 0e clickpad
+ * Avatar AVIU-145A2 0x361f00 ? clickpad
+ * Gigabyte U2442 0x450f01 58, 17, 0c 2 hw buttons
+ * Lenovo L430 0x350f02 b9, 15, 0c 2 hw buttons (*)
+ * Samsung NF210 0x150b00 78, 14, 0a 2 hw buttons
+ * Samsung NP770Z5E 0x575f01 10, 15, 0f clickpad
+ * Samsung NP700Z5B 0x361f06 21, 15, 0f clickpad
+ * Samsung NP900X3E-A02 0x575f03 ? clickpad
+ * Samsung NP-QX410 0x851b00 19, 14, 0c clickpad
+ * Samsung RC512 0x450f00 08, 15, 0c 2 hw buttons
+ * Samsung RF710 0x450f00 ? 2 hw buttons
+ * System76 Pangolin 0x250f01 ? 2 hw buttons
+ * (*) + 3 trackpoint buttons
+ */
+static void elantech_set_buttonpad_prop(struct psmouse *psmouse)
+{
+ struct input_dev *dev = psmouse->dev;
+ struct elantech_data *etd = psmouse->private;
+
+ if (etd->fw_version & 0x001000) {
+ __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
+ __clear_bit(BTN_RIGHT, dev->keybit);
+ }
+}
+
+/*
* Set the appropriate event bits for the input subsystem
*/
static int elantech_set_input_params(struct psmouse *psmouse)
@@ -1026,6 +1065,8 @@ static int elantech_set_input_params(struct psmouse *psmouse)
__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
/* fall through */
case 3:
+ if (etd->hw_version == 3)
+ elantech_set_buttonpad_prop(psmouse);
input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
input_set_abs_params(dev, ABS_Y, y_min, y_max, 0, 0);
if (etd->reports_pressure) {
@@ -1047,9 +1088,7 @@ static int elantech_set_input_params(struct psmouse *psmouse)
*/
psmouse_warn(psmouse, "couldn't query resolution data.\n");
}
- /* v4 is clickpad, with only one button. */
- __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
- __clear_bit(BTN_RIGHT, dev->keybit);
+ elantech_set_buttonpad_prop(psmouse);
__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
/* For X to recognize me as touchpad. */
input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 087/131] KVM: MMU: handle invalid root_hpa at __direct_map
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (85 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 086/131] Input: elantech - improve clickpad detection Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 088/131] KVM: VMX: fix use after free of vmx->loaded_vmcs Luis Henriques
` (43 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Marcelo Tosatti, Paolo Bonzini, Josh Boyer, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Marcelo Tosatti <mtosatti@redhat.com>
commit 989c6b34f6a9480e397b170cc62237e89bf4fdb9 upstream.
It is possible for __direct_map to be called on invalid root_hpa
(-1), two examples:
1) try_async_pf -> can_do_async_pf
-> vmx_interrupt_allowed -> nested_vmx_vmexit
2) vmx_handle_exit -> vmx_interrupt_allowed -> nested_vmx_vmexit
Then to load_vmcs12_host_state and kvm_mmu_reset_context.
Check for this possibility, let fault exception be regenerated.
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=924916
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/x86/kvm/mmu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 9e9285a..5239897 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -2691,6 +2691,9 @@ static int __direct_map(struct kvm_vcpu *vcpu, gpa_t v, int write,
int emulate = 0;
gfn_t pseudo_gfn;
+ if (!VALID_PAGE(vcpu->arch.mmu.root_hpa))
+ return 0;
+
for_each_shadow_entry(vcpu, (u64)gfn << PAGE_SHIFT, iterator) {
if (iterator.level == level) {
mmu_set_spte(vcpu, iterator.sptep, ACC_ALL,
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 088/131] KVM: VMX: fix use after free of vmx->loaded_vmcs
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (86 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 087/131] KVM: MMU: handle invalid root_hpa at __direct_map Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 089/131] Input: wacom - make sure touch_max is set for touch devices Luis Henriques
` (42 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Marcelo Tosatti, Josh Boyer, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Marcelo Tosatti <mtosatti@redhat.com>
commit 26a865f4aa8e66a6d94958de7656f7f1b03c6c56 upstream.
After free_loaded_vmcs executes, the "loaded_vmcs" structure
is kfreed, and now vmx->loaded_vmcs points to a kfreed area.
Subsequent free_loaded_vmcs then attempts to manipulate
vmx->loaded_vmcs.
Switch the order to avoid the problem.
https://bugzilla.redhat.com/show_bug.cgi?id=1047892
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/x86/kvm/vmx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 064d0be..aef3d79 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -7142,8 +7142,8 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
struct vcpu_vmx *vmx = to_vmx(vcpu);
free_vpid(vmx);
- free_nested(vmx);
free_loaded_vmcs(vmx->loaded_vmcs);
+ free_nested(vmx);
kfree(vmx->guest_msrs);
kvm_vcpu_uninit(vcpu);
kmem_cache_free(kvm_vcpu_cache, vmx);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 089/131] Input: wacom - make sure touch_max is set for touch devices
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (87 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 088/131] KVM: VMX: fix use after free of vmx->loaded_vmcs Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 090/131] e100: Fix "disabling already-disabled device" warning Luis Henriques
` (41 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Ping Cheng, Dmitry Torokhov, Josh Boyer, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping Cheng <pinglinux@gmail.com>
commit 1d0d6df02750b4a6f466768cbfbf860e24f4c8d4 upstream.
Old single touch Tablet PCs do not have touch_max set at
wacom_features. Since touch device at lease supports one
finger, assign touch_max to 1 when touch usage is defined
in its HID Descriptor and touch_max is not pre-defined.
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/input/tablet/wacom_sys.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index aaf23ae..3d838c0 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -339,7 +339,7 @@ static int wacom_parse_hid(struct usb_interface *intf,
struct usb_device *dev = interface_to_usbdev(intf);
char limit = 0;
/* result has to be defined as int for some devices */
- int result = 0;
+ int result = 0, touch_max = 0;
int i = 0, usage = WCM_UNDEFINED, finger = 0, pen = 0;
unsigned char *report;
@@ -386,7 +386,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
if (usage == WCM_DESKTOP) {
if (finger) {
features->device_type = BTN_TOOL_FINGER;
-
+ /* touch device at least supports one touch point */
+ touch_max = 1;
switch (features->type) {
case TABLETPC2FG:
features->pktlen = WACOM_PKGLEN_TPC2FG;
@@ -539,6 +540,8 @@ static int wacom_parse_hid(struct usb_interface *intf,
}
out:
+ if (!features->touch_max && touch_max)
+ features->touch_max = touch_max;
result = 0;
kfree(report);
return result;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 090/131] e100: Fix "disabling already-disabled device" warning
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (88 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 089/131] Input: wacom - make sure touch_max is set for touch devices Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 091/131] bio-integrity: Fix bio_integrity_verify segment start bug Luis Henriques
` (40 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Michele Baldessari, Aaron Brown, David S. Miller, Josh Boyer,
Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Michele Baldessari <michele@acksyn.org>
commit 2b6e0ca175fe4a20f21ba82b1e7ccc71029c4dd4 upstream.
In https://bugzilla.redhat.com/show_bug.cgi?id=994438 and
https://bugzilla.redhat.com/show_bug.cgi?id=970480 we
received different reports of e100 throwing the following
warning:
[<c06a0ba5>] ? pci_disable_device+0x85/0x90
[<c044a153>] warn_slowpath_fmt+0x33/0x40
[<c06a0ba5>] pci_disable_device+0x85/0x90
[<f7fdf7e0>] __e100_shutdown+0x80/0x120 [e100]
[<c0476ca5>] ? check_preempt_curr+0x65/0x90
[<f7fdf8d6>] e100_suspend+0x16/0x30 [e100]
[<c06a1ebb>] pci_legacy_suspend+0x2b/0xb0
[<c098fc0f>] ? wait_for_completion+0x1f/0xd0
[<c06a2d50>] ? pci_pm_poweroff+0xb0/0xb0
[<c06a2de4>] pci_pm_freeze+0x94/0xa0
[<c0767bb7>] dpm_run_callback+0x37/0x80
[<c076a204>] ? pm_wakeup_pending+0xc4/0x140
[<c0767f12>] __device_suspend+0xb2/0x1f0
[<c076806f>] async_suspend+0x1f/0x90
[<c04706e5>] async_run_entry_fn+0x35/0x140
[<c0478aef>] ? wake_up_process+0x1f/0x40
[<c0464495>] process_one_work+0x115/0x370
[<c0462645>] ? start_worker+0x25/0x30
[<c0464dc5>] ? manage_workers.isra.27+0x1a5/0x250
[<c0464f6e>] worker_thread+0xfe/0x330
[<c0464e70>] ? manage_workers.isra.27+0x250/0x250
[<c046a224>] kthread+0x94/0xa0
[<c0997f37>] ret_from_kernel_thread+0x1b/0x28
[<c046a190>] ? insert_kthread_work+0x30/0x30
This patch removes pci_disable_device() from __e100_shutdown().
pci_clear_master() is enough.
Signed-off-by: Michele Baldessari <michele@acksyn.org>
Tested-by: Mark Harig <idirectscm@aim.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/net/ethernet/intel/e100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index 5115ae7..e1aaedb 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -3039,7 +3039,7 @@ static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
*enable_wake = false;
}
- pci_disable_device(pdev);
+ pci_clear_master(pdev);
}
static int __e100_power_off(struct pci_dev *pdev, bool wake)
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 091/131] bio-integrity: Fix bio_integrity_verify segment start bug
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (89 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 090/131] e100: Fix "disabling already-disabled device" warning Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 092/131] fs: fix iversion handling Luis Henriques
` (39 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Martin K. Petersen, Jens Axboe, Christoph Hellwig,
Nicholas Bellinger, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicholas Bellinger <nab@linux-iscsi.org>
commit 5837c80e870bc3b12ac6a98cdc9ce7a9522a8fb6 upstream.
This patch addresses a bug in bio_integrity_verify() code that has
been causing DIF READ verify operations to be silently skipped.
The issue is that bio->bi_idx will have been incremented within
bio_advance() code in the normal blk_update_request() ->
req_bio_endio() completion path, and bio_integrity_verify() is
using bio_for_each_segment() which starts the bio segment walk
at the current bio->bi_idx.
So instead use bio_for_each_segment_all() to always start the bio
segment walk from zero, regardless of the current bio->bi_idx
value after bio_advance() has been called.
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[ luis: backported to 3.11: used Nicholas's backport to v3.10.y+ ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/bio-integrity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c
index 8dccf73..433c3b8 100644
--- a/fs/bio-integrity.c
+++ b/fs/bio-integrity.c
@@ -458,7 +458,7 @@ static int bio_integrity_verify(struct bio *bio)
bix.disk_name = bio->bi_bdev->bd_disk->disk_name;
bix.sector_size = bi->sector_size;
- bio_for_each_segment(bv, bio, i) {
+ bio_for_each_segment_all(bv, bio, i) {
void *kaddr = kmap_atomic(bv->bv_page);
bix.data_buf = kaddr + bv->bv_offset;
bix.data_size = bv->bv_len;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 092/131] fs: fix iversion handling
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (90 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 091/131] bio-integrity: Fix bio_integrity_verify segment start bug Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 093/131] ALSA: hda/realtek - Add more entry for enable HP mute led Luis Henriques
` (38 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Christoph Hellwig, Chris Mason, Ben Myers, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Hellwig <hch@infradead.org>
commit dff6efc326a4d5f305797d4a6bba14f374fdd633 upstream.
Currently notify_change directly updates i_version for size updates,
which not only is counter to how all other fields are updated through
struct iattr, but also breaks XFS, which need inode updates to happen
under its own lock, and synchronized to the structure that gets written
to the log.
Remove the update in the common code, and it to btrfs and ext4,
XFS already does a proper updaste internally and currently gets a
double update with the existing code.
IMHO this is 3.13 and -stable material and should go in through the XFS
tree.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Acked-by: Jan Kara <jack@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/attr.c | 5 -----
fs/btrfs/inode.c | 8 ++++++--
fs/ext4/inode.c | 4 ++++
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/fs/attr.c b/fs/attr.c
index 1449adb..8dd5825 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -182,11 +182,6 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
return -EPERM;
}
- if ((ia_valid & ATTR_SIZE) && IS_I_VERSION(inode)) {
- if (attr->ia_size != inode->i_size)
- inode_inc_iversion(inode);
- }
-
if ((ia_valid & ATTR_MODE)) {
umode_t amode = attr->ia_mode;
/* Flag setting protected by i_mutex */
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index f992daf..bfe5f39 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4413,8 +4413,12 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
* these flags set. For all other operations the VFS set these flags
* explicitly if it wants a timestamp update.
*/
- if (newsize != oldsize && (!(mask & (ATTR_CTIME | ATTR_MTIME))))
- inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb);
+ if (newsize != oldsize) {
+ inode_inc_iversion(inode);
+ if (!(mask & (ATTR_CTIME | ATTR_MTIME)))
+ inode->i_ctime = inode->i_mtime =
+ current_fs_time(inode->i_sb);
+ }
if (newsize > oldsize) {
truncate_pagecache(inode, oldsize, newsize);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d343bb7..0ea5961 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4598,6 +4598,10 @@ int ext4_setattr(struct dentry *dentry, struct iattr *attr)
if (attr->ia_size > sbi->s_bitmap_maxbytes)
return -EFBIG;
}
+
+ if (IS_I_VERSION(inode) && attr->ia_size != inode->i_size)
+ inode_inc_iversion(inode);
+
if (S_ISREG(inode->i_mode) &&
(attr->ia_size < inode->i_size)) {
if (ext4_should_order_data(inode)) {
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 093/131] ALSA: hda/realtek - Add more entry for enable HP mute led
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (91 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 092/131] fs: fix iversion handling Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 094/131] " Luis Henriques
` (37 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Kailang Yang, Takashi Iwai, Hui Wang, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Kailang Yang <kailang@realtek.com>
commit c60666bd2224a32606364fdbc620e4cb9446a1d1 upstream.
More HP machine need mute led support.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/pci/hda/patch_realtek.c | 47 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3bebaaf..516410e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3811,6 +3811,53 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x18e6, "HP", ALC269_FIXUP_HP_GPIO_LED),
SND_PCI_QUIRK(0x103c, 0x1973, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x1983, "HP Pavilion", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ /* ALC282 */
+ SND_PCI_QUIRK(0x103c, 0x220f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2213, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2266, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2267, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2268, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2269, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x226a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x226b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x227a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x227b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x229e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22a0, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22b2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c0, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c1, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c2, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22cd, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22ce, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22d0, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ /* ALC290 */
+ SND_PCI_QUIRK(0x103c, 0x2260, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2261, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2262, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2263, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2264, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2265, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x227d, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x227e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x227f, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2280, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2281, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2282, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x2289, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x228a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x228c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c6, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c8, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c3, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x22c4, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
SND_PCI_QUIRK(0x1043, 0x115d, "Asus 1015E", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 094/131] ALSA: hda/realtek - Add more entry for enable HP mute led
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (92 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 093/131] ALSA: hda/realtek - Add more entry for enable HP mute led Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 095/131] xtensa: introduce spill_registers_kernel macro Luis Henriques
` (36 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Kailang Yang, Takashi Iwai, Hui Wang, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Kailang Yang <kailang@realtek.com>
commit fce0a0c72618e021e29ed4e051ce6b42b218c5e6 upstream.
I lost this SSID. Add it into the fixup table.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.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 516410e..d2bd1d5 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3851,6 +3851,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x228a, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x228b, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x228c, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
+ SND_PCI_QUIRK(0x103c, 0x228d, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x228e, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x22c5, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
SND_PCI_QUIRK(0x103c, 0x22c6, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 095/131] xtensa: introduce spill_registers_kernel macro
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (93 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 094/131] " Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 096/131] dma: ste_dma40: don't dereference free:d descriptor Luis Henriques
` (35 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Max Filippov, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Filippov <jcmvbkbc@gmail.com>
commit e2fd1374c705abe4661df3fb6fadb3879c7c1846 upstream.
Most in-kernel users want registers spilled on the kernel stack and
don't require PS.EXCM to be set. That means that they don't need fixup
routine and could reuse regular window overflow mechanism for that,
which makes spill routine very simple.
Suggested-by: Chris Zankel <chris@zankel.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/xtensa/include/asm/traps.h | 44 +++++++++++++++++++-----------
arch/xtensa/kernel/entry.S | 60 ++++++++++++++++++++++++++++++++---------
2 files changed, 76 insertions(+), 28 deletions(-)
diff --git a/arch/xtensa/include/asm/traps.h b/arch/xtensa/include/asm/traps.h
index 917488a..f2faa58 100644
--- a/arch/xtensa/include/asm/traps.h
+++ b/arch/xtensa/include/asm/traps.h
@@ -22,25 +22,37 @@ extern void do_unhandled(struct pt_regs *regs, unsigned long exccause);
static inline void spill_registers(void)
{
-
+#if XCHAL_NUM_AREGS > 16
__asm__ __volatile__ (
- "movi a14, "__stringify((1 << PS_EXCM_BIT) | LOCKLEVEL)"\n\t"
- "mov a12, a0\n\t"
- "rsr a13, sar\n\t"
- "xsr a14, ps\n\t"
- "movi a0, _spill_registers\n\t"
- "rsync\n\t"
- "callx0 a0\n\t"
- "mov a0, a12\n\t"
- "wsr a13, sar\n\t"
- "wsr a14, ps\n\t"
- : :
-#if defined(CONFIG_FRAME_POINTER)
- : "a2", "a3", "a4", "a11", "a12", "a13", "a14", "a15",
+ " call12 1f\n"
+ " _j 2f\n"
+ " retw\n"
+ " .align 4\n"
+ "1:\n"
+ " _entry a1, 48\n"
+ " addi a12, a0, 3\n"
+#if XCHAL_NUM_AREGS > 32
+ " .rept (" __stringify(XCHAL_NUM_AREGS) " - 32) / 12\n"
+ " _entry a1, 48\n"
+ " mov a12, a0\n"
+ " .endr\n"
+#endif
+ " _entry a1, 48\n"
+#if XCHAL_NUM_AREGS % 12 == 0
+ " mov a8, a8\n"
+#elif XCHAL_NUM_AREGS % 12 == 4
+ " mov a12, a12\n"
+#elif XCHAL_NUM_AREGS % 12 == 8
+ " mov a4, a4\n"
+#endif
+ " retw\n"
+ "2:\n"
+ : : : "a12", "a13", "memory");
#else
- : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15",
+ __asm__ __volatile__ (
+ " mov a12, a12\n"
+ : : : "memory");
#endif
- "memory");
}
#endif /* _XTENSA_TRAPS_H */
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index 9298742..10c94e6f 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -1924,6 +1924,43 @@ ENTRY(system_call)
ENDPROC(system_call)
+/*
+ * Spill live registers on the kernel stack macro.
+ *
+ * Entry condition: ps.woe is set, ps.excm is cleared
+ * Exit condition: windowstart has single bit set
+ * May clobber: a12, a13
+ */
+ .macro spill_registers_kernel
+
+#if XCHAL_NUM_AREGS > 16
+ call12 1f
+ _j 2f
+ retw
+ .align 4
+1:
+ _entry a1, 48
+ addi a12, a0, 3
+#if XCHAL_NUM_AREGS > 32
+ .rept (XCHAL_NUM_AREGS - 32) / 12
+ _entry a1, 48
+ mov a12, a0
+ .endr
+#endif
+ _entry a1, 48
+#if XCHAL_NUM_AREGS % 12 == 0
+ mov a8, a8
+#elif XCHAL_NUM_AREGS % 12 == 4
+ mov a12, a12
+#elif XCHAL_NUM_AREGS % 12 == 8
+ mov a4, a4
+#endif
+ retw
+2:
+#else
+ mov a12, a12
+#endif
+ .endm
/*
* Task switch.
@@ -1936,21 +1973,20 @@ ENTRY(_switch_to)
entry a1, 16
- mov a12, a2 # preserve 'prev' (a2)
- mov a13, a3 # and 'next' (a3)
+ mov a10, a2 # preserve 'prev' (a2)
+ mov a11, a3 # and 'next' (a3)
l32i a4, a2, TASK_THREAD_INFO
l32i a5, a3, TASK_THREAD_INFO
- save_xtregs_user a4 a6 a8 a9 a10 a11 THREAD_XTREGS_USER
+ save_xtregs_user a4 a6 a8 a9 a12 a13 THREAD_XTREGS_USER
- s32i a0, a12, THREAD_RA # save return address
- s32i a1, a12, THREAD_SP # save stack pointer
+ s32i a0, a10, THREAD_RA # save return address
+ s32i a1, a10, THREAD_SP # save stack pointer
/* Disable ints while we manipulate the stack pointer. */
- movi a14, (1 << PS_EXCM_BIT) | LOCKLEVEL
- xsr a14, ps
+ rsil a14, LOCKLEVEL
rsr a3, excsave1
rsync
s32i a3, a3, EXC_TABLE_FIXUP /* enter critical section */
@@ -1965,7 +2001,7 @@ ENTRY(_switch_to)
/* Flush register file. */
- call0 _spill_registers # destroys a3, a4, and SAR
+ spill_registers_kernel
/* Set kernel stack (and leave critical section)
* Note: It's save to set it here. The stack will not be overwritten
@@ -1981,13 +2017,13 @@ ENTRY(_switch_to)
/* restore context of the task 'next' */
- l32i a0, a13, THREAD_RA # restore return address
- l32i a1, a13, THREAD_SP # restore stack pointer
+ l32i a0, a11, THREAD_RA # restore return address
+ l32i a1, a11, THREAD_SP # restore stack pointer
- load_xtregs_user a5 a6 a8 a9 a10 a11 THREAD_XTREGS_USER
+ load_xtregs_user a5 a6 a8 a9 a12 a13 THREAD_XTREGS_USER
wsr a14, ps
- mov a2, a12 # return 'prev'
+ mov a2, a10 # return 'prev'
rsync
retw
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 096/131] dma: ste_dma40: don't dereference free:d descriptor
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (94 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 095/131] xtensa: introduce spill_registers_kernel macro Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 097/131] ARM64: unwind: Fix PC calculation Luis Henriques
` (34 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Linus Walleij, Vinod Koul, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linus.walleij@linaro.org>
commit e9baa9d9d520fb0e24cca671e430689de2d4a4b2 upstream.
It appears that in the DMA40 driver the DMA tasklet will very
often dereference memory for a descriptor just free:d from the
DMA40 slab. Nothing happens because no other part of the driver
has yet had a chance to claim this memory, but it's really
nasty to dereference free:d memory, so let's check the flag
before the descriptor is free and store it in a bool variable.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/dma/ste_dma40.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 5ab5880..637f4c5 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -1640,6 +1640,7 @@ static void dma_tasklet(unsigned long data)
struct d40_chan *d40c = (struct d40_chan *) data;
struct d40_desc *d40d;
unsigned long flags;
+ bool callback_active;
dma_async_tx_callback callback;
void *callback_param;
@@ -1667,6 +1668,7 @@ static void dma_tasklet(unsigned long data)
}
/* Callback to client */
+ callback_active = !!(d40d->txd.flags & DMA_PREP_INTERRUPT);
callback = d40d->txd.callback;
callback_param = d40d->txd.callback_param;
@@ -1689,7 +1691,7 @@ static void dma_tasklet(unsigned long data)
spin_unlock_irqrestore(&d40c->lock, flags);
- if (callback && (d40d->txd.flags & DMA_PREP_INTERRUPT))
+ if (callback_active && callback)
callback(callback_param);
return;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 097/131] ARM64: unwind: Fix PC calculation
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (95 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 096/131] dma: ste_dma40: don't dereference free:d descriptor Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 098/131] dm thin: avoid metadata commit if a pool's thin devices haven't changed Luis Henriques
` (33 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Olof Johansson, Catalin Marinas, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Olof Johansson <olof@lixom.net>
commit e306dfd06fcb44d21c80acb8e5a88d55f3d1cf63 upstream.
The frame PC value in the unwind code used to just take the saved LR
value and use that. That's incorrect as a stack trace, since it shows
the return path stack, not the call path stack.
In particular, it shows faulty information in case the bl is done as
the very last instruction of one label, since the return point will be
in the next label. That can easily be seen with tail calls to panic(),
which is marked __noreturn and thus doesn't have anything useful after it.
Easiest here is to just correct the unwind code and do a -4, to get the
actual call site for the backtrace instead of the return site.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/arm64/kernel/stacktrace.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/stacktrace.c b/arch/arm64/kernel/stacktrace.c
index d25459f..048334b 100644
--- a/arch/arm64/kernel/stacktrace.c
+++ b/arch/arm64/kernel/stacktrace.c
@@ -48,7 +48,11 @@ int unwind_frame(struct stackframe *frame)
frame->sp = fp + 0x10;
frame->fp = *(unsigned long *)(fp);
- frame->pc = *(unsigned long *)(fp + 8);
+ /*
+ * -4 here because we care about the PC at time of bl,
+ * not where the return will go.
+ */
+ frame->pc = *(unsigned long *)(fp + 8) - 4;
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 098/131] dm thin: avoid metadata commit if a pool's thin devices haven't changed
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (96 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 097/131] ARM64: unwind: Fix PC calculation Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 099/131] iio:gyro: bug on L3GD20H gyroscope support Luis Henriques
` (32 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Mike Snitzer, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Snitzer <snitzer@redhat.com>
commit 4d1662a30dde6e545086fe0e8fd7e474c4e0b639 upstream.
Commit 905e51b ("dm thin: commit outstanding data every second")
introduced a periodic commit. This commit occurs regardless of whether
any thin devices have made changes.
Fix the periodic commit to check if any of a pool's thin devices have
changed using dm_pool_changed_this_transaction().
Reported-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/md/dm-thin-metadata.c | 17 +++++++++++++++++
drivers/md/dm-thin-metadata.h | 2 ++
drivers/md/dm-thin.c | 3 ++-
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-thin-metadata.c b/drivers/md/dm-thin-metadata.c
index 7da3476..3bb4506 100644
--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -1489,6 +1489,23 @@ bool dm_thin_changed_this_transaction(struct dm_thin_device *td)
return r;
}
+bool dm_pool_changed_this_transaction(struct dm_pool_metadata *pmd)
+{
+ bool r = false;
+ struct dm_thin_device *td, *tmp;
+
+ down_read(&pmd->root_lock);
+ list_for_each_entry_safe(td, tmp, &pmd->thin_devices, list) {
+ if (td->changed) {
+ r = td->changed;
+ break;
+ }
+ }
+ up_read(&pmd->root_lock);
+
+ return r;
+}
+
bool dm_thin_aborted_changes(struct dm_thin_device *td)
{
bool r;
diff --git a/drivers/md/dm-thin-metadata.h b/drivers/md/dm-thin-metadata.h
index 2edf5db..c6d123b 100644
--- a/drivers/md/dm-thin-metadata.h
+++ b/drivers/md/dm-thin-metadata.h
@@ -161,6 +161,8 @@ int dm_thin_remove_block(struct dm_thin_device *td, dm_block_t block);
*/
bool dm_thin_changed_this_transaction(struct dm_thin_device *td);
+bool dm_pool_changed_this_transaction(struct dm_pool_metadata *pmd);
+
bool dm_thin_aborted_changes(struct dm_thin_device *td);
int dm_thin_get_highest_mapped_block(struct dm_thin_device *td,
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 0a9b087..9189838 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -1346,7 +1346,8 @@ static void process_deferred_bios(struct pool *pool)
bio_list_init(&pool->deferred_flush_bios);
spin_unlock_irqrestore(&pool->lock, flags);
- if (bio_list_empty(&bios) && !need_commit_due_to_time(pool))
+ if (bio_list_empty(&bios) &&
+ !(dm_pool_changed_this_transaction(pool->pmd) && need_commit_due_to_time(pool)))
return;
if (commit(pool)) {
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 099/131] iio:gyro: bug on L3GD20H gyroscope support
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (97 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 098/131] dm thin: avoid metadata commit if a pool's thin devices haven't changed Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 100/131] ASoC: sta32x: Fix array access overflow Luis Henriques
` (31 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Denis Ciocca, Jonathan Cameron, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Denis CIOCCA <denis.ciocca@st.com>
commit a0657716416f834ef7710a9044614d50a36c3bdc upstream.
The driver was not able to manage the sensor: during probe function
and wai check, the driver stops and writes: "device name and WhoAmI mismatch."
The correct value of L3GD20H wai is 0xd7 instead of 0xd4.
Dropped support for the sensor.
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/iio/gyro/Kconfig | 2 +-
drivers/iio/gyro/st_gyro.h | 1 -
drivers/iio/gyro/st_gyro_core.c | 9 ++++-----
drivers/iio/gyro/st_gyro_i2c.c | 1 -
drivers/iio/gyro/st_gyro_spi.c | 1 -
5 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/iio/gyro/Kconfig b/drivers/iio/gyro/Kconfig
index 8498e9d..c400416 100644
--- a/drivers/iio/gyro/Kconfig
+++ b/drivers/iio/gyro/Kconfig
@@ -56,7 +56,7 @@ config IIO_ST_GYRO_3AXIS
select IIO_TRIGGERED_BUFFER if (IIO_BUFFER)
help
Say yes here to build support for STMicroelectronics gyroscopes:
- L3G4200D, LSM330DL, L3GD20, L3GD20H, LSM330DLC, L3G4IS, LSM330.
+ L3G4200D, LSM330DL, L3GD20, LSM330DLC, L3G4IS, LSM330.
This driver can also be built as a module. If so, will be created
these modules:
diff --git a/drivers/iio/gyro/st_gyro.h b/drivers/iio/gyro/st_gyro.h
index 3ad9907..25ee236 100644
--- a/drivers/iio/gyro/st_gyro.h
+++ b/drivers/iio/gyro/st_gyro.h
@@ -19,7 +19,6 @@
#define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro"
#define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro"
#define L3GD20_GYRO_DEV_NAME "l3gd20"
-#define L3GD20H_GYRO_DEV_NAME "l3gd20h"
#define L3G4IS_GYRO_DEV_NAME "l3g4is_ui"
#define LSM330_GYRO_DEV_NAME "lsm330_gyro"
diff --git a/drivers/iio/gyro/st_gyro_core.c b/drivers/iio/gyro/st_gyro_core.c
index f9ed348..e0289e1 100644
--- a/drivers/iio/gyro/st_gyro_core.c
+++ b/drivers/iio/gyro/st_gyro_core.c
@@ -167,11 +167,10 @@ static const struct st_sensors st_gyro_sensors[] = {
.wai = ST_GYRO_2_WAI_EXP,
.sensors_supported = {
[0] = L3GD20_GYRO_DEV_NAME,
- [1] = L3GD20H_GYRO_DEV_NAME,
- [2] = LSM330D_GYRO_DEV_NAME,
- [3] = LSM330DLC_GYRO_DEV_NAME,
- [4] = L3G4IS_GYRO_DEV_NAME,
- [5] = LSM330_GYRO_DEV_NAME,
+ [1] = LSM330D_GYRO_DEV_NAME,
+ [2] = LSM330DLC_GYRO_DEV_NAME,
+ [3] = L3G4IS_GYRO_DEV_NAME,
+ [4] = LSM330_GYRO_DEV_NAME,
},
.ch = (struct iio_chan_spec *)st_gyro_16bit_channels,
.odr = {
diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c
index 8a31050..c1755ce 100644
--- a/drivers/iio/gyro/st_gyro_i2c.c
+++ b/drivers/iio/gyro/st_gyro_i2c.c
@@ -61,7 +61,6 @@ static const struct i2c_device_id st_gyro_id_table[] = {
{ LSM330DL_GYRO_DEV_NAME },
{ LSM330DLC_GYRO_DEV_NAME },
{ L3GD20_GYRO_DEV_NAME },
- { L3GD20H_GYRO_DEV_NAME },
{ L3G4IS_GYRO_DEV_NAME },
{ LSM330_GYRO_DEV_NAME },
{},
diff --git a/drivers/iio/gyro/st_gyro_spi.c b/drivers/iio/gyro/st_gyro_spi.c
index f354039..b37fc9e 100644
--- a/drivers/iio/gyro/st_gyro_spi.c
+++ b/drivers/iio/gyro/st_gyro_spi.c
@@ -60,7 +60,6 @@ static const struct spi_device_id st_gyro_id_table[] = {
{ LSM330DL_GYRO_DEV_NAME },
{ LSM330DLC_GYRO_DEV_NAME },
{ L3GD20_GYRO_DEV_NAME },
- { L3GD20H_GYRO_DEV_NAME },
{ L3G4IS_GYRO_DEV_NAME },
{ LSM330_GYRO_DEV_NAME },
{},
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 100/131] ASoC: sta32x: Fix array access overflow
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (98 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 099/131] iio:gyro: bug on L3GD20H gyroscope support Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 101/131] ASoC: wm8770: Fix wrong number of enum items Luis Henriques
` (30 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Takashi Iwai, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 025c3fa9256d4c54506b7a29dc3befac54f5c68d upstream.
Preset EQ enum of sta32x codec driver declares too many number of
items and it may lead to the access over the actual array size.
Use SOC_ENUM_SINGLE_DECL() helper and it's automatically fixed.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/soc/codecs/sta32x.c | 72 +++++++++++++++++++++++------------------------
1 file changed, 36 insertions(+), 36 deletions(-)
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index cfb55fe..dc5e7f5 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -187,42 +187,42 @@ static const unsigned int sta32x_limiter_drc_release_tlv[] = {
13, 16, TLV_DB_SCALE_ITEM(-1500, 300, 0),
};
-static const struct soc_enum sta32x_drc_ac_enum =
- SOC_ENUM_SINGLE(STA32X_CONFD, STA32X_CONFD_DRC_SHIFT,
- 2, sta32x_drc_ac);
-static const struct soc_enum sta32x_auto_eq_enum =
- SOC_ENUM_SINGLE(STA32X_AUTO1, STA32X_AUTO1_AMEQ_SHIFT,
- 3, sta32x_auto_eq_mode);
-static const struct soc_enum sta32x_auto_gc_enum =
- SOC_ENUM_SINGLE(STA32X_AUTO1, STA32X_AUTO1_AMGC_SHIFT,
- 4, sta32x_auto_gc_mode);
-static const struct soc_enum sta32x_auto_xo_enum =
- SOC_ENUM_SINGLE(STA32X_AUTO2, STA32X_AUTO2_XO_SHIFT,
- 16, sta32x_auto_xo_mode);
-static const struct soc_enum sta32x_preset_eq_enum =
- SOC_ENUM_SINGLE(STA32X_AUTO3, STA32X_AUTO3_PEQ_SHIFT,
- 32, sta32x_preset_eq_mode);
-static const struct soc_enum sta32x_limiter_ch1_enum =
- SOC_ENUM_SINGLE(STA32X_C1CFG, STA32X_CxCFG_LS_SHIFT,
- 3, sta32x_limiter_select);
-static const struct soc_enum sta32x_limiter_ch2_enum =
- SOC_ENUM_SINGLE(STA32X_C2CFG, STA32X_CxCFG_LS_SHIFT,
- 3, sta32x_limiter_select);
-static const struct soc_enum sta32x_limiter_ch3_enum =
- SOC_ENUM_SINGLE(STA32X_C3CFG, STA32X_CxCFG_LS_SHIFT,
- 3, sta32x_limiter_select);
-static const struct soc_enum sta32x_limiter1_attack_rate_enum =
- SOC_ENUM_SINGLE(STA32X_L1AR, STA32X_LxA_SHIFT,
- 16, sta32x_limiter_attack_rate);
-static const struct soc_enum sta32x_limiter2_attack_rate_enum =
- SOC_ENUM_SINGLE(STA32X_L2AR, STA32X_LxA_SHIFT,
- 16, sta32x_limiter_attack_rate);
-static const struct soc_enum sta32x_limiter1_release_rate_enum =
- SOC_ENUM_SINGLE(STA32X_L1AR, STA32X_LxR_SHIFT,
- 16, sta32x_limiter_release_rate);
-static const struct soc_enum sta32x_limiter2_release_rate_enum =
- SOC_ENUM_SINGLE(STA32X_L2AR, STA32X_LxR_SHIFT,
- 16, sta32x_limiter_release_rate);
+static SOC_ENUM_SINGLE_DECL(sta32x_drc_ac_enum,
+ STA32X_CONFD, STA32X_CONFD_DRC_SHIFT,
+ sta32x_drc_ac);
+static SOC_ENUM_SINGLE_DECL(sta32x_auto_eq_enum,
+ STA32X_AUTO1, STA32X_AUTO1_AMEQ_SHIFT,
+ sta32x_auto_eq_mode);
+static SOC_ENUM_SINGLE_DECL(sta32x_auto_gc_enum,
+ STA32X_AUTO1, STA32X_AUTO1_AMGC_SHIFT,
+ sta32x_auto_gc_mode);
+static SOC_ENUM_SINGLE_DECL(sta32x_auto_xo_enum,
+ STA32X_AUTO2, STA32X_AUTO2_XO_SHIFT,
+ sta32x_auto_xo_mode);
+static SOC_ENUM_SINGLE_DECL(sta32x_preset_eq_enum,
+ STA32X_AUTO3, STA32X_AUTO3_PEQ_SHIFT,
+ sta32x_preset_eq_mode);
+static SOC_ENUM_SINGLE_DECL(sta32x_limiter_ch1_enum,
+ STA32X_C1CFG, STA32X_CxCFG_LS_SHIFT,
+ sta32x_limiter_select);
+static SOC_ENUM_SINGLE_DECL(sta32x_limiter_ch2_enum,
+ STA32X_C2CFG, STA32X_CxCFG_LS_SHIFT,
+ sta32x_limiter_select);
+static SOC_ENUM_SINGLE_DECL(sta32x_limiter_ch3_enum,
+ STA32X_C3CFG, STA32X_CxCFG_LS_SHIFT,
+ sta32x_limiter_select);
+static SOC_ENUM_SINGLE_DECL(sta32x_limiter1_attack_rate_enum,
+ STA32X_L1AR, STA32X_LxA_SHIFT,
+ sta32x_limiter_attack_rate);
+static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_attack_rate_enum,
+ STA32X_L2AR, STA32X_LxA_SHIFT,
+ sta32x_limiter_attack_rate);
+static SOC_ENUM_SINGLE_DECL(sta32x_limiter1_release_rate_enum,
+ STA32X_L1AR, STA32X_LxR_SHIFT,
+ sta32x_limiter_release_rate);
+static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum,
+ STA32X_L2AR, STA32X_LxR_SHIFT,
+ sta32x_limiter_release_rate);
/* byte array controls for setting biquad, mixer, scaling coefficients;
* for biquads all five coefficients need to be set in one go,
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 101/131] ASoC: wm8770: Fix wrong number of enum items
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (99 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 100/131] ASoC: sta32x: Fix array access overflow Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 102/131] Input - arizona-haptics: Fix double lock of dapm_mutex Luis Henriques
` (29 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Takashi Iwai, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 7a6c0a58dc824523966f212c76322d47c5b0e6fe upstream.
wm8770 codec driver defines ain_enum with a wrong number of items.
Use SOC_ENUM_DOUBLE_DECL() macro and it's automatically fixed.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/soc/codecs/wm8770.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c
index 89a18d8..5bce210 100644
--- a/sound/soc/codecs/wm8770.c
+++ b/sound/soc/codecs/wm8770.c
@@ -196,8 +196,8 @@ static const char *ain_text[] = {
"AIN5", "AIN6", "AIN7", "AIN8"
};
-static const struct soc_enum ain_enum =
- SOC_ENUM_DOUBLE(WM8770_ADCMUX, 0, 4, 8, ain_text);
+static SOC_ENUM_DOUBLE_DECL(ain_enum,
+ WM8770_ADCMUX, 0, 4, ain_text);
static const struct snd_kcontrol_new ain_mux =
SOC_DAPM_ENUM("Capture Mux", ain_enum);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 102/131] Input - arizona-haptics: Fix double lock of dapm_mutex
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (100 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 101/131] ASoC: wm8770: Fix wrong number of enum items Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 103/131] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions Luis Henriques
` (28 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Charles Keepax, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
commit c4204960e9d0ba99459dbf1db918f99a45e7a62a upstream.
snd_soc_dapm_sync takes the dapm_mutex internally, but we currently take
it externally as well. This patch fixes this.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/input/misc/arizona-haptics.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c
index 7a04f54..e7e12a5 100644
--- a/drivers/input/misc/arizona-haptics.c
+++ b/drivers/input/misc/arizona-haptics.c
@@ -77,16 +77,14 @@ static void arizona_haptics_work(struct work_struct *work)
return;
}
+ mutex_unlock(dapm_mutex);
+
ret = snd_soc_dapm_sync(arizona->dapm);
if (ret != 0) {
dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
ret);
- mutex_unlock(dapm_mutex);
return;
}
-
- mutex_unlock(dapm_mutex);
-
} else {
/* This disable sequence will be a noop if already enabled */
mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
@@ -99,16 +97,15 @@ static void arizona_haptics_work(struct work_struct *work)
return;
}
+ mutex_unlock(dapm_mutex);
+
ret = snd_soc_dapm_sync(arizona->dapm);
if (ret != 0) {
dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
ret);
- mutex_unlock(dapm_mutex);
return;
}
- mutex_unlock(dapm_mutex);
-
ret = regmap_update_bits(arizona->regmap,
ARIZONA_HAPTICS_CONTROL_1,
ARIZONA_HAP_CTRL_MASK,
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 103/131] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (101 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 102/131] Input - arizona-haptics: Fix double lock of dapm_mutex Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 104/131] SELinux: bigendian problems with filename trans rules Luis Henriques
` (27 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Charles Keepax, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
commit 113911006442a36c2b4669faf1699d9042ef80ab upstream.
The snd_soc_dapm_xxxx_pin all require the dapm_mutex to be held when
they are called as they edit the dirty list, however very few of the
callers do so.
This patch adds unlocked versions of all the functions replacing the
existing implementations with one that holds the lock internally. We
also fix up the places where the lock was actually held on the caller
side.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/extcon/extcon-arizona.c | 12 ----
drivers/input/misc/arizona-haptics.c | 16 -----
include/sound/soc-dapm.h | 8 +++
sound/soc/soc-dapm.c | 133 ++++++++++++++++++++++++++++++++---
4 files changed, 131 insertions(+), 38 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 7a1b4a7..e46532a 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -212,27 +212,19 @@ static void arizona_extcon_pulse_micbias(struct arizona_extcon_info *info)
struct snd_soc_dapm_context *dapm = arizona->dapm;
int ret;
- mutex_lock(&dapm->card->dapm_mutex);
-
ret = snd_soc_dapm_force_enable_pin(dapm, widget);
if (ret != 0)
dev_warn(arizona->dev, "Failed to enable %s: %d\n",
widget, ret);
- mutex_unlock(&dapm->card->dapm_mutex);
-
snd_soc_dapm_sync(dapm);
if (!arizona->pdata.micd_force_micbias) {
- mutex_lock(&dapm->card->dapm_mutex);
-
ret = snd_soc_dapm_disable_pin(arizona->dapm, widget);
if (ret != 0)
dev_warn(arizona->dev, "Failed to disable %s: %d\n",
widget, ret);
- mutex_unlock(&dapm->card->dapm_mutex);
-
snd_soc_dapm_sync(dapm);
}
}
@@ -294,16 +286,12 @@ static void arizona_stop_mic(struct arizona_extcon_info *info)
ARIZONA_MICD_ENA, 0,
&change);
- mutex_lock(&dapm->card->dapm_mutex);
-
ret = snd_soc_dapm_disable_pin(dapm, widget);
if (ret != 0)
dev_warn(arizona->dev,
"Failed to disable %s: %d\n",
widget, ret);
- mutex_unlock(&dapm->card->dapm_mutex);
-
snd_soc_dapm_sync(dapm);
if (info->micd_reva) {
diff --git a/drivers/input/misc/arizona-haptics.c b/drivers/input/misc/arizona-haptics.c
index e7e12a5..ef2e281 100644
--- a/drivers/input/misc/arizona-haptics.c
+++ b/drivers/input/misc/arizona-haptics.c
@@ -37,7 +37,6 @@ static void arizona_haptics_work(struct work_struct *work)
struct arizona_haptics,
work);
struct arizona *arizona = haptics->arizona;
- struct mutex *dapm_mutex = &arizona->dapm->card->dapm_mutex;
int ret;
if (!haptics->arizona->dapm) {
@@ -67,18 +66,13 @@ static void arizona_haptics_work(struct work_struct *work)
return;
}
- mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
ret = snd_soc_dapm_enable_pin(arizona->dapm, "HAPTICS");
if (ret != 0) {
dev_err(arizona->dev, "Failed to start HAPTICS: %d\n",
ret);
- mutex_unlock(dapm_mutex);
return;
}
- mutex_unlock(dapm_mutex);
-
ret = snd_soc_dapm_sync(arizona->dapm);
if (ret != 0) {
dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
@@ -87,18 +81,13 @@ static void arizona_haptics_work(struct work_struct *work)
}
} else {
/* This disable sequence will be a noop if already enabled */
- mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
ret = snd_soc_dapm_disable_pin(arizona->dapm, "HAPTICS");
if (ret != 0) {
dev_err(arizona->dev, "Failed to disable HAPTICS: %d\n",
ret);
- mutex_unlock(dapm_mutex);
return;
}
- mutex_unlock(dapm_mutex);
-
ret = snd_soc_dapm_sync(arizona->dapm);
if (ret != 0) {
dev_err(arizona->dev, "Failed to sync DAPM: %d\n",
@@ -152,16 +141,11 @@ static int arizona_haptics_play(struct input_dev *input, void *data,
static void arizona_haptics_close(struct input_dev *input)
{
struct arizona_haptics *haptics = input_get_drvdata(input);
- struct mutex *dapm_mutex = &haptics->arizona->dapm->card->dapm_mutex;
cancel_work_sync(&haptics->work);
- mutex_lock_nested(dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
if (haptics->arizona->dapm)
snd_soc_dapm_disable_pin(haptics->arizona->dapm, "HAPTICS");
-
- mutex_unlock(dapm_mutex);
}
static int arizona_haptics_probe(struct platform_device *pdev)
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 3e479f4..e1108e5 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -404,14 +404,22 @@ void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
/* dapm audio pin control and status */
int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm,
const char *pin);
+int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+ const char *pin);
int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
const char *pin);
+int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+ const char *pin);
int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin);
+int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
+ const char *pin);
int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
const char *pin);
int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm);
int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
const char *pin);
+int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+ const char *pin);
int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
const char *pin);
void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec);
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 8e90cbe..626506c 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3046,15 +3046,11 @@ int snd_soc_dapm_put_pin_switch(struct snd_kcontrol *kcontrol,
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
const char *pin = (const char *)kcontrol->private_value;
- mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
-
if (ucontrol->value.integer.value[0])
snd_soc_dapm_enable_pin(&card->dapm, pin);
else
snd_soc_dapm_disable_pin(&card->dapm, pin);
- mutex_unlock(&card->dapm_mutex);
-
snd_soc_dapm_sync(&card->dapm);
return 0;
}
@@ -3554,23 +3550,52 @@ void snd_soc_dapm_stream_event(struct snd_soc_pcm_runtime *rtd, int stream,
}
/**
+ * snd_soc_dapm_enable_pin_unlocked - enable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Enables input/output pin and its parents or children widgets iff there is
+ * a valid audio route and active audio stream.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+ const char *pin)
+{
+ return snd_soc_dapm_set_pin(dapm, pin, 1);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin_unlocked);
+
+/**
* snd_soc_dapm_enable_pin - enable pin.
* @dapm: DAPM context
* @pin: pin name
*
* Enables input/output pin and its parents or children widgets iff there is
* a valid audio route and active audio stream.
+ *
* NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
* do any widget power switching.
*/
int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, const char *pin)
{
- return snd_soc_dapm_set_pin(dapm, pin, 1);
+ int ret;
+
+ mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+ ret = snd_soc_dapm_set_pin(dapm, pin, 1);
+
+ mutex_unlock(&dapm->card->dapm_mutex);
+
+ return ret;
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin);
/**
- * snd_soc_dapm_force_enable_pin - force a pin to be enabled
+ * snd_soc_dapm_force_enable_pin_unlocked - force a pin to be enabled
* @dapm: DAPM context
* @pin: pin name
*
@@ -3578,11 +3603,13 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_enable_pin);
* intended for use with microphone bias supplies used in microphone
* jack detection.
*
+ * Requires external locking.
+ *
* NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
* do any widget power switching.
*/
-int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
- const char *pin)
+int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+ const char *pin)
{
struct snd_soc_dapm_widget *w = dapm_find_widget(dapm, pin, true);
@@ -3598,25 +3625,103 @@ int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
return 0;
}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_force_enable_pin_unlocked);
+
+/**
+ * snd_soc_dapm_force_enable_pin - force a pin to be enabled
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Enables input/output pin regardless of any other state. This is
+ * intended for use with microphone bias supplies used in microphone
+ * jack detection.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
+ const char *pin)
+{
+ int ret;
+
+ mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+ ret = snd_soc_dapm_force_enable_pin_unlocked(dapm, pin);
+
+ mutex_unlock(&dapm->card->dapm_mutex);
+
+ return ret;
+}
EXPORT_SYMBOL_GPL(snd_soc_dapm_force_enable_pin);
/**
+ * snd_soc_dapm_disable_pin_unlocked - disable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Disables input/output pin and its parents or children widgets.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
+ const char *pin)
+{
+ return snd_soc_dapm_set_pin(dapm, pin, 0);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin_unlocked);
+
+/**
* snd_soc_dapm_disable_pin - disable pin.
* @dapm: DAPM context
* @pin: pin name
*
* Disables input/output pin and its parents or children widgets.
+ *
* NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
* do any widget power switching.
*/
int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
const char *pin)
{
- return snd_soc_dapm_set_pin(dapm, pin, 0);
+ int ret;
+
+ mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+ ret = snd_soc_dapm_set_pin(dapm, pin, 0);
+
+ mutex_unlock(&dapm->card->dapm_mutex);
+
+ return ret;
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin);
/**
+ * snd_soc_dapm_nc_pin_unlocked - permanently disable pin.
+ * @dapm: DAPM context
+ * @pin: pin name
+ *
+ * Marks the specified pin as being not connected, disabling it along
+ * any parent or child widgets. At present this is identical to
+ * snd_soc_dapm_disable_pin() but in future it will be extended to do
+ * additional things such as disabling controls which only affect
+ * paths through the pin.
+ *
+ * Requires external locking.
+ *
+ * NOTE: snd_soc_dapm_sync() needs to be called after this for DAPM to
+ * do any widget power switching.
+ */
+int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
+ const char *pin)
+{
+ return snd_soc_dapm_set_pin(dapm, pin, 0);
+}
+EXPORT_SYMBOL_GPL(snd_soc_dapm_nc_pin_unlocked);
+
+/**
* snd_soc_dapm_nc_pin - permanently disable pin.
* @dapm: DAPM context
* @pin: pin name
@@ -3632,7 +3737,15 @@ EXPORT_SYMBOL_GPL(snd_soc_dapm_disable_pin);
*/
int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin)
{
- return snd_soc_dapm_set_pin(dapm, pin, 0);
+ int ret;
+
+ mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
+
+ ret = snd_soc_dapm_set_pin(dapm, pin, 0);
+
+ mutex_unlock(&dapm->card->dapm_mutex);
+
+ return ret;
}
EXPORT_SYMBOL_GPL(snd_soc_dapm_nc_pin);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 104/131] SELinux: bigendian problems with filename trans rules
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (102 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 103/131] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 105/131] quota: Fix race between dqput() and dquot_scan_active() Luis Henriques
` (26 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Eric Paris, Paul Moore, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Paris <eparis@redhat.com>
commit 9085a6422900092886da8c404e1c5340c4ff1cbf upstream.
When writing policy via /sys/fs/selinux/policy I wrote the type and class
of filename trans rules in CPU endian instead of little endian. On
x86_64 this works just fine, but it means that on big endian arch's like
ppc64 and s390 userspace reads the policy and converts it from
le32_to_cpu. So the values are all screwed up. Write the values in le
format like it should have been to start.
Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
security/selinux/ss/policydb.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 7e5bced..4d35eb7 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -3261,10 +3261,10 @@ static int filename_write_helper(void *key, void *data, void *ptr)
if (rc)
return rc;
- buf[0] = ft->stype;
- buf[1] = ft->ttype;
- buf[2] = ft->tclass;
- buf[3] = otype->otype;
+ buf[0] = cpu_to_le32(ft->stype);
+ buf[1] = cpu_to_le32(ft->ttype);
+ buf[2] = cpu_to_le32(ft->tclass);
+ buf[3] = cpu_to_le32(otype->otype);
rc = put_entry(buf, sizeof(u32), 4, fp);
if (rc)
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 105/131] quota: Fix race between dqput() and dquot_scan_active()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (103 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 104/131] SELinux: bigendian problems with filename trans rules Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 106/131] ASoC: sta32x: Fix cache sync Luis Henriques
` (25 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Jan Kara, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Kara <jack@suse.cz>
commit 1362f4ea20fa63688ba6026e586d9746ff13a846 upstream.
Currently last dqput() can race with dquot_scan_active() causing it to
call callback for an already deactivated dquot. The race is as follows:
CPU1 CPU2
dqput()
spin_lock(&dq_list_lock);
if (atomic_read(&dquot->dq_count) > 1) {
- not taken
if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) {
spin_unlock(&dq_list_lock);
->release_dquot(dquot);
if (atomic_read(&dquot->dq_count) > 1)
- not taken
dquot_scan_active()
spin_lock(&dq_list_lock);
if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags))
- not taken
atomic_inc(&dquot->dq_count);
spin_unlock(&dq_list_lock);
- proceeds to release dquot
ret = fn(dquot, priv);
- called for inactive dquot
Fix the problem by making sure possible ->release_dquot() is finished by
the time we call the callback and new calls to it will notice reference
dquot_scan_active() has taken and bail out.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
fs/quota/dquot.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index fbad622..e980b6f 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -581,9 +581,17 @@ int dquot_scan_active(struct super_block *sb,
dqstats_inc(DQST_LOOKUPS);
dqput(old_dquot);
old_dquot = dquot;
- ret = fn(dquot, priv);
- if (ret < 0)
- goto out;
+ /*
+ * ->release_dquot() can be racing with us. Our reference
+ * protects us from new calls to it so just wait for any
+ * outstanding call and recheck the DQ_ACTIVE_B after that.
+ */
+ wait_on_dquot(dquot);
+ if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) {
+ ret = fn(dquot, priv);
+ if (ret < 0)
+ goto out;
+ }
spin_lock(&dq_list_lock);
/* We are safe to continue now because our dquot could not
* be moved out of the inuse list while we hold the reference */
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 106/131] ASoC: sta32x: Fix cache sync
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (104 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 105/131] quota: Fix race between dqput() and dquot_scan_active() Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 107/131] dm thin: fix the error path for the thin device constructor Luis Henriques
` (24 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Lars-Peter Clausen, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars-Peter Clausen <lars@metafoo.de>
commit 70ff00f82a6af0ff68f8f7b411738634ce2f20d0 upstream.
codec->control_data contains a pointer to the regmap struct of the device, not
to the device private data. Use snd_soc_codec_get_drvdata() instead.
The issue was introduced in commit 29fdf4fbbe ("ASoC: sta32x: Convert to
regmap").
Fixes: 29fdf4fbbe (ASoC: sta32x: Convert to regmap)
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/soc/codecs/sta32x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index dc5e7f5..4d8a3ae 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -331,7 +331,7 @@ static int sta32x_sync_coef_shadow(struct snd_soc_codec *codec)
static int sta32x_cache_sync(struct snd_soc_codec *codec)
{
- struct sta32x_priv *sta32x = codec->control_data;
+ struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec);
unsigned int mute;
int rc;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 107/131] dm thin: fix the error path for the thin device constructor
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (105 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 106/131] ASoC: sta32x: Fix cache sync Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 108/131] qla2xxx: Fix kernel panic on selective retransmission request Luis Henriques
` (23 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Mike Snitzer, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Mike Snitzer <snitzer@redhat.com>
commit 1acacc0784aab45627b6009e0e9224886279ac0b upstream.
dm_pool_close_thin_device() must be called if dm_set_target_max_io_len()
fails in thin_ctr(). Otherwise __pool_destroy() will fail because the
pool will still have an open thin device:
device-mapper: thin metadata: attempt to close pmd when 1 device(s) are still open
device-mapper: thin: __pool_destroy: dm_pool_metadata_close() failed.
Also, must establish error code if failing thin_ctr() because the pool
is in fail_io mode.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Acked-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/md/dm-thin.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index 9189838..b75f2a4 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -2812,6 +2812,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
if (get_pool_mode(tc->pool) == PM_FAIL) {
ti->error = "Couldn't open thin device, Pool is in fail mode";
+ r = -EINVAL;
goto bad_thin_open;
}
@@ -2823,7 +2824,7 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
r = dm_set_target_max_io_len(ti, tc->pool->sectors_per_block);
if (r)
- goto bad_thin_open;
+ goto bad_target_max_io_len;
ti->num_flush_bios = 1;
ti->flush_supported = true;
@@ -2844,6 +2845,8 @@ static int thin_ctr(struct dm_target *ti, unsigned argc, char **argv)
return 0;
+bad_target_max_io_len:
+ dm_pool_close_thin_device(tc->td);
bad_thin_open:
__pool_dec(tc->pool);
bad_pool_lookup:
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 108/131] qla2xxx: Fix kernel panic on selective retransmission request
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (106 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 107/131] dm thin: fix the error path for the thin device constructor Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 109/131] ASoC: wm8958-dsp: Fix firmware block loading Luis Henriques
` (22 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Dr. Greg Wettstein, Nicholas Bellinger, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: "Dr. Greg Wettstein" <greg@enjellic.com>
commit 6f58c780e5a5b43a6d2121e0d43cdcba1d3cc5fc upstream.
A selective retransmission request (SRR) is a fibre-channel
protocol control request which provides support for requesting
retransmission of a data sequence in response to an issue such as
frame loss or corruption. These events are experienced
infrequently in fibre-channel based networks which makes
it difficult to test and assess codepaths which handle these
events.
We were fortunate enough, for some definition of fortunate, to
have a metro-area single-mode SAN link which, at 10 GBPS
sustained load levels, would consistently generate SRR's in
a SCST based target implementation using our SCST/in-kernel
Qlogic target interface driver. In response to an SRR the
in-kernel Qlogic target driver immediately panics resulting
in a catastrophic storage failure for serviced initiators.
The culprit was a debug statement in the qla_target.c file which
does not verify that a pointer to the SCSI CDB is not null.
The unchecked pointer dereference results in the kernel panic
and resultant system failure.
The other two references to the SCSI CDB by the SRR handling code
use a ternary operator to verify a non-null pointer is being
acted on. This patch simply adds a similar test to the implicated
debug statement.
This patch is a candidate for any stable kernel being maintained
since it addresses a potentially catastrophic event with
minimal downside.
Signed-off-by: Dr. Greg Wettstein <greg@enjellic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/scsi/qla2xxx/qla_target.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 2a636c1..ba580ad 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -3215,7 +3215,8 @@ restart:
ql_dbg(ql_dbg_tgt_mgt, vha, 0xf02c,
"SRR cmd %p (se_cmd %p, tag %d, op %x), "
"sg_cnt=%d, offset=%d", cmd, &cmd->se_cmd, cmd->tag,
- se_cmd->t_task_cdb[0], cmd->sg_cnt, cmd->offset);
+ se_cmd->t_task_cdb ? se_cmd->t_task_cdb[0] : 0,
+ cmd->sg_cnt, cmd->offset);
qlt_handle_srr(vha, sctio, imm);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 109/131] ASoC: wm8958-dsp: Fix firmware block loading
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (107 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 108/131] qla2xxx: Fix kernel panic on selective retransmission request Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 110/131] ALSA: hda - Add a fixup for HP Folio 13 mute LED Luis Henriques
` (21 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Lars-Peter Clausen, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars-Peter Clausen <lars@metafoo.de>
commit 548da08fc1e245faf9b0d7c41ecd8e07984fc332 upstream.
The codec->control_data contains a pointer to the device's regmap struct. But
wm8994_bulk_write() expects a pointer to the parent wm8998 device.
The issue was introduced in commit d9a7666f ("ASoC: Remove ASoC-specific
WM8994 I/O code").
Fixes: d9a7666f ("ASoC: Remove ASoC-specific WM8994 I/O code")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/soc/codecs/wm8958-dsp2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c
index b0710d8..754f88e 100644
--- a/sound/soc/codecs/wm8958-dsp2.c
+++ b/sound/soc/codecs/wm8958-dsp2.c
@@ -153,7 +153,7 @@ static int wm8958_dsp2_fw(struct snd_soc_codec *codec, const char *name,
data32 &= 0xffffff;
- wm8994_bulk_write(codec->control_data,
+ wm8994_bulk_write(wm8994->wm8994,
data32 & 0xffffff,
block_len / 2,
(void *)(data + 8));
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 110/131] ALSA: hda - Add a fixup for HP Folio 13 mute LED
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (108 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 109/131] ASoC: wm8958-dsp: Fix firmware block loading Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 111/131] i7core_edac: Fix PCI device reference count Luis Henriques
` (20 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Takashi Iwai, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 37c367ecdb9a01c9acc980e6e17913570a1788a7 upstream.
HP Folio 13 may have a broken BIOS that doesn't set up the mute LED
GPIO properly, and the driver guesses it wrongly, too. Add a new
fixup entry for setting the GPIO pin statically for this laptop.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70991
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/pci/hda/patch_sigmatel.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 5c005d4..254515d 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -98,6 +98,7 @@ enum {
STAC_92HD83XXX_HP_LED,
STAC_92HD83XXX_HP_INV_LED,
STAC_92HD83XXX_HP_MIC_LED,
+ STAC_HP_LED_GPIO10,
STAC_92HD83XXX_HEADSET_JACK,
STAC_92HD83XXX_HP,
STAC_HP_ENVY_BASS,
@@ -2107,6 +2108,17 @@ static void stac92hd83xxx_fixup_hp_mic_led(struct hda_codec *codec,
spec->mic_mute_led_gpio = 0x08; /* GPIO3 */
}
+static void stac92hd83xxx_fixup_hp_led_gpio10(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ struct sigmatel_spec *spec = codec->spec;
+
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ spec->gpio_led = 0x10; /* GPIO4 */
+ spec->default_polarity = 0;
+ }
+}
+
static void stac92hd83xxx_fixup_headset_jack(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -2173,6 +2185,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = {
.chained = true,
.chain_id = STAC_92HD83XXX_HP,
},
+ [STAC_HP_LED_GPIO10] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = stac92hd83xxx_fixup_hp_led_gpio10,
+ .chained = true,
+ .chain_id = STAC_92HD83XXX_HP,
+ },
[STAC_92HD83XXX_HEADSET_JACK] = {
.type = HDA_FIXUP_FUNC,
.v.func = stac92hd83xxx_fixup_headset_jack,
@@ -2244,6 +2262,8 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = {
"HP", STAC_92HD83XXX_HP_cNB11_INTQUAD),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1888,
"HP Envy Spectre", STAC_HP_ENVY_BASS),
+ SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1899,
+ "HP Folio 13", STAC_HP_LED_GPIO10),
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x18df,
"HP Folio", STAC_92HD83XXX_HP_MIC_LED),
SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xff00, 0x1900,
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 111/131] i7core_edac: Fix PCI device reference count
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (109 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 110/131] ALSA: hda - Add a fixup for HP Folio 13 mute LED Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 112/131] i7300_edac: Fix " Luis Henriques
` (19 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Jean Delvare, Mauro Carvalho Chehab, Doug Thompson,
Borislav Petkov, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jean Delvare <jdelvare@suse.de>
commit c0f5eeed0f4cef4f05b74883a7160e7edde58b6a upstream.
The reference count changes done by pci_get_device can be a little
misleading when the usage diverges from the most common scheme. The
reference count of the device passed as the last parameter is always
decreased, even if the function returns no new device. So if we are
going to try alternative device IDs, we must manually increment the
device reference count before each retry. If we don't, we end up
decreasing the reference count, and after a few modprobe/rmmod cycles
the PCI devices will vanish.
In other words and as Alan put it: without this fix the EDAC code
corrupts the PCI device list.
This fixes kernel bug #50491:
https://bugzilla.kernel.org/show_bug.cgi?id=50491
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Link: http://lkml.kernel.org/r/20140224093927.7659dd9d@endymion.delvare
Reviewed-by: Alan Cox <alan@linux.intel.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/edac/i7core_edac.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 80a963d..c67fb4d 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1334,14 +1334,19 @@ static int i7core_get_onedevice(struct pci_dev **prev,
* is at addr 8086:2c40, instead of 8086:2c41. So, we need
* to probe for the alternate address in case of failure
*/
- if (dev_descr->dev_id == PCI_DEVICE_ID_INTEL_I7_NONCORE && !pdev)
+ if (dev_descr->dev_id == PCI_DEVICE_ID_INTEL_I7_NONCORE && !pdev) {
+ pci_dev_get(*prev); /* pci_get_device will put it */
pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_I7_NONCORE_ALT, *prev);
+ }
- if (dev_descr->dev_id == PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE && !pdev)
+ if (dev_descr->dev_id == PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE &&
+ !pdev) {
+ pci_dev_get(*prev); /* pci_get_device will put it */
pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_LYNNFIELD_NONCORE_ALT,
*prev);
+ }
if (!pdev) {
if (*prev) {
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 112/131] i7300_edac: Fix device reference count
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (110 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 111/131] i7core_edac: Fix PCI device reference count Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 113/131] ioat: fix tasklet tear down Luis Henriques
` (18 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Jean Delvare, Mauro Carvalho Chehab, Doug Thompson,
Borislav Petkov, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Jean Delvare <jdelvare@suse.de>
commit 75135da0d68419ef8a925f4c1d5f63d8046e314d upstream.
pci_get_device() decrements the reference count of "from" (last
argument) so when we break off the loop successfully we have only one
device reference - and we don't know which device we have. If we want
a reference to each device, we must take them explicitly and let
the pci_get_device() walk complete to avoid duplicate references.
This is serious, as over-putting device references will cause
the device to eventually disappear. Without this fix, the kernel
crashes after a few insmod/rmmod cycles.
Tested on an Intel S7000FC4UR system with a 7300 chipset.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Link: http://lkml.kernel.org/r/20140224111656.09bbb7ed@endymion.delvare
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/edac/i7300_edac.c | 38 ++++++++++++++++++++------------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/drivers/edac/i7300_edac.c b/drivers/edac/i7300_edac.c
index 9004c64..841eee3 100644
--- a/drivers/edac/i7300_edac.c
+++ b/drivers/edac/i7300_edac.c
@@ -943,33 +943,35 @@ static int i7300_get_devices(struct mem_ctl_info *mci)
/* Attempt to 'get' the MCH register we want */
pdev = NULL;
- while (!pvt->pci_dev_16_1_fsb_addr_map ||
- !pvt->pci_dev_16_2_fsb_err_regs) {
- pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_I7300_MCH_ERR, pdev);
- if (!pdev) {
- /* End of list, leave */
- i7300_printk(KERN_ERR,
- "'system address,Process Bus' "
- "device not found:"
- "vendor 0x%x device 0x%x ERR funcs "
- "(broken BIOS?)\n",
- PCI_VENDOR_ID_INTEL,
- PCI_DEVICE_ID_INTEL_I7300_MCH_ERR);
- goto error;
- }
-
+ while ((pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
+ PCI_DEVICE_ID_INTEL_I7300_MCH_ERR,
+ pdev))) {
/* Store device 16 funcs 1 and 2 */
switch (PCI_FUNC(pdev->devfn)) {
case 1:
- pvt->pci_dev_16_1_fsb_addr_map = pdev;
+ if (!pvt->pci_dev_16_1_fsb_addr_map)
+ pvt->pci_dev_16_1_fsb_addr_map =
+ pci_dev_get(pdev);
break;
case 2:
- pvt->pci_dev_16_2_fsb_err_regs = pdev;
+ if (!pvt->pci_dev_16_2_fsb_err_regs)
+ pvt->pci_dev_16_2_fsb_err_regs =
+ pci_dev_get(pdev);
break;
}
}
+ if (!pvt->pci_dev_16_1_fsb_addr_map ||
+ !pvt->pci_dev_16_2_fsb_err_regs) {
+ /* At least one device was not found */
+ i7300_printk(KERN_ERR,
+ "'system address,Process Bus' device not found:"
+ "vendor 0x%x device 0x%x ERR funcs (broken BIOS?)\n",
+ PCI_VENDOR_ID_INTEL,
+ PCI_DEVICE_ID_INTEL_I7300_MCH_ERR);
+ goto error;
+ }
+
edac_dbg(1, "System Address, processor bus- PCI Bus ID: %s %x:%x\n",
pci_name(pvt->pci_dev_16_0_fsb_ctlr),
pvt->pci_dev_16_0_fsb_ctlr->vendor,
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 113/131] ioat: fix tasklet tear down
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (111 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 112/131] i7300_edac: Fix " Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 114/131] irq-metag*: stop set_affinity vectoring to offline cpus Luis Henriques
` (17 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Ingo Molnar, Steven Rostedt, Dan Williams, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Williams <dan.j.williams@intel.com>
commit da87ca4d4ca101f177fffd84f1f0a5e4c0343557 upstream.
Since commit 77873803363c "net_dma: mark broken" we no longer pin dma
engines active for the network-receive-offload use case. As a result
the ->free_chan_resources() that occurs after the driver self test no
longer has a NET_DMA induced ->alloc_chan_resources() to back it up. A
late firing irq can lead to ksoftirqd spinning indefinitely due to the
tasklet_disable() performed by ->free_chan_resources(). Only
->alloc_chan_resources() can clear this condition in affected kernels.
This problem has been present since commit 3e037454bcfa "I/OAT: Add
support for MSI and MSI-X" in 2.6.24, but is now exposed. Given the
NET_DMA use case is deprecated we can revisit moving the driver to use
threaded irqs. For now, just tear down the irq and tasklet properly by:
1/ Disable the irq from triggering the tasklet
2/ Disable the irq from re-arming
3/ Flush inflight interrupts
4/ Flush the timer
5/ Flush inflight tasklets
References:
https://lkml.org/lkml/2014/1/27/282
https://lkml.org/lkml/2014/2/19/672
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>
Reported-by: Mike Galbraith <bitbucket@online.de>
Reported-by: Stanislav Fomichev <stfomichev@yandex-team.ru>
Tested-by: Mike Galbraith <bitbucket@online.de>
Tested-by: Stanislav Fomichev <stfomichev@yandex-team.ru>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/dma/ioat/dma.c | 52 ++++++++++++++++++++++++++++++++++++++++-------
drivers/dma/ioat/dma.h | 1 +
drivers/dma/ioat/dma_v2.c | 11 +++++-----
drivers/dma/ioat/dma_v3.c | 3 +++
4 files changed, 54 insertions(+), 13 deletions(-)
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
index 5ff6fc1..a6d1177 100644
--- a/drivers/dma/ioat/dma.c
+++ b/drivers/dma/ioat/dma.c
@@ -77,7 +77,8 @@ static irqreturn_t ioat_dma_do_interrupt(int irq, void *data)
attnstatus = readl(instance->reg_base + IOAT_ATTNSTATUS_OFFSET);
for_each_set_bit(bit, &attnstatus, BITS_PER_LONG) {
chan = ioat_chan_by_index(instance, bit);
- tasklet_schedule(&chan->cleanup_task);
+ if (test_bit(IOAT_RUN, &chan->state))
+ tasklet_schedule(&chan->cleanup_task);
}
writeb(intrctrl, instance->reg_base + IOAT_INTRCTRL_OFFSET);
@@ -93,7 +94,8 @@ static irqreturn_t ioat_dma_do_interrupt_msix(int irq, void *data)
{
struct ioat_chan_common *chan = data;
- tasklet_schedule(&chan->cleanup_task);
+ if (test_bit(IOAT_RUN, &chan->state))
+ tasklet_schedule(&chan->cleanup_task);
return IRQ_HANDLED;
}
@@ -116,7 +118,6 @@ void ioat_init_channel(struct ioatdma_device *device, struct ioat_chan_common *c
chan->timer.function = device->timer_fn;
chan->timer.data = data;
tasklet_init(&chan->cleanup_task, device->cleanup_fn, data);
- tasklet_disable(&chan->cleanup_task);
}
/**
@@ -354,13 +355,49 @@ static int ioat1_dma_alloc_chan_resources(struct dma_chan *c)
writel(((u64) chan->completion_dma) >> 32,
chan->reg_base + IOAT_CHANCMP_OFFSET_HIGH);
- tasklet_enable(&chan->cleanup_task);
+ set_bit(IOAT_RUN, &chan->state);
ioat1_dma_start_null_desc(ioat); /* give chain to dma device */
dev_dbg(to_dev(chan), "%s: allocated %d descriptors\n",
__func__, ioat->desccount);
return ioat->desccount;
}
+void ioat_stop(struct ioat_chan_common *chan)
+{
+ struct ioatdma_device *device = chan->device;
+ struct pci_dev *pdev = device->pdev;
+ int chan_id = chan_num(chan);
+ struct msix_entry *msix;
+
+ /* 1/ stop irq from firing tasklets
+ * 2/ stop the tasklet from re-arming irqs
+ */
+ clear_bit(IOAT_RUN, &chan->state);
+
+ /* flush inflight interrupts */
+ switch (device->irq_mode) {
+ case IOAT_MSIX:
+ msix = &device->msix_entries[chan_id];
+ synchronize_irq(msix->vector);
+ break;
+ case IOAT_MSI:
+ case IOAT_INTX:
+ synchronize_irq(pdev->irq);
+ break;
+ default:
+ break;
+ }
+
+ /* flush inflight timers */
+ del_timer_sync(&chan->timer);
+
+ /* flush inflight tasklet runs */
+ tasklet_kill(&chan->cleanup_task);
+
+ /* final cleanup now that everything is quiesced and can't re-arm */
+ device->cleanup_fn((unsigned long) &chan->common);
+}
+
/**
* ioat1_dma_free_chan_resources - release all the descriptors
* @chan: the channel to be cleaned
@@ -379,9 +416,7 @@ static void ioat1_dma_free_chan_resources(struct dma_chan *c)
if (ioat->desccount == 0)
return;
- tasklet_disable(&chan->cleanup_task);
- del_timer_sync(&chan->timer);
- ioat1_cleanup(ioat);
+ ioat_stop(chan);
/* Delay 100ms after reset to allow internal DMA logic to quiesce
* before removing DMA descriptor resources.
@@ -526,8 +561,11 @@ ioat1_dma_prep_memcpy(struct dma_chan *c, dma_addr_t dma_dest,
static void ioat1_cleanup_event(unsigned long data)
{
struct ioat_dma_chan *ioat = to_ioat_chan((void *) data);
+ struct ioat_chan_common *chan = &ioat->base;
ioat1_cleanup(ioat);
+ if (!test_bit(IOAT_RUN, &chan->state))
+ return;
writew(IOAT_CHANCTRL_RUN, ioat->base.reg_base + IOAT_CHANCTRL_OFFSET);
}
diff --git a/drivers/dma/ioat/dma.h b/drivers/dma/ioat/dma.h
index 54fb7b9..a1d7884 100644
--- a/drivers/dma/ioat/dma.h
+++ b/drivers/dma/ioat/dma.h
@@ -370,6 +370,7 @@ bool ioat_cleanup_preamble(struct ioat_chan_common *chan,
void ioat_kobject_add(struct ioatdma_device *device, struct kobj_type *type);
void ioat_kobject_del(struct ioatdma_device *device);
int ioat_dma_setup_interrupts(struct ioatdma_device *device);
+void ioat_stop(struct ioat_chan_common *chan);
extern const struct sysfs_ops ioat_sysfs_ops;
extern struct ioat_sysfs_entry ioat_version_attr;
extern struct ioat_sysfs_entry ioat_cap_attr;
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c
index b925e1b..1cd7610 100644
--- a/drivers/dma/ioat/dma_v2.c
+++ b/drivers/dma/ioat/dma_v2.c
@@ -190,8 +190,11 @@ static void ioat2_cleanup(struct ioat2_dma_chan *ioat)
void ioat2_cleanup_event(unsigned long data)
{
struct ioat2_dma_chan *ioat = to_ioat2_chan((void *) data);
+ struct ioat_chan_common *chan = &ioat->base;
ioat2_cleanup(ioat);
+ if (!test_bit(IOAT_RUN, &chan->state))
+ return;
writew(IOAT_CHANCTRL_RUN, ioat->base.reg_base + IOAT_CHANCTRL_OFFSET);
}
@@ -553,10 +556,10 @@ int ioat2_alloc_chan_resources(struct dma_chan *c)
ioat->issued = 0;
ioat->tail = 0;
ioat->alloc_order = order;
+ set_bit(IOAT_RUN, &chan->state);
spin_unlock_bh(&ioat->prep_lock);
spin_unlock_bh(&chan->cleanup_lock);
- tasklet_enable(&chan->cleanup_task);
ioat2_start_null_desc(ioat);
/* check that we got off the ground */
@@ -566,7 +569,6 @@ int ioat2_alloc_chan_resources(struct dma_chan *c)
} while (i++ < 20 && !is_ioat_active(status) && !is_ioat_idle(status));
if (is_ioat_active(status) || is_ioat_idle(status)) {
- set_bit(IOAT_RUN, &chan->state);
return 1 << ioat->alloc_order;
} else {
u32 chanerr = readl(chan->reg_base + IOAT_CHANERR_OFFSET);
@@ -809,11 +811,8 @@ void ioat2_free_chan_resources(struct dma_chan *c)
if (!ioat->ring)
return;
- tasklet_disable(&chan->cleanup_task);
- del_timer_sync(&chan->timer);
- device->cleanup_fn((unsigned long) c);
+ ioat_stop(chan);
device->reset_hw(chan);
- clear_bit(IOAT_RUN, &chan->state);
spin_lock_bh(&chan->cleanup_lock);
spin_lock_bh(&ioat->prep_lock);
diff --git a/drivers/dma/ioat/dma_v3.c b/drivers/dma/ioat/dma_v3.c
index 2d8216b..22e96d8 100644
--- a/drivers/dma/ioat/dma_v3.c
+++ b/drivers/dma/ioat/dma_v3.c
@@ -627,8 +627,11 @@ static void ioat3_cleanup(struct ioat2_dma_chan *ioat)
static void ioat3_cleanup_event(unsigned long data)
{
struct ioat2_dma_chan *ioat = to_ioat2_chan((void *) data);
+ struct ioat_chan_common *chan = &ioat->base;
ioat3_cleanup(ioat);
+ if (!test_bit(IOAT_RUN, &chan->state))
+ return;
writew(IOAT_CHANCTRL_RUN, ioat->base.reg_base + IOAT_CHANCTRL_OFFSET);
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 114/131] irq-metag*: stop set_affinity vectoring to offline cpus
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (112 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 113/131] ioat: fix tasklet tear down Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 115/131] ipc,mqueue: remove limits for the amount of system-wide queues Luis Henriques
` (16 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: James Hogan, Thomas Gleixner, linux-metag, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: James Hogan <james.hogan@imgtec.com>
commit f229006ec6beabf7b844653d92fa61f025fe3dcf upstream.
Fix irq_set_affinity callbacks in the Meta IRQ chip drivers to AND
cpu_online_mask into the cpumask when picking a CPU to vector the
interrupt to.
As Thomas pointed out, the /proc/irq/$N/smp_affinity interface doesn't
filter out offline CPUs, so without this patch if you offline CPU0 and
set an IRQ affinity to 0x3 it vectors the interrupt onto CPU0 even
though it is offline.
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-metag@vger.kernel.org
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/irqchip/irq-metag-ext.c | 2 +-
drivers/irqchip/irq-metag.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-metag-ext.c b/drivers/irqchip/irq-metag-ext.c
index 92c41ab..2cb474a 100644
--- a/drivers/irqchip/irq-metag-ext.c
+++ b/drivers/irqchip/irq-metag-ext.c
@@ -515,7 +515,7 @@ static int meta_intc_set_affinity(struct irq_data *data,
* one cpu (the interrupt code doesn't support it), so we just
* pick the first cpu we find in 'cpumask'.
*/
- cpu = cpumask_any(cpumask);
+ cpu = cpumask_any_and(cpumask, cpu_online_mask);
thread = cpu_2_hwthread_id[cpu];
metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR2(thread)), vec_addr);
diff --git a/drivers/irqchip/irq-metag.c b/drivers/irqchip/irq-metag.c
index 8e94d7a..c16c186 100644
--- a/drivers/irqchip/irq-metag.c
+++ b/drivers/irqchip/irq-metag.c
@@ -201,7 +201,7 @@ static int metag_internal_irq_set_affinity(struct irq_data *data,
* one cpu (the interrupt code doesn't support it), so we just
* pick the first cpu we find in 'cpumask'.
*/
- cpu = cpumask_any(cpumask);
+ cpu = cpumask_any_and(cpumask, cpu_online_mask);
thread = cpu_2_hwthread_id[cpu];
metag_out32(TBI_TRIG_VEC(TBID_SIGNUM_TR1(thread)),
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 115/131] ipc,mqueue: remove limits for the amount of system-wide queues
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (113 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 114/131] irq-metag*: stop set_affinity vectoring to offline cpus Luis Henriques
@ 2014-03-05 14:23 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 116/131] PM / hibernate: Fix restore hang in freeze_processes() Luis Henriques
` (15 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:23 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Davidlohr Bueso, Manfred Spraul, Andrew Morton, Linus Torvalds,
Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Davidlohr Bueso <davidlohr@hp.com>
commit f3713fd9cff733d9df83116422d8e4af6e86b2bb upstream.
Commit 93e6f119c0ce ("ipc/mqueue: cleanup definition names and
locations") added global hardcoded limits to the amount of message
queues that can be created. While these limits are per-namespace,
reality is that it ends up breaking userspace applications.
Historically users have, at least in theory, been able to create up to
INT_MAX queues, and limiting it to just 1024 is way too low and dramatic
for some workloads and use cases. For instance, Madars reports:
"This update imposes bad limits on our multi-process application. As
our app uses approaches that each process opens its own set of queues
(usually something about 3-5 queues per process). In some scenarios
we might run up to 3000 processes or more (which of-course for linux
is not a problem). Thus we might need up to 9000 queues or more. All
processes run under one user."
Other affected users can be found in launchpad bug #1155695:
https://bugs.launchpad.net/ubuntu/+source/manpages/+bug/1155695
Instead of increasing this limit, revert it entirely and fallback to the
original way of dealing queue limits -- where once a user's resource
limit is reached, and all memory is used, new queues cannot be created.
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Reported-by: Madars Vitolins <m@silodev.com>
Acked-by: Doug Ledford <dledford@redhat.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
include/linux/ipc_namespace.h | 2 --
ipc/mq_sysctl.c | 18 ++++++++++++------
ipc/mqueue.c | 6 +++---
3 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index f6c82de..d6ad91f 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -119,9 +119,7 @@ extern int mq_init_ns(struct ipc_namespace *ns);
* the new maximum will handle anyone else. I may have to revisit this
* in the future.
*/
-#define MIN_QUEUESMAX 1
#define DFLT_QUEUESMAX 256
-#define HARD_QUEUESMAX 1024
#define MIN_MSGMAX 1
#define DFLT_MSG 10U
#define DFLT_MSGMAX 10
diff --git a/ipc/mq_sysctl.c b/ipc/mq_sysctl.c
index 383d638..5bb8bfe 100644
--- a/ipc/mq_sysctl.c
+++ b/ipc/mq_sysctl.c
@@ -22,6 +22,16 @@ static void *get_mq(ctl_table *table)
return which;
}
+static int proc_mq_dointvec(ctl_table *table, int write,
+ void __user *buffer, size_t *lenp, loff_t *ppos)
+{
+ struct ctl_table mq_table;
+ memcpy(&mq_table, table, sizeof(mq_table));
+ mq_table.data = get_mq(table);
+
+ return proc_dointvec(&mq_table, write, buffer, lenp, ppos);
+}
+
static int proc_mq_dointvec_minmax(ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
@@ -33,12 +43,10 @@ static int proc_mq_dointvec_minmax(ctl_table *table, int write,
lenp, ppos);
}
#else
+#define proc_mq_dointvec NULL
#define proc_mq_dointvec_minmax NULL
#endif
-static int msg_queues_limit_min = MIN_QUEUESMAX;
-static int msg_queues_limit_max = HARD_QUEUESMAX;
-
static int msg_max_limit_min = MIN_MSGMAX;
static int msg_max_limit_max = HARD_MSGMAX;
@@ -51,9 +59,7 @@ static ctl_table mq_sysctls[] = {
.data = &init_ipc_ns.mq_queues_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_mq_dointvec_minmax,
- .extra1 = &msg_queues_limit_min,
- .extra2 = &msg_queues_limit_max,
+ .proc_handler = proc_mq_dointvec,
},
{
.procname = "msg_max",
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index ae1996d..bb0248f 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -433,9 +433,9 @@ static int mqueue_create(struct inode *dir, struct dentry *dentry,
error = -EACCES;
goto out_unlock;
}
- if (ipc_ns->mq_queues_count >= HARD_QUEUESMAX ||
- (ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max &&
- !capable(CAP_SYS_RESOURCE))) {
+
+ if (ipc_ns->mq_queues_count >= ipc_ns->mq_queues_max &&
+ !capable(CAP_SYS_RESOURCE)) {
error = -ENOSPC;
goto out_unlock;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 116/131] PM / hibernate: Fix restore hang in freeze_processes()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (114 preceding siblings ...)
2014-03-05 14:23 ` [PATCH 3.11 115/131] ipc,mqueue: remove limits for the amount of system-wide queues Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 117/131] ASoC: da732x: Mark DC offset control registers volatile Luis Henriques
` (14 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Sebastian Capella, Rafael J. Wysocki, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Capella <sebastian.capella@linaro.org>
commit f8d5b9e9e5372f0deb7bc1ab1088a9b60b0a793d upstream.
During restore, pm_notifier chain are called with
PM_RESTORE_PREPARE. The firmware_class driver handler
fw_pm_notify does not have a handler for this. As a result,
it keeps a reader on the kmod.c umhelper_sem. During
freeze_processes, the call to __usermodehelper_disable tries to
take a write lock on this semaphore and hangs waiting.
Signed-off-by: Sebastian Capella <sebastian.capella@linaro.org>
Acked-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/base/firmware_class.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index c8dac74..8933926 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1532,6 +1532,7 @@ static int fw_pm_notify(struct notifier_block *notify_block,
switch (mode) {
case PM_HIBERNATION_PREPARE:
case PM_SUSPEND_PREPARE:
+ case PM_RESTORE_PREPARE:
kill_requests_without_uevent();
device_cache_fw_images();
break;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 117/131] ASoC: da732x: Mark DC offset control registers volatile
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (115 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 116/131] PM / hibernate: Fix restore hang in freeze_processes() Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 118/131] dm mpath: fix stalls when handling invalid ioctls Luis Henriques
` (13 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Mark Brown <broonie@linaro.org>
commit 75306820248e26d15d84acf4e297b9fb27dd3bb2 upstream.
The driver reads from the DC offset control registers during callibration
but since the registers are marked as volatile and there is a register
cache the values will not be read from the hardware after the first reading
rendering the callibration ineffective.
It appears that the driver was originally written for the ASoC level
register I/O code but converted to regmap prior to merge and this issue
was missed during the conversion as the framework level volatile register
functionality was not being used.
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/soc/codecs/da732x.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index dc0284d..76fdf0a 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -1268,11 +1268,23 @@ static struct snd_soc_dai_driver da732x_dai[] = {
},
};
+static bool da732x_volatile(struct device *dev, unsigned int reg)
+{
+ switch (reg) {
+ case DA732X_REG_HPL_DAC_OFF_CNTL:
+ case DA732X_REG_HPR_DAC_OFF_CNTL:
+ return true;
+ default:
+ return false;
+ }
+}
+
static const struct regmap_config da732x_regmap = {
.reg_bits = 8,
.val_bits = 8,
.max_register = DA732X_MAX_REG,
+ .volatile_reg = da732x_volatile,
.reg_defaults = da732x_reg_cache,
.num_reg_defaults = ARRAY_SIZE(da732x_reg_cache),
.cache_type = REGCACHE_RBTREE,
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 118/131] dm mpath: fix stalls when handling invalid ioctls
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (116 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 117/131] ASoC: da732x: Mark DC offset control registers volatile Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 119/131] ACPI / processor: Rework processor throttling with work_on_cpu() Luis Henriques
` (12 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Hannes Reinecke, Mike Snitzer, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Reinecke <hare@suse.de>
commit a1989b330093578ea5470bea0a00f940c444c466 upstream.
An invalid ioctl will never be valid, irrespective of whether multipath
has active paths or not. So for invalid ioctls we do not have to wait
for multipath to activate any paths, but can rather return an error
code immediately. This fix resolves numerous instances of:
udevd[]: worker [] unexpectedly returned with status 0x0100
that have been seen during testing.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/md/dm-mpath.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index eb7ddb2..0ba21b0 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1608,8 +1608,11 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
/*
* Only pass ioctls through if the device sizes match exactly.
*/
- if (!r && ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT)
- r = scsi_verify_blk_ioctl(NULL, cmd);
+ if (!bdev || ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT) {
+ int err = scsi_verify_blk_ioctl(NULL, cmd);
+ if (err)
+ r = err;
+ }
if (r == -ENOTCONN && !fatal_signal_pending(current))
queue_work(kmultipathd, &m->process_queued_ios);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 119/131] ACPI / processor: Rework processor throttling with work_on_cpu()
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (117 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 118/131] dm mpath: fix stalls when handling invalid ioctls Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 120/131] USB: ftdi_sio: add Cressi Leonardo PID Luis Henriques
` (11 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Lan Tianyu, Rafael J. Wysocki, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Lan Tianyu <tianyu.lan@intel.com>
commit f3ca4164529b875374c410193bbbac0ee960895f upstream.
acpi_processor_set_throttling() uses set_cpus_allowed_ptr() to make
sure that the (struct acpi_processor)->acpi_processor_set_throttling()
callback will run on the right CPU. However, the function may be
called from a worker thread already bound to a different CPU in which
case that won't work.
Make acpi_processor_set_throttling() use work_on_cpu() as appropriate
instead of abusing set_cpus_allowed_ptr().
Reported-and-tested-by: Jiri Olsa <jolsa@redhat.com>
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
[rjw: Changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/acpi/processor_throttling.c | 69 +++++++++++++++++--------------------
1 file changed, 32 insertions(+), 37 deletions(-)
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index e7dd2c1..5e47d7b 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -59,6 +59,12 @@ struct throttling_tstate {
int target_state; /* target T-state */
};
+struct acpi_processor_throttling_arg {
+ struct acpi_processor *pr;
+ int target_state;
+ bool force;
+};
+
#define THROTTLING_PRECHANGE (1)
#define THROTTLING_POSTCHANGE (2)
@@ -1063,16 +1069,24 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr,
return 0;
}
+static long acpi_processor_throttling_fn(void *data)
+{
+ struct acpi_processor_throttling_arg *arg = data;
+ struct acpi_processor *pr = arg->pr;
+
+ return pr->throttling.acpi_processor_set_throttling(pr,
+ arg->target_state, arg->force);
+}
+
int acpi_processor_set_throttling(struct acpi_processor *pr,
int state, bool force)
{
- cpumask_var_t saved_mask;
int ret = 0;
unsigned int i;
struct acpi_processor *match_pr;
struct acpi_processor_throttling *p_throttling;
+ struct acpi_processor_throttling_arg arg;
struct throttling_tstate t_state;
- cpumask_var_t online_throttling_cpus;
if (!pr)
return -EINVAL;
@@ -1083,14 +1097,6 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
if ((state < 0) || (state > (pr->throttling.state_count - 1)))
return -EINVAL;
- if (!alloc_cpumask_var(&saved_mask, GFP_KERNEL))
- return -ENOMEM;
-
- if (!alloc_cpumask_var(&online_throttling_cpus, GFP_KERNEL)) {
- free_cpumask_var(saved_mask);
- return -ENOMEM;
- }
-
if (cpu_is_offline(pr->id)) {
/*
* the cpu pointed by pr->id is offline. Unnecessary to change
@@ -1099,17 +1105,15 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
return -ENODEV;
}
- cpumask_copy(saved_mask, ¤t->cpus_allowed);
t_state.target_state = state;
p_throttling = &(pr->throttling);
- cpumask_and(online_throttling_cpus, cpu_online_mask,
- p_throttling->shared_cpu_map);
+
/*
* The throttling notifier will be called for every
* affected cpu in order to get one proper T-state.
* The notifier event is THROTTLING_PRECHANGE.
*/
- for_each_cpu(i, online_throttling_cpus) {
+ for_each_cpu_and(i, cpu_online_mask, p_throttling->shared_cpu_map) {
t_state.cpu = i;
acpi_processor_throttling_notifier(THROTTLING_PRECHANGE,
&t_state);
@@ -1121,21 +1125,18 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
* it can be called only for the cpu pointed by pr.
*/
if (p_throttling->shared_type == DOMAIN_COORD_TYPE_SW_ANY) {
- /* FIXME: use work_on_cpu() */
- if (set_cpus_allowed_ptr(current, cpumask_of(pr->id))) {
- /* Can't migrate to the pr->id CPU. Exit */
- ret = -ENODEV;
- goto exit;
- }
- ret = p_throttling->acpi_processor_set_throttling(pr,
- t_state.target_state, force);
+ arg.pr = pr;
+ arg.target_state = state;
+ arg.force = force;
+ ret = work_on_cpu(pr->id, acpi_processor_throttling_fn, &arg);
} else {
/*
* When the T-state coordination is SW_ALL or HW_ALL,
* it is necessary to set T-state for every affected
* cpus.
*/
- for_each_cpu(i, online_throttling_cpus) {
+ for_each_cpu_and(i, cpu_online_mask,
+ p_throttling->shared_cpu_map) {
match_pr = per_cpu(processors, i);
/*
* If the pointer is invalid, we will report the
@@ -1156,13 +1157,12 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
"on CPU %d\n", i));
continue;
}
- t_state.cpu = i;
- /* FIXME: use work_on_cpu() */
- if (set_cpus_allowed_ptr(current, cpumask_of(i)))
- continue;
- ret = match_pr->throttling.
- acpi_processor_set_throttling(
- match_pr, t_state.target_state, force);
+
+ arg.pr = match_pr;
+ arg.target_state = state;
+ arg.force = force;
+ ret = work_on_cpu(pr->id, acpi_processor_throttling_fn,
+ &arg);
}
}
/*
@@ -1171,17 +1171,12 @@ int acpi_processor_set_throttling(struct acpi_processor *pr,
* affected cpu to update the T-states.
* The notifier event is THROTTLING_POSTCHANGE
*/
- for_each_cpu(i, online_throttling_cpus) {
+ for_each_cpu_and(i, cpu_online_mask, p_throttling->shared_cpu_map) {
t_state.cpu = i;
acpi_processor_throttling_notifier(THROTTLING_POSTCHANGE,
&t_state);
}
- /* restore the previous state */
- /* FIXME: use work_on_cpu() */
- set_cpus_allowed_ptr(current, saved_mask);
-exit:
- free_cpumask_var(online_throttling_cpus);
- free_cpumask_var(saved_mask);
+
return ret;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 120/131] USB: ftdi_sio: add Cressi Leonardo PID
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (118 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 119/131] ACPI / processor: Rework processor throttling with work_on_cpu() Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 121/131] usb: ehci: fix deadlock when threadirqs option is used Luis Henriques
` (10 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Joerg Dorchain, Greg Kroah-Hartman, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Joerg Dorchain <joerg@dorchain.net>
commit 6dbd46c849e071e6afc1e0cad489b0175bca9318 upstream.
Hello,
the following patch adds an entry for the PID of a Cressi Leonardo
diving computer interface to kernel 3.13.0.
It is detected as FT232RL.
Works with subsurface.
Signed-off-by: Joerg Dorchain <joerg@dorchain.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/usb/serial/ftdi_sio.c | 2 ++
drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index b7446a6..b83da38 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -910,6 +910,8 @@ static struct usb_device_id id_table_combined [] = {
/* Crucible Devices */
{ USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) },
+ /* Cressi Devices */
+ { USB_DEVICE(FTDI_VID, FTDI_CRESSI_PID) },
{ }, /* Optional parameter entry */
{ } /* Terminating entry */
};
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 1e2d369..e599fbf 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1320,3 +1320,9 @@
* Manufacturer: Smart GSM Team
*/
#define FTDI_Z3X_PID 0x0011
+
+/*
+ * Product: Cressi PC Interface
+ * Manufacturer: Cressi
+ */
+#define FTDI_CRESSI_PID 0x87d0
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 121/131] usb: ehci: fix deadlock when threadirqs option is used
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (119 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 120/131] USB: ftdi_sio: add Cressi Leonardo PID Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 122/131] ASoC: sta32x: Fix wrong enum for limiter2 release rate Luis Henriques
` (9 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Stanislaw Gruszka, Greg Kroah-Hartman, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Stanislaw Gruszka <sgruszka@redhat.com>
commit a1227f3c1030e96ebc51d677d2f636268845c5fb upstream.
ehci_irq() and ehci_hrtimer_func() can deadlock on ehci->lock when
threadirqs option is used. To prevent the deadlock use
spin_lock_irqsave() in ehci_irq().
This change can be reverted when hrtimer callbacks become threaded.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/usb/host/ehci-hcd.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 7abf1ce..9a91bb6 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -689,8 +689,15 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
struct ehci_hcd *ehci = hcd_to_ehci (hcd);
u32 status, masked_status, pcd_status = 0, cmd;
int bh;
+ unsigned long flags;
- spin_lock (&ehci->lock);
+ /*
+ * For threadirqs option we use spin_lock_irqsave() variant to prevent
+ * deadlock with ehci hrtimer callback, because hrtimer callbacks run
+ * in interrupt context even when threadirqs is specified. We can go
+ * back to spin_lock() variant when hrtimer callbacks become threaded.
+ */
+ spin_lock_irqsave(&ehci->lock, flags);
status = ehci_readl(ehci, &ehci->regs->status);
@@ -708,7 +715,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd)
/* Shared IRQ? */
if (!masked_status || unlikely(ehci->rh_state == EHCI_RH_HALTED)) {
- spin_unlock(&ehci->lock);
+ spin_unlock_irqrestore(&ehci->lock, flags);
return IRQ_NONE;
}
@@ -826,7 +833,7 @@ dead:
if (bh)
ehci_work (ehci);
- spin_unlock (&ehci->lock);
+ spin_unlock_irqrestore(&ehci->lock, flags);
if (pcd_status)
usb_hcd_poll_rh_status(hcd);
return IRQ_HANDLED;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 122/131] ASoC: sta32x: Fix wrong enum for limiter2 release rate
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (120 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 121/131] usb: ehci: fix deadlock when threadirqs option is used Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 123/131] perf/x86: Fix event scheduling Luis Henriques
` (8 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Takashi Iwai, Mark Brown, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit b3619b288b621e63f66908045f48495869a996a6 upstream.
There is a typo in the Limiter2 Release Rate control, a wrong enum for
Limiter1 is assigned. It must point to Limiter2.
Spotted by a compile warning:
In file included from sound/soc/codecs/sta32x.c:34:0:
sound/soc/codecs/sta32x.c:223:29: warning: ‘sta32x_limiter2_release_rate_enum’ defined but not used [-Wunused-variable]
static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum,
^
include/sound/soc.h:275:18: note: in definition of macro ‘SOC_ENUM_DOUBLE_DECL’
struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \
^
sound/soc/codecs/sta32x.c:223:8: note: in expansion of macro ‘SOC_ENUM_SINGLE_DECL’
static SOC_ENUM_SINGLE_DECL(sta32x_limiter2_release_rate_enum,
^
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
sound/soc/codecs/sta32x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
index 4d8a3ae..8517e70 100644
--- a/sound/soc/codecs/sta32x.c
+++ b/sound/soc/codecs/sta32x.c
@@ -432,7 +432,7 @@ SOC_SINGLE_TLV("Treble Tone Control", STA32X_TONE, STA32X_TONE_TTC_SHIFT, 15, 0,
SOC_ENUM("Limiter1 Attack Rate (dB/ms)", sta32x_limiter1_attack_rate_enum),
SOC_ENUM("Limiter2 Attack Rate (dB/ms)", sta32x_limiter2_attack_rate_enum),
SOC_ENUM("Limiter1 Release Rate (dB/ms)", sta32x_limiter1_release_rate_enum),
-SOC_ENUM("Limiter2 Release Rate (dB/ms)", sta32x_limiter1_release_rate_enum),
+SOC_ENUM("Limiter2 Release Rate (dB/ms)", sta32x_limiter2_release_rate_enum),
/* depending on mode, the attack/release thresholds have
* two different enum definitions; provide both
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 123/131] perf/x86: Fix event scheduling
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (121 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 122/131] ASoC: sta32x: Fix wrong enum for limiter2 release rate Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 124/131] perf: Fix hotplug splat Luis Henriques
` (7 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Peter Zijlstra, Paul Mackerras, Steven Rostedt, Stephane Eranian,
Dave Jones, Ingo Molnar, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <peterz@infradead.org>
commit 26e61e8939b1fe8729572dabe9a9e97d930dd4f6 upstream.
Vince "Super Tester" Weaver reported a new round of syscall fuzzing (Trinity) failures,
with perf WARN_ON()s triggering. He also provided traces of the failures.
This is I think the relevant bit:
> pec_1076_warn-2804 [000] d... 147.926153: x86_pmu_disable: x86_pmu_disable
> pec_1076_warn-2804 [000] d... 147.926153: x86_pmu_state: Events: {
> pec_1076_warn-2804 [000] d... 147.926156: x86_pmu_state: 0: state: .R config: ffffffffffffffff ( (null))
> pec_1076_warn-2804 [000] d... 147.926158: x86_pmu_state: 33: state: AR config: 0 (ffff88011ac99800)
> pec_1076_warn-2804 [000] d... 147.926159: x86_pmu_state: }
> pec_1076_warn-2804 [000] d... 147.926160: x86_pmu_state: n_events: 1, n_added: 0, n_txn: 1
> pec_1076_warn-2804 [000] d... 147.926161: x86_pmu_state: Assignment: {
> pec_1076_warn-2804 [000] d... 147.926162: x86_pmu_state: 0->33 tag: 1 config: 0 (ffff88011ac99800)
> pec_1076_warn-2804 [000] d... 147.926163: x86_pmu_state: }
> pec_1076_warn-2804 [000] d... 147.926166: collect_events: Adding event: 1 (ffff880119ec8800)
So we add the insn:p event (fd[23]).
At this point we should have:
n_events = 2, n_added = 1, n_txn = 1
> pec_1076_warn-2804 [000] d... 147.926170: collect_events: Adding event: 0 (ffff8800c9e01800)
> pec_1076_warn-2804 [000] d... 147.926172: collect_events: Adding event: 4 (ffff8800cbab2c00)
We try and add the {BP,cycles,br_insn} group (fd[3], fd[4], fd[15]).
These events are 0:cycles and 4:br_insn, the BP event isn't x86_pmu so
that's not visible.
group_sched_in()
pmu->start_txn() /* nop - BP pmu */
event_sched_in()
event->pmu->add()
So here we should end up with:
0: n_events = 3, n_added = 2, n_txn = 2
4: n_events = 4, n_added = 3, n_txn = 3
But seeing the below state on x86_pmu_enable(), the must have failed,
because the 0 and 4 events aren't there anymore.
Looking at group_sched_in(), since the BP is the leader, its
event_sched_in() must have succeeded, for otherwise we would not have
seen the sibling adds.
But since neither 0 or 4 are in the below state; their event_sched_in()
must have failed; but I don't see why, the complete state: 0,0,1:p,4
fits perfectly fine on a core2.
However, since we try and schedule 4 it means the 0 event must have
succeeded! Therefore the 4 event must have failed, its failure will
have put group_sched_in() into the fail path, which will call:
event_sched_out()
event->pmu->del()
on 0 and the BP event.
Now x86_pmu_del() will reduce n_events; but it will not reduce n_added;
giving what we see below:
n_event = 2, n_added = 2, n_txn = 2
> pec_1076_warn-2804 [000] d... 147.926177: x86_pmu_enable: x86_pmu_enable
> pec_1076_warn-2804 [000] d... 147.926177: x86_pmu_state: Events: {
> pec_1076_warn-2804 [000] d... 147.926179: x86_pmu_state: 0: state: .R config: ffffffffffffffff ( (null))
> pec_1076_warn-2804 [000] d... 147.926181: x86_pmu_state: 33: state: AR config: 0 (ffff88011ac99800)
> pec_1076_warn-2804 [000] d... 147.926182: x86_pmu_state: }
> pec_1076_warn-2804 [000] d... 147.926184: x86_pmu_state: n_events: 2, n_added: 2, n_txn: 2
> pec_1076_warn-2804 [000] d... 147.926184: x86_pmu_state: Assignment: {
> pec_1076_warn-2804 [000] d... 147.926186: x86_pmu_state: 0->33 tag: 1 config: 0 (ffff88011ac99800)
> pec_1076_warn-2804 [000] d... 147.926188: x86_pmu_state: 1->0 tag: 1 config: 1 (ffff880119ec8800)
> pec_1076_warn-2804 [000] d... 147.926188: x86_pmu_state: }
> pec_1076_warn-2804 [000] d... 147.926190: x86_pmu_enable: S0: hwc->idx: 33, hwc->last_cpu: 0, hwc->last_tag: 1 hwc->state: 0
So the problem is that x86_pmu_del(), when called from a
group_sched_in() that fails (for whatever reason), and without x86_pmu
TXN support (because the leader is !x86_pmu), will corrupt the n_added
state.
Reported-and-Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Dave Jones <davej@redhat.com>
Link: http://lkml.kernel.org/r/20140221150312.GF3104@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/x86/kernel/cpu/perf_event.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index a7c7305..f646d40 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1192,6 +1192,9 @@ static void x86_pmu_del(struct perf_event *event, int flags)
for (i = 0; i < cpuc->n_events; i++) {
if (event == cpuc->event_list[i]) {
+ if (i >= cpuc->n_events - cpuc->n_added)
+ --cpuc->n_added;
+
if (x86_pmu.put_event_constraints)
x86_pmu.put_event_constraints(cpuc, event);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 124/131] perf: Fix hotplug splat
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (122 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 123/131] perf/x86: Fix event scheduling Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 125/131] kvm: x86: fix emulator buffer overflow (CVE-2014-0049) Luis Henriques
` (6 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Peter Zijlstra, Will Deacon, Ingo Molnar, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <peterz@infradead.org>
commit e3703f8cdfcf39c25c4338c3ad8e68891cca3731 upstream.
Drew Richardson reported that he could make the kernel go *boom* when hotplugging
while having perf events active.
It turned out that when you have a group event, the code in
__perf_event_exit_context() fails to remove the group siblings from
the context.
We then proceed with destroying and freeing the event, and when you
re-plug the CPU and try and add another event to that CPU, things go
*boom* because you've still got dead entries there.
Reported-by: Drew Richardson <drew.richardson@arm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Link: http://lkml.kernel.org/n/tip-k6v5wundvusvcseqj1si0oz0@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
kernel/events/core.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index fc645f1..e074291 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7656,14 +7656,14 @@ static void perf_pmu_rotate_stop(struct pmu *pmu)
static void __perf_event_exit_context(void *__info)
{
struct perf_event_context *ctx = __info;
- struct perf_event *event, *tmp;
+ struct perf_event *event;
perf_pmu_rotate_stop(ctx->pmu);
- list_for_each_entry_safe(event, tmp, &ctx->pinned_groups, group_entry)
- __perf_remove_from_context(event);
- list_for_each_entry_safe(event, tmp, &ctx->flexible_groups, group_entry)
+ rcu_read_lock();
+ list_for_each_entry_rcu(event, &ctx->event_list, event_entry)
__perf_remove_from_context(event);
+ rcu_read_unlock();
}
static void perf_event_exit_cpu_context(int cpu)
@@ -7687,11 +7687,11 @@ static void perf_event_exit_cpu(int cpu)
{
struct swevent_htable *swhash = &per_cpu(swevent_htable, cpu);
+ perf_event_exit_cpu_context(cpu);
+
mutex_lock(&swhash->hlist_mutex);
swevent_hlist_release(swhash);
mutex_unlock(&swhash->hlist_mutex);
-
- perf_event_exit_cpu_context(cpu);
}
#else
static inline void perf_event_exit_cpu(int cpu) { }
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 125/131] kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (123 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 124/131] perf: Fix hotplug splat Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 126/131] drm/radeon: print the supported atpx function mask Luis Henriques
` (5 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Andrew Honig, Paolo Bonzini, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Honig <ahonig@google.com>
commit a08d3b3b99efd509133946056531cdf8f3a0c09b upstream.
The problem occurs when the guest performs a pusha with the stack
address pointing to an mmio address (or an invalid guest physical
address) to start with, but then extending into an ordinary guest
physical address. When doing repeated emulated pushes
emulator_read_write sets mmio_needed to 1 on the first one. On a
later push when the stack points to regular memory,
mmio_nr_fragments is set to 0, but mmio_is_needed is not set to 0.
As a result, KVM exits to userspace, and then returns to
complete_emulated_mmio. In complete_emulated_mmio
vcpu->mmio_cur_fragment is incremented. The termination condition of
vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments is never achieved.
The code bounces back and fourth to userspace incrementing
mmio_cur_fragment past it's buffer. If the guest does nothing else it
eventually leads to a a crash on a memcpy from invalid memory address.
However if a guest code can cause the vm to be destroyed in another
vcpu with excellent timing, then kvm_clear_async_pf_completion_queue
can be used by the guest to control the data that's pointed to by the
call to cancel_work_item, which can be used to gain execution.
Fixes: f78146b0f9230765c6315b2e14f56112513389ad
Signed-off-by: Andrew Honig <ahonig@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/x86/kvm/x86.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 6740fbf..75c56bd 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6024,7 +6024,7 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu)
frag->len -= len;
}
- if (vcpu->mmio_cur_fragment == vcpu->mmio_nr_fragments) {
+ if (vcpu->mmio_cur_fragment >= vcpu->mmio_nr_fragments) {
vcpu->mmio_needed = 0;
if (vcpu->mmio_is_write)
return 1;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 126/131] drm/radeon: print the supported atpx function mask
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (124 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 125/131] kvm: x86: fix emulator buffer overflow (CVE-2014-0049) Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 127/131] drm/radeon: fix missing bo reservation Luis Henriques
` (4 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Alex Deucher, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 9f050c7f9738ffa746c63415136645ad231b1348 upstream.
Print the supported functions mask in addition to
the version. This is useful in debugging PX
problems since we can see what functions are available.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/radeon/radeon_atpx_handler.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
index d96070b..cbb06d7 100644
--- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c
+++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c
@@ -215,7 +215,8 @@ static int radeon_atpx_verify_interface(struct radeon_atpx *atpx)
memcpy(&output, info->buffer.pointer, size);
/* TODO: check version? */
- printk("ATPX version %u\n", output.version);
+ printk("ATPX version %u, functions 0x%08x\n",
+ output.version, output.function_bits);
radeon_atpx_parse_functions(&atpx->functions, output.function_bits);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 127/131] drm/radeon: fix missing bo reservation
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (125 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 126/131] drm/radeon: print the supported atpx function mask Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 128/131] drm/radeon: disable pll sharing for DP on DCE4.1 Luis Henriques
` (3 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Christian König, Alex Deucher, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
commit 5e386b574cf7e1593e1296e5b0feea4108ed6ad8 upstream.
Otherwise we might get a crash here.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index cc2ca38..42ff84b 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -504,6 +504,10 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
radeon_vm_init(rdev, &fpriv->vm);
+ r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false);
+ if (r)
+ return r;
+
/* map the ib pool buffer read only into
* virtual address space */
bo_va = radeon_vm_bo_add(rdev, &fpriv->vm,
@@ -511,6 +515,8 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
r = radeon_vm_bo_set_addr(rdev, bo_va, RADEON_VA_IB_OFFSET,
RADEON_VM_PAGE_READABLE |
RADEON_VM_PAGE_SNOOPED);
+
+ radeon_bo_unreserve(rdev->ring_tmp_bo.bo);
if (r) {
radeon_vm_fini(rdev, &fpriv->vm);
kfree(fpriv);
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 128/131] drm/radeon: disable pll sharing for DP on DCE4.1
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (126 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 127/131] drm/radeon: fix missing bo reservation Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 129/131] powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly Luis Henriques
` (2 subsequent siblings)
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team; +Cc: Alex Deucher, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 9ef4e1d000a5b335fcebfcf8aef3405e59574c89 upstream.
Causes display problems. We had already disabled
sharing for non-DP displays.
Based on a patch from:
Niels Ole Salscheider <niels_ole@salscheider-online.de>
bug:
https://bugzilla.kernel.org/show_bug.cgi?id=58121
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/gpu/drm/radeon/atombios_crtc.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index aee7242..7440ef2 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1751,6 +1751,20 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc)
return ATOM_PPLL1;
DRM_ERROR("unable to allocate a PPLL\n");
return ATOM_PPLL_INVALID;
+ } else if (ASIC_IS_DCE41(rdev)) {
+ /* Don't share PLLs on DCE4.1 chips */
+ if (ENCODER_MODE_IS_DP(atombios_get_encoder_mode(radeon_crtc->encoder))) {
+ if (rdev->clock.dp_extclk)
+ /* skip PPLL programming if using ext clock */
+ return ATOM_PPLL_INVALID;
+ }
+ pll_in_use = radeon_get_pll_use_mask(crtc);
+ if (!(pll_in_use & (1 << ATOM_PPLL1)))
+ return ATOM_PPLL1;
+ if (!(pll_in_use & (1 << ATOM_PPLL2)))
+ return ATOM_PPLL2;
+ DRM_ERROR("unable to allocate a PPLL\n");
+ return ATOM_PPLL_INVALID;
} else if (ASIC_IS_DCE4(rdev)) {
/* in DP mode, the DP ref clock can come from PPLL, DCPLL, or ext clock,
* depending on the asic:
@@ -1778,7 +1792,7 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc)
if (pll != ATOM_PPLL_INVALID)
return pll;
}
- } else if (!ASIC_IS_DCE41(rdev)) { /* Don't share PLLs on DCE4.1 chips */
+ } else {
/* use the same PPLL for all monitors with the same clock */
pll = radeon_get_shared_nondp_ppll(crtc);
if (pll != ATOM_PPLL_INVALID)
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 129/131] powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (127 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 128/131] drm/radeon: disable pll sharing for DP on DCE4.1 Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 130/131] powerpc/crashdump : Fix page frame number check in copy_oldmem_page Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 131/131] PCI: mvebu: Use Device ID and revision from underlying endpoint Luis Henriques
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Tony Breeds, Benjamin Herrenschmidt, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony Breeds <tony@bakeyournoodle.com>
commit 41dd03a94c7d408d2ef32530545097f7d1befe5c upstream.
Currently we're storing a host endian RTAS token in
rtas_stop_self_args.token. We then pass that directly to rtas. This is
fine on big endian however on little endian the token is not what we
expect.
This will typically result in hitting:
panic("Alas, I survived.\n");
To fix this we always use the stop-self token in host order and always
convert it to be32 before passing this to rtas.
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/powerpc/platforms/pseries/hotplug-cpu.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 217ca5c..2882d61 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -34,12 +34,7 @@
#include "offline_states.h"
/* This version can't take the spinlock, because it never returns */
-static struct rtas_args rtas_stop_self_args = {
- .token = RTAS_UNKNOWN_SERVICE,
- .nargs = 0,
- .nret = 1,
- .rets = &rtas_stop_self_args.args[0],
-};
+static int rtas_stop_self_token = RTAS_UNKNOWN_SERVICE;
static DEFINE_PER_CPU(enum cpu_state_vals, preferred_offline_state) =
CPU_STATE_OFFLINE;
@@ -92,15 +87,20 @@ void set_default_offline_state(int cpu)
static void rtas_stop_self(void)
{
- struct rtas_args *args = &rtas_stop_self_args;
+ struct rtas_args args = {
+ .token = cpu_to_be32(rtas_stop_self_token),
+ .nargs = 0,
+ .nret = 1,
+ .rets = &args.args[0],
+ };
local_irq_disable();
- BUG_ON(args->token == RTAS_UNKNOWN_SERVICE);
+ BUG_ON(rtas_stop_self_token == RTAS_UNKNOWN_SERVICE);
printk("cpu %u (hwid %u) Ready to die...\n",
smp_processor_id(), hard_smp_processor_id());
- enter_rtas(__pa(args));
+ enter_rtas(__pa(&args));
panic("Alas, I survived.\n");
}
@@ -391,10 +391,10 @@ static int __init pseries_cpu_hotplug_init(void)
}
}
- rtas_stop_self_args.token = rtas_token("stop-self");
+ rtas_stop_self_token = rtas_token("stop-self");
qcss_tok = rtas_token("query-cpu-stopped-state");
- if (rtas_stop_self_args.token == RTAS_UNKNOWN_SERVICE ||
+ if (rtas_stop_self_token == RTAS_UNKNOWN_SERVICE ||
qcss_tok == RTAS_UNKNOWN_SERVICE) {
printk(KERN_INFO "CPU Hotplug not supported by firmware "
"- disabling.\n");
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 130/131] powerpc/crashdump : Fix page frame number check in copy_oldmem_page
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (128 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 129/131] powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 131/131] PCI: mvebu: Use Device ID and revision from underlying endpoint Luis Henriques
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Laurent Dufour, Benjamin Herrenschmidt, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
commit f5295bd8ea8a65dc5eac608b151386314cb978f1 upstream.
In copy_oldmem_page, the current check using max_pfn and min_low_pfn to
decide if the page is backed or not, is not valid when the memory layout is
not continuous.
This happens when running as a QEMU/KVM guest, where RTAS is mapped higher
in the memory. In that case max_pfn points to the end of RTAS, and a hole
between the end of the kdump kernel and RTAS is not backed by PTEs. As a
consequence, the kdump kernel is crashing in copy_oldmem_page when accessing
in a direct way the pages in that hole.
This fix relies on the memblock's service memblock_is_region_memory to
check if the read page is part or not of the directly accessible memory.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Tested-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
arch/powerpc/kernel/crash_dump.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 779a78c..c16ceb1 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -98,17 +98,19 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
size_t csize, unsigned long offset, int userbuf)
{
void *vaddr;
+ phys_addr_t paddr;
if (!csize)
return 0;
csize = min_t(size_t, csize, PAGE_SIZE);
+ paddr = pfn << PAGE_SHIFT;
- if ((min_low_pfn < pfn) && (pfn < max_pfn)) {
- vaddr = __va(pfn << PAGE_SHIFT);
+ if (memblock_is_region_memory(paddr, csize)) {
+ vaddr = __va(paddr);
csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf);
} else {
- vaddr = __ioremap(pfn << PAGE_SHIFT, PAGE_SIZE, 0);
+ vaddr = __ioremap(paddr, PAGE_SIZE, 0);
csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf);
iounmap(vaddr);
}
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* [PATCH 3.11 131/131] PCI: mvebu: Use Device ID and revision from underlying endpoint
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
` (129 preceding siblings ...)
2014-03-05 14:24 ` [PATCH 3.11 130/131] powerpc/crashdump : Fix page frame number check in copy_oldmem_page Luis Henriques
@ 2014-03-05 14:24 ` Luis Henriques
130 siblings, 0 replies; 133+ messages in thread
From: Luis Henriques @ 2014-03-05 14:24 UTC (permalink / raw)
To: linux-kernel, stable, kernel-team
Cc: Andrew Lunn, Bjorn Helgaas, Luis Henriques
3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Lunn <andrew@lunn.ch>
commit 322a8e91844f4ae2093e0d3d8a318d0ef2596756 upstream.
Marvell SoCs place the SoC number into the PCIe endpoint device ID. The
SoC stepping is placed into the PCIe revision. The old plat-orion PCIe
driver allowed this information to be seen in user space with a simple
lspci command.
The new driver places a virtual PCI-PCI bridge on top of these endpoints.
It has its own hard coded PCI device ID. Thus it is no longer possible to
see what the SoC is using lspci.
When initializing the PCI-PCI bridge, set its device ID and revision from
the underlying endpoint, thus restoring this functionality. Debian would
like to use this in order to aid installing the correct DTB file.
Fixes: 45361a4fe4464 ("pci: PCIe driver for Marvell Armada 370/XP systems")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
[ luis: backported to 3.11: replaced mvebu_readl() by readl() ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
drivers/pci/host/pci-mvebu.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index 7bf3926..86d3fa4 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -56,14 +56,6 @@
#define PCIE_DEBUG_CTRL 0x1a60
#define PCIE_DEBUG_SOFT_RESET BIT(20)
-/*
- * This product ID is registered by Marvell, and used when the Marvell
- * SoC is not the root complex, but an endpoint on the PCIe bus. It is
- * therefore safe to re-use this PCI ID for our emulated PCI-to-PCI
- * bridge.
- */
-#define MARVELL_EMULATED_PCI_PCI_BRIDGE_ID 0x7846
-
/* PCI configuration space of a PCI-to-PCI bridge */
struct mvebu_sw_pci_bridge {
u16 vendor;
@@ -356,7 +348,8 @@ static void mvebu_sw_pci_bridge_init(struct mvebu_pcie_port *port)
bridge->class = PCI_CLASS_BRIDGE_PCI;
bridge->vendor = PCI_VENDOR_ID_MARVELL;
- bridge->device = MARVELL_EMULATED_PCI_PCI_BRIDGE_ID;
+ bridge->device = readl(port->base + PCIE_DEV_ID_OFF) >> 16;
+ bridge->revision = readl(port->base + PCIE_DEV_REV_OFF) & 0xff;
bridge->header_type = PCI_HEADER_TYPE_BRIDGE;
bridge->cache_line_size = 0x10;
--
1.9.0
^ permalink raw reply related [flat|nested] 133+ messages in thread
* Re: [PATCH 3.11 042/131] avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use
2014-03-05 14:22 ` [PATCH 3.11 042/131] avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use Luis Henriques
@ 2014-03-08 14:02 ` Chen Gang
0 siblings, 0 replies; 133+ messages in thread
From: Chen Gang @ 2014-03-08 14:02 UTC (permalink / raw)
To: Luis Henriques; +Cc: linux-kernel, stable, kernel-team
Thanks.
I generated "avr32-linux-" cross compiler, and will use it to compile
kernel again, and try to let it pass allmodconfig (originally, I use
"avr32-" to compile kernel, which has generated various another issues).
Thanks.
On 03/05/2014 10:22 PM, Luis Henriques wrote:
> 3.11.10.6 -stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Chen Gang <gang.chen.5i5j@gmail.com>
>
> commit 8d80390cfc9434d5aa4fb9e5f9768a66b30cb8a6 upstream.
>
> For avr32 cross compiler, do not define '__linux__' internally, so it
> will cause issue with allmodconfig.
>
> The related error:
>
> CC [M] fs/coda/psdev.o
> In file included from include/linux/coda.h:64,
> from fs/coda/psdev.c:45:
> include/uapi/linux/coda.h:221: error: expected specifier-qualifier-list before 'u_quad_t'
>
> The related toolchain version (which only download, not re-compile):
>
> [root@gchen linux-next]# /upstream/toolchain/download/avr32-gnu-toolchain-linux_x86/bin/avr32-gcc -v
> Using built-in specs.
> Target: avr32
> Configured with: /data2/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/src/gcc/configure --target=avr32 --host=i686-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-languages=c,c++ --disable-nls --disable-libssp --disable-libstdcxx-pch --with-dwarf2 --enable-version-specific-runtime-libs --disable-shared --enable-doc --with-mpfr-lib=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/lib --with-mpfr-include=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86/include --with-gmp=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --with-mpc=/home/toolsbuild/jenkins-knuth/workspace/avr32-gnu-toolchain/avr32-gnu-toolchain-linux_x86 --enable-__cxa_atexit --disable-shared --with-newlib --with-pkgversion=AVR_32_bit_GNU_Toolchain_3.4.2_435 --with-bugurl=http://w
ww
> .atmel.com/avr
> Thread model: single
> gcc version 4.4.7 (AVR_32_bit_GNU_Toolchain_3.4.2_435)
>
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> Acked-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
> ---
> arch/avr32/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/avr32/Makefile b/arch/avr32/Makefile
> index 22fb665..dba48a5 100644
> --- a/arch/avr32/Makefile
> +++ b/arch/avr32/Makefile
> @@ -11,7 +11,7 @@ all: uImage vmlinux.elf
>
> KBUILD_DEFCONFIG := atstk1002_defconfig
>
> -KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic
> +KBUILD_CFLAGS += -pipe -fno-builtin -mno-pic -D__linux__
> KBUILD_AFLAGS += -mrelax -mno-pic
> KBUILD_CFLAGS_MODULE += -mno-relax
> LDFLAGS_vmlinux += --relax
>
--
Chen Gang
Open, share and attitude like air, water and life which God blessed
^ permalink raw reply [flat|nested] 133+ messages in thread
end of thread, other threads:[~2014-03-08 14:02 UTC | newest]
Thread overview: 133+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-05 14:22 [3.11.y.z extended stable] Linux 3.11.10.6 stable review Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 001/131] ata: enable quirk from jmicron JMB350 for JMB394 Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 002/131] sata_sil: apply MOD15WRITE quirk to TOSHIBA MK2561GSYN Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 003/131] irqchip: orion: clear bridge cause register on init Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 004/131] irqchip: orion: use handle_edge_irq on bridge irqs Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 005/131] irqchip: orion: clear stale interrupts in irq_startup Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 006/131] ARM: 7950/1: mm: Fix stage-2 device memory attributes Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 007/131] ARM: 7953/1: mm: ensure TLB invalidation is complete before enabling MMU Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 008/131] mfd: Update DA9055 i2c device id name Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 009/131] ASoC: da9055: Fix device registration of PMIC and CODEC devices Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 010/131] NFS: Enabling v4.2 should not recompile nfsd and lockd Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 011/131] NFS: Do not set NFS_INO_INVALID_LABEL unless server supports labeled NFS Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 012/131] iommu/arm-smmu: fix pud/pmd entry fill sequence Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 013/131] iommu/arm-smmu: really fix page table locking Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 014/131] iommu/arm-smmu: fix table flushing during initial allocations Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 015/131] ARM: dma-mapping: fix GFP_ATOMIC macro usage Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 016/131] x86: " Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 017/131] SUNRPC: Fix races in xs_nospace() Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 018/131] drm/i915: Add intel_ring_cachline_align() Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 019/131] drm/i915: Prevent MI_DISPLAY_FLIP straddling two cachelines on IVB Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 020/131] can: kvaser_usb: check number of channels returned by HW Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 021/131] ext4: fix xfstest generic/299 block validity failures Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 022/131] ext4: fix error paths in swap_inode_boot_loader() Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 023/131] ext4: don't try to modify s_flags if the the file system is read-only Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 024/131] ASoC: max98090: sync regcache on entering STANDBY Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 025/131] drm/i915/dp: increase native aux defer retry timeout Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 026/131] drm/i915/dp: add native aux defer retry limit Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 027/131] rtlwifi: rtl8192ce: Fix too long disable of IRQs Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 028/131] rtlwifi: Fix incorrect return from rtl_ps_enable_nic() Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 029/131] rtl8187: fix regression on MIPS without coherent DMA Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 030/131] ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 031/131] ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND " Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 032/131] PCI: Enable INTx if BIOS left them disabled Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 033/131] cifs: ensure that uncached writes handle unmapped areas correctly Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 034/131] CIFS: Fix too big maxBuf size for SMB3 mounts Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 035/131] ASoC: txx9aclc_ac97: Fix kernel crash on probe Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 036/131] ext4: fix online resize with very large inode tables Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 037/131] ext4: fix online resize with a non-standard blocks per group setting Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 038/131] powerpc/powernv: Rework EEH reset Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 039/131] ext4: don't leave i_crtime.tv_sec uninitialized Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 040/131] ALSA: usb-audio: work around KEF X300A firmware bug Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 041/131] avr32: fix missing module.h causing build failure in mimc200/fram.c Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 042/131] avr32: Makefile: add '-D__linux__' flag for gcc-4.4.7 use Luis Henriques
2014-03-08 14:02 ` Chen Gang
2014-03-05 14:22 ` [PATCH 3.11 043/131] ARM: 7957/1: add DSB after icache flush in __flush_icache_all() Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 044/131] drm/nouveau: set irq_enabled manually Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 045/131] drm/nv50/disp: use correct register to determine DP display bpp Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 046/131] jbd2: fix use after free in jbd2_journal_start_reserved() Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 047/131] ACPI / PCI: Fix memory leak in acpi_pci_irq_enable() Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 048/131] ahci: disable NCQ on Samsung pci-e SSDs on macbooks Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 049/131] usb: gadget: bcm63xx_udc: fix build failure on DMA channel code Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 050/131] mei: set client's read_cb to NULL when flow control fails Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 051/131] drm/radeon: fix minor typos in si_dpm.c Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 052/131] drm/radeon/si: fix typo in dpm sq ramping setup Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 053/131] drm/radeon/ni: " Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 054/131] USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8 Luis Henriques
2014-03-05 14:22 ` [PATCH 3.11 055/131] workqueue: ensure @task is valid across kthread_stop() Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 056/131] cgroup: update cgroup_enable_task_cg_lists() to grab siglock Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 057/131] hwmon: (max1668) Fix writing the minimum temperature Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 058/131] cpufreq: powernow-k8: Initialize per-cpu data-structures properly Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 059/131] ALSA: hda/ca0132 - setup/cleanup streams Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 060/131] ALSA: hda/ca0132 - Fix recording from mode id 0x8 Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 061/131] ACPI / video: Filter the _BCL table for duplicate brightness values Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 062/131] ALSA: hda - Enable front audio jacks on one HP desktop model Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 063/131] usb: chipidea: need to mask when writting endptflush and endptprime Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 064/131] irqchip: orion: Fix getting generic chip pointer Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 065/131] staging: binder: Fix death notifications Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 066/131] perf: Enforce 1 as lower limit for perf_event_max_sample_rate Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 067/131] 6lowpan: fix lockdep splats Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 068/131] can: add destructor for self generated skbs Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 069/131] ipv4: Fix runtime WARNING in rtmsg_ifa() Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 070/131] net: fix 'ip rule' iif/oif device rename Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 071/131] netpoll: fix netconsole IPv6 setup Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 072/131] net: qmi_wwan: add Netgear Aircard 340U Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 073/131] tcp: tsq: fix nonagle handling Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 074/131] tg3: Fix deadlock in tg3_change_mtu() Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 075/131] net: asix: add missing flag to struct driver_info Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 076/131] usbnet: remove generic hard_header_len check Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 077/131] bonding: 802.3ad: make aggregator_identifier bond-private Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 078/131] ipv4: fix counter in_slow_tot Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 079/131] net: sctp: fix sctp_connectx abi for ia32 emulation/compat mode Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 080/131] net: add and use skb_gso_transport_seglen() Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 081/131] net: core: introduce netif_skb_dev_features Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 082/131] net: ip, ipv6: handle gso skbs in forwarding path Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 083/131] net: use __GFP_NORETRY for high order allocations Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 084/131] ARM: tegra: only run PL310 init on systems with one Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 085/131] fs/proc/proc_devtree.c: remove empty /proc/device-tree when no openfirmware exists Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 086/131] Input: elantech - improve clickpad detection Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 087/131] KVM: MMU: handle invalid root_hpa at __direct_map Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 088/131] KVM: VMX: fix use after free of vmx->loaded_vmcs Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 089/131] Input: wacom - make sure touch_max is set for touch devices Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 090/131] e100: Fix "disabling already-disabled device" warning Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 091/131] bio-integrity: Fix bio_integrity_verify segment start bug Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 092/131] fs: fix iversion handling Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 093/131] ALSA: hda/realtek - Add more entry for enable HP mute led Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 094/131] " Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 095/131] xtensa: introduce spill_registers_kernel macro Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 096/131] dma: ste_dma40: don't dereference free:d descriptor Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 097/131] ARM64: unwind: Fix PC calculation Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 098/131] dm thin: avoid metadata commit if a pool's thin devices haven't changed Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 099/131] iio:gyro: bug on L3GD20H gyroscope support Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 100/131] ASoC: sta32x: Fix array access overflow Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 101/131] ASoC: wm8770: Fix wrong number of enum items Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 102/131] Input - arizona-haptics: Fix double lock of dapm_mutex Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 103/131] ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 104/131] SELinux: bigendian problems with filename trans rules Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 105/131] quota: Fix race between dqput() and dquot_scan_active() Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 106/131] ASoC: sta32x: Fix cache sync Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 107/131] dm thin: fix the error path for the thin device constructor Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 108/131] qla2xxx: Fix kernel panic on selective retransmission request Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 109/131] ASoC: wm8958-dsp: Fix firmware block loading Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 110/131] ALSA: hda - Add a fixup for HP Folio 13 mute LED Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 111/131] i7core_edac: Fix PCI device reference count Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 112/131] i7300_edac: Fix " Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 113/131] ioat: fix tasklet tear down Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 114/131] irq-metag*: stop set_affinity vectoring to offline cpus Luis Henriques
2014-03-05 14:23 ` [PATCH 3.11 115/131] ipc,mqueue: remove limits for the amount of system-wide queues Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 116/131] PM / hibernate: Fix restore hang in freeze_processes() Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 117/131] ASoC: da732x: Mark DC offset control registers volatile Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 118/131] dm mpath: fix stalls when handling invalid ioctls Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 119/131] ACPI / processor: Rework processor throttling with work_on_cpu() Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 120/131] USB: ftdi_sio: add Cressi Leonardo PID Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 121/131] usb: ehci: fix deadlock when threadirqs option is used Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 122/131] ASoC: sta32x: Fix wrong enum for limiter2 release rate Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 123/131] perf/x86: Fix event scheduling Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 124/131] perf: Fix hotplug splat Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 125/131] kvm: x86: fix emulator buffer overflow (CVE-2014-0049) Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 126/131] drm/radeon: print the supported atpx function mask Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 127/131] drm/radeon: fix missing bo reservation Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 128/131] drm/radeon: disable pll sharing for DP on DCE4.1 Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 129/131] powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 130/131] powerpc/crashdump : Fix page frame number check in copy_oldmem_page Luis Henriques
2014-03-05 14:24 ` [PATCH 3.11 131/131] PCI: mvebu: Use Device ID and revision from underlying endpoint Luis Henriques
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).