Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1334027 > unrolled thread
| Started by | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| First post | 2016-02-15 01:40 +0100 |
| Last post | 2016-02-15 18:10 +0100 |
| Articles | 20 on this page of 48 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 4.4 000/117] 4.4.2-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 042/117] ALSA: pcm: Fix potential deadlock in OSS emulation Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 077/117] iommu/io-pgtable-arm: Ensure we free the final level on teardown Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 074/117] tty: Wait interruptibly for tty lock on reopen Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 004/117] ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 046/117] ALSA: seq: Fix lockdep warnings due to double mutex locks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 069/117] usb: cdc-acm: send zero packet for intel 7260 modem Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 005/117] HID: usbhid: fix recursive deadlock Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 065/117] USB: cp210x: add ID for IAI USB to RS485 adaptor Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 040/117] ALSA: hda/realtek - Support headset mode for ALC225 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 070/117] usb: phy: msm: fix error handling in probe. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 041/117] ALSA: hda/realtek - Support Dell headset mode for ALC225 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 007/117] block: fix bio splitting on max sectors Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 056/117] ALSA: hda - Fix speaker output from VAIO AiO machines Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 009/117] ocfs2/dlm: ignore cleaning the migration mle that is inuse Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 072/117] usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 057/117] ALSA: hda - Fix bad dereference of jack object Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 044/117] ALSA: seq: Fix yet another races among ALSA timer accesses Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:40 +0100
[PATCH 4.4 019/117] parisc: Protect huge page pte changes with spinlocks Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 016/117] tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 002/117] NFSv4.1/pnfs: Fixup an lo->plh_block_lgets imbalance in layoutreturn Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 037/117] ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 031/117] ALSA: hda - disable dynamic clock gating on Broxton before reset Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 020/117] parisc: Fix __ARCH_SI_PREAMBLE_SIZE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 022/117] md/raid: only permit hot-add of compatible integrity profiles Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 023/117] hrtimer: Handle remaining time proper for TIME_LOW_RES Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 030/117] ALSA: Add missing dependency on CONFIG_SND_TIMER Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 038/117] ALSA: rawmidi: Fix race at copying & updating the position Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 021/117] [media] media: i2c: Dont export ir-kbd-i2c module alias Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 017/117] tracing/stacktrace: Show entire trace if passed in function not found Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 033/117] ALSA: dummy: Disable switching timer backend via sysfs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 034/117] ALSA: seq: Fix incorrect sanity check at snd_seq_oss_synth_cleanup() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 035/117] ALSA: seq: Degrade the error message for too many opens Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 006/117] base/platform: Fix platform drivers with no probe callback Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 018/117] printk: do cond_resched() between lines while outputting to consoles Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 036/117] ALSA: rawmidi: Make snd_rawmidi_transmit() race-free Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 028/117] ALSA: usb-audio: avoid freeing umidi object twice Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 026/117] ALSA: usb-audio: Fix OPPO HA-1 vendor ID Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 003/117] block: split bios to max possible length Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 039/117] ALSA: hda/realtek - New codec support of ALC225 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 027/117] ALSA: usb-audio: Add native DSD support for PS Audio NuWave DAC Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 015/117] PCI: Fix minimum allocation address overwrite Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 010/117] ocfs2/dlm: clear refmap bit of recovery lock while doing local recovery cleanup Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 032/117] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 025/117] ALSA: usb-audio: Add quirk for Microsoft LifeCam HD-6000 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
[PATCH 4.4 013/117] mtd: nand: assign reasonable default name for NAND drivers Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-02-15 01:50 +0100
Re: [PATCH 4.4 000/117] 4.4.2-stable review Guenter Roeck <linux@roeck-us.net> - 2016-02-15 17:00 +0100
Re: [PATCH 4.4 000/117] 4.4.2-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-02-15 18:10 +0100
Page 1 of 3 [1] 2 3 Next page →
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 000/117] 4.4.2-stable review |
| Message-ID | <r2dl0-tX-11@gated-at.bofh.it> |
This is the start of the stable review cycle for the 4.4.2 release.
There are 117 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Tue Feb 16 22:21:22 UTC 2016.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.2-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 4.4.2-rc1
Junil Lee <junil0814.lee@lge.com>
zsmalloc: fix migrate_zspage-zs_free race condition
Jerome Marchand <jmarchan@redhat.com>
zram: don't call idr_remove() from zram_remove()
Kyeongdon Kim <kyeongdon.kim@lge.com>
zram: try vmalloc() after kmalloc()
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
zram/zcomp: use GFP_NOIO to allocate streams
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8821ae: Fix 5G failure when EEPROM is incorrectly encoded
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8821ae: Fix errors in parameter initialization
Boris BREZILLON <boris.brezillon@free-electrons.com>
crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init()
Cyrille Pitchen <cyrille.pitchen@atmel.com>
crypto: atmel-sha - remove calls of clk_prepare() from atomic contexts
Cyrille Pitchen <cyrille.pitchen@atmel.com>
crypto: atmel-sha - fix atmel_sha_remove()
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Do not set MAY_BACKLOG on the async path
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Do not dereference ctx without socket lock
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Do not assume that req is unchanged
Mathias Krause <minipli@googlemail.com>
crypto: user - lock crypto_alg_list on alg dump
Ryan Ware <ware@linux.intel.com>
EVM: Use crypto_memneq() for digest comparisons
Wang, Rui Y <rui.y.wang@intel.com>
crypto: algif_hash - wait for crypto_ahash_init() to complete
Herbert Xu <herbert@gondor.apana.org.au>
crypto: shash - Fix has_key setting
Eli Cooper <elicooper@gmx.com>
crypto: chacha20-ssse3 - Align stack pointer to 64 bytes
Horia Geant? <horia.geanta@nxp.com>
crypto: caam - make write transactions bufferable on PPC platforms
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - sendmsg SG marking is off by one
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Load TX SG list after waiting
Jean Delvare <jdelvare@suse.de>
crypto: crc32c - Fix crc32c soft dependency
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Fix race condition in skcipher_check_key
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_hash - Fix race condition in hash_check_key
Herbert Xu <herbert@gondor.apana.org.au>
crypto: af_alg - Forbid bind(2) when nokey child sockets are present
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Remove custom release parent function
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_hash - Remove custom release parent function
Herbert Xu <herbert@gondor.apana.org.au>
crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path
Alexandra Yates <alexandra.yates@linux.intel.com>
ahci: Intel DNV device IDs SATA
Tejun Heo <tj@kernel.org>
libata: disable forced PORTS_IMPL for >= AHCI 1.3
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Add key check exception for cipher_null
Herbert Xu <herbert@gondor.apana.org.au>
crypto: skcipher - Add crypto_skcipher_has_setkey
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_hash - Require setkey before accept(2)
Herbert Xu <herbert@gondor.apana.org.au>
crypto: hash - Add crypto_ahash_has_setkey
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Add nokey compatibility path
Herbert Xu <herbert@gondor.apana.org.au>
crypto: af_alg - Add nokey compatibility path
Herbert Xu <herbert@gondor.apana.org.au>
crypto: af_alg - Fix socket double-free when accept fails
Herbert Xu <herbert@gondor.apana.org.au>
crypto: af_alg - Disallow bind/setkey/... after accept(2)
Herbert Xu <herbert@gondor.apana.org.au>
crypto: algif_skcipher - Require setkey before accept(2)
Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
sched: Fix crash in sched_init_numa()
Theodore Ts'o <tytso@mit.edu>
ext4 crypto: add missing locking for keyring_key access
Will Deacon <will.deacon@arm.com>
iommu/io-pgtable-arm: Ensure we free the final level on teardown
Peter Hurley <peter@hurleysoftware.com>
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
Peter Hurley <peter@hurleysoftware.com>
tty: Retry failed reopen if tty teardown in-progress
Peter Hurley <peter@hurleysoftware.com>
tty: Wait interruptibly for tty lock on reopen
Peter Hurley <peter@hurleysoftware.com>
n_tty: Fix unsafe reference to "other" ldisc
Lu Baolu <baolu.lu@linux.intel.com>
usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms
Lu Baolu <baolu.lu@linux.intel.com>
usb: xhci: handle both SSIC ports in PME stuck quirk
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
usb: phy: msm: fix error handling in probe.
Lu Baolu <baolu.lu@linux.intel.com>
usb: cdc-acm: send zero packet for intel 7260 modem
Lu Baolu <baolu.lu@linux.intel.com>
usb: cdc-acm: handle unlinked urb in acm read callback
John Ernberg <john.ernberg@actia.se>
USB: option: fix Cinterion AHxx enumeration
Daniele Palmas <dnlplm@gmail.com>
USB: serial: option: Adding support for Telit LE922
Peter Dedecker <peter.dedecker@hotmail.com>
USB: cp210x: add ID for IAI USB to RS485 adaptor
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable
Du, Changbin <changbin.du@intel.com>
usb: hub: do not clear BOS field during reset device
Johan Hovold <johan@kernel.org>
USB: visor: fix null-deref at probe
Vladis Dronov <vdronov@redhat.com>
USB: serial: visor: fix crash on detecting device without write_urbs
Bard Liao <bardliao@realtek.com>
ASoC: rt5645: fix the shift bit of IN1 boost
Mauro Carvalho Chehab <mchehab@osg.samsung.com>
saa7134-alsa: Only frees registered sound cards
Takashi Iwai <tiwai@suse.de>
ALSA: dummy: Implement timer backend switching more safely
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Fix bad dereference of jack object
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Fix speaker output from VAIO AiO machines
Takashi Iwai <tiwai@suse.de>
Revert "ALSA: hda - Fix noise on Gigabyte Z170X mobo"
David Henningsson <david.henningsson@canonical.com>
ALSA: hda - Fix static checker warning in patch_hdmi.c
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Add fixup for Mac Mini 7,1 model
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Fix race between stop and interrupt
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Fix wrong instance passed to slave callbacks
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Fix race at concurrent reads
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Fix link corruption due to double start or stop
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Fix leftover link at closing
Takashi Iwai <tiwai@suse.de>
ALSA: timer: Code cleanup
Takashi Iwai <tiwai@suse.de>
ALSA: seq: Fix lockdep warnings due to double mutex locks
Takashi Iwai <tiwai@suse.de>
ALSA: seq: Fix race at closing in virmidi driver
Takashi Iwai <tiwai@suse.de>
ALSA: seq: Fix yet another races among ALSA timer accesses
Vinod Koul <vinod.koul@intel.com>
ASoC: dpcm: fix the BE state on hw_free
Takashi Iwai <tiwai@suse.de>
ALSA: pcm: Fix potential deadlock in OSS emulation
Kailang Yang <kailang@realtek.com>
ALSA: hda/realtek - Support Dell headset mode for ALC225
Kailang Yang <kailang@realtek.com>
ALSA: hda/realtek - Support headset mode for ALC225
Kailang Yang <kailang@realtek.com>
ALSA: hda/realtek - New codec support of ALC225
Takashi Iwai <tiwai@suse.de>
ALSA: rawmidi: Fix race at copying & updating the position
Takashi Iwai <tiwai@suse.de>
ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check
Takashi Iwai <tiwai@suse.de>
ALSA: rawmidi: Make snd_rawmidi_transmit() race-free
Takashi Iwai <tiwai@suse.de>
ALSA: seq: Degrade the error message for too many opens
Takashi Iwai <tiwai@suse.de>
ALSA: seq: Fix incorrect sanity check at snd_seq_oss_synth_cleanup()
Takashi Iwai <tiwai@suse.de>
ALSA: dummy: Disable switching timer backend via sysfs
Takashi Iwai <tiwai@suse.de>
ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures
Libin Yang <libin.yang@linux.intel.com>
ALSA: hda - disable dynamic clock gating on Broxton before reset
Takashi Iwai <tiwai@suse.de>
ALSA: Add missing dependency on CONFIG_SND_TIMER
Lucas Tanure <tanure@linux.com>
ALSA: bebob: Use a signed return type for get_formation_index
Andrey Konovalov <andreyknvl@gmail.com>
ALSA: usb-audio: avoid freeing umidi object twice
Jurgen Kramer <gtmkramer@xs4all.nl>
ALSA: usb-audio: Add native DSD support for PS Audio NuWave DAC
Jurgen Kramer <gtmkramer@xs4all.nl>
ALSA: usb-audio: Fix OPPO HA-1 vendor ID
Lev Lybin <lev.lybin@gmail.com>
ALSA: usb-audio: Add quirk for Microsoft LifeCam HD-6000
Guillaume Fougnies <guillaume@eulerian.com>
ALSA: usb-audio: Fix TEAC UD-501/UD-503/NT-503 usb delay
Thomas Gleixner <tglx@linutronix.de>
hrtimer: Handle remaining time proper for TIME_LOW_RES
Dan Williams <dan.j.williams@intel.com>
md/raid: only permit hot-add of compatible integrity profiles
Javier Martinez Canillas <javier@osg.samsung.com>
media: i2c: Don't export ir-kbd-i2c module alias
Helge Deller <deller@gmx.de>
parisc: Fix __ARCH_SI_PREAMBLE_SIZE
Helge Deller <deller@gmx.de>
parisc: Protect huge page pte changes with spinlocks
Tejun Heo <tj@kernel.org>
printk: do cond_resched() between lines while outputting to consoles
Steven Rostedt <rostedt@goodmis.org>
tracing/stacktrace: Show entire trace if passed in function not found
Steven Rostedt (Red Hat) <rostedt@goodmis.org>
tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs()
Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
PCI: Fix minimum allocation address overwrite
Grygorii Strashko <grygorii.strashko@ti.com>
PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD
Brian Norris <computersforpeace@gmail.com>
mtd: nand: assign reasonable default name for NAND drivers
Uri Mashiach <uri.mashiach@compulab.co.il>
wlcore/wl12xx: spi: fix NULL pointer dereference (Oops)
Uri Mashiach <uri.mashiach@compulab.co.il>
wlcore/wl12xx: spi: fix oops on firmware load
xuejiufei <xuejiufei@huawei.com>
ocfs2/dlm: clear refmap bit of recovery lock while doing local recovery cleanup
xuejiufei <xuejiufei@huawei.com>
ocfs2/dlm: ignore cleaning the migration mle that is inuse
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Implement loopback control switch for Realtek and other codecs
Ming Lei <tom.leiming@gmail.com>
block: fix bio splitting on max sectors
Martin Wilck <Martin.Wilck@ts.fujitsu.com>
base/platform: Fix platform drivers with no probe callback
Ioan-Adrian Ratiu <adi@adirat.com>
HID: usbhid: fix recursive deadlock
Tariq Saeed <tariq.x.saeed@oracle.com>
ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock
Keith Busch <keith.busch@intel.com>
block: split bios to max possible length
Trond Myklebust <trond.myklebust@primarydata.com>
NFSv4.1/pnfs: Fixup an lo->plh_block_lgets imbalance in layoutreturn
LABBE Corentin <clabbe.montjoie@gmail.com>
crypto: sun4i-ss - add missing statesize
-------------
Diffstat:
Makefile | 4 +-
arch/parisc/include/asm/hugetlb.h | 20 +-
arch/parisc/include/uapi/asm/siginfo.h | 4 +
arch/parisc/mm/hugetlbpage.c | 60 ++++-
arch/x86/crypto/chacha20-ssse3-x86_64.S | 6 +-
block/blk-merge.c | 31 ++-
crypto/af_alg.c | 55 ++++-
crypto/ahash.c | 5 +-
crypto/algif_hash.c | 169 +++++++++++++-
crypto/algif_skcipher.c | 252 ++++++++++++++++-----
crypto/crc32c_generic.c | 1 -
crypto/crypto_user.c | 6 +-
crypto/shash.c | 5 +-
crypto/skcipher.c | 2 +
drivers/ata/ahci.c | 20 ++
drivers/ata/libahci.c | 4 +-
drivers/base/platform.c | 13 +-
drivers/block/zram/zcomp.c | 4 +-
drivers/block/zram/zcomp_lz4.c | 23 +-
drivers/block/zram/zcomp_lzo.c | 23 +-
drivers/block/zram/zram_drv.c | 7 +-
drivers/crypto/atmel-sha.c | 23 +-
drivers/crypto/caam/ctrl.c | 4 +-
drivers/crypto/marvell/cesa.c | 2 +-
drivers/crypto/sunxi-ss/sun4i-ss-core.c | 2 +
drivers/hid/usbhid/hid-core.c | 4 +-
drivers/iommu/io-pgtable-arm.c | 11 +-
drivers/md/md.c | 28 ++-
drivers/md/md.h | 2 +-
drivers/md/multipath.c | 6 +-
drivers/md/raid1.c | 6 +-
drivers/md/raid10.c | 6 +-
drivers/media/i2c/ir-kbd-i2c.c | 1 -
drivers/media/pci/saa7134/saa7134-alsa.c | 5 +-
drivers/mtd/nand/nand_base.c | 3 +
drivers/net/wireless/realtek/rtlwifi/regd.c | 2 +-
.../net/wireless/realtek/rtlwifi/rtl8821ae/sw.c | 9 +-
drivers/net/wireless/ti/wlcore/io.h | 10 +-
drivers/net/wireless/ti/wlcore/spi.c | 10 +-
drivers/pci/bus.c | 6 +-
drivers/pci/host/pci-dra7xx.c | 3 +-
drivers/pci/host/pci-exynos.c | 3 +-
drivers/pci/host/pci-imx6.c | 3 +-
drivers/pci/host/pci-tegra.c | 2 +-
drivers/pci/host/pcie-rcar.c | 6 +-
drivers/pci/host/pcie-spear13xx.c | 3 +-
drivers/pci/host/pcie-xilinx.c | 3 +-
drivers/tty/n_tty.c | 7 +-
drivers/tty/tty_io.c | 44 +++-
drivers/tty/tty_mutex.c | 8 +
drivers/usb/class/cdc-acm.c | 9 +-
drivers/usb/class/cdc-acm.h | 1 +
drivers/usb/core/hub.c | 8 +-
drivers/usb/host/xhci-pci.c | 52 +++--
drivers/usb/phy/phy-msm-usb.c | 37 +--
drivers/usb/serial/cp210x.c | 1 +
drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio_ids.h | 1 +
drivers/usb/serial/option.c | 18 +-
drivers/usb/serial/visor.c | 11 +-
fs/ext4/crypto_key.c | 4 +
fs/nfs/nfs4proc.c | 1 -
fs/ocfs2/dlm/dlmmaster.c | 26 ++-
fs/ocfs2/dlm/dlmrecovery.c | 2 +
fs/ocfs2/dlmglue.c | 6 +
include/crypto/hash.h | 6 +
include/crypto/if_alg.h | 11 +-
include/crypto/skcipher.h | 7 +
include/linux/console.h | 1 +
include/linux/hrtimer.h | 34 ++-
include/linux/tty.h | 1 +
include/sound/rawmidi.h | 4 +
kernel/panic.c | 3 +-
kernel/printk/printk.c | 35 ++-
kernel/sched/core.c | 2 +-
kernel/time/hrtimer.c | 55 +++--
kernel/time/timer_list.c | 2 +-
kernel/trace/trace.c | 2 +-
kernel/trace/trace_stack.c | 7 +
lib/libcrc32c.c | 1 +
mm/zsmalloc.c | 14 +-
security/integrity/evm/evm_main.c | 3 +-
sound/core/compress_offload.c | 11 +
sound/core/oss/pcm_oss.c | 21 +-
sound/core/rawmidi.c | 134 +++++++----
sound/core/seq/oss/seq_oss_init.c | 2 +-
sound/core/seq/oss/seq_oss_synth.c | 2 +-
sound/core/seq/seq_clientmgr.c | 3 +
sound/core/seq/seq_ports.c | 233 ++++++++++---------
sound/core/seq/seq_timer.c | 87 +++++--
sound/core/seq/seq_virmidi.c | 23 +-
sound/core/timer.c | 98 ++++----
sound/drivers/dummy.c | 35 +--
sound/firewire/bebob/bebob_stream.c | 14 +-
sound/isa/Kconfig | 4 +
sound/pci/Kconfig | 3 +
sound/pci/hda/hda_generic.c | 91 ++++++--
sound/pci/hda/hda_intel.c | 13 ++
sound/pci/hda/hda_jack.c | 2 +-
sound/pci/hda/hda_jack.h | 2 +-
sound/pci/hda/patch_ca0132.c | 5 +-
sound/pci/hda/patch_cirrus.c | 27 +++
sound/pci/hda/patch_hdmi.c | 5 +-
sound/pci/hda/patch_realtek.c | 85 ++++++-
sound/pci/hda/patch_sigmatel.c | 6 +-
sound/soc/codecs/rt5645.c | 2 +-
sound/soc/soc-pcm.c | 3 +-
sound/sparc/Kconfig | 1 +
sound/usb/midi.c | 1 -
sound/usb/quirks.c | 18 +-
110 files changed, 1667 insertions(+), 566 deletions(-)
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 042/117] ALSA: pcm: Fix potential deadlock in OSS emulation |
| Message-ID | <r2fmO-1Of-27@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit b248371628aad599a48540962f6b85a21a8a0c3f upstream.
There are potential deadlocks in PCM OSS emulation code while
accessing read/write and mmap concurrently. This comes from the
infamous mmap_sem usage in copy_from/to_user(). Namely,
snd_pcm_oss_write() ->
&runtime->oss.params_lock ->
copy_to_user() ->
&mm->mmap_sem
mmap() ->
&mm->mmap_sem ->
snd_pcm_oss_mmap() ->
&runtime->oss.params_lock
Since we can't avoid taking params_lock from mmap code path, use
trylock variant and aborts with -EAGAIN as a workaround of this AB/BA
deadlock.
BugLink: http://lkml.kernel.org/r/CACT4Y+bVrBKDG0G2_AcUgUQa+X91VKTeS4v+wN7BSHwHtqn3kQ@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/oss/pcm_oss.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -834,7 +834,8 @@ static int choose_rate(struct snd_pcm_su
return snd_pcm_hw_param_near(substream, params, SNDRV_PCM_HW_PARAM_RATE, best_rate, NULL);
}
-static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream)
+static int snd_pcm_oss_change_params(struct snd_pcm_substream *substream,
+ bool trylock)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_pcm_hw_params *params, *sparams;
@@ -848,7 +849,10 @@ static int snd_pcm_oss_change_params(str
struct snd_mask sformat_mask;
struct snd_mask mask;
- if (mutex_lock_interruptible(&runtime->oss.params_lock))
+ if (trylock) {
+ if (!(mutex_trylock(&runtime->oss.params_lock)))
+ return -EAGAIN;
+ } else if (mutex_lock_interruptible(&runtime->oss.params_lock))
return -EINTR;
sw_params = kmalloc(sizeof(*sw_params), GFP_KERNEL);
params = kmalloc(sizeof(*params), GFP_KERNEL);
@@ -1092,7 +1096,7 @@ static int snd_pcm_oss_get_active_substr
if (asubstream == NULL)
asubstream = substream;
if (substream->runtime->oss.params) {
- err = snd_pcm_oss_change_params(substream);
+ err = snd_pcm_oss_change_params(substream, false);
if (err < 0)
return err;
}
@@ -1132,7 +1136,7 @@ static int snd_pcm_oss_make_ready(struct
return 0;
runtime = substream->runtime;
if (runtime->oss.params) {
- err = snd_pcm_oss_change_params(substream);
+ err = snd_pcm_oss_change_params(substream, false);
if (err < 0)
return err;
}
@@ -2163,7 +2167,7 @@ static int snd_pcm_oss_get_space(struct
runtime = substream->runtime;
if (runtime->oss.params &&
- (err = snd_pcm_oss_change_params(substream)) < 0)
+ (err = snd_pcm_oss_change_params(substream, false)) < 0)
return err;
info.fragsize = runtime->oss.period_bytes;
@@ -2800,7 +2804,12 @@ static int snd_pcm_oss_mmap(struct file
return -EIO;
if (runtime->oss.params) {
- if ((err = snd_pcm_oss_change_params(substream)) < 0)
+ /* use mutex_trylock() for params_lock for avoiding a deadlock
+ * between mmap_sem and params_lock taken by
+ * copy_from/to_user() in snd_pcm_oss_write/read()
+ */
+ err = snd_pcm_oss_change_params(substream, true);
+ if (err < 0)
return err;
}
#ifdef CONFIG_SND_PCM_OSS_PLUGINS
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 077/117] iommu/io-pgtable-arm: Ensure we free the final level on teardown |
| Message-ID | <r2fmP-1Of-33@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Will Deacon <will.deacon@arm.com>
commit 12c2ab09571e8aae3a87da2a4a452632a5fac1e5 upstream.
When tearing down page tables, we return early for the final level
since we know that we won't have any table pointers to follow.
Unfortunately, this also means that we forget to free the final level,
so we end up leaking memory.
Fix the issue by always freeing the current level, but just don't bother
to iterate over the ptes if we're at the final level.
Reported-by: Zhang Bo <zhangbo_a@xiaomi.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/iommu/io-pgtable-arm.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/drivers/iommu/io-pgtable-arm.c
+++ b/drivers/iommu/io-pgtable-arm.c
@@ -405,17 +405,18 @@ static void __arm_lpae_free_pgtable(stru
arm_lpae_iopte *start, *end;
unsigned long table_size;
- /* Only leaf entries at the last level */
- if (lvl == ARM_LPAE_MAX_LEVELS - 1)
- return;
-
if (lvl == ARM_LPAE_START_LVL(data))
table_size = data->pgd_size;
else
table_size = 1UL << data->pg_shift;
start = ptep;
- end = (void *)ptep + table_size;
+
+ /* Only leaf entries at the last level */
+ if (lvl == ARM_LPAE_MAX_LEVELS - 1)
+ end = ptep;
+ else
+ end = (void *)ptep + table_size;
while (ptep != end) {
arm_lpae_iopte pte = *ptep++;
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 074/117] tty: Wait interruptibly for tty lock on reopen |
| Message-ID | <r2fmO-1Of-29@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Hurley <peter@hurleysoftware.com>
commit 0bfd464d3fdd5bb322f9cace4cc47f1796545cf7 upstream.
Allow a signal to interrupt the wait for a tty reopen; eg., if
the tty has starting final close and is waiting for the device to
drain.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/tty_io.c | 8 +++++++-
drivers/tty/tty_mutex.c | 8 ++++++++
include/linux/tty.h | 1 +
3 files changed, 16 insertions(+), 1 deletion(-)
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2069,7 +2069,12 @@ retry_open:
if (tty) {
mutex_unlock(&tty_mutex);
- tty_lock(tty);
+ retval = tty_lock_interruptible(tty);
+ if (retval) {
+ if (retval == -EINTR)
+ retval = -ERESTARTSYS;
+ goto err_unref;
+ }
/* safe to drop the kref from tty_driver_lookup_tty() */
tty_kref_put(tty);
retval = tty_reopen(tty);
@@ -2156,6 +2161,7 @@ retry_open:
return 0;
err_unlock:
mutex_unlock(&tty_mutex);
+err_unref:
/* after locks to avoid deadlock */
if (!IS_ERR_OR_NULL(driver))
tty_driver_kref_put(driver);
--- a/drivers/tty/tty_mutex.c
+++ b/drivers/tty/tty_mutex.c
@@ -22,6 +22,14 @@ void __lockfunc tty_lock(struct tty_stru
}
EXPORT_SYMBOL(tty_lock);
+int tty_lock_interruptible(struct tty_struct *tty)
+{
+ if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty))
+ return -EIO;
+ tty_kref_get(tty);
+ return mutex_lock_interruptible(&tty->legacy_mutex);
+}
+
void __lockfunc tty_unlock(struct tty_struct *tty)
{
if (tty->magic != TTY_MAGIC) {
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -654,6 +654,7 @@ extern long vt_compat_ioctl(struct tty_s
/* tty_mutex.c */
/* functions for preparation of BKL removal */
extern void __lockfunc tty_lock(struct tty_struct *tty);
+extern int tty_lock_interruptible(struct tty_struct *tty);
extern void __lockfunc tty_unlock(struct tty_struct *tty);
extern void __lockfunc tty_lock_slave(struct tty_struct *tty);
extern void __lockfunc tty_unlock_slave(struct tty_struct *tty);
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 004/117] ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock |
| Message-ID | <r2fmO-1Of-31@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tariq Saeed <tariq.x.saeed@oracle.com>
commit b1b1e15ef6b80facf76d6757649dfd7295eda29f upstream.
NFS on a 2 node ocfs2 cluster each node exporting dir. The lock causing
the hang is the global bit map inode lock. Node 1 is master, has the
lock granted in PR mode; Node 2 is in the converting list (PR -> EX).
There are no holders of the lock on the master node so it should
downconvert to NL and grant EX to node 2 but that does not happen.
BLOCKED + QUEUED in lock res are set and it is on osb blocked list.
Threads are waiting in __ocfs2_cluster_lock on BLOCKED. One thread
wants EX, rest want PR. So it is as though the downconvert thread needs
to be kicked to complete the conv.
The hang is caused by an EX req coming into __ocfs2_cluster_lock on the
heels of a PR req after it sets BUSY (drops l_lock, releasing EX
thread), forcing the incoming EX to wait on BUSY without doing anything.
PR has called ocfs2_dlm_lock, which sets the node 1 lock from NL -> PR,
queues ast.
At this time, upconvert (PR ->EX) arrives from node 2, finds conflict
with node 1 lock in PR, so the lock res is put on dlm thread's dirty
listt.
After ret from ocf2_dlm_lock, PR thread now waits behind EX on BUSY till
awoken by ast.
Now it is dlm_thread that serially runs dlm_shuffle_lists, ast, bast, in
that order. dlm_shuffle_lists ques a bast on behalf of node 2 (which
will be run by dlm_thread right after the ast). ast does its part, sets
UPCONVERT_FINISHING, clears BUSY and wakes its waiters. Next,
dlm_thread runs bast. It sets BLOCKED and kicks dc thread. dc thread
runs ocfs2_unblock_lock, but since UPCONVERT_FINISHING set, skips doing
anything and reques.
Inside of __ocfs2_cluster_lock, since EX has been waiting on BUSY ahead
of PR, it wakes up first, finds BLOCKED set and skips doing anything but
clearing UPCONVERT_FINISHING (which was actually "meant" for the PR
thread), and this time waits on BLOCKED. Next, the PR thread comes out
of wait but since UPCONVERT_FINISHING is not set, it skips updating the
l_ro_holders and goes straight to wait on BLOCKED. So there, we have a
hang! Threads in __ocfs2_cluster_lock wait on BLOCKED, lock res in osb
blocked list. Only when dc thread is awoken, it will run
ocfs2_unblock_lock and things will unhang.
One way to fix this is to wake the dc thread on the flag after clearing
UPCONVERT_FINISHING
Orabug: 20933419
Signed-off-by: Tariq Saeed <tariq.x.saeed@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Reviewed-by: Wengang Wang <wen.gang.wang@oracle.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Eric Ren <zren@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ocfs2/dlmglue.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -1390,6 +1390,7 @@ static int __ocfs2_cluster_lock(struct o
unsigned int gen;
int noqueue_attempted = 0;
int dlm_locked = 0;
+ int kick_dc = 0;
if (!(lockres->l_flags & OCFS2_LOCK_INITIALIZED)) {
mlog_errno(-EINVAL);
@@ -1524,7 +1525,12 @@ update_holders:
unlock:
lockres_clear_flags(lockres, OCFS2_LOCK_UPCONVERT_FINISHING);
+ /* ocfs2_unblock_lock reques on seeing OCFS2_LOCK_UPCONVERT_FINISHING */
+ kick_dc = (lockres->l_flags & OCFS2_LOCK_BLOCKED);
+
spin_unlock_irqrestore(&lockres->l_lock, flags);
+ if (kick_dc)
+ ocfs2_wake_downconvert_thread(osb);
out:
/*
* This is helping work around a lock inversion between the page lock
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 046/117] ALSA: seq: Fix lockdep warnings due to double mutex locks |
| Message-ID | <r2fmP-1Of-35@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 7f0973e973cd74aa40747c9d38844560cd184ee8 upstream.
The port subscription code uses double mutex locks for source and
destination ports, and this may become racy once when wrongly set up.
It leads to lockdep warning splat, typically triggered by fuzzer like
syzkaller, although the actual deadlock hasn't been seen, so far.
This patch simplifies the handling by reducing to two single locks, so
that no lockdep warning will be trigger any longer.
By splitting to two actions, a still-in-progress element shall be
added in one list while handling another. For ignoring this element,
a new check is added in deliver_to_subscribers().
Along with it, the code to add/remove the subscribers list element was
cleaned up and refactored.
BugLink: http://lkml.kernel.org/r/CACT4Y+aKQXV7xkBW9hpQbzaDO7LrUvohxWh-UwMxXjDy-yBD=A@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/seq/seq_clientmgr.c | 3
sound/core/seq/seq_ports.c | 235 ++++++++++++++++++++++-------------------
2 files changed, 134 insertions(+), 104 deletions(-)
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -678,6 +678,9 @@ static int deliver_to_subscribers(struct
else
down_read(&grp->list_mutex);
list_for_each_entry(subs, &grp->list_head, src_list) {
+ /* both ports ready? */
+ if (atomic_read(&subs->ref_count) != 2)
+ continue;
event->dest = subs->info.dest;
if (subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIMESTAMP)
/* convert time according to flag with subscription */
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -173,10 +173,6 @@ struct snd_seq_client_port *snd_seq_crea
}
/* */
-enum group_type {
- SRC_LIST, DEST_LIST
-};
-
static int subscribe_port(struct snd_seq_client *client,
struct snd_seq_client_port *port,
struct snd_seq_port_subs_info *grp,
@@ -203,6 +199,20 @@ static struct snd_seq_client_port *get_c
return NULL;
}
+static void delete_and_unsubscribe_port(struct snd_seq_client *client,
+ struct snd_seq_client_port *port,
+ struct snd_seq_subscribers *subs,
+ bool is_src, bool ack);
+
+static inline struct snd_seq_subscribers *
+get_subscriber(struct list_head *p, bool is_src)
+{
+ if (is_src)
+ return list_entry(p, struct snd_seq_subscribers, src_list);
+ else
+ return list_entry(p, struct snd_seq_subscribers, dest_list);
+}
+
/*
* remove all subscribers on the list
* this is called from port_delete, for each src and dest list.
@@ -210,7 +220,7 @@ static struct snd_seq_client_port *get_c
static void clear_subscriber_list(struct snd_seq_client *client,
struct snd_seq_client_port *port,
struct snd_seq_port_subs_info *grp,
- int grptype)
+ int is_src)
{
struct list_head *p, *n;
@@ -219,15 +229,13 @@ static void clear_subscriber_list(struct
struct snd_seq_client *c;
struct snd_seq_client_port *aport;
- if (grptype == SRC_LIST) {
- subs = list_entry(p, struct snd_seq_subscribers, src_list);
+ subs = get_subscriber(p, is_src);
+ if (is_src)
aport = get_client_port(&subs->info.dest, &c);
- } else {
- subs = list_entry(p, struct snd_seq_subscribers, dest_list);
+ else
aport = get_client_port(&subs->info.sender, &c);
- }
- list_del(p);
- unsubscribe_port(client, port, grp, &subs->info, 0);
+ delete_and_unsubscribe_port(client, port, subs, is_src, false);
+
if (!aport) {
/* looks like the connected port is being deleted.
* we decrease the counter, and when both ports are deleted
@@ -235,21 +243,14 @@ static void clear_subscriber_list(struct
*/
if (atomic_dec_and_test(&subs->ref_count))
kfree(subs);
- } else {
- /* ok we got the connected port */
- struct snd_seq_port_subs_info *agrp;
- agrp = (grptype == SRC_LIST) ? &aport->c_dest : &aport->c_src;
- down_write(&agrp->list_mutex);
- if (grptype == SRC_LIST)
- list_del(&subs->dest_list);
- else
- list_del(&subs->src_list);
- up_write(&agrp->list_mutex);
- unsubscribe_port(c, aport, agrp, &subs->info, 1);
- kfree(subs);
- snd_seq_port_unlock(aport);
- snd_seq_client_unlock(c);
+ continue;
}
+
+ /* ok we got the connected port */
+ delete_and_unsubscribe_port(c, aport, subs, !is_src, true);
+ kfree(subs);
+ snd_seq_port_unlock(aport);
+ snd_seq_client_unlock(c);
}
}
@@ -262,8 +263,8 @@ static int port_delete(struct snd_seq_cl
snd_use_lock_sync(&port->use_lock);
/* clear subscribers info */
- clear_subscriber_list(client, port, &port->c_src, SRC_LIST);
- clear_subscriber_list(client, port, &port->c_dest, DEST_LIST);
+ clear_subscriber_list(client, port, &port->c_src, true);
+ clear_subscriber_list(client, port, &port->c_dest, false);
if (port->private_free)
port->private_free(port->private_data);
@@ -479,85 +480,120 @@ static int match_subs_info(struct snd_se
return 0;
}
+static int check_and_subscribe_port(struct snd_seq_client *client,
+ struct snd_seq_client_port *port,
+ struct snd_seq_subscribers *subs,
+ bool is_src, bool exclusive, bool ack)
+{
+ struct snd_seq_port_subs_info *grp;
+ struct list_head *p;
+ struct snd_seq_subscribers *s;
+ int err;
-/* connect two ports */
-int snd_seq_port_connect(struct snd_seq_client *connector,
- struct snd_seq_client *src_client,
- struct snd_seq_client_port *src_port,
- struct snd_seq_client *dest_client,
- struct snd_seq_client_port *dest_port,
- struct snd_seq_port_subscribe *info)
-{
- struct snd_seq_port_subs_info *src = &src_port->c_src;
- struct snd_seq_port_subs_info *dest = &dest_port->c_dest;
- struct snd_seq_subscribers *subs, *s;
- int err, src_called = 0;
- unsigned long flags;
- int exclusive;
-
- subs = kzalloc(sizeof(*subs), GFP_KERNEL);
- if (! subs)
- return -ENOMEM;
-
- subs->info = *info;
- atomic_set(&subs->ref_count, 2);
-
- down_write(&src->list_mutex);
- down_write_nested(&dest->list_mutex, SINGLE_DEPTH_NESTING);
-
- exclusive = info->flags & SNDRV_SEQ_PORT_SUBS_EXCLUSIVE ? 1 : 0;
+ grp = is_src ? &port->c_src : &port->c_dest;
err = -EBUSY;
+ down_write(&grp->list_mutex);
if (exclusive) {
- if (! list_empty(&src->list_head) || ! list_empty(&dest->list_head))
+ if (!list_empty(&grp->list_head))
goto __error;
} else {
- if (src->exclusive || dest->exclusive)
+ if (grp->exclusive)
goto __error;
/* check whether already exists */
- list_for_each_entry(s, &src->list_head, src_list) {
- if (match_subs_info(info, &s->info))
- goto __error;
- }
- list_for_each_entry(s, &dest->list_head, dest_list) {
- if (match_subs_info(info, &s->info))
+ list_for_each(p, &grp->list_head) {
+ s = get_subscriber(p, is_src);
+ if (match_subs_info(&subs->info, &s->info))
goto __error;
}
}
- if ((err = subscribe_port(src_client, src_port, src, info,
- connector->number != src_client->number)) < 0)
- goto __error;
- src_called = 1;
-
- if ((err = subscribe_port(dest_client, dest_port, dest, info,
- connector->number != dest_client->number)) < 0)
+ err = subscribe_port(client, port, grp, &subs->info, ack);
+ if (err < 0) {
+ grp->exclusive = 0;
goto __error;
+ }
/* add to list */
- write_lock_irqsave(&src->list_lock, flags);
- // write_lock(&dest->list_lock); // no other lock yet
- list_add_tail(&subs->src_list, &src->list_head);
- list_add_tail(&subs->dest_list, &dest->list_head);
- // write_unlock(&dest->list_lock); // no other lock yet
- write_unlock_irqrestore(&src->list_lock, flags);
+ write_lock_irq(&grp->list_lock);
+ if (is_src)
+ list_add_tail(&subs->src_list, &grp->list_head);
+ else
+ list_add_tail(&subs->dest_list, &grp->list_head);
+ grp->exclusive = exclusive;
+ atomic_inc(&subs->ref_count);
+ write_unlock_irq(&grp->list_lock);
+ err = 0;
- src->exclusive = dest->exclusive = exclusive;
+ __error:
+ up_write(&grp->list_mutex);
+ return err;
+}
+
+static void delete_and_unsubscribe_port(struct snd_seq_client *client,
+ struct snd_seq_client_port *port,
+ struct snd_seq_subscribers *subs,
+ bool is_src, bool ack)
+{
+ struct snd_seq_port_subs_info *grp;
+
+ grp = is_src ? &port->c_src : &port->c_dest;
+ down_write(&grp->list_mutex);
+ write_lock_irq(&grp->list_lock);
+ if (is_src)
+ list_del(&subs->src_list);
+ else
+ list_del(&subs->dest_list);
+ grp->exclusive = 0;
+ write_unlock_irq(&grp->list_lock);
+ up_write(&grp->list_mutex);
+
+ unsubscribe_port(client, port, grp, &subs->info, ack);
+}
+
+/* connect two ports */
+int snd_seq_port_connect(struct snd_seq_client *connector,
+ struct snd_seq_client *src_client,
+ struct snd_seq_client_port *src_port,
+ struct snd_seq_client *dest_client,
+ struct snd_seq_client_port *dest_port,
+ struct snd_seq_port_subscribe *info)
+{
+ struct snd_seq_subscribers *subs;
+ bool exclusive;
+ int err;
+
+ subs = kzalloc(sizeof(*subs), GFP_KERNEL);
+ if (!subs)
+ return -ENOMEM;
+
+ subs->info = *info;
+ atomic_set(&subs->ref_count, 0);
+ INIT_LIST_HEAD(&subs->src_list);
+ INIT_LIST_HEAD(&subs->dest_list);
+
+ exclusive = !!(info->flags & SNDRV_SEQ_PORT_SUBS_EXCLUSIVE);
+
+ err = check_and_subscribe_port(src_client, src_port, subs, true,
+ exclusive,
+ connector->number != src_client->number);
+ if (err < 0)
+ goto error;
+ err = check_and_subscribe_port(dest_client, dest_port, subs, false,
+ exclusive,
+ connector->number != dest_client->number);
+ if (err < 0)
+ goto error_dest;
- up_write(&dest->list_mutex);
- up_write(&src->list_mutex);
return 0;
- __error:
- if (src_called)
- unsubscribe_port(src_client, src_port, src, info,
- connector->number != src_client->number);
+ error_dest:
+ delete_and_unsubscribe_port(src_client, src_port, subs, true,
+ connector->number != src_client->number);
+ error:
kfree(subs);
- up_write(&dest->list_mutex);
- up_write(&src->list_mutex);
return err;
}
-
/* remove the connection */
int snd_seq_port_disconnect(struct snd_seq_client *connector,
struct snd_seq_client *src_client,
@@ -567,37 +603,28 @@ int snd_seq_port_disconnect(struct snd_s
struct snd_seq_port_subscribe *info)
{
struct snd_seq_port_subs_info *src = &src_port->c_src;
- struct snd_seq_port_subs_info *dest = &dest_port->c_dest;
struct snd_seq_subscribers *subs;
int err = -ENOENT;
- unsigned long flags;
down_write(&src->list_mutex);
- down_write_nested(&dest->list_mutex, SINGLE_DEPTH_NESTING);
-
/* look for the connection */
list_for_each_entry(subs, &src->list_head, src_list) {
if (match_subs_info(info, &subs->info)) {
- write_lock_irqsave(&src->list_lock, flags);
- // write_lock(&dest->list_lock); // no lock yet
- list_del(&subs->src_list);
- list_del(&subs->dest_list);
- // write_unlock(&dest->list_lock);
- write_unlock_irqrestore(&src->list_lock, flags);
- src->exclusive = dest->exclusive = 0;
- unsubscribe_port(src_client, src_port, src, info,
- connector->number != src_client->number);
- unsubscribe_port(dest_client, dest_port, dest, info,
- connector->number != dest_client->number);
- kfree(subs);
+ atomic_dec(&subs->ref_count); /* mark as not ready */
err = 0;
break;
}
}
-
- up_write(&dest->list_mutex);
up_write(&src->list_mutex);
- return err;
+ if (err < 0)
+ return err;
+
+ delete_and_unsubscribe_port(src_client, src_port, subs, true,
+ connector->number != src_client->number);
+ delete_and_unsubscribe_port(dest_client, dest_port, subs, false,
+ connector->number != dest_client->number);
+ kfree(subs);
+ return 0;
}
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 069/117] usb: cdc-acm: send zero packet for intel 7260 modem |
| Message-ID | <r2fmP-1Of-37@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <baolu.lu@linux.intel.com>
commit ffdb1e369a73b380fce95b05f8498d92c43842b4 upstream.
For Intel 7260 modem, it is needed for host side to send zero
packet if the BULK OUT size is equal to USB endpoint max packet
length. Otherwise, modem side may still wait for more data and
cannot give response to host side.
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/class/cdc-acm.c | 6 ++++++
drivers/usb/class/cdc-acm.h | 1 +
2 files changed, 7 insertions(+)
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -1405,6 +1405,8 @@ made_compressed_probe:
usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
NULL, acm->writesize, acm_write_bulk, snd);
snd->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+ if (quirks & SEND_ZERO_PACKET)
+ snd->urb->transfer_flags |= URB_ZERO_PACKET;
snd->instance = acm;
}
@@ -1862,6 +1864,10 @@ static const struct usb_device_id acm_id
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
USB_CDC_ACM_PROTO_AT_CDMA) },
+ { USB_DEVICE(0x1519, 0x0452), /* Intel 7260 modem */
+ .driver_info = SEND_ZERO_PACKET,
+ },
+
{ }
};
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -134,3 +134,4 @@ struct acm {
#define IGNORE_DEVICE BIT(5)
#define QUIRK_CONTROL_LINE_STATE BIT(6)
#define CLEAR_HALT_CONDITIONS BIT(7)
+#define SEND_ZERO_PACKET BIT(8)
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 005/117] HID: usbhid: fix recursive deadlock |
| Message-ID | <r2fmP-1Of-39@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ioan-Adrian Ratiu <adi@adirat.com>
commit e470127e9606b1fa151c4184243e61296d1e0c0f upstream.
The critical section protected by usbhid->lock in hid_ctrl() is too
big and because of this it causes a recursive deadlock. "Too big" means
the case statement and the call to hid_input_report() do not need to be
protected by the spinlock (no URB operations are done inside them).
The deadlock happens because in certain rare cases drivers try to grab
the lock while handling the ctrl irq which grabs the lock before them
as described above. For example newer wacom tablets like 056a:033c try
to reschedule proximity reads from wacom_intuos_schedule_prox_event()
calling hid_hw_request() -> usbhid_request() -> usbhid_submit_report()
which tries to grab the usbhid lock already held by hid_ctrl().
There are two ways to get out of this deadlock:
1. Make the drivers work "around" the ctrl critical region, in the
wacom case for ex. by delaying the scheduling of the proximity read
request itself to a workqueue.
2. Shrink the critical region so the usbhid lock protects only the
instructions which modify usbhid state, calling hid_input_report()
with the spinlock unlocked, allowing the device driver to grab the
lock first, finish and then grab the lock afterwards in hid_ctrl().
This patch implements the 2nd solution.
Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/usbhid/hid-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -477,8 +477,6 @@ static void hid_ctrl(struct urb *urb)
struct usbhid_device *usbhid = hid->driver_data;
int unplug = 0, status = urb->status;
- spin_lock(&usbhid->lock);
-
switch (status) {
case 0: /* success */
if (usbhid->ctrl[usbhid->ctrltail].dir == USB_DIR_IN)
@@ -498,6 +496,8 @@ static void hid_ctrl(struct urb *urb)
hid_warn(urb->dev, "ctrl urb status %d received\n", status);
}
+ spin_lock(&usbhid->lock);
+
if (unplug) {
usbhid->ctrltail = usbhid->ctrlhead;
} else {
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 065/117] USB: cp210x: add ID for IAI USB to RS485 adaptor |
| Message-ID | <r2fmP-1Of-47@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Dedecker <peter.dedecker@hotmail.com>
commit f487c54ddd544e1c9172cd510954f697b77b76e3 upstream.
Added the USB serial console device ID for IAI Corp. RCB-CV-USB
USB to RS485 adaptor.
Signed-off-by: Peter Dedecker <peter.dedecker@hotmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/cp210x.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -98,6 +98,7 @@ static const struct usb_device_id id_tab
{ USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */
{ USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */
{ USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
+ { USB_DEVICE(0x10C4, 0x81D7) }, /* IAI Corp. RCB-CV-USB USB to RS485 Adaptor */
{ USB_DEVICE(0x10C4, 0x81E2) }, /* Lipowsky Industrie Elektronik GmbH, Baby-LIN */
{ USB_DEVICE(0x10C4, 0x81E7) }, /* Aerocomm Radio */
{ USB_DEVICE(0x10C4, 0x81E8) }, /* Zephyr Bioharness */
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 040/117] ALSA: hda/realtek - Support headset mode for ALC225 |
| Message-ID | <r2fmP-1Of-41@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kailang Yang <kailang@realtek.com>
commit 4cc9b9d627af2c443cf98e651e3738d84f991cec upstream.
Support headset mode for ALC225 platforms.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_realtek.c | 57 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3662,6 +3662,16 @@ static void alc_headset_mode_unplugged(s
WRITE_COEF(0xb7, 0x802b),
{}
};
+ static struct coef_fw coef0225[] = {
+ UPDATE_COEF(0x4a, 1<<8, 0),
+ UPDATE_COEFEX(0x57, 0x05, 1<<14, 0),
+ UPDATE_COEF(0x63, 3<<14, 3<<14),
+ UPDATE_COEF(0x4a, 3<<4, 2<<4),
+ UPDATE_COEF(0x4a, 3<<10, 3<<10),
+ UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
+ UPDATE_COEF(0x4a, 3<<10, 0),
+ {}
+ };
switch (codec->core.vendor_id) {
case 0x10ec0255:
@@ -3686,6 +3696,9 @@ static void alc_headset_mode_unplugged(s
case 0x10ec0668:
alc_process_coef_fw(codec, coef0668);
break;
+ case 0x10ec0225:
+ alc_process_coef_fw(codec, coef0225);
+ break;
}
codec_dbg(codec, "Headset jack set to unplugged mode.\n");
}
@@ -3731,6 +3744,13 @@ static void alc_headset_mode_mic_in(stru
UPDATE_COEF(0xc3, 0, 1<<12),
{}
};
+ static struct coef_fw coef0225[] = {
+ UPDATE_COEFEX(0x57, 0x05, 1<<14, 1<<14),
+ UPDATE_COEF(0x4a, 3<<4, 2<<4),
+ UPDATE_COEF(0x63, 3<<14, 0),
+ {}
+ };
+
switch (codec->core.vendor_id) {
case 0x10ec0255:
@@ -3776,6 +3796,12 @@ static void alc_headset_mode_mic_in(stru
alc_process_coef_fw(codec, coef0688);
snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
break;
+ case 0x10ec0225:
+ alc_update_coef_idx(codec, 0x45, 0x3f<<10, 0x31<<10);
+ snd_hda_set_pin_ctl_cache(codec, hp_pin, 0);
+ alc_process_coef_fw(codec, coef0225);
+ snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
+ break;
}
codec_dbg(codec, "Headset jack set to mic-in mode.\n");
}
@@ -3888,6 +3914,13 @@ static void alc_headset_mode_ctia(struct
WRITE_COEF(0xc3, 0x0000),
{}
};
+ static struct coef_fw coef0225[] = {
+ UPDATE_COEF(0x45, 0x3f<<10, 0x35<<10),
+ UPDATE_COEF(0x49, 1<<8, 1<<8),
+ UPDATE_COEF(0x4a, 7<<6, 7<<6),
+ UPDATE_COEF(0x4a, 3<<4, 3<<4),
+ {}
+ };
switch (codec->core.vendor_id) {
case 0x10ec0255:
@@ -3916,6 +3949,9 @@ static void alc_headset_mode_ctia(struct
case 0x10ec0668:
alc_process_coef_fw(codec, coef0688);
break;
+ case 0x10ec0225:
+ alc_process_coef_fw(codec, coef0225);
+ break;
}
codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n");
}
@@ -3959,6 +3995,13 @@ static void alc_headset_mode_omtp(struct
WRITE_COEF(0xc3, 0x0000),
{}
};
+ static struct coef_fw coef0225[] = {
+ UPDATE_COEF(0x45, 0x3f<<10, 0x39<<10),
+ UPDATE_COEF(0x49, 1<<8, 1<<8),
+ UPDATE_COEF(0x4a, 7<<6, 7<<6),
+ UPDATE_COEF(0x4a, 3<<4, 3<<4),
+ {}
+ };
switch (codec->core.vendor_id) {
case 0x10ec0255:
@@ -3987,6 +4030,9 @@ static void alc_headset_mode_omtp(struct
case 0x10ec0668:
alc_process_coef_fw(codec, coef0688);
break;
+ case 0x10ec0225:
+ alc_process_coef_fw(codec, coef0225);
+ break;
}
codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n");
}
@@ -4018,6 +4064,11 @@ static void alc_determine_headset_type(s
WRITE_COEF(0xc3, 0x0c00),
{}
};
+ static struct coef_fw coef0225[] = {
+ UPDATE_COEF(0x45, 0x3f<<10, 0x34<<10),
+ UPDATE_COEF(0x49, 1<<8, 1<<8),
+ {}
+ };
switch (codec->core.vendor_id) {
case 0x10ec0255:
@@ -4062,6 +4113,12 @@ static void alc_determine_headset_type(s
val = alc_read_coef_idx(codec, 0xbe);
is_ctia = (val & 0x1c02) == 0x1c02;
break;
+ case 0x10ec0225:
+ alc_process_coef_fw(codec, coef0225);
+ msleep(800);
+ val = alc_read_coef_idx(codec, 0x46);
+ is_ctia = (val & 0x00f0) == 0x00f0;
+ break;
}
codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n",
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 070/117] usb: phy: msm: fix error handling in probe. |
| Message-ID | <r2fmP-1Of-45@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
commit a38a08dfaaab978dced63aa9cad45f0f62e23a66 upstream.
This driver registers for extcon events as part of its probe, but
never unregisters them in case of error in the probe path.
There were multiple issues noticed due to this missing error handling.
One of them is random crashes if the regulators are not ready yet by the
time probe is invoked.
Ivan's previous attempt [1] to fix this issue, did not really address
all the failure cases like regualtor/get_irq failures.
[1] https://lkml.org/lkml/2015/9/7/62
Without this patch the kernel would carsh with log:
...
Unable to handle kernel paging request at virtual address 17d78410
pgd = ffffffc001a5c000
[17d78410] *pgd=00000000b6806003, *pud=00000000b6806003, *pmd=0000000000000000
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.4.0+ #48
Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
Workqueue: deferwq deferred_probe_work_func
task: ffffffc03686e900 ti: ffffffc0368b0000 task.ti: ffffffc0368b0000
PC is at raw_notifier_chain_register+0x1c/0x44
LR is at extcon_register_notifier+0x88/0xc8
pc : [<ffffffc0000da43c>] lr : [<ffffffc000606298>] pstate: 80000085
sp : ffffffc0368b3a70
x29: ffffffc0368b3a70 x28: ffffffc03680c310
x27: ffffffc035518000 x26: ffffffc035518000
x25: ffffffc03bfa20e0 x24: ffffffc035580a18
x23: 0000000000000000 x22: ffffffc035518458
x21: ffffffc0355e9a60 x20: ffffffc035518000
x19: 0000000000000000 x18: 0000000000000028
x17: 0000000000000003 x16: ffffffc0018153c8
x15: 0000000000000001 x14: ffffffc03686f0f8
x13: ffffffc03686f0f8 x12: 0000000000000003
x11: 0000000000000001 x10: 0000000000000001
x9 : ffffffc03686f0f8 x8 : 0000e3872014c1a1
x7 : 0000000000000028 x6 : 0000000000000000
x5 : 0000000000000001 x4 : 0000000000000000
x3 : 00000000354fb170 x2 : 0000000017d78400
x1 : ffffffc0355e9a60 x0 : ffffffc0354fb268
Fixes: 591fc116f330 ("usb: phy: msm: Use extcon framework for VBUS and ID detection")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/phy/phy-msm-usb.c | 37 ++++++++++++++++++++++++-------------
1 file changed, 24 insertions(+), 13 deletions(-)
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -1599,6 +1599,8 @@ static int msm_otg_read_dt(struct platfo
&motg->id.nb);
if (ret < 0) {
dev_err(&pdev->dev, "register ID notifier failed\n");
+ extcon_unregister_notifier(motg->vbus.extcon,
+ EXTCON_USB, &motg->vbus.nb);
return ret;
}
@@ -1660,15 +1662,6 @@ static int msm_otg_probe(struct platform
if (!motg)
return -ENOMEM;
- pdata = dev_get_platdata(&pdev->dev);
- if (!pdata) {
- if (!np)
- return -ENXIO;
- ret = msm_otg_read_dt(pdev, motg);
- if (ret)
- return ret;
- }
-
motg->phy.otg = devm_kzalloc(&pdev->dev, sizeof(struct usb_otg),
GFP_KERNEL);
if (!motg->phy.otg)
@@ -1710,6 +1703,15 @@ static int msm_otg_probe(struct platform
if (!motg->regs)
return -ENOMEM;
+ pdata = dev_get_platdata(&pdev->dev);
+ if (!pdata) {
+ if (!np)
+ return -ENXIO;
+ ret = msm_otg_read_dt(pdev, motg);
+ if (ret)
+ return ret;
+ }
+
/*
* NOTE: The PHYs can be multiplexed between the chipidea controller
* and the dwc3 controller, using a single bit. It is important that
@@ -1717,8 +1719,10 @@ static int msm_otg_probe(struct platform
*/
if (motg->phy_number) {
phy_select = devm_ioremap_nocache(&pdev->dev, USB2_PHY_SEL, 4);
- if (!phy_select)
- return -ENOMEM;
+ if (!phy_select) {
+ ret = -ENOMEM;
+ goto unregister_extcon;
+ }
/* Enable second PHY with the OTG port */
writel(0x1, phy_select);
}
@@ -1728,7 +1732,8 @@ static int msm_otg_probe(struct platform
motg->irq = platform_get_irq(pdev, 0);
if (motg->irq < 0) {
dev_err(&pdev->dev, "platform_get_irq failed\n");
- return motg->irq;
+ ret = motg->irq;
+ goto unregister_extcon;
}
regs[0].supply = "vddcx";
@@ -1737,7 +1742,7 @@ static int msm_otg_probe(struct platform
ret = devm_regulator_bulk_get(motg->phy.dev, ARRAY_SIZE(regs), regs);
if (ret)
- return ret;
+ goto unregister_extcon;
motg->vddcx = regs[0].consumer;
motg->v3p3 = regs[1].consumer;
@@ -1834,6 +1839,12 @@ disable_clks:
clk_disable_unprepare(motg->clk);
if (!IS_ERR(motg->core_clk))
clk_disable_unprepare(motg->core_clk);
+unregister_extcon:
+ extcon_unregister_notifier(motg->id.extcon,
+ EXTCON_USB_HOST, &motg->id.nb);
+ extcon_unregister_notifier(motg->vbus.extcon,
+ EXTCON_USB, &motg->vbus.nb);
+
return ret;
}
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 041/117] ALSA: hda/realtek - Support Dell headset mode for ALC225 |
| Message-ID | <r2fmQ-1Of-49@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kailang Yang <kailang@realtek.com>
commit cfc5a845e62853edd36e564c23c64588f4adcae6 upstream.
Dell create new platform with ALC298 codec.
This patch will enable headset mode for ALC225/ALC3253 platform.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_realtek.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5621,6 +5621,9 @@ static const struct hda_model_fixup alc2
{.id = ALC292_FIXUP_TPT440, .name = "tpt440"},
{}
};
+#define ALC225_STANDARD_PINS \
+ {0x12, 0xb7a60130}, \
+ {0x21, 0x04211020}
#define ALC256_STANDARD_PINS \
{0x12, 0x90a60140}, \
@@ -5642,6 +5645,12 @@ static const struct hda_model_fixup alc2
{0x21, 0x03211020}
static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = {
+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+ ALC225_STANDARD_PINS,
+ {0x14, 0x901701a0}),
+ SND_HDA_PIN_QUIRK(0x10ec0225, 0x1028, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE,
+ ALC225_STANDARD_PINS,
+ {0x14, 0x901701b0}),
SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL2_MIC_NO_PRESENCE,
{0x14, 0x90170110},
{0x21, 0x02211020}),
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 007/117] block: fix bio splitting on max sectors |
| Message-ID | <r2fmQ-1Of-51@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ming Lei <tom.leiming@gmail.com>
commit d0e5fbb01a67e400e82fefe4896ea40c6447ab98 upstream.
After commit e36f62042880(block: split bios to maxpossible length),
bio can be splitted in the middle of a vector entry, then it
is easy to split out one bio which size isn't aligned with block
size, especially when the block size is bigger than 512.
This patch fixes the issue by making the max io size aligned
to logical block size.
Fixes: e36f62042880(block: split bios to maxpossible length)
Reported-by: Stefan Haberland <sth@linux.vnet.ibm.com>
Cc: Keith Busch <keith.busch@intel.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
block/blk-merge.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -68,6 +68,18 @@ static struct bio *blk_bio_write_same_sp
return bio_split(bio, q->limits.max_write_same_sectors, GFP_NOIO, bs);
}
+static inline unsigned get_max_io_size(struct request_queue *q,
+ struct bio *bio)
+{
+ unsigned sectors = blk_max_size_offset(q, bio->bi_iter.bi_sector);
+ unsigned mask = queue_logical_block_size(q) - 1;
+
+ /* aligned to logical block size */
+ sectors &= ~(mask >> 9);
+
+ return sectors;
+}
+
static struct bio *blk_bio_segment_split(struct request_queue *q,
struct bio *bio,
struct bio_set *bs,
@@ -79,6 +91,7 @@ static struct bio *blk_bio_segment_split
unsigned front_seg_size = bio->bi_seg_front_size;
bool do_split = true;
struct bio *new = NULL;
+ const unsigned max_sectors = get_max_io_size(q, bio);
bio_for_each_segment(bv, bio, iter) {
/*
@@ -88,20 +101,19 @@ static struct bio *blk_bio_segment_split
if (bvprvp && bvec_gap_to_prev(q, bvprvp, bv.bv_offset))
goto split;
- if (sectors + (bv.bv_len >> 9) >
- blk_max_size_offset(q, bio->bi_iter.bi_sector)) {
+ if (sectors + (bv.bv_len >> 9) > max_sectors) {
/*
* Consider this a new segment if we're splitting in
* the middle of this vector.
*/
if (nsegs < queue_max_segments(q) &&
- sectors < blk_max_size_offset(q,
- bio->bi_iter.bi_sector)) {
+ sectors < max_sectors) {
nsegs++;
- sectors = blk_max_size_offset(q,
- bio->bi_iter.bi_sector);
+ sectors = max_sectors;
}
- goto split;
+ if (sectors)
+ goto split;
+ /* Make this single bvec as the 1st segment */
}
if (bvprvp && blk_queue_cluster(q)) {
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 056/117] ALSA: hda - Fix speaker output from VAIO AiO machines |
| Message-ID | <r2fmQ-1Of-53@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Takashi Iwai <tiwai@suse.de> commit c44d9b1181cf34e0860c72cc8a00e0c47417aac0 upstream. Some Sony VAIO AiO models (VGC-JS4EF and VGC-JS25G, both with PCI SSID 104d:9044) need the same quirk to make the speaker working properly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112031 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2223,6 +2223,7 @@ static const struct snd_pci_quirk alc882 SND_PCI_QUIRK(0x104d, 0x9047, "Sony Vaio TT", ALC889_FIXUP_VAIO_TT), SND_PCI_QUIRK(0x104d, 0x905a, "Sony Vaio Z", ALC882_FIXUP_NO_PRIMARY_HP), SND_PCI_QUIRK(0x104d, 0x9043, "Sony Vaio VGC-LN51JGB", ALC882_FIXUP_NO_PRIMARY_HP), + SND_PCI_QUIRK(0x104d, 0x9044, "Sony VAIO AiO", ALC882_FIXUP_NO_PRIMARY_HP), /* All Apple entries are in codec SSIDs */ SND_PCI_QUIRK(0x106b, 0x00a0, "MacBookPro 3,1", ALC889_FIXUP_MBP_VREF),
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 009/117] ocfs2/dlm: ignore cleaning the migration mle that is inuse |
| Message-ID | <r2fmR-1Of-61@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: xuejiufei <xuejiufei@huawei.com>
commit bef5502de074b6f6fa647b94b73155d675694420 upstream.
We have found that migration source will trigger a BUG that the refcount
of mle is already zero before put when the target is down during
migration. The situation is as follows:
dlm_migrate_lockres
dlm_add_migration_mle
dlm_mark_lockres_migrating
dlm_get_mle_inuse
<<<<<< Now the refcount of the mle is 2.
dlm_send_one_lockres and wait for the target to become the
new master.
<<<<<< o2hb detect the target down and clean the migration
mle. Now the refcount is 1.
dlm_migrate_lockres woken, and put the mle twice when found the target
goes down which trigger the BUG with the following message:
"ERROR: bad mle: ".
Signed-off-by: Jiufei Xue <xuejiufei@huawei.com>
Reviewed-by: Joseph Qi <joseph.qi@huawei.com>
Cc: Mark Fasheh <mfasheh@suse.de>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ocfs2/dlm/dlmmaster.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -2519,6 +2519,11 @@ static int dlm_migrate_lockres(struct dl
spin_lock(&dlm->master_lock);
ret = dlm_add_migration_mle(dlm, res, mle, &oldmle, name,
namelen, target, dlm->node_num);
+ /* get an extra reference on the mle.
+ * otherwise the assert_master from the new
+ * master will destroy this.
+ */
+ dlm_get_mle_inuse(mle);
spin_unlock(&dlm->master_lock);
spin_unlock(&dlm->spinlock);
@@ -2554,6 +2559,7 @@ fail:
if (mle_added) {
dlm_mle_detach_hb_events(dlm, mle);
dlm_put_mle(mle);
+ dlm_put_mle_inuse(mle);
} else if (mle) {
kmem_cache_free(dlm_mle_cache, mle);
mle = NULL;
@@ -2571,17 +2577,6 @@ fail:
* ensure that all assert_master work is flushed. */
flush_workqueue(dlm->dlm_worker);
- /* get an extra reference on the mle.
- * otherwise the assert_master from the new
- * master will destroy this.
- * also, make sure that all callers of dlm_get_mle
- * take both dlm->spinlock and dlm->master_lock */
- spin_lock(&dlm->spinlock);
- spin_lock(&dlm->master_lock);
- dlm_get_mle_inuse(mle);
- spin_unlock(&dlm->master_lock);
- spin_unlock(&dlm->spinlock);
-
/* notify new node and send all lock state */
/* call send_one_lockres with migration flag.
* this serves as notice to the target node that a
@@ -3312,6 +3307,15 @@ top:
mle->new_master != dead_node)
continue;
+ if (mle->new_master == dead_node && mle->inuse) {
+ mlog(ML_NOTICE, "%s: target %u died during "
+ "migration from %u, the MLE is "
+ "still keep used, ignore it!\n",
+ dlm->name, dead_node,
+ mle->master);
+ continue;
+ }
+
/* If we have reached this point, this mle needs to be
* removed from the list and freed. */
dlm_clean_migration_mle(dlm, mle);
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 072/117] usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms |
| Message-ID | <r2fmR-1Of-63@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lu Baolu <baolu.lu@linux.intel.com>
commit ccc04afb72cddbdf7c0e1c17e92886405a71b754 upstream.
Intel Broxton M was verifed to require XHCI_PME_STUCK_QUIRK quirk as well.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/xhci-pci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -47,6 +47,7 @@
#define PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI 0x22b5
#define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI 0xa12f
#define PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI 0x9d2f
+#define PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI 0x0aa8
static const char hcd_name[] = "xhci_hcd";
@@ -154,7 +155,8 @@ static void xhci_pci_quirks(struct devic
if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
(pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_XHCI ||
pdev->device == PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_XHCI ||
- pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI)) {
+ pdev->device == PCI_DEVICE_ID_INTEL_CHERRYVIEW_XHCI ||
+ pdev->device == PCI_DEVICE_ID_INTEL_BROXTON_M_XHCI)) {
xhci->quirks |= XHCI_PME_STUCK_QUIRK;
}
if (pdev->vendor == PCI_VENDOR_ID_ETRON &&
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 057/117] ALSA: hda - Fix bad dereference of jack object |
| Message-ID | <r2fmR-1Of-65@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 2ebab40eb74a0225d5dfba72bfae317dd948fa2d upstream.
The hda_jack_tbl entries are managed by snd_array for allowing
multiple jacks. It's good per se, but the problem is that struct
hda_jack_callback keeps the hda_jack_tbl pointer. Since snd_array
doesn't preserve each pointer at resizing the array, we can't keep the
original pointer but have to deduce the pointer at each time via
snd_array_entry() instead. Actually, this resulted in the deference
to the wrong pointer on codecs that have many pins such as CS4208.
This patch replaces the pointer to the NID value as the search key.
As an unexpected good side effect, this even simplifies the code, as
only NID is needed in most cases.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/hda_generic.c | 4 ++--
sound/pci/hda/hda_jack.c | 2 +-
sound/pci/hda/hda_jack.h | 2 +-
sound/pci/hda/patch_ca0132.c | 5 ++++-
sound/pci/hda/patch_hdmi.c | 2 +-
sound/pci/hda/patch_realtek.c | 2 +-
sound/pci/hda/patch_sigmatel.c | 6 +++---
7 files changed, 13 insertions(+), 10 deletions(-)
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -4045,9 +4045,9 @@ static void pin_power_callback(struct hd
struct hda_jack_callback *jack,
bool on)
{
- if (jack && jack->tbl->nid)
+ if (jack && jack->nid)
sync_power_state_change(codec,
- set_pin_power_jack(codec, jack->tbl->nid, on));
+ set_pin_power_jack(codec, jack->nid, on));
}
/* callback only doing power up -- called at first */
--- a/sound/pci/hda/hda_jack.c
+++ b/sound/pci/hda/hda_jack.c
@@ -259,7 +259,7 @@ snd_hda_jack_detect_enable_callback(stru
if (!callback)
return ERR_PTR(-ENOMEM);
callback->func = func;
- callback->tbl = jack;
+ callback->nid = jack->nid;
callback->next = jack->callback;
jack->callback = callback;
}
--- a/sound/pci/hda/hda_jack.h
+++ b/sound/pci/hda/hda_jack.h
@@ -21,7 +21,7 @@ struct hda_jack_callback;
typedef void (*hda_jack_callback_fn) (struct hda_codec *, struct hda_jack_callback *);
struct hda_jack_callback {
- struct hda_jack_tbl *tbl;
+ hda_nid_t nid;
hda_jack_callback_fn func;
unsigned int private_data; /* arbitrary data */
struct hda_jack_callback *next;
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -4427,13 +4427,16 @@ static void ca0132_process_dsp_response(
static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
{
struct ca0132_spec *spec = codec->spec;
+ struct hda_jack_tbl *tbl;
/* Delay enabling the HP amp, to let the mic-detection
* state machine run.
*/
cancel_delayed_work_sync(&spec->unsol_hp_work);
schedule_delayed_work(&spec->unsol_hp_work, msecs_to_jiffies(500));
- cb->tbl->block_report = 1;
+ tbl = snd_hda_jack_tbl_get(codec, cb->nid);
+ if (tbl)
+ tbl->block_report = 1;
}
static void amic_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1184,7 +1184,7 @@ static void check_presence_and_report(st
static void jack_callback(struct hda_codec *codec,
struct hda_jack_callback *jack)
{
- check_presence_and_report(codec, jack->tbl->nid);
+ check_presence_and_report(codec, jack->nid);
}
static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -282,7 +282,7 @@ static void alc_update_knob_master(struc
uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
if (!uctl)
return;
- val = snd_hda_codec_read(codec, jack->tbl->nid, 0,
+ val = snd_hda_codec_read(codec, jack->nid, 0,
AC_VERB_GET_VOLUME_KNOB_CONTROL, 0);
val &= HDA_AMP_VOLMASK;
uctl->value.integer.value[0] = val;
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -493,9 +493,9 @@ static void jack_update_power(struct hda
if (!spec->num_pwrs)
return;
- if (jack && jack->tbl->nid) {
- stac_toggle_power_map(codec, jack->tbl->nid,
- snd_hda_jack_detect(codec, jack->tbl->nid),
+ if (jack && jack->nid) {
+ stac_toggle_power_map(codec, jack->nid,
+ snd_hda_jack_detect(codec, jack->nid),
true);
return;
}
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:40 +0100 |
| Subject | [PATCH 4.4 044/117] ALSA: seq: Fix yet another races among ALSA timer accesses |
| Message-ID | <r2fmR-1Of-67@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 2cdc7b636d55cbcf42e1e6c8accd85e62d3e9ae8 upstream.
ALSA sequencer may open/close and control ALSA timer instance
dynamically either via sequencer events or direct ioctls. These are
done mostly asynchronously, and it may call still some timer action
like snd_timer_start() while another is calling snd_timer_close().
Since the instance gets removed by snd_timer_close(), it may lead to
a use-after-free.
This patch tries to address such a race by protecting each
snd_timer_*() call via the existing spinlock and also by avoiding the
access to timer during close call.
BugLink: http://lkml.kernel.org/r/CACT4Y+Z6RzW5MBr-HUdV-8zwg71WQfKTdPpYGvOeS7v4cyurNQ@mail.gmail.com
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/core/seq/seq_timer.c | 87 ++++++++++++++++++++++++++++++++++-----------
1 file changed, 67 insertions(+), 20 deletions(-)
--- a/sound/core/seq/seq_timer.c
+++ b/sound/core/seq/seq_timer.c
@@ -90,6 +90,9 @@ void snd_seq_timer_delete(struct snd_seq
void snd_seq_timer_defaults(struct snd_seq_timer * tmr)
{
+ unsigned long flags;
+
+ spin_lock_irqsave(&tmr->lock, flags);
/* setup defaults */
tmr->ppq = 96; /* 96 PPQ */
tmr->tempo = 500000; /* 120 BPM */
@@ -105,21 +108,25 @@ void snd_seq_timer_defaults(struct snd_s
tmr->preferred_resolution = seq_default_timer_resolution;
tmr->skew = tmr->skew_base = SKEW_BASE;
+ spin_unlock_irqrestore(&tmr->lock, flags);
}
-void snd_seq_timer_reset(struct snd_seq_timer * tmr)
+static void seq_timer_reset(struct snd_seq_timer *tmr)
{
- unsigned long flags;
-
- spin_lock_irqsave(&tmr->lock, flags);
-
/* reset time & songposition */
tmr->cur_time.tv_sec = 0;
tmr->cur_time.tv_nsec = 0;
tmr->tick.cur_tick = 0;
tmr->tick.fraction = 0;
+}
+
+void snd_seq_timer_reset(struct snd_seq_timer *tmr)
+{
+ unsigned long flags;
+ spin_lock_irqsave(&tmr->lock, flags);
+ seq_timer_reset(tmr);
spin_unlock_irqrestore(&tmr->lock, flags);
}
@@ -138,8 +145,11 @@ static void snd_seq_timer_interrupt(stru
tmr = q->timer;
if (tmr == NULL)
return;
- if (!tmr->running)
+ spin_lock_irqsave(&tmr->lock, flags);
+ if (!tmr->running) {
+ spin_unlock_irqrestore(&tmr->lock, flags);
return;
+ }
resolution *= ticks;
if (tmr->skew != tmr->skew_base) {
@@ -148,8 +158,6 @@ static void snd_seq_timer_interrupt(stru
(((resolution & 0xffff) * tmr->skew) >> 16);
}
- spin_lock_irqsave(&tmr->lock, flags);
-
/* update timer */
snd_seq_inc_time_nsec(&tmr->cur_time, resolution);
@@ -296,26 +304,30 @@ int snd_seq_timer_open(struct snd_seq_qu
t->callback = snd_seq_timer_interrupt;
t->callback_data = q;
t->flags |= SNDRV_TIMER_IFLG_AUTO;
+ spin_lock_irq(&tmr->lock);
tmr->timeri = t;
+ spin_unlock_irq(&tmr->lock);
return 0;
}
int snd_seq_timer_close(struct snd_seq_queue *q)
{
struct snd_seq_timer *tmr;
+ struct snd_timer_instance *t;
tmr = q->timer;
if (snd_BUG_ON(!tmr))
return -EINVAL;
- if (tmr->timeri) {
- snd_timer_stop(tmr->timeri);
- snd_timer_close(tmr->timeri);
- tmr->timeri = NULL;
- }
+ spin_lock_irq(&tmr->lock);
+ t = tmr->timeri;
+ tmr->timeri = NULL;
+ spin_unlock_irq(&tmr->lock);
+ if (t)
+ snd_timer_close(t);
return 0;
}
-int snd_seq_timer_stop(struct snd_seq_timer * tmr)
+static int seq_timer_stop(struct snd_seq_timer *tmr)
{
if (! tmr->timeri)
return -EINVAL;
@@ -326,6 +338,17 @@ int snd_seq_timer_stop(struct snd_seq_ti
return 0;
}
+int snd_seq_timer_stop(struct snd_seq_timer *tmr)
+{
+ unsigned long flags;
+ int err;
+
+ spin_lock_irqsave(&tmr->lock, flags);
+ err = seq_timer_stop(tmr);
+ spin_unlock_irqrestore(&tmr->lock, flags);
+ return err;
+}
+
static int initialize_timer(struct snd_seq_timer *tmr)
{
struct snd_timer *t;
@@ -358,13 +381,13 @@ static int initialize_timer(struct snd_s
return 0;
}
-int snd_seq_timer_start(struct snd_seq_timer * tmr)
+static int seq_timer_start(struct snd_seq_timer *tmr)
{
if (! tmr->timeri)
return -EINVAL;
if (tmr->running)
- snd_seq_timer_stop(tmr);
- snd_seq_timer_reset(tmr);
+ seq_timer_stop(tmr);
+ seq_timer_reset(tmr);
if (initialize_timer(tmr) < 0)
return -EINVAL;
snd_timer_start(tmr->timeri, tmr->ticks);
@@ -373,14 +396,25 @@ int snd_seq_timer_start(struct snd_seq_t
return 0;
}
-int snd_seq_timer_continue(struct snd_seq_timer * tmr)
+int snd_seq_timer_start(struct snd_seq_timer *tmr)
+{
+ unsigned long flags;
+ int err;
+
+ spin_lock_irqsave(&tmr->lock, flags);
+ err = seq_timer_start(tmr);
+ spin_unlock_irqrestore(&tmr->lock, flags);
+ return err;
+}
+
+static int seq_timer_continue(struct snd_seq_timer *tmr)
{
if (! tmr->timeri)
return -EINVAL;
if (tmr->running)
return -EBUSY;
if (! tmr->initialized) {
- snd_seq_timer_reset(tmr);
+ seq_timer_reset(tmr);
if (initialize_timer(tmr) < 0)
return -EINVAL;
}
@@ -390,11 +424,24 @@ int snd_seq_timer_continue(struct snd_se
return 0;
}
+int snd_seq_timer_continue(struct snd_seq_timer *tmr)
+{
+ unsigned long flags;
+ int err;
+
+ spin_lock_irqsave(&tmr->lock, flags);
+ err = seq_timer_continue(tmr);
+ spin_unlock_irqrestore(&tmr->lock, flags);
+ return err;
+}
+
/* return current 'real' time. use timeofday() to get better granularity. */
snd_seq_real_time_t snd_seq_timer_get_cur_time(struct snd_seq_timer *tmr)
{
snd_seq_real_time_t cur_time;
+ unsigned long flags;
+ spin_lock_irqsave(&tmr->lock, flags);
cur_time = tmr->cur_time;
if (tmr->running) {
struct timeval tm;
@@ -410,7 +457,7 @@ snd_seq_real_time_t snd_seq_timer_get_cu
}
snd_seq_sanity_real_time(&cur_time);
}
-
+ spin_unlock_irqrestore(&tmr->lock, flags);
return cur_time;
}
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:50 +0100 |
| Subject | [PATCH 4.4 019/117] parisc: Protect huge page pte changes with spinlocks |
| Message-ID | <r2fwu-1Sa-1@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <deller@gmx.de>
commit b0e551313ebde17764f3a5ed273df524d1e7e690 upstream.
PA-RISC doesn't have atomic instructions to modify page table entries, so it
takes spinlock in the TLB handler and modifies the page table entry
non-atomically. If you modify the page table entry without the spinlock, you
may race with TLB handler on another CPU and your modification may be lost.
Protect against that with usage of purge_tlb_start() and purge_tlb_end() which
handles the TLB spinlock.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/parisc/include/asm/hugetlb.h | 20 ++----------
arch/parisc/mm/hugetlbpage.c | 60 ++++++++++++++++++++++++++++++--------
2 files changed, 52 insertions(+), 28 deletions(-)
--- a/arch/parisc/include/asm/hugetlb.h
+++ b/arch/parisc/include/asm/hugetlb.h
@@ -54,24 +54,12 @@ static inline pte_t huge_pte_wrprotect(p
return pte_wrprotect(pte);
}
-static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
- unsigned long addr, pte_t *ptep)
-{
- pte_t old_pte = *ptep;
- set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte));
-}
+void huge_ptep_set_wrprotect(struct mm_struct *mm,
+ unsigned long addr, pte_t *ptep);
-static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
+int huge_ptep_set_access_flags(struct vm_area_struct *vma,
unsigned long addr, pte_t *ptep,
- pte_t pte, int dirty)
-{
- int changed = !pte_same(*ptep, pte);
- if (changed) {
- set_huge_pte_at(vma->vm_mm, addr, ptep, pte);
- flush_tlb_page(vma, addr);
- }
- return changed;
-}
+ pte_t pte, int dirty);
static inline pte_t huge_ptep_get(pte_t *ptep)
{
--- a/arch/parisc/mm/hugetlbpage.c
+++ b/arch/parisc/mm/hugetlbpage.c
@@ -105,15 +105,13 @@ static inline void purge_tlb_entries_hug
addr |= _HUGE_PAGE_SIZE_ENCODING_DEFAULT;
for (i = 0; i < (1 << (HPAGE_SHIFT-REAL_HPAGE_SHIFT)); i++) {
- mtsp(mm->context, 1);
- pdtlb(addr);
- if (unlikely(split_tlb))
- pitlb(addr);
+ purge_tlb_entries(mm, addr);
addr += (1UL << REAL_HPAGE_SHIFT);
}
}
-void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
+/* __set_huge_pte_at() must be called holding the pa_tlb_lock. */
+static void __set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t entry)
{
unsigned long addr_start;
@@ -123,14 +121,9 @@ void set_huge_pte_at(struct mm_struct *m
addr_start = addr;
for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
- /* Directly write pte entry. We could call set_pte_at(mm, addr, ptep, entry)
- * instead, but then we get double locking on pa_tlb_lock. */
- *ptep = entry;
+ set_pte(ptep, entry);
ptep++;
- /* Drop the PAGE_SIZE/non-huge tlb entry */
- purge_tlb_entries(mm, addr);
-
addr += PAGE_SIZE;
pte_val(entry) += PAGE_SIZE;
}
@@ -138,18 +131,61 @@ void set_huge_pte_at(struct mm_struct *m
purge_tlb_entries_huge(mm, addr_start);
}
+void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
+ pte_t *ptep, pte_t entry)
+{
+ unsigned long flags;
+
+ purge_tlb_start(flags);
+ __set_huge_pte_at(mm, addr, ptep, entry);
+ purge_tlb_end(flags);
+}
+
pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
pte_t *ptep)
{
+ unsigned long flags;
pte_t entry;
+ purge_tlb_start(flags);
entry = *ptep;
- set_huge_pte_at(mm, addr, ptep, __pte(0));
+ __set_huge_pte_at(mm, addr, ptep, __pte(0));
+ purge_tlb_end(flags);
return entry;
}
+
+void huge_ptep_set_wrprotect(struct mm_struct *mm,
+ unsigned long addr, pte_t *ptep)
+{
+ unsigned long flags;
+ pte_t old_pte;
+
+ purge_tlb_start(flags);
+ old_pte = *ptep;
+ __set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte));
+ purge_tlb_end(flags);
+}
+
+int huge_ptep_set_access_flags(struct vm_area_struct *vma,
+ unsigned long addr, pte_t *ptep,
+ pte_t pte, int dirty)
+{
+ unsigned long flags;
+ int changed;
+
+ purge_tlb_start(flags);
+ changed = !pte_same(*ptep, pte);
+ if (changed) {
+ __set_huge_pte_at(vma->vm_mm, addr, ptep, pte);
+ }
+ purge_tlb_end(flags);
+ return changed;
+}
+
+
int pmd_huge(pmd_t pmd)
{
return 0;
[toc] | [prev] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2016-02-15 01:50 +0100 |
| Subject | [PATCH 4.4 016/117] tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs() |
| Message-ID | <r2fwu-1Sa-3@gated-at.bofh.it> |
| In reply to | #1334027 |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Steven Rostedt (Red Hat) <rostedt@goodmis.org>
commit 7717c6be699975f6733d278b13b7c4295d73caf6 upstream.
While cleaning the stacktrace code I unintentially changed the skip depth of
trace_buffer_unlock_commit_regs() from 0 to 6. kprobes uses this function,
and with skipping 6 call backs, it can easily produce no stack.
Here's how I tested it:
# echo 'p:ext4_sync_fs ext4_sync_fs ' > /sys/kernel/debug/tracing/kprobe_events
# echo 1 > /sys/kernel/debug/tracing/events/kprobes/enable
# cat /sys/kernel/debug/trace
sync-2394 [005] 502.457060: ext4_sync_fs: (ffffffff81317650)
sync-2394 [005] 502.457063: kernel_stack: <stack trace>
sync-2394 [005] 502.457086: ext4_sync_fs: (ffffffff81317650)
sync-2394 [005] 502.457087: kernel_stack: <stack trace>
sync-2394 [005] 502.457091: ext4_sync_fs: (ffffffff81317650)
After putting back the skip stack to zero, we have:
sync-2270 [000] 748.052693: ext4_sync_fs: (ffffffff81317650)
sync-2270 [000] 748.052695: kernel_stack: <stack trace>
=> iterate_supers (ffffffff8126412e)
=> sys_sync (ffffffff8129c4b6)
=> entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
sync-2270 [000] 748.053017: ext4_sync_fs: (ffffffff81317650)
sync-2270 [000] 748.053019: kernel_stack: <stack trace>
=> iterate_supers (ffffffff8126412e)
=> sys_sync (ffffffff8129c4b6)
=> entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
sync-2270 [000] 748.053381: ext4_sync_fs: (ffffffff81317650)
sync-2270 [000] 748.053383: kernel_stack: <stack trace>
=> iterate_supers (ffffffff8126412e)
=> sys_sync (ffffffff8129c4b6)
=> entry_SYSCALL_64_fastpath (ffffffff8181f0b2)
Fixes: 73dddbb57bb0 "tracing: Only create stacktrace option when STACKTRACE is configured"
Reported-by: Brendan Gregg <brendan.d.gregg@gmail.com>
Tested-by: Brendan Gregg <brendan.d.gregg@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/trace/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1751,7 +1751,7 @@ void trace_buffer_unlock_commit_regs(str
{
__buffer_unlock_commit(buffer, event);
- ftrace_trace_stack(tr, buffer, flags, 6, pc, regs);
+ ftrace_trace_stack(tr, buffer, flags, 0, pc, regs);
ftrace_trace_userstack(buffer, flags, pc);
}
EXPORT_SYMBOL_GPL(trace_buffer_unlock_commit_regs);
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | linux.kernel
csiph-web