* [PATCH 3.10 000/104] 3.10.29-stable review
@ 2014-02-04 21:01 Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 002/104] md/raid5: fix long-standing problem with bitmap handling on write failure Greg Kroah-Hartman
` (100 more replies)
0 siblings, 101 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, torvalds, akpm, stable
This is the start of the stable review cycle for the 3.10.29 release.
There are 104 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 Thu Feb 6 21:02:03 UTC 2014.
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/v3.0/stable-review/patch-3.10.29-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux 3.10.29-rc1
Paul Mackerras <paulus@samba.org>
powerpc: Make sure "cache" directory is removed when offlining cpu
Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
powerpc: Fix the setup of CPU-to-Node mappings during CPU online
David Sterba <dsterba@suse.cz>
btrfs: restrict snapshotting to own subvolumes
Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot()
Andy Grover <agrover@redhat.com>
target/iscsi: Fix network portal creation race
Asias He <asias.hejun@gmail.com>
virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
Vijaya Mohan Guvva <vmohan@brocade.com>
SCSI: bfa: Chinook quad port 16G FC HBA claim issue
Thomas Pugliese <thomas.pugliese@gmail.com>
usb: core: get config and string descriptors for unauthorized devices
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160
Stephen Warren <swarren@nvidia.com>
ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled
Anssi Hannula <anssi.hannula@iki.fi>
ALSA: hda - hdmi: introduce patch_nvhdmi()
Mihai Caraman <mihai.caraman@freescale.com>
KVM: PPC: e500: Fix bad address type in deliver_tlb_misss()
Andreas Schwab <schwab@linux-m68k.org>
KVM: PPC: Book3S HV: use xics_wake_cpu only when defined
Helge Deller <deller@gmx.de>
parisc: fix cache-flushing
Emmanuel Grumbach <emmanuel.grumbach@intel.com>
iwlwifi: pcie: enable oscillator for L1 exit
Nicolas Dichtel <nicolas.dichtel@6wind.com>
ip6tnl: fix double free of fb_tnl_dev on exit
Nicolas Dichtel <nicolas.dichtel@6wind.com>
Revert "ip6tnl: fix use after free of fb_tnl_dev"
Nicolas Dichtel <nicolas.dichtel@6wind.com>
sit: fix double free of fb_tunnel_dev on exit
Annie Li <annie.li@oracle.com>
xen-netfront: fix resource leak in netfront
Holger Eitzenberger <holger@eitzenberger.org>
net: Fix memory leak if TPROXY used with TCP early demux
Oliver Hartkopp <socketcan@hartkopp.net>
fib_frontend: fix possible NULL pointer dereference
Duan Jiong <duanj.fnst@cn.fujitsu.com>
ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
Heiko Carstens <heiko.carstens@de.ibm.com>
s390/bpf,jit: fix 32 bit divisions, use unsigned divide instructions
Eric Dumazet <edumazet@google.com>
bpf: do not use reciprocal divide
Christoph Paasch <christoph.paasch@uclouvain.be>
tcp: metrics: Avoid duplicate entries with the same destination-IP
Gerald Schaefer <gerald.schaefer@de.ibm.com>
net: rds: fix per-cpu helper usage
Richard Weinberger <richard@nod.at>
net,via-rhine: Fix tx_timeout handling
Hannes Frederic Sowa <hannes@stressinduktion.org>
net: avoid reference counter overflows on fib_rules in multicast forwarding
Christian Engelmayer <cengelma@gmx.at>
ieee802154: Fix memory leak in ieee802154_add_iface()
Neal Cardwell <ncardwell@google.com>
inet_diag: fix inet_diag_dump_icsk() timewait socket state logic
Michal Schmidt <mschmidt@redhat.com>
bnx2x: fix DMA unmapping of TSO split BDs
Takashi Iwai <tiwai@suse.de>
hp_accel: Add a new PnP ID HPQ6007 for new HP laptops
Kent Overstreet <kmo@daterainc.com>
bcache: Data corruption fix
Eric W. Biederman <ebiederm@xmission.com>
vfs: Is mounted should be testing mnt_ns for NULL or error.
Theodore Ts'o <tytso@mit.edu>
ext4: avoid clearing beyond i_blocks when truncating an inline data file
Tejun Heo <tj@kernel.org>
libata: disable LPM for some WD SATA-I devices
Lior Amsalem <alior@marvell.com>
ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs
Simon Guinot <simon.guinot@sequanux.org>
ata: sata_mv: introduce compatible string "marvell, armada-370-sata"
Peter Huewe <PeterHuewe@gmx.de>
tpm/tpm_ppi: Do not compare strcmp(a,b) == -1
Peter Huewe <PeterHuewe@gmx.de>
tpm/tpm_i2c_stm_st33: Check return code of get_burstcount
Adrien Vergé <adrienverge@gmail.com>
ALSA: hda - Fix silent output on MacBook Air 1,1
Takashi Iwai <tiwai@suse.de>
ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks
Takashi Iwai <tiwai@suse.de>
ALSA: hda - Don't create duplicated ctls for loopback paths
Takashi Iwai <tiwai@suse.de>
ALSA: rme9652: fix a missing comma in channel_map_9636_ds[]
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
ASoC: wm5110: Extend SYSCLK patch file for rev D
Lars-Peter Clausen <lars@metafoo.de>
ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant
Krzysztof Kozlowski <k.kozlowski@samsung.com>
mfd: max77686: Fix regmap resource leak on driver remove
Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
perf kvm: Fix kvm report without guestmount.
Chen-Yu Tsai <wens@csie.org>
pinctrl: sunxi: Honor GPIO output initial vaules
Stephen Warren <swarren@nvidia.com>
rtc: max8907: weekday encoding fixes
Borislav Petkov <bp@alien8.de>
rtc-cmos: Add an alarm disable quirk
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
parport: parport_pc: remove double PCI ID for NetMos
Heiko Carstens <heiko.carstens@de.ibm.com>
s390/uapi: fix struct statfs64 definition
Heiko Carstens <heiko.carstens@de.ibm.com>
KVM: s390: fix diagnose code extraction
Stephen Warren <swarren@nvidia.com>
serial: 8250: enable UART_BUG_NOMSR for Tegra
Jonathan Woithe <jwoithe@just42.net>
serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip
Yegor Yefremov <yegorslists@googlemail.com>
serial: add support for 200 v3 series Titan card
Phil Pokorny <ppokorny@penguincomputing.com>
hwmon: (k10temp) Add support for Kaveri CPUs
Jean-Jacques Hiblot <jjhiblot@traphandler.com>
ARM: at91: smc: bug fix in sam9_smc_cs_read()
Marek Roszko <mark.roszko@gmail.com>
tty/serial: at91: Handle shutdown more safely
Malcolm Priestley <tvboxspy@gmail.com>
staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT
Malcolm Priestley <tvboxspy@gmail.com>
staging: vt6656: [BUG] BBvUpdatePreEDThreshold Always set sensitivity on bScanning
Larry Finger <Larry.Finger@lwfinger.net>
staging: r8712u: Set device type to wlan
ZHAO Gang <gamerh2o@gmail.com>
b43: fix the wrong assignment of status.freq in b43_rx()
Larry Finger <Larry.Finger@lwfinger.net>
b43legacy: Fix unload oops if firmware is not available
Larry Finger <Larry.Finger@lwfinger.net>
b43: Fix unload oops if firmware is not available
Larry Finger <Larry.Finger@lwfinger.net>
b43: Fix lockdep splat
Eliad Peller <eliadx.peller@intel.com>
iwlwifi: mvm: fix missing cleanup in .start() error path
Bing Zhao <bzhao@marvell.com>
mwifiex: fix wrong 11ac bits setting in fw_cap_info
Amitkumar Karwar <akarwar@marvell.com>
mwifiex: add missing endian conversion for fw_tsf
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8188ee: Fix typo in code
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: Add missing code to PWDB statics routine
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8192cu: Fix some code in RF handling
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8192cu: Update the power index registers
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8192c: Add routines to save/restore power index registers
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: Increase the RX queue length for USB drivers
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8192c: Add new definitions in the dm_common header
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: Set the link state
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: Redo register save locations
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8192cu: Add new firmware
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8192c: Prevent reconnect attempts if not connected
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: Update beacon statistics for USB driver
Larry Finger <Larry.Finger@lwfinger.net>
rtlwifi: rtl8192cu: Add new device ID
Peter Chen <peter.chen@freescale.com>
usb: ehci: add freescale imx28 special write register method
Alan Stern <stern@rowland.harvard.edu>
USB: fix race between hub_disconnect and recursively_mark_NOTATTACHED
Jack Pham <jackp@codeaurora.org>
usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()
Mikhail Zolotaryov <lebon@lebon.org.ua>
USB: Nokia 502 is an unusual device
Colin Leitner <colin.leitner@googlemail.com>
USB: ftdi_sio: added CS5 quirk for broken smartcard readers
Johan Hovold <jhovold@gmail.com>
USB: cypress_m8: fix ring-indicator detection and reporting
Rahul Bedarkar <rahulbedarkar89@gmail.com>
USB: serial: add support for iBall 3.5G connect usb modem
张君 <zjn77777@163.com>
usb: option: add new zte 3g modem pids to option driver
Johan Hovold <jhovold@gmail.com>
USB: pl2303: fix data corruption on termios updates
Marcelo Tosatti <mtosatti@redhat.com>
KVM: x86: limit PIT timer frequency
Prarit Bhargava <prarit@redhat.com>
x86: Add check for number of available vectors before CPU down
Dave Young <dyoung@redhat.com>
x86/efi: Fix off-by-one bug in EFI Boot Services reservation
PaX Team <pageexec@freemail.hu>
x86, x32: Correct invalid use of user timespec in the kernel
David Rientjes <rientjes@google.com>
mm/mempolicy.c: fix mempolicy printing in numa_maps
David Ertman <davidx.m.ertman@intel.com>
e1000e: fix compiler warnings
Aristeu Rozanski <aris@redhat.com>
e752x_edac: Fix pci_dev usage count
Andrea Arcangeli <aarcange@redhat.com>
mm: hugetlbfs: fix hugetlbfs optimization
Alexandre Courbot <acourbot@nvidia.com>
lib/decompressors: fix "no limit" output buffer length
Ilia Mirkin <imirkin@alum.mit.edu>
drm/nouveau/bios: fix offset calculation for BMPv1 bioses
NeilBrown <neilb@suse.de>
md/raid5: fix long-standing problem with bitmap handling on write failure.
Andrew Jones <drjones@redhat.com>
kvm: x86: fix apic_base enable check
-------------
Diffstat:
Documentation/devicetree/bindings/ata/marvell.txt | 2 +-
Makefile | 4 +-
arch/arm/mach-at91/sam9_smc.c | 2 +-
arch/arm/net/bpf_jit_32.c | 6 +-
arch/parisc/include/asm/cacheflush.h | 2 -
arch/parisc/include/asm/page.h | 3 +-
arch/parisc/kernel/cache.c | 14 +++
arch/powerpc/include/asm/topology.h | 10 +-
arch/powerpc/kernel/cacheinfo.c | 3 +
arch/powerpc/kvm/book3s_hv.c | 7 +-
arch/powerpc/kvm/e500_mmu.c | 2 +-
arch/powerpc/mm/numa.c | 70 ++++++++++-
arch/powerpc/net/bpf_jit_comp.c | 7 +-
arch/s390/include/uapi/asm/statfs.h | 10 +-
arch/s390/kvm/diag.c | 2 +-
arch/s390/net/bpf_jit_comp.c | 29 +++--
arch/sparc/net/bpf_jit_comp.c | 17 ++-
arch/x86/include/asm/irq.h | 1 +
arch/x86/kernel/irq.c | 70 +++++++++++
arch/x86/kernel/smpboot.c | 6 +
arch/x86/kvm/i8254.c | 18 +++
arch/x86/kvm/lapic.c | 5 +-
arch/x86/kvm/x86.c | 3 +
arch/x86/kvm/x86.h | 2 +
arch/x86/net/bpf_jit_comp.c | 14 ++-
arch/x86/platform/efi/efi.c | 2 +-
drivers/ata/libata-core.c | 27 ++++
drivers/ata/libata-scsi.c | 18 ++-
drivers/ata/sata_mv.c | 25 ++++
drivers/char/tpm/tpm_i2c_stm_st33.c | 7 +-
drivers/char/tpm/tpm_ppi.c | 8 +-
drivers/edac/e752x_edac.c | 4 +-
drivers/gpu/drm/nouveau/core/subdev/bios/init.c | 8 +-
drivers/hwmon/k10temp.c | 1 +
drivers/md/bcache/bset.c | 26 +++-
drivers/md/raid5.c | 1 +
drivers/mfd/max77686.c | 2 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 13 +-
drivers/net/ethernet/intel/e1000e/phy.c | 10 +-
drivers/net/ethernet/via/via-rhine.c | 1 +
drivers/net/wireless/b43/b43.h | 4 +-
drivers/net/wireless/b43/main.c | 27 ++--
drivers/net/wireless/b43/xmit.c | 4 +-
drivers/net/wireless/b43legacy/main.c | 1 +
drivers/net/wireless/iwlwifi/iwl-7000.c | 6 +
drivers/net/wireless/iwlwifi/iwl-config.h | 3 +
drivers/net/wireless/iwlwifi/iwl-csr.h | 5 +-
drivers/net/wireless/iwlwifi/iwl-prph.h | 4 +
drivers/net/wireless/iwlwifi/mvm/ops.c | 1 +
drivers/net/wireless/iwlwifi/pcie/rx.c | 4 +
drivers/net/wireless/iwlwifi/pcie/trans.c | 19 ++-
drivers/net/wireless/mwifiex/fw.h | 2 +-
drivers/net/wireless/mwifiex/scan.c | 4 +-
drivers/net/wireless/rtlwifi/base.c | 3 +-
drivers/net/wireless/rtlwifi/core.c | 11 ++
drivers/net/wireless/rtlwifi/rtl8188ee/dm.c | 2 +-
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 36 ++++++
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.h | 14 +++
drivers/net/wireless/rtlwifi/rtl8192cu/dm.c | 9 ++
drivers/net/wireless/rtlwifi/rtl8192cu/dm.h | 3 +
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 29 +++--
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 17 ++-
drivers/net/wireless/rtlwifi/stats.c | 14 +++
drivers/net/wireless/rtlwifi/usb.c | 4 +-
drivers/net/wireless/rtlwifi/wifi.h | 33 ++---
drivers/net/xen-netfront.c | 88 ++++---------
drivers/parport/parport_pc.c | 10 +-
drivers/pinctrl/pinctrl-sunxi.c | 13 +-
drivers/platform/x86/hp_accel.c | 1 +
drivers/rtc/rtc-cmos.c | 52 +++++++-
drivers/rtc/rtc-max8907.c | 11 +-
drivers/scsi/bfa/bfad.c | 6 +-
drivers/scsi/virtio_scsi.c | 15 ++-
drivers/staging/rtl8712/usb_intf.c | 5 +
drivers/staging/vt6656/baseband.c | 3 -
drivers/staging/vt6656/card.c | 2 +-
drivers/target/iscsi/iscsi_target.c | 34 +++--
drivers/tty/serial/8250/8250_core.c | 4 +
drivers/tty/serial/8250/8250_pci.c | 8 +-
drivers/tty/serial/atmel_serial.c | 20 +--
drivers/usb/core/config.c | 7 --
drivers/usb/core/hub.c | 54 +++-----
drivers/usb/host/ehci.h | 18 ++-
drivers/usb/host/xhci.c | 3 +
drivers/usb/serial/cypress_m8.h | 2 +-
drivers/usb/serial/ftdi_sio.c | 17 ++-
drivers/usb/serial/option.c | 15 +++
drivers/usb/serial/pl2303.c | 33 +++--
drivers/usb/storage/unusual_devs.h | 7 ++
fs/btrfs/extent-tree.c | 2 +-
fs/btrfs/ioctl.c | 6 +
fs/ext4/inline.c | 8 +-
fs/mount.h | 2 +-
include/linux/hugetlb.h | 6 +
include/linux/libata.h | 2 +
lib/decompress_inflate.c | 2 +-
mm/hugetlb.c | 17 +++
mm/mempolicy.c | 2 +-
mm/swap.c | 143 +++++++++++++---------
net/compat.c | 9 +-
net/core/filter.c | 30 +----
net/ieee802154/nl-phy.c | 6 +-
net/ipv4/fib_frontend.c | 2 +
net/ipv4/inet_diag.c | 4 +-
net/ipv4/ip_input.c | 2 +-
net/ipv4/ip_tunnel.c | 1 +
net/ipv4/ipmr.c | 7 +-
net/ipv4/tcp_metrics.c | 51 +++++---
net/ipv6/ip6_input.c | 2 +-
net/ipv6/ip6_tunnel.c | 12 ++
net/ipv6/ip6mr.c | 7 +-
net/ipv6/sit.c | 10 ++
net/rds/ib_recv.c | 7 +-
sound/pci/Kconfig | 12 ++
sound/pci/hda/hda_generic.c | 6 +-
sound/pci/hda/patch_hdmi.c | 100 +++++++++++----
sound/pci/hda/patch_realtek.c | 19 ++-
sound/pci/rme9652/rme9652.c | 2 +-
sound/soc/codecs/adau1701.c | 2 +-
sound/soc/codecs/wm5110.c | 48 ++++++++
tools/perf/util/session.c | 7 +-
121 files changed, 1216 insertions(+), 469 deletions(-)
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 002/104] md/raid5: fix long-standing problem with bitmap handling on write failure.
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 003/104] drm/nouveau/bios: fix offset calculation for BMPv1 bioses Greg Kroah-Hartman
` (99 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ethan Wilson, NeilBrown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: NeilBrown <neilb@suse.de>
commit 9f97e4b128d2ea90a5f5063ea0ee3b0911f4c669 upstream.
Before a write starts we set a bit in the write-intent bitmap.
When the write completes we clear that bit if the write was successful
to all devices. However if the write wasn't fully successful we
should not clear the bit. If the faulty drive is subsequently
re-added, the fact that the bit is still set ensure that we will
re-write the data that is missing.
This logic is mediated by the STRIPE_DEGRADED flag - we only clear the
bitmap bit when this flag is not set.
Currently we correctly set the flag if a write starts when some
devices are failed or missing. But we do *not* set the flag if some
device failed during the write attempt.
This is wrong and can result in clearing the bit inappropriately.
So: set the flag when a write fails.
This bug has been present since bitmaps were introduces, so the fix is
suitable for any -stable kernel.
Reported-by: Ethan Wilson <ethan.wilson@shiftmail.org>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/raid5.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1893,6 +1893,7 @@ static void raid5_end_write_request(stru
set_bit(R5_MadeGoodRepl, &sh->dev[i].flags);
} else {
if (!uptodate) {
+ set_bit(STRIPE_DEGRADED, &sh->state);
set_bit(WriteErrorSeen, &rdev->flags);
set_bit(R5_WriteError, &sh->dev[i].flags);
if (!test_and_set_bit(WantReplacement, &rdev->flags))
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 003/104] drm/nouveau/bios: fix offset calculation for BMPv1 bioses
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 002/104] md/raid5: fix long-standing problem with bitmap handling on write failure Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 004/104] lib/decompressors: fix "no limit" output buffer length Greg Kroah-Hartman
` (98 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Mauro Molinari, Ilia Mirkin,
Ben Skeggs
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilia Mirkin <imirkin@alum.mit.edu>
commit 5d2f4767c4eacab351b8450b0de4d3261fe1a957 upstream.
The only BIOS on record that needs the 14 offset has a bios major
version 2 but BMP version 1.01. Another bunch of BIOSes that need the 18
offset have BMP version 2.01 or 5.01 or higher. So instead of looking at the
bios major version, look at the BMP version. BIOSes with BMP version 0
do not contain a detectable script, so always return 0 for them.
See https://bugs.freedesktop.org/show_bug.cgi?id=68835
Reported-by: Mauro Molinari <mauromol@tiscali.it>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/nouveau/core/subdev/bios/init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/nouveau/core/subdev/bios/init.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/bios/init.c
@@ -366,13 +366,13 @@ static u16
init_script(struct nouveau_bios *bios, int index)
{
struct nvbios_init init = { .bios = bios };
- u16 data;
+ u16 bmp_ver = bmp_version(bios), data;
- if (bmp_version(bios) && bmp_version(bios) < 0x0510) {
- if (index > 1)
+ if (bmp_ver && bmp_ver < 0x0510) {
+ if (index > 1 || bmp_ver < 0x0100)
return 0x0000;
- data = bios->bmp_offset + (bios->version.major < 2 ? 14 : 18);
+ data = bios->bmp_offset + (bmp_ver < 0x0200 ? 14 : 18);
return nv_ro16(bios, data + (index * 2));
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 004/104] lib/decompressors: fix "no limit" output buffer length
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 002/104] md/raid5: fix long-standing problem with bitmap handling on write failure Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 003/104] drm/nouveau/bios: fix offset calculation for BMPv1 bioses Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 005/104] mm: hugetlbfs: fix hugetlbfs optimization Greg Kroah-Hartman
` (97 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Alexandre Courbot, Jon Medhurst,
Stephen Warren, Andrew Morton, Linus Torvalds, Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexandre Courbot <acourbot@nvidia.com>
commit 1431574a1c4c669a0c198e4763627837416e4443 upstream.
When decompressing into memory, the output buffer length is set to some
arbitrarily high value (0x7fffffff) to indicate the output is, virtually,
unlimited in size.
The problem with this is that some platforms have their physical memory at
high physical addresses (0x80000000 or more), and that the output buffer
address and its "unlimited" length cannot be added without overflowing.
An example of this can be found in inflate_fast():
/* next_out is the output buffer address */
out = strm->next_out - OFF;
/* avail_out is the output buffer size. end will overflow if the output
* address is >= 0x80000104 */
end = out + (strm->avail_out - 257);
This has huge consequences on the performance of kernel decompression,
since the following exit condition of inflate_fast() will be always true:
} while (in < last && out < end);
Indeed, "end" has overflowed and is now always lower than "out". As a
result, inflate_fast() will return after processing one single byte of
input data, and will thus need to be called an unreasonably high number of
times. This probably went unnoticed because kernel decompression is fast
enough even with this issue.
Nonetheless, adjusting the output buffer length in such a way that the
above pointer arithmetic never overflows results in a kernel decompression
that is about 3 times faster on affected machines.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Jon Medhurst <tixy@linaro.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
lib/decompress_inflate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/decompress_inflate.c
+++ b/lib/decompress_inflate.c
@@ -48,7 +48,7 @@ STATIC int INIT gunzip(unsigned char *bu
out_len = 0x8000; /* 32 K */
out_buf = malloc(out_len);
} else {
- out_len = 0x7fffffff; /* no limit */
+ out_len = ((size_t)~0) - (size_t)out_buf; /* no limit */
}
if (!out_buf) {
error("Out of memory while allocating output buffer");
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 005/104] mm: hugetlbfs: fix hugetlbfs optimization
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (2 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 004/104] lib/decompressors: fix "no limit" output buffer length Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 006/104] e752x_edac: Fix pci_dev usage count Greg Kroah-Hartman
` (96 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Khalid Aziz, Andrea Arcangeli,
Pravin Shelar, Ben Hutchings, Christoph Lameter, Johannes Weiner,
Mel Gorman, Rik van Riel, Andi Kleen, Minchan Kim, Andrew Morton,
Linus Torvalds, Guillaume Morin
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrea Arcangeli <aarcange@redhat.com>
commit 27c73ae759774e63313c1fbfeb17ba076cea64c5 upstream.
Commit 7cb2ef56e6a8 ("mm: fix aio performance regression for database
caused by THP") can cause dereference of a dangling pointer if
split_huge_page runs during PageHuge() if there are updates to the
tail_page->private field.
Also it is repeating compound_head twice for hugetlbfs and it is running
compound_head+compound_trans_head for THP when a single one is needed in
both cases.
The new code within the PageSlab() check doesn't need to verify that the
THP page size is never bigger than the smallest hugetlbfs page size, to
avoid memory corruption.
A longstanding theoretical race condition was found while fixing the
above (see the change right after the skip_unlock label, that is
relevant for the compound_lock path too).
By re-establishing the _mapcount tail refcounting for all compound
pages, this also fixes the below problem:
echo 0 >/sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
BUG: Bad page state in process bash pfn:59a01
page:ffffea000139b038 count:0 mapcount:10 mapping: (null) index:0x0
page flags: 0x1c00000000008000(tail)
Modules linked in:
CPU: 6 PID: 2018 Comm: bash Not tainted 3.12.0+ #25
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Call Trace:
dump_stack+0x55/0x76
bad_page+0xd5/0x130
free_pages_prepare+0x213/0x280
__free_pages+0x36/0x80
update_and_free_page+0xc1/0xd0
free_pool_huge_page+0xc2/0xe0
set_max_huge_pages.part.58+0x14c/0x220
nr_hugepages_store_common.isra.60+0xd0/0xf0
nr_hugepages_store+0x13/0x20
kobj_attr_store+0xf/0x20
sysfs_write_file+0x189/0x1e0
vfs_write+0xc5/0x1f0
SyS_write+0x55/0xb0
system_call_fastpath+0x16/0x1b
Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Tested-by: Khalid Aziz <khalid.aziz@oracle.com>
Cc: Pravin Shelar <pshelar@nicira.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Johannes Weiner <jweiner@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Guillaume Morin <guillaume@morinfr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/hugetlb.h | 6 ++
mm/hugetlb.c | 17 +++++
mm/swap.c | 143 +++++++++++++++++++++++++++---------------------
3 files changed, 106 insertions(+), 60 deletions(-)
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -31,6 +31,7 @@ struct hugepage_subpool *hugepage_new_su
void hugepage_put_subpool(struct hugepage_subpool *spool);
int PageHuge(struct page *page);
+int PageHeadHuge(struct page *page_head);
void reset_vma_resv_huge_pages(struct vm_area_struct *vma);
int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *);
@@ -97,6 +98,11 @@ static inline int PageHuge(struct page *
{
return 0;
}
+
+static inline int PageHeadHuge(struct page *page_head)
+{
+ return 0;
+}
static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
{
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -690,6 +690,23 @@ int PageHuge(struct page *page)
}
EXPORT_SYMBOL_GPL(PageHuge);
+/*
+ * PageHeadHuge() only returns true for hugetlbfs head page, but not for
+ * normal or transparent huge pages.
+ */
+int PageHeadHuge(struct page *page_head)
+{
+ compound_page_dtor *dtor;
+
+ if (!PageHead(page_head))
+ return 0;
+
+ dtor = get_compound_page_dtor(page_head);
+
+ return dtor == free_huge_page;
+}
+EXPORT_SYMBOL_GPL(PageHeadHuge);
+
pgoff_t __basepage_index(struct page *page)
{
struct page *page_head = compound_head(page);
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -79,19 +79,6 @@ static void __put_compound_page(struct p
static void put_compound_page(struct page *page)
{
- /*
- * hugetlbfs pages cannot be split from under us. If this is a
- * hugetlbfs page, check refcount on head page and release the page if
- * the refcount becomes zero.
- */
- if (PageHuge(page)) {
- page = compound_head(page);
- if (put_page_testzero(page))
- __put_compound_page(page);
-
- return;
- }
-
if (unlikely(PageTail(page))) {
/* __split_huge_page_refcount can run under us */
struct page *page_head = compound_trans_head(page);
@@ -108,14 +95,31 @@ static void put_compound_page(struct pag
* still hot on arches that do not support
* this_cpu_cmpxchg_double().
*/
- if (PageSlab(page_head)) {
- if (PageTail(page)) {
+ if (PageSlab(page_head) || PageHeadHuge(page_head)) {
+ if (likely(PageTail(page))) {
+ /*
+ * __split_huge_page_refcount
+ * cannot race here.
+ */
+ VM_BUG_ON(!PageHead(page_head));
+ atomic_dec(&page->_mapcount);
if (put_page_testzero(page_head))
VM_BUG_ON(1);
-
- atomic_dec(&page->_mapcount);
- goto skip_lock_tail;
+ if (put_page_testzero(page_head))
+ __put_compound_page(page_head);
+ return;
} else
+ /*
+ * __split_huge_page_refcount
+ * run before us, "page" was a
+ * THP tail. The split
+ * page_head has been freed
+ * and reallocated as slab or
+ * hugetlbfs page of smaller
+ * order (only possible if
+ * reallocated as slab on
+ * x86).
+ */
goto skip_lock;
}
/*
@@ -129,8 +133,27 @@ static void put_compound_page(struct pag
/* __split_huge_page_refcount run before us */
compound_unlock_irqrestore(page_head, flags);
skip_lock:
- if (put_page_testzero(page_head))
- __put_single_page(page_head);
+ if (put_page_testzero(page_head)) {
+ /*
+ * The head page may have been
+ * freed and reallocated as a
+ * compound page of smaller
+ * order and then freed again.
+ * All we know is that it
+ * cannot have become: a THP
+ * page, a compound page of
+ * higher order, a tail page.
+ * That is because we still
+ * hold the refcount of the
+ * split THP tail and
+ * page_head was the THP head
+ * before the split.
+ */
+ if (PageHead(page_head))
+ __put_compound_page(page_head);
+ else
+ __put_single_page(page_head);
+ }
out_put_single:
if (put_page_testzero(page))
__put_single_page(page);
@@ -152,7 +175,6 @@ out_put_single:
VM_BUG_ON(atomic_read(&page->_count) != 0);
compound_unlock_irqrestore(page_head, flags);
-skip_lock_tail:
if (put_page_testzero(page_head)) {
if (PageHead(page_head))
__put_compound_page(page_head);
@@ -195,51 +217,52 @@ bool __get_page_tail(struct page *page)
* proper PT lock that already serializes against
* split_huge_page().
*/
+ unsigned long flags;
bool got = false;
- struct page *page_head;
-
- /*
- * If this is a hugetlbfs page it cannot be split under us. Simply
- * increment refcount for the head page.
- */
- if (PageHuge(page)) {
- page_head = compound_head(page);
- atomic_inc(&page_head->_count);
- got = true;
- } else {
- unsigned long flags;
-
- page_head = compound_trans_head(page);
- if (likely(page != page_head &&
- get_page_unless_zero(page_head))) {
-
- /* Ref to put_compound_page() comment. */
- if (PageSlab(page_head)) {
- if (likely(PageTail(page))) {
- __get_page_tail_foll(page, false);
- return true;
- } else {
- put_page(page_head);
- return false;
- }
- }
+ struct page *page_head = compound_trans_head(page);
- /*
- * page_head wasn't a dangling pointer but it
- * may not be a head page anymore by the time
- * we obtain the lock. That is ok as long as it
- * can't be freed from under us.
- */
- flags = compound_lock_irqsave(page_head);
- /* here __split_huge_page_refcount won't run anymore */
+ if (likely(page != page_head && get_page_unless_zero(page_head))) {
+ /* Ref to put_compound_page() comment. */
+ if (PageSlab(page_head) || PageHeadHuge(page_head)) {
if (likely(PageTail(page))) {
+ /*
+ * This is a hugetlbfs page or a slab
+ * page. __split_huge_page_refcount
+ * cannot race here.
+ */
+ VM_BUG_ON(!PageHead(page_head));
__get_page_tail_foll(page, false);
- got = true;
- }
- compound_unlock_irqrestore(page_head, flags);
- if (unlikely(!got))
+ return true;
+ } else {
+ /*
+ * __split_huge_page_refcount run
+ * before us, "page" was a THP
+ * tail. The split page_head has been
+ * freed and reallocated as slab or
+ * hugetlbfs page of smaller order
+ * (only possible if reallocated as
+ * slab on x86).
+ */
put_page(page_head);
+ return false;
+ }
+ }
+
+ /*
+ * page_head wasn't a dangling pointer but it
+ * may not be a head page anymore by the time
+ * we obtain the lock. That is ok as long as it
+ * can't be freed from under us.
+ */
+ flags = compound_lock_irqsave(page_head);
+ /* here __split_huge_page_refcount won't run anymore */
+ if (likely(PageTail(page))) {
+ __get_page_tail_foll(page, false);
+ got = true;
}
+ compound_unlock_irqrestore(page_head, flags);
+ if (unlikely(!got))
+ put_page(page_head);
}
return got;
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 006/104] e752x_edac: Fix pci_dev usage count
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (3 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 005/104] mm: hugetlbfs: fix hugetlbfs optimization Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 007/104] e1000e: fix compiler warnings Greg Kroah-Hartman
` (95 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Aristeu Rozanski, mark gross,
Borislav Petkov, Jean Delvare
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aristeu Rozanski <aris@redhat.com>
commit 90ed4988b8c030d65b41b7d13140e9376dc6ec5a upstream.
In case the device 0, function 1 is not found using pci_get_device(),
pci_scan_single_device() will be used but, differently than
pci_get_device(), it allocates a pci_dev but doesn't does bump the usage
count on the pci_dev and after few module removals and loads the pci_dev
will be freed.
Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Reviewed-by: mark gross <mark.gross@intel.com>
Link: http://lkml.kernel.org/r/20131205153755.GL4545@redhat.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/edac/e752x_edac.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -1182,9 +1182,11 @@ static int e752x_get_devs(struct pci_dev
pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
pvt->dev_info->err_dev, pvt->bridge_ck);
- if (pvt->bridge_ck == NULL)
+ if (pvt->bridge_ck == NULL) {
pvt->bridge_ck = pci_scan_single_device(pdev->bus,
PCI_DEVFN(0, 1));
+ pci_dev_get(pvt->bridge_ck);
+ }
if (pvt->bridge_ck == NULL) {
e752x_printk(KERN_ERR, "error reporting device not found:"
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 007/104] e1000e: fix compiler warnings
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (4 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 006/104] e752x_edac: Fix pci_dev usage count Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 008/104] mm/mempolicy.c: fix mempolicy printing in numa_maps Greg Kroah-Hartman
` (94 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, David Ertman, Bruce Allan,
Aaron Brown, Jeff Kirsher
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Ertman <davidx.m.ertman@intel.com>
commit 9e6c3b63399dd424d33a34e08b77f2cab0b84cdc upstream.
This patch is to fix a compiler warning of __bad_udelay due to a value
of >999 being passed as a parameter to udelay() in the function
e1000e_phy_has_link_generic(). This affects the gcc compiler when
it is given a flag of -O3 and the icc compiler.
This patch is also making the change from mdelay() to msleep() in the
same function, since it was determined though code inspection that this
function is never called in atomic context.
Signed-off-by: David Ertman <davidx.m.ertman@intel.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/intel/e1000e/phy.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/net/ethernet/intel/e1000e/phy.c
+++ b/drivers/net/ethernet/intel/e1000e/phy.c
@@ -1757,19 +1757,23 @@ s32 e1000e_phy_has_link_generic(struct e
* it across the board.
*/
ret_val = e1e_rphy(hw, MII_BMSR, &phy_status);
- if (ret_val)
+ if (ret_val) {
/* If the first read fails, another entity may have
* ownership of the resources, wait and try again to
* see if they have relinquished the resources yet.
*/
- udelay(usec_interval);
+ if (usec_interval >= 1000)
+ msleep(usec_interval / 1000);
+ else
+ udelay(usec_interval);
+ }
ret_val = e1e_rphy(hw, MII_BMSR, &phy_status);
if (ret_val)
break;
if (phy_status & BMSR_LSTATUS)
break;
if (usec_interval >= 1000)
- mdelay(usec_interval / 1000);
+ msleep(usec_interval / 1000);
else
udelay(usec_interval);
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 008/104] mm/mempolicy.c: fix mempolicy printing in numa_maps
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (5 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 007/104] e1000e: fix compiler warnings Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 009/104] x86, x32: Correct invalid use of user timespec in the kernel Greg Kroah-Hartman
` (93 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, David Rientjes, Robert Lippert,
Peter Zijlstra, Mel Gorman, Ingo Molnar, Andrew Morton,
Linus Torvalds
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Rientjes <rientjes@google.com>
commit 8790c71a18e5d2d93532ae250bcf5eddbba729cd upstream.
As a result of commit 5606e3877ad8 ("mm: numa: Migrate on reference
policy"), /proc/<pid>/numa_maps prints the mempolicy for any <pid> as
"prefer:N" for the local node, N, of the process reading the file.
This should only be printed when the mempolicy of <pid> is
MPOL_PREFERRED for node N.
If the process is actually only using the default mempolicy for local
node allocation, make sure "default" is printed as expected.
Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Robert Lippert <rlippert@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: <stable@vger.kernel.org> [3.7+]
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>
---
mm/mempolicy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2801,7 +2801,7 @@ int mpol_to_str(char *buffer, int maxlen
*/
VM_BUG_ON(maxlen < strlen("interleave") + strlen("relative") + 16);
- if (!pol || pol == &default_policy)
+ if (!pol || pol == &default_policy || (pol->flags & MPOL_F_MORON))
mode = MPOL_DEFAULT;
else
mode = pol->mode;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 009/104] x86, x32: Correct invalid use of user timespec in the kernel
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (6 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 008/104] mm/mempolicy.c: fix mempolicy printing in numa_maps Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 010/104] x86/efi: Fix off-by-one bug in EFI Boot Services reservation Greg Kroah-Hartman
` (92 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, PaX Team, H. Peter Anvin,
Linus Torvalds
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: PaX Team <pageexec@freemail.hu>
commit 2def2ef2ae5f3990aabdbe8a755911902707d268 upstream.
The x32 case for the recvmsg() timout handling is broken:
asmlinkage long compat_sys_recvmmsg(int fd, struct compat_mmsghdr __user *mmsg,
unsigned int vlen, unsigned int flags,
struct compat_timespec __user *timeout)
{
int datagrams;
struct timespec ktspec;
if (flags & MSG_CMSG_COMPAT)
return -EINVAL;
if (COMPAT_USE_64BIT_TIME)
return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
flags | MSG_CMSG_COMPAT,
(struct timespec *) timeout);
...
The timeout pointer parameter is provided by userland (hence the __user
annotation) but for x32 syscalls it's simply cast to a kernel pointer
and is passed to __sys_recvmmsg which will eventually directly
dereference it for both reading and writing. Other callers to
__sys_recvmmsg properly copy from userland to the kernel first.
The bug was introduced by commit ee4fa23c4bfc ("compat: Use
COMPAT_USE_64BIT_TIME in net/compat.c") and should affect all kernels
since 3.4 (and perhaps vendor kernels if they backported x32 support
along with this code).
Note that CONFIG_X86_X32_ABI gets enabled at build time and only if
CONFIG_X86_X32 is enabled and ld can build x32 executables.
Other uses of COMPAT_USE_64BIT_TIME seem fine.
This addresses CVE-2014-0038.
Signed-off-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/compat.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
--- a/net/compat.c
+++ b/net/compat.c
@@ -780,21 +780,16 @@ asmlinkage long compat_sys_recvmmsg(int
if (flags & MSG_CMSG_COMPAT)
return -EINVAL;
- if (COMPAT_USE_64BIT_TIME)
- return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
- flags | MSG_CMSG_COMPAT,
- (struct timespec *) timeout);
-
if (timeout == NULL)
return __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
flags | MSG_CMSG_COMPAT, NULL);
- if (get_compat_timespec(&ktspec, timeout))
+ if (compat_get_timespec(&ktspec, timeout))
return -EFAULT;
datagrams = __sys_recvmmsg(fd, (struct mmsghdr __user *)mmsg, vlen,
flags | MSG_CMSG_COMPAT, &ktspec);
- if (datagrams > 0 && put_compat_timespec(&ktspec, timeout))
+ if (datagrams > 0 && compat_put_timespec(&ktspec, timeout))
datagrams = -EFAULT;
return datagrams;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 010/104] x86/efi: Fix off-by-one bug in EFI Boot Services reservation
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (7 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 009/104] x86, x32: Correct invalid use of user timespec in the kernel Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 011/104] x86: Add check for number of available vectors before CPU down Greg Kroah-Hartman
` (91 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dave Young, Borislav Petkov,
Toshi Kani, Matt Fleming
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Young <dyoung@redhat.com>
commit a7f84f03f660d93574ac88835d056c0d6468aebe upstream.
Current code check boot service region with kernel text region by:
start+size >= __pa_symbol(_text)
The end of the above region should be start + size - 1 instead.
I see this problem in ovmf + Fedora 19 grub boot:
text start: 1000000 md start: 800000 md size: 800000
Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Borislav Petkov <bp@suse.de>
Acked-by: Toshi Kani <toshi.kani@hp.com>
Tested-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/platform/efi/efi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -438,7 +438,7 @@ void __init efi_reserve_boot_services(vo
* - Not within any part of the kernel
* - Not the bios reserved area
*/
- if ((start+size >= __pa_symbol(_text)
+ if ((start + size > __pa_symbol(_text)
&& start <= __pa_symbol(_end)) ||
!e820_all_mapped(start, start+size, E820_RAM) ||
memblock_is_region_reserved(start, size)) {
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 011/104] x86: Add check for number of available vectors before CPU down
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (8 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 010/104] x86/efi: Fix off-by-one bug in EFI Boot Services reservation Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 22:45 ` Prarit Bhargava
2014-02-04 21:01 ` [PATCH 3.10 012/104] KVM: x86: limit PIT timer frequency Greg Kroah-Hartman
` (90 subsequent siblings)
100 siblings, 1 reply; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Prarit Bhargava, Gong Chen,
Andi Kleen, Michel Lespinasse, Seiji Aguchi, Yang Zhang,
Paul Gortmaker, Janet Morgan, Tony Luck, Ruiv Wang,
H. Peter Anvin
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Prarit Bhargava <prarit@redhat.com>
commit da6139e49c7cb0f4251265cb5243b8d220adb48d upstream.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64791
When a cpu is downed on a system, the irqs on the cpu are assigned to
other cpus. It is possible, however, that when a cpu is downed there
aren't enough free vectors on the remaining cpus to account for the
vectors from the cpu that is being downed.
This results in an interesting "overflow" condition where irqs are
"assigned" to a CPU but are not handled.
For example, when downing cpus on a 1-64 logical processor system:
<snip>
[ 232.021745] smpboot: CPU 61 is now offline
[ 238.480275] smpboot: CPU 62 is now offline
[ 245.991080] ------------[ cut here ]------------
[ 245.996270] WARNING: CPU: 0 PID: 0 at net/sched/sch_generic.c:264 dev_watchdog+0x246/0x250()
[ 246.005688] NETDEV WATCHDOG: p786p1 (ixgbe): transmit queue 0 timed out
[ 246.013070] Modules linked in: lockd sunrpc iTCO_wdt iTCO_vendor_support sb_edac ixgbe microcode e1000e pcspkr joydev edac_core lpc_ich ioatdma ptp mdio mfd_core i2c_i801 dca pps_core i2c_core wmi acpi_cpufreq isci libsas scsi_transport_sas
[ 246.037633] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.12.0+ #14
[ 246.044451] Hardware name: Intel Corporation S4600LH ........../SVRBD-ROW_T, BIOS SE5C600.86B.01.08.0003.022620131521 02/26/2013
[ 246.057371] 0000000000000009 ffff88081fa03d40 ffffffff8164fbf6 ffff88081fa0ee48
[ 246.065728] ffff88081fa03d90 ffff88081fa03d80 ffffffff81054ecc ffff88081fa13040
[ 246.074073] 0000000000000000 ffff88200cce0000 0000000000000040 0000000000000000
[ 246.082430] Call Trace:
[ 246.085174] <IRQ> [<ffffffff8164fbf6>] dump_stack+0x46/0x58
[ 246.091633] [<ffffffff81054ecc>] warn_slowpath_common+0x8c/0xc0
[ 246.098352] [<ffffffff81054fb6>] warn_slowpath_fmt+0x46/0x50
[ 246.104786] [<ffffffff815710d6>] dev_watchdog+0x246/0x250
[ 246.110923] [<ffffffff81570e90>] ? dev_deactivate_queue.constprop.31+0x80/0x80
[ 246.119097] [<ffffffff8106092a>] call_timer_fn+0x3a/0x110
[ 246.125224] [<ffffffff8106280f>] ? update_process_times+0x6f/0x80
[ 246.132137] [<ffffffff81570e90>] ? dev_deactivate_queue.constprop.31+0x80/0x80
[ 246.140308] [<ffffffff81061db0>] run_timer_softirq+0x1f0/0x2a0
[ 246.146933] [<ffffffff81059a80>] __do_softirq+0xe0/0x220
[ 246.152976] [<ffffffff8165fedc>] call_softirq+0x1c/0x30
[ 246.158920] [<ffffffff810045f5>] do_softirq+0x55/0x90
[ 246.164670] [<ffffffff81059d35>] irq_exit+0xa5/0xb0
[ 246.170227] [<ffffffff8166062a>] smp_apic_timer_interrupt+0x4a/0x60
[ 246.177324] [<ffffffff8165f40a>] apic_timer_interrupt+0x6a/0x70
[ 246.184041] <EOI> [<ffffffff81505a1b>] ? cpuidle_enter_state+0x5b/0xe0
[ 246.191559] [<ffffffff81505a17>] ? cpuidle_enter_state+0x57/0xe0
[ 246.198374] [<ffffffff81505b5d>] cpuidle_idle_call+0xbd/0x200
[ 246.204900] [<ffffffff8100b7ae>] arch_cpu_idle+0xe/0x30
[ 246.210846] [<ffffffff810a47b0>] cpu_startup_entry+0xd0/0x250
[ 246.217371] [<ffffffff81646b47>] rest_init+0x77/0x80
[ 246.223028] [<ffffffff81d09e8e>] start_kernel+0x3ee/0x3fb
[ 246.229165] [<ffffffff81d0989f>] ? repair_env_string+0x5e/0x5e
[ 246.235787] [<ffffffff81d095a5>] x86_64_start_reservations+0x2a/0x2c
[ 246.242990] [<ffffffff81d0969f>] x86_64_start_kernel+0xf8/0xfc
[ 246.249610] ---[ end trace fb74fdef54d79039 ]---
[ 246.254807] ixgbe 0000:c2:00.0 p786p1: initiating reset due to tx timeout
[ 246.262489] ixgbe 0000:c2:00.0 p786p1: Reset adapter
Last login: Mon Nov 11 08:35:14 from 10.18.17.119
[root@(none) ~]# [ 246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5
[ 249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
[ 246.792676] ixgbe 0000:c2:00.0 p786p1: detected SFP+: 5
[ 249.231598] ixgbe 0000:c2:00.0 p786p1: NIC Link is Up 10 Gbps, Flow Control: RX/TX
(last lines keep repeating. ixgbe driver is dead until module reload.)
If the downed cpu has more vectors than are free on the remaining cpus on the
system, it is possible that some vectors are "orphaned" even though they are
assigned to a cpu. In this case, since the ixgbe driver had a watchdog, the
watchdog fired and notified that something was wrong.
This patch adds a function, check_vectors(), to compare the number of vectors
on the CPU going down and compares it to the number of vectors available on
the system. If there aren't enough vectors for the CPU to go down, an
error is returned and propogated back to userspace.
v2: Do not need to look at percpu irqs
v3: Need to check affinity to prevent counting of MSIs in IOAPIC Lowest
Priority Mode
v4: Additional changes suggested by Gong Chen.
v5/v6/v7/v8: Updated comment text
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Link: http://lkml.kernel.org/r/1389613861-3853-1-git-send-email-prarit@redhat.com
Reviewed-by: Gong Chen <gong.chen@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Yang Zhang <yang.z.zhang@Intel.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Janet Morgan <janet.morgan@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Ruiv Wang <ruiv.wang@gmail.com>
Cc: Gong Chen <gong.chen@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/include/asm/irq.h | 1
arch/x86/kernel/irq.c | 70 +++++++++++++++++++++++++++++++++++++++++++++
arch/x86/kernel/smpboot.c | 6 +++
3 files changed, 77 insertions(+)
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -25,6 +25,7 @@ extern void irq_ctx_init(int cpu);
#ifdef CONFIG_HOTPLUG_CPU
#include <linux/cpumask.h>
+extern int check_irq_vectors_for_cpu_disable(void);
extern void fixup_irqs(void);
extern void irq_force_complete_move(int);
#endif
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -249,6 +249,76 @@ void smp_kvm_posted_intr_ipi(struct pt_r
EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq);
#ifdef CONFIG_HOTPLUG_CPU
+/*
+ * This cpu is going to be removed and its vectors migrated to the remaining
+ * online cpus. Check to see if there are enough vectors in the remaining cpus.
+ * This function is protected by stop_machine().
+ */
+int check_irq_vectors_for_cpu_disable(void)
+{
+ int irq, cpu;
+ unsigned int this_cpu, vector, this_count, count;
+ struct irq_desc *desc;
+ struct irq_data *data;
+ struct cpumask affinity_new, online_new;
+
+ this_cpu = smp_processor_id();
+ cpumask_copy(&online_new, cpu_online_mask);
+ cpu_clear(this_cpu, online_new);
+
+ this_count = 0;
+ for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS; vector++) {
+ irq = __this_cpu_read(vector_irq[vector]);
+ if (irq >= 0) {
+ desc = irq_to_desc(irq);
+ data = irq_desc_get_irq_data(desc);
+ cpumask_copy(&affinity_new, data->affinity);
+ cpu_clear(this_cpu, affinity_new);
+
+ /* Do not count inactive or per-cpu irqs. */
+ if (!irq_has_action(irq) || irqd_is_per_cpu(data))
+ continue;
+
+ /*
+ * A single irq may be mapped to multiple
+ * cpu's vector_irq[] (for example IOAPIC cluster
+ * mode). In this case we have two
+ * possibilities:
+ *
+ * 1) the resulting affinity mask is empty; that is
+ * this the down'd cpu is the last cpu in the irq's
+ * affinity mask, or
+ *
+ * 2) the resulting affinity mask is no longer
+ * a subset of the online cpus but the affinity
+ * mask is not zero; that is the down'd cpu is the
+ * last online cpu in a user set affinity mask.
+ */
+ if (cpumask_empty(&affinity_new) ||
+ !cpumask_subset(&affinity_new, &online_new))
+ this_count++;
+ }
+ }
+
+ count = 0;
+ for_each_online_cpu(cpu) {
+ if (cpu == this_cpu)
+ continue;
+ for (vector = FIRST_EXTERNAL_VECTOR; vector < NR_VECTORS;
+ vector++) {
+ if (per_cpu(vector_irq, cpu)[vector] < 0)
+ count++;
+ }
+ }
+
+ if (count < this_count) {
+ pr_warn("CPU %d disable failed: CPU has %u vectors assigned and there are only %u available.\n",
+ this_cpu, this_count, count);
+ return -ERANGE;
+ }
+ return 0;
+}
+
/* A cpu has been removed from cpu_online_mask. Reset irq affinities. */
void fixup_irqs(void)
{
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1309,6 +1309,12 @@ void cpu_disable_common(void)
int native_cpu_disable(void)
{
+ int ret;
+
+ ret = check_irq_vectors_for_cpu_disable();
+ if (ret)
+ return ret;
+
clear_local_APIC();
cpu_disable_common();
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 012/104] KVM: x86: limit PIT timer frequency
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (9 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 011/104] x86: Add check for number of available vectors before CPU down Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 014/104] usb: option: add new zte 3g modem pids to option driver Greg Kroah-Hartman
` (89 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jan Kiszka, Marcelo Tosatti,
Paolo Bonzini
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marcelo Tosatti <mtosatti@redhat.com>
commit 9ed96e87c5748de4c2807ef17e81287c7304186c upstream.
Limit PIT timer frequency similarly to the limit applied by
LAPIC timer.
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kvm/i8254.c | 18 ++++++++++++++++++
arch/x86/kvm/lapic.c | 3 ---
arch/x86/kvm/x86.c | 3 +++
arch/x86/kvm/x86.h | 2 ++
4 files changed, 23 insertions(+), 3 deletions(-)
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -37,6 +37,7 @@
#include "irq.h"
#include "i8254.h"
+#include "x86.h"
#ifndef CONFIG_X86_64
#define mod_64(x, y) ((x) - (y) * div64_u64(x, y))
@@ -349,6 +350,23 @@ static void create_pit_timer(struct kvm
atomic_set(&ps->pending, 0);
ps->irq_ack = 1;
+ /*
+ * Do not allow the guest to program periodic timers with small
+ * interval, since the hrtimers are not throttled by the host
+ * scheduler.
+ */
+ if (ps->is_periodic) {
+ s64 min_period = min_timer_period_us * 1000LL;
+
+ if (ps->period < min_period) {
+ pr_info_ratelimited(
+ "kvm: requested %lld ns "
+ "i8254 timer period limited to %lld ns\n",
+ ps->period, min_period);
+ ps->period = min_period;
+ }
+ }
+
hrtimer_start(&ps->timer, ktime_add_ns(ktime_get(), interval),
HRTIMER_MODE_ABS);
}
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -71,9 +71,6 @@
#define VEC_POS(v) ((v) & (32 - 1))
#define REG_POS(v) (((v) >> 5) << 4)
-static unsigned int min_timer_period_us = 500;
-module_param(min_timer_period_us, uint, S_IRUGO | S_IWUSR);
-
static inline void apic_set_reg(struct kvm_lapic *apic, int reg_off, u32 val)
{
*((u32 *) (apic->regs + reg_off)) = val;
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -94,6 +94,9 @@ EXPORT_SYMBOL_GPL(kvm_x86_ops);
static bool ignore_msrs = 0;
module_param(ignore_msrs, bool, S_IRUGO | S_IWUSR);
+unsigned int min_timer_period_us = 500;
+module_param(min_timer_period_us, uint, S_IRUGO | S_IWUSR);
+
bool kvm_has_tsc_control;
EXPORT_SYMBOL_GPL(kvm_has_tsc_control);
u32 kvm_max_guest_tsc_khz;
--- a/arch/x86/kvm/x86.h
+++ b/arch/x86/kvm/x86.h
@@ -124,5 +124,7 @@ int kvm_write_guest_virt_system(struct x
extern u64 host_xcr0;
+extern unsigned int min_timer_period_us;
+
extern struct static_key kvm_no_apic_vcpu;
#endif
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 014/104] usb: option: add new zte 3g modem pids to option driver
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (10 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 012/104] KVM: x86: limit PIT timer frequency Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 016/104] USB: cypress_m8: fix ring-indicator detection and reporting Greg Kroah-Hartman
` (88 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jun zhang
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: =?UTF-8?q?=E5=BC=A0=E5=90=9B?= <zjn77777@163.com>
commit 4d90b819ae4c7ea8fd5e2bb7edc68c0f334be2e4 upstream.
Signed-off-by: Jun zhang <zhang.jun92@zte.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/option.c | 11 +++++++++++
1 file changed, 11 insertions(+)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1447,6 +1447,17 @@ static const struct usb_device_id option
.driver_info = (kernel_ulong_t)&net_intf3_blacklist },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff),
.driver_info = (kernel_ulong_t)&net_intf3_blacklist },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffe9, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8b, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8c, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8d, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8e, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8f, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff90, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff91, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff92, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },
/* NOTE: most ZTE CDMA devices should be driven by zte_ev, not option */
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MC2718, 0xff, 0xff, 0xff),
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 016/104] USB: cypress_m8: fix ring-indicator detection and reporting
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (11 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 014/104] usb: option: add new zte 3g modem pids to option driver Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 017/104] USB: ftdi_sio: added CS5 quirk for broken smartcard readers Greg Kroah-Hartman
` (87 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Johan Hovold <jhovold@gmail.com>
commit 440ebadeae9298d7de3d4d105342691841ec88d0 upstream.
Fix ring-indicator (RI) status-bit definition, which was defined as CTS,
effectively preventing RI-changes from being detected while reporting
false RI status.
This bug predates git.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/cypress_m8.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/serial/cypress_m8.h
+++ b/drivers/usb/serial/cypress_m8.h
@@ -63,7 +63,7 @@
#define UART_DSR 0x20 /* data set ready - flow control - device to host */
#define CONTROL_RTS 0x10 /* request to send - flow control - host to device */
#define UART_CTS 0x10 /* clear to send - flow control - device to host */
-#define UART_RI 0x10 /* ring indicator - modem - device to host */
+#define UART_RI 0x80 /* ring indicator - modem - device to host */
#define UART_CD 0x40 /* carrier detect - modem - device to host */
#define CYP_ERROR 0x08 /* received from input report - device to host */
/* Note - the below has nothing to do with the "feature report" reset */
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 017/104] USB: ftdi_sio: added CS5 quirk for broken smartcard readers
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (12 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 016/104] USB: cypress_m8: fix ring-indicator detection and reporting Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 018/104] USB: Nokia 502 is an unusual device Greg Kroah-Hartman
` (86 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Heinrich Siebmanns, Colin Leitner,
Johan Hovold
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Colin Leitner <colin.leitner@googlemail.com>
commit c1f15196ac3b541d084dc80a8fbd8a74c6a0bd44 upstream.
Genuine FTDI chips support only CS7/8. A previous fix in commit
8704211f65a2 ("USB: ftdi_sio: fixed handling of unsupported CSIZE
setting") enforced this limitation and reported it back to userspace.
However, certain types of smartcard readers depend on specific
driver behaviour that requests 0 data bits (not 5) to change into a
different operating mode if CS5 has been set.
This patch reenables this behaviour for all FTDI devices.
Tagged to be added to stable, because it affects a lot of users of
embedded systems which rely on these readers to work properly.
Reported-by: Heinrich Siebmanns <H.Siebmanns@t-online.de>
Tested-by: Heinrich Siebmanns <H.Siebmanns@t-online.de>
Signed-off-by: Colin Leitner <colin.leitner@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/serial/ftdi_sio.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -2132,10 +2132,20 @@ static void ftdi_set_termios(struct tty_
}
/*
- * All FTDI UART chips are limited to CS7/8. We won't pretend to
+ * All FTDI UART chips are limited to CS7/8. We shouldn't pretend to
* support CS5/6 and revert the CSIZE setting instead.
+ *
+ * CS5 however is used to control some smartcard readers which abuse
+ * this limitation to switch modes. Original FTDI chips fall back to
+ * eight data bits.
+ *
+ * TODO: Implement a quirk to only allow this with mentioned
+ * readers. One I know of (Argolis Smartreader V1)
+ * returns "USB smartcard server" as iInterface string.
+ * The vendor didn't bother with a custom VID/PID of
+ * course.
*/
- if ((C_CSIZE(tty) != CS8) && (C_CSIZE(tty) != CS7)) {
+ if (C_CSIZE(tty) == CS6) {
dev_warn(ddev, "requested CSIZE setting not supported\n");
termios->c_cflag &= ~CSIZE;
@@ -2182,6 +2192,9 @@ no_skip:
urb_value |= FTDI_SIO_SET_DATA_PARITY_NONE;
}
switch (cflag & CSIZE) {
+ case CS5:
+ dev_dbg(ddev, "Setting CS5 quirk\n");
+ break;
case CS7:
urb_value |= 7;
dev_dbg(ddev, "Setting CS7\n");
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 018/104] USB: Nokia 502 is an unusual device
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (13 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 017/104] USB: ftdi_sio: added CS5 quirk for broken smartcard readers Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 019/104] usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix() Greg Kroah-Hartman
` (85 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mikhail Zolotaryov
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikhail Zolotaryov <lebon@lebon.org.ua>
commit 0e16114f2db4838251fb64f3b550996ad3585890 upstream.
The USB storage operation of Nokia Asha 502 Dual SIM smartphone running Asha
Platform 1.1.1 is unreliable in respect of data consistency (i.e. transfered
files are corrupted). A similar issue is described here:
http://discussions.nokia.com/t5/Asha-and-other-Nokia-Series-30/Nokia-301-USB-transfers-and-corrupted-files/td-p/1974170
The workaround is (MAX_SECTORS_64):
rmmod usb_storage && modprobe usb_storage quirks=0421:06aa:m
The patch adds the tested device to the unusual list permanently.
Signed-off-by: Mikhail Zolotaryov <lebon@lebon.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/storage/unusual_devs.h | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -234,6 +234,13 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_MAX_SECTORS_64 ),
+/* Patch submitted by Mikhail Zolotaryov <lebon@lebon.org.ua> */
+UNUSUAL_DEV( 0x0421, 0x06aa, 0x1110, 0x1110,
+ "Nokia",
+ "502",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ US_FL_MAX_SECTORS_64 ),
+
#ifdef NO_SDDR09
UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100,
"Microtech",
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 019/104] usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix()
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (14 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 018/104] USB: Nokia 502 is an unusual device Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 020/104] USB: fix race between hub_disconnect and recursively_mark_NOTATTACHED Greg Kroah-Hartman
` (84 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jack Pham, Sarah Sharp
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jack Pham <jackp@codeaurora.org>
commit 9005355af23856c55a5538c9024355785424821b upstream.
If CONFIG_PCI is enabled, make sure xhci_cleanup_msix()
doesn't try to free a bogus PCI IRQ or dereference an invalid
pci_dev when the xHCI device is actually a platform_device.
This patch should be backported to kernels as old as 3.9, that
contain the commit 52fb61250a7a132b0cfb9f4a1060a1f3c49e5a25
"xhci-plat: Don't enable legacy PCI interrupts."
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/xhci.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -315,6 +315,9 @@ static void xhci_cleanup_msix(struct xhc
struct usb_hcd *hcd = xhci_to_hcd(xhci);
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
+ if (xhci->quirks & XHCI_PLAT)
+ return;
+
xhci_free_irq(xhci);
if (xhci->msix_entries) {
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 020/104] USB: fix race between hub_disconnect and recursively_mark_NOTATTACHED
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (15 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 019/104] usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix() Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 021/104] usb: ehci: add freescale imx28 special write register method Greg Kroah-Hartman
` (83 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alan Stern, Du, Changbin
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit 543d7784b07ffd16cc82a9cb4e1e0323fd0040f1 upstream.
There is a race in the hub driver between hub_disconnect() and
recursively_mark_NOTATTACHED(). This race can be triggered if the
driver is unbound from a device at the same time as the bus's root hub
is removed. When the race occurs, it can cause an oops:
BUG: unable to handle kernel NULL pointer dereference at 0000015c
IP: [<c16d5fb0>] recursively_mark_NOTATTACHED+0x20/0x60
Call Trace:
[<c16d5fc4>] recursively_mark_NOTATTACHED+0x34/0x60
[<c16d5fc4>] recursively_mark_NOTATTACHED+0x34/0x60
[<c16d5fc4>] recursively_mark_NOTATTACHED+0x34/0x60
[<c16d5fc4>] recursively_mark_NOTATTACHED+0x34/0x60
[<c16d6082>] usb_set_device_state+0x92/0x120
[<c16d862b>] usb_disconnect+0x2b/0x1a0
[<c16dd4c0>] usb_remove_hcd+0xb0/0x160
[<c19ca846>] ? _raw_spin_unlock_irqrestore+0x26/0x50
[<c1704efc>] ehci_mid_remove+0x1c/0x30
[<c1704f26>] ehci_mid_stop_host+0x16/0x30
[<c16f7698>] penwell_otg_work+0xd28/0x3520
[<c19c945b>] ? __schedule+0x39b/0x7f0
[<c19cdb9d>] ? sub_preempt_count+0x3d/0x50
[<c125e97d>] process_one_work+0x11d/0x3d0
[<c19c7f4d>] ? mutex_unlock+0xd/0x10
[<c125e0e5>] ? manage_workers.isra.24+0x1b5/0x270
[<c125f009>] worker_thread+0xf9/0x320
[<c19ca846>] ? _raw_spin_unlock_irqrestore+0x26/0x50
[<c125ef10>] ? rescuer_thread+0x2b0/0x2b0
[<c1264ac4>] kthread+0x94/0xa0
[<c19d0f77>] ret_from_kernel_thread+0x1b/0x28
[<c1264a30>] ? kthread_create_on_node+0xc0/0xc0
One problem is that recursively_mark_NOTATTACHED() uses the intfdata
value and hub->hdev->maxchild while hub_disconnect() is clearing them.
Another problem is that it uses hub->ports[i] while the port device is
being released.
To fix this race, we need to hold the device_state_lock while
hub_disconnect() changes the values. (Note that usb_disconnect()
and hub_port_connect_change() already acquire this lock at similar
critical times during a USB device's life cycle.) We also need to
remove the port devices after maxchild has been set to 0, instead of
before.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: "Du, Changbin" <changbinx.du@intel.com>
Tested-by: "Du, Changbin" <changbinx.du@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/core/hub.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1605,7 +1605,7 @@ static void hub_disconnect(struct usb_in
{
struct usb_hub *hub = usb_get_intfdata(intf);
struct usb_device *hdev = interface_to_usbdev(intf);
- int i;
+ int port1;
/* Take the hub off the event list and don't let it be added again */
spin_lock_irq(&hub_event_lock);
@@ -1620,11 +1620,15 @@ static void hub_disconnect(struct usb_in
hub->error = 0;
hub_quiesce(hub, HUB_DISCONNECT);
- usb_set_intfdata (intf, NULL);
+ /* Avoid races with recursively_mark_NOTATTACHED() */
+ spin_lock_irq(&device_state_lock);
+ port1 = hdev->maxchild;
+ hdev->maxchild = 0;
+ usb_set_intfdata(intf, NULL);
+ spin_unlock_irq(&device_state_lock);
- for (i = 0; i < hdev->maxchild; i++)
- usb_hub_remove_port_device(hub, i + 1);
- hub->hdev->maxchild = 0;
+ for (; port1 > 0; --port1)
+ usb_hub_remove_port_device(hub, port1);
if (hub->hdev->speed == USB_SPEED_HIGH)
highspeed_hubs--;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 021/104] usb: ehci: add freescale imx28 special write register method
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (16 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 020/104] USB: fix race between hub_disconnect and recursively_mark_NOTATTACHED Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 022/104] rtlwifi: rtl8192cu: Add new device ID Greg Kroah-Hartman
` (82 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, robert.hodaszi, Peter Chen,
Alan Stern, Marc Kleine-Budde
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Chen <peter.chen@freescale.com>
commit feffe09f510c475df082546815f9e4a573f6a233 upstream.
According to Freescale imx28 Errata, "ENGR119653 USB: ARM to USB
register error issue", All USB register write operations must
use the ARM SWP instruction. So, we implement a special ehci_write
for imx28.
Discussion for it at below:
http://marc.info/?l=linux-usb&m=137996395529294&w=2
Without this patcheset, imx28 works unstable at high AHB bus loading.
If the bus loading is not high, the imx28 usb can work well at the most
of time. There is a IC errata for this problem, usually, we consider
IC errata is a problem not a new feature, and this workaround is needed
for that, so we need to add them to stable tree 3.11+.
Cc: robert.hodaszi@digi.com
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/host/ehci.h | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -200,6 +200,7 @@ struct ehci_hcd { /* one per controlle
unsigned has_synopsys_hc_bug:1; /* Synopsys HC */
unsigned frame_index_bug:1; /* MosChip (AKA NetMos) */
unsigned need_oc_pp_cycle:1; /* MPC834X port power */
+ unsigned imx28_write_fix:1; /* For Freescale i.MX28 */
/* required for usb32 quirk */
#define OHCI_CTRL_HCFS (3 << 6)
@@ -675,6 +676,18 @@ static inline unsigned int ehci_readl(co
#endif
}
+#ifdef CONFIG_SOC_IMX28
+static inline void imx28_ehci_writel(const unsigned int val,
+ volatile __u32 __iomem *addr)
+{
+ __asm__ ("swp %0, %0, [%1]" : : "r"(val), "r"(addr));
+}
+#else
+static inline void imx28_ehci_writel(const unsigned int val,
+ volatile __u32 __iomem *addr)
+{
+}
+#endif
static inline void ehci_writel(const struct ehci_hcd *ehci,
const unsigned int val, __u32 __iomem *regs)
{
@@ -683,7 +696,10 @@ static inline void ehci_writel(const str
writel_be(val, regs) :
writel(val, regs);
#else
- writel(val, regs);
+ if (ehci->imx28_write_fix)
+ imx28_ehci_writel(val, regs);
+ else
+ writel(val, regs);
#endif
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 022/104] rtlwifi: rtl8192cu: Add new device ID
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (17 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 021/104] usb: ehci: add freescale imx28 special write register method Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 023/104] rtlwifi: Update beacon statistics for USB driver Greg Kroah-Hartman
` (81 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jan Prinsloo, Larry Finger,
John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit f87f960b2fb802f26ee3b00c19320e57a9c583ff upstream.
Reported-by: Jan Prinsloo <janroot@gmail.com>
Tested-by: Jan Prinsloo <janroot@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
@@ -306,6 +306,7 @@ static struct usb_device_id rtl8192c_usb
{RTL_USB_DEVICE(0x0bda, 0x5088, rtl92cu_hal_cfg)}, /*Thinkware-CC&C*/
{RTL_USB_DEVICE(0x0df6, 0x0052, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
{RTL_USB_DEVICE(0x0df6, 0x005c, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
+ {RTL_USB_DEVICE(0x0df6, 0x0077, rtl92cu_hal_cfg)}, /*Sitecom-WLA2100V2*/
{RTL_USB_DEVICE(0x0eb0, 0x9071, rtl92cu_hal_cfg)}, /*NO Brand - Etop*/
{RTL_USB_DEVICE(0x4856, 0x0091, rtl92cu_hal_cfg)}, /*NetweeN - Feixun*/
/* HP - Lite-On ,8188CUS Slim Combo */
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 023/104] rtlwifi: Update beacon statistics for USB driver
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (18 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 022/104] rtlwifi: rtl8192cu: Add new device ID Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 024/104] rtlwifi: rtl8192c: Prevent reconnect attempts if not connected Greg Kroah-Hartman
` (80 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 65b9cc97c6852fae19dc5c7745e9abc8dd380aad upstream.
The USB drivers were not updating the beacon statistics, which led to
false beacon loss indications.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/usb.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -477,6 +477,8 @@ static void _rtl_usb_rx_process_agg(stru
if (unicast)
rtlpriv->link_info.num_rx_inperiod++;
}
+ /* static bcn for roaming */
+ rtl_beacon_statistic(hw, skb);
}
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 024/104] rtlwifi: rtl8192c: Prevent reconnect attempts if not connected
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (19 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 023/104] rtlwifi: Update beacon statistics for USB driver Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 025/104] rtlwifi: rtl8192cu: Add new firmware Greg Kroah-Hartman
` (79 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 8fd77aec1a9d6f4328fc0244f21932114e066df3 upstream.
This driver has a watchdog timer that attempts to reconnect when beacon frames
are not seen for 6 seconds. This patch disables that reconnect whenever the
device has never been connected.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/base.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1427,7 +1427,8 @@ void rtl_watchdog_wq_callback(void *data
/* if we can't recv beacon for 6s, we should
* reconnect this AP
*/
- if (rtlpriv->link_info.roam_times >= 3) {
+ if ((rtlpriv->link_info.roam_times >= 3) &&
+ !is_zero_ether_addr(rtlpriv->mac80211.bssid)) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
"AP off, try to reconnect now\n");
rtlpriv->link_info.roam_times = 0;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 025/104] rtlwifi: rtl8192cu: Add new firmware
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (20 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 024/104] rtlwifi: rtl8192c: Prevent reconnect attempts if not connected Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 026/104] rtlwifi: Redo register save locations Greg Kroah-Hartman
` (78 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 62009b7f12793c932aaba0df946b04cb4a77d022 upstream.
Vendor driver rtl8188C_8192C_8192D_usb_linux_v3.4.2_3727.20120404 introduced
new firmware for these chips. The code try for the new file, and fall back to
the original firmware if the new file is not available.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/core.c | 10 ++++++++++
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 16 +++++++++++++---
drivers/net/wireless/rtlwifi/wifi.h | 1 +
3 files changed, 24 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -46,10 +46,20 @@ void rtl_fw_cb(const struct firmware *fi
"Firmware callback routine entered!\n");
complete(&rtlpriv->firmware_loading_complete);
if (!firmware) {
+ if (rtlpriv->cfg->alt_fw_name) {
+ err = request_firmware(&firmware,
+ rtlpriv->cfg->alt_fw_name,
+ rtlpriv->io.dev);
+ pr_info("Loading alternative firmware %s\n",
+ rtlpriv->cfg->alt_fw_name);
+ if (!err)
+ goto found_alt;
+ }
pr_err("Firmware %s not available\n", rtlpriv->cfg->fw_name);
rtlpriv->max_fw_size = 0;
return;
}
+found_alt:
if (firmware->size > rtlpriv->max_fw_size) {
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,
"Firmware is too big!\n");
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c
@@ -49,6 +49,9 @@ MODULE_AUTHOR("Larry Finger <Larry.Finge
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Realtek 8192C/8188C 802.11n USB wireless");
MODULE_FIRMWARE("rtlwifi/rtl8192cufw.bin");
+MODULE_FIRMWARE("rtlwifi/rtl8192cufw_A.bin");
+MODULE_FIRMWARE("rtlwifi/rtl8192cufw_B.bin");
+MODULE_FIRMWARE("rtlwifi/rtl8192cufw_TMSC.bin");
static int rtl92cu_init_sw_vars(struct ieee80211_hw *hw)
{
@@ -68,14 +71,21 @@ static int rtl92cu_init_sw_vars(struct i
"Can't alloc buffer for fw\n");
return 1;
}
-
+ if (IS_VENDOR_UMC_A_CUT(rtlpriv->rtlhal.version) &&
+ !IS_92C_SERIAL(rtlpriv->rtlhal.version)) {
+ rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_A.bin";
+ } else if (IS_81xxC_VENDOR_UMC_B_CUT(rtlpriv->rtlhal.version)) {
+ rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_B.bin";
+ } else {
+ rtlpriv->cfg->fw_name = "rtlwifi/rtl8192cufw_TMSC.bin";
+ }
+ /* provide name of alternative file */
+ rtlpriv->cfg->alt_fw_name = "rtlwifi/rtl8192cufw.bin";
pr_info("Loading firmware %s\n", rtlpriv->cfg->fw_name);
rtlpriv->max_fw_size = 0x4000;
err = request_firmware_nowait(THIS_MODULE, 1,
rtlpriv->cfg->fw_name, rtlpriv->io.dev,
GFP_KERNEL, hw, rtl_fw_cb);
-
-
return err;
}
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1806,6 +1806,7 @@ struct rtl_hal_cfg {
bool write_readback;
char *name;
char *fw_name;
+ char *alt_fw_name;
struct rtl_hal_ops *ops;
struct rtl_mod_params *mod_params;
struct rtl_hal_usbint_cfg *usb_interface_cfg;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 026/104] rtlwifi: Redo register save locations
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (21 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 025/104] rtlwifi: rtl8192cu: Add new firmware Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 027/104] rtlwifi: Set the link state Greg Kroah-Hartman
` (77 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit b9a758a8c905fc59e783ae91ad645452d877ea88 upstream.
The initial USB driver did not use some register save locations in the
private data storage. To save some memory, a union was used to overlay these
variables with USB I/O components. In an update of the gain-control code,
these register save locations are now needed for USB drivers.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/wifi.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1035,6 +1035,7 @@ struct rtl_ht_agg {
struct rssi_sta {
long undec_sm_pwdb;
+ long undec_sm_cck;
};
struct rtl_tid_data {
@@ -1325,8 +1326,10 @@ struct fast_ant_training {
struct rtl_dm {
/*PHY status for Dynamic Management */
long entry_min_undec_sm_pwdb;
+ long undec_sm_cck;
long undec_sm_pwdb; /*out dm */
long entry_max_undec_sm_pwdb;
+ s32 ofdm_pkt_cnt;
bool dm_initialgain_enable;
bool dynamic_txpower_enable;
bool current_turbo_edca;
@@ -1341,6 +1344,7 @@ struct rtl_dm {
bool inform_fw_driverctrldm;
bool current_mrc_switch;
u8 txpowercount;
+ u8 powerindex_backup[6];
u8 thermalvalue_rxgain;
u8 thermalvalue_iqk;
@@ -1352,7 +1356,9 @@ struct rtl_dm {
bool done_txpower;
u8 dynamic_txhighpower_lvl; /*Tx high power level */
u8 dm_flag; /*Indicate each dynamic mechanism's status. */
+ u8 dm_flag_tmp;
u8 dm_type;
+ u8 dm_rssi_sel;
u8 txpower_track_control;
bool interrupt_migration;
bool disable_tx_int;
@@ -1951,6 +1957,7 @@ struct dig_t {
u8 pre_ccastate;
u8 cur_ccasate;
u8 large_fa_hit;
+ u8 dig_dynamic_min;
u8 forbidden_igi;
u8 dig_state;
u8 dig_highpwrstate;
@@ -2031,22 +2038,15 @@ struct rtl_priv {
struct dig_t dm_digtable;
struct ps_t dm_pstable;
- /* section shared by individual drivers */
- union {
- struct { /* data buffer pointer for USB reads */
- __le32 *usb_data;
- int usb_data_index;
- bool initialized;
- };
- struct { /* section for 8723ae */
- bool reg_init; /* true if regs saved */
- u32 reg_874;
- u32 reg_c70;
- u32 reg_85c;
- u32 reg_a74;
- bool bt_operation_on;
- };
- };
+ u32 reg_874;
+ u32 reg_c70;
+ u32 reg_85c;
+ u32 reg_a74;
+ bool reg_init; /* true if regs saved */
+ bool bt_operation_on;
+ __le32 *usb_data;
+ int usb_data_index;
+ bool initialized;
bool enter_ps; /* true when entering PS */
u8 rate_mask[5];
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 027/104] rtlwifi: Set the link state
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (22 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 026/104] rtlwifi: Redo register save locations Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 028/104] rtlwifi: rtl8192c: Add new definitions in the dm_common header Greg Kroah-Hartman
` (76 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 619ce76f8bb850b57032501a39f26aa6c6731c70 upstream.
The present code fails to set the linked state when an interface is
added.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/core.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -194,6 +194,7 @@ static int rtl_op_add_interface(struct i
rtlpriv->cfg->maps
[RTL_IBSS_INT_MASKS]);
}
+ mac->link_state = MAC80211_LINKED;
break;
case NL80211_IFTYPE_ADHOC:
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 028/104] rtlwifi: rtl8192c: Add new definitions in the dm_common header
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (23 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 027/104] rtlwifi: Set the link state Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 029/104] rtlwifi: Increase the RX queue length for USB drivers Greg Kroah-Hartman
` (75 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit c908c74e005de780fddbe8cb6fcd44803f5d4b74 upstream.
Changes in the gain-control mechanism will require some changes in the header.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.h
@@ -91,6 +91,17 @@
#define TX_POWER_NEAR_FIELD_THRESH_LVL2 74
#define TX_POWER_NEAR_FIELD_THRESH_LVL1 67
+#define DYNAMIC_FUNC_DISABLE 0x0
+#define DYNAMIC_FUNC_DIG BIT(0)
+#define DYNAMIC_FUNC_HP BIT(1)
+#define DYNAMIC_FUNC_SS BIT(2) /*Tx Power Tracking*/
+#define DYNAMIC_FUNC_BT BIT(3)
+#define DYNAMIC_FUNC_ANT_DIV BIT(4)
+
+#define RSSI_CCK 0
+#define RSSI_OFDM 1
+#define RSSI_DEFAULT 2
+
struct swat_t {
u8 failure_cnt;
u8 try_flag;
@@ -167,5 +178,8 @@ void rtl92c_phy_lc_calibrate(struct ieee
void rtl92c_phy_iq_calibrate(struct ieee80211_hw *hw, bool recovery);
void rtl92c_dm_dynamic_txpower(struct ieee80211_hw *hw);
void rtl92c_dm_bt_coexist(struct ieee80211_hw *hw);
+void dm_savepowerindex(struct ieee80211_hw *hw);
+void dm_writepowerindex(struct ieee80211_hw *hw, u8 value);
+void dm_restorepowerindex(struct ieee80211_hw *hw);
#endif
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 029/104] rtlwifi: Increase the RX queue length for USB drivers
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (24 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 028/104] rtlwifi: rtl8192c: Add new definitions in the dm_common header Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 030/104] rtlwifi: rtl8192c: Add routines to save/restore power index registers Greg Kroah-Hartman
` (74 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit dc6405712268fe514d3dd89aa936c4397b0871b9 upstream.
The current number of RX buffers queued is 32, which is too small under
heavy load. That number is doubled.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -550,7 +550,7 @@ static void _rtl_rx_pre_process(struct i
}
}
-#define __RX_SKB_MAX_QUEUED 32
+#define __RX_SKB_MAX_QUEUED 64
static void _rtl_rx_work(unsigned long param)
{
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 030/104] rtlwifi: rtl8192c: Add routines to save/restore power index registers
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (25 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 029/104] rtlwifi: Increase the RX queue length for USB drivers Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 031/104] rtlwifi: rtl8192cu: Update the " Greg Kroah-Hartman
` (73 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 97204e93f01868eeba6ae5c4f3270f32905bb418 upstream.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
--- a/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
@@ -158,6 +158,42 @@ static const u8 cckswing_table_ch14[CCK_
{0x09, 0x08, 0x07, 0x04, 0x00, 0x00, 0x00, 0x00}
};
+static u32 power_index_reg[6] = {0xc90, 0xc91, 0xc92, 0xc98, 0xc99, 0xc9a};
+
+void dm_restorepowerindex(struct ieee80211_hw *hw)
+{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ u8 index;
+
+ for (index = 0; index < 6; index++)
+ rtl_write_byte(rtlpriv, power_index_reg[index],
+ rtlpriv->dm.powerindex_backup[index]);
+}
+EXPORT_SYMBOL_GPL(dm_restorepowerindex);
+
+void dm_writepowerindex(struct ieee80211_hw *hw, u8 value)
+{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ u8 index;
+
+ for (index = 0; index < 6; index++)
+ rtl_write_byte(rtlpriv, power_index_reg[index], value);
+}
+EXPORT_SYMBOL_GPL(dm_writepowerindex);
+
+void dm_savepowerindex(struct ieee80211_hw *hw)
+{
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+ u8 index;
+ u8 tmp;
+
+ for (index = 0; index < 6; index++) {
+ tmp = rtl_read_byte(rtlpriv, power_index_reg[index]);
+ rtlpriv->dm.powerindex_backup[index] = tmp;
+ }
+}
+EXPORT_SYMBOL_GPL(dm_savepowerindex);
+
static void rtl92c_dm_diginit(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 031/104] rtlwifi: rtl8192cu: Update the power index registers
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (26 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 030/104] rtlwifi: rtl8192c: Add routines to save/restore power index registers Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 032/104] rtlwifi: rtl8192cu: Fix some code in RF handling Greg Kroah-Hartman
` (72 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 9806eacf5de27ab01d680c5d75c92a3a89734e4f upstream.
This patch uses the newly introduced power index register routines.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/rtl8192cu/dm.c | 9 +++++++++
drivers/net/wireless/rtlwifi/rtl8192cu/dm.h | 3 +++
2 files changed, 12 insertions(+)
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/dm.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/dm.c
@@ -101,6 +101,15 @@ void rtl92cu_dm_dynamic_txpower(struct i
"PHY_SetTxPowerLevel8192S() Channel = %d\n",
rtlphy->current_channel);
rtl92c_phy_set_txpower_level(hw, rtlphy->current_channel);
+ if (rtlpriv->dm.dynamic_txhighpower_lvl ==
+ TXHIGHPWRLEVEL_NORMAL)
+ dm_restorepowerindex(hw);
+ else if (rtlpriv->dm.dynamic_txhighpower_lvl ==
+ TXHIGHPWRLEVEL_LEVEL1)
+ dm_writepowerindex(hw, 0x14);
+ else if (rtlpriv->dm.dynamic_txhighpower_lvl ==
+ TXHIGHPWRLEVEL_LEVEL2)
+ dm_writepowerindex(hw, 0x10);
}
rtlpriv->dm.last_dtp_lvl = rtlpriv->dm.dynamic_txhighpower_lvl;
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/dm.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/dm.h
@@ -30,3 +30,6 @@
#include "../rtl8192ce/dm.h"
void rtl92cu_dm_dynamic_txpower(struct ieee80211_hw *hw);
+void dm_savepowerindex(struct ieee80211_hw *hw);
+void dm_writepowerindex(struct ieee80211_hw *hw, u8 value);
+void dm_restorepowerindex(struct ieee80211_hw *hw);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 032/104] rtlwifi: rtl8192cu: Fix some code in RF handling
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (27 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 031/104] rtlwifi: rtl8192cu: Update the " Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 033/104] rtlwifi: Add missing code to PWDB statics routine Greg Kroah-Hartman
` (71 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit e9b0784bb9de3152e787ee779868c626b137fb3b upstream.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 29 +++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c
@@ -85,17 +85,15 @@ void rtl92cu_phy_rf6052_set_cck_txpower(
if (mac->act_scanning) {
tx_agc[RF90_PATH_A] = 0x3f3f3f3f;
tx_agc[RF90_PATH_B] = 0x3f3f3f3f;
- if (turbo_scanoff) {
- for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
- tx_agc[idx1] = ppowerlevel[idx1] |
- (ppowerlevel[idx1] << 8) |
- (ppowerlevel[idx1] << 16) |
- (ppowerlevel[idx1] << 24);
- if (rtlhal->interface == INTF_USB) {
- if (tx_agc[idx1] > 0x20 &&
- rtlefuse->external_pa)
- tx_agc[idx1] = 0x20;
- }
+ for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
+ tx_agc[idx1] = ppowerlevel[idx1] |
+ (ppowerlevel[idx1] << 8) |
+ (ppowerlevel[idx1] << 16) |
+ (ppowerlevel[idx1] << 24);
+ if (rtlhal->interface == INTF_USB) {
+ if (tx_agc[idx1] > 0x20 &&
+ rtlefuse->external_pa)
+ tx_agc[idx1] = 0x20;
}
}
} else {
@@ -107,7 +105,7 @@ void rtl92cu_phy_rf6052_set_cck_txpower(
TXHIGHPWRLEVEL_LEVEL2) {
tx_agc[RF90_PATH_A] = 0x00000000;
tx_agc[RF90_PATH_B] = 0x00000000;
- } else{
+ } else {
for (idx1 = RF90_PATH_A; idx1 <= RF90_PATH_B; idx1++) {
tx_agc[idx1] = ppowerlevel[idx1] |
(ppowerlevel[idx1] << 8) |
@@ -373,7 +371,12 @@ static void _rtl92c_write_ofdm_power_reg
regoffset == RTXAGC_B_MCS07_MCS04)
regoffset = 0xc98;
for (i = 0; i < 3; i++) {
- writeVal = (writeVal > 6) ? (writeVal - 6) : 0;
+ if (i != 2)
+ writeVal = (writeVal > 8) ?
+ (writeVal - 8) : 0;
+ else
+ writeVal = (writeVal > 6) ?
+ (writeVal - 6) : 0;
rtl_write_byte(rtlpriv, (u32)(regoffset + i),
(u8)writeVal);
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 033/104] rtlwifi: Add missing code to PWDB statics routine
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (28 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 032/104] rtlwifi: rtl8192cu: Fix some code in RF handling Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 034/104] rtlwifi: rtl8188ee: Fix typo in code Greg Kroah-Hartman
` (70 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit d82403a9f407217b6aed5260aa92a120e8e98310 upstream.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/stats.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- a/drivers/net/wireless/rtlwifi/stats.c
+++ b/drivers/net/wireless/rtlwifi/stats.c
@@ -176,6 +176,7 @@ static void rtl_process_pwdb(struct ieee
struct rtl_sta_info *drv_priv = NULL;
struct ieee80211_sta *sta = NULL;
long undec_sm_pwdb;
+ long undec_sm_cck;
rcu_read_lock();
if (rtlpriv->mac80211.opmode != NL80211_IFTYPE_STATION)
@@ -185,12 +186,16 @@ static void rtl_process_pwdb(struct ieee
if (sta) {
drv_priv = (struct rtl_sta_info *) sta->drv_priv;
undec_sm_pwdb = drv_priv->rssi_stat.undec_sm_pwdb;
+ undec_sm_cck = drv_priv->rssi_stat.undec_sm_cck;
} else {
undec_sm_pwdb = rtlpriv->dm.undec_sm_pwdb;
+ undec_sm_cck = rtlpriv->dm.undec_sm_cck;
}
if (undec_sm_pwdb < 0)
undec_sm_pwdb = pstatus->rx_pwdb_all;
+ if (undec_sm_cck < 0)
+ undec_sm_cck = pstatus->rx_pwdb_all;
if (pstatus->rx_pwdb_all > (u32) undec_sm_pwdb) {
undec_sm_pwdb = (((undec_sm_pwdb) *
(RX_SMOOTH_FACTOR - 1)) +
@@ -200,6 +205,15 @@ static void rtl_process_pwdb(struct ieee
undec_sm_pwdb = (((undec_sm_pwdb) * (RX_SMOOTH_FACTOR - 1)) +
(pstatus->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
}
+ if (pstatus->rx_pwdb_all > (u32) undec_sm_cck) {
+ undec_sm_cck = (((undec_sm_pwdb) *
+ (RX_SMOOTH_FACTOR - 1)) +
+ (pstatus->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
+ undec_sm_cck = undec_sm_cck + 1;
+ } else {
+ undec_sm_pwdb = (((undec_sm_cck) * (RX_SMOOTH_FACTOR - 1)) +
+ (pstatus->rx_pwdb_all)) / (RX_SMOOTH_FACTOR);
+ }
if (sta) {
drv_priv->rssi_stat.undec_sm_pwdb = undec_sm_pwdb;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 034/104] rtlwifi: rtl8188ee: Fix typo in code
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (29 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 033/104] rtlwifi: Add missing code to PWDB statics routine Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 035/104] mwifiex: add missing endian conversion for fw_tsf Greg Kroah-Hartman
` (69 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Larry Finger, David Binderman,
John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit f699273d6a624266ebc9198774f06ee64a3847a1 upstream.
The static analyser "cppcheck" shows the following typo:
drivers/net/wireless/rtlwifi/rtl8188ee/dm.c:1081]: (style) Same expression on both sides of '!='.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: David Binderman <dcb314@hotmail.com>
Cc: David Binderman <dcb314@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/rtlwifi/rtl8188ee/dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/dm.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/dm.c
@@ -1078,7 +1078,7 @@ static void rtl88e_dm_txpower_tracking_c
rtldm->swing_flag_ofdm = true;
}
- if (rtldm->swing_idx_cck != rtldm->swing_idx_cck) {
+ if (rtldm->swing_idx_cck_cur != rtldm->swing_idx_cck) {
rtldm->swing_idx_cck_cur = rtldm->swing_idx_cck;
rtldm->swing_flag_cck = true;
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 035/104] mwifiex: add missing endian conversion for fw_tsf
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (30 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 034/104] rtlwifi: rtl8188ee: Fix typo in code Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 036/104] mwifiex: fix wrong 11ac bits setting in fw_cap_info Greg Kroah-Hartman
` (68 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Amitkumar Karwar, Bing Zhao,
John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Amitkumar Karwar <akarwar@marvell.com>
commit 9795229752c31da0c5f8a7dc4c827665327b52f9 upstream.
It is u64 data received from firmware. Little endian to cpu
conversion is required here.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/mwifiex/scan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1622,7 +1622,7 @@ int mwifiex_ret_802_11_scan(struct mwifi
const u8 *ie_buf;
size_t ie_len;
u16 channel = 0;
- u64 fw_tsf = 0;
+ __le64 fw_tsf = 0;
u16 beacon_size = 0;
u32 curr_bcn_bytes;
u32 freq;
@@ -1749,7 +1749,7 @@ int mwifiex_ret_802_11_scan(struct mwifi
ie_buf, ie_len, rssi, GFP_KERNEL);
bss_priv = (struct mwifiex_bss_priv *)bss->priv;
bss_priv->band = band;
- bss_priv->fw_tsf = fw_tsf;
+ bss_priv->fw_tsf = le64_to_cpu(fw_tsf);
if (priv->media_connected &&
!memcmp(bssid,
priv->curr_bss_params.bss_descriptor
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 036/104] mwifiex: fix wrong 11ac bits setting in fw_cap_info
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (31 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 035/104] mwifiex: add missing endian conversion for fw_tsf Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 037/104] iwlwifi: mvm: fix missing cleanup in .start() error path Greg Kroah-Hartman
` (67 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Bing Zhao, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bing Zhao <bzhao@marvell.com>
commit 1e202242ee1432d68a8bea4919b2ae0ef19d9e06 upstream.
bit 14 is actually reserved and bit 12 & 13 should be used for
11ac capability in fw_cap_info.
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/mwifiex/fw.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -228,7 +228,7 @@ enum MWIFIEX_802_11_PRIVACY_FILTER {
/* HW_SPEC fw_cap_info */
-#define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & (BIT(13)|BIT(14)))
+#define ISSUPP_11ACENABLED(fw_cap_info) (fw_cap_info & (BIT(12)|BIT(13)))
#define GET_VHTCAP_CHWDSET(vht_cap_info) ((vht_cap_info >> 2) & 0x3)
#define GET_VHTNSSMCS(mcs_mapset, nss) ((mcs_mapset >> (2 * (nss - 1))) & 0x3)
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 037/104] iwlwifi: mvm: fix missing cleanup in .start() error path
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (32 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 036/104] mwifiex: fix wrong 11ac bits setting in fw_cap_info Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 038/104] b43: Fix lockdep splat Greg Kroah-Hartman
` (66 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Eliad Peller, Emmanuel Grumbach
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eliad Peller <eliadx.peller@intel.com>
commit 91b0d1198417cf4fd9a7bd4138b6909f0b359099 upstream.
Cleanup of iwl_mvm_leds was missing in case of error,
resulting in the following warning:
WARNING: at lib/kobject.c:196 kobject_add_internal+0x1f4/0x210()
kobject_add_internal failed for phy0-led with -EEXIST, don't try to register things with the same name in the same directory.
which prevents further reloads of the driver.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/iwlwifi/mvm/ops.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wireless/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/iwlwifi/mvm/ops.c
@@ -424,6 +424,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *
out_unregister:
ieee80211_unregister_hw(mvm->hw);
+ iwl_mvm_leds_exit(mvm);
out_free:
iwl_phy_db_free(mvm->phy_db);
kfree(mvm->scan_cmd);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 038/104] b43: Fix lockdep splat
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (33 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 037/104] iwlwifi: mvm: fix missing cleanup in .start() error path Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 039/104] b43: Fix unload oops if firmware is not available Greg Kroah-Hartman
` (65 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, yury, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 09164043f63c947a49797750a09ca1cd7c31108e upstream.
In https://bugzilla.kernel.org/show_bug.cgi?id=67561, a locking dependency is reported
when b43 is used with hostapd, and rfkill is used to kill the radio output.
The lockdep splat (in part) is as follows:
======================================================
[ INFO: possible circular locking dependency detected ]
3.12.0 #1 Not tainted
-------------------------------------------------------
rfkill/10040 is trying to acquire lock:
(rtnl_mutex){+.+.+.}, at: [<ffffffff8146f282>] rtnl_lock+0x12/0x20
but task is already holding lock:
(rfkill_global_mutex){+.+.+.}, at: [<ffffffffa04832ca>] rfkill_fop_write+0x6a/0x170 [rfkill]
--snip--
Chain exists of:
rtnl_mutex --> misc_mtx --> rfkill_global_mutex
The fix is to move the initialization of the hardware random number generator
outside the code range covered by the rtnl_mutex.
Reported-by: yury <urykhy@gmail.com>
Tested-by: yury <urykhy@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/b43/main.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2422,6 +2422,7 @@ error:
static int b43_one_core_attach(struct b43_bus_dev *dev, struct b43_wl *wl);
static void b43_one_core_detach(struct b43_bus_dev *dev);
+static int b43_rng_init(struct b43_wl *wl);
static void b43_request_firmware(struct work_struct *work)
{
@@ -2473,6 +2474,10 @@ start_ieee80211:
goto err_one_core_detach;
wl->hw_registred = true;
b43_leds_register(wl->current_dev);
+
+ /* Register HW RNG driver */
+ b43_rng_init(wl);
+
goto out;
err_one_core_detach:
@@ -4634,9 +4639,6 @@ static void b43_wireless_core_exit(struc
if (!dev || b43_status(dev) != B43_STAT_INITIALIZED)
return;
- /* Unregister HW RNG driver */
- b43_rng_exit(dev->wl);
-
b43_set_status(dev, B43_STAT_UNINIT);
/* Stop the microcode PSM. */
@@ -4779,9 +4781,6 @@ static int b43_wireless_core_init(struct
b43_set_status(dev, B43_STAT_INITIALIZED);
- /* Register HW RNG driver */
- b43_rng_init(dev->wl);
-
out:
return err;
@@ -5442,6 +5441,9 @@ static void b43_bcma_remove(struct bcma_
b43_one_core_detach(wldev->dev);
+ /* Unregister HW RNG driver */
+ b43_rng_exit(wl);
+
b43_leds_unregister(wl);
ieee80211_free_hw(wl->hw);
@@ -5519,6 +5521,9 @@ static void b43_ssb_remove(struct ssb_de
b43_one_core_detach(dev);
+ /* Unregister HW RNG driver */
+ b43_rng_exit(wl);
+
if (list_empty(&wl->devlist)) {
b43_leds_unregister(wl);
/* Last core on the chip unregistered.
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 039/104] b43: Fix unload oops if firmware is not available
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (34 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 038/104] b43: Fix lockdep splat Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 040/104] b43legacy: " Greg Kroah-Hartman
` (64 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 0673effd41dba323d6a280ef37b5ef29f3f5a653 upstream.
The asyncronous firmware load uses a completion struct to hold firmware
processing until the user-space routines are up and running. There is.
however, a problem in that the waiter is nevered canceled during teardown.
As a result, unloading the driver when firmware is not available causes an oops.
To be able to access the completion structure at teardown, it had to be moved
into the b43_wldev structure.
This patch also fixes a typo in a comment.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/b43/b43.h | 4 ++--
drivers/net/wireless/b43/main.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -731,8 +731,6 @@ enum b43_firmware_file_type {
struct b43_request_fw_context {
/* The device we are requesting the fw for. */
struct b43_wldev *dev;
- /* a completion event structure needed if this call is asynchronous */
- struct completion fw_load_complete;
/* a pointer to the firmware object */
const struct firmware *blob;
/* The type of firmware to request. */
@@ -809,6 +807,8 @@ enum {
struct b43_wldev {
struct b43_bus_dev *dev;
struct b43_wl *wl;
+ /* a completion event structure needed if this call is asynchronous */
+ struct completion fw_load_complete;
/* The device initialization status.
* Use b43_status() to query. */
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2068,6 +2068,7 @@ void b43_do_release_fw(struct b43_firmwa
static void b43_release_firmware(struct b43_wldev *dev)
{
+ complete(&dev->fw_load_complete);
b43_do_release_fw(&dev->fw.ucode);
b43_do_release_fw(&dev->fw.pcm);
b43_do_release_fw(&dev->fw.initvals);
@@ -2093,7 +2094,7 @@ static void b43_fw_cb(const struct firmw
struct b43_request_fw_context *ctx = context;
ctx->blob = firmware;
- complete(&ctx->fw_load_complete);
+ complete(&ctx->dev->fw_load_complete);
}
int b43_do_request_fw(struct b43_request_fw_context *ctx,
@@ -2140,7 +2141,7 @@ int b43_do_request_fw(struct b43_request
}
if (async) {
/* do this part asynchronously */
- init_completion(&ctx->fw_load_complete);
+ init_completion(&ctx->dev->fw_load_complete);
err = request_firmware_nowait(THIS_MODULE, 1, ctx->fwname,
ctx->dev->dev->dev, GFP_KERNEL,
ctx, b43_fw_cb);
@@ -2148,12 +2149,11 @@ int b43_do_request_fw(struct b43_request
pr_err("Unable to load firmware\n");
return err;
}
- /* stall here until fw ready */
- wait_for_completion(&ctx->fw_load_complete);
+ wait_for_completion(&ctx->dev->fw_load_complete);
if (ctx->blob)
goto fw_ready;
/* On some ARM systems, the async request will fail, but the next sync
- * request works. For this reason, we dall through here
+ * request works. For this reason, we fall through here
*/
}
err = request_firmware(&ctx->blob, ctx->fwname,
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 040/104] b43legacy: Fix unload oops if firmware is not available
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (35 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 039/104] b43: Fix unload oops if firmware is not available Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 041/104] b43: fix the wrong assignment of status.freq in b43_rx() Greg Kroah-Hartman
` (63 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 452028665312672c6ba9e16a19248ee00ead9400 upstream.
The asyncronous firmware load uses a completion struct to hold firmware
processing until the user-space routines are up and running. There is.
however, a problem in that the waiter is nevered canceled during teardown.
As a result, unloading the driver when firmware is not available causes an oops.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/b43legacy/main.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -3919,6 +3919,7 @@ static void b43legacy_remove(struct ssb_
* as the ieee80211 unreg will destroy the workqueue. */
cancel_work_sync(&wldev->restart_work);
cancel_work_sync(&wl->firmware_load);
+ complete(&wldev->fw_load_complete);
B43legacy_WARN_ON(!wl);
if (!wldev->fw.ucode)
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 041/104] b43: fix the wrong assignment of status.freq in b43_rx()
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (36 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 040/104] b43legacy: " Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 042/104] staging: r8712u: Set device type to wlan Greg Kroah-Hartman
` (62 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, ZHAO Gang, Larry Finger,
John W. Linville
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: ZHAO Gang <gamerh2o@gmail.com>
commit 64e5acb09ca6b50c97299cff9ef51299470b29f2 upstream.
Use the right function to update frequency value.
If rx skb is probe response or beacon, the wrong frequency value can
cause problem that bss info can't be updated when it should be.
Fixes: 8318d78a44d4 ("cfg80211 API for channels/bitrates, mac80211 and driver conversion")
Signed-off-by: ZHAO Gang <gamerh2o@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/b43/xmit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -821,10 +821,10 @@ void b43_rx(struct b43_wldev *dev, struc
* channel number in b43. */
if (chanstat & B43_RX_CHAN_5GHZ) {
status.band = IEEE80211_BAND_5GHZ;
- status.freq = b43_freq_to_channel_5ghz(chanid);
+ status.freq = b43_channel_to_freq_5ghz(chanid);
} else {
status.band = IEEE80211_BAND_2GHZ;
- status.freq = b43_freq_to_channel_2ghz(chanid);
+ status.freq = b43_channel_to_freq_2ghz(chanid);
}
break;
default:
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 042/104] staging: r8712u: Set device type to wlan
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (37 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 041/104] b43: fix the wrong assignment of status.freq in b43_rx() Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 043/104] staging: vt6656: [BUG] BBvUpdatePreEDThreshold Always set sensitivity on bScanning Greg Kroah-Hartman
` (61 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit 3a21f00a5002b14e4aab52aef59d33ed28468a13 upstream.
The latest version of NetworkManager does not recognize the device as wireless
without this change.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/rtl8712/usb_intf.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/staging/rtl8712/usb_intf.c
+++ b/drivers/staging/rtl8712/usb_intf.c
@@ -358,6 +358,10 @@ static u8 key_2char2num(u8 hch, u8 lch)
return (hex_to_bin(hch) << 4) | hex_to_bin(lch);
}
+static const struct device_type wlan_type = {
+ .name = "wlan",
+};
+
/*
* drv_init() - a device potentially for us
*
@@ -393,6 +397,7 @@ static int r871xu_drv_init(struct usb_in
padapter->pusb_intf = pusb_intf;
usb_set_intfdata(pusb_intf, pnetdev);
SET_NETDEV_DEV(pnetdev, &pusb_intf->dev);
+ pnetdev->dev.type = &wlan_type;
/* step 2. */
padapter->dvobj_init = &r8712_usb_dvobj_init;
padapter->dvobj_deinit = &r8712_usb_dvobj_deinit;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 043/104] staging: vt6656: [BUG] BBvUpdatePreEDThreshold Always set sensitivity on bScanning
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (38 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 042/104] staging: r8712u: Set device type to wlan Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 044/104] staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT Greg Kroah-Hartman
` (60 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Malcolm Priestley
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <tvboxspy@gmail.com>
commit 8f248dae133668bfb8e9379b4b3f0571c858b24a upstream.
byBBPreEDIndex value is initially 0, this means that from
cold BBvUpdatePreEDThreshold is never set.
This means that sensitivity may be in an ambiguous state,
failing to scan any wireless points or at least distant ones.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/vt6656/baseband.c | 3 ---
1 file changed, 3 deletions(-)
--- a/drivers/staging/vt6656/baseband.c
+++ b/drivers/staging/vt6656/baseband.c
@@ -1466,7 +1466,6 @@ void BBvUpdatePreEDThreshold(struct vnt_
if( bScanning )
{ // need Max sensitivity //RSSI -69, -70,....
- if(pDevice->byBBPreEDIndex == 0) break;
pDevice->byBBPreEDIndex = 0;
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xC9, 0x00); //CR201(0xC9)
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xCE, 0x30); //CR206(0xCE)
@@ -1609,7 +1608,6 @@ void BBvUpdatePreEDThreshold(struct vnt_
if( bScanning )
{ // need Max sensitivity //RSSI -69, -70, ...
- if(pDevice->byBBPreEDIndex == 0) break;
pDevice->byBBPreEDIndex = 0;
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xC9, 0x00); //CR201(0xC9)
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xCE, 0x24); //CR206(0xCE)
@@ -1761,7 +1759,6 @@ void BBvUpdatePreEDThreshold(struct vnt_
case RF_VT3342A0: //RobertYu:20060627, testing table
if( bScanning )
{ // need Max sensitivity //RSSI -67, -68, ...
- if(pDevice->byBBPreEDIndex == 0) break;
pDevice->byBBPreEDIndex = 0;
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xC9, 0x00); //CR201(0xC9)
ControlvWriteByte(pDevice, MESSAGE_REQUEST_BBREG, 0xCE, 0x38); //CR206(0xCE)
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 044/104] staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (39 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 043/104] staging: vt6656: [BUG] BBvUpdatePreEDThreshold Always set sensitivity on bScanning Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 045/104] tty/serial: at91: Handle shutdown more safely Greg Kroah-Hartman
` (59 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Malcolm Priestley
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Malcolm Priestley <tvboxspy@gmail.com>
commit 9acec059c0cef0bf086c738f4c0b1f4447782a48 upstream.
value uLowNextTBTT yields wrong value.
ULL is needed with qwTSF
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/staging/vt6656/card.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -761,7 +761,7 @@ u64 CARDqGetNextTBTT(u64 qwTSF, u16 wBea
uBeaconInterval = wBeaconInterval * 1024;
// Next TBTT = ((local_current_TSF / beacon_interval) + 1 ) * beacon_interval
- uLowNextTBTT = ((qwTSF & 0xffffffffU) >> 10) << 10;
+ uLowNextTBTT = ((qwTSF & 0xffffffffULL) >> 10) << 10;
uLowRemain = (uLowNextTBTT) % uBeaconInterval;
uHighRemain = ((0x80000000 % uBeaconInterval) * 2 * (u32)(qwTSF >> 32))
% uBeaconInterval;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 045/104] tty/serial: at91: Handle shutdown more safely
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (40 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 044/104] staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 046/104] ARM: at91: smc: bug fix in sam9_smc_cs_read() Greg Kroah-Hartman
` (58 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Marek Roszko, Leilei Zhao,
Nicolas Ferre
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Roszko <mark.roszko@gmail.com>
commit 0cc7c6c7916b1b6f34350ff1473b80b9f7e459c0 upstream.
Interrupts were being cleaned up late in the shutdown handler, it is possible
that an interrupt can occur and schedule a tasklet that runs after the port is
cleaned up. There is a null dereference due to this race condition with the
following stacktrace:
[<c02092b0>] (atmel_tasklet_func+0x514/0x814) from [<c001fd34>] (tasklet_action+0x70/0xa8)
[<c001fd34>] (tasklet_action+0x70/0xa8) from [<c001f60c>] (__do_softirq+0x90/0x144)
[<c001f60c>] (__do_softirq+0x90/0x144) from [<c001fa18>] (irq_exit+0x40/0x4c)
[<c001fa18>] (irq_exit+0x40/0x4c) from [<c000e298>] (handle_IRQ+0x64/0x84)
[<c000e298>] (handle_IRQ+0x64/0x84) from [<c000d6c0>] (__irq_svc+0x40/0x50)
[<c000d6c0>] (__irq_svc+0x40/0x50) from [<c0208060>] (atmel_rx_dma_release+0x88/0xb8)
[<c0208060>] (atmel_rx_dma_release+0x88/0xb8) from [<c0209740>] (atmel_shutdown+0x104/0x160)
[<c0209740>] (atmel_shutdown+0x104/0x160) from [<c0205e8c>] (uart_port_shutdown+0x2c/0x38)
Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
Acked-by: Leilei Zhao <leilei.zhao@atmel.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/atmel_serial.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1022,12 +1022,24 @@ static int atmel_startup(struct uart_por
static void atmel_shutdown(struct uart_port *port)
{
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
+
+ /*
+ * Clear out any scheduled tasklets before
+ * we destroy the buffers
+ */
+ tasklet_kill(&atmel_port->tasklet);
+
/*
- * Ensure everything is stopped.
+ * Ensure everything is stopped and
+ * disable all interrupts, port and break condition.
*/
atmel_stop_rx(port);
atmel_stop_tx(port);
+ UART_PUT_CR(port, ATMEL_US_RSTSTA);
+ UART_PUT_IDR(port, -1);
+
+
/*
* Shut-down the DMA.
*/
@@ -1054,12 +1066,6 @@ static void atmel_shutdown(struct uart_p
}
/*
- * Disable all interrupts, port and break condition.
- */
- UART_PUT_CR(port, ATMEL_US_RSTSTA);
- UART_PUT_IDR(port, -1);
-
- /*
* Free the interrupt
*/
free_irq(port->irq, port);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 046/104] ARM: at91: smc: bug fix in sam9_smc_cs_read()
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (41 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 045/104] tty/serial: at91: Handle shutdown more safely Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 047/104] hwmon: (k10temp) Add support for Kaveri CPUs Greg Kroah-Hartman
` (57 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Jean-Jacques Hiblot, Boris BREZILLON,
Nicolas Ferre, Kevin Hilman
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
commit 1588c51cf6d782e63a8719681d905ef0ac22ee62 upstream.
There was a copy/paste error when reading the nwe_pulse value.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
Acked-by: Boris BREZILLON <b.brezillon@overkiz.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/mach-at91/sam9_smc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm/mach-at91/sam9_smc.c
+++ b/arch/arm/mach-at91/sam9_smc.c
@@ -101,7 +101,7 @@ static void sam9_smc_cs_read(void __iome
/* Pulse register */
val = __raw_readl(base + AT91_SMC_PULSE);
- config->nwe_setup = val & AT91_SMC_NWEPULSE;
+ config->nwe_pulse = val & AT91_SMC_NWEPULSE;
config->ncs_write_pulse = (val & AT91_SMC_NCS_WRPULSE) >> 8;
config->nrd_pulse = (val & AT91_SMC_NRDPULSE) >> 16;
config->ncs_read_pulse = (val & AT91_SMC_NCS_RDPULSE) >> 24;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 047/104] hwmon: (k10temp) Add support for Kaveri CPUs
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (42 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 046/104] ARM: at91: smc: bug fix in sam9_smc_cs_read() Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 048/104] serial: add support for 200 v3 series Titan card Greg Kroah-Hartman
` (56 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Philip Pokorny, Guenter Roeck
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Phil Pokorny <ppokorny@penguincomputing.com>
commit d303b1b5fbb688282bbf72a534b9dfed7af9fe4f upstream.
Add new PCI ID to support new model "Kaveri" family.
Signed-off-by: Philip Pokorny <ppokorny@penguincomputing.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hwmon/k10temp.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -211,6 +211,7 @@ static DEFINE_PCI_DEVICE_TABLE(k10temp_i
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
{}
};
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 048/104] serial: add support for 200 v3 series Titan card
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (43 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 047/104] hwmon: (k10temp) Add support for Kaveri CPUs Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 049/104] serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip Greg Kroah-Hartman
` (55 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Yegor Yefremov
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Yegor Yefremov <yegorslists@googlemail.com>
commit 48c0247d7b7bf58abb85a39021099529df365c4d upstream.
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/8250/8250_pci.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1545,6 +1545,7 @@ pci_wch_ch353_setup(struct serial_privat
#define PCI_DEVICE_ID_TITAN_800E 0xA014
#define PCI_DEVICE_ID_TITAN_200EI 0xA016
#define PCI_DEVICE_ID_TITAN_200EISI 0xA017
+#define PCI_DEVICE_ID_TITAN_200V3 0xA306
#define PCI_DEVICE_ID_TITAN_400V3 0xA310
#define PCI_DEVICE_ID_TITAN_410V3 0xA312
#define PCI_DEVICE_ID_TITAN_800V3 0xA314
@@ -4139,6 +4140,9 @@ static struct pci_device_id serial_pci_t
{ PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EISI,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_oxsemi_2_4000000 },
+ { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200V3,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ pbn_b0_bt_2_921600 },
{ PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400V3,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_b0_4_921600 },
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 049/104] serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (44 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 048/104] serial: add support for 200 v3 series Titan card Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 050/104] serial: 8250: enable UART_BUG_NOMSR for Tegra Greg Kroah-Hartman
` (54 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jonathan Woithe
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jonathan Woithe <jwoithe@just42.net>
commit 9c5320f8d7d9a2cf623e65d50e1113f34d9b9eb1 upstream.
Fix the initialisation of older Quatech serial cards which are fitted with
the AMCC PCI Matchmaker interface chip.
Signed-off-by: Jonathan Woithe (jwoithe@just42.net)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/8250/8250_pci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -1260,10 +1260,10 @@ static int pci_quatech_init(struct pci_d
unsigned long base = pci_resource_start(dev, 0);
if (base) {
u32 tmp;
- outl(inl(base + 0x38), base + 0x38);
+ outl(inl(base + 0x38) | 0x00002000, base + 0x38);
tmp = inl(base + 0x3c);
outl(tmp | 0x01000000, base + 0x3c);
- outl(tmp, base + 0x3c);
+ outl(tmp &= ~0x01000000, base + 0x3c);
}
}
return 0;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 050/104] serial: 8250: enable UART_BUG_NOMSR for Tegra
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (45 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 049/104] serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 051/104] KVM: s390: fix diagnose code extraction Greg Kroah-Hartman
` (53 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Stephen Warren
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Warren <swarren@nvidia.com>
commit 3685f19e07802ec4207b52465c408f185b66490e upstream.
Tegra chips have 4 or 5 identical UART modules embedded. UARTs C..E have
their MODEM-control signals tied off to a static state. However UARTs A
and B can optionally route those signals to/from package pins, depending
on the exact pinmux configuration.
When these signals are not routed to package pins, false interrupts may
trigger either temporarily, or permanently, all while not showing up in
the IIR; it will read as NO_INT. This will eventually lead to the UART
IRQ being disabled due to unhandled interrupts. When this happens, the
kernel may print e.g.:
irq 68: nobody cared (try booting with the "irqpoll" option)
In order to prevent this, enable UART_BUG_NOMSR. This prevents
UART_IER_MSI from being enabled, which prevents the false interrupts
from triggering.
In practice, this is not needed under any of the following conditions:
* On Tegra chips after Tegra30, since the HW bug has apparently been
fixed.
* On UARTs C..E since their MODEM control signals are tied to the correct
static state which doesn't trigger the issue.
* On UARTs A..B if the MODEM control signals are routed out to package
pins, since they will then carry valid signals.
However, we ignore these exceptions for now, since they are only relevant
if a board actually hooks up more than a 4-wire UART, and no currently
supported board does this. If we ever support a board that does, we can
refine the algorithm that enables UART_BUG_NOMSR to take those exceptions
into account, and/or read a flag from DT/... that indicates that the
board has hooked up and pinmux'd more than a 4-wire UART.
Reported-by: Olof Johansson <olof@lixom.net> # autotester
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/tty/serial/8250/8250_core.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -2670,6 +2670,10 @@ static void serial8250_config_port(struc
if (port->type == PORT_16550A && port->iotype == UPIO_AU)
up->bugs |= UART_BUG_NOMSR;
+ /* HW bugs may trigger IRQ while IIR == NO_INT */
+ if (port->type == PORT_TEGRA)
+ up->bugs |= UART_BUG_NOMSR;
+
if (port->type != PORT_UNKNOWN && flags & UART_CONFIG_IRQ)
autoconfig_irq(up);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 051/104] KVM: s390: fix diagnose code extraction
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (46 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 050/104] serial: 8250: enable UART_BUG_NOMSR for Tegra Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 052/104] s390/uapi: fix struct statfs64 definition Greg Kroah-Hartman
` (52 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Cornelia Huck, Heiko Carstens
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <heiko.carstens@de.ibm.com>
commit 743db27c526e0f31cc507959d662e97e2048a86f upstream.
The diagnose code to be used is the contents of the base register (if not
zero), plus the displacement. The current code ignores the base register
contents. So let's fix that...
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/s390/kvm/diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/s390/kvm/diag.c
+++ b/arch/s390/kvm/diag.c
@@ -130,7 +130,7 @@ static int __diag_virtio_hypercall(struc
int kvm_s390_handle_diag(struct kvm_vcpu *vcpu)
{
- int code = (vcpu->arch.sie_block->ipb & 0xfff0000) >> 16;
+ int code = kvm_s390_get_base_disp_rs(vcpu) & 0xffff;
trace_kvm_s390_handle_diag(vcpu, code);
switch (code) {
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 052/104] s390/uapi: fix struct statfs64 definition
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (47 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 051/104] KVM: s390: fix diagnose code extraction Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 053/104] parport: parport_pc: remove double PCI ID for NetMos Greg Kroah-Hartman
` (51 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Heiko Carstens, Martin Schwidefsky
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <heiko.carstens@de.ibm.com>
commit 4e078146dff728f4865270a47710d57797e81eb6 upstream.
With b8668fd0a7e1b59f "s390/uapi: change struct statfs[64] member types
to unsigned values" the size of a couple of struct statfs64 member got
incorrectly changed from 64 to 32 bit for 32 bit builds.
Fix this by changing the type of couple of struct statfs64 members from
unsigned long to unsigned long long.
The definition of struct compat_statfs64 was correct however.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/s390/include/uapi/asm/statfs.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/arch/s390/include/uapi/asm/statfs.h
+++ b/arch/s390/include/uapi/asm/statfs.h
@@ -35,11 +35,11 @@ struct statfs {
struct statfs64 {
unsigned int f_type;
unsigned int f_bsize;
- unsigned long f_blocks;
- unsigned long f_bfree;
- unsigned long f_bavail;
- unsigned long f_files;
- unsigned long f_ffree;
+ unsigned long long f_blocks;
+ unsigned long long f_bfree;
+ unsigned long long f_bavail;
+ unsigned long long f_files;
+ unsigned long long f_ffree;
__kernel_fsid_t f_fsid;
unsigned int f_namelen;
unsigned int f_frsize;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 053/104] parport: parport_pc: remove double PCI ID for NetMos
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (48 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 052/104] s390/uapi: fix struct statfs64 definition Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 054/104] rtc-cmos: Add an alarm disable quirk Greg Kroah-Hartman
` (50 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Maximilian Attems,
Sebastian Andrzej Siewior, Andrew Morton
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
commit d6a484520c5572a4170fa915109ccfc0c38f5008 upstream.
In commit 85747f ("PATCH] parport: add NetMOS 9805 support") Max added
the PCI ID for NetMOS 9805 based on a Debian bug report from 2k4 which
was at the v2.4.26 time frame. The patch made into 2.6.14.
Shortly before that patch akpm merged commit 296d3c783b ("[PATCH] Support
NetMOS based PCI cards providing serial and parallel ports") which made
into v2.6.9-rc1.
Now we have two different entries for the same PCI id.
I have here the NetMos 9805 which claims to support SPP/EPP/ECP mode.
This patch takes Max's entry for titan_1284p1 (base != -1 specifies the
ioport for ECP mode) and replaces akpm's entry for netmos_9805 which
specified -1 (=none). Both share the same PCI-ID (my card has subsystem
0x1000 / 0x0020 so it should match PCI_ANY).
While here I also drop the entry for titan_1284p2 which is the same as
netmos_9815.
Cc: Maximilian Attems <maks@stro.at>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/parport/parport_pc.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -2596,8 +2596,6 @@ enum parport_pc_pci_cards {
syba_2p_epp,
syba_1p_ecp,
titan_010l,
- titan_1284p1,
- titan_1284p2,
avlab_1p,
avlab_2p,
oxsemi_952,
@@ -2656,8 +2654,6 @@ static struct parport_pc_pci {
/* syba_2p_epp AP138B */ { 2, { { 0, 0x078 }, { 0, 0x178 }, } },
/* syba_1p_ecp W83787 */ { 1, { { 0, 0x078 }, } },
/* titan_010l */ { 1, { { 3, -1 }, } },
- /* titan_1284p1 */ { 1, { { 0, 1 }, } },
- /* titan_1284p2 */ { 2, { { 0, 1 }, { 2, 3 }, } },
/* avlab_1p */ { 1, { { 0, 1}, } },
/* avlab_2p */ { 2, { { 0, 1}, { 2, 3 },} },
/* The Oxford Semi cards are unusual: 954 doesn't support ECP,
@@ -2673,8 +2669,8 @@ static struct parport_pc_pci {
/* netmos_9705 */ { 1, { { 0, -1 }, } },
/* netmos_9715 */ { 2, { { 0, 1 }, { 2, 3 },} },
/* netmos_9755 */ { 2, { { 0, 1 }, { 2, 3 },} },
- /* netmos_9805 */ { 1, { { 0, -1 }, } },
- /* netmos_9815 */ { 2, { { 0, -1 }, { 2, -1 }, } },
+ /* netmos_9805 */ { 1, { { 0, 1 }, } },
+ /* netmos_9815 */ { 2, { { 0, 1 }, { 2, 3 }, } },
/* netmos_9901 */ { 1, { { 0, -1 }, } },
/* netmos_9865 */ { 1, { { 0, -1 }, } },
/* quatech_sppxp100 */ { 1, { { 0, 1 }, } },
@@ -2718,8 +2714,6 @@ static const struct pci_device_id parpor
PCI_ANY_ID, PCI_ANY_ID, 0, 0, syba_1p_ecp },
{ PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_010L,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_010l },
- { 0x9710, 0x9805, 0x1000, 0x0010, 0, 0, titan_1284p1 },
- { 0x9710, 0x9815, 0x1000, 0x0020, 0, 0, titan_1284p2 },
/* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
/* AFAVLAB_TK9902 */
{ 0x14db, 0x2120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1p},
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 054/104] rtc-cmos: Add an alarm disable quirk
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (49 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 053/104] parport: parport_pc: remove double PCI ID for NetMos Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 055/104] rtc: max8907: weekday encoding fixes Greg Kroah-Hartman
` (49 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Brecht Machiels, Thomas Gleixner,
John Stultz, Rabin Vincent, Borislav Petkov
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Borislav Petkov <bp@alien8.de>
commit d5a1c7e3fc38d9c7d629e1e47f32f863acbdec3d upstream.
41c7f7424259f ("rtc: Disable the alarm in the hardware (v2)") added the
functionality to disable the RTC wake alarm when shutting down the box.
However, there are at least two b0rked BIOSes we know about:
https://bugzilla.novell.com/show_bug.cgi?id=812592
https://bugzilla.novell.com/show_bug.cgi?id=805740
where, when wakeup alarm is enabled in the BIOS, the machine reboots
automatically right after shutdown, regardless of what wakeup time is
programmed.
Bisecting the issue lead to this patch so disable its functionality with
a DMI quirk only for those boxes.
Cc: Brecht Machiels <brecht@mos6581.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
[jstultz: Changed variable name for clarity, added extra dmi entry]
Tested-by: Brecht Machiels <brecht@mos6581.org>
Tested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/rtc/rtc-cmos.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -34,11 +34,11 @@
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
-#include <linux/mod_devicetable.h>
#include <linux/log2.h>
#include <linux/pm.h>
#include <linux/of.h>
#include <linux/of_platform.h>
+#include <linux/dmi.h>
/* this is for "generic access to PC-style RTC" using CMOS_READ/CMOS_WRITE */
#include <asm-generic/rtc.h>
@@ -377,6 +377,51 @@ static int cmos_set_alarm(struct device
return 0;
}
+/*
+ * Do not disable RTC alarm on shutdown - workaround for b0rked BIOSes.
+ */
+static bool alarm_disable_quirk;
+
+static int __init set_alarm_disable_quirk(const struct dmi_system_id *id)
+{
+ alarm_disable_quirk = true;
+ pr_info("rtc-cmos: BIOS has alarm-disable quirk. ");
+ pr_info("RTC alarms disabled\n");
+ return 0;
+}
+
+static const struct dmi_system_id rtc_quirks[] __initconst = {
+ /* https://bugzilla.novell.com/show_bug.cgi?id=805740 */
+ {
+ .callback = set_alarm_disable_quirk,
+ .ident = "IBM Truman",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "4852570"),
+ },
+ },
+ /* https://bugzilla.novell.com/show_bug.cgi?id=812592 */
+ {
+ .callback = set_alarm_disable_quirk,
+ .ident = "Gigabyte GA-990XA-UD3",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR,
+ "Gigabyte Technology Co., Ltd."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "GA-990XA-UD3"),
+ },
+ },
+ /* http://permalink.gmane.org/gmane.linux.kernel/1604474 */
+ {
+ .callback = set_alarm_disable_quirk,
+ .ident = "Toshiba Satellite L300",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"),
+ },
+ },
+ {}
+};
+
static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
{
struct cmos_rtc *cmos = dev_get_drvdata(dev);
@@ -385,6 +430,9 @@ static int cmos_alarm_irq_enable(struct
if (!is_valid_irq(cmos->irq))
return -EINVAL;
+ if (alarm_disable_quirk)
+ return 0;
+
spin_lock_irqsave(&rtc_lock, flags);
if (enabled)
@@ -1163,6 +1211,8 @@ static int __init cmos_init(void)
platform_driver_registered = true;
}
+ dmi_check_system(rtc_quirks);
+
if (retval == 0)
return 0;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 055/104] rtc: max8907: weekday encoding fixes
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (50 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 054/104] rtc-cmos: Add an alarm disable quirk Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 056/104] pinctrl: sunxi: Honor GPIO output initial vaules Greg Kroah-Hartman
` (48 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Stephen Warren, Andrew Morton,
Linus Torvalds
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Warren <swarren@nvidia.com>
commit 75ea799df4cb07e505c91b4abaa87bc28aad3e66 upstream.
The current MAX8907 driver has two issues related to weekday value
handling:
1)
The HW WEEKDAY register has range 0..6 rather than 1..7 as documented.
Note that I validated the actual HW range by observing the HW register
roll from 6->0 rather than 6->7->1 as would otherwise be expected.
This matches Linux's tm_wday range of 0..6.
When the CMOS RAM content is lost, the date returned from the device is
2007-01-01 00:00:00, which is a Monday. The WEEKDAY register reads 1 in
this case. This matches the numbering in Linux's tm_wday field.
Hence we should write Linux's tm_wday value to the register without
modifying it. Hence, remove the +1/-1 calculations for WEEKDAY/tm_wday.
2)
There's no need to make alarms match on the WEEKDAY register, since the
other fields together uniquely define the alarm date/time. Ignoring the
WEEKDAY value in the match isolates the driver from any incorrect value in
the current time copy of the WEEKDAY register.
Each change individually, or both together, solves an issue that I
observed; "hwclock -r" would time out waiting for its alarm to fire if the
CMOS RAM content had been lost, and hence the WEEKDAY register value
mismatched what the driver expected it to be. "hwclock -w" would solve
this by over-writing the HW default WEEKDAY register value with what the
driver expected.
Signed-off-by: Stephen Warren <swarren@nvidia.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>
---
drivers/rtc/rtc-max8907.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
--- a/drivers/rtc/rtc-max8907.c
+++ b/drivers/rtc/rtc-max8907.c
@@ -51,7 +51,7 @@ static irqreturn_t max8907_irq_handler(i
{
struct max8907_rtc *rtc = data;
- regmap_update_bits(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0x7f, 0);
+ regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0);
rtc_update_irq(rtc->rtc_dev, 1, RTC_IRQF | RTC_AF);
@@ -64,7 +64,7 @@ static void regs_to_tm(u8 *regs, struct
bcd2bin(regs[RTC_YEAR1]) - 1900;
tm->tm_mon = bcd2bin(regs[RTC_MONTH] & 0x1f) - 1;
tm->tm_mday = bcd2bin(regs[RTC_DATE] & 0x3f);
- tm->tm_wday = (regs[RTC_WEEKDAY] & 0x07) - 1;
+ tm->tm_wday = (regs[RTC_WEEKDAY] & 0x07);
if (regs[RTC_HOUR] & HOUR_12) {
tm->tm_hour = bcd2bin(regs[RTC_HOUR] & 0x01f);
if (tm->tm_hour == 12)
@@ -88,7 +88,7 @@ static void tm_to_regs(struct rtc_time *
regs[RTC_YEAR1] = bin2bcd(low);
regs[RTC_MONTH] = bin2bcd(tm->tm_mon + 1);
regs[RTC_DATE] = bin2bcd(tm->tm_mday);
- regs[RTC_WEEKDAY] = tm->tm_wday + 1;
+ regs[RTC_WEEKDAY] = tm->tm_wday;
regs[RTC_HOUR] = bin2bcd(tm->tm_hour);
regs[RTC_MIN] = bin2bcd(tm->tm_min);
regs[RTC_SEC] = bin2bcd(tm->tm_sec);
@@ -153,7 +153,7 @@ static int max8907_rtc_set_alarm(struct
tm_to_regs(&alrm->time, regs);
/* Disable alarm while we update the target time */
- ret = regmap_update_bits(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0x7f, 0);
+ ret = regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0);
if (ret < 0)
return ret;
@@ -163,8 +163,7 @@ static int max8907_rtc_set_alarm(struct
return ret;
if (alrm->enabled)
- ret = regmap_update_bits(rtc->regmap, MAX8907_REG_ALARM0_CNTL,
- 0x7f, 0x7f);
+ ret = regmap_write(rtc->regmap, MAX8907_REG_ALARM0_CNTL, 0x77);
return ret;
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 056/104] pinctrl: sunxi: Honor GPIO output initial vaules
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (51 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 055/104] rtc: max8907: weekday encoding fixes Greg Kroah-Hartman
@ 2014-02-04 21:01 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 057/104] perf kvm: Fix kvm report without guestmount Greg Kroah-Hartman
` (47 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:01 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Chen-Yu Tsai, Maxime Ripard,
Linus Walleij
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <wens@csie.org>
commit fa8cf57c923e86a693a85aff1df579245a27cbb3 upstream.
Some GPIO users, such as fixed-regulator, request GPIO output with
initial value of 1. This was ignored by sunxi driver.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/pinctrl/pinctrl-sunxi.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--- a/drivers/pinctrl/pinctrl-sunxi.c
+++ b/drivers/pinctrl/pinctrl-sunxi.c
@@ -1754,12 +1754,6 @@ static int sunxi_pinctrl_gpio_get(struct
return val;
}
-static int sunxi_pinctrl_gpio_direction_output(struct gpio_chip *chip,
- unsigned offset, int value)
-{
- return pinctrl_gpio_direction_output(chip->base + offset);
-}
-
static void sunxi_pinctrl_gpio_set(struct gpio_chip *chip,
unsigned offset, int value)
{
@@ -1770,6 +1764,13 @@ static void sunxi_pinctrl_gpio_set(struc
writel((value & DATA_PINS_MASK) << index, pctl->membase + reg);
}
+static int sunxi_pinctrl_gpio_direction_output(struct gpio_chip *chip,
+ unsigned offset, int value)
+{
+ sunxi_pinctrl_gpio_set(chip, offset, value);
+ return pinctrl_gpio_direction_output(chip->base + offset);
+}
+
static int sunxi_pinctrl_gpio_of_xlate(struct gpio_chip *gc,
const struct of_phandle_args *gpiospec,
u32 *flags)
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 057/104] perf kvm: Fix kvm report without guestmount.
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (52 preceding siblings ...)
2014-02-04 21:01 ` [PATCH 3.10 056/104] pinctrl: sunxi: Honor GPIO output initial vaules Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 058/104] mfd: max77686: Fix regmap resource leak on driver remove Greg Kroah-Hartman
` (46 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Dongsheng Yang, David Ahern,
Arnaldo Carvalho de Melo
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
commit ad85ace07a05062ef6b59c35a5e80b6eaee1eee6 upstream.
Currently, if we use perf kvm --guestkallsyms --guestmodules report, we
can not get the perf information from perf data file. All sample are
shown as unknown.
Reproducing steps:
# perf kvm --guestkallsyms /tmp/kallsyms --guestmodules /tmp/modules record -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.624 MB perf.data.guest (~27260 samples) ]
# perf kvm --guestkallsyms /tmp/kallsyms --guestmodules /tmp/modules report |grep %
100.00% [guest/6471] [unknown] [g] 0xffffffff8164f330
This bug was introduced by 207b57926 (perf kvm: Fix regression with guest machine creation).
In original code, it uses perf_session__find_machine(), it means we deliver symbol to machine
which has the same pid, if no machine found, deliver it to *default* guest. But if we use
perf_session__findnew_machine() here, if no machine was found, new machine with pid will be built
and added. Then the default guest which with pid == 0 will never get a symbol.
And because the new machine initialized here has no kernel map created, the symbol delivered to
it will be marked as "unknown".
This patch here is to revert commit 207b57926 and fix the SEGFAULT bug in another way.
Verification steps:
# ./perf kvm --guestkallsyms /home/kallsyms --guestmodules /home/modules record -a sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.651 MB perf.data.guest (~28437 samples) ]
# ./perf kvm --guestkallsyms /home/kallsyms --guestmodules /home/modules report |grep %
22.64% :6471 [guest.kernel.kallsyms] [g] update_rq_clock.part.70
19.99% :6471 [guest.kernel.kallsyms] [g] d_free
18.46% :6471 [guest.kernel.kallsyms] [g] bio_phys_segments
16.25% :6471 [guest.kernel.kallsyms] [g] dequeue_task
12.78% :6471 [guest.kernel.kallsyms] [g] __switch_to
7.91% :6471 [guest.kernel.kallsyms] [g] scheduler_tick
1.75% :6471 [guest.kernel.kallsyms] [g] native_apic_mem_write
0.21% :6471 [guest.kernel.kallsyms] [g] apic_timer_interrupt
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Acked-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1387564907-3045-1-git-send-email-yangds.fnst@cn.fujitsu.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/perf/util/session.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -811,6 +811,7 @@ static struct machine *
union perf_event *event)
{
const u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK;
+ struct machine *machine;
if (perf_guest &&
((cpumode == PERF_RECORD_MISC_GUEST_KERNEL) ||
@@ -822,7 +823,11 @@ static struct machine *
else
pid = event->ip.pid;
- return perf_session__findnew_machine(session, pid);
+ machine = perf_session__find_machine(session, pid);
+ if (!machine)
+ machine = perf_session__findnew_machine(session,
+ DEFAULT_GUEST_KERNEL_ID);
+ return machine;
}
return &session->machines.host;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 058/104] mfd: max77686: Fix regmap resource leak on driver remove
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (53 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 057/104] perf kvm: Fix kvm report without guestmount Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 059/104] ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant Greg Kroah-Hartman
` (45 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Krzysztof Kozlowski, Lee Jones
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
commit 74142ffc0b52cfe6f9d2f6f34a5f3eedbfe3ce51 upstream.
The regmap used by max77686 MFD driver was not freed with regmap_exit()
on driver exit. This lead to leak of resources.
Replace regmap_init_i2c() call in driver probe with initialization of
managed register map so the regmap will be properly freed by the device
management code.
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/mfd/max77686.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/mfd/max77686.c
+++ b/drivers/mfd/max77686.c
@@ -102,7 +102,7 @@ static int max77686_i2c_probe(struct i2c
max77686->irq_gpio = pdata->irq_gpio;
max77686->irq = i2c->irq;
- max77686->regmap = regmap_init_i2c(i2c, &max77686_regmap_config);
+ max77686->regmap = devm_regmap_init_i2c(i2c, &max77686_regmap_config);
if (IS_ERR(max77686->regmap)) {
ret = PTR_ERR(max77686->regmap);
dev_err(max77686->dev, "Failed to allocate register map: %d\n",
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 059/104] ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (54 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 058/104] mfd: max77686: Fix regmap resource leak on driver remove Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 060/104] ASoC: wm5110: Extend SYSCLK patch file for rev D Greg Kroah-Hartman
` (44 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Magnus Reftel, Lars-Peter Clausen,
Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lars-Peter Clausen <lars@metafoo.de>
commit e20970ada3f699c113fe64b04492af083d11a7d8 upstream.
The driver defines ADAU1701_SEROCTL_WORD_LEN_16 as 0x10 while it should be b10,
so 0x2. This patch fixes it.
Reported-by: Magnus Reftel <magnus.reftel@lockless.no>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/adau1701.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -64,7 +64,7 @@
#define ADAU1701_SEROCTL_WORD_LEN_24 0x0000
#define ADAU1701_SEROCTL_WORD_LEN_20 0x0001
-#define ADAU1701_SEROCTL_WORD_LEN_16 0x0010
+#define ADAU1701_SEROCTL_WORD_LEN_16 0x0002
#define ADAU1701_SEROCTL_WORD_LEN_MASK 0x0003
#define ADAU1701_AUXNPOW_VBPD 0x40
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 060/104] ASoC: wm5110: Extend SYSCLK patch file for rev D
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (55 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 059/104] ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 061/104] ALSA: rme9652: fix a missing comma in channel_map_9636_ds[] Greg Kroah-Hartman
` (43 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Charles Keepax, Mark Brown
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
commit 34354792432b6e0a3b156819a1a19716c50d3473 upstream.
Latest evaluation of the the device has given some patch file additions
for improved performance.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/soc/codecs/wm5110.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -43,6 +43,54 @@ static const struct reg_default wm5110_s
{ 0x3133, 0x1201 },
{ 0x3183, 0x1501 },
{ 0x31D3, 0x1401 },
+ { 0x0049, 0x01ea },
+ { 0x004a, 0x01f2 },
+ { 0x0057, 0x01e7 },
+ { 0x0058, 0x01fb },
+ { 0x33ce, 0xc4f5 },
+ { 0x33cf, 0x1361 },
+ { 0x33d0, 0x0402 },
+ { 0x33d1, 0x4700 },
+ { 0x33d2, 0x026d },
+ { 0x33d3, 0xff00 },
+ { 0x33d4, 0x026d },
+ { 0x33d5, 0x0101 },
+ { 0x33d6, 0xc4f5 },
+ { 0x33d7, 0x0361 },
+ { 0x33d8, 0x0402 },
+ { 0x33d9, 0x6701 },
+ { 0x33da, 0xc4f5 },
+ { 0x33db, 0x136f },
+ { 0x33dc, 0xc4f5 },
+ { 0x33dd, 0x134f },
+ { 0x33de, 0xc4f5 },
+ { 0x33df, 0x131f },
+ { 0x33e0, 0x026d },
+ { 0x33e1, 0x4f01 },
+ { 0x33e2, 0x026d },
+ { 0x33e3, 0xf100 },
+ { 0x33e4, 0x026d },
+ { 0x33e5, 0x0001 },
+ { 0x33e6, 0xc4f5 },
+ { 0x33e7, 0x0361 },
+ { 0x33e8, 0x0402 },
+ { 0x33e9, 0x6601 },
+ { 0x33ea, 0xc4f5 },
+ { 0x33eb, 0x136f },
+ { 0x33ec, 0xc4f5 },
+ { 0x33ed, 0x134f },
+ { 0x33ee, 0xc4f5 },
+ { 0x33ef, 0x131f },
+ { 0x33f0, 0x026d },
+ { 0x33f1, 0x4e01 },
+ { 0x33f2, 0x026d },
+ { 0x33f3, 0xf000 },
+ { 0x33f6, 0xc4f5 },
+ { 0x33f7, 0x1361 },
+ { 0x33f8, 0x0402 },
+ { 0x33f9, 0x4600 },
+ { 0x33fa, 0x026d },
+ { 0x33fb, 0xfe00 },
};
static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w,
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 061/104] ALSA: rme9652: fix a missing comma in channel_map_9636_ds[]
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (56 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 060/104] ASoC: wm5110: Extend SYSCLK patch file for rev D Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 062/104] ALSA: hda - Dont create duplicated ctls for loopback paths Greg Kroah-Hartman
` (42 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alexander Aristov, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 770bd4bf2e664939a9dacd3d26ec9ff7a3933210 upstream.
The lack of comma leads to the wrong channel for an SPDIF channel.
Unfortunately this wasn't caught by compiler because it's still a
valid expression.
Reported-by: Alexander Aristov <aristov.alexander@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/rme9652/rme9652.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/pci/rme9652/rme9652.c
+++ b/sound/pci/rme9652/rme9652.c
@@ -285,7 +285,7 @@ static char channel_map_9636_ds[26] = {
/* ADAT channels are remapped */
1, 3, 5, 7, 9, 11, 13, 15,
/* channels 8 and 9 are S/PDIF */
- 24, 25
+ 24, 25,
/* others don't exist */
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 062/104] ALSA: hda - Dont create duplicated ctls for loopback paths
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (57 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 061/104] ALSA: rme9652: fix a missing comma in channel_map_9636_ds[] Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 063/104] ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks Greg Kroah-Hartman
` (41 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 43a8e50a46a4e1dd1451e4a4ffa1f7695fb7d287 upstream.
AD1986A mic pins (0x1d and 0x1f) share the same widget for controlling
the loopback volume/mute, but the generic parser didn't check it.
This ended up with the duplicated controls for the same effect.
This patch adds the check of the duplication for avoiding it.
After this fix, there will be only one control although it affects
both paths; this remaining issue should be fixed later in a different
patch.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/hda_generic.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2796,9 +2796,11 @@ static bool look_for_mix_leaf_ctls(struc
if (num_conns < idx)
return false;
nid = list[idx];
- if (!*mix_val && nid_has_volume(codec, nid, HDA_OUTPUT))
+ if (!*mix_val && nid_has_volume(codec, nid, HDA_OUTPUT) &&
+ !is_ctl_associated(codec, nid, HDA_OUTPUT, 0, NID_PATH_VOL_CTL))
*mix_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT);
- if (!*mute_val && nid_has_mute(codec, nid, HDA_OUTPUT))
+ if (!*mute_val && nid_has_mute(codec, nid, HDA_OUTPUT) &&
+ !is_ctl_associated(codec, nid, HDA_OUTPUT, 0, NID_PATH_MUTE_CTL))
*mute_val = HDA_COMPOSE_AMP_VAL(nid, 3, 0, HDA_OUTPUT);
return *mix_val || *mute_val;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 063/104] ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (58 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 062/104] ALSA: hda - Dont create duplicated ctls for loopback paths Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 065/104] tpm/tpm_i2c_stm_st33: Check return code of get_burstcount Greg Kroah-Hartman
` (40 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 80ab8eae70e51d578ebbeb228e0f7a562471b8b7 upstream.
The PCI devices with DMA masks smaller than 32bit should enable
CONFIG_ZONE_DMA. Since the recent change of page allocator, page
allocations via dma_alloc_coherent() with the limited DMA mask bits
may fail more frequently, ended up with no available buffers, when
CONFIG_ZONE_DMA isn't enabled. With CONFIG_ZONE_DMA, the system has
much more chance to obtain such pages.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=68221
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/Kconfig | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/sound/pci/Kconfig
+++ b/sound/pci/Kconfig
@@ -30,6 +30,7 @@ config SND_ALS300
select SND_PCM
select SND_AC97_CODEC
select SND_OPL3_LIB
+ select ZONE_DMA
help
Say 'Y' or 'M' to include support for Avance Logic ALS300/ALS300+
@@ -54,6 +55,7 @@ config SND_ALI5451
tristate "ALi M5451 PCI Audio Controller"
select SND_MPU401_UART
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y here to include support for the integrated AC97 sound
device on motherboards using the ALi M5451 Audio Controller
@@ -158,6 +160,7 @@ config SND_AZT3328
select SND_PCM
select SND_RAWMIDI
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y here to include support for Aztech AZF3328 (PCI168)
soundcards.
@@ -463,6 +466,7 @@ config SND_EMU10K1
select SND_HWDEP
select SND_RAWMIDI
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y to include support for Sound Blaster PCI 512, Live!,
Audigy and E-mu APS (partially supported) soundcards.
@@ -478,6 +482,7 @@ config SND_EMU10K1X
tristate "Emu10k1X (Dell OEM Version)"
select SND_AC97_CODEC
select SND_RAWMIDI
+ select ZONE_DMA
help
Say Y here to include support for the Dell OEM version of the
Sound Blaster Live!.
@@ -511,6 +516,7 @@ config SND_ES1938
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y here to include support for soundcards based on ESS Solo-1
(ES1938, ES1946, ES1969) chips.
@@ -522,6 +528,7 @@ config SND_ES1968
tristate "ESS ES1968/1978 (Maestro-1/2/2E)"
select SND_MPU401_UART
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y here to include support for soundcards based on ESS Maestro
1/2/2E chips.
@@ -603,6 +610,7 @@ config SND_ICE1712
select SND_MPU401_UART
select SND_AC97_CODEC
select BITREVERSE
+ select ZONE_DMA
help
Say Y here to include support for soundcards based on the
ICE1712 (Envy24) chip.
@@ -690,6 +698,7 @@ config SND_LX6464ES
config SND_MAESTRO3
tristate "ESS Allegro/Maestro3"
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y here to include support for soundcards based on ESS Maestro 3
(Allegro) chips.
@@ -786,6 +795,7 @@ config SND_SIS7019
tristate "SiS 7019 Audio Accelerator"
depends on X86 && !X86_64
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y here to include support for the SiS 7019 Audio Accelerator.
@@ -797,6 +807,7 @@ config SND_SONICVIBES
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y here to include support for soundcards based on the S3
SonicVibes chip.
@@ -808,6 +819,7 @@ config SND_TRIDENT
tristate "Trident 4D-Wave DX/NX; SiS 7018"
select SND_MPU401_UART
select SND_AC97_CODEC
+ select ZONE_DMA
help
Say Y here to include support for soundcards based on Trident
4D-Wave DX/NX or SiS 7018 chips.
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 065/104] tpm/tpm_i2c_stm_st33: Check return code of get_burstcount
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (59 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 063/104] ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 066/104] tpm/tpm_ppi: Do not compare strcmp(a,b) == -1 Greg Kroah-Hartman
` (39 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Peter Huewe
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Huewe <PeterHuewe@gmx.de>
commit 85c5e0d451125c6ddb78663972e40af810b83644 upstream.
The 'get_burstcount' function can in some circumstances 'return -EBUSY' which
in tpm_stm_i2c_send is stored in an 'u32 burstcnt'
thus converting the signed value into an unsigned value, resulting
in 'burstcnt' being huge.
Changing the type to u32 only does not solve the problem as the signed
value is converted to an unsigned in I2C_WRITE_DATA, resulting in the
same effect.
Thus
-> Change type of burstcnt to u32 (the return type of get_burstcount)
-> Add a check for the return value of 'get_burstcount' and propagate a
potential error.
This makes also sense in the 'I2C_READ_DATA' case, where the there is no
signed/unsigned conversion.
found by coverity
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/char/tpm/tpm_i2c_stm_st33.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/char/tpm/tpm_i2c_stm_st33.c
+++ b/drivers/char/tpm/tpm_i2c_stm_st33.c
@@ -410,6 +410,8 @@ static int recv_data(struct tpm_chip *ch
&chip->vendor.read_queue)
== 0) {
burstcnt = get_burstcount(chip);
+ if (burstcnt < 0)
+ return burstcnt;
len = min_t(int, burstcnt, count - size);
I2C_READ_DATA(client, TPM_DATA_FIFO, buf + size, len);
size += len;
@@ -451,7 +453,8 @@ static irqreturn_t tpm_ioserirq_handler(
static int tpm_stm_i2c_send(struct tpm_chip *chip, unsigned char *buf,
size_t len)
{
- u32 status, burstcnt = 0, i, size;
+ u32 status, i, size;
+ int burstcnt = 0;
int ret;
u8 data;
struct i2c_client *client;
@@ -482,6 +485,8 @@ static int tpm_stm_i2c_send(struct tpm_c
for (i = 0; i < len - 1;) {
burstcnt = get_burstcount(chip);
+ if (burstcnt < 0)
+ return burstcnt;
size = min_t(int, len - i - 1, burstcnt);
ret = I2C_WRITE_DATA(client, TPM_DATA_FIFO, buf, size);
if (ret < 0)
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 066/104] tpm/tpm_ppi: Do not compare strcmp(a,b) == -1
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (60 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 065/104] tpm/tpm_i2c_stm_st33: Check return code of get_burstcount Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 067/104] ata: sata_mv: introduce compatible string "marvell, armada-370-sata" Greg Kroah-Hartman
` (38 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Peter Huewe
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Huewe <PeterHuewe@gmx.de>
commit 747d35bd9bb4ae6bd74b19baa5bbe32f3e0cee11 upstream.
Depending on the implementation strcmp might return the difference between
two strings not only -1,0,1 consequently
if (strcmp (a,b) == -1)
might lead to taking the wrong branch
-> compare with < 0 instead,
which in any case is more canonical.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/char/tpm/tpm_ppi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/char/tpm/tpm_ppi.c
+++ b/drivers/char/tpm/tpm_ppi.c
@@ -172,7 +172,7 @@ static ssize_t tpm_store_ppi_request(str
* is updated with function index from SUBREQ to SUBREQ2 since PPI
* version 1.1
*/
- if (strcmp(version, "1.1") == -1)
+ if (strcmp(version, "1.1") < 0)
params[2].integer.value = TPM_PPI_FN_SUBREQ;
else
params[2].integer.value = TPM_PPI_FN_SUBREQ2;
@@ -182,7 +182,7 @@ static ssize_t tpm_store_ppi_request(str
* string/package type. For PPI version 1.0 and 1.1, use buffer type
* for compatibility, and use package type since 1.2 according to spec.
*/
- if (strcmp(version, "1.2") == -1) {
+ if (strcmp(version, "1.2") < 0) {
params[3].type = ACPI_TYPE_BUFFER;
params[3].buffer.length = sizeof(req);
sscanf(buf, "%d", &req);
@@ -248,7 +248,7 @@ static ssize_t tpm_show_ppi_transition_a
* (e.g. Capella with PPI 1.0) need integer/string/buffer type, so for
* compatibility, define params[3].type as buffer, if PPI version < 1.2
*/
- if (strcmp(version, "1.2") == -1) {
+ if (strcmp(version, "1.2") < 0) {
params[3].type = ACPI_TYPE_BUFFER;
params[3].buffer.length = 0;
params[3].buffer.pointer = NULL;
@@ -390,7 +390,7 @@ static ssize_t show_ppi_operations(char
kfree(output.pointer);
output.length = ACPI_ALLOCATE_BUFFER;
output.pointer = NULL;
- if (strcmp(version, "1.2") == -1)
+ if (strcmp(version, "1.2") < 0)
return -EPERM;
params[2].integer.value = TPM_PPI_FN_GETOPR;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 067/104] ata: sata_mv: introduce compatible string "marvell, armada-370-sata"
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (61 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 066/104] tpm/tpm_ppi: Do not compare strcmp(a,b) == -1 Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 068/104] ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs Greg Kroah-Hartman
` (37 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Simon Guinot, Thomas Petazzoni,
Jason Cooper, Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Lior Amsalem, Tejun Heo
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Simon Guinot <simon.guinot@sequanux.org>
commit b1f5c73bd5a4752efb7d7af019034044b08aafe9 upstream.
The sata_mv driver supports the SATA IP found in several Marvell SoCs.
As some new SATA registers have been introduced with the Armada 370/XP
SoCs, a way to identify them is needed.
This patch introduces a new compatible string for the SATA IP found in
Armada 370/XP SoCs.
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Lior Amsalem <alior@marvell.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Documentation/devicetree/bindings/ata/marvell.txt | 2 +-
drivers/ata/sata_mv.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
--- a/Documentation/devicetree/bindings/ata/marvell.txt
+++ b/Documentation/devicetree/bindings/ata/marvell.txt
@@ -1,7 +1,7 @@
* Marvell Orion SATA
Required Properties:
-- compatibility : "marvell,orion-sata"
+- compatibility : "marvell,orion-sata" or "marvell,armada-370-sata"
- reg : Address range of controller
- interrupts : Interrupt controller is using
- nr-ports : Number of SATA ports in use.
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4216,6 +4216,7 @@ static int mv_platform_resume(struct pla
#ifdef CONFIG_OF
static struct of_device_id mv_sata_dt_ids[] = {
+ { .compatible = "marvell,armada-370-sata", },
{ .compatible = "marvell,orion-sata", },
{},
};
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 068/104] ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (62 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 067/104] ata: sata_mv: introduce compatible string "marvell, armada-370-sata" Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 069/104] libata: disable LPM for some WD SATA-I devices Greg Kroah-Hartman
` (36 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Lior Amsalem, Nadav Haklai,
Simon Guinot, Thomas Petazzoni, Jason Cooper, Andrew Lunn,
Gregory Clement, Sebastian Hesselbarth, Tejun Heo
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lior Amsalem <alior@marvell.com>
commit 9013d64e661fc2a37a1742670202171c27fef4b5 upstream.
On Armada 370/XP SoCs, once a disk is removed from a SATA port, then the
re-plug events are not detected by the sata_mv driver. This patch fixes
the issue by updating the PHY speed in the LP_PHY_CTL register (0x58)
according to the SControl speed.
Note that this fix is only applied if the compatible string
"marvell,armada-370-sata" is found in the SATA DT node.
Fixes: 9ae6f740b49f ("arm: mach-mvebu: add support for Armada 370 and Armada XP with DT")
Signed-off-by: Lior Amsalem <alior@marvell.com>
Signed-off-by: Nadav Haklai <nadavh@marvell.com>
Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/ata/sata_mv.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -304,6 +304,7 @@ enum {
MV5_LTMODE = 0x30,
MV5_PHY_CTL = 0x0C,
SATA_IFCFG = 0x050,
+ LP_PHY_CTL = 0x058,
MV_M2_PREAMP_MASK = 0x7e0,
@@ -431,6 +432,7 @@ enum {
MV_HP_CUT_THROUGH = (1 << 10), /* can use EDMA cut-through */
MV_HP_FLAG_SOC = (1 << 11), /* SystemOnChip, no PCI */
MV_HP_QUIRK_LED_BLINK_EN = (1 << 12), /* is led blinking enabled? */
+ MV_HP_FIX_LP_PHY_CTL = (1 << 13), /* fix speed in LP_PHY_CTL ? */
/* Port private flags (pp_flags) */
MV_PP_FLAG_EDMA_EN = (1 << 0), /* is EDMA engine enabled? */
@@ -1353,6 +1355,7 @@ static int mv_scr_write(struct ata_link
if (ofs != 0xffffffffU) {
void __iomem *addr = mv_ap_base(link->ap) + ofs;
+ struct mv_host_priv *hpriv = link->ap->host->private_data;
if (sc_reg_in == SCR_CONTROL) {
/*
* Workaround for 88SX60x1 FEr SATA#26:
@@ -1369,6 +1372,18 @@ static int mv_scr_write(struct ata_link
*/
if ((val & 0xf) == 1 || (readl(addr) & 0xf) == 1)
val |= 0xf000;
+
+ if (hpriv->hp_flags & MV_HP_FIX_LP_PHY_CTL) {
+ void __iomem *lp_phy_addr =
+ mv_ap_base(link->ap) + LP_PHY_CTL;
+ /*
+ * Set PHY speed according to SControl speed.
+ */
+ if ((val & 0xf0) == 0x10)
+ writelfl(0x7, lp_phy_addr);
+ else
+ writelfl(0x227, lp_phy_addr);
+ }
}
writelfl(val, addr);
return 0;
@@ -4111,6 +4126,15 @@ static int mv_platform_probe(struct plat
if (rc)
goto err;
+ /*
+ * To allow disk hotplug on Armada 370/XP SoCs, the PHY speed must be
+ * updated in the LP_PHY_CTL register.
+ */
+ if (pdev->dev.of_node &&
+ of_device_is_compatible(pdev->dev.of_node,
+ "marvell,armada-370-sata"))
+ hpriv->hp_flags |= MV_HP_FIX_LP_PHY_CTL;
+
/* initialize adapter */
rc = mv_init_host(host);
if (rc)
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 069/104] libata: disable LPM for some WD SATA-I devices
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (63 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 068/104] ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 070/104] ext4: avoid clearing beyond i_blocks when truncating an inline data file Greg Kroah-Hartman
` (35 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tejun Heo
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <tj@kernel.org>
commit ecd75ad514d73efc1bbcc5f10a13566c3ace5f53 upstream.
For some reason, some early WD drives spin up and down drives
erratically when the link is put into slumber mode which can reduce
the life expectancy of the device significantly. Unfortunately, we
don't have full list of devices and given the nature of the issue it'd
be better to err on the side of false positives than the other way
around. Let's disable LPM on all WD devices which match one of the
known problematic model prefixes and are SATA-I.
As horkage list doesn't support matching SATA capabilities, this is
implemented as two horkages - WD_BROKEN_LPM and NOLPM. The former is
set for the known prefixes and sets the latter if the matched device
is SATA-I.
Note that this isn't optimal as this disables all LPM operations and
partial link power state reportedly works fine on these; however, the
way LPM is implemented in libata makes it difficult to precisely map
libata LPM setting to specific link power state. Well, these devices
are already fairly outdated. Let's just disable whole LPM for now.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-and-tested-by: Nikos Barkas <levelwol@gmail.com>
Reported-and-tested-by: Ioannis Barkas <risc4all@yahoo.com>
References: https://bugzilla.kernel.org/show_bug.cgi?id=57211
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/ata/libata-core.c | 27 +++++++++++++++++++++++++++
drivers/ata/libata-scsi.c | 18 +++++++++++++++---
include/linux/libata.h | 2 ++
3 files changed, 44 insertions(+), 3 deletions(-)
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2199,6 +2199,16 @@ int ata_dev_configure(struct ata_device
if (rc)
return rc;
+ /* some WD SATA-1 drives have issues with LPM, turn on NOLPM for them */
+ if ((dev->horkage & ATA_HORKAGE_WD_BROKEN_LPM) &&
+ (id[ATA_ID_SATA_CAPABILITY] & 0xe) == 0x2)
+ dev->horkage |= ATA_HORKAGE_NOLPM;
+
+ if (dev->horkage & ATA_HORKAGE_NOLPM) {
+ ata_dev_warn(dev, "LPM support broken, forcing max_power\n");
+ dev->link->ap->target_lpm_policy = ATA_LPM_MAX_POWER;
+ }
+
/* let ACPI work its magic */
rc = ata_acpi_on_devcfg(dev);
if (rc)
@@ -4189,6 +4199,23 @@ static const struct ata_blacklist_entry
{ "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER },
{ "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER },
+ /*
+ * Some WD SATA-I drives spin up and down erratically when the link
+ * is put into the slumber mode. We don't have full list of the
+ * affected devices. Disable LPM if the device matches one of the
+ * known prefixes and is SATA-1. As a side effect LPM partial is
+ * lost too.
+ *
+ * https://bugzilla.kernel.org/show_bug.cgi?id=57211
+ */
+ { "WDC WD800JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
+ { "WDC WD1200JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
+ { "WDC WD1600JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
+ { "WDC WD2000JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
+ { "WDC WD2500JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
+ { "WDC WD3000JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
+ { "WDC WD3200JD-*", NULL, ATA_HORKAGE_WD_BROKEN_LPM },
+
/* End Marker */
{ }
};
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -112,12 +112,14 @@ static const char *ata_lpm_policy_names[
[ATA_LPM_MIN_POWER] = "min_power",
};
-static ssize_t ata_scsi_lpm_store(struct device *dev,
+static ssize_t ata_scsi_lpm_store(struct device *device,
struct device_attribute *attr,
const char *buf, size_t count)
{
- struct Scsi_Host *shost = class_to_shost(dev);
+ struct Scsi_Host *shost = class_to_shost(device);
struct ata_port *ap = ata_shost_to_port(shost);
+ struct ata_link *link;
+ struct ata_device *dev;
enum ata_lpm_policy policy;
unsigned long flags;
@@ -133,10 +135,20 @@ static ssize_t ata_scsi_lpm_store(struct
return -EINVAL;
spin_lock_irqsave(ap->lock, flags);
+
+ ata_for_each_link(link, ap, EDGE) {
+ ata_for_each_dev(dev, &ap->link, ENABLED) {
+ if (dev->horkage & ATA_HORKAGE_NOLPM) {
+ count = -EOPNOTSUPP;
+ goto out_unlock;
+ }
+ }
+ }
+
ap->target_lpm_policy = policy;
ata_port_schedule_eh(ap);
+out_unlock:
spin_unlock_irqrestore(ap->lock, flags);
-
return count;
}
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -400,6 +400,8 @@ enum {
ATA_HORKAGE_DUMP_ID = (1 << 16), /* dump IDENTIFY data */
ATA_HORKAGE_MAX_SEC_LBA48 = (1 << 17), /* Set max sects to 65535 */
ATA_HORKAGE_ATAPI_DMADIR = (1 << 18), /* device requires dmadir */
+ ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */
+ ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */
/* DMA mask for user DMA control: User visible values; DO NOT
renumber */
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 070/104] ext4: avoid clearing beyond i_blocks when truncating an inline data file
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (64 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 069/104] libata: disable LPM for some WD SATA-I devices Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 071/104] vfs: Is mounted should be testing mnt_ns for NULL or error Greg Kroah-Hartman
` (34 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Theodore Tso
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <tytso@mit.edu>
commit 09c455aaa8f47a94d5bafaa23d58365768210507 upstream.
A missing cast means that when we are truncating a file which is less
than 60 bytes, we don't clear the correct area of memory, and in fact
we can end up truncating the next inode in the inode table, or worse
yet, some other kernel data structure.
Addresses-Coverity-Id: #751987
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/ext4/inline.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1957,9 +1957,11 @@ void ext4_inline_data_truncate(struct in
}
/* Clear the content within i_blocks. */
- if (i_size < EXT4_MIN_INLINE_DATA_SIZE)
- memset(ext4_raw_inode(&is.iloc)->i_block + i_size, 0,
- EXT4_MIN_INLINE_DATA_SIZE - i_size);
+ if (i_size < EXT4_MIN_INLINE_DATA_SIZE) {
+ void *p = (void *) ext4_raw_inode(&is.iloc)->i_block;
+ memset(p + i_size, 0,
+ EXT4_MIN_INLINE_DATA_SIZE - i_size);
+ }
EXT4_I(inode)->i_inline_size = i_size <
EXT4_MIN_INLINE_DATA_SIZE ?
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 071/104] vfs: Is mounted should be testing mnt_ns for NULL or error.
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (65 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 070/104] ext4: avoid clearing beyond i_blocks when truncating an inline data file Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 072/104] bcache: Data corruption fix Greg Kroah-Hartman
` (33 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Eric W. Biederman, Al Viro
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Eric W. Biederman" <ebiederm@xmission.com>
commit 260a459d2e39761fbd39803497205ce1690bc7b1 upstream.
A bug was introduced with the is_mounted helper function in
commit f7a99c5b7c8bd3d3f533c8b38274e33f3da9096e
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Sat Jun 9 00:59:08 2012 -0400
get rid of ->mnt_longterm
it's enough to set ->mnt_ns of internal vfsmounts to something
distinct from all struct mnt_namespace out there; then we can
just use the check for ->mnt_ns != NULL in the fast path of
mntput_no_expire()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
The intent was to test if the real_mount(vfsmount)->mnt_ns was
NULL_OR_ERR but the code is actually testing real_mount(vfsmount)
and always returning true.
The result is d_absolute_path returning paths it should be hiding.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/mount.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -73,7 +73,7 @@ static inline int mnt_has_parent(struct
static inline int is_mounted(struct vfsmount *mnt)
{
/* neither detached nor internal? */
- return !IS_ERR_OR_NULL(real_mount(mnt));
+ return !IS_ERR_OR_NULL(real_mount(mnt)->mnt_ns);
}
extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 072/104] bcache: Data corruption fix
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (66 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 071/104] vfs: Is mounted should be testing mnt_ns for NULL or error Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 074/104] bnx2x: fix DMA unmapping of TSO split BDs Greg Kroah-Hartman
` (32 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kent Overstreet
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kent Overstreet <kmo@daterainc.com>
commit ef71ec00002d92a08eb27e9d036e3d48835b6597 upstream.
The code that handles overlapping extents that we've just read back in from disk
was depending on the behaviour of the code that handles overlapping extents as
we're inserting into a btree node in the case of an insert that forced an
existing extent to be split: on insert, if we had to split we'd also insert a
new extent to represent the top part of the old extent - and then that new
extent would get written out.
The code that read the extents back in thus not bother with splitting extents -
if it saw an extent that ovelapped in the middle of an older extent, it would
trim the old extent to only represent the bottom part, assuming that the
original insert would've inserted a new extent to represent the top part.
I still haven't figured out _how_ it can happen, but I'm now pretty convinced
(and testing has confirmed) that there's some kind of an obscure corner case
(probably involving extent merging, and multiple overwrites in different sets)
that breaks this. The fix is to change the mergesort fixup code to split extents
itself when required.
Signed-off-by: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/bcache/bset.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
--- a/drivers/md/bcache/bset.c
+++ b/drivers/md/bcache/bset.c
@@ -927,7 +927,7 @@ static void sort_key_next(struct btree_i
*i = iter->data[--iter->used];
}
-static void btree_sort_fixup(struct btree_iter *iter)
+static struct bkey *btree_sort_fixup(struct btree_iter *iter, struct bkey *tmp)
{
while (iter->used > 1) {
struct btree_iter_set *top = iter->data, *i = top + 1;
@@ -955,9 +955,22 @@ static void btree_sort_fixup(struct btre
} else {
/* can't happen because of comparison func */
BUG_ON(!bkey_cmp(&START_KEY(top->k), &START_KEY(i->k)));
- bch_cut_back(&START_KEY(i->k), top->k);
+
+ if (bkey_cmp(i->k, top->k) < 0) {
+ bkey_copy(tmp, top->k);
+
+ bch_cut_back(&START_KEY(i->k), tmp);
+ bch_cut_front(i->k, top->k);
+ heap_sift(iter, 0, btree_iter_cmp);
+
+ return tmp;
+ } else {
+ bch_cut_back(&START_KEY(i->k), top->k);
+ }
}
}
+
+ return NULL;
}
static void btree_mergesort(struct btree *b, struct bset *out,
@@ -965,15 +978,20 @@ static void btree_mergesort(struct btree
bool fixup, bool remove_stale)
{
struct bkey *k, *last = NULL;
+ BKEY_PADDED(k) tmp;
bool (*bad)(struct btree *, const struct bkey *) = remove_stale
? bch_ptr_bad
: bch_ptr_invalid;
while (!btree_iter_end(iter)) {
if (fixup && !b->level)
- btree_sort_fixup(iter);
+ k = btree_sort_fixup(iter, &tmp.k);
+ else
+ k = NULL;
+
+ if (!k)
+ k = bch_btree_iter_next(iter);
- k = bch_btree_iter_next(iter);
if (bad(b, k))
continue;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 074/104] bnx2x: fix DMA unmapping of TSO split BDs
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (67 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 072/104] bcache: Data corruption fix Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 075/104] inet_diag: fix inet_diag_dump_icsk() timewait socket state logic Greg Kroah-Hartman
` (31 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Michal Schmidt, Eric Dumazet,
Dmitry Kravkov, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Schmidt <mschmidt@redhat.com>
[ Upstream commit 95e92fd40c967c363ad66b2fd1ce4dcd68132e54 ]
bnx2x triggers warnings with CONFIG_DMA_API_DEBUG=y:
WARNING: CPU: 0 PID: 2253 at lib/dma-debug.c:887 check_unmap+0xf8/0x920()
bnx2x 0000:28:00.0: DMA-API: device driver frees DMA memory with
different size [device address=0x00000000da2b389e] [map size=1490 bytes]
[unmap size=66 bytes]
The reason is that bnx2x splits a TSO BD into two BDs (headers + data)
using one DMA mapping for both, but it uses only the length of the first
BD when unmapping.
This patch fixes the bug by unmapping the whole length of the two BDs.
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -153,6 +153,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2
struct sk_buff *skb = tx_buf->skb;
u16 bd_idx = TX_BD(tx_buf->first_bd), new_cons;
int nbd;
+ u16 split_bd_len = 0;
/* prefetch skb end pointer to speedup dev_kfree_skb() */
prefetch(&skb->end);
@@ -160,10 +161,7 @@ static u16 bnx2x_free_tx_pkt(struct bnx2
DP(NETIF_MSG_TX_DONE, "fp[%d]: pkt_idx %d buff @(%p)->skb %p\n",
txdata->txq_index, idx, tx_buf, skb);
- /* unmap first bd */
tx_start_bd = &txdata->tx_desc_ring[bd_idx].start_bd;
- dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd),
- BD_UNMAP_LEN(tx_start_bd), DMA_TO_DEVICE);
nbd = le16_to_cpu(tx_start_bd->nbd) - 1;
@@ -182,12 +180,19 @@ static u16 bnx2x_free_tx_pkt(struct bnx2
--nbd;
bd_idx = TX_BD(NEXT_TX_IDX(bd_idx));
- /* ...and the TSO split header bd since they have no mapping */
+ /* TSO headers+data bds share a common mapping. See bnx2x_tx_split() */
if (tx_buf->flags & BNX2X_TSO_SPLIT_BD) {
+ tx_data_bd = &txdata->tx_desc_ring[bd_idx].reg_bd;
+ split_bd_len = BD_UNMAP_LEN(tx_data_bd);
--nbd;
bd_idx = TX_BD(NEXT_TX_IDX(bd_idx));
}
+ /* unmap first bd */
+ dma_unmap_single(&bp->pdev->dev, BD_UNMAP_ADDR(tx_start_bd),
+ BD_UNMAP_LEN(tx_start_bd) + split_bd_len,
+ DMA_TO_DEVICE);
+
/* now free frags */
while (nbd > 0) {
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 075/104] inet_diag: fix inet_diag_dump_icsk() timewait socket state logic
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (68 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 074/104] bnx2x: fix DMA unmapping of TSO split BDs Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 076/104] ieee802154: Fix memory leak in ieee802154_add_iface() Greg Kroah-Hartman
` (30 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Neal Cardwell, Eric Dumazet
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neal Cardwell <ncardwell@google.com>
[ Based upon upstream commit 70315d22d3c7383f9a508d0aab21e2eb35b2303a ]
Fix inet_diag_dump_icsk() to reflect the fact that both TIME_WAIT and
FIN_WAIT2 connections are represented by inet_timewait_sock (not just
TIME_WAIT). Thus:
(a) We need to iterate through the time_wait buckets if the user wants
either TIME_WAIT or FIN_WAIT2. (Before fixing this, "ss -nemoi state
fin-wait-2" would not return any sockets, even if there were some in
FIN_WAIT2.)
(b) We need to check tw_substate to see if the user wants to dump
sockets in the particular substate (TIME_WAIT or FIN_WAIT2) that a
given connection is in. (Before fixing this, "ss -nemoi state
time-wait" would actually return sockets in state FIN_WAIT2.)
An analogous fix is in v3.13: 70315d22d3c7383f9a508d0aab21e2eb35b2303a
("inet_diag: fix inet_diag_dump_icsk() to use correct state for
timewait sockets") but that patch is quite different because 3.13 code
is very different in this area due to the unification of TCP hash
tables in 05dbc7b ("tcp/dccp: remove twchain") in v3.13-rc1.
I tested that this applies cleanly between v3.3 and v3.12, and tested
that it works in both 3.3 and 3.12. It does not apply cleanly to 3.2
and earlier (though it makes semantic sense), and semantically is not
the right fix for 3.13 and beyond (as mentioned above).
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/inet_diag.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -961,7 +961,7 @@ next_normal:
++num;
}
- if (r->idiag_states & TCPF_TIME_WAIT) {
+ if (r->idiag_states & (TCPF_TIME_WAIT | TCPF_FIN_WAIT2)) {
struct inet_timewait_sock *tw;
inet_twsk_for_each(tw, node,
@@ -971,6 +971,8 @@ next_normal:
if (num < s_num)
goto next_dying;
+ if (!(r->idiag_states & (1 << tw->tw_substate)))
+ goto next_dying;
if (r->sdiag_family != AF_UNSPEC &&
tw->tw_family != r->sdiag_family)
goto next_dying;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 076/104] ieee802154: Fix memory leak in ieee802154_add_iface()
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (69 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 075/104] inet_diag: fix inet_diag_dump_icsk() timewait socket state logic Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 077/104] net: avoid reference counter overflows on fib_rules in multicast forwarding Greg Kroah-Hartman
` (29 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Christian Engelmayer, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christian Engelmayer <cengelma@gmx.at>
[ Upstream commit 267d29a69c6af39445f36102a832b25ed483f299 ]
Fix a memory leak in the ieee802154_add_iface() error handling path.
Detected by Coverity: CID 710490.
Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ieee802154/nl-phy.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/net/ieee802154/nl-phy.c
+++ b/net/ieee802154/nl-phy.c
@@ -224,8 +224,10 @@ static int ieee802154_add_iface(struct s
if (info->attrs[IEEE802154_ATTR_DEV_TYPE]) {
type = nla_get_u8(info->attrs[IEEE802154_ATTR_DEV_TYPE]);
- if (type >= __IEEE802154_DEV_MAX)
- return -EINVAL;
+ if (type >= __IEEE802154_DEV_MAX) {
+ rc = -EINVAL;
+ goto nla_put_failure;
+ }
}
dev = phy->add_iface(phy, devname, type);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 077/104] net: avoid reference counter overflows on fib_rules in multicast forwarding
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (70 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 076/104] ieee802154: Fix memory leak in ieee802154_add_iface() Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 078/104] net,via-rhine: Fix tx_timeout handling Greg Kroah-Hartman
` (28 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Bob Falken, Patrick McHardy,
Thomas Graf, Julian Anastasov, Eric Dumazet, Hannes Frederic Sowa,
Eric Dumazet, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hannes Frederic Sowa <hannes@stressinduktion.org>
[ Upstream commit 95f4a45de1a0f172b35451fc52283290adb21f6e ]
Bob Falken reported that after 4G packets, multicast forwarding stopped
working. This was because of a rule reference counter overflow which
freed the rule as soon as the overflow happend.
This patch solves this by adding the FIB_LOOKUP_NOREF flag to
fib_rules_lookup calls. This is safe even from non-rcu locked sections
as in this case the flag only implies not taking a reference to the rule,
which we don't need at all.
Rules only hold references to the namespace, which are guaranteed to be
available during the call of the non-rcu protected function reg_vif_xmit
because of the interface reference which itself holds a reference to
the net namespace.
Fixes: f0ad0860d01e47 ("ipv4: ipmr: support multiple tables")
Fixes: d1db275dd3f6e4 ("ipv6: ip6mr: support multiple tables")
Reported-by: Bob Falken <NetFestivalHaveFun@gmx.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Julian Anastasov <ja@ssi.bg>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/ipmr.c | 7 +++++--
net/ipv6/ip6mr.c | 7 +++++--
2 files changed, 10 insertions(+), 4 deletions(-)
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -157,9 +157,12 @@ static struct mr_table *ipmr_get_table(s
static int ipmr_fib_lookup(struct net *net, struct flowi4 *flp4,
struct mr_table **mrt)
{
- struct ipmr_result res;
- struct fib_lookup_arg arg = { .result = &res, };
int err;
+ struct ipmr_result res;
+ struct fib_lookup_arg arg = {
+ .result = &res,
+ .flags = FIB_LOOKUP_NOREF,
+ };
err = fib_rules_lookup(net->ipv4.mr_rules_ops,
flowi4_to_flowi(flp4), 0, &arg);
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -141,9 +141,12 @@ static struct mr6_table *ip6mr_get_table
static int ip6mr_fib_lookup(struct net *net, struct flowi6 *flp6,
struct mr6_table **mrt)
{
- struct ip6mr_result res;
- struct fib_lookup_arg arg = { .result = &res, };
int err;
+ struct ip6mr_result res;
+ struct fib_lookup_arg arg = {
+ .result = &res,
+ .flags = FIB_LOOKUP_NOREF,
+ };
err = fib_rules_lookup(net->ipv6.mr6_rules_ops,
flowi6_to_flowi(flp6), 0, &arg);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 078/104] net,via-rhine: Fix tx_timeout handling
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (71 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 077/104] net: avoid reference counter overflows on fib_rules in multicast forwarding Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 079/104] net: rds: fix per-cpu helper usage Greg Kroah-Hartman
` (27 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Richard Weinberger, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Richard Weinberger <richard@nod.at>
[ Upstream commit a926592f5e4e900f3fa903298c4619a131e60963 ]
rhine_reset_task() misses to disable the tx scheduler upon reset,
this can lead to a crash if work is still scheduled while we're resetting
the tx queue.
Fixes:
[ 93.591707] BUG: unable to handle kernel NULL pointer dereference at 0000004c
[ 93.595514] IP: [<c119d10d>] rhine_napipoll+0x491/0x6
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/ethernet/via/via-rhine.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -1611,6 +1611,7 @@ static void rhine_reset_task(struct work
goto out_unlock;
napi_disable(&rp->napi);
+ netif_tx_disable(dev);
spin_lock_bh(&rp->lock);
/* clear all descriptors */
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 079/104] net: rds: fix per-cpu helper usage
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (72 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 078/104] net,via-rhine: Fix tx_timeout handling Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 080/104] tcp: metrics: Avoid duplicate entries with the same destination-IP Greg Kroah-Hartman
` (26 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
[ Upstream commit c196403b79aa241c3fefb3ee5bb328aa7c5cc860 ]
commit ae4b46e9d "net: rds: use this_cpu_* per-cpu helper" broke per-cpu
handling for rds. chpfirst is the result of __this_cpu_read(), so it is
an absolute pointer and not __percpu. Therefore, __this_cpu_write()
should not operate on chpfirst, but rather on cache->percpu->first, just
like __this_cpu_read() did before.
Signed-off-byd Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/rds/ib_recv.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -421,8 +421,7 @@ static void rds_ib_recv_cache_put(struct
struct rds_ib_refill_cache *cache)
{
unsigned long flags;
- struct list_head *old;
- struct list_head __percpu *chpfirst;
+ struct list_head *old, *chpfirst;
local_irq_save(flags);
@@ -432,7 +431,7 @@ static void rds_ib_recv_cache_put(struct
else /* put on front */
list_add_tail(new_item, chpfirst);
- __this_cpu_write(chpfirst, new_item);
+ __this_cpu_write(cache->percpu->first, new_item);
__this_cpu_inc(cache->percpu->count);
if (__this_cpu_read(cache->percpu->count) < RDS_IB_RECYCLE_BATCH_COUNT)
@@ -452,7 +451,7 @@ static void rds_ib_recv_cache_put(struct
} while (old);
- __this_cpu_write(chpfirst, NULL);
+ __this_cpu_write(cache->percpu->first, NULL);
__this_cpu_write(cache->percpu->count, 0);
end:
local_irq_restore(flags);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 080/104] tcp: metrics: Avoid duplicate entries with the same destination-IP
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (73 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 079/104] net: rds: fix per-cpu helper usage Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 081/104] bpf: do not use reciprocal divide Greg Kroah-Hartman
` (25 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Christoph Paasch, Eric Dumazet,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christoph Paasch <christoph.paasch@uclouvain.be>
[ Upstream commit 77f99ad16a07aa062c2d30fae57b1fee456f6ef6 ]
Because the tcp-metrics is an RCU-list, it may be that two
soft-interrupts are inside __tcp_get_metrics() for the same
destination-IP at the same time. If this destination-IP is not yet part of
the tcp-metrics, both soft-interrupts will end up in tcpm_new and create
a new entry for this IP.
So, we will have two tcp-metrics with the same destination-IP in the list.
This patch checks twice __tcp_get_metrics(). First without holding the
lock, then while holding the lock. The second one is there to confirm
that the entry has not been added by another soft-irq while waiting for
the spin-lock.
Fixes: 51c5d0c4b169b (tcp: Maintain dynamic metrics in local cache.)
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/tcp_metrics.c | 51 ++++++++++++++++++++++++++++++-------------------
1 file changed, 32 insertions(+), 19 deletions(-)
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -22,6 +22,9 @@
int sysctl_tcp_nometrics_save __read_mostly;
+static struct tcp_metrics_block *__tcp_get_metrics(const struct inetpeer_addr *addr,
+ struct net *net, unsigned int hash);
+
struct tcp_fastopen_metrics {
u16 mss;
u16 syn_loss:10; /* Recurring Fast Open SYN losses */
@@ -130,16 +133,41 @@ static void tcpm_suck_dst(struct tcp_met
}
}
+#define TCP_METRICS_TIMEOUT (60 * 60 * HZ)
+
+static void tcpm_check_stamp(struct tcp_metrics_block *tm, struct dst_entry *dst)
+{
+ if (tm && unlikely(time_after(jiffies, tm->tcpm_stamp + TCP_METRICS_TIMEOUT)))
+ tcpm_suck_dst(tm, dst, false);
+}
+
+#define TCP_METRICS_RECLAIM_DEPTH 5
+#define TCP_METRICS_RECLAIM_PTR (struct tcp_metrics_block *) 0x1UL
+
static struct tcp_metrics_block *tcpm_new(struct dst_entry *dst,
struct inetpeer_addr *addr,
- unsigned int hash,
- bool reclaim)
+ unsigned int hash)
{
struct tcp_metrics_block *tm;
struct net *net;
+ bool reclaim = false;
spin_lock_bh(&tcp_metrics_lock);
net = dev_net(dst->dev);
+
+ /* While waiting for the spin-lock the cache might have been populated
+ * with this entry and so we have to check again.
+ */
+ tm = __tcp_get_metrics(addr, net, hash);
+ if (tm == TCP_METRICS_RECLAIM_PTR) {
+ reclaim = true;
+ tm = NULL;
+ }
+ if (tm) {
+ tcpm_check_stamp(tm, dst);
+ goto out_unlock;
+ }
+
if (unlikely(reclaim)) {
struct tcp_metrics_block *oldest;
@@ -169,17 +197,6 @@ out_unlock:
return tm;
}
-#define TCP_METRICS_TIMEOUT (60 * 60 * HZ)
-
-static void tcpm_check_stamp(struct tcp_metrics_block *tm, struct dst_entry *dst)
-{
- if (tm && unlikely(time_after(jiffies, tm->tcpm_stamp + TCP_METRICS_TIMEOUT)))
- tcpm_suck_dst(tm, dst, false);
-}
-
-#define TCP_METRICS_RECLAIM_DEPTH 5
-#define TCP_METRICS_RECLAIM_PTR (struct tcp_metrics_block *) 0x1UL
-
static struct tcp_metrics_block *tcp_get_encode(struct tcp_metrics_block *tm, int depth)
{
if (tm)
@@ -280,7 +297,6 @@ static struct tcp_metrics_block *tcp_get
struct inetpeer_addr addr;
unsigned int hash;
struct net *net;
- bool reclaim;
addr.family = sk->sk_family;
switch (addr.family) {
@@ -300,13 +316,10 @@ static struct tcp_metrics_block *tcp_get
hash = hash_32(hash, net->ipv4.tcp_metrics_hash_log);
tm = __tcp_get_metrics(&addr, net, hash);
- reclaim = false;
- if (tm == TCP_METRICS_RECLAIM_PTR) {
- reclaim = true;
+ if (tm == TCP_METRICS_RECLAIM_PTR)
tm = NULL;
- }
if (!tm && create)
- tm = tcpm_new(dst, &addr, hash, reclaim);
+ tm = tcpm_new(dst, &addr, hash);
else
tcpm_check_stamp(tm, dst);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 081/104] bpf: do not use reciprocal divide
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (74 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 080/104] tcp: metrics: Avoid duplicate entries with the same destination-IP Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 082/104] s390/bpf,jit: fix 32 bit divisions, use unsigned divide instructions Greg Kroah-Hartman
` (24 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Eric Dumazet, Jakub Zawadzki,
Mircea Gherzan, Daniel Borkmann, Hannes Frederic Sowa, Matt Evans,
Martin Schwidefsky, Heiko Carstens, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit aee636c4809fa54848ff07a899b326eb1f9987a2 ]
At first Jakub Zawadzki noticed that some divisions by reciprocal_divide
were not correct. (off by one in some cases)
http://www.wireshark.org/~darkjames/reciprocal-buggy.c
He could also show this with BPF:
http://www.wireshark.org/~darkjames/set-and-dump-filter-k-bug.c
The reciprocal divide in linux kernel is not generic enough,
lets remove its use in BPF, as it is not worth the pain with
current cpus.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Cc: Mircea Gherzan <mgherzan@gmail.com>
Cc: Daniel Borkmann <dxchgb@gmail.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: Matt Evans <matt@ozlabs.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/arm/net/bpf_jit_32.c | 6 +++---
arch/powerpc/net/bpf_jit_comp.c | 7 ++++---
arch/s390/net/bpf_jit_comp.c | 17 ++++++++++++-----
arch/sparc/net/bpf_jit_comp.c | 17 ++++++++++++++---
arch/x86/net/bpf_jit_comp.c | 14 ++++++++++----
net/core/filter.c | 30 ++----------------------------
6 files changed, 45 insertions(+), 46 deletions(-)
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -637,10 +637,10 @@ load_ind:
emit(ARM_MUL(r_A, r_A, r_X), ctx);
break;
case BPF_S_ALU_DIV_K:
- /* current k == reciprocal_value(userspace k) */
+ if (k == 1)
+ break;
emit_mov_i(r_scratch, k, ctx);
- /* A = top 32 bits of the product */
- emit(ARM_UMULL(r_scratch, r_A, r_A, r_scratch), ctx);
+ emit_udiv(r_A, r_A, r_scratch, ctx);
break;
case BPF_S_ALU_DIV_X:
update_on_xread(ctx);
--- a/arch/powerpc/net/bpf_jit_comp.c
+++ b/arch/powerpc/net/bpf_jit_comp.c
@@ -209,10 +209,11 @@ static int bpf_jit_build_body(struct sk_
}
PPC_DIVWU(r_A, r_A, r_X);
break;
- case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K); */
+ case BPF_S_ALU_DIV_K: /* A /= K */
+ if (K == 1)
+ break;
PPC_LI32(r_scratch1, K);
- /* Top 32 bits of 64bit result -> A */
- PPC_MULHWU(r_A, r_A, r_scratch1);
+ PPC_DIVWU(r_A, r_A, r_scratch1);
break;
case BPF_S_ALU_AND_X:
ctx->seen |= SEEN_XREG;
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -338,11 +338,13 @@ static int bpf_jit_insn(struct bpf_jit *
/* dr %r4,%r12 */
EMIT2(0x1d4c);
break;
- case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K) */
- /* m %r4,<d(K)>(%r13) */
- EMIT4_DISP(0x5c40d000, EMIT_CONST(K));
- /* lr %r5,%r4 */
- EMIT2(0x1854);
+ case BPF_S_ALU_DIV_K: /* A /= K */
+ if (K == 1)
+ break;
+ /* lhi %r4,0 */
+ EMIT4(0xa7480000);
+ /* d %r4,<d(K)>(%r13) */
+ EMIT4_DISP(0x5d40d000, EMIT_CONST(K));
break;
case BPF_S_ALU_MOD_X: /* A %= X */
jit->seen |= SEEN_XREG | SEEN_RET0;
@@ -358,6 +360,11 @@ static int bpf_jit_insn(struct bpf_jit *
EMIT2(0x1854);
break;
case BPF_S_ALU_MOD_K: /* A %= K */
+ if (K == 1) {
+ /* lhi %r5,0 */
+ EMIT4(0xa7580000);
+ break;
+ }
/* lhi %r4,0 */
EMIT4(0xa7480000);
/* d %r4,<d(K)>(%r13) */
--- a/arch/sparc/net/bpf_jit_comp.c
+++ b/arch/sparc/net/bpf_jit_comp.c
@@ -497,9 +497,20 @@ void bpf_jit_compile(struct sk_filter *f
case BPF_S_ALU_MUL_K: /* A *= K */
emit_alu_K(MUL, K);
break;
- case BPF_S_ALU_DIV_K: /* A /= K */
- emit_alu_K(MUL, K);
- emit_read_y(r_A);
+ case BPF_S_ALU_DIV_K: /* A /= K with K != 0*/
+ if (K == 1)
+ break;
+ emit_write_y(G0);
+#ifdef CONFIG_SPARC32
+ /* The Sparc v8 architecture requires
+ * three instructions between a %y
+ * register write and the first use.
+ */
+ emit_nop();
+ emit_nop();
+ emit_nop();
+#endif
+ emit_alu_K(DIV, K);
break;
case BPF_S_ALU_DIV_X: /* A /= X; */
emit_cmpi(r_X, 0);
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -324,15 +324,21 @@ void bpf_jit_compile(struct sk_filter *f
EMIT2(0x89, 0xd0); /* mov %edx,%eax */
break;
case BPF_S_ALU_MOD_K: /* A %= K; */
+ if (K == 1) {
+ CLEAR_A();
+ break;
+ }
EMIT2(0x31, 0xd2); /* xor %edx,%edx */
EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */
EMIT2(0xf7, 0xf1); /* div %ecx */
EMIT2(0x89, 0xd0); /* mov %edx,%eax */
break;
- case BPF_S_ALU_DIV_K: /* A = reciprocal_divide(A, K); */
- EMIT3(0x48, 0x69, 0xc0); /* imul imm32,%rax,%rax */
- EMIT(K, 4);
- EMIT4(0x48, 0xc1, 0xe8, 0x20); /* shr $0x20,%rax */
+ case BPF_S_ALU_DIV_K: /* A /= K */
+ if (K == 1)
+ break;
+ EMIT2(0x31, 0xd2); /* xor %edx,%edx */
+ EMIT1(0xb9);EMIT(K, 4); /* mov imm32,%ecx */
+ EMIT2(0xf7, 0xf1); /* div %ecx */
break;
case BPF_S_ALU_AND_X:
seen |= SEEN_XREG;
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -36,7 +36,6 @@
#include <asm/uaccess.h>
#include <asm/unaligned.h>
#include <linux/filter.h>
-#include <linux/reciprocal_div.h>
#include <linux/ratelimit.h>
#include <linux/seccomp.h>
#include <linux/if_vlan.h>
@@ -166,7 +165,7 @@ unsigned int sk_run_filter(const struct
A /= X;
continue;
case BPF_S_ALU_DIV_K:
- A = reciprocal_divide(A, K);
+ A /= K;
continue;
case BPF_S_ALU_MOD_X:
if (X == 0)
@@ -553,11 +552,6 @@ int sk_chk_filter(struct sock_filter *fi
/* Some instructions need special checks */
switch (code) {
case BPF_S_ALU_DIV_K:
- /* check for division by zero */
- if (ftest->k == 0)
- return -EINVAL;
- ftest->k = reciprocal_value(ftest->k);
- break;
case BPF_S_ALU_MOD_K:
/* check for division by zero */
if (ftest->k == 0)
@@ -853,27 +847,7 @@ void sk_decode_filter(struct sock_filter
to->code = decodes[code];
to->jt = filt->jt;
to->jf = filt->jf;
-
- if (code == BPF_S_ALU_DIV_K) {
- /*
- * When loaded this rule user gave us X, which was
- * translated into R = r(X). Now we calculate the
- * RR = r(R) and report it back. If next time this
- * value is loaded and RRR = r(RR) is calculated
- * then the R == RRR will be true.
- *
- * One exception. X == 1 translates into R == 0 and
- * we can't calculate RR out of it with r().
- */
-
- if (filt->k == 0)
- to->k = 1;
- else
- to->k = reciprocal_value(filt->k);
-
- BUG_ON(reciprocal_value(to->k) != filt->k);
- } else
- to->k = filt->k;
+ to->k = filt->k;
}
int sk_get_filter(struct sock *sk, struct sock_filter __user *ubuf, unsigned int len)
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 082/104] s390/bpf,jit: fix 32 bit divisions, use unsigned divide instructions
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (75 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 081/104] bpf: do not use reciprocal divide Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 083/104] ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called Greg Kroah-Hartman
` (23 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Heiko Carstens, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Carstens <heiko.carstens@de.ibm.com>
[ Upstream commit 3af57f78c38131b7a66e2b01e06fdacae01992a3 ]
The s390 bpf jit compiler emits the signed divide instructions "dr" and "d"
for unsigned divisions.
This can cause problems: the dividend will be zero extended to a 64 bit value
and the divisor is the 32 bit signed value as specified A or X accumulator,
even though A and X are supposed to be treated as unsigned values.
The divide instrunctions will generate an exception if the result cannot be
expressed with a 32 bit signed value.
This is the case if e.g. the dividend is 0xffffffff and the divisor either 1
or also 0xffffffff (signed: -1).
To avoid all these issues simply use unsigned divide instructions.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/s390/net/bpf_jit_comp.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -335,16 +335,16 @@ static int bpf_jit_insn(struct bpf_jit *
EMIT4_PCREL(0xa7840000, (jit->ret0_ip - jit->prg));
/* lhi %r4,0 */
EMIT4(0xa7480000);
- /* dr %r4,%r12 */
- EMIT2(0x1d4c);
+ /* dlr %r4,%r12 */
+ EMIT4(0xb997004c);
break;
case BPF_S_ALU_DIV_K: /* A /= K */
if (K == 1)
break;
/* lhi %r4,0 */
EMIT4(0xa7480000);
- /* d %r4,<d(K)>(%r13) */
- EMIT4_DISP(0x5d40d000, EMIT_CONST(K));
+ /* dl %r4,<d(K)>(%r13) */
+ EMIT6_DISP(0xe340d000, 0x0097, EMIT_CONST(K));
break;
case BPF_S_ALU_MOD_X: /* A %= X */
jit->seen |= SEEN_XREG | SEEN_RET0;
@@ -354,8 +354,8 @@ static int bpf_jit_insn(struct bpf_jit *
EMIT4_PCREL(0xa7840000, (jit->ret0_ip - jit->prg));
/* lhi %r4,0 */
EMIT4(0xa7480000);
- /* dr %r4,%r12 */
- EMIT2(0x1d4c);
+ /* dlr %r4,%r12 */
+ EMIT4(0xb997004c);
/* lr %r5,%r4 */
EMIT2(0x1854);
break;
@@ -367,8 +367,8 @@ static int bpf_jit_insn(struct bpf_jit *
}
/* lhi %r4,0 */
EMIT4(0xa7480000);
- /* d %r4,<d(K)>(%r13) */
- EMIT4_DISP(0x5d40d000, EMIT_CONST(K));
+ /* dl %r4,<d(K)>(%r13) */
+ EMIT6_DISP(0xe340d000, 0x0097, EMIT_CONST(K));
/* lr %r5,%r4 */
EMIT2(0x1854);
break;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 083/104] ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (76 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 082/104] s390/bpf,jit: fix 32 bit divisions, use unsigned divide instructions Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 084/104] fib_frontend: fix possible NULL pointer dereference Greg Kroah-Hartman
` (22 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Duan Jiong, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
[ Upstream commit 11c21a307d79ea5f6b6fc0d3dfdeda271e5e65f6 ]
commit a622260254ee48("ip_tunnel: fix kernel panic with icmp_dest_unreach")
clear IPCB in ip_tunnel_xmit() , or else skb->cb[] may contain garbage from
GSO segmentation layer.
But commit 0e6fbc5b6c621("ip_tunnels: extend iptunnel_xmit()") refactor codes,
and it clear IPCB behind the dst_link_failure().
So clear IPCB in ip_tunnel_xmit() just like commti a622260254ee48("ip_tunnel:
fix kernel panic with icmp_dest_unreach").
Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/ip_tunnel.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -636,6 +636,7 @@ void ip_tunnel_xmit(struct sk_buff *skb,
tunnel->err_time + IPTUNNEL_ERR_TIMEO)) {
tunnel->err_count--;
+ memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
dst_link_failure(skb);
} else
tunnel->err_count = 0;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 084/104] fib_frontend: fix possible NULL pointer dereference
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (77 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 083/104] ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 085/104] net: Fix memory leak if TPROXY used with TCP early demux Greg Kroah-Hartman
` (21 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Oliver Hartkopp, Eric Dumazet,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Hartkopp <socketcan@hartkopp.net>
[ Upstream commit a0065f266a9b5d51575535a25c15ccbeed9a9966 ]
The two commits 0115e8e30d (net: remove delay at device dismantle) and
748e2d9396a (net: reinstate rtnl in call_netdevice_notifiers()) silently
removed a NULL pointer check for in_dev since Linux 3.7.
This patch re-introduces this check as it causes crashing the kernel when
setting small mtu values on non-ip capable netdevices.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/fib_frontend.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -1049,6 +1049,8 @@ static int fib_netdev_event(struct notif
}
in_dev = __in_dev_get_rtnl(dev);
+ if (!in_dev)
+ return NOTIFY_DONE;
switch (event) {
case NETDEV_UP:
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 085/104] net: Fix memory leak if TPROXY used with TCP early demux
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (78 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 084/104] fib_frontend: fix possible NULL pointer dereference Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 086/104] xen-netfront: fix resource leak in netfront Greg Kroah-Hartman
` (20 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Florian Westphal, Holger Eitzenberger,
David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Holger Eitzenberger <holger@eitzenberger.org>
[ Upstream commit a452ce345d63ddf92cd101e4196569f8718ad319 ]
I see a memory leak when using a transparent HTTP proxy using TPROXY
together with TCP early demux and Kernel v3.8.13.15 (Ubuntu stable):
unreferenced object 0xffff88008cba4a40 (size 1696):
comm "softirq", pid 0, jiffies 4294944115 (age 8907.520s)
hex dump (first 32 bytes):
0a e0 20 6a 40 04 1b 37 92 be 32 e2 e8 b4 00 00 .. j@..7..2.....
02 00 07 01 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff810b710a>] kmem_cache_alloc+0xad/0xb9
[<ffffffff81270185>] sk_prot_alloc+0x29/0xc5
[<ffffffff812702cf>] sk_clone_lock+0x14/0x283
[<ffffffff812aaf3a>] inet_csk_clone_lock+0xf/0x7b
[<ffffffff8129a893>] netlink_broadcast+0x14/0x16
[<ffffffff812c1573>] tcp_create_openreq_child+0x1b/0x4c3
[<ffffffff812c033e>] tcp_v4_syn_recv_sock+0x38/0x25d
[<ffffffff812c13e4>] tcp_check_req+0x25c/0x3d0
[<ffffffff812bf87a>] tcp_v4_do_rcv+0x287/0x40e
[<ffffffff812a08a7>] ip_route_input_noref+0x843/0xa55
[<ffffffff812bfeca>] tcp_v4_rcv+0x4c9/0x725
[<ffffffff812a26f4>] ip_local_deliver_finish+0xe9/0x154
[<ffffffff8127a927>] __netif_receive_skb+0x4b2/0x514
[<ffffffff8127aa77>] process_backlog+0xee/0x1c5
[<ffffffff8127c949>] net_rx_action+0xa7/0x200
[<ffffffff81209d86>] add_interrupt_randomness+0x39/0x157
But there are many more, resulting in the machine going OOM after some
days.
>>From looking at the TPROXY code, and with help from Florian, I see
that the memory leak is introduced in tcp_v4_early_demux():
void tcp_v4_early_demux(struct sk_buff *skb)
{
/* ... */
iph = ip_hdr(skb);
th = tcp_hdr(skb);
if (th->doff < sizeof(struct tcphdr) / 4)
return;
sk = __inet_lookup_established(dev_net(skb->dev), &tcp_hashinfo,
iph->saddr, th->source,
iph->daddr, ntohs(th->dest),
skb->skb_iif);
if (sk) {
skb->sk = sk;
where the socket is assigned unconditionally to skb->sk, also bumping
the refcnt on it. This is problematic, because in our case the skb
has already a socket assigned in the TPROXY target. This then results
in the leak I see.
The very same issue seems to be with IPv6, but haven't tested.
Reviewed-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv4/ip_input.c | 2 +-
net/ipv6/ip6_input.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -313,7 +313,7 @@ static int ip_rcv_finish(struct sk_buff
const struct iphdr *iph = ip_hdr(skb);
struct rtable *rt;
- if (sysctl_ip_early_demux && !skb_dst(skb)) {
+ if (sysctl_ip_early_demux && !skb_dst(skb) && skb->sk == NULL) {
const struct net_protocol *ipprot;
int protocol = iph->protocol;
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -49,7 +49,7 @@
int ip6_rcv_finish(struct sk_buff *skb)
{
- if (sysctl_ip_early_demux && !skb_dst(skb)) {
+ if (sysctl_ip_early_demux && !skb_dst(skb) && skb->sk == NULL) {
const struct inet6_protocol *ipprot;
ipprot = rcu_dereference(inet6_protos[ipv6_hdr(skb)->nexthdr]);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 086/104] xen-netfront: fix resource leak in netfront
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (79 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 085/104] net: Fix memory leak if TPROXY used with TCP early demux Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 087/104] sit: fix double free of fb_tunnel_dev on exit Greg Kroah-Hartman
` (19 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Annie Li, David S. Miller
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Annie Li <annie.li@oracle.com>
[ Upstream commit cefe0078eea52af17411eb1248946a94afb84ca5 ]
This patch removes grant transfer releasing code from netfront, and uses
gnttab_end_foreign_access to end grant access since
gnttab_end_foreign_access_ref may fail when the grant entry is
currently used for reading or writing.
* clean up grant transfer code kept from old netfront(2.6.18) which grants
pages for access/map and transfer. But grant transfer is deprecated in current
netfront, so remove corresponding release code for transfer.
* fix resource leak, release grant access (through gnttab_end_foreign_access)
and skb for tx/rx path, use get_page to ensure page is released when grant
access is completed successfully.
Xen-blkfront/xen-tpmfront/xen-pcifront also have similar issue, but patches
for them will be created separately.
V6: Correct subject line and commit message.
V5: Remove unecessary change in xennet_end_access.
V4: Revert put_page in gnttab_end_foreign_access, and keep netfront change in
single patch.
V3: Changes as suggestion from David Vrabel, ensure pages are not freed untill
grant acess is ended.
V2: Improve patch comments.
Signed-off-by: Annie Li <annie.li@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/xen-netfront.c | 88 +++++++++++++--------------------------------
1 file changed, 26 insertions(+), 62 deletions(-)
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -107,6 +107,7 @@ struct netfront_info {
} tx_skbs[NET_TX_RING_SIZE];
grant_ref_t gref_tx_head;
grant_ref_t grant_tx_ref[NET_TX_RING_SIZE];
+ struct page *grant_tx_page[NET_TX_RING_SIZE];
unsigned tx_skb_freelist;
spinlock_t rx_lock ____cacheline_aligned_in_smp;
@@ -386,6 +387,7 @@ static void xennet_tx_buf_gc(struct net_
gnttab_release_grant_reference(
&np->gref_tx_head, np->grant_tx_ref[id]);
np->grant_tx_ref[id] = GRANT_INVALID_REF;
+ np->grant_tx_page[id] = NULL;
add_id_to_freelist(&np->tx_skb_freelist, np->tx_skbs, id);
dev_kfree_skb_irq(skb);
}
@@ -442,6 +444,7 @@ static void xennet_make_frags(struct sk_
gnttab_grant_foreign_access_ref(ref, np->xbdev->otherend_id,
mfn, GNTMAP_readonly);
+ np->grant_tx_page[id] = virt_to_page(data);
tx->gref = np->grant_tx_ref[id] = ref;
tx->offset = offset;
tx->size = len;
@@ -487,6 +490,7 @@ static void xennet_make_frags(struct sk_
np->xbdev->otherend_id,
mfn, GNTMAP_readonly);
+ np->grant_tx_page[id] = page;
tx->gref = np->grant_tx_ref[id] = ref;
tx->offset = offset;
tx->size = bytes;
@@ -586,6 +590,7 @@ static int xennet_start_xmit(struct sk_b
mfn = virt_to_mfn(data);
gnttab_grant_foreign_access_ref(
ref, np->xbdev->otherend_id, mfn, GNTMAP_readonly);
+ np->grant_tx_page[id] = virt_to_page(data);
tx->gref = np->grant_tx_ref[id] = ref;
tx->offset = offset;
tx->size = len;
@@ -1115,10 +1120,11 @@ static void xennet_release_tx_bufs(struc
continue;
skb = np->tx_skbs[i].skb;
- gnttab_end_foreign_access_ref(np->grant_tx_ref[i],
- GNTMAP_readonly);
- gnttab_release_grant_reference(&np->gref_tx_head,
- np->grant_tx_ref[i]);
+ get_page(np->grant_tx_page[i]);
+ gnttab_end_foreign_access(np->grant_tx_ref[i],
+ GNTMAP_readonly,
+ (unsigned long)page_address(np->grant_tx_page[i]));
+ np->grant_tx_page[i] = NULL;
np->grant_tx_ref[i] = GRANT_INVALID_REF;
add_id_to_freelist(&np->tx_skb_freelist, np->tx_skbs, i);
dev_kfree_skb_irq(skb);
@@ -1127,78 +1133,35 @@ static void xennet_release_tx_bufs(struc
static void xennet_release_rx_bufs(struct netfront_info *np)
{
- struct mmu_update *mmu = np->rx_mmu;
- struct multicall_entry *mcl = np->rx_mcl;
- struct sk_buff_head free_list;
- struct sk_buff *skb;
- unsigned long mfn;
- int xfer = 0, noxfer = 0, unused = 0;
int id, ref;
- dev_warn(&np->netdev->dev, "%s: fix me for copying receiver.\n",
- __func__);
- return;
-
- skb_queue_head_init(&free_list);
-
spin_lock_bh(&np->rx_lock);
for (id = 0; id < NET_RX_RING_SIZE; id++) {
- ref = np->grant_rx_ref[id];
- if (ref == GRANT_INVALID_REF) {
- unused++;
- continue;
- }
+ struct sk_buff *skb;
+ struct page *page;
skb = np->rx_skbs[id];
- mfn = gnttab_end_foreign_transfer_ref(ref);
- gnttab_release_grant_reference(&np->gref_rx_head, ref);
- np->grant_rx_ref[id] = GRANT_INVALID_REF;
-
- if (0 == mfn) {
- skb_shinfo(skb)->nr_frags = 0;
- dev_kfree_skb(skb);
- noxfer++;
+ if (!skb)
continue;
- }
- if (!xen_feature(XENFEAT_auto_translated_physmap)) {
- /* Remap the page. */
- const struct page *page =
- skb_frag_page(&skb_shinfo(skb)->frags[0]);
- unsigned long pfn = page_to_pfn(page);
- void *vaddr = page_address(page);
+ ref = np->grant_rx_ref[id];
+ if (ref == GRANT_INVALID_REF)
+ continue;
- MULTI_update_va_mapping(mcl, (unsigned long)vaddr,
- mfn_pte(mfn, PAGE_KERNEL),
- 0);
- mcl++;
- mmu->ptr = ((u64)mfn << PAGE_SHIFT)
- | MMU_MACHPHYS_UPDATE;
- mmu->val = pfn;
- mmu++;
+ page = skb_frag_page(&skb_shinfo(skb)->frags[0]);
- set_phys_to_machine(pfn, mfn);
- }
- __skb_queue_tail(&free_list, skb);
- xfer++;
- }
-
- dev_info(&np->netdev->dev, "%s: %d xfer, %d noxfer, %d unused\n",
- __func__, xfer, noxfer, unused);
+ /* gnttab_end_foreign_access() needs a page ref until
+ * foreign access is ended (which may be deferred).
+ */
+ get_page(page);
+ gnttab_end_foreign_access(ref, 0,
+ (unsigned long)page_address(page));
+ np->grant_rx_ref[id] = GRANT_INVALID_REF;
- if (xfer) {
- if (!xen_feature(XENFEAT_auto_translated_physmap)) {
- /* Do all the remapping work and M2P updates. */
- MULTI_mmu_update(mcl, np->rx_mmu, mmu - np->rx_mmu,
- NULL, DOMID_SELF);
- mcl++;
- HYPERVISOR_multicall(np->rx_mcl, mcl - np->rx_mcl);
- }
+ kfree_skb(skb);
}
- __skb_queue_purge(&free_list);
-
spin_unlock_bh(&np->rx_lock);
}
@@ -1333,6 +1296,7 @@ static struct net_device *xennet_create_
for (i = 0; i < NET_RX_RING_SIZE; i++) {
np->rx_skbs[i] = NULL;
np->grant_rx_ref[i] = GRANT_INVALID_REF;
+ np->grant_tx_page[i] = NULL;
}
/* A grant for every tx ring slot */
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 087/104] sit: fix double free of fb_tunnel_dev on exit
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (80 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 086/104] xen-netfront: fix resource leak in netfront Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 088/104] Revert "ip6tnl: fix use after free of fb_tnl_dev" Greg Kroah-Hartman
` (18 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Steven Rostedt, Nicolas Dichtel,
Willem de Bruijn, Steven Rostedt, Luis Claudio R. Goncalves,
John Kacur
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
[ No relevant upstream commit. ]
This problem was fixed upstream by commit 9434266f2c64 ("sit: fix use after free
of fb_tunnel_dev").
The upstream patch depends on upstream commit 5e6700b3bf98 ("sit: add support of
x-netns"), which was not backported into 3.10 branch.
First, explain the problem: when the sit module is unloaded, sit_cleanup() is
called.
rmmod sit
=> sit_cleanup()
=> rtnl_link_unregister()
=> __rtnl_kill_links()
=> for_each_netdev(net, dev) {
if (dev->rtnl_link_ops == ops)
ops->dellink(dev, &list_kill);
}
At this point, the FB device is deleted (and all sit tunnels).
=> unregister_pernet_device()
=> unregister_pernet_operations()
=> ops_exit_list()
=> sit_exit_net()
=> sit_destroy_tunnels()
In this function, no tunnel is found.
=> unregister_netdevice_queue(sitn->fb_tunnel_dev, &list);
We delete the FB device a second time here!
Because we cannot simply remove the second deletion (sit_exit_net() must remove
the FB device when a netns is deleted), we add an rtnl ops which delete all sit
device excepting the FB device and thus we can keep the explicit deletion in
sit_exit_net().
CC: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Reported-by: Steven Rostedt <srostedt@redhat.com>
Tested-by: Steven Rostedt <srostedt@redhat.com> (and our entire MRG team)
Tested-by: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Tested-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/sit.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -1507,6 +1507,15 @@ static const struct nla_policy ipip6_pol
#endif
};
+static void ipip6_dellink(struct net_device *dev, struct list_head *head)
+{
+ struct net *net = dev_net(dev);
+ struct sit_net *sitn = net_generic(net, sit_net_id);
+
+ if (dev != sitn->fb_tunnel_dev)
+ unregister_netdevice_queue(dev, head);
+}
+
static struct rtnl_link_ops sit_link_ops __read_mostly = {
.kind = "sit",
.maxtype = IFLA_IPTUN_MAX,
@@ -1517,6 +1526,7 @@ static struct rtnl_link_ops sit_link_ops
.changelink = ipip6_changelink,
.get_size = ipip6_get_size,
.fill_info = ipip6_fill_info,
+ .dellink = ipip6_dellink,
};
static struct xfrm_tunnel sit_handler __read_mostly = {
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 088/104] Revert "ip6tnl: fix use after free of fb_tnl_dev"
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (81 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 087/104] sit: fix double free of fb_tunnel_dev on exit Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 089/104] ip6tnl: fix double free of fb_tnl_dev on exit Greg Kroah-Hartman
` (17 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Nicolas Dichtel, Steven Rostedt,
Luis Claudio R. Goncalves, John Kacur
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
[ No relevant upstream commit. ]
This reverts commit 22c3ec552c29cf4bd4a75566088950fe57d860c4.
This patch is not the right fix, it introduces a memory leak when a netns is
destroyed (the FB device is never deleted).
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reported-by: Steven Rostedt <srostedt@redhat.com>
Tested-by: Steven Rostedt <srostedt@redhat.com> (and our entire MRG team)
Tested-by: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Tested-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/ip6_tunnel.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1711,6 +1711,8 @@ static void __net_exit ip6_tnl_destroy_t
}
}
+ t = rtnl_dereference(ip6n->tnls_wc[0]);
+ unregister_netdevice_queue(t->dev, &list);
unregister_netdevice_many(&list);
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 089/104] ip6tnl: fix double free of fb_tnl_dev on exit
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (82 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 088/104] Revert "ip6tnl: fix use after free of fb_tnl_dev" Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 090/104] iwlwifi: pcie: enable oscillator for L1 exit Greg Kroah-Hartman
` (16 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Steven Rostedt, Willem de Bruijn,
Nicolas Dichtel, Steven Rostedt, Luis Claudio R. Goncalves,
John Kacur
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
[ No relevant upstream commit. ]
This problem was fixed upstream by commit 1e9f3d6f1c40 ("ip6tnl: fix use after
free of fb_tnl_dev").
The upstream patch depends on upstream commit 0bd8762824e7 ("ip6tnl: add x-netns
support"), which was not backported into 3.10 branch.
First, explain the problem: when the ip6_tunnel module is unloaded,
ip6_tunnel_cleanup() is called.
rmmod ip6_tunnel
=> ip6_tunnel_cleanup()
=> rtnl_link_unregister()
=> __rtnl_kill_links()
=> for_each_netdev(net, dev) {
if (dev->rtnl_link_ops == ops)
ops->dellink(dev, &list_kill);
}
At this point, the FB device is deleted (and all ip6tnl tunnels).
=> unregister_pernet_device()
=> unregister_pernet_operations()
=> ops_exit_list()
=> ip6_tnl_exit_net()
=> ip6_tnl_destroy_tunnels()
=> t = rtnl_dereference(ip6n->tnls_wc[0]);
unregister_netdevice_queue(t->dev, &list);
We delete the FB device a second time here!
The previous fix removes these lines, which fix this double free. But the patch
introduces a memory leak when a netns is destroyed, because the FB device is
never deleted. By adding an rtnl ops which delete all ip6tnl device excepting
the FB device, we can keep this exlicit removal in ip6_tnl_destroy_tunnels().
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Willem de Bruijn <willemb@google.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reported-by: Steven Rostedt <srostedt@redhat.com>
Tested-by: Steven Rostedt <srostedt@redhat.com> (and our entire MRG team)
Tested-by: "Luis Claudio R. Goncalves" <lgoncalv@redhat.com>
Tested-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/ipv6/ip6_tunnel.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -1617,6 +1617,15 @@ static int ip6_tnl_changelink(struct net
return ip6_tnl_update(t, &p);
}
+static void ip6_tnl_dellink(struct net_device *dev, struct list_head *head)
+{
+ struct net *net = dev_net(dev);
+ struct ip6_tnl_net *ip6n = net_generic(net, ip6_tnl_net_id);
+
+ if (dev != ip6n->fb_tnl_dev)
+ unregister_netdevice_queue(dev, head);
+}
+
static size_t ip6_tnl_get_size(const struct net_device *dev)
{
return
@@ -1681,6 +1690,7 @@ static struct rtnl_link_ops ip6_link_ops
.validate = ip6_tnl_validate,
.newlink = ip6_tnl_newlink,
.changelink = ip6_tnl_changelink,
+ .dellink = ip6_tnl_dellink,
.get_size = ip6_tnl_get_size,
.fill_info = ip6_tnl_fill_info,
};
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 090/104] iwlwifi: pcie: enable oscillator for L1 exit
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (83 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 089/104] ip6tnl: fix double free of fb_tnl_dev on exit Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 091/104] parisc: fix cache-flushing Greg Kroah-Hartman
` (15 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johannes Berg, Emmanuel Grumbach
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
commit 2d93aee152b1758a94a18fe15d72153ba73b5679 upstream.
Enabling the oscillator consumes slightly more power (100uA)
but allows to make sure that we exit from L1 on time.
Not doing so might lead to a PCIe specification violation
since we might wake up from L1 at the wrong time.
This issue has been identified on 3160 and 7260 only.
On older NICs L1 off is not enabled, on newer NICs (7265),
the issue is fixed.
When the bug occurs the user sees that the NIC has
disappeared from the PCI bridge, any access to the device
returns 0xff.
This fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=64541
and has been extensively discussed here:
http://markmail.org/thread/mfmpzqt3r333n4bo
Fixes: 99cd47142399 ("iwlwifi: add 7000 series device configuration")
Reported-and-tested-by: wzyboy <wzyboy@wzyboy.org>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/iwlwifi/iwl-prph.h | 4 ++++
drivers/net/wireless/iwlwifi/pcie/trans.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+)
--- a/drivers/net/wireless/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/iwlwifi/iwl-prph.h
@@ -260,4 +260,8 @@ static inline unsigned int SCD_QUEUE_STA
/*********************** END TX SCHEDULER *************************************/
+/* Oscillator clock */
+#define OSC_CLK (0xa04068)
+#define OSC_CLK_FORCE_CONTROL (0x8)
+
#endif /* __iwl_prph_h__ */
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -207,6 +207,22 @@ static int iwl_pcie_apm_init(struct iwl_
}
/*
+ * Enable the oscillator to count wake up time for L1 exit. This
+ * consumes slightly more power (100uA) - but allows to be sure
+ * that we wake up from L1 on time.
+ *
+ * This looks weird: read twice the same register, discard the
+ * value, set a bit, and yet again, read that same register
+ * just to discard the value. But that's the way the hardware
+ * seems to like it.
+ */
+ iwl_read_prph(trans, OSC_CLK);
+ iwl_read_prph(trans, OSC_CLK);
+ iwl_set_bits_prph(trans, OSC_CLK, OSC_CLK_FORCE_CONTROL);
+ iwl_read_prph(trans, OSC_CLK);
+ iwl_read_prph(trans, OSC_CLK);
+
+ /*
* Enable DMA clock and wait for it to stabilize.
*
* Write to "CLK_EN_REG"; "1" bits enable clocks, while "0" bits
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 091/104] parisc: fix cache-flushing
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (84 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 090/104] iwlwifi: pcie: enable oscillator for L1 exit Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 092/104] KVM: PPC: Book3S HV: use xics_wake_cpu only when defined Greg Kroah-Hartman
` (14 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Helge Deller, John David Anglin
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <deller@gmx.de>
commit 57737c49dd72c96cfbcd4f66559f3ffc399aeb4f upstream.
This commit:
f8dae00684d678afa13041ef170cecfd1297ed40: parisc: Ensure full cache coherency for kmap/kunmap
caused negative caching side-effects, e.g. hanging processes with expect and
too many inequivalent alias messages from flush_dcache_page() on Debian 5 systems.
This patch now partly reverts it and has been in production use on our debian buildd
makeservers since a week without any major problems.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/parisc/include/asm/cacheflush.h | 2 --
arch/parisc/include/asm/page.h | 3 ++-
arch/parisc/kernel/cache.c | 14 ++++++++++++++
3 files changed, 16 insertions(+), 3 deletions(-)
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -132,7 +132,6 @@ void mark_rodata_ro(void);
static inline void *kmap(struct page *page)
{
might_sleep();
- flush_dcache_page(page);
return page_address(page);
}
@@ -144,7 +143,6 @@ static inline void kunmap(struct page *p
static inline void *kmap_atomic(struct page *page)
{
pagefault_disable();
- flush_dcache_page(page);
return page_address(page);
}
--- a/arch/parisc/include/asm/page.h
+++ b/arch/parisc/include/asm/page.h
@@ -29,7 +29,8 @@ struct page;
void clear_page_asm(void *page);
void copy_page_asm(void *to, void *from);
#define clear_user_page(vto, vaddr, page) clear_page_asm(vto)
-#define copy_user_page(vto, vfrom, vaddr, page) copy_page_asm(vto, vfrom)
+void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
+ struct page *pg);
/* #define CONFIG_PARISC_TMPALIAS */
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -388,6 +388,20 @@ void flush_kernel_dcache_page_addr(void
}
EXPORT_SYMBOL(flush_kernel_dcache_page_addr);
+void copy_user_page(void *vto, void *vfrom, unsigned long vaddr,
+ struct page *pg)
+{
+ /* Copy using kernel mapping. No coherency is needed (all in
+ kunmap) for the `to' page. However, the `from' page needs to
+ be flushed through a mapping equivalent to the user mapping
+ before it can be accessed through the kernel mapping. */
+ preempt_disable();
+ flush_dcache_page_asm(__pa(vfrom), vaddr);
+ preempt_enable();
+ copy_page_asm(vto, vfrom);
+}
+EXPORT_SYMBOL(copy_user_page);
+
void purge_tlb_entries(struct mm_struct *mm, unsigned long addr)
{
unsigned long flags;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 092/104] KVM: PPC: Book3S HV: use xics_wake_cpu only when defined
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (85 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 091/104] parisc: fix cache-flushing Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 093/104] KVM: PPC: e500: Fix bad address type in deliver_tlb_misss() Greg Kroah-Hartman
` (13 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Andreas Schwab, Alexander Graf
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andreas Schwab <schwab@linux-m68k.org>
commit 48eaef0518a565d3852e301c860e1af6a6db5a84 upstream.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/kvm/book3s_hv.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -82,10 +82,13 @@ void kvmppc_fast_vcpu_kick(struct kvm_vc
/* CPU points to the first thread of the core */
if (cpu != me && cpu >= 0 && cpu < nr_cpu_ids) {
+#ifdef CONFIG_KVM_XICS
int real_cpu = cpu + vcpu->arch.ptid;
if (paca[real_cpu].kvm_hstate.xics_phys)
xics_wake_cpu(real_cpu);
- else if (cpu_online(cpu))
+ else
+#endif
+ if (cpu_online(cpu))
smp_send_reschedule(cpu);
}
put_cpu();
@@ -1090,7 +1093,9 @@ static void kvmppc_start_thread(struct k
smp_wmb();
#if defined(CONFIG_PPC_ICP_NATIVE) && defined(CONFIG_SMP)
if (vcpu->arch.ptid) {
+#ifdef CONFIG_KVM_XICS
xics_wake_cpu(cpu);
+#endif
++vc->n_woken;
}
#endif
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 093/104] KVM: PPC: e500: Fix bad address type in deliver_tlb_misss()
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (86 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 092/104] KVM: PPC: Book3S HV: use xics_wake_cpu only when defined Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 094/104] ALSA: hda - hdmi: introduce patch_nvhdmi() Greg Kroah-Hartman
` (12 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mihai Caraman, Alexander Graf
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mihai Caraman <mihai.caraman@freescale.com>
commit 70713fe315ed14cd1bb07d1a7f33e973d136ae3d upstream.
Use gva_t instead of unsigned int for eaddr in deliver_tlb_miss().
Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/kvm/e500_mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/powerpc/kvm/e500_mmu.c
+++ b/arch/powerpc/kvm/e500_mmu.c
@@ -127,7 +127,7 @@ static int kvmppc_e500_tlb_index(struct
}
static inline void kvmppc_e500_deliver_tlb_miss(struct kvm_vcpu *vcpu,
- unsigned int eaddr, int as)
+ gva_t eaddr, int as)
{
struct kvmppc_vcpu_e500 *vcpu_e500 = to_e500(vcpu);
unsigned int victim, tsized;
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 094/104] ALSA: hda - hdmi: introduce patch_nvhdmi()
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (87 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 093/104] KVM: PPC: e500: Fix bad address type in deliver_tlb_misss() Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 095/104] ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled Greg Kroah-Hartman
` (11 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Greg Kroah-Hartman, Anssi Hannula, Takashi Iwai, Stephen Warren
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anssi Hannula <anssi.hannula@iki.fi>
(This is a backport of *part* of upstream 611885bc963a "ALSA: hda -
hdmi: Disallow unsupported 2ch remapping on NVIDIA codecs" to stable
3.10 through 3.12. Later stable already contain all of the original
patch.)
Mainline commit 611885bc963a "ALSA: hda - hdmi: Disallow unsupported 2ch
remapping on NVIDIA codecs" introduces function patch_nvhdmi(). That
function is edited by 75fae117a5db "ALSA: hda/hdmi - allow PIN_OUT to be
dynamically enabled". In order to backport the PIN_OUT patch, I am first
back-porting just the addition of function patch_nvhdmi(), so that the
conflicts applying the PIN_OUT patch are simplified.
Ideally, one might backport all of 611885bc963a. However, that commit
doesn't apply to stable kernels, since it relies on a chain of other
patches which implement new features.
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[swarren, extracted just a small part of the original patch]
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_hdmi.c | 60 +++++++++++++++++++++++++++------------------
1 file changed, 37 insertions(+), 23 deletions(-)
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2476,6 +2476,20 @@ static int patch_nvhdmi_8ch_7x(struct hd
return 0;
}
+static int patch_nvhdmi(struct hda_codec *codec)
+{
+ struct hdmi_spec *spec;
+ int err;
+
+ err = patch_generic_hdmi(codec);
+ if (err)
+ return err;
+
+ spec = codec->spec;
+
+ return 0;
+}
+
/*
* ATI-specific implementations
*
@@ -2548,30 +2562,30 @@ static const struct hda_codec_preset snd
{ .id = 0x10de0005, .name = "MCP77/78 HDMI", .patch = patch_nvhdmi_8ch_7x },
{ .id = 0x10de0006, .name = "MCP77/78 HDMI", .patch = patch_nvhdmi_8ch_7x },
{ .id = 0x10de0007, .name = "MCP79/7A HDMI", .patch = patch_nvhdmi_8ch_7x },
-{ .id = 0x10de000a, .name = "GPU 0a HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de000b, .name = "GPU 0b HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de000c, .name = "MCP89 HDMI", .patch = patch_generic_hdmi },
-{ .id = 0x10de000d, .name = "GPU 0d HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0010, .name = "GPU 10 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0011, .name = "GPU 11 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0012, .name = "GPU 12 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0013, .name = "GPU 13 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0014, .name = "GPU 14 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0015, .name = "GPU 15 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0016, .name = "GPU 16 HDMI/DP", .patch = patch_generic_hdmi },
+{ .id = 0x10de000a, .name = "GPU 0a HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de000b, .name = "GPU 0b HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de000c, .name = "MCP89 HDMI", .patch = patch_nvhdmi },
+{ .id = 0x10de000d, .name = "GPU 0d HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0010, .name = "GPU 10 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0011, .name = "GPU 11 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0012, .name = "GPU 12 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0013, .name = "GPU 13 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0014, .name = "GPU 14 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0015, .name = "GPU 15 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0016, .name = "GPU 16 HDMI/DP", .patch = patch_nvhdmi },
/* 17 is known to be absent */
-{ .id = 0x10de0018, .name = "GPU 18 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0019, .name = "GPU 19 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de001a, .name = "GPU 1a HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de001b, .name = "GPU 1b HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de001c, .name = "GPU 1c HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0040, .name = "GPU 40 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0041, .name = "GPU 41 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0042, .name = "GPU 42 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0043, .name = "GPU 43 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0044, .name = "GPU 44 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0051, .name = "GPU 51 HDMI/DP", .patch = patch_generic_hdmi },
-{ .id = 0x10de0060, .name = "GPU 60 HDMI/DP", .patch = patch_generic_hdmi },
+{ .id = 0x10de0018, .name = "GPU 18 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0019, .name = "GPU 19 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de001a, .name = "GPU 1a HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de001b, .name = "GPU 1b HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de001c, .name = "GPU 1c HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0040, .name = "GPU 40 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0041, .name = "GPU 41 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0042, .name = "GPU 42 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0043, .name = "GPU 43 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0044, .name = "GPU 44 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0051, .name = "GPU 51 HDMI/DP", .patch = patch_nvhdmi },
+{ .id = 0x10de0060, .name = "GPU 60 HDMI/DP", .patch = patch_nvhdmi },
{ .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch },
{ .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch },
{ .id = 0x11069f80, .name = "VX900 HDMI/DP", .patch = patch_via_hdmi },
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 095/104] ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (88 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 094/104] ALSA: hda - hdmi: introduce patch_nvhdmi() Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 096/104] iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160 Greg Kroah-Hartman
` (10 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Greg Kroah-Hartman, Uosis, Stephen Warren
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephen Warren <swarren@nvidia.com>
(This is upstream 75fae117a5db "ALSA: hda/hdmi - allow PIN_OUT to be
dynamically enabled", backported to stable 3.10 through 3.12. 3.13 and
later can take the original patch.)
Commit 384a48d71520 "ALSA: hda: HDMI: Support codecs with fewer cvts
than pins" dynamically enabled each pin widget's PIN_OUT only when the
pin was actively in use. This was required on certain NVIDIA CODECs for
correct operation. Specifically, if multiple pin widgets each had their
mux input select the same audio converter widget and each pin widget had
PIN_OUT enabled, then only one of the pin widgets would actually receive
the audio, and often not the one the user wanted!
However, this apparently broke some Intel systems, and commit
6169b673618b "ALSA: hda - Always turn on pins for HDMI/DP" reverted the
dynamic setting of PIN_OUT. This in turn broke the afore-mentioned NVIDIA
CODECs.
This change supports either dynamic or static handling of PIN_OUT,
selected by a flag set up during CODEC initialization. This flag is
enabled for all recent NVIDIA GPUs.
Reported-by: Uosis <uosisl@gmail.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_hdmi.c | 40 ++++++++++++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 4 deletions(-)
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -86,6 +86,9 @@ struct hdmi_spec {
unsigned int channels_max; /* max over all cvts */
struct hdmi_eld temp_eld;
+
+ bool dyn_pin_out;
+
/*
* Non-generic ATI/NVIDIA specific
*/
@@ -450,15 +453,25 @@ static void hdmi_write_dip_byte(struct h
static void hdmi_init_pin(struct hda_codec *codec, hda_nid_t pin_nid)
{
+ struct hdmi_spec *spec = codec->spec;
+ int pin_out;
+
/* Unmute */
if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP)
snd_hda_codec_write(codec, pin_nid, 0,
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
- /* Enable pin out: some machines with GM965 gets broken output when
- * the pin is disabled or changed while using with HDMI
- */
+
+ if (spec->dyn_pin_out)
+ /* Disable pin out until stream is active */
+ pin_out = 0;
+ else
+ /* Enable pin out: some machines with GM965 gets broken output
+ * when the pin is disabled or changed while using with HDMI
+ */
+ pin_out = PIN_OUT;
+
snd_hda_codec_write(codec, pin_nid, 0,
- AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
+ AC_VERB_SET_PIN_WIDGET_CONTROL, pin_out);
}
static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t cvt_nid)
@@ -1473,6 +1486,7 @@ static int generic_hdmi_playback_pcm_pre
struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
hda_nid_t pin_nid = per_pin->pin_nid;
bool non_pcm;
+ int pinctl;
non_pcm = check_non_pcm_per_cvt(codec, cvt_nid);
per_pin->channels = substream->runtime->channels;
@@ -1482,6 +1496,14 @@ static int generic_hdmi_playback_pcm_pre
hdmi_setup_audio_infoframe(codec, per_pin, non_pcm);
+ if (spec->dyn_pin_out) {
+ pinctl = snd_hda_codec_read(codec, pin_nid, 0,
+ AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
+ snd_hda_codec_write(codec, pin_nid, 0,
+ AC_VERB_SET_PIN_WIDGET_CONTROL,
+ pinctl | PIN_OUT);
+ }
+
return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format);
}
@@ -1501,6 +1523,7 @@ static int hdmi_pcm_close(struct hda_pcm
int cvt_idx, pin_idx;
struct hdmi_spec_per_cvt *per_cvt;
struct hdmi_spec_per_pin *per_pin;
+ int pinctl;
if (hinfo->nid) {
cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid);
@@ -1517,6 +1540,14 @@ static int hdmi_pcm_close(struct hda_pcm
return -EINVAL;
per_pin = get_pin(spec, pin_idx);
+ if (spec->dyn_pin_out) {
+ pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0,
+ AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
+ snd_hda_codec_write(codec, per_pin->pin_nid, 0,
+ AC_VERB_SET_PIN_WIDGET_CONTROL,
+ pinctl & ~PIN_OUT);
+ }
+
snd_hda_spdif_ctls_unassign(codec, pin_idx);
per_pin->chmap_set = false;
memset(per_pin->chmap, 0, sizeof(per_pin->chmap));
@@ -2486,6 +2517,7 @@ static int patch_nvhdmi(struct hda_codec
return err;
spec = codec->spec;
+ spec->dyn_pin_out = true;
return 0;
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 096/104] iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (89 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 095/104] ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 097/104] usb: core: get config and string descriptors for unauthorized devices Greg Kroah-Hartman
` (9 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johannes Berg, Emmanuel Grumbach
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
commit 6960a059b2c618f32fe549f13287b3d2278c09e9 upstream.
We changed the timeout for the interrupt coealescing for
calibration, but that wasn't effective since we changed
that value back before loading the firmware. Since
calibrations are notification from firmware and not Rx
packets, this doesn't change anyway - the firmware will
fire an interrupt straight away regardless of the interrupt
coalescing value.
Also, a HW issue has been discovered in 7000 devices series.
The work around is to disable the new interrupt coalescing
timeout feature - do this by setting bit 31 in
CSR_INT_COALESCING.
This has been fixed in 7265 which means that we can't rely
on the device family and must have a hint in the iwl_cfg
structure.
Fixes: 99cd47142399 ("iwlwifi: add 7000 series device configuration")
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/wireless/iwlwifi/iwl-7000.c | 6 ++++++
drivers/net/wireless/iwlwifi/iwl-config.h | 3 +++
drivers/net/wireless/iwlwifi/iwl-csr.h | 5 +----
drivers/net/wireless/iwlwifi/pcie/rx.c | 4 ++++
drivers/net/wireless/iwlwifi/pcie/trans.c | 3 ---
5 files changed, 14 insertions(+), 7 deletions(-)
--- a/drivers/net/wireless/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-7000.c
@@ -131,6 +131,7 @@ const struct iwl_cfg iwl7260_2ac_cfg = {
.ht_params = &iwl7000_ht_params,
.nvm_ver = IWL7260_NVM_VERSION,
.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
+ .host_interrupt_operation_mode = true,
};
const struct iwl_cfg iwl7260_2n_cfg = {
@@ -140,6 +141,7 @@ const struct iwl_cfg iwl7260_2n_cfg = {
.ht_params = &iwl7000_ht_params,
.nvm_ver = IWL7260_NVM_VERSION,
.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
+ .host_interrupt_operation_mode = true,
};
const struct iwl_cfg iwl7260_n_cfg = {
@@ -149,6 +151,7 @@ const struct iwl_cfg iwl7260_n_cfg = {
.ht_params = &iwl7000_ht_params,
.nvm_ver = IWL7260_NVM_VERSION,
.nvm_calib_ver = IWL7260_TX_POWER_VERSION,
+ .host_interrupt_operation_mode = true,
};
const struct iwl_cfg iwl3160_2ac_cfg = {
@@ -158,6 +161,7 @@ const struct iwl_cfg iwl3160_2ac_cfg = {
.ht_params = &iwl7000_ht_params,
.nvm_ver = IWL3160_NVM_VERSION,
.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
+ .host_interrupt_operation_mode = true,
};
const struct iwl_cfg iwl3160_2n_cfg = {
@@ -167,6 +171,7 @@ const struct iwl_cfg iwl3160_2n_cfg = {
.ht_params = &iwl7000_ht_params,
.nvm_ver = IWL3160_NVM_VERSION,
.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
+ .host_interrupt_operation_mode = true,
};
const struct iwl_cfg iwl3160_n_cfg = {
@@ -176,6 +181,7 @@ const struct iwl_cfg iwl3160_n_cfg = {
.ht_params = &iwl7000_ht_params,
.nvm_ver = IWL3160_NVM_VERSION,
.nvm_calib_ver = IWL3160_TX_POWER_VERSION,
+ .host_interrupt_operation_mode = true,
};
MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));
--- a/drivers/net/wireless/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/iwlwifi/iwl-config.h
@@ -241,6 +241,8 @@ struct iwl_eeprom_params {
* @rx_with_siso_diversity: 1x1 device with rx antenna diversity
* @internal_wimax_coex: internal wifi/wimax combo device
* @temp_offset_v2: support v2 of temperature offset calibration
+ * @host_interrupt_operation_mode: device needs host interrupt operation
+ * mode set
*
* We enable the driver to be backward compatible wrt. hardware features.
* API differences in uCode shouldn't be handled here but through TLVs
@@ -273,6 +275,7 @@ struct iwl_cfg {
const bool rx_with_siso_diversity;
const bool internal_wimax_coex;
const bool temp_offset_v2;
+ const bool host_interrupt_operation_mode;
};
/*
--- a/drivers/net/wireless/iwlwifi/iwl-csr.h
+++ b/drivers/net/wireless/iwlwifi/iwl-csr.h
@@ -463,13 +463,10 @@
* the CSR_INT_COALESCING is an 8 bit register in 32-usec unit
*
* default interrupt coalescing timer is 64 x 32 = 2048 usecs
- * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs
*/
#define IWL_HOST_INT_TIMEOUT_MAX (0xFF)
#define IWL_HOST_INT_TIMEOUT_DEF (0x40)
#define IWL_HOST_INT_TIMEOUT_MIN (0x0)
-#define IWL_HOST_INT_CALIB_TIMEOUT_MAX (0xFF)
-#define IWL_HOST_INT_CALIB_TIMEOUT_DEF (0x10)
-#define IWL_HOST_INT_CALIB_TIMEOUT_MIN (0x0)
+#define IWL_HOST_INT_OPER_MODE BIT(31)
#endif /* !__iwl_csr_h__ */
--- a/drivers/net/wireless/iwlwifi/pcie/rx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/rx.c
@@ -489,6 +489,10 @@ static void iwl_pcie_rx_hw_init(struct i
/* Set interrupt coalescing timer to default (2048 usecs) */
iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_TIMEOUT_DEF);
+
+ /* W/A for interrupt coalescing bug in 7260 and 3160 */
+ if (trans->cfg->host_interrupt_operation_mode)
+ iwl_set_bit(trans, CSR_INT_COALESCING, IWL_HOST_INT_OPER_MODE);
}
int iwl_pcie_rx_init(struct iwl_trans *trans)
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -292,9 +292,6 @@ static int iwl_pcie_nic_init(struct iwl_
spin_lock_irqsave(&trans_pcie->irq_lock, flags);
iwl_pcie_apm_init(trans);
- /* Set interrupt coalescing calibration timer to default (512 usecs) */
- iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_CALIB_TIMEOUT_DEF);
-
spin_unlock_irqrestore(&trans_pcie->irq_lock, flags);
iwl_pcie_set_pwr(trans, false);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 097/104] usb: core: get config and string descriptors for unauthorized devices
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (90 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 096/104] iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160 Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 098/104] SCSI: bfa: Chinook quad port 16G FC HBA claim issue Greg Kroah-Hartman
` (8 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Thomas Pugliese
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Pugliese <thomas.pugliese@gmail.com>
commit 83e83ecb79a8225e79bc8e54e9aff3e0e27658a2 upstream.
There is no need to skip querying the config and string descriptors for
unauthorized WUSB devices when usb_new_device is called. It is allowed
by WUSB spec. The only action that needs to be delayed until
authorization time is the set config. This change allows user mode
tools to see the config and string descriptors earlier in enumeration
which is needed for some WUSB devices to function properly on Android
systems. It also reduces the amount of divergent code paths needed
for WUSB devices.
Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/core/config.c | 7 -------
drivers/usb/core/hub.c | 40 +++++++---------------------------------
2 files changed, 7 insertions(+), 40 deletions(-)
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -651,10 +651,6 @@ void usb_destroy_configuration(struct us
*
* hub-only!! ... and only in reset path, or usb_new_device()
* (used by real hubs and virtual root hubs)
- *
- * NOTE: if this is a WUSB device and is not authorized, we skip the
- * whole thing. A non-authorized USB device has no
- * configurations.
*/
int usb_get_configuration(struct usb_device *dev)
{
@@ -666,8 +662,6 @@ int usb_get_configuration(struct usb_dev
struct usb_config_descriptor *desc;
cfgno = 0;
- if (dev->authorized == 0) /* Not really an error */
- goto out_not_authorized;
result = -ENOMEM;
if (ncfg > USB_MAXCONFIG) {
dev_warn(ddev, "too many configurations: %d, "
@@ -751,7 +745,6 @@ int usb_get_configuration(struct usb_dev
err:
kfree(desc);
-out_not_authorized:
dev->descriptor.bNumConfigurations = cfgno;
err2:
if (result == -ENOMEM)
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2231,18 +2231,13 @@ static int usb_enumerate_device(struct u
return err;
}
}
- if (udev->wusb == 1 && udev->authorized == 0) {
- udev->product = kstrdup("n/a (unauthorized)", GFP_KERNEL);
- udev->manufacturer = kstrdup("n/a (unauthorized)", GFP_KERNEL);
- udev->serial = kstrdup("n/a (unauthorized)", GFP_KERNEL);
- }
- else {
- /* read the standard strings and cache them if present */
- udev->product = usb_cache_string(udev, udev->descriptor.iProduct);
- udev->manufacturer = usb_cache_string(udev,
- udev->descriptor.iManufacturer);
- udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
- }
+
+ /* read the standard strings and cache them if present */
+ udev->product = usb_cache_string(udev, udev->descriptor.iProduct);
+ udev->manufacturer = usb_cache_string(udev,
+ udev->descriptor.iManufacturer);
+ udev->serial = usb_cache_string(udev, udev->descriptor.iSerialNumber);
+
err = usb_enumerate_device_otg(udev);
if (err < 0)
return err;
@@ -2421,16 +2416,6 @@ int usb_deauthorize_device(struct usb_de
usb_dev->authorized = 0;
usb_set_configuration(usb_dev, -1);
- kfree(usb_dev->product);
- usb_dev->product = kstrdup("n/a (unauthorized)", GFP_KERNEL);
- kfree(usb_dev->manufacturer);
- usb_dev->manufacturer = kstrdup("n/a (unauthorized)", GFP_KERNEL);
- kfree(usb_dev->serial);
- usb_dev->serial = kstrdup("n/a (unauthorized)", GFP_KERNEL);
-
- usb_destroy_configuration(usb_dev);
- usb_dev->descriptor.bNumConfigurations = 0;
-
out_unauthorized:
usb_unlock_device(usb_dev);
return 0;
@@ -2458,17 +2443,7 @@ int usb_authorize_device(struct usb_devi
goto error_device_descriptor;
}
- kfree(usb_dev->product);
- usb_dev->product = NULL;
- kfree(usb_dev->manufacturer);
- usb_dev->manufacturer = NULL;
- kfree(usb_dev->serial);
- usb_dev->serial = NULL;
-
usb_dev->authorized = 1;
- result = usb_enumerate_device(usb_dev);
- if (result < 0)
- goto error_enumerate;
/* Choose and set the configuration. This registers the interfaces
* with the driver core and lets interface drivers bind to them.
*/
@@ -2484,7 +2459,6 @@ int usb_authorize_device(struct usb_devi
}
dev_info(&usb_dev->dev, "authorized to connect\n");
-error_enumerate:
error_device_descriptor:
usb_autosuspend_device(usb_dev);
error_autoresume:
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 098/104] SCSI: bfa: Chinook quad port 16G FC HBA claim issue
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (91 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 097/104] usb: core: get config and string descriptors for unauthorized devices Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 099/104] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze Greg Kroah-Hartman
` (7 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Vijaya Mohan Guvva, James Bottomley
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vijaya Mohan Guvva <vmohan@brocade.com>
commit dcaf9aed995c2b2a49fb86bbbcfa2f92c797ab5d upstream.
Bfa driver crash is observed while pushing the firmware on to chinook
quad port card due to uninitialized bfi_image_ct2 access which gets
initialized only for CT2 ASIC based cards after request_firmware().
For quard port chinook (CT2 ASIC based), bfi_image_ct2 is not getting
initialized as there is no check for chinook PCI device ID before
request_firmware and instead bfi_image_cb is initialized as it is the
default case for card type check.
This patch includes changes to read the right firmware for quad port chinook.
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/bfa/bfad.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/scsi/bfa/bfad.c
+++ b/drivers/scsi/bfa/bfad.c
@@ -1824,7 +1824,7 @@ out:
static u32 *
bfad_load_fwimg(struct pci_dev *pdev)
{
- if (pdev->device == BFA_PCI_DEVICE_ID_CT2) {
+ if (bfa_asic_id_ct2(pdev->device)) {
if (bfi_image_ct2_size == 0)
bfad_read_firmware(pdev, &bfi_image_ct2,
&bfi_image_ct2_size, BFAD_FW_FILE_CT2);
@@ -1834,12 +1834,14 @@ bfad_load_fwimg(struct pci_dev *pdev)
bfad_read_firmware(pdev, &bfi_image_ct,
&bfi_image_ct_size, BFAD_FW_FILE_CT);
return bfi_image_ct;
- } else {
+ } else if (bfa_asic_id_cb(pdev->device)) {
if (bfi_image_cb_size == 0)
bfad_read_firmware(pdev, &bfi_image_cb,
&bfi_image_cb_size, BFAD_FW_FILE_CB);
return bfi_image_cb;
}
+
+ return NULL;
}
static void
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 099/104] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (92 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 098/104] SCSI: bfa: Chinook quad port 16G FC HBA claim issue Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 100/104] target/iscsi: Fix network portal creation race Greg Kroah-Hartman
` (6 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Asias He, Paolo Bonzini, Jason Wang,
Rusty Russell
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Asias He <asias.hejun@gmail.com>
commit f466f75385369a181409e46da272db3de6f5c5cb upstream.
vqs are freed in virtscsi_freeze but the hotcpu_notifier is not
unregistered. We will have a use-after-free usage when the notifier
callback is called after virtscsi_freeze.
Fixes: 285e71ea6f3583a85e27cb2b9a7d8c35d4c0d558
("virtio-scsi: reset virtqueue affinity when doing cpu hotplug")
Signed-off-by: Asias He <asias.hejun@gmail.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/scsi/virtio_scsi.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -957,6 +957,10 @@ static void virtscsi_remove(struct virti
#ifdef CONFIG_PM
static int virtscsi_freeze(struct virtio_device *vdev)
{
+ struct Scsi_Host *sh = virtio_scsi_host(vdev);
+ struct virtio_scsi *vscsi = shost_priv(sh);
+
+ unregister_hotcpu_notifier(&vscsi->nb);
virtscsi_remove_vqs(vdev);
return 0;
}
@@ -965,8 +969,17 @@ static int virtscsi_restore(struct virti
{
struct Scsi_Host *sh = virtio_scsi_host(vdev);
struct virtio_scsi *vscsi = shost_priv(sh);
+ int err;
+
+ err = virtscsi_init(vdev, vscsi);
+ if (err)
+ return err;
+
+ err = register_hotcpu_notifier(&vscsi->nb);
+ if (err)
+ vdev->config->del_vqs(vdev);
- return virtscsi_init(vdev, vscsi);
+ return err;
}
#endif
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 100/104] target/iscsi: Fix network portal creation race
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (93 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 099/104] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 101/104] Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot() Greg Kroah-Hartman
` (5 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Andy Grover, Nicholas Bellinger
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andy Grover <agrover@redhat.com>
commit ee291e63293146db64668e8d65eb35c97e8324f4 upstream.
When creating network portals rapidly, such as when restoring a
configuration, LIO's code to reuse existing portals can return a false
negative if the thread hasn't run yet and set np_thread_state to
ISCSI_NP_THREAD_ACTIVE. This causes an error in the network stack
when attempting to bind to the same address/port.
This patch sets NP_THREAD_ACTIVE before the np is placed on g_np_list,
so even if the thread hasn't run yet, iscsit_get_np will return the
existing np.
Also, convert np_lock -> np_mutex + hold across adding new net portal
to g_np_list to prevent a race where two threads may attempt to create
the same network portal, resulting in one of them failing.
(nab: Add missing mutex_unlocks in iscsit_add_np failure paths)
(DanC: Fix incorrect spin_unlock -> spin_unlock_bh)
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/iscsi/iscsi_target.c | 34 +++++++++++++++++++++-------------
1 file changed, 21 insertions(+), 13 deletions(-)
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -54,7 +54,7 @@
static LIST_HEAD(g_tiqn_list);
static LIST_HEAD(g_np_list);
static DEFINE_SPINLOCK(tiqn_lock);
-static DEFINE_SPINLOCK(np_lock);
+static DEFINE_MUTEX(np_lock);
static struct idr tiqn_idr;
struct idr sess_idr;
@@ -303,6 +303,9 @@ bool iscsit_check_np_match(
return false;
}
+/*
+ * Called with mutex np_lock held
+ */
static struct iscsi_np *iscsit_get_np(
struct __kernel_sockaddr_storage *sockaddr,
int network_transport)
@@ -310,11 +313,10 @@ static struct iscsi_np *iscsit_get_np(
struct iscsi_np *np;
bool match;
- spin_lock_bh(&np_lock);
list_for_each_entry(np, &g_np_list, np_list) {
- spin_lock(&np->np_thread_lock);
+ spin_lock_bh(&np->np_thread_lock);
if (np->np_thread_state != ISCSI_NP_THREAD_ACTIVE) {
- spin_unlock(&np->np_thread_lock);
+ spin_unlock_bh(&np->np_thread_lock);
continue;
}
@@ -326,13 +328,11 @@ static struct iscsi_np *iscsit_get_np(
* while iscsi_tpg_add_network_portal() is called.
*/
np->np_exports++;
- spin_unlock(&np->np_thread_lock);
- spin_unlock_bh(&np_lock);
+ spin_unlock_bh(&np->np_thread_lock);
return np;
}
- spin_unlock(&np->np_thread_lock);
+ spin_unlock_bh(&np->np_thread_lock);
}
- spin_unlock_bh(&np_lock);
return NULL;
}
@@ -346,16 +346,22 @@ struct iscsi_np *iscsit_add_np(
struct sockaddr_in6 *sock_in6;
struct iscsi_np *np;
int ret;
+
+ mutex_lock(&np_lock);
+
/*
* Locate the existing struct iscsi_np if already active..
*/
np = iscsit_get_np(sockaddr, network_transport);
- if (np)
+ if (np) {
+ mutex_unlock(&np_lock);
return np;
+ }
np = kzalloc(sizeof(struct iscsi_np), GFP_KERNEL);
if (!np) {
pr_err("Unable to allocate memory for struct iscsi_np\n");
+ mutex_unlock(&np_lock);
return ERR_PTR(-ENOMEM);
}
@@ -378,6 +384,7 @@ struct iscsi_np *iscsit_add_np(
ret = iscsi_target_setup_login_socket(np, sockaddr);
if (ret != 0) {
kfree(np);
+ mutex_unlock(&np_lock);
return ERR_PTR(ret);
}
@@ -386,6 +393,7 @@ struct iscsi_np *iscsit_add_np(
pr_err("Unable to create kthread: iscsi_np\n");
ret = PTR_ERR(np->np_thread);
kfree(np);
+ mutex_unlock(&np_lock);
return ERR_PTR(ret);
}
/*
@@ -396,10 +404,10 @@ struct iscsi_np *iscsit_add_np(
* point because iscsi_np has not been added to g_np_list yet.
*/
np->np_exports = 1;
+ np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
- spin_lock_bh(&np_lock);
list_add_tail(&np->np_list, &g_np_list);
- spin_unlock_bh(&np_lock);
+ mutex_unlock(&np_lock);
pr_debug("CORE[0] - Added Network Portal: %s:%hu on %s\n",
np->np_ip, np->np_port, np->np_transport->name);
@@ -469,9 +477,9 @@ int iscsit_del_np(struct iscsi_np *np)
np->np_transport->iscsit_free_np(np);
- spin_lock_bh(&np_lock);
+ mutex_lock(&np_lock);
list_del(&np->np_list);
- spin_unlock_bh(&np_lock);
+ mutex_unlock(&np_lock);
pr_debug("CORE[0] - Removed Network Portal: %s:%hu on %s\n",
np->np_ip, np->np_port, np->np_transport->name);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 101/104] Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot()
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (94 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 100/104] target/iscsi: Fix network portal creation race Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 102/104] btrfs: restrict snapshotting to own subvolumes Greg Kroah-Hartman
` (4 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Wang Shilong, Josef Bacik,
Chris Mason
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
commit 90515e7f5d7d24cbb2a4038a3f1b5cfa2921aa17 upstream.
We may return early in btrfs_drop_snapshot(), we shouldn't
call btrfs_std_err() for this case, fix it.
Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/btrfs/extent-tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -7491,7 +7491,7 @@ out:
*/
if (root_dropped == false)
btrfs_add_dead_root(root);
- if (err)
+ if (err && err != -EAGAIN)
btrfs_std_error(root->fs_info, err);
return err;
}
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 102/104] btrfs: restrict snapshotting to own subvolumes
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (95 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 101/104] Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot() Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 103/104] powerpc: Fix the setup of CPU-to-Node mappings during CPU online Greg Kroah-Hartman
` (3 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, David Sterba, Josef Bacik,
Chris Mason
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Sterba <dsterba@suse.cz>
commit d024206133ce21936b3d5780359afc00247655b7 upstream.
Currently, any user can snapshot any subvolume if the path is accessible and
thus indirectly create and keep files he does not own under his direcotries.
This is not possible with traditional directories.
In security context, a user can snapshot root filesystem and pin any
potentially buggy binaries, even if the updates are applied.
All the snapshots are visible to the administrator, so it's possible to
verify if there are suspicious snapshots.
Another more practical problem is that any user can pin the space used
by eg. root and cause ENOSPC.
Original report:
https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/484786
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Chris Mason <clm@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/btrfs/ioctl.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1528,6 +1528,12 @@ static noinline int btrfs_ioctl_snap_cre
printk(KERN_INFO "btrfs: Snapshot src from "
"another FS\n");
ret = -EINVAL;
+ } else if (!inode_owner_or_capable(src_inode)) {
+ /*
+ * Subvolume creation is not restricted, but snapshots
+ * are limited to own subvolumes only
+ */
+ ret = -EPERM;
} else {
ret = btrfs_mksubvol(&file->f_path, name, namelen,
BTRFS_I(src_inode)->root,
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 103/104] powerpc: Fix the setup of CPU-to-Node mappings during CPU online
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (96 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 102/104] btrfs: restrict snapshotting to own subvolumes Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 104/104] powerpc: Make sure "cache" directory is removed when offlining cpu Greg Kroah-Hartman
` (2 subsequent siblings)
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Srivatsa S. Bhat,
Benjamin Herrenschmidt
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
commit d4edc5b6c480a0917e61d93d55531d7efa6230be upstream.
On POWER platforms, the hypervisor can notify the guest kernel about dynamic
changes in the cpu-numa associativity (VPHN topology update). Hence the
cpu-to-node mappings that we got from the firmware during boot, may no longer
be valid after such updates. This is handled using the arch_update_cpu_topology()
hook in the scheduler, and the sched-domains are rebuilt according to the new
mappings.
But unfortunately, at the moment, CPU hotplug ignores these updated mappings
and instead queries the firmware for the cpu-to-numa relationships and uses
them during CPU online. So the kernel can end up assigning wrong NUMA nodes
to CPUs during subsequent CPU hotplug online operations (after booting).
Further, a particularly problematic scenario can result from this bug:
On POWER platforms, the SMT mode can be switched between 1, 2, 4 (and even 8)
threads per core. The switch to Single-Threaded (ST) mode is performed by
offlining all except the first CPU thread in each core. Switching back to
SMT mode involves onlining those other threads back, in each core.
Now consider this scenario:
1. During boot, the kernel gets the cpu-to-node mappings from the firmware
and assigns the CPUs to NUMA nodes appropriately, during CPU online.
2. Later on, the hypervisor updates the cpu-to-node mappings dynamically and
communicates this update to the kernel. The kernel in turn updates its
cpu-to-node associations and rebuilds its sched domains. Everything is
fine so far.
3. Now, the user switches the machine from SMT to ST mode (say, by running
ppc64_cpu --smt=1). This involves offlining all except 1 thread in each
core.
4. The user then tries to switch back from ST to SMT mode (say, by running
ppc64_cpu --smt=4), and this involves onlining those threads back. Since
CPU hotplug ignores the new mappings, it queries the firmware and tries to
associate the newly onlined sibling threads to the old NUMA nodes. This
results in sibling threads within the same core getting associated with
different NUMA nodes, which is incorrect.
The scheduler's build-sched-domains code gets thoroughly confused with this
and enters an infinite loop and causes soft-lockups, as explained in detail
in commit 3be7db6ab (powerpc: VPHN topology change updates all siblings).
So to fix this, use the numa_cpu_lookup_table to remember the updated
cpu-to-node mappings, and use them during CPU hotplug online operations.
Further, we also need to ensure that all threads in a core are assigned to a
common NUMA node, irrespective of whether all those threads were online during
the topology update. To achieve this, we take care not to use cpu_sibling_mask()
since it is not hotplug invariant. Instead, we use cpu_first_sibling_thread()
and set up the mappings manually using the 'threads_per_core' value for that
particular platform. This helps us ensure that we don't hit this bug with any
combination of CPU hotplug and SMT mode switching.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/include/asm/topology.h | 10 ++++-
arch/powerpc/mm/numa.c | 70 ++++++++++++++++++++++++++++++++++--
2 files changed, 76 insertions(+), 4 deletions(-)
--- a/arch/powerpc/include/asm/topology.h
+++ b/arch/powerpc/include/asm/topology.h
@@ -22,7 +22,15 @@ struct device_node;
static inline int cpu_to_node(int cpu)
{
- return numa_cpu_lookup_table[cpu];
+ int nid;
+
+ nid = numa_cpu_lookup_table[cpu];
+
+ /*
+ * During early boot, the numa-cpu lookup table might not have been
+ * setup for all CPUs yet. In such cases, default to node 0.
+ */
+ return (nid < 0) ? 0 : nid;
}
#define parent_node(node) (node)
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -31,6 +31,8 @@
#include <asm/sparsemem.h>
#include <asm/prom.h>
#include <asm/smp.h>
+#include <asm/cputhreads.h>
+#include <asm/topology.h>
#include <asm/firmware.h>
#include <asm/paca.h>
#include <asm/hvcall.h>
@@ -152,9 +154,22 @@ static void __init get_node_active_regio
}
}
-static void map_cpu_to_node(int cpu, int node)
+static void reset_numa_cpu_lookup_table(void)
+{
+ unsigned int cpu;
+
+ for_each_possible_cpu(cpu)
+ numa_cpu_lookup_table[cpu] = -1;
+}
+
+static void update_numa_cpu_lookup_table(unsigned int cpu, int node)
{
numa_cpu_lookup_table[cpu] = node;
+}
+
+static void map_cpu_to_node(int cpu, int node)
+{
+ update_numa_cpu_lookup_table(cpu, node);
dbg("adding cpu %d to node %d\n", cpu, node);
@@ -519,11 +534,24 @@ static int of_drconf_to_nid_single(struc
*/
static int __cpuinit numa_setup_cpu(unsigned long lcpu)
{
- int nid = 0;
- struct device_node *cpu = of_get_cpu_node(lcpu, NULL);
+ int nid;
+ struct device_node *cpu;
+
+ /*
+ * If a valid cpu-to-node mapping is already available, use it
+ * directly instead of querying the firmware, since it represents
+ * the most recent mapping notified to us by the platform (eg: VPHN).
+ */
+ if ((nid = numa_cpu_lookup_table[lcpu]) >= 0) {
+ map_cpu_to_node(lcpu, nid);
+ return nid;
+ }
+
+ cpu = of_get_cpu_node(lcpu, NULL);
if (!cpu) {
WARN_ON(1);
+ nid = 0;
goto out;
}
@@ -1066,6 +1094,7 @@ void __init do_init_bootmem(void)
*/
setup_node_to_cpumask_map();
+ reset_numa_cpu_lookup_table();
register_cpu_notifier(&ppc64_numa_nb);
cpu_numa_callback(&ppc64_numa_nb, CPU_UP_PREPARE,
(void *)(unsigned long)boot_cpuid);
@@ -1443,6 +1472,33 @@ static int update_cpu_topology(void *dat
return 0;
}
+static int update_lookup_table(void *data)
+{
+ struct topology_update_data *update;
+
+ if (!data)
+ return -EINVAL;
+
+ /*
+ * Upon topology update, the numa-cpu lookup table needs to be updated
+ * for all threads in the core, including offline CPUs, to ensure that
+ * future hotplug operations respect the cpu-to-node associativity
+ * properly.
+ */
+ for (update = data; update; update = update->next) {
+ int nid, base, j;
+
+ nid = update->new_nid;
+ base = cpu_first_thread_sibling(update->cpu);
+
+ for (j = 0; j < threads_per_core; j++) {
+ update_numa_cpu_lookup_table(base + j, nid);
+ }
+ }
+
+ return 0;
+}
+
/*
* Update the node maps and sysfs entries for each cpu whose home node
* has changed. Returns 1 when the topology has changed, and 0 otherwise.
@@ -1511,6 +1567,14 @@ int arch_update_cpu_topology(void)
stop_machine(update_cpu_topology, &updates[0], &updated_cpus);
+ /*
+ * Update the numa-cpu lookup table with the new mappings, even for
+ * offline CPUs. It is best to perform this update from the stop-
+ * machine context.
+ */
+ stop_machine(update_lookup_table, &updates[0],
+ cpumask_of(raw_smp_processor_id()));
+
for (ud = &updates[0]; ud; ud = ud->next) {
unregister_cpu_under_node(ud->cpu, ud->old_nid);
register_cpu_under_node(ud->cpu, ud->new_nid);
^ permalink raw reply [flat|nested] 103+ messages in thread
* [PATCH 3.10 104/104] powerpc: Make sure "cache" directory is removed when offlining cpu
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (97 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 103/104] powerpc: Fix the setup of CPU-to-Node mappings during CPU online Greg Kroah-Hartman
@ 2014-02-04 21:02 ` Greg Kroah-Hartman
2014-02-05 6:38 ` [PATCH 3.10 000/104] 3.10.29-stable review Guenter Roeck
2014-02-05 20:40 ` Shuah Khan
100 siblings, 0 replies; 103+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-04 21:02 UTC (permalink / raw)
To: linux-kernel
Cc: Greg Kroah-Hartman, stable, Paul Mackerras,
Benjamin Herrenschmidt
3.10-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paul Mackerras <paulus@samba.org>
commit 91b973f90c1220d71923e7efe1e61f5329806380 upstream.
The code in remove_cache_dir() is supposed to remove the "cache"
subdirectory from the sysfs directory for a CPU when that CPU is
being offlined. It tries to do this by calling kobject_put() on
the kobject for the subdirectory. However, the subdirectory only
gets removed once the last reference goes away, and the reference
being put here may well not be the last reference. That means
that the "cache" subdirectory may still exist when the offlining
operation has finished. If the same CPU subsequently gets onlined,
the code tries to add a new "cache" subdirectory. If the old
subdirectory has not yet been removed, we get a WARN_ON in the
sysfs code, with stack trace, and an error message printed on the
console. Further, we ultimately end up with an online cpu with no
"cache" subdirectory.
This fixes it by doing an explicit kobject_del() at the point where
we want the subdirectory to go away. kobject_del() removes the sysfs
directory even though the object still exists in memory. The object
will get freed at some point in the future. A subsequent onlining
operation can create a new sysfs directory, even if the old object
still exists in memory, without causing any problems.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/powerpc/kernel/cacheinfo.c | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/powerpc/kernel/cacheinfo.c
+++ b/arch/powerpc/kernel/cacheinfo.c
@@ -788,6 +788,9 @@ static void remove_cache_dir(struct cach
{
remove_index_dirs(cache_dir);
+ /* Remove cache dir from sysfs */
+ kobject_del(cache_dir->kobj);
+
kobject_put(cache_dir->kobj);
kfree(cache_dir);
^ permalink raw reply [flat|nested] 103+ messages in thread
* Re: [PATCH 3.10 011/104] x86: Add check for number of available vectors before CPU down
2014-02-04 21:01 ` [PATCH 3.10 011/104] x86: Add check for number of available vectors before CPU down Greg Kroah-Hartman
@ 2014-02-04 22:45 ` Prarit Bhargava
0 siblings, 0 replies; 103+ messages in thread
From: Prarit Bhargava @ 2014-02-04 22:45 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, stable, Gong Chen, Andi Kleen, Michel Lespinasse,
Seiji Aguchi, Yang Zhang, Paul Gortmaker, Janet Morgan, Tony Luck,
Ruiv Wang, H. Peter Anvin
On 02/04/2014 04:01 PM, Greg Kroah-Hartman wrote:
> 3.10-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Prarit Bhargava <prarit@redhat.com>
>
> commit da6139e49c7cb0f4251265cb5243b8d220adb48d upstream.
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=64791
Greg, there is a follow up to this patch that removes declarations from the
stack and makes them global within the file. This was done to avoid a
-Wframe-larger-than warning that was found in with 0day kernel build service,
kbuild.
So I don't think this should go into -stable yet. I've pushed a patch onto
LKML to resolve the kbuild warning, and hopefully on the x86 maintainers pick
it up.
P.
^ permalink raw reply [flat|nested] 103+ messages in thread
* Re: [PATCH 3.10 000/104] 3.10.29-stable review
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (98 preceding siblings ...)
2014-02-04 21:02 ` [PATCH 3.10 104/104] powerpc: Make sure "cache" directory is removed when offlining cpu Greg Kroah-Hartman
@ 2014-02-05 6:38 ` Guenter Roeck
2014-02-05 20:40 ` Shuah Khan
100 siblings, 0 replies; 103+ messages in thread
From: Guenter Roeck @ 2014-02-05 6:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, stable
On 02/04/2014 01:01 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.29 release.
> There are 104 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 Thu Feb 6 21:02:03 UTC 2014.
> Anything received after that time might be too late.
>
Version tested: v3.10.28-103
Build results:
total: total: 126 pass: 121 skipped: 4 fail: 1
qemu tests all passed.
Results are as expected.
Details are available at http://server.roeck-us.net:8010/builders.
Guenter
^ permalink raw reply [flat|nested] 103+ messages in thread
* Re: [PATCH 3.10 000/104] 3.10.29-stable review
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
` (99 preceding siblings ...)
2014-02-05 6:38 ` [PATCH 3.10 000/104] 3.10.29-stable review Guenter Roeck
@ 2014-02-05 20:40 ` Shuah Khan
100 siblings, 0 replies; 103+ messages in thread
From: Shuah Khan @ 2014-02-05 20:40 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: torvalds, akpm, stable, Shuah Khan, shuahkhan@gmail.com
On 02/04/2014 02:01 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.29 release.
> There are 104 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 Thu Feb 6 21:02:03 UTC 2014.
> 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/v3.0/stable-review/patch-3.10.29-rc1.gz
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
Patch applied cleanly. boot tests passed on all test systems. No dmesg
regressions: emerg, crit, alert, err are clean. No regressions in warn.
Minor Note: git apply --index complained about extra white space at the
end of patch file. patch -p1 worked just fine.
-- Shuah
--
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com | (970) 672-0658
^ permalink raw reply [flat|nested] 103+ messages in thread
end of thread, other threads:[~2014-02-05 20:40 UTC | newest]
Thread overview: 103+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 21:01 [PATCH 3.10 000/104] 3.10.29-stable review Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 002/104] md/raid5: fix long-standing problem with bitmap handling on write failure Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 003/104] drm/nouveau/bios: fix offset calculation for BMPv1 bioses Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 004/104] lib/decompressors: fix "no limit" output buffer length Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 005/104] mm: hugetlbfs: fix hugetlbfs optimization Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 006/104] e752x_edac: Fix pci_dev usage count Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 007/104] e1000e: fix compiler warnings Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 008/104] mm/mempolicy.c: fix mempolicy printing in numa_maps Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 009/104] x86, x32: Correct invalid use of user timespec in the kernel Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 010/104] x86/efi: Fix off-by-one bug in EFI Boot Services reservation Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 011/104] x86: Add check for number of available vectors before CPU down Greg Kroah-Hartman
2014-02-04 22:45 ` Prarit Bhargava
2014-02-04 21:01 ` [PATCH 3.10 012/104] KVM: x86: limit PIT timer frequency Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 014/104] usb: option: add new zte 3g modem pids to option driver Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 016/104] USB: cypress_m8: fix ring-indicator detection and reporting Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 017/104] USB: ftdi_sio: added CS5 quirk for broken smartcard readers Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 018/104] USB: Nokia 502 is an unusual device Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 019/104] usb: xhci: Check for XHCI_PLAT in xhci_cleanup_msix() Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 020/104] USB: fix race between hub_disconnect and recursively_mark_NOTATTACHED Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 021/104] usb: ehci: add freescale imx28 special write register method Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 022/104] rtlwifi: rtl8192cu: Add new device ID Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 023/104] rtlwifi: Update beacon statistics for USB driver Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 024/104] rtlwifi: rtl8192c: Prevent reconnect attempts if not connected Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 025/104] rtlwifi: rtl8192cu: Add new firmware Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 026/104] rtlwifi: Redo register save locations Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 027/104] rtlwifi: Set the link state Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 028/104] rtlwifi: rtl8192c: Add new definitions in the dm_common header Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 029/104] rtlwifi: Increase the RX queue length for USB drivers Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 030/104] rtlwifi: rtl8192c: Add routines to save/restore power index registers Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 031/104] rtlwifi: rtl8192cu: Update the " Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 032/104] rtlwifi: rtl8192cu: Fix some code in RF handling Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 033/104] rtlwifi: Add missing code to PWDB statics routine Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 034/104] rtlwifi: rtl8188ee: Fix typo in code Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 035/104] mwifiex: add missing endian conversion for fw_tsf Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 036/104] mwifiex: fix wrong 11ac bits setting in fw_cap_info Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 037/104] iwlwifi: mvm: fix missing cleanup in .start() error path Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 038/104] b43: Fix lockdep splat Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 039/104] b43: Fix unload oops if firmware is not available Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 040/104] b43legacy: " Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 041/104] b43: fix the wrong assignment of status.freq in b43_rx() Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 042/104] staging: r8712u: Set device type to wlan Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 043/104] staging: vt6656: [BUG] BBvUpdatePreEDThreshold Always set sensitivity on bScanning Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 044/104] staging: vt6656: CARDqGetNextTBTT correct uLowNextTBTT Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 045/104] tty/serial: at91: Handle shutdown more safely Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 046/104] ARM: at91: smc: bug fix in sam9_smc_cs_read() Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 047/104] hwmon: (k10temp) Add support for Kaveri CPUs Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 048/104] serial: add support for 200 v3 series Titan card Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 049/104] serial: 8250: Fix initialisation of Quatech cards with the AMCC PCI chip Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 050/104] serial: 8250: enable UART_BUG_NOMSR for Tegra Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 051/104] KVM: s390: fix diagnose code extraction Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 052/104] s390/uapi: fix struct statfs64 definition Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 053/104] parport: parport_pc: remove double PCI ID for NetMos Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 054/104] rtc-cmos: Add an alarm disable quirk Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 055/104] rtc: max8907: weekday encoding fixes Greg Kroah-Hartman
2014-02-04 21:01 ` [PATCH 3.10 056/104] pinctrl: sunxi: Honor GPIO output initial vaules Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 057/104] perf kvm: Fix kvm report without guestmount Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 058/104] mfd: max77686: Fix regmap resource leak on driver remove Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 059/104] ASoC: adau1701: Fix ADAU1701_SEROCTL_WORD_LEN_16 constant Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 060/104] ASoC: wm5110: Extend SYSCLK patch file for rev D Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 061/104] ALSA: rme9652: fix a missing comma in channel_map_9636_ds[] Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 062/104] ALSA: hda - Dont create duplicated ctls for loopback paths Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 063/104] ALSA: Enable CONFIG_ZONE_DMA for smaller PCI DMA masks Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 065/104] tpm/tpm_i2c_stm_st33: Check return code of get_burstcount Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 066/104] tpm/tpm_ppi: Do not compare strcmp(a,b) == -1 Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 067/104] ata: sata_mv: introduce compatible string "marvell, armada-370-sata" Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 068/104] ata: sata_mv: fix disk hotplug for Armada 370/XP SoCs Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 069/104] libata: disable LPM for some WD SATA-I devices Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 070/104] ext4: avoid clearing beyond i_blocks when truncating an inline data file Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 071/104] vfs: Is mounted should be testing mnt_ns for NULL or error Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 072/104] bcache: Data corruption fix Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 074/104] bnx2x: fix DMA unmapping of TSO split BDs Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 075/104] inet_diag: fix inet_diag_dump_icsk() timewait socket state logic Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 076/104] ieee802154: Fix memory leak in ieee802154_add_iface() Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 077/104] net: avoid reference counter overflows on fib_rules in multicast forwarding Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 078/104] net,via-rhine: Fix tx_timeout handling Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 079/104] net: rds: fix per-cpu helper usage Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 080/104] tcp: metrics: Avoid duplicate entries with the same destination-IP Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 081/104] bpf: do not use reciprocal divide Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 082/104] s390/bpf,jit: fix 32 bit divisions, use unsigned divide instructions Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 083/104] ip_tunnel: clear IPCB in ip_tunnel_xmit() in case dst_link_failure() is called Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 084/104] fib_frontend: fix possible NULL pointer dereference Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 085/104] net: Fix memory leak if TPROXY used with TCP early demux Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 086/104] xen-netfront: fix resource leak in netfront Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 087/104] sit: fix double free of fb_tunnel_dev on exit Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 088/104] Revert "ip6tnl: fix use after free of fb_tnl_dev" Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 089/104] ip6tnl: fix double free of fb_tnl_dev on exit Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 090/104] iwlwifi: pcie: enable oscillator for L1 exit Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 091/104] parisc: fix cache-flushing Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 092/104] KVM: PPC: Book3S HV: use xics_wake_cpu only when defined Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 093/104] KVM: PPC: e500: Fix bad address type in deliver_tlb_misss() Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 094/104] ALSA: hda - hdmi: introduce patch_nvhdmi() Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 095/104] ALSA: hda/hdmi - allow PIN_OUT to be dynamically enabled Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 096/104] iwlwifi: pcie: fix interrupt coalescing for 7260 / 3160 Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 097/104] usb: core: get config and string descriptors for unauthorized devices Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 098/104] SCSI: bfa: Chinook quad port 16G FC HBA claim issue Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 099/104] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 100/104] target/iscsi: Fix network portal creation race Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 101/104] Btrfs: handle EAGAIN case properly in btrfs_drop_snapshot() Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 102/104] btrfs: restrict snapshotting to own subvolumes Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 103/104] powerpc: Fix the setup of CPU-to-Node mappings during CPU online Greg Kroah-Hartman
2014-02-04 21:02 ` [PATCH 3.10 104/104] powerpc: Make sure "cache" directory is removed when offlining cpu Greg Kroah-Hartman
2014-02-05 6:38 ` [PATCH 3.10 000/104] 3.10.29-stable review Guenter Roeck
2014-02-05 20:40 ` Shuah Khan
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).