From: Sara Sharon <sara.sharon(a)intel.com>
commit 0232d2cd7aa8e1b810fe84fb4059a0bd1eabe2ba upstream.
When getting HW rfkill we get stop_device being called from
two paths.
One path is the IRQ calling stop device, and updating op
mode and stack.
As a result, cfg80211 is running rfkill sync work that shuts
down all devices (second path).
In the second path, we eventually get to iwl_mvm_stop_device
which calls iwl_fw_dump_conf_clear->iwl_fw_dbg_stop_recording,
that access periphery registers.
The device may be stopped at this point from the first path,
which will result with a failure to access those registers.
Simply checking for the trans status is insufficient, since
the race will still exist, only minimized.
Instead, move the stop from iwl_fw_dump_conf_clear (which is
getting called only from stop path) to the transport stop
device function, where the access is always safe.
This has the added value, of actually stopping dbgc before
stopping device even when the stop is initiated from the
transport.
Fixes: 1efc3843a4ee ("iwlwifi: stop dbgc recording before stopping DMA")
Signed-off-by: Sara Sharon <sara.sharon(a)intel.com>
Signed-off-by: Luca Coelho <luciano.coelho(a)intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach(a)intel.com>
---
drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 2 --
drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 6 ++++++
drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 9 +++++++++
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
index 9c889a32fe24..223fb77a3aa9 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h
@@ -209,8 +209,6 @@ static inline void iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt)
static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt)
{
- iwl_fw_dbg_stop_recording(fwrt);
-
fwrt->dump.conf = FW_DBG_INVALID;
}
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
index c59f4581e972..ac05fd1e74c4 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c
@@ -49,6 +49,7 @@
*
*****************************************************************************/
#include "iwl-trans.h"
+#include "iwl-prph.h"
#include "iwl-context-info.h"
#include "internal.h"
@@ -156,6 +157,11 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool low_power)
trans_pcie->is_down = true;
+ /* Stop dbgc before stopping device */
+ iwl_write_prph(trans, DBGC_IN_SAMPLE, 0);
+ udelay(100);
+ iwl_write_prph(trans, DBGC_OUT_CTRL, 0);
+
/* tell the device to stop sending interrupts */
iwl_disable_interrupts(trans);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index 2e3e013ec95a..12a9b86d71ea 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1138,6 +1138,15 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power)
trans_pcie->is_down = true;
+ /* Stop dbgc before stopping device */
+ if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) {
+ iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100);
+ } else {
+ iwl_write_prph(trans, DBGC_IN_SAMPLE, 0);
+ udelay(100);
+ iwl_write_prph(trans, DBGC_OUT_CTRL, 0);
+ }
+
/* tell the device to stop sending interrupts */
iwl_disable_interrupts(trans);
--
2.14.3
Commit: e39d200fa5bf5b94a0948db0dae44c1b73b84a56
Target Stable Tree Branch: 4.9.y
Why this patch is needed: Due to a request to handle CVE-2017-17741, we would need to backport this patch to our kernel. The patch is already in mainline:https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git…
Could you please include this patch in 4.9.y stable tree branch?
--AH
[Fair warning: This is pure conjecture right now.]
In
commit b8e2b0199cc377617dc238f5106352c06dcd3fa2
Author: Peter Rosin <peda(a)axentia.se>
Date: Tue Jul 4 12:36:57 2017 +0200
drm/fb-helper: factor out pseudo-palette
Peter extracted the pseudo palette computation, but seems to have done
an off-by-one. I spotted that +1, but then noticed that we've passed
start++ to (now gone) setcolreg function, so it seemed to all match
up. Except post vs. pre-increment ftw.
Result is that the palette is off-by-one, and the forground color
(slot 0) ends up black, rendering a fairly unreadable console.
What baffles me is that on some systems it still seems to work
somehow, which lead us all down a wild goose chase trying to add
load_lut calls back in in various places (which was also intentionally
removed, but really doesn't seem to be the real root cause).
Fixes: b8e2b0199cc3 ("drm/fb-helper: factor out pseudo-palette")
Cc: Peter Rosin <peda(a)axenita.se>
Cc: Daniel Vetter <daniel.vetter(a)ffwll.ch>
Cc: Daniel Vetter <daniel.vetter(a)intel.com>
Cc: Gustavo Padovan <gustavo(a)padovan.org>
Cc: Sean Paul <seanpaul(a)chromium.org>
Cc: David Airlie <airlied(a)linux.ie>
Cc: dri-devel(a)lists.freedesktop.org
Cc: <stable(a)vger.kernel.org> # v4.14+
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198123
Reported-by: Deposite Pirate <dpirate(a)metalpunks.info>
Reported-by: Bill Fraser <bill.fraser(a)gmail.com>
Cc: Deposite Pirate <dpirate(a)metalpunks.info>
Cc: Bill Fraser <bill.fraser(a)gmail.com>
Cc: Michel Dänzer <michel(a)daenzer.net>
Signed-off-by: Daniel Vetter <daniel.vetter(a)intel.com>
---
drivers/gpu/drm/drm_fb_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 035784ddd133..1c3a200c4a10 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1295,7 +1295,7 @@ static int setcmap_pseudo_palette(struct fb_cmap *cmap, struct fb_info *info)
mask <<= info->var.transp.offset;
value |= mask;
}
- palette[cmap->start + i] = value;
+ palette[cmap->start] = value;
}
return 0;
--
2.15.1
This is the start of the stable review cycle for the 3.18.92 release.
There are 46 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 Wed Jan 17 12:32:57 UTC 2018.
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.x/stable-review/patch-3.18.92-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-3.18.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 3.18.92-rc1
Benjamin Poirier <bpoirier(a)suse.com>
e1000e: Fix e1000_check_for_copper_link_ich8lan return value.
Icenowy Zheng <icenowy(a)aosc.io>
uas: ignore UAS for Norelsys NS1068(X) chips
Ben Seri <ben(a)armis.com>
Bluetooth: Prevent stack info leak from the EFS element.
Viktor Slavkovic <viktors(a)google.com>
staging: android: ashmem: fix a race condition in ASHMEM_SET_SIZE ioctl
Shuah Khan <shuahkh(a)osg.samsung.com>
usbip: remove kernel addresses from usb device and urb debug msgs
Pete Zaitcev <zaitcev(a)redhat.com>
USB: fix usbmon BUG trigger
Stefan Agner <stefan(a)agner.ch>
usb: misc: usb3503: make sure reset is low for at least 100us
Christian Holl <cyborgx1(a)gmail.com>
USB: serial: cp210x: add new device ID ELV ALC 8xxx
Diego Elio Pettenò <flameeyes(a)flameeyes.eu>
USB: serial: cp210x: add IDs for LifeScan OneTouch Verio IQ
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Revert "can: kvaser_usb: free buf in error paths"
Nicholas Bellinger <nab(a)linux-iscsi.org>
target: Avoid early CMD_T_PRE_EXECUTE failures during ABORT_TASK
Nicholas Bellinger <nab(a)linux-iscsi.org>
iscsi-target: Make TASK_REASSIGN use proper se_cmd->cmd_kref
Jia Zhang <qianyue.zj(a)alibaba-inc.com>
x86/microcode/intel: Extend BDW late-loading with a revision check
Eric Biggers <ebiggers(a)google.com>
crypto: algapi - fix NULL dereference in crypto_remove_spawns()
Jerome Brunet <jbrunet(a)baylibre.com>
net: stmmac: enable EEE in MII, GMII or RGMII only
Sergei Shtylyov <sergei.shtylyov(a)cogentembedded.com>
sh_eth: fix SH7757 GEther initialization
Sergei Shtylyov <sergei.shtylyov(a)cogentembedded.com>
sh_eth: fix TSU resource handling
Mohamed Ghannam <simo.ghannam(a)gmail.com>
RDS: null pointer dereference in rds_atomic_free_op
Mohamed Ghannam <simo.ghannam(a)gmail.com>
RDS: Heap OOB write in rds_message_alloc_sgs()
Cong Wang <xiyou.wangcong(a)gmail.com>
8021q: fix a memory leak for VLAN 0 device
Vikas C Sajjan <vikas.cha.sajjan(a)hpe.com>
x86/acpi: Reduce code duplication in mp_override_legacy_irq()
Takashi Iwai <tiwai(a)suse.de>
ALSA: aloop: Fix racy hw constraints adjustment
Takashi Iwai <tiwai(a)suse.de>
ALSA: aloop: Fix inconsistent format due to incomplete rule
Takashi Iwai <tiwai(a)suse.de>
ALSA: aloop: Release cable upon open error path
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Allow aborting mutex lock at OSS read/write loops
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Abort properly at pending signal in OSS read/write loops
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Add missing error checks in OSS emulation plugin builder
Takashi Iwai <tiwai(a)suse.de>
ALSA: pcm: Remove incorrect snd_BUG_ON() usages
Vikas C Sajjan <vikas.cha.sajjan(a)hpe.com>
x86/acpi: Handle SCI interrupts above legacy space gracefully
Jim Mattson <jmattson(a)google.com>
kvm: vmx: Scrub hardware GPRs at VM-exit
Peter Zijlstra <peterz(a)infradead.org>
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Also verify sizeof `elf_fpreg_t' with PTRACE_SETREGSET
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Disallow outsized PTRACE_SETREGSET NT_PRFPREG regset accesses
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Fix an FCSR access API regression with NT_PRFPREG and MSA
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Consistently handle buffer counter with PTRACE_SETREGSET
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Guard against any partial write attempt with PTRACE_SETREGSET
Maciej W. Rozycki <macro(a)mips.com>
MIPS: Factor out NT_PRFPREG regset access helpers
Bart Van Assche <bart.vanassche(a)wdc.com>
IB/srpt: Disable RDMA access by the initiator
Wolfgang Grandegger <wg(a)grandegger.com>
can: gs_usb: fix return value of the "set_bittiming" callback
Aaron Ma <aaron.ma(a)canonical.com>
Input: elantech - add new icbody type 15
Oleg Nesterov <oleg(a)redhat.com>
kernel/signal.c: remove the no longer needed SIGNAL_UNKILLABLE check in complete_signal()
Oleg Nesterov <oleg(a)redhat.com>
kernel/signal.c: protect the SIGNAL_UNKILLABLE tasks from !sig_kernel_only() signals
Oleg Nesterov <oleg(a)redhat.com>
kernel/signal.c: protect the traced SIGNAL_UNKILLABLE tasks from SIGKILL
David Howells <dhowells(a)redhat.com>
fscache: Fix the default for fscache_maybe_release_page()
Jan Engelhardt <jengelh(a)inai.de>
crypto: n2 - cure use after free
Oleg Nesterov <oleg(a)redhat.com>
kernel/acct.c: fix the acct->needcheck check in check_free_space()
-------------
Diffstat:
Makefile | 4 +-
arch/mips/kernel/ptrace.c | 147 ++++++++++++++++++----
arch/x86/kernel/acpi/boot.c | 60 +++++----
arch/x86/kernel/cpu/microcode/intel.c | 13 +-
arch/x86/kvm/svm.c | 19 +++
arch/x86/kvm/vmx.c | 14 ++-
crypto/algapi.c | 12 ++
drivers/crypto/n2_core.c | 3 +
drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-
drivers/input/mouse/elantech.c | 2 +-
drivers/net/can/usb/gs_usb.c | 2 +-
drivers/net/can/usb/kvaser_usb.c | 2 -
drivers/net/ethernet/intel/e1000e/ich8lan.c | 11 +-
drivers/net/ethernet/renesas/sh_eth.c | 29 ++++-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +
drivers/staging/android/ashmem.c | 2 +
drivers/target/iscsi/iscsi_target.c | 21 ++--
drivers/target/target_core_tmr.c | 9 ++
drivers/target/target_core_transport.c | 2 +
drivers/usb/misc/usb3503.c | 2 +
drivers/usb/mon/mon_bin.c | 8 +-
drivers/usb/serial/cp210x.c | 2 +
drivers/usb/storage/unusual_uas.h | 7 ++
drivers/usb/usbip/usbip_common.c | 17 +--
include/linux/fscache.h | 2 +-
include/linux/phy.h | 11 ++
include/linux/sh_eth.h | 1 -
include/target/target_core_base.h | 1 +
kernel/acct.c | 2 +-
kernel/events/core.c | 61 ++++++++-
kernel/signal.c | 18 +--
net/8021q/vlan.c | 7 +-
net/bluetooth/l2cap_core.c | 20 +--
net/rds/rdma.c | 4 +
sound/core/oss/pcm_oss.c | 41 +++---
sound/core/oss/pcm_plugin.c | 14 ++-
sound/core/pcm_lib.c | 4 +-
sound/drivers/aloop.c | 98 ++++++++-------
38 files changed, 488 insertions(+), 193 deletions(-)
The patch titled
Subject: kdump: write correct address of mem_section into vmcoreinfo
has been removed from the -mm tree. Its filename was
kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: "Kirill A. Shutemov" <kirill.shutemov(a)linux.intel.com>
Subject: kdump: write correct address of mem_section into vmcoreinfo
Depending on configuration mem_section can now be an array or a pointer to
an array allocated dynamically. In most cases, we can continue to refer
to it as 'mem_section' regardless of what it is.
But there's one exception: '&mem_section' means "address of the array" if
mem_section is an array, but if mem_section is a pointer, it would mean
"address of the pointer".
We've stepped onto this in kdump code. VMCOREINFO_SYMBOL(mem_section)
writes down address of pointer into vmcoreinfo, not array as we wanted.
Let's introduce VMCOREINFO_SYMBOL_ARRAY() that would handle the situation
correctly for both cases.
Link: http://lkml.kernel.org/r/20180112162532.35896-1-kirill.shutemov@linux.intel…
Signed-off-by: Kirill A. Shutemov <kirill.shutemov(a)linux.intel.com>
Fixes: 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y")
Acked-by: Baoquan He <bhe(a)redhat.com>
Acked-by: Dave Young <dyoung(a)redhat.com>
Cc: Ingo Molnar <mingo(a)redhat.com>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: "H. Peter Anvin" <hpa(a)zytor.com>
Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Cc: Dave Young <dyoung(a)redhat.com>
Cc: Baoquan He <bhe(a)redhat.com>
Cc: Vivek Goyal <vgoyal(a)redhat.com>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
include/linux/crash_core.h | 2 ++
kernel/crash_core.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff -puN include/linux/crash_core.h~kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo include/linux/crash_core.h
--- a/include/linux/crash_core.h~kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo
+++ a/include/linux/crash_core.h
@@ -42,6 +42,8 @@ phys_addr_t paddr_vmcoreinfo_note(void);
vmcoreinfo_append_str("PAGESIZE=%ld\n", value)
#define VMCOREINFO_SYMBOL(name) \
vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)&name)
+#define VMCOREINFO_SYMBOL_ARRAY(name) \
+ vmcoreinfo_append_str("SYMBOL(%s)=%lx\n", #name, (unsigned long)name)
#define VMCOREINFO_SIZE(name) \
vmcoreinfo_append_str("SIZE(%s)=%lu\n", #name, \
(unsigned long)sizeof(name))
diff -puN kernel/crash_core.c~kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo kernel/crash_core.c
--- a/kernel/crash_core.c~kdump-write-a-correct-address-of-mem_section-into-vmcoreinfo
+++ a/kernel/crash_core.c
@@ -410,7 +410,7 @@ static int __init crash_save_vmcoreinfo_
VMCOREINFO_SYMBOL(contig_page_data);
#endif
#ifdef CONFIG_SPARSEMEM
- VMCOREINFO_SYMBOL(mem_section);
+ VMCOREINFO_SYMBOL_ARRAY(mem_section);
VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS);
VMCOREINFO_STRUCT_SIZE(mem_section);
VMCOREINFO_OFFSET(mem_section, section_mem_map);
_
Patches currently in -mm which might be from kirill.shutemov(a)linux.intel.com are
asm-generic-provide-generic_pmdp_establish.patch
arc-use-generic_pmdp_establish-as-pmdp_establish.patch
arm-mm-provide-pmdp_establish-helper.patch
mips-use-generic_pmdp_establish-as-pmdp_establish.patch
x86-mm-provide-pmdp_establish-helper.patch
mm-do-not-lose-dirty-and-access-bits-in-pmdp_invalidate.patch
mm-use-updated-pmdp_invalidate-interface-to-track-dirty-accessed-bits.patch
For legacy chips without CLM blob files, kernel with user helper function
returns -EAGAIN when we request_firmware(), and then driver got failed
when bringing up legacy chips. We expect the CLM blob file for legacy chip
is not existence in firmware path, but the -ENOENT error is transferred to
-EAGAIN in firmware_class.c with user helper.
Because of that, we continue with CLM data currently present in firmware
if getting error from doing request_firmware().
Cc: stable(a)vger.kernel.org # v4.15.y
Reviewed-by: Arend van Spriel <arend.vanspriel(a)broadcom.com>
Signed-off-by: Wright Feng <wright.feng(a)cypress.com>
---
v2: remove retry from patch v1
v3: remove redundant log print
v4: modify log print
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
index 6a59d06..9be0b05 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/common.c
@@ -182,12 +182,9 @@ static int brcmf_c_process_clm_blob(struct brcmf_if *ifp)
err = request_firmware(&clm, clm_name, dev);
if (err) {
- if (err == -ENOENT) {
- brcmf_dbg(INFO, "continue with CLM data currently present in firmware\n");
- return 0;
- }
- brcmf_err("request CLM blob file failed (%d)\n", err);
- return err;
+ brcmf_info("no clm_blob available(err=%d), device may have limited channels available\n",
+ err);
+ return 0;
}
chunk_buf = kzalloc(sizeof(*chunk_buf) + MAX_CHUNK_LEN - 1, GFP_KERNEL);
--
1.9.1