4.4.17-stable review
Subsystems (4)
Greg Kroah-Hartman
maintainercover 4.4.17-stable review
This is the start of the stable review cycle for the 4.4.17 release. There are 68 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 Aug 10 18:01:56 UTC 2016. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.17-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-4.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 4.4.17-rc1
Miklos Szeredi <[email protected]>
vfs: fix deadlock in file_remove_privs() on overlayfs
Alexander Shishkin <[email protected]>
intel_th: Fix a deadlock in modprobing
Alexander Shishkin <[email protected]>
intel_th: pci: Add Kaby Lake PCH-H support
Dmitri Epshtein <[email protected]>
net: mvneta: set real interrupt per packet for tx_done
Ilya Dryomov <[email protected]>
libceph: apply new_state before new_up_client on incrementals
Tejun Heo <[email protected]>
libata: LITE-ON CX1-JB256-HP needs lower max_sectors
Lukasz Gemborowski <[email protected]>
i2c: mux: reg: wrong condition checked for of_address_to_resource return value
Sricharan R <[email protected]>
i2c: qup: Fix wrong value of index variable
Alexey Dobriyan <[email protected]>
posix_cpu_timer: Exit early when process has been reaped
James Patrick-Evans <[email protected]>
media: fix airspy usb probe error path
Brian King <[email protected]>
ipr: Clear interrupt on croc/crocodile when running with LSI
Alan Stern <[email protected]>
SCSI: fix new bug in scsi_dev_info_list string matching
Vegard Nossum <[email protected]>
RDS: fix rds_tcp_init() error path
Oliver Hartkopp <[email protected]>
can: fix oops caused by wrong rtnl dellink usage
Oliver Hartkopp <[email protected]>
can: fix handling of unmodifiable configuration options fix
Thor Thayer <[email protected]>
can: c_can: Update D_CAN TX and RX functions to 32 bit - fix Altera Cyclone access
Wolfgang Grandegger <[email protected]>
can: at91_can: RX queue could get stuck at high bus load
Stephane Eranian <[email protected]>
perf/x86: fix PEBS issues on Intel Atom/Core2
Miklos Szeredi <[email protected]>
ovl: handle ATTR_KILL*
Peter Zijlstra <[email protected]>
sched/fair: Fix effective_load() to consistently use smoothed load
Taras Kondratiuk <[email protected]>
mmc: block: fix packed command header endianness
Omar Sandoval <[email protected]>
block: fix use-after-free in sys_ioprio_get()
Ursula Braun <[email protected]>
qeth: delete napi struct when removing a qeth device
Dan Carpenter <[email protected]>
platform/chrome: cros_ec_dev - double fetch bug in ioctl
Heiko Stuebner <[email protected]>
clk: rockchip: initialize flags of clk_init_data in mmc-phase clock
Michal Suchanek <[email protected]>
spi: sun4i: fix FIFO limit
Michal Suchanek <[email protected]>
spi: sunxi: fix transfer timeout
Andrey Ulanov <[email protected]>
namespace: update event counter when umounting a deleted dentry
Miklos Szeredi <[email protected]>
9p: use file_dentry()
Vegard Nossum <[email protected]>
ext4: verify extent header depth
Jeff Mahoney <[email protected]>
ecryptfs: don't allow mmap when the lower fs doesn't support it
Jeff Mahoney <[email protected]>
Revert "ecryptfs: forbid opening files without mmap handler"
Miklos Szeredi <[email protected]>
locks: use file_inode()
Rhyland Klein <[email protected]>
power_supply: power_supply_read_temp only if use_cnt > 0
Tejun Heo <[email protected]>
cgroup: set css->id to -1 during init
Alexander Shiyan <[email protected]>
pinctrl: imx: Do not treat a PIN without MUX register as an error
Tony Lindgren <[email protected]>
pinctrl: single: Fix missing flush of posted write for a wakeirq
Minfei Huang <[email protected]>
pvclock: Add CPU barriers to get correct version value
Michael Welling <[email protected]>
Input: tsc200x - report proper input_dev name
Cameron Gutman <[email protected]>
Input: xpad - validate USB endpoint count during probe
Ping Cheng <[email protected]>
Input: wacom_w8001 - w8001_MAX_LENGTH should be 13
Cameron Gutman <[email protected]>
Input: xpad - fix oops when attaching an unknown Xbox One gamepad
Dmitry Torokhov <[email protected]>
Input: elantech - add more IC body types to the list
Sinclair Yeh <[email protected]>
Input: vmmouse - remove port reservation
Kangjie Lu <[email protected]>
ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt
Kangjie Lu <[email protected]>
ALSA: timer: Fix leak in events via snd_timer_user_ccallback
Kangjie Lu <[email protected]>
ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
Jan Beulich <[email protected]>
xenbus: don't bail early from xenbus_dev_request_and_reply()
Jan Beulich <[email protected]>
xenbus: don't BUG() on user mode induced condition
Andrey Grodzovsky <[email protected]>
xen/pciback: Fix conf_space read/write overlap check.
Vineet Gupta <[email protected]>
ARC: unwind: ensure that .debug_frame is generated (vs. .eh_frame)
Alexey Brodkin <[email protected]>
arc: unwind: warn only once if DW2_UNWIND is disabled
Andrey Ryabinin <[email protected]>
kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w
Jiri Slaby <[email protected]>
pps: do not crash when failed to register
Dmitry Vyukov <[email protected]>
vmlinux.lds: account for destructor sections
Mel Gorman <[email protected]>
mm, meminit: ensure node is online before checking whether pages are uninitialised
Mel Gorman <[email protected]>
mm, meminit: always return a valid node from early_pfn_to_nid
David Rientjes <[email protected]>
mm, compaction: prevent VM_BUG_ON when terminating freeing scanner
Torsten Hilbrich <[email protected]>
fs/nilfs2: fix potential underflow in call to crc32_le
David Rientjes <[email protected]>
mm, compaction: abort free scanner if split fails
Mel Gorman <[email protected]>
mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask
Ludovic Desroches <[email protected]>
dmaengine: at_xdmac: double FIFO flush needed to compute residue
Ludovic Desroches <[email protected]>
dmaengine: at_xdmac: fix residue corruption
Ludovic Desroches <[email protected]>
dmaengine: at_xdmac: align descriptors on 64 bits
Lukas Wunner <[email protected]>
x86/quirks: Add early quirk to reset Apple AirPort card
Lukas Wunner <[email protected]>
x86/quirks: Reintroduce scanning of secondary buses
Lukas Wunner <[email protected]>
x86/quirks: Apply nvidia_bugs quirk only on root bus
Michał Pecio <[email protected]>
USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails
-------------
Diffstat:
Makefile | 4 +- arch/arc/Makefile | 2 - arch/arc/kernel/stacktrace.c | 2 +- arch/x86/include/asm/pvclock.h | 2 + arch/x86/kernel/cpu/perf_event_intel_ds.c | 9 +- arch/x86/kernel/early-quirks.c | 105 +++++++++++++++++--- arch/x86/kernel/pvclock.c | 4 + block/ioprio.c | 2 + drivers/ata/libata-core.c | 6 ++ drivers/bcma/bcma_private.h | 2 - drivers/clk/rockchip/clk-mmc-phase.c | 1 + drivers/dma/at_xdmac.c | 82 +++++++++++----- drivers/hwtracing/intel_th/core.c | 35 ++++++- drivers/hwtracing/intel_th/intel_th.h | 3 + drivers/hwtracing/intel_th/pci.c | 5 + drivers/i2c/busses/i2c-qup.c | 2 + drivers/i2c/muxes/i2c-mux-reg.c | 2 +- drivers/input/joystick/xpad.c | 26 +++-- drivers/input/mouse/elantech.c | 8 +- drivers/input/mouse/vmmouse.c | 22 +---- drivers/input/touchscreen/tsc2004.c | 7 +- drivers/input/touchscreen/tsc2005.c | 7 +- drivers/input/touchscreen/tsc200x-core.c | 15 ++- drivers/input/touchscreen/tsc200x-core.h | 2 +- drivers/input/touchscreen/wacom_w8001.c | 2 +- drivers/media/usb/airspy/airspy.c | 3 +- drivers/mmc/card/block.c | 12 +-- drivers/net/can/at91_can.c | 5 +- drivers/net/can/c_can/c_can.c | 38 ++++++-- drivers/net/can/dev.c | 9 ++ drivers/net/ethernet/marvell/mvneta.c | 2 +- drivers/pinctrl/freescale/pinctrl-imx.c | 4 +- drivers/pinctrl/pinctrl-single.c | 3 + drivers/platform/chrome/cros_ec_dev.c | 8 +- drivers/power/power_supply_core.c | 27 +++--- drivers/pps/clients/pps_parport.c | 2 +- drivers/s390/net/qeth_l2_main.c | 1 + drivers/s390/net/qeth_l3_main.c | 1 + drivers/scsi/ipr.c | 1 + drivers/scsi/scsi_devinfo.c | 10 +- drivers/spi/spi-sun4i.c | 23 ++++- drivers/spi/spi-sun6i.c | 10 +- drivers/usb/host/ohci-q.c | 3 +- drivers/xen/xen-pciback/conf_space.c | 6 +- drivers/xen/xenbus/xenbus_dev_frontend.c | 14 +-- drivers/xen/xenbus/xenbus_xs.c | 3 - fs/9p/vfs_file.c | 6 +- fs/ecryptfs/file.c | 15 ++- fs/ecryptfs/kthread.c | 13 +-- fs/ext4/extents.c | 4 + fs/inode.c | 6 +- fs/locks.c | 2 +- fs/namespace.c | 1 + fs/nilfs2/the_nilfs.c | 2 +- fs/overlayfs/inode.c | 3 + include/asm-generic/vmlinux.lds.h | 4 + include/linux/bcma/bcma.h | 1 + kernel/cgroup.c | 1 + kernel/sched/core.c | 6 +- kernel/sched/fair.c | 15 +-- kernel/time/posix-cpu-timers.c | 1 + mm/compaction.c | 61 ++++++------ mm/internal.h | 3 +- mm/page_alloc.c | 6 +- net/ceph/osdmap.c | 156 ++++++++++++++++++++++-------- net/rds/tcp.c | 5 +- sound/core/timer.c | 3 + 67 files changed, 599 insertions(+), 257 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 2/68 x86/quirks: Apply nvidia_bugs quirk only on root bus
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <[email protected]>
commit 447d29d1d3aed839e74c2401ef63387780ac51ed upstream.
Since the following commit:
8659c406ade3 ("x86: only scan the root bus in early PCI quirks")
... early quirks are only applied to devices on the root bus.
The motivation was to prevent application of the nvidia_bugs quirk on secondary buses.
We're about to reintroduce scanning of secondary buses for a quirk to reset the Broadcom 4331 wireless card on 2011/2012 Macs. To prevent regressions, open code the requirement to apply nvidia_bugs only on the root bus.
--- arch/x86/kernel/early-quirks.c | 7 +++++++ 1 file changed, 7 insertions(+)
arch/x86/kernel/early-quirks.c +7 -0
@@ -76,6 +76,13 @@ static void __init nvidia_bugs(int num,#ifdef CONFIG_ACPI #ifdef CONFIG_X86_IO_APIC /* +* Only applies to Nvidia root ports (bus 0) and not to +* Nvidia graphics cards with PCI ports on secondary buses. +*/ +if (num) +return ; + +/* * All timer overrides on Nvidia are * wrong unless HPET is enabled. * Unfortunately that's not true on many Asus boards.
Greg Kroah-Hartman
maintainerPATCH 3/68 x86/quirks: Reintroduce scanning of secondary buses
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <[email protected]>
commit 850c321027c2e31d0afc71588974719a4b565550 upstream.
We used to scan secondary buses until the following commit that was applied in 2009:
8659c406ade3 ("x86: only scan the root bus in early PCI quirks")
which commit constrained early quirks to the root bus only. Its motivation was to prevent application of the nvidia_bugs quirk on secondary buses.
We're about to add a quirk to reset the Broadcom 4331 wireless card on 2011/2012 Macs, which is located on a secondary bus behind a PCIe root port. To facilitate that, reintroduce scanning of secondary buses.
The commit message of 8659c406ade3 notes that scanning only the root bus "saves quite some unnecessary scanning work". The algorithm used prior to 8659c406ade3 was particularly time consuming because it scanned buses 0 to 31 brute force. To avoid lengthening boot time, employ a recursive strategy which only scans buses that are actually reachable from the root bus.
Yinghai Lu pointed out that the secondary bus number read from a bridge's config space may be invalid, in particular a value of 0 would cause an infinite loop. The PCI core goes beyond that and recurses to a child bus only if its bus number is greater than the parent bus number (see pci_scan_bridge()). Since the root bus is numbered 0, this implies that secondary buses may not be 0. Do the same on early scanning.
If this algorithm is found to significantly impact boot time or cause infinite loops on broken hardware, it would be possible to limit its recursion depth: The Broadcom 4331 quirk applies at depth 1, all others at depth 0, so the bus need not be scanned deeper than that for now. An alternative approach would be to revert to scanning only the root bus, and apply the Broadcom 4331 quirk to the root ports 8086:1c12, 8086:1e12 and 8086:1e16. Apple always positioned the card behind either of these three ports. The quirk would then check presence of the card in slot 0 below the root port and do its deed.
--- arch/x86/kernel/early-quirks.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-)
arch/x86/kernel/early-quirks.c +21 -13
@@ -609,12 +609,6 @@ struct chipset {void (*f)(int num,int slot,int func); }; -/* -* Only works for devices on the root bus. If you add any devices -* not on bus 0 readd another loop level in early_quirks(). But -* be careful because at least the Nvidia quirk here relies on -* only matching on bus 0. -*/ static struct chipset early_qrk[]__initdata = { {PCI_VENDOR_ID_NVIDIA ,PCI_ANY_ID ,PCI_CLASS_BRIDGE_PCI ,PCI_ANY_ID ,QFLAG_APPLY_ONCE , nvidia_bugs },
@@ -647,6 +641,8 @@ static struct chipset early_qrk[] __init {} }; +static void __init early_pci_scan_bus (int bus); +/** * check_dev_quirk - apply early quirks to a given PCI device * @num: bus number
@@ -655,7 +651,7 @@ static struct chipset early_qrk[] __init* * Check the vendor & device ID against the early quirks table. * -* If the device is single function, let early_quirks() know so we don't +* If the device is single function, let early_pci_scan_bus() know so we don't * poke at this device again. */ static int __init check_dev_quirk (int num,int slot,int func)
@@ -664,6 +660,7 @@ static int __init check_dev_quirk(int nuu16 vendor;u16 device;u8 type; +u8 sec;int i; class =read_pci_config_16 (num, slot, func,PCI_CLASS_DEVICE );
@@ -691,25 +688,36 @@ static int __init check_dev_quirk(int nu type =read_pci_config_byte (num, slot, func,PCI_HEADER_TYPE ); + +if ((type &0x7f ) ==PCI_HEADER_TYPE_BRIDGE ) { + sec =read_pci_config_byte (num, slot, func,PCI_SECONDARY_BUS ); +if (sec > num) +early_pci_scan_bus (sec); + } +if (!(type &0x80 ))return -1 ;return 0 ; } -void __init early_quirks (void ) +static void __init early_pci_scan_bus (int bus) {int slot, func; -if (!early_pci_allowed ()) -return ; -/* Poor man's PCI discovery */ -/* Only scan the root bus */ for (slot =0 ; slot <32 ; slot++)for (func =0 ; func <8 ; func++) {/* Only probe function 0 on single fn devices */ -if (check_dev_quirk (0 , slot, func)) +if (check_dev_quirk (bus, slot, func))break ; } } + +void __init early_quirks (void ) +{ +if (!early_pci_allowed ()) +return ; + +early_pci_scan_bus (0 ); +}
Greg Kroah-Hartman
maintainerPATCH 4/68 x86/quirks: Add early quirk to reset Apple AirPort card
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukas Wunner <[email protected]>
commit abb2bafd295fe962bbadc329dbfb2146457283ac upstream.
The EFI firmware on Macs contains a full-fledged network stack for downloading OS X images from osrecovery.apple.com. Unfortunately on Macs introduced 2011 and 2012, EFI brings up the Broadcom 4331 wireless card on every boot and leaves it enabled even after ExitBootServices has been called. The card continues to assert its IRQ line, causing spurious interrupts if the IRQ is shared. It also corrupts memory by DMAing received packets, allowing for remote code execution over the air. This only stops when a driver is loaded for the wireless card, which may be never if the driver is not installed or blacklisted.
The issue seems to be constrained to the Broadcom 4331. Chris Milsted has verified that the newer Broadcom 4360 built into the MacBookPro11,3 (2013/2014) does not exhibit this behaviour. The chances that Apple will ever supply a firmware fix for the older machines appear to be zero.
The solution is to reset the card on boot by writing to a reset bit in its mmio space. This must be done as an early quirk and not as a plain vanilla PCI quirk to successfully combat memory corruption by DMAed
packets: Matthew Garrett found out in 2012 that the packets are written to EfiBootServicesData memory (http://mjg59.dreamwidth.org/11235.html).
This type of memory is made available to the page allocator by efi_free_boot_services(). Plain vanilla PCI quirks run much later, in subsys initcall level. In-between a time window would be open for memory corruption. Random crashes occurring in this time window and attributed to DMAed packets have indeed been observed in the wild by Chris Bainbridge.
When Matthew Garrett analyzed the memory corruption issue in 2012, he sought to fix it with a grub quirk which transitions the card to D3hot:
http://git.savannah.gnu.org/cgit/grub.git/commit/?id=9d34bb85da56
This approach does not help users with other bootloaders and while it may prevent DMAed packets, it does not cure the spurious interrupts emanating from the card. Unfortunately the card's mmio space is inaccessible in D3hot, so to reset it, we have to undo the effect of Matthew's grub patch and transition the card back to D0.
Note that the quirk takes a few shortcuts to reduce the amount of code:
The size of BAR 0 and the location of the PM capability is identical on all affected machines and therefore hardcoded. Only the address of BAR 0 differs between models. Also, it is assumed that the BCMA core currently mapped is the 802.11 core. The EFI driver seems to always take care of this.
Michael B?sch, Bjorn Helgaas and Matt Fleming contributed feedback towards finding the best solution to this problem.
The following should be a comprehensive list of affected models:
iMac13,1 2012 21.5" [Root Port 00:1c.3 = 8086:1e16]
iMac13,2 2012 27" [Root Port 00:1c.3 = 8086:1e16]
Macmini5,1 2011 i5 2.3 GHz [Root Port 00:1c.1 = 8086:1c12]
Macmini5,2 2011 i5 2.5 GHz [Root Port 00:1c.1 = 8086:1c12]
Macmini5,3 2011 i7 2.0 GHz [Root Port 00:1c.1 = 8086:1c12]
Macmini6,1 2012 i5 2.5 GHz [Root Port 00:1c.1 = 8086:1e12]
Macmini6,2 2012 i7 2.3 GHz [Root Port 00:1c.1 = 8086:1e12]
MacBookPro8,1 2011 13" [Root Port 00:1c.1 = 8086:1c12]
MacBookPro8,2 2011 15" [Root Port 00:1c.1 = 8086:1c12]
MacBookPro8,3 2011 17" [Root Port 00:1c.1 = 8086:1c12]
MacBookPro9,1 2012 15" [Root Port 00:1c.1 = 8086:1e12]
MacBookPro9,2 2012 13" [Root Port 00:1c.1 = 8086:1e12]
MacBookPro10,1 2012 15" [Root Port 00:1c.1 = 8086:1e12]
MacBookPro10,2 2012 13" [Root Port 00:1c.1 = 8086:1e12]For posterity, spurious interrupts caused by the Broadcom 4331 wireless card resulted in splats like this (stacktrace omitted):
irq 17: nobody cared (try booting with the "irqpoll" option)
handlers:
[<ffffffff81374370>] pcie_isr
[<ffffffffc0704550>] sdhci_irq [sdhci] threaded [<ffffffffc07013c0>] sdhci_thread_irq [sdhci]
[<ffffffffc0a0b960>] azx_interrupt [snd_hda_codec]
Disabling IRQ #17Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79301
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111781
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=728916
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=895951#c16
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1009819
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1098621
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1149632#c5
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1279130
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1332732
Tested-by: Konstantin Simanov <[email protected]> # [MacBookPro8,1] Tested-by: Lukas Wunner <[email protected]> # [MacBookPro9,1] Tested-by: Bryan Paradis <[email protected]> # [MacBookPro9,2] Tested-by: Andrew Worsley <[email protected]> # [MacBookPro10,1]
--- arch/x86/kernel/early-quirks.c | 64 +++++++++++++++++++++++++++++++++++++++++ drivers/bcma/bcma_private.h | 2 - include/linux/bcma/bcma.h | 1 3 files changed, 65 insertions(+), 2 deletions(-)
arch/x86/kernel/early-quirks.c +64 -0
@@ -11,7 +11,11 @@#include <linux/pci.h> #include <linux/acpi.h> +#include <linux/delay.h> +#include <linux/dmi.h> #include <linux/pci_ids.h> +#include <linux/bcma/bcma.h> +#include <linux/bcma/bcma_regs.h> #include <drm/i915_drm.h> #include <asm/pci-direct.h> #include <asm/dma.h>
@@ -21,6 +25,9 @@#include <asm/iommu.h> #include <asm/gart.h> #include <asm/irq_remapping.h> +#include <asm/early_ioremap.h> + +#define dev_err (msg) pr_err("pci 0000:%02x:%02x.%d: %s", bus, slot, func, msg)static void __init fix_hypertransport_config (int num,int slot,int func) {
@@ -596,6 +603,61 @@ static void __init force_disable_hpet(in#endif } +#define BCM4331_MMIO_SIZE 16384 +#define BCM4331_PM_CAP 0x40 +#define bcma_aread32 (reg) ioread32(mmio + 1 * BCMA_CORE_SIZE + reg) +#define bcma_awrite32 (reg, val) iowrite32(val, mmio + 1 * BCMA_CORE_SIZE + reg) + +static void __init apple_airport_reset (int bus,int slot,int func) +{ +void __iomem *mmio; +u16 pmcsr; +u64 addr; +int i; + +if (!dmi_match (DMI_SYS_VENDOR ,"Apple Inc." )) +return ; + +/* Card may have been put into PCI_D3hot by grub quirk */ + pmcsr =read_pci_config_16 (bus, slot, func,BCM4331_PM_CAP +PCI_PM_CTRL ); + +if ((pmcsr &PCI_PM_CTRL_STATE_MASK ) !=PCI_D0 ) { + pmcsr &= ~PCI_PM_CTRL_STATE_MASK ; +write_pci_config_16 (bus, slot, func,BCM4331_PM_CAP +PCI_PM_CTRL , pmcsr); +mdelay (10 ); + + pmcsr =read_pci_config_16 (bus, slot, func,BCM4331_PM_CAP +PCI_PM_CTRL ); +if ((pmcsr &PCI_PM_CTRL_STATE_MASK ) !=PCI_D0 ) { +dev_err ("Cannot power up Apple AirPort card\n" ); +return ; + } + } + + addr =read_pci_config (bus, slot, func,PCI_BASE_ADDRESS_0 ); + addr |= (u64 )read_pci_config (bus, slot, func,PCI_BASE_ADDRESS_1 ) <<32 ; + addr &=PCI_BASE_ADDRESS_MEM_MASK ; + + mmio =early_ioremap (addr,BCM4331_MMIO_SIZE ); +if (!mmio) { +dev_err ("Cannot iomap Apple AirPort card\n" ); +return ; + } + +pr_info ("Resetting Apple AirPort card (left enabled by EFI)\n" ); + +for (i =0 ;bcma_aread32 (BCMA_RESET_ST ) && i <30 ; i++) +udelay (10 ); + +bcma_awrite32 (BCMA_RESET_CTL ,BCMA_RESET_CTL_RESET ); +bcma_aread32 (BCMA_RESET_CTL ); +udelay (1 ); + +bcma_awrite32 (BCMA_RESET_CTL ,0 ); +bcma_aread32 (BCMA_RESET_CTL ); +udelay (10 ); + +early_iounmap (mmio,BCM4331_MMIO_SIZE ); +}#define QFLAG_APPLY_ONCE 0x1#define QFLAG_APPLIED 0x2
@@ -638,6 +700,8 @@ static struct chipset early_qrk[] __init*/ {PCI_VENDOR_ID_INTEL ,0x0f00 , PCI_CLASS_BRIDGE_HOST, PCI_ANY_ID, 0, force_disable_hpet}, + { PCI_VENDOR_ID_BROADCOM, 0x4331, + PCI_CLASS_NETWORK_OTHER, PCI_ANY_ID, 0, apple_airport_reset}, {} };
drivers/bcma/bcma_private.h +0 -2
@@ -8,8 +8,6 @@#include <linux/bcma/bcma.h> #include <linux/delay.h> -#define BCMA_CORE_SIZE 0x1000 -#define bcma_err (bus, fmt, ...) \ pr_err("bus%d: " fmt, (bus)->num, ##__VA_ARGS__)#define bcma_warn (bus, fmt, ...) \
include/linux/bcma/bcma.h +1 -0
@@ -156,6 +156,7 @@ struct bcma_host_ops {#define BCMA_CORE_DEFAULT 0xFFF#define BCMA_MAX_NR_CORES 16 +#define BCMA_CORE_SIZE 0x1000/* Chip IDs of PCIe devices */ #define BCMA_CHIP_ID_BCM4313 0x4313
Greg Kroah-Hartman
maintainerPATCH 5/68 dmaengine: at_xdmac: align descriptors on 64 bits
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ludovic Desroches <[email protected]>
commit 4a9723e8df68cfce4048517ee32e37f78854b6fb upstream.
Having descriptors aligned on 64 bits allows update CNDA and CUBC in an atomic way.
eXtended DMA Controller driver")
--- drivers/dma/at_xdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/at_xdmac.c +2 -2
@@ -242,7 +242,7 @@ struct at_xdmac_lld {u32 mbr_dus;/* Destination Microblock Stride Register */ }; - +/* 64-bit alignment needed to update CNDA and CUBC registers in an atomic way. */ struct at_xdmac_desc {struct at_xdmac_lld lld;enum dma_transfer_direction direction;
@@ -253,7 +253,7 @@ struct at_xdmac_desc {unsigned int xfer_size;struct list_head descs_list;struct list_head xfer_node; -}; +}__aligned(sizeof(u64)) ;static inline void __iomem *at_xdmac_chan_reg_base (struct at_xdmac *atxdmac,unsigned int chan_nb) {
Greg Kroah-Hartman
maintainerPATCH 6/68 dmaengine: at_xdmac: fix residue corruption
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ludovic Desroches <[email protected]>
commit 53398f488821c2b5b15291e3debec6ad33f75d3d upstream.
An unexpected value of CUBC can lead to a corrupted residue. A more complex sequence is needed to detect an inaccurate value for NCA or CUBC.
eXtended DMA Controller driver")
--- drivers/dma/at_xdmac.c | 54 +++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 22 deletions(-)
drivers/dma/at_xdmac.c +32 -22
@@ -1388,6 +1388,7 @@ at_xdmac_tx_status(struct dma_chan *chanu32 cur_nda, check_nda, cur_ubc, mask, value;u8 dwidth =0 ;unsigned long flags; +bool initd; ret =dma_cookie_status (chan, cookie, txstate);if (ret ==DMA_COMPLETE )
@@ -1423,34 +1424,43 @@ at_xdmac_tx_status(struct dma_chan *chan }/* -* When processing the residue, we need to read two registers but we -* can't do it in an atomic way. AT_XDMAC_CNDA is used to find where -* we stand in the descriptor list and AT_XDMAC_CUBC is used -* to know how many data are remaining for the current descriptor. -* Since the dma channel is not paused to not loose data, between the -* AT_XDMAC_CNDA and AT_XDMAC_CUBC read, we may have change of -* descriptor. -* For that reason, after reading AT_XDMAC_CUBC, we check if we are -* still using the same descriptor by reading a second time -* AT_XDMAC_CNDA. If AT_XDMAC_CNDA has changed, it means we have to -* read again AT_XDMAC_CUBC. +* The easiest way to compute the residue should be to pause the DMA +* but doing this can lead to miss some data as some devices don't +* have FIFO. +* We need to read several registers because: +* - DMA is running therefore a descriptor change is possible while +* reading these registers +* - When the block transfer is done, the value of the CUBC register +* is set to its initial value until the fetch of the next descriptor. +* This value will corrupt the residue calculation so we have to skip +* it. +* +* INITD -------- ------------ +* |____________________| +* _______________________ _______________ +* NDA @desc2 \/ @desc3 +* _______________________/\_______________ +* __________ ___________ _______________ +* CUBC 0 \/ MAX desc1 \/ MAX desc2 +* __________/\___________/\_______________ +* +* Since descriptors are aligned on 64 bits, we can assume that +* the update of NDA and CUBC is atomic. * Memory barriers are used to ensure the read order of the registers. -* A max number of retries is set because unlikely it can never ends if -* we are transferring a lot of data with small buffers. +* A max number of retries is set because unlikely it could never ends. */ - cur_nda =at_xdmac_chan_read (atchan,AT_XDMAC_CNDA ) &0xfffffffc ; -rmb (); - cur_ubc =at_xdmac_chan_read (atchan,AT_XDMAC_CUBC );for (retry =0 ; retry <AT_XDMAC_RESIDUE_MAX_RETRIES ; retry++) { -rmb (); check_nda =at_xdmac_chan_read (atchan,AT_XDMAC_CNDA ) &0xfffffffc ; - -if (likely (cur_nda == check_nda)) -break ; - - cur_nda = check_nda; +rmb (); + initd = !!(at_xdmac_chan_read (atchan,AT_XDMAC_CC ) &AT_XDMAC_CC_INITD );rmb (); cur_ubc =at_xdmac_chan_read (atchan,AT_XDMAC_CUBC ); +rmb (); + cur_nda =at_xdmac_chan_read (atchan,AT_XDMAC_CNDA ) &0xfffffffc ; +rmb (); + +if ((check_nda == cur_nda) && initd) +break ; }if (unlikely (retry >=AT_XDMAC_RESIDUE_MAX_RETRIES )) {
Greg Kroah-Hartman
maintainerPATCH 7/68 dmaengine: at_xdmac: double FIFO flush needed to compute residue
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ludovic Desroches <[email protected]>
commit 9295c41d77ca93aac79cfca6fa09fa1ca5cab66f upstream.
Due to the way CUBC register is updated, a double flush is needed to compute an accurate residue. First flush aim is to get data from the DMA FIFO and second one ensures that we won't report data which are not in memory.
eXtended DMA Controller driver")
--- drivers/dma/at_xdmac.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-)
drivers/dma/at_xdmac.c +23 -1
@@ -1413,7 +1413,16 @@ at_xdmac_tx_status(struct dma_chan *chan residue = desc->xfer_size;/* * Flush FIFO: only relevant when the transfer is source peripheral -* synchronized. +* synchronized. Flush is needed before reading CUBC because data in +* the FIFO are not reported by CUBC. Reporting a residue of the +* transfer length while we have data in FIFO can cause issue. +* Usecase: atmel USART has a timeout which means I have received +* characters but there is no more character received for a while. On +* timeout, it requests the residue. If the data are in the DMA FIFO, +* we will return a residue of the transfer length. It means no data +* received. If an application is waiting for these data, it will hang +* since we won't have another USART timeout without receiving new +* data. */ mask =AT_XDMAC_CC_TYPE |AT_XDMAC_CC_DSYNC ; value =AT_XDMAC_CC_TYPE_PER_TRAN |AT_XDMAC_CC_DSYNC_PER2MEM ;
@@ -1469,6 +1478,19 @@ at_xdmac_tx_status(struct dma_chan *chan }/* +* Flush FIFO: only relevant when the transfer is source peripheral +* synchronized. Another flush is needed here because CUBC is updated +* when the controller sends the data write command. It can lead to +* report data that are not written in the memory or the device. The +* FIFO flush ensures that data are really written. +*/ +if ((desc->lld.mbr_cfg & mask) == value) { +at_xdmac_write (atxdmac,AT_XDMAC_GSWF , atchan->mask); +while (!(at_xdmac_chan_read (atchan,AT_XDMAC_CIS ) &AT_XDMAC_CIS_FIS )) +cpu_relax (); + } + +/* * Remove size of all microblocks already transferred and the current * one. Then add the remaining size to transfer of the current * microblock.
Greg Kroah-Hartman
maintainerPATCH 8/68 mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mel Gorman <[email protected]>
commit e838a45f9392a5bd2be1cd3ab0b16ae85857461c upstream.
Commit d0164adc89f6 ("mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd") modified __GFP_WAIT to explicitly identify the difference between atomic callers and those that were unwilling to sleep. Later the definition was removed entirely.
The GFP_RECLAIM_MASK is the set of flags that affect watermark checking and reclaim behaviour but __GFP_ATOMIC was never added. Without it, atomic users of the slab allocator strip the __GFP_ATOMIC flag and cannot access the page allocator atomic reserves. This patch addresses the problem.
The user-visible impact depends on the workload but potentially atomic allocations unnecessarily fail without this path.
--- mm/internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
mm/internal.h +2 -1
@@ -22,7 +22,8 @@*/ #define GFP_RECLAIM_MASK (__GFP_RECLAIM|__GFP_HIGH|__GFP_IO|__GFP_FS|\ __GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|\ - __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC) + __GFP_NORETRY|__GFP_MEMALLOC|__GFP_NOMEMALLOC|\ + __GFP_ATOMIC)/* The GFP flags allowed during early boot */ #define GFP_BOOT_MASK (__GFP_BITS_MASK & ~(__GFP_RECLAIM|__GFP_IO|__GFP_FS))
Greg Kroah-Hartman
maintainerPATCH 9/68 mm, compaction: abort free scanner if split fails
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Rientjes <[email protected]>
commit a4f04f2c6955aff5e2c08dcb40aca247ff4d7370 upstream.
If the memory compaction free scanner cannot successfully split a free page (only possible due to per-zone low watermark), terminate the free scanner rather than continuing to scan memory needlessly. If the watermark is insufficient for a free page of order <= cc->order, then terminate the scanner since all future splits will also likely fail.
This prevents the compaction freeing scanner from scanning all memory on very large zones (very noticeable for zones > 128GB, for instance) when all splits will likely fail while holding zone->lock.
compaction_alloc() iterating a 128GB zone has been benchmarked to take over 400ms on some systems whereas any free page isolated and ready to be split ends up failing in split_free_page() because of the low watermark check and thus the iteration continues.
The next time compaction occurs, the freeing scanner will likely start at the end of the zone again since no success was made previously and we get the same lengthy iteration until the zone is brought above the low watermark. All thp page faults can take >400ms in such a state without this fix.
--- mm/compaction.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-)
mm/compaction.c +21 -18
@@ -475,25 +475,23 @@ static unsigned long isolate_freepages_b/* Found a free page, break it into order-0 pages */ isolated =split_free_page (page); +if (!isolated) +break ; + total_isolated += isolated; + cc->nr_freepages += isolated;for (i =0 ; i < isolated; i++) {list_add (&page->lru, freelist); page++; } - -/* If a page was split, advance to the end of it */ -if (isolated) { - cc->nr_freepages += isolated; -if (!strict && - cc->nr_migratepages <= cc->nr_freepages) { - blockpfn += isolated; -break ; - } - - blockpfn += isolated -1 ; - cursor += isolated -1 ; -continue ; +if (!strict && cc->nr_migratepages <= cc->nr_freepages) { + blockpfn += isolated; +break ; } +/* Advance to the end of split page */ + blockpfn += isolated -1 ; + cursor += isolated -1 ; +continue ; isolate_fail:if (strict)
@@ -503,6 +501,9 @@ isolate_fail: } +if (locked) +spin_unlock_irqrestore (&cc->zone->lock, flags); +/* * There is a tiny chance that we have read bogus compound_order(), * so be careful to not go outside of the pageblock.
@@ -524,9 +525,6 @@ isolate_fail:if (strict && blockpfn < end_pfn) total_isolated =0 ; -if (locked) -spin_unlock_irqrestore (&cc->zone->lock, flags); -/* Update the pageblock-skip if the whole pageblock was scanned */ if (blockpfn == end_pfn)update_pageblock_skip (cc, valid_page, total_isolated, false);
@@ -966,6 +964,7 @@ static void isolate_freepages(struct com block_end_pfn = block_start_pfn, block_start_pfn -= pageblock_nr_pages, isolate_start_pfn = block_start_pfn) { +unsigned long isolated;/* * This can iterate a massively long zone without finding any
@@ -990,8 +989,12 @@ static void isolate_freepages(struct comcontinue ;/* Found a block suitable for isolating free pages from. */ -isolate_freepages_block (cc, &isolate_start_pfn, - block_end_pfn, freelist, false); + isolated =isolate_freepages_block (cc, &isolate_start_pfn, + block_end_pfn, freelist, false); +/* If isolation failed early, do not continue needlessly */ +if (!isolated && isolate_start_pfn < block_end_pfn && + cc->nr_migratepages > cc->nr_freepages) +break ;/* * If we isolated enough freepages, or aborted due to async
Greg Kroah-Hartman
maintainerPATCH 10/68 fs/nilfs2: fix potential underflow in call to crc32_le
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Torsten Hilbrich <[email protected]>
commit 63d2f95d63396059200c391ca87161897b99e74a upstream.
The value `bytes' comes from the filesystem which is about to be mounted. We cannot trust that the value is always in the range we expect it to be.
Check its value before using it to calculate the length for the crc32_le call. It value must be larger (or equal) sumoff + 4.
This fixes a kernel bug when accidentially mounting an image file which had the nilfs2 magic value 0x3434 at the right offset 0x406 by chance. The bytes 0x01 0x00 were stored at 0x408 and were interpreted as a s_bytes value of 1. This caused an underflow when substracting sumoff + 4 (20) in the call to crc32_le.
BUG: unable to handle kernel paging request at ffff88021e600000
IP: crc32_le+0x36/0x100
...
Call Trace:
nilfs_valid_sb.part.5+0x52/0x60 [nilfs2]
nilfs_load_super_block+0x142/0x300 [nilfs2]
init_nilfs+0x60/0x390 [nilfs2]
nilfs_mount+0x302/0x520 [nilfs2]
mount_fs+0x38/0x160
vfs_kern_mount+0x67/0x110
do_mount+0x269/0xe00
SyS_mount+0x9f/0x100
entry_SYSCALL_64_fastpath+0x16/0x71--- fs/nilfs2/the_nilfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nilfs2/the_nilfs.c +1 -1
@@ -443,7 +443,7 @@ static int nilfs_valid_sb(struct nilfs_sif (!sbp ||le16_to_cpu (sbp->s_magic) !=NILFS_SUPER_MAGIC )return 0 ; bytes =le16_to_cpu (sbp->s_bytes); -if (bytes >BLOCK_SIZE ) +if (bytes < sumoff +4 || bytes >BLOCK_SIZE )return 0 ; crc =crc32_le (le32_to_cpu (sbp->s_crc_seed), (unsigned char *)sbp, sumoff);
Greg Kroah-Hartman
maintainerPATCH 11/68 mm, compaction: prevent VM_BUG_ON when terminating freeing scanner
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Rientjes <[email protected]>
commit a46cbf3bc53b6a93fb84a5ffb288c354fa807954 upstream.
It's possible to isolate some freepages in a pageblock and then fail split_free_page() due to the low watermark check. In this case, we hit VM_BUG_ON() because the freeing scanner terminated early without a contended lock or enough freepages.
This should never have been a VM_BUG_ON() since it's not a fatal condition. It should have been a VM_WARN_ON() at best, or even handled gracefully.
Regardless, we need to terminate anytime the full pageblock scan was not done. The logic belongs in isolate_freepages_block(), so handle its state gracefully by terminating the pageblock loop and making a note to restart at the same pageblock next time since it was not possible to complete the scan this time.
--- mm/compaction.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-)
mm/compaction.c +14 -22
@@ -964,8 +964,6 @@ static void isolate_freepages(struct com block_end_pfn = block_start_pfn, block_start_pfn -= pageblock_nr_pages, isolate_start_pfn = block_start_pfn) { -unsigned long isolated; -/* * This can iterate a massively long zone without finding any * suitable migration targets, so periodically check if we need
@@ -989,36 +987,30 @@ static void isolate_freepages(struct comcontinue ;/* Found a block suitable for isolating free pages from. */ - isolated =isolate_freepages_block (cc, &isolate_start_pfn, - block_end_pfn, freelist, false); -/* If isolation failed early, do not continue needlessly */ -if (!isolated && isolate_start_pfn < block_end_pfn && - cc->nr_migratepages > cc->nr_freepages) -break ; +isolate_freepages_block (cc, &isolate_start_pfn, block_end_pfn, + freelist, false);/* -* If we isolated enough freepages, or aborted due to async -* compaction being contended, terminate the loop. -* Remember where the free scanner should restart next time, -* which is where isolate_freepages_block() left off. -* But if it scanned the whole pageblock, isolate_start_pfn -* now points at block_end_pfn, which is the start of the next -* pageblock. -* In that case we will however want to restart at the start -* of the previous pageblock. +* If we isolated enough freepages, or aborted due to lock +* contention, terminate. */ if ((cc->nr_freepages >= cc->nr_migratepages) || cc->contended) { -if (isolate_start_pfn >= block_end_pfn) +if (isolate_start_pfn >= block_end_pfn) { +/* +* Restart at previous pageblock if more +* freepages can be isolated next time. +*/ isolate_start_pfn = block_start_pfn - pageblock_nr_pages; + }break ; - }else { + }else if (isolate_start_pfn < block_end_pfn) {/* -* isolate_freepages_block() should not terminate -* prematurely unless contended, or isolated enough +* If isolation failed early, do not continue +* needlessly. */ -VM_BUG_ON (isolate_start_pfn < block_end_pfn); +break ; } }
Greg Kroah-Hartman
maintainerPATCH 12/68 mm, meminit: always return a valid node from early_pfn_to_nid
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mel Gorman <[email protected]>
commit e4568d3803852d00effd41dcdd489e726b998879 upstream.
early_pfn_to_nid can return node 0 if a PFN is invalid on machines that has no node 0. A machine with only node 1 was observed to crash with the following message:
BUG: unable to handle kernel paging request at 000000000002a3c8
PGD 0
Modules linked in:
Hardware name: Supermicro H8DSP-8/H8DSP-8, BIOS 080011 06/30/2006
task: ffffffff81c0d500 ti: ffffffff81c00000 task.ti: ffffffff81c00000
RIP: reserve_bootmem_region+0x6a/0xef
CR2: 000000000002a3c8 CR3: 0000000001c06000 CR4: 00000000000006b0
Call Trace:
free_all_bootmem+0x4b/0x12a
mem_init+0x70/0xa3
start_kernel+0x25b/0x49bThe problem is that early_page_uninitialised uses the early_pfn_to_nid helper which returns node 0 for invalid PFNs. No caller of early_pfn_to_nid cares except early_page_uninitialised. This patch has early_pfn_to_nid always return a valid node.
--- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/page_alloc.c +1 -1
@@ -1057,7 +1057,7 @@ int __meminit early_pfn_to_nid(unsignedspin_lock (&early_pfn_lock); nid =__early_pfn_to_nid (pfn, &early_pfnnid_cache);if (nid <0 ) - nid =0 ; + nid = first_online_node;spin_unlock (&early_pfn_lock);return nid;
Greg Kroah-Hartman
maintainerPATCH 13/68 mm, meminit: ensure node is online before checking whether pages are uninitialised
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mel Gorman <[email protected]>
commit ef70b6f41cda6270165a6f27b2548ed31cfa3cb2 upstream.
early_page_uninitialised looks up an arbitrary PFN. While a machine without node 0 will boot with "mm, page_alloc: Always return a valid node from early_pfn_to_nid", it works because it assumes that nodes are always in PFN order. This is not guaranteed so this patch adds robustness by always checking if the node being checked is online.
--- mm/page_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
mm/page_alloc.c +3 -1
@@ -275,7 +275,9 @@ static inline void reset_deferred_memini/* Returns true if the struct page for the pfn is uninitialised */ static inline bool __meminit early_page_uninitialised (unsigned long pfn) { -if (pfn >=NODE_DATA (early_pfn_to_nid (pfn))->first_deferred_pfn) +int nid =early_pfn_to_nid (pfn); + +if (node_online (nid) && pfn >=NODE_DATA (nid)->first_deferred_pfn)return true;return false;
Greg Kroah-Hartman
maintainerPATCH 14/68 vmlinux.lds: account for destructor sections
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Vyukov <[email protected]>
commit e41f501d391265ff568f3e49d6128cc30856a36f upstream.
If CONFIG_KASAN is enabled and gcc is configured with --disable-initfini-array and/or gold linker is used, gcc emits .ctors/.dtors and .text.startup/.text.exit sections instead of .init_array/.fini_array. .dtors section is not explicitly accounted in the linker script and messes vvar/percpu layout.
We want:
ffffffff822bfd80 D _edata
ffffffff822c0000 D __vvar_beginning_hack ffffffff822c0000 A __vvar_page ffffffff822c0080 0000000000000098 D vsyscall_gtod_data ffffffff822c1000 A __init_begin ffffffff822c1000 D init_per_cpu__irq_stack_union ffffffff822c1000 A __per_cpu_load ffffffff822d3000 D init_per_cpu__gdt_page
We got:
ffffffff8279a600 D _edata
ffffffff8279b000 A __vvar_page ffffffff8279c000 A __init_begin ffffffff8279c000 D init_per_cpu__irq_stack_union ffffffff8279c000 A __per_cpu_load ffffffff8279e000 D __vvar_beginning_hack ffffffff8279e080 0000000000000098 D vsyscall_gtod_data ffffffff827ae000 D init_per_cpu__gdt_page
This happens because __vvar_page and .vvar get different addresses in arch/x86/kernel/vmlinux.lds.S:
. = ALIGN(PAGE_SIZE);
__vvar_page = .;
.vvar : AT(ADDR(.vvar) - LOAD_OFFSET) {
/* work around gold bug 13023 */
__vvar_beginning_hack = .;Discard .dtors/.fini_array/.text.exit, since we don't call dtors. Merge .text.startup into init text.
--- include/asm-generic/vmlinux.lds.h | 4 ++++ 1 file changed, 4 insertions(+)
include/asm-generic/vmlinux.lds.h +4 -0
@@ -531,15 +531,19 @@#define INIT_TEXT \ *(.init.text) \ + *(.text.startup) \ MEM_DISCARD(init.text)#define EXIT_DATA \ *(.exit.data) \ + *(.fini_array) \ + *(.dtors) \ MEM_DISCARD(exit.data) \ MEM_DISCARD(exit.rodata)#define EXIT_TEXT \ *(.exit.text) \ + *(.text.exit) \ MEM_DISCARD(exit.text)#define EXIT_CALL \
Greg Kroah-Hartman
maintainerPATCH 15/68 pps: do not crash when failed to register
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Slaby <[email protected]>
commit 368301f2fe4b07e5fb71dba3cc566bc59eb6705f upstream.
With this command sequence:
modprobe plip
modprobe pps_parport
rmmod pps_parport
the partport_pps modules causes this crash:
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: parport_detach+0x1d/0x60 [pps_parport]
Oops: 0000 [#1] SMP
...
Call Trace:
parport_unregister_driver+0x65/0xc0 [parport]
SyS_delete_module+0x187/0x210The sequence that builds up to this is:
1) plip is loaded and takes the parport device for exclusive use:
plip0: Parallel port at 0x378, using IRQ 7.
2) pps_parport then fails to grab the device:
pps_parport: parallel port PPS client
parport0: cannot grant exclusive access for device pps_parport
pps_parport: couldn't register with parport0
3) rmmod of pps_parport is then killed because it tries to access
pardev->name, but pardev (taken from port->cad) is NULL.
So add a check for NULL in the test there too.
--- drivers/pps/clients/pps_parport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pps/clients/pps_parport.c +1 -1
@@ -195,7 +195,7 @@ static void parport_detach(struct parporstruct pps_client_pp *device;/* FIXME: oooh, this is ugly! */ -if (strcmp (pardev->name,KBUILD_MODNAME )) +if (!pardev ||strcmp (pardev->name,KBUILD_MODNAME ))/* not our port */ return ;
Greg Kroah-Hartman
maintainerPATCH 16/68 kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Ryabinin <[email protected]>
commit 57675cb976eff977aefb428e68e4e0236d48a9ff upstream.
Lengthy output of sysrq-w may take a lot of time on slow serial console.
Currently we reset NMI-watchdog on the current CPU to avoid spurious lockup messages. Sometimes this doesn't work since softlockup watchdog might trigger on another CPU which is waiting for an IPI to proceed. We reset softlockup watchdogs on all CPUs, but we do this only after listing all tasks, and this may be too late on a busy system.
So, reset watchdogs CPUs earlier, in for_each_process_thread() loop.
--- kernel/sched/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
kernel/sched/core.c +4 -2
@@ -4951,14 +4951,16 @@ void show_state_filter(unsigned long sta/* * reset the NMI-timeout, listing all files on a slow * console might take a lot of time: +* Also, reset softlockup watchdogs on all CPUs, because +* another CPU might be blocked waiting for us to process +* an IPI. */ touch_nmi_watchdog (); +touch_all_softlockup_watchdogs ();if (!state_filter || (p->state & state_filter))sched_show_task (p); } -touch_all_softlockup_watchdogs (); -#ifdef CONFIG_SCHED_DEBUG sysrq_sched_debug_show ();#endif
Greg Kroah-Hartman
maintainerPATCH 17/68 arc: unwind: warn only once if DW2_UNWIND is disabled
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Brodkin <[email protected]>
commit 9bd54517ee86cb164c734f72ea95aeba4804f10b upstream.
If CONFIG_ARC_DW2_UNWIND is disabled every time arc_unwind_core() gets called following message gets printed in debug console:
----------------->8--------------- CONFIG_ARC_DW2_UNWIND needs to be enabled ----------------->8---------------
That message makes sense if user indeed wants to see a backtrace or get nice function call-graphs in perf but what if user disabled unwinder for the purpose? Why pollute his debug console?
So instead we'll warn user about possibly missing feature once and let him decide if that was what he or she really wanted.
--- arch/arc/kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arc/kernel/stacktrace.c +1 -1
@@ -142,7 +142,7 @@ arc_unwind_core(struct task_struct *tsk,* prelogue is setup (callee regs saved and then fp set and not other * way around */ -pr_warn ("CONFIG_ARC_DW2_UNWIND needs to be enabled\n" ); +pr_warn_once ("CONFIG_ARC_DW2_UNWIND needs to be enabled\n" );return 0 ;#endif
Greg Kroah-Hartman
maintainerPATCH 18/68 ARC: unwind: ensure that .debug_frame is generated (vs. .eh_frame)
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vineet Gupta <[email protected]>
commit f52e126cc7476196f44f3c313b7d9f0699a881fc upstream.
With recent binutils update to support dwarf CFI pseudo-ops in gas, we now get .eh_frame vs. .debug_frame. Although the call frame info is exactly the same in both, the CIE differs, which the current kernel unwinder can't cope with.
This broke both the kernel unwinder as well as loadable modules (latter because of a new unhandled relo R_ARC_32_PCREL from .rela.eh_frame in the module loader)
The ideal solution would be to switch unwinder to .eh_frame. For now however we can make do by just ensureing .debug_frame is generated by removing -fasynchronous-unwind-tables
.eh_frame generated with -gdwarf-2 -fasynchronous-unwind-tables
.debug_frame generated with -gdwarf-2
Fixes STAR 9001058196
--- arch/arc/Makefile | 2 -- 1 file changed, 2 deletions(-)
arch/arc/Makefile +0 -2
@@ -48,8 +48,6 @@ endif endif -cflags-$(CONFIG_ARC_DW2_UNWIND) += -fasynchronous-unwind-tables - # By default gcc 4.8 generates dwarf4 which kernel unwinder can't grok ifeq ($(atleast_gcc48),y) cflags-$(CONFIG_ARC_DW2_UNWIND) += -gdwarf-2
Greg Kroah-Hartman
maintainerPATCH 19/68 xen/pciback: Fix conf_space read/write overlap check.
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Grodzovsky <[email protected]>
commit 02ef871ecac290919ea0c783d05da7eedeffc10e upstream.
Current overlap check is evaluating to false a case where a filter field is fully contained (proper subset) of a r/w request. This change applies classical overlap check instead to include all the scenarios.
More specifically, for (Hilscher GmbH CIFX 50E-DP(M/S)) device driver the logic is such that the entire confspace is read and written in 4 byte chunks. In this case as an example, CACHE_LINE_SIZE, LATENCY_TIMER and PCI_BIST are arriving together in one call to xen_pcibk_config_write() with offset == 0xc and size == 4. With the exsisting overlap check the LATENCY_TIMER field (offset == 0xd, length == 1) is fully contained in the write request and hence is excluded from write, which is incorrect.
--- drivers/xen/xen-pciback/conf_space.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/xen/xen-pciback/conf_space.c +2 -4
@@ -183,8 +183,7 @@ int xen_pcibk_config_read(struct pci_dev field_start =OFFSET (cfg_entry); field_end =OFFSET (cfg_entry) + field->size; -if ((req_start >= field_start && req_start < field_end) - || (req_end > field_start && req_end <= field_end)) { +if (req_end > field_start && field_end > req_start) { err =conf_space_read (dev, cfg_entry, field_start, &tmp_val);if (err)
@@ -230,8 +229,7 @@ int xen_pcibk_config_write(struct pci_de field_start =OFFSET (cfg_entry); field_end =OFFSET (cfg_entry) + field->size; -if ((req_start >= field_start && req_start < field_end) - || (req_end > field_start && req_end <= field_end)) { +if (req_end > field_start && field_end > req_start) { tmp_val =0 ; err = xen_pcibk_config_read(dev, field_start,
Greg Kroah-Hartman
maintainerPATCH 20/68 xenbus: dont BUG() on user mode induced condition
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Beulich <[email protected]>
commit 0beef634b86a1350c31da5fcc2992f0d7c8a622b upstream.
Inability to locate a user mode specified transaction ID should not lead to a kernel crash. For other than XS_TRANSACTION_START also don't issue anything to xenbus if the specified ID doesn't match that of any active transaction.
--- drivers/xen/xenbus/xenbus_dev_frontend.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
drivers/xen/xenbus/xenbus_dev_frontend.c +8 -6
@@ -316,11 +316,18 @@ static int xenbus_write_transaction(unsi rc = -ENOMEM ; goto out; } + }else { +list_for_each_entry (trans, &u->transactions, list) +if (trans->handle.id == u->u.msg.tx_id) +break ; +if (&trans->list == &u->transactions) +return -ESRCH ; } reply =xenbus_dev_request_and_reply (&u->u.msg);if (IS_ERR (reply)) { -kfree (trans); +if (msg_type ==XS_TRANSACTION_START ) +kfree (trans); rc =PTR_ERR (reply); goto out; }
@@ -333,12 +340,7 @@ static int xenbus_write_transaction(unsilist_add (&trans->list, &u->transactions); } }else if (u->u.msg.type ==XS_TRANSACTION_END ) { -list_for_each_entry (trans, &u->transactions, list) -if (trans->handle.id == u->u.msg.tx_id) -break ; -BUG_ON (&trans->list == &u->transactions);list_del (&trans->list); -kfree (trans); }
Greg Kroah-Hartman
maintainerPATCH 21/68 xenbus: dont bail early from xenbus_dev_request_and_reply()
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan Beulich <[email protected]>
commit 7469be95a487319514adce2304ad2af3553d2fc9 upstream.
xenbus_dev_request_and_reply() needs to track whether a transaction is open. For XS_TRANSACTION_START messages it calls transaction_start() and for XS_TRANSACTION_END messages it calls transaction_end().
If sending an XS_TRANSACTION_START message fails or responds with an an error, the transaction is not open and transaction_end() must be called.
If sending an XS_TRANSACTION_END message fails, the transaction is still open, but if an error response is returned the transaction is closed.
Commit 027bd7e89906 ("xen/xenbus: Avoid synchronous wait on XenBus stalling shutdown/restart") introduced a regression where failed XS_TRANSACTION_START messages were leaving the transaction open. This can cause problems with suspend (and migration) as all transactions must be closed before suspending.
It appears that the problematic change was added accidentally, so just remove it.
--- drivers/xen/xenbus/xenbus_xs.c | 3 --- 1 file changed, 3 deletions(-)
drivers/xen/xenbus/xenbus_xs.c +0 -3
@@ -250,9 +250,6 @@ void *xenbus_dev_request_and_reply(strucmutex_unlock (&xs_state.request_mutex); -if (IS_ERR (ret)) -return ret; -if ((msg->type ==XS_TRANSACTION_END ) || ((req_msg.type ==XS_TRANSACTION_START ) && (msg->type ==XS_ERROR )))
Greg Kroah-Hartman
maintainerPATCH 25/68 Input: vmmouse - remove port reservation
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sinclair Yeh <[email protected]>
commit 60842ef8128e7bf58c024814cd0dc14319232b6c upstream.
The VMWare EFI BIOS will expose port 0x5658 as an ACPI resource. This causes the port to be reserved by the APCI module as the system comes up, making it unavailable to be reserved again by other drivers, thus preserving this VMWare port for special use in a VMWare guest.
This port is designed to be shared among multiple VMWare services, such as the VMMOUSE. Because of this, VMMOUSE should not try to reserve this port on its own.
The VMWare non-EFI BIOS does not do this to preserve compatibility with existing/legacy VMs. It is known that there is small chance a VM may be configured such that these ports get reserved by other non-VMWare devices, and if this ever happens, the result is undefined.
--- drivers/input/mouse/vmmouse.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-)
drivers/input/mouse/vmmouse.c +2 -20
@@ -355,18 +355,11 @@ int vmmouse_detect(struct psmouse *psmoureturn -ENXIO ; } -if (!request_region (VMMOUSE_PROTO_PORT ,4 ,"vmmouse" )) { -psmouse_dbg (psmouse,"VMMouse port in use.\n" ); -return -EBUSY ; - } -/* Check if the device is present */ response = ~VMMOUSE_PROTO_MAGIC ;VMMOUSE_CMD (GETVERSION ,0 , version, response, dummy1, dummy2); -if (response !=VMMOUSE_PROTO_MAGIC || version ==0xffffffffU ) { -release_region (VMMOUSE_PROTO_PORT ,4 ); +if (response !=VMMOUSE_PROTO_MAGIC || version ==0xffffffffU )return -ENXIO ; - }if (set_properties) { psmouse->vendor =VMMOUSE_VENDOR ;
@@ -374,8 +367,6 @@ int vmmouse_detect(struct psmouse *psmou psmouse->model = version; } -release_region (VMMOUSE_PROTO_PORT ,4 ); -return 0 ; }
@@ -394,7 +385,6 @@ static void vmmouse_disconnect(struct pspsmouse_reset (psmouse);input_unregister_device (priv->abs_dev);kfree (priv); -release_region (VMMOUSE_PROTO_PORT ,4 ); }/**
@@ -438,15 +428,10 @@ int vmmouse_init(struct psmouse *psmousestruct input_dev *rel_dev = psmouse->dev, *abs_dev;int error; -if (!request_region (VMMOUSE_PROTO_PORT ,4 ,"vmmouse" )) { -psmouse_dbg (psmouse,"VMMouse port in use.\n" ); -return -EBUSY ; - } -psmouse_reset (psmouse); error =vmmouse_enable (psmouse);if (error) - goto release_region; +return error; priv =kzalloc (sizeof (*priv),GFP_KERNEL ); abs_dev =input_allocate_device ();
@@ -502,8 +487,5 @@ init_fail:kfree (priv); psmouse->private =NULL ; -release_region: -release_region (VMMOUSE_PROTO_PORT ,4 ); -return error; }
Greg Kroah-Hartman
maintainerPATCH 26/68 Input: elantech - add more IC body types to the list
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Torokhov <[email protected]>
commit 226ba707744a51acb4244724e09caacb1d96aed9 upstream.
The touchpad in HP Pavilion 14-ab057ca reports it's version as 12 and according to Elan both 11 and 12 are valid IC types and should be identified as hw_version 4.
--- drivers/input/mouse/elantech.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
drivers/input/mouse/elantech.c +1 -7
@@ -1568,13 +1568,7 @@ static int elantech_set_properties(struccase 5 : etd->hw_version =3 ;break ; -case 6 : -case 7 : -case 8 : -case 9 : -case 10 : -case 13 : -case 14 : + case 6 ... 14: etd->hw_version =4 ;break ;default :
Greg Kroah-Hartman
maintainerPATCH 27/68 Input: xpad - fix oops when attaching an unknown Xbox One gamepad
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cameron Gutman <[email protected]>
commit c7f1429389ec1aa25e042bb13451385fbb596f8c upstream.
Xbox One controllers have multiple interfaces which all have the same class, subclass, and protocol. One of the these interfaces has only a single endpoint. When Xpad attempts to bind to this interface, it causes an oops when trying initialize the output URB by trying to access the second endpoint's descriptor.
This situation was avoided for known Xbox One devices by checking the XTYPE constant associated with the VID and PID tuple. However, this breaks when new or previously unknown Xbox One controllers are attached to the system.
This change addresses the problem by deriving the XTYPE for Xbox One controllers based on the interface protocol before checking the interface number.
--- drivers/input/joystick/xpad.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-)
drivers/input/joystick/xpad.c +13 -10
@@ -1206,16 +1206,6 @@ static int xpad_probe(struct usb_interfabreak ; } -if (xpad_device[i].xtype ==XTYPE_XBOXONE && - intf->cur_altsetting->desc.bInterfaceNumber !=0 ) { -/* -* The Xbox One controller lists three interfaces all with the -* same interface class, subclass and protocol. Differentiate by -* interface number. -*/ -return -ENODEV ; - } - xpad =kzalloc (sizeof (struct usb_xpad ),GFP_KERNEL );if (!xpad)return -ENOMEM ;
@@ -1246,6 +1236,8 @@ static int xpad_probe(struct usb_interfaif (intf->cur_altsetting->desc.bInterfaceClass ==USB_CLASS_VENDOR_SPEC ) {if (intf->cur_altsetting->desc.bInterfaceProtocol ==129 ) xpad->xtype =XTYPE_XBOX360W ; +else if (intf->cur_altsetting->desc.bInterfaceProtocol ==208 ) + xpad->xtype =XTYPE_XBOXONE ;else xpad->xtype =XTYPE_XBOX360 ; }else {
@@ -1260,6 +1252,17 @@ static int xpad_probe(struct usb_interfa xpad->mapping |=MAP_STICKS_TO_NULL ; } +if (xpad->xtype ==XTYPE_XBOXONE && + intf->cur_altsetting->desc.bInterfaceNumber !=0 ) { +/* +* The Xbox One controller lists three interfaces all with the +* same interface class, subclass and protocol. Differentiate by +* interface number. +*/ + error = -ENODEV ; + goto err_free_in_urb; + } + error =xpad_init_output (intf, xpad);if (error) goto err_free_in_urb;
Greg Kroah-Hartman
maintainerPATCH 28/68 Input: wacom_w8001 - w8001_MAX_LENGTH should be 13
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ping Cheng <[email protected]>
commit 12afb34400eb2b301f06b2aa3535497d14faee59 upstream.
Somehow the patch that added two-finger touch support forgot to update W8001_MAX_LENGTH from 11 to 13.
--- drivers/input/touchscreen/wacom_w8001.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/touchscreen/wacom_w8001.c +1 -1
@@ -27,7 +27,7 @@ MODULE_AUTHOR("Jaya Kumar <jayakumar.lkmMODULE_DESCRIPTION (DRIVER_DESC );MODULE_LICENSE ("GPL" ); -#define W8001_MAX_LENGTH 11 +#define W8001_MAX_LENGTH 13#define W8001_LEAD_MASK 0x80#define W8001_LEAD_BYTE 0x80#define W8001_TAB_MASK 0x40
Greg Kroah-Hartman
maintainerPATCH 29/68 Input: xpad - validate USB endpoint count during probe
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cameron Gutman <[email protected]>
commit caca925fca4fb30c67be88cacbe908eec6721e43 upstream.
This prevents a malicious USB device from causing an oops.
--- drivers/input/joystick/xpad.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/input/joystick/xpad.c +3 -0
@@ -1200,6 +1200,9 @@ static int xpad_probe(struct usb_interfaint ep_irq_in_idx;int i, error; +if (intf->cur_altsetting->desc.bNumEndpoints !=2 ) +return -ENODEV ; +for (i =0 ; xpad_device[i].idVendor; i++) {if ((le16_to_cpu (udev->descriptor.idVendor) == xpad_device[i].idVendor) && (le16_to_cpu (udev->descriptor.idProduct) == xpad_device[i].idProduct))
Greg Kroah-Hartman
maintainerPATCH 31/68 pvclock: Add CPU barriers to get correct version value
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Minfei Huang <[email protected]>
commit 749d088b8e7f4b9826ede02b9a043e417fa84aa1 upstream.
Protocol for the "version" fields is: hypervisor raises it (making it uneven) before it starts updating the fields and raises it again (making it even) when it is done. Thus the guest can make sure the time values it got are consistent by checking the version before and after reading them.
Add CPU barries after getting version value just like what function vread_pvclock does, because all of callees in this function is inline.
--- arch/x86/include/asm/pvclock.h | 2 ++ arch/x86/kernel/pvclock.c | 4 ++++ 2 files changed, 6 insertions(+)
arch/x86/include/asm/pvclock.h +2 -0
@@ -76,6 +76,8 @@ unsigned __pvclock_read_cycles(const stru8 ret_flags; version = src->version; +/* Make the latest version visible */ +smp_rmb (); offset =pvclock_get_nsec_offset (src); ret = src->system_time + offset;
arch/x86/kernel/pvclock.c +4 -0
@@ -66,6 +66,8 @@ u8 pvclock_read_flags(struct pvclock_vcpdo { version =__pvclock_read_cycles (src, &ret, &flags); +/* Make sure that the version double-check is last. */ +smp_rmb (); }while ((src->version &1 ) || version != src->version);return flags & valid_flags;
@@ -80,6 +82,8 @@ cycle_t pvclock_clocksource_read(structdo { version =__pvclock_read_cycles (src, &ret, &flags); +/* Make sure that the version double-check is last. */ +smp_rmb (); }while ((src->version &1 ) || version != src->version);if (unlikely ((flags &PVCLOCK_GUEST_STOPPED ) !=0 )) {
Greg Kroah-Hartman
maintainerPATCH 32/68 pinctrl: single: Fix missing flush of posted write for a wakeirq
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tony Lindgren <[email protected]>
commit 0ac3c0a4025f41748a083bdd4970cb3ede802b15 upstream.
With many repeated suspend resume cycles, the pin specific wakeirq may not always work on omaps. This is because the write to enable the pin interrupt may not have reached the device over the interconnect before suspend happens.
Let's fix the issue with a flush of posted write with a readback.
--- drivers/pinctrl/pinctrl-single.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/pinctrl/pinctrl-single.c +3 -0
@@ -1576,6 +1576,9 @@ static inline void pcs_irq_set(struct pcelse mask &= ~soc_mask; pcs->write (mask, pcswi->reg); + +/* flush posted write */ + mask = pcs->read (pcswi->reg);raw_spin_unlock (&pcs->lock); }
Greg Kroah-Hartman
maintainerPATCH 33/68 pinctrl: imx: Do not treat a PIN without MUX register as an error
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Shiyan <[email protected]>
commit ba562d5e54fd3136bfea0457add3675850247774 upstream.
Some PINs do not have a MUX register, it is not an error. It is necessary to allow the continuation of the PINs configuration, otherwise the whole PIN-group will be configured incorrectly.
--- drivers/pinctrl/freescale/pinctrl-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/freescale/pinctrl-imx.c +2 -2
@@ -207,9 +207,9 @@ static int imx_pmx_set(struct pinctrl_de pin_reg = &info->pin_regs[pin_id];if (pin_reg->mux_reg ==-1 ) { -dev_err (ipctl->dev,"Pin(%s) does not support mux function\n" , +dev_dbg (ipctl->dev,"Pin(%s) does not support mux function\n" , info->pins[pin_id].name); -return -EINVAL ; +continue ; }if (info->flags &SHARE_MUX_CONF_REG ) {
Greg Kroah-Hartman
maintainerPATCH 34/68 cgroup: set css->id to -1 during init
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <[email protected]>
commit 8fa3b8d689a54d6d04ff7803c724fb7aca6ce98e upstream.
If percpu_ref initialization fails during css_create(), the free path can end up trying to free css->id of zero. As ID 0 is unused, it doesn't cause a critical breakage but it does trigger a warning message. Fix it by setting css->id to -1 from init_and_link_css().
--- kernel/cgroup.c | 1 + 1 file changed, 1 insertion(+)
kernel/cgroup.c +1 -0
@@ -4793,6 +4793,7 @@ static void init_and_link_css(struct cgrmemset (css,0 ,sizeof (*css)); css->cgroup = cgrp; css->ss = ss; + css->id =-1 ;INIT_LIST_HEAD (&css->sibling);INIT_LIST_HEAD (&css->children); css->serial_nr = css_serial_nr_next++;
Greg Kroah-Hartman
maintainerPATCH 35/68 power_supply: power_supply_read_temp only if use_cnt > 0
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rhyland Klein <[email protected]>
commit 5bc28b93a36e3cb3acc2870fb75cb6ffb182fece upstream.
Change power_supply_read_temp() to use power_supply_get_property() so that it will check the use_cnt and ensure it is > 0. The use_cnt will be incremented at the end of __power_supply_register, so this will block to case where get_property can be called before the supply is fully registered. This fixes the issue show in the stack below:
[ 1.452598] power_supply_read_temp+0x78/0x80 [ 1.458680] thermal_zone_get_temp+0x5c/0x11c [ 1.464765] thermal_zone_device_update+0x34/0xb4 [ 1.471195] thermal_zone_device_register+0x87c/0x8cc [ 1.477974] __power_supply_register+0x364/0x424 [ 1.484317] power_supply_register_no_ws+0x10/0x18 [ 1.490833] bq27xxx_battery_setup+0x10c/0x164 [ 1.497003] bq27xxx_battery_i2c_probe+0xd0/0x1b0 [ 1.503435] i2c_device_probe+0x174/0x240 [ 1.509172] driver_probe_device+0x1fc/0x29c [ 1.515167] __driver_attach+0xa4/0xa8 [ 1.520643] bus_for_each_dev+0x58/0x98 [ 1.526204] driver_attach+0x20/0x28 [ 1.531505] bus_add_driver+0x1c8/0x22c [ 1.537067] driver_register+0x68/0x108 [ 1.542630] i2c_register_driver+0x38/0x7c [ 1.548457] bq27xxx_battery_i2c_driver_init+0x18/0x20 [ 1.555321] do_one_initcall+0x38/0x12c [ 1.560886] kernel_init_freeable+0x148/0x1ec [ 1.566972] kernel_init+0x10/0xfc [ 1.572101] ret_from_fork+0x10/0x40
Also make the same change to ps_get_max_charge_cntl_limit() and ps_get_cur_chrage_cntl_limit() to be safe. Lastly, change the return value of power_supply_get_property() to -EAGAIN from -ENODEV if use_cnt <= 0.
--- drivers/power/power_supply_core.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-)
drivers/power/power_supply_core.c +16 -11
@@ -565,11 +565,12 @@ static int power_supply_read_temp(structWARN_ON (tzd ==NULL ); psy = tzd->devdata; - ret = psy->desc->get_property (psy,POWER_SUPPLY_PROP_TEMP , &val); + ret =power_supply_get_property (psy,POWER_SUPPLY_PROP_TEMP , &val); +if (ret) +return ret;/* Convert tenths of degree Celsius to milli degree Celsius. */ -if (!ret) - *temp = val.intval *100 ; + *temp = val.intval *100 ;return ret; }
@@ -612,10 +613,12 @@ static int ps_get_max_charge_cntl_limit(int ret; psy = tcd->devdata; - ret = psy->desc->get_property (psy, -POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX , &val); -if (!ret) - *state = val.intval; + ret =power_supply_get_property (psy, +POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT_MAX , &val); +if (ret) +return ret; + + *state = val.intval;return ret; }
@@ -628,10 +631,12 @@ static int ps_get_cur_chrage_cntl_limit(int ret; psy = tcd->devdata; - ret = psy->desc->get_property (psy, -POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT , &val); -if (!ret) - *state = val.intval; + ret =power_supply_get_property (psy, +POWER_SUPPLY_PROP_CHARGE_CONTROL_LIMIT , &val); +if (ret) +return ret; + + *state = val.intval;return ret; }
Greg Kroah-Hartman
maintainerPATCH 36/68 locks: use file_inode()
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit 6343a2120862f7023006c8091ad95c1f16a32077 upstream.
(Another one for the f_path debacle.)
ltp fcntl33 testcase caused an Oops in selinux_file_send_sigiotask.
The reason is that generic_add_lease() used filp->f_path.dentry->inode while all the others use file_inode(). This makes a difference for files opened on overlayfs since the former will point to the overlay inode the latter to the underlying inode.
So generic_add_lease() added the lease to the overlay inode and generic_delete_lease() removed it from the underlying inode. When the file was released the lease remained on the overlay inode's lock list, resulting in use after free.
--- fs/locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/locks.c +1 -1
@@ -1602,7 +1602,7 @@ generic_add_lease(struct file *filp, lon {struct file_lock *fl, *my_fl =NULL , *lease;struct dentry *dentry = filp->f_path.dentry; -struct inode *inode = dentry->d_inode; +struct inode *inode =file_inode (filp);struct file_lock_context *ctx;bool is_deleg = (*flp)->fl_flags &FL_DELEG ;int error;
Greg Kroah-Hartman
maintainerPATCH 37/68 Revert "ecryptfs: forbid opening files without mmap handler"
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Mahoney <[email protected]>
commit 78c4e172412de5d0456dc00d2b34050aa0b683b5 upstream.
This reverts commit 2f36db71009304b3f0b95afacd8eba1f9f046b87.
It fixed a local root exploit but also introduced a dependency on the lower file system implementing an mmap operation just to open a file, which is a bit of a heavy hammer. The right fix is to have mmap depend on the existence of the mmap handler instead.
--- fs/ecryptfs/kthread.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
fs/ecryptfs/kthread.c +2 -11
@@ -25,7 +25,6 @@#include <linux/slab.h> #include <linux/wait.h> #include <linux/mount.h> -#include <linux/file.h> #include "ecryptfs_kernel.h" struct ecryptfs_open_req {
@@ -148,7 +147,7 @@ int ecryptfs_privileged_open(struct file flags |=IS_RDONLY (d_inode (lower_dentry)) ?O_RDONLY :O_RDWR ; (*lower_file) =dentry_open (&req.path, flags, cred);if (!IS_ERR (*lower_file)) - goto have_file; + goto out;if ((flags &O_ACCMODE ) ==O_RDONLY ) { rc =PTR_ERR ((*lower_file)); goto out;
@@ -166,16 +165,8 @@ int ecryptfs_privileged_open(struct filemutex_unlock (&ecryptfs_kthread_ctl.mux);wake_up (&ecryptfs_kthread_ctl.wait);wait_for_completion (&req.done); -if (IS_ERR (*lower_file)) { +if (IS_ERR (*lower_file)) rc =PTR_ERR (*lower_file); - goto out; - } -have_file: -if ((*lower_file)->f_op->mmap ==NULL ) { -fput (*lower_file); - *lower_file =NULL ; - rc = -EMEDIUMTYPE ; - } out:return rc; }
Greg Kroah-Hartman
maintainerPATCH 38/68 ecryptfs: dont allow mmap when the lower fs doesnt support it
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Mahoney <[email protected]>
commit f0fe970df3838c202ef6c07a4c2b36838ef0a88b upstream.
There are legitimate reasons to disallow mmap on certain files, notably in sysfs or procfs. We shouldn't emulate mmap support on file systems that don't offer support natively.
CVE-2016-1583
--- fs/ecryptfs/file.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
fs/ecryptfs/file.c +14 -1
@@ -170,6 +170,19 @@ out:return rc; } +static int ecryptfs_mmap (struct file *file,struct vm_area_struct *vma) +{ +struct file *lower_file =ecryptfs_file_to_lower (file); +/* +* Don't allow mmap on top of file systems that don't support it +* natively. If FILESYSTEM_MAX_STACK_DEPTH > 2 or ecryptfs +* allows recursive mounting, this will need to be extended. +*/ +if (!lower_file->f_op->mmap) +return -ENODEV ; +return generic_file_mmap (file, vma); +} +/** * ecryptfs_open * @inode: inode speciying file to open
@@ -364,7 +377,7 @@ const struct file_operations ecryptfs_ma#ifdef CONFIG_COMPAT .compat_ioctl = ecryptfs_compat_ioctl, #endif - .mmap = generic_file_mmap, + .mmap = ecryptfs_mmap, .open = ecryptfs_open, .flush = ecryptfs_flush, .release = ecryptfs_release,
Greg Kroah-Hartman
maintainerPATCH 39/68 ext4: verify extent header depth
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vegard Nossum <[email protected]>
commit 7bc9491645118c9461bd21099c31755ff6783593 upstream.
Although the extent tree depth of 5 should enough be for the worst case of 2*32 extents of length 1, the extent tree code does not currently to merge nodes which are less than half-full with a sibling node, or to shrink the tree depth if possible. So it's possible, at least in theory, for the tree depth to be greater than 5. However, even in the worst case, a tree depth of 32 is highly unlikely, and if the file system is maliciously corrupted, an insanely large eh_depth can cause memory allocation failures that will trigger kernel warnings (here, eh_depth = 65280):
JBD2: ext4.exe wants too many credits credits:195849 rsv_credits:0 max:256
------------[ cut here ]------------
WARNING: CPU: 0 PID: 50 at fs/jbd2/transaction.c:293 start_this_handle+0x569/0x580
CPU: 0 PID: 50 Comm: ext4.exe Not tainted 4.7.0-rc5+ #508
Stack:
604a8947 625badd8 0002fd09 00000000
60078643 00000000 62623910 601bf9bc
62623970 6002fc84 626239b0 900000125
Call Trace:
[<6001c2dc>] show_stack+0xdc/0x1a0
[<601bf9bc>] dump_stack+0x2a/0x2e
[<6002fc84>] __warn+0x114/0x140
[<6002fdff>] warn_slowpath_null+0x1f/0x30
[<60165829>] start_this_handle+0x569/0x580
[<60165d4e>] jbd2__journal_start+0x11e/0x220
[<60146690>] __ext4_journal_start_sb+0x60/0xa0
[<60120a81>] ext4_truncate+0x131/0x3a0
[<60123677>] ext4_setattr+0x757/0x840
[<600d5d0f>] notify_change+0x16f/0x2a0
[<600b2b16>] do_truncate+0x76/0xc0
[<600c3e56>] path_openat+0x806/0x1300
[<600c55c9>] do_filp_open+0x89/0xf0
[<600b4074>] do_sys_open+0x134/0x1e0
[<600b4140>] SyS_open+0x20/0x30
[<6001ea68>] handle_syscall+0x88/0x90
[<600295fd>] userspace+0x3fd/0x500
[<6001ac55>] fork_handler+0x85/0x90
---[ end trace 08b0b88b6387a244 ]---[ Commit message modified and the extent tree depath check changed from 5 to 32 -- tytso ]
--- fs/ext4/extents.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/ext4/extents.c +4 -0
@@ -469,6 +469,10 @@ static int __ext4_ext_check(const char * error_msg ="invalid extent entries" ; goto corrupted; } +if (unlikely (depth >32 )) { + error_msg ="too large eh_depth" ; + goto corrupted; + }/* Verify checksum on non-root extent tree nodes */ if (ext_depth (inode) != depth && !ext4_extent_block_csum_verify (inode, eh)) {
Greg Kroah-Hartman
maintainerPATCH 40/68 9p: use file_dentry()
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit b403f0e37a11f84f7ceaf40b0075499e5bcfd220 upstream.
v9fs may be used as lower layer of overlayfs and accessing f_path.dentry can lead to a crash. In this case it's a NULL pointer dereference in p9_fid_create().
Fix by replacing direct access of file->f_path.dentry with the file_dentry() accessor, which will always return a native object.
--- fs/9p/vfs_file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/9p/vfs_file.c +3 -3
@@ -74,7 +74,7 @@ int v9fs_file_open(struct inode *inode, v9fs_proto_dotu(v9ses)); fid = file->private_data;if (!fid) { - fid =v9fs_fid_clone (file->f_path.dentry); + fid =v9fs_fid_clone (file_dentry (file));if (IS_ERR (fid))return PTR_ERR (fid);
@@ -100,7 +100,7 @@ int v9fs_file_open(struct inode *inode,* because we want write after unlink usecase * to work. */ - fid =v9fs_writeback_fid (file->f_path.dentry); + fid =v9fs_writeback_fid (file_dentry (file));if (IS_ERR (fid)) { err =PTR_ERR (fid);mutex_unlock (&v9inode->v_mutex);
@@ -516,7 +516,7 @@ v9fs_mmap_file_mmap(struct file *filp, s* because we want write after unlink usecase * to work. */ - fid =v9fs_writeback_fid (filp->f_path.dentry); + fid =v9fs_writeback_fid (file_dentry (filp));if (IS_ERR (fid)) { retval =PTR_ERR (fid);mutex_unlock (&v9inode->v_mutex);
Greg Kroah-Hartman
maintainerPATCH 41/68 namespace: update event counter when umounting a deleted dentry
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Ulanov <[email protected]>
commit e06b933e6ded42384164d28a2060b7f89243b895 upstream.
- m_start() in fs/namespace.c expects that ns->event is incremented each time a mount added or removed from ns->list.
- umount_tree() removes items from the list but does not increment event counter, expecting that it's done before the function is called.
- There are some codepaths that call umount_tree() without updating "event" counter. e.g. from __detach_mounts().
- When this happens m_start may reuse a cached mount structure that no longer belongs to ns->list (i.e. use after free which usually leads to infinite loop).
This change fixes the above problem by incrementing global event counter before invoking umount_tree().
--- fs/namespace.c | 1 + 1 file changed, 1 insertion(+)
fs/namespace.c +1 -0
@@ -1562,6 +1562,7 @@ void __detach_mounts(struct dentry *dent goto out_unlock;lock_mount_hash (); + event++;while (!hlist_empty (&mp->m_list)) { mnt = hlist_entry(mp->m_list.first, struct mount, mnt_mp_list);if (mnt->mnt.mnt_flags &MNT_UMOUNT ) {
Greg Kroah-Hartman
maintainerPATCH 42/68 spi: sunxi: fix transfer timeout
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Suchanek <[email protected]>
commit 719bd6542044efd9b338a53dba1bef45f40ca169 upstream.
The trasfer timeout is fixed at 1000 ms. Reading a 4Mbyte flash over 1MHz SPI bus takes way longer than that. Calculate the timeout from the actual time the transfer is supposed to take and multiply by 2 for good measure.
--- drivers/spi/spi-sun4i.c | 10 +++++++++- drivers/spi/spi-sun6i.c | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-)
drivers/spi/spi-sun4i.c +9 -1
@@ -170,6 +170,7 @@ static int sun4i_spi_transfer_one(struct {struct sun4i_spi *sspi =spi_master_get_devdata (master);unsigned int mclk_rate, div, timeout; +unsigned int start, end, tx_time;unsigned int tx_len =0 ;int ret =0 ;u32 reg;
@@ -279,9 +280,16 @@ static int sun4i_spi_transfer_one(struct reg =sun4i_spi_read (sspi,SUN4I_CTL_REG );sun4i_spi_write (sspi,SUN4I_CTL_REG , reg |SUN4I_CTL_XCH ); + tx_time =max (tfr->len *8 *2 / (tfr->speed_hz /1000 ),100U ); + start = jiffies; timeout =wait_for_completion_timeout (&sspi->done, -msecs_to_jiffies (1000 )); +msecs_to_jiffies (tx_time)); + end = jiffies;if (!timeout) { +dev_warn (&master->dev, +"%s: timeout transferring %u bytes@%iHz for %i(%i)ms" , +dev_name (&spi->dev), tfr->len, tfr->speed_hz, +jiffies_to_msecs (end - start), tx_time); ret = -ETIMEDOUT ; goto out; }
drivers/spi/spi-sun6i.c +9 -1
@@ -160,6 +160,7 @@ static int sun6i_spi_transfer_one(struct {struct sun6i_spi *sspi =spi_master_get_devdata (master);unsigned int mclk_rate, div, timeout; +unsigned int start, end, tx_time;unsigned int tx_len =0 ;int ret =0 ;u32 reg;
@@ -269,9 +270,16 @@ static int sun6i_spi_transfer_one(struct reg =sun6i_spi_read (sspi,SUN6I_TFR_CTL_REG );sun6i_spi_write (sspi,SUN6I_TFR_CTL_REG , reg |SUN6I_TFR_CTL_XCH ); + tx_time =max (tfr->len *8 *2 / (tfr->speed_hz /1000 ),100U ); + start = jiffies; timeout =wait_for_completion_timeout (&sspi->done, -msecs_to_jiffies (1000 )); +msecs_to_jiffies (tx_time)); + end = jiffies;if (!timeout) { +dev_warn (&master->dev, +"%s: timeout transferring %u bytes@%iHz for %i(%i)ms" , +dev_name (&spi->dev), tfr->len, tfr->speed_hz, +jiffies_to_msecs (end - start), tx_time); ret = -ETIMEDOUT ; goto out; }
Greg Kroah-Hartman
maintainerPATCH 43/68 spi: sun4i: fix FIFO limit
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michal Suchanek <[email protected]>
commit 6d9fe44bd73d567d04d3a68a2d2fa521ab9532f2 upstream.
When testing SPI without DMA I noticed that filling the FIFO on the spi controller causes timeout.
Always leave room for one byte in the FIFO.
--- drivers/spi/spi-sun4i.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/spi/spi-sun4i.c +10 -3
@@ -177,7 +177,10 @@ static int sun4i_spi_transfer_one(struct/* We don't support transfer larger than the FIFO */ if (tfr->len >SUN4I_FIFO_DEPTH ) -return -EINVAL ; +return -EMSGSIZE ; + +if (tfr->tx_buf && tfr->len >=SUN4I_FIFO_DEPTH ) +return -EMSGSIZE ;reinit_completion (&sspi->done); sspi->tx_buf = tfr->tx_buf;
@@ -270,8 +273,12 @@ static int sun4i_spi_transfer_one(structsun4i_spi_write (sspi,SUN4I_BURST_CNT_REG ,SUN4I_BURST_CNT (tfr->len));sun4i_spi_write (sspi,SUN4I_XMIT_CNT_REG ,SUN4I_XMIT_CNT (tx_len)); -/* Fill the TX FIFO */ -sun4i_spi_fill_fifo (sspi,SUN4I_FIFO_DEPTH ); +/* +* Fill the TX FIFO +* Filling the FIFO fully causes timeout for some reason +* at least on spi2 on A10s +*/ +sun4i_spi_fill_fifo (sspi,SUN4I_FIFO_DEPTH -1 );/* Enable the interrupts */ sun4i_spi_write (sspi,SUN4I_INT_CTL_REG ,SUN4I_INT_CTL_TC );
Greg Kroah-Hartman
maintainerPATCH 44/68 clk: rockchip: initialize flags of clk_init_data in mmc-phase clock
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <[email protected]>
commit 595144c1141c951a3c6bb9004ae6a2bc29aad66f upstream.
The flags element of clk_init_data was never initialized for mmc- phase-clocks resulting in the element containing a random value and thus possibly enabling unwanted clock flags.
--- drivers/clk/rockchip/clk-mmc-phase.c | 1 + 1 file changed, 1 insertion(+)
drivers/clk/rockchip/clk-mmc-phase.c +1 -0
@@ -153,6 +153,7 @@ struct clk *rockchip_clk_register_mmc(coreturn NULL ; init.name = name; + init.flags =0 ; init.num_parents = num_parents; init.parent_names = parent_names; init.ops = &rockchip_mmc_clk_ops;
Greg Kroah-Hartman
maintainerPATCH 45/68 platform/chrome: cros_ec_dev - double fetch bug in ioctl
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
commit 096cdc6f52225835ff503f987a0d68ef770bb78e upstream.
We verify "u_cmd.outsize" and "u_cmd.insize" but we need to make sure that those values have not changed between the two copy_from_user() calls. Otherwise it could lead to a buffer overflow.
Additionally, cros_ec_cmd_xfer() can set s_cmd->insize to a lower value. We should use the new smaller value so we don't copy too much data to the user.
--- drivers/platform/chrome/cros_ec_dev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_dev.c +7 -1
@@ -147,13 +147,19 @@ static long ec_device_ioctl_xcmd(struct goto exit; } +if (u_cmd.outsize != s_cmd->outsize || + u_cmd.insize != s_cmd->insize) { + ret = -EINVAL ; + goto exit; + } + s_cmd->command += ec->cmd_offset; ret =cros_ec_cmd_xfer (ec->ec_dev, s_cmd);/* Only copy data to userland if data was received. */ if (ret <0 ) goto exit; -if (copy_to_user (arg, s_cmd,sizeof (*s_cmd) + u_cmd.insize)) +if (copy_to_user (arg, s_cmd,sizeof (*s_cmd) + s_cmd->insize)) ret = -EFAULT ; exit:kfree (s_cmd);
Greg Kroah-Hartman
maintainerPATCH 46/68 qeth: delete napi struct when removing a qeth device
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ursula Braun <[email protected]>
commit 7831b4ff0d926e0deeaabef9db8800ed069a2757 upstream.
A qeth_card contains a napi_struct linked to the net_device during device probing. This struct must be deleted when removing the qeth device, otherwise Panic on oops can occur when qeth devices are repeatedly removed and added.
--- drivers/s390/net/qeth_l2_main.c | 1 + drivers/s390/net/qeth_l3_main.c | 1 + 2 files changed, 2 insertions(+)
drivers/s390/net/qeth_l2_main.c +1 -0
@@ -1051,6 +1051,7 @@ static void qeth_l2_remove_device(structqeth_l2_set_offline (cgdev);if (card->dev) { +netif_napi_del (&card->napi);unregister_netdev (card->dev); card->dev =NULL ; }
drivers/s390/net/qeth_l3_main.c +1 -0
@@ -3246,6 +3246,7 @@ static void qeth_l3_remove_device(structqeth_l3_set_offline (cgdev);if (card->dev) { +netif_napi_del (&card->napi);unregister_netdev (card->dev); card->dev =NULL ; }
Greg Kroah-Hartman
maintainerPATCH 47/68 block: fix use-after-free in sys_ioprio_get()
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Omar Sandoval <[email protected]>
commit 8ba8682107ee2ca3347354e018865d8e1967c5f4 upstream.
get_task_ioprio() accesses the task->io_context without holding the task lock and thus can race with exit_io_context(), leading to a use-after-free. The reproducer below hits this within a few seconds on my 4-core QEMU VM:
#define _GNU_SOURCE
#include <assert.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/wait.h>
int main(int argc, char **argv)
{
pid_t pid, child;
long nproc, i;
/* ioprio_set(IOPRIO_WHO_PROCESS, 0, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)); */
syscall(SYS_ioprio_set, 1, 0, 0x6000);
nproc = sysconf(_SC_NPROCESSORS_ONLN);
for (i = 0; i < nproc; i++) {
pid = fork();
assert(pid != -1);
if (pid == 0) {
for (;;) {
pid = fork();
assert(pid != -1);
if (pid == 0) {
_exit(0);
} else {
child = wait(NULL);
assert(child == pid);
}
}
}
pid = fork();
assert(pid != -1);
if (pid == 0) {
for (;;) {
/* ioprio_get(IOPRIO_WHO_PGRP, 0); */
syscall(SYS_ioprio_get, 2, 0);
}
}
}
for (;;) {
/* ioprio_get(IOPRIO_WHO_PGRP, 0); */
syscall(SYS_ioprio_get, 2, 0);
}
return 0;
}This gets us KASAN dumps like this:
[ 35.526914] ================================================================== [ 35.530009] BUG: KASAN: out-of-bounds in get_task_ioprio+0x7b/0x90 at addr ffff880066f34e6c [ 35.530009] Read of size 2 by task ioprio-gpf/363 [ 35.530009] ============================================================================= [ 35.530009] BUG blkdev_ioc (Not tainted): kasan: bad access detected [ 35.530009] -----------------------------------------------------------------------------
[ 35.530009] Disabling lock debugging due to kernel taint [ 35.530009] INFO: Allocated in create_task_io_context+0x2b/0x370 age=0 cpu=0 pid=360 [ 35.530009] ___slab_alloc+0x55d/0x5a0 [ 35.530009] __slab_alloc.isra.20+0x2b/0x40 [ 35.530009] kmem_cache_alloc_node+0x84/0x200 [ 35.530009] create_task_io_context+0x2b/0x370 [ 35.530009] get_task_io_context+0x92/0xb0 [ 35.530009] copy_process.part.8+0x5029/0x5660 [ 35.530009] _do_fork+0x155/0x7e0 [ 35.530009] SyS_clone+0x19/0x20 [ 35.530009] do_syscall_64+0x195/0x3a0 [ 35.530009] return_from_SYSCALL_64+0x0/0x6a [ 35.530009] INFO: Freed in put_io_context+0xe7/0x120 age=0 cpu=0 pid=1060 [ 35.530009] __slab_free+0x27b/0x3d0 [ 35.530009] kmem_cache_free+0x1fb/0x220 [ 35.530009] put_io_context+0xe7/0x120 [ 35.530009] put_io_context_active+0x238/0x380 [ 35.530009] exit_io_context+0x66/0x80 [ 35.530009] do_exit+0x158e/0x2b90 [ 35.530009] do_group_exit+0xe5/0x2b0 [ 35.530009] SyS_exit_group+0x1d/0x20 [ 35.530009] entry_SYSCALL_64_fastpath+0x1a/0xa4 [ 35.530009] INFO: Slab 0xffffea00019bcd00 objects=20 used=4 fp=0xffff880066f34ff0 flags=0x1fffe0000004080 [ 35.530009] INFO: Object 0xffff880066f34e58 @offset=3672 fp=0x0000000000000001 [ 35.530009] ==================================================================
Fix it by grabbing the task lock while we poke at the io_context.
--- block/ioprio.c | 2 ++ 1 file changed, 2 insertions(+)
block/ioprio.c +2 -0
@@ -150,8 +150,10 @@ static int get_task_ioprio(struct task_sif (ret) goto out; ret =IOPRIO_PRIO_VALUE (IOPRIO_CLASS_NONE ,IOPRIO_NORM ); +task_lock (p);if (p->io_context) ret = p->io_context->ioprio; +task_unlock (p); out:return ret; }
Greg Kroah-Hartman
maintainerPATCH 48/68 mmc: block: fix packed command header endianness
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taras Kondratiuk <[email protected]>
commit f68381a70bb2b26c31b13fdaf67c778f92fd32b4 upstream.
The code that fills packed command header assumes that CPU runs in little-endian mode. Hence the header is malformed in big-endian mode and causes MMC data transfer errors:
[ 563.200828] mmcblk0: error -110 transferring data, sector 2048, nr 8, cmd response 0x900, card status 0xc40 [ 563.219647] mmcblk0: packed cmd failed, nr 2, sectors 16, failure index: -1
Convert header data to LE.
--- drivers/mmc/card/block.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/mmc/card/block.c +6 -6
@@ -1767,8 +1767,8 @@ static void mmc_blk_packed_hdr_wrq_prep( packed_cmd_hdr = packed->cmd_hdr;memset (packed_cmd_hdr,0 ,sizeof (packed->cmd_hdr)); - packed_cmd_hdr[0 ] = (packed->nr_entries <<16 ) | - (PACKED_CMD_WR <<8 ) |PACKED_CMD_VER ; + packed_cmd_hdr[0 ] =cpu_to_le32 ((packed->nr_entries <<16 ) | + (PACKED_CMD_WR <<8 ) |PACKED_CMD_VER ); hdr_blocks =mmc_large_sector (card) ?8 :1 ;/*
@@ -1782,14 +1782,14 @@ static void mmc_blk_packed_hdr_wrq_prep( ((brq->data.blocks * brq->data.blksz) >= card->ext_csd.data_tag_unit_size);/* Argument of CMD23 */ - packed_cmd_hdr[(i *2 )] = + packed_cmd_hdr[(i *2 )] =cpu_to_le32 ( (do_rel_wr ?MMC_CMD23_ARG_REL_WR :0 ) | (do_data_tag ?MMC_CMD23_ARG_TAG_REQ :0 ) | -blk_rq_sectors (prq); +blk_rq_sectors (prq));/* Argument of CMD18 or CMD25 */ - packed_cmd_hdr[((i *2 )) +1 ] = + packed_cmd_hdr[((i *2 )) +1 ] =cpu_to_le32 (mmc_card_blockaddr (card) ? -blk_rq_pos (prq) :blk_rq_pos (prq) <<9 ; +blk_rq_pos (prq) :blk_rq_pos (prq) <<9 ); packed->blocks +=blk_rq_sectors (prq); i++; }
Greg Kroah-Hartman
maintainerPATCH 49/68 sched/fair: Fix effective_load() to consistently use smoothed load
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Peter Zijlstra <[email protected]>
commit 7dd4912594daf769a46744848b05bd5bc6d62469 upstream.
Starting with the following commit:
fde7d22e01aa ("sched/fair: Fix overly small weight for interactive group entities")
calc_tg_weight() doesn't compute the right value as expected by effective_load().
The difference is in the 'correction' term. In order to ensure \Sum rw_j >= rw_i we cannot use tg->load_avg directly, since that might be lagging a correction on the current cfs_rq->avg.load_avg value. Therefore we use tg->load_avg - cfs_rq->tg_load_avg_contrib + cfs_rq->avg.load_avg.
Now, per the referenced commit, calc_tg_weight() doesn't use cfs_rq->avg.load_avg, as is later used in @w, but uses cfs_rq->load.weight instead.
So stop using calc_tg_weight() and do it explicitly.
The effects of this bug are wake_affine() making randomly poor choices in cgroup-intense workloads.
--- kernel/sched/fair.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
kernel/sched/fair.c +9 -6
@@ -687,8 +687,6 @@ void init_entity_runnable_average(struct /* when this task enqueue'ed, it will contribute to its cfs_rq's load_avg */ } -static inline unsigned long cfs_rq_runnable_load_avg (struct cfs_rq *cfs_rq); -static inline unsigned long cfs_rq_load_avg (struct cfs_rq *cfs_rq);#else void init_entity_runnable_average (struct sched_entity *se) {
@@ -4594,19 +4592,24 @@ static long effective_load(struct task_greturn wl;for_each_sched_entity (se) { -long w,W ; +struct cfs_rq *cfs_rq = se->my_q; +long W , w =cfs_rq_load_avg (cfs_rq); - tg = se->my_q->tg; + tg = cfs_rq->tg;/* * W = @wg + \Sum rw_j */ -W = wg +calc_tg_weight (tg, se->my_q); +W = wg +atomic_long_read (&tg->load_avg); + +/* Ensure \Sum rw_j >= rw_i */ +W -= cfs_rq->tg_load_avg_contrib; +W += w;/* * w = rw_i + @wl */ - w =cfs_rq_load_avg (se->my_q) + wl; + w += wl;/* * wl = S * s'_i; see (2)
Greg Kroah-Hartman
maintainerPATCH 50/68 ovl: handle ATTR_KILL*
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit b99c2d913810e56682a538c9f2394d76fca808f8 upstream.
Before 4bacc9c9234c ("overlayfs: Make f_path...") file->f_path pointed to the underlying file, hence suid/sgid removal on write worked fine.
After that patch file->f_path pointed to the overlay file, and the file mode bits weren't copied to overlay_inode->i_mode. So the suid/sgid removal simply stopped working.
The fix is to copy the mode bits, but then ovl_setattr() needs to clear ATTR_MODE to avoid the BUG() in notify_change(). So do this first, then in the next patch copy the mode.
--- fs/overlayfs/inode.c | 3 +++ 1 file changed, 3 insertions(+)
fs/overlayfs/inode.c +3 -0
@@ -63,6 +63,9 @@ int ovl_setattr(struct dentry *dentry, sif (!err) { upperdentry =ovl_dentry_upper (dentry); +if (attr->ia_valid & (ATTR_KILL_SUID |ATTR_KILL_SGID )) + attr->ia_valid &= ~ATTR_MODE ; +mutex_lock (&upperdentry->d_inode->i_mutex); err =notify_change (upperdentry, attr,NULL );if (!err)
Greg Kroah-Hartman
maintainerPATCH 51/68 perf/x86: fix PEBS issues on Intel Atom/Core2
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stephane Eranian <[email protected]>
commit 1424a09a9e1839285e948d4ea9fdfca26c9a2086 upstream.
This patch fixes broken PEBS support on Intel Atom and Core2 due to wrong pointer arithmetic in intel_pmu_drain_pebs_core().
The get_next_pebs_record_by_bit() was called on PEBS format fmt0 which does not use the pebs_record_nhm layout.
--- arch/x86/kernel/cpu/perf_event_intel_ds.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event_intel_ds.c +8 -1
@@ -1110,6 +1110,13 @@ get_next_pebs_record_by_bit(void *base,void *at;u64 pebs_status; +/* +* fmt0 does not have a status bitfield (does not use +* perf_record_nhm format) +*/ +if (x86_pmu.intel_cap.pebs_format <1 ) +return base; +if (base ==NULL )return NULL ;
@@ -1195,7 +1202,7 @@ static void intel_pmu_drain_pebs_core(stif (!event->attr.precise_ip)return ; - n = (top - at) / x86_pmu.pebs_record_size; + n = top - at;if (n <=0 )return ;
Greg Kroah-Hartman
maintainerPATCH 52/68 can: at91_can: RX queue could get stuck at high bus load
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wolfgang Grandegger <[email protected]>
commit 43200a4480cbbe660309621817f54cbb93907108 upstream.
At high bus load it could happen that "at91_poll()" enters with all RX message boxes filled up. If then at the end the "quota" is exceeded as well, "rx_next" will not be reset to the first RX mailbox and hence the interrupts remain disabled.
--- drivers/net/can/at91_can.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/can/at91_can.c +3 -2
@@ -712,9 +712,10 @@ static int at91_poll_rx(struct net_devic/* upper group completed, look again in lower */ if (priv->rx_next >get_mb_rx_low_last (priv) && - quota >0 && mb >get_mb_rx_last (priv)) { + mb >get_mb_rx_last (priv)) { priv->rx_next =get_mb_rx_first (priv); - goto again; +if (quota >0 ) + goto again; }return received;
Greg Kroah-Hartman
maintainerPATCH 53/68 can: c_can: Update D_CAN TX and RX functions to 32 bit - fix Altera Cyclone access
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thor Thayer <[email protected]>
commit 427460c83cdf55069eee49799a0caef7dde8df69 upstream.
When testing CAN write floods on Altera's CycloneV, the first 2 bytes are sometimes 0x00, 0x00 or corrupted instead of the values sent. Also observed bytes 4 & 5 were corrupted in some cases.
The D_CAN Data registers are 32 bits and changing from 16 bit writes to 32 bit writes fixes the problem.
Testing performed on Altera CycloneV (D_CAN). Requesting tests on other C_CAN & D_CAN platforms.
--- drivers/net/can/c_can/c_can.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-)
drivers/net/can/c_can/c_can.c +31 -7
@@ -332,9 +332,23 @@ static void c_can_setup_tx_object(struct priv->write_reg (priv,C_CAN_IFACE (MSGCTRL_REG , iface), ctrl); -for (i =0 ; i < frame->can_dlc; i +=2 ) { - priv->write_reg (priv,C_CAN_IFACE (DATA1_REG , iface) + i /2 , - frame->data[i] | (frame->data[i +1 ] <<8 )); +if (priv->type ==BOSCH_D_CAN ) { +u32 data =0 , dreg =C_CAN_IFACE (DATA1_REG , iface); + +for (i =0 ; i < frame->can_dlc; i +=4 , dreg +=2 ) { + data = (u32 )frame->data[i]; + data |= (u32 )frame->data[i +1 ] <<8 ; + data |= (u32 )frame->data[i +2 ] <<16 ; + data |= (u32 )frame->data[i +3 ] <<24 ; + priv->write_reg32 (priv, dreg, data); + } + }else { +for (i =0 ; i < frame->can_dlc; i +=2 ) { + priv->write_reg (priv, +C_CAN_IFACE (DATA1_REG , iface) + i /2 , + frame->data[i] | + (frame->data[i +1 ] <<8 )); + } } }
@@ -402,10 +416,20 @@ static int c_can_read_msg_object(struct }else {int i, dreg =C_CAN_IFACE (DATA1_REG , iface); -for (i =0 ; i < frame->can_dlc; i +=2 , dreg ++) { - data = priv->read_reg (priv, dreg); - frame->data[i] = data; - frame->data[i +1 ] = data >>8 ; +if (priv->type ==BOSCH_D_CAN ) { +for (i =0 ; i < frame->can_dlc; i +=4 , dreg +=2 ) { + data = priv->read_reg32 (priv, dreg); + frame->data[i] = data; + frame->data[i +1 ] = data >>8 ; + frame->data[i +2 ] = data >>16 ; + frame->data[i +3 ] = data >>24 ; + } + }else { +for (i =0 ; i < frame->can_dlc; i +=2 , dreg++) { + data = priv->read_reg (priv, dreg); + frame->data[i] = data; + frame->data[i +1 ] = data >>8 ; + } } }
Greg Kroah-Hartman
maintainerPATCH 54/68 can: fix handling of unmodifiable configuration options fix
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Hartkopp <[email protected]>
commit bce271f255dae8335dc4d2ee2c4531e09cc67f5a upstream.
With upstream commit bb208f144cf3f59 (can: fix handling of unmodifiable configuration options) a new can_validate() function was introduced.
When invoking 'ip link set can0 type can' without any configuration data can_validate() tries to validate the content without taking into account that there's totally no content. This patch adds a check for missing content.
--- drivers/net/can/dev.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/can/dev.c +3 -0
@@ -798,6 +798,9 @@ static int can_validate(struct nlattr *t* - control mode with CAN_CTRLMODE_FD set */ +if (!data) +return 0 ; +if (data[IFLA_CAN_CTRLMODE ]) {struct can_ctrlmode *cm =nla_data (data[IFLA_CAN_CTRLMODE ]);
Greg Kroah-Hartman
maintainerPATCH 55/68 can: fix oops caused by wrong rtnl dellink usage
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Hartkopp <[email protected]>
commit 25e1ed6e64f52a692ba3191c4fde650aab3ecc07 upstream.
For 'real' hardware CAN devices the netlink interface is used to set CAN specific communication parameters. Real CAN hardware can not be created nor removed with the ip tool ...
This patch adds a private dellink function for the CAN device driver interface that does just nothing.
It's a follow up to commit 993e6f2fd ("can: fix oops caused by wrong rtnl newlink usage") but for dellink.
--- drivers/net/can/dev.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/can/dev.c +6 -0
@@ -1011,6 +1011,11 @@ static int can_newlink(struct net *src_nreturn -EOPNOTSUPP ; } +static void can_dellink (struct net_device *dev,struct list_head *head) +{ +return ; +} +static struct rtnl_link_ops can_link_ops__read_mostly = { .kind ="can" , .maxtype =IFLA_CAN_MAX ,
@@ -1019,6 +1024,7 @@ static struct rtnl_link_ops can_link_ops .validate = can_validate, .newlink = can_newlink, .changelink = can_changelink, + .dellink = can_dellink, .get_size = can_get_size, .fill_info = can_fill_info, .get_xstats_size = can_get_xstats_size,
Greg Kroah-Hartman
maintainerPATCH 56/68 RDS: fix rds_tcp_init() error path
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vegard Nossum <[email protected]>
commit 3dad5424adfb346c871847d467f97dcdca64ea97 upstream.
If register_pernet_subsys() fails, we shouldn't try to call unregister_pernet_subsys().
--- net/rds/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/rds/tcp.c +3 -2
@@ -421,7 +421,7 @@ static int rds_tcp_init(void) ret =rds_tcp_recv_init ();if (ret) - goto out_slab; + goto out_pernet; ret =rds_trans_register (&rds_tcp_transport);if (ret)
@@ -433,8 +433,9 @@ static int rds_tcp_init(void) out_recv:rds_tcp_recv_exit (); -out_slab: +out_pernet:unregister_pernet_subsys (&rds_tcp_net_ops); +out_slab:kmem_cache_destroy (rds_tcp_conn_slab); out:return ret;
Greg Kroah-Hartman
maintainerPATCH 57/68 SCSI: fix new bug in scsi_dev_info_list string matching
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alan Stern <[email protected]>
commit 5e7ff2ca7f2da55fe777167849d0c93403bd0dc8 upstream.
Commit b704f70ce200 ("SCSI: fix bug in scsi_dev_info_list matching") changed the way vendor- and model-string matching was carried out in the routine that looks up entries in a SCSI devinfo list. The new matching code failed to take into account the case of a maximum-length string; in such cases it could end up testing for a terminating '\0' byte beyond the end of the memory allocated to the string. This out-of-bounds bug was detected by UBSAN.
I don't know if anybody has actually encountered this bug. The symptom would be that a device entry in the blacklist might not be matched properly if it contained an 8-character vendor name or a 16-character model name. Such entries certainly exist in scsi_static_device_list.
This patch fixes the problem by adding a check for a maximum-length string before the '\0' test.
--- drivers/scsi/scsi_devinfo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/scsi/scsi_devinfo.c +6 -4
@@ -426,7 +426,7 @@ static struct scsi_dev_info_list *scsi_d* here, and we don't know what device it is * trying to work with, leave it as-is. */ - vmax =8 ;/* max length of vendor */ + vmax =sizeof (devinfo->vendor); vskip = vendor;while (vmax >0 && *vskip ==' ' ) { vmax--;
@@ -436,7 +436,7 @@ static struct scsi_dev_info_list *scsi_dwhile (vmax >0 && vskip[vmax -1 ] ==' ' ) --vmax; - mmax =16 ;/* max length of model */ + mmax =sizeof (devinfo->model); mskip = model;while (mmax >0 && *mskip ==' ' ) { mmax--;
@@ -452,10 +452,12 @@ static struct scsi_dev_info_list *scsi_d* Behave like the older version of get_device_flags. */ if (memcmp (devinfo->vendor, vskip, vmax) || - devinfo->vendor[vmax]) + (vmax <sizeof (devinfo->vendor) && + devinfo->vendor[vmax]))continue ;if (memcmp (devinfo->model, mskip, mmax) || - devinfo->model[mmax]) + (mmax <sizeof (devinfo->model) && + devinfo->model[mmax]))continue ;return devinfo; }else {
Greg Kroah-Hartman
maintainerPATCH 58/68 ipr: Clear interrupt on croc/crocodile when running with LSI
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Brian King <[email protected]>
commit 54e430bbd490e18ab116afa4cd90dcc45787b3df upstream.
If we fall back to using LSI on the Croc or Crocodile chip we need to clear the interrupt so we don't hang the system.
--- drivers/scsi/ipr.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/ipr.c +1 -0
@@ -10095,6 +10095,7 @@ static int ipr_probe_ioa(struct pci_dev ioa_cfg->intr_flag =IPR_USE_MSI ; else { ioa_cfg->intr_flag =IPR_USE_LSI ; + ioa_cfg->clear_isr =1 ; ioa_cfg->nvectors =1 ;dev_info (&pdev->dev,"Cannot enable MSI.\n" ); }
Greg Kroah-Hartman
maintainerPATCH 59/68 media: fix airspy usb probe error path
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: James Patrick-Evans <[email protected]>
commit aa93d1fee85c890a34f2510a310e55ee76a27848 upstream.
Fix a memory leak on probe error of the airspy usb device driver.
The problem is triggered when more than 64 usb devices register with v4l2 of type VFL_TYPE_SDR or VFL_TYPE_SUBDEV.
The memory leak is caused by the probe function of the airspy driver mishandeling errors and not freeing the corresponding control structures when an error occours registering the device to v4l2 core.
A badusb device can emulate 64 of these devices, and then through continual emulated connect/disconnect of the 65th device, cause the kernel to run out of RAM and crash the kernel, thus causing a local DOS vulnerability.
Fixes CVE-2016-5400
--- drivers/media/usb/airspy/airspy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/airspy/airspy.c +1 -2
@@ -1073,7 +1073,7 @@ static int airspy_probe(struct usb_interif (ret) {dev_err (s->dev,"Failed to register as video device (%d)\n" , ret); - goto err_unregister_v4l2_dev; + goto err_free_controls; }dev_info (s->dev,"Registered as %s\n" ,video_device_node_name (&s->vdev));
@@ -1082,7 +1082,6 @@ static int airspy_probe(struct usb_inter err_free_controls:v4l2_ctrl_handler_free (&s->hdl); -err_unregister_v4l2_dev:v4l2_device_unregister (&s->v4l2_dev); err_free_mem:kfree (s);
Greg Kroah-Hartman
maintainerPATCH 60/68 posix_cpu_timer: Exit early when process has been reaped
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Dobriyan <[email protected]>
commit 2c13ce8f6b2f6fd9ba2f9261b1939fc0f62d1307 upstream.
Variable "now" seems to be genuinely used unintialized if branch
if (CPUCLOCK_PERTHREAD(timer->it_clock)) {is not taken and branch
if (unlikely(sighand == NULL)) {is taken. In this case the process has been reaped and the timer is marked as disarmed anyway. So none of the postprocessing of the sample is required. Return right away.
--- kernel/time/posix-cpu-timers.c | 1 + 1 file changed, 1 insertion(+)
kernel/time/posix-cpu-timers.c +1 -0
@@ -808,6 +808,7 @@ static void posix_cpu_timer_get(struct k timer->it.cpu.expires =0 ;sample_to_timespec (timer->it_clock, timer->it.cpu.expires, &itp->it_value); +return ; }else {cpu_timer_sample_group (timer->it_clock, p, &now);unlock_task_sighand (p, &flags);
Greg Kroah-Hartman
maintainerPATCH 61/68 i2c: qup: Fix wrong value of index variable
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sricharan R <[email protected]>
commit d4f56c7773483b8829e89cfc739b7a5a071f6da0 upstream.
index gets incremented during check to determine if the messages can be transferred with dma. But not reset after that, resulting in wrong start value in subsequent loop, causing failure. Fix it.
--- drivers/i2c/busses/i2c-qup.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/i2c/busses/i2c-qup.c +2 -0
@@ -435,6 +435,8 @@ static int qup_i2c_read_one(struct qup_iif (ret) goto err; + idx =0 ; + do { left = wait_for_completion_timeout(&qup->xfer, HZ); if (!left) {
Greg Kroah-Hartman
maintainerPATCH 62/68 i2c: mux: reg: wrong condition checked for of_address_to_resource return value
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lukasz Gemborowski <[email protected]>
commit 22ebf00eb56fe77922de8138aa9af9996582c2b3 upstream.
of_address_to_resource return 0 on successful call but devm_ioremap_resource is called only if it returns non-zero value
--- drivers/i2c/muxes/i2c-mux-reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/muxes/i2c-mux-reg.c +1 -1
@@ -150,7 +150,7 @@ static int i2c_mux_reg_probe_dt(struct r mux->data.idle_in_use = true;/* map address from "reg" if exists */ -if (of_address_to_resource (np,0 , &res)) { +if (of_address_to_resource (np,0 , &res) ==0 ) { mux->data.reg_size =resource_size (&res); mux->data.reg =devm_ioremap_resource (&pdev->dev, &res);if (IS_ERR (mux->data.reg))
Greg Kroah-Hartman
maintainerPATCH 63/68 libata: LITE-ON CX1-JB256-HP needs lower max_sectors
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Tejun Heo <[email protected]>
commit 1488a1e3828d60d74c9b802a05e24c0487babe4e upstream.
Since 34b48db66e08 ("block: remove artifical max_hw_sectors cap"), max_sectors is no longer limited to BLK_DEF_MAX_SECTORS and LITE-ON CX1-JB256-HP keeps timing out with higher max_sectors. Revert it to the previous value.
--- drivers/ata/libata-core.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/ata/libata-core.c +6 -0
@@ -4138,6 +4138,12 @@ static const struct ata_blacklist_entry*/ { "ST380013AS", "3.20", ATA_HORKAGE_MAX_SEC_1024 }, +/* +* Device times out with higher max sects. +* https://bugzilla.kernel.org/show_bug.cgi?id=121671 +*/ + { "LITEON CX1-JB256-HP", NULL, ATA_HORKAGE_MAX_SEC_1024 }, +/* Devices we expect to fail diagnostics */ /* Devices where NCQ should be avoided */
Greg Kroah-Hartman
maintainerPATCH 64/68 libceph: apply new_state before new_up_client on incrementals
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilya Dryomov <[email protected]>
commit 930c532869774ebf8af9efe9484c597f896a7d46 upstream.
Currently, osd_weight and osd_state fields are updated in the encoding order. This is wrong, because an incremental map may look like e.g.
new_up_client: { osd=6, addr=... } # set osd_state and addr
new_state: { osd=6, xorstate=EXISTS } # clear osd_state
Suppose osd6's current osd_state is EXISTS (i.e. osd6 is down). After applying new_up_client, osd_state is changed to EXISTS | UP. Carrying on with the new_state update, we flip EXISTS and leave osd6 in a weird "!EXISTS but UP" state. A non-existent OSD is considered down by the mapping code
2087 for (i = 0; i < pg->pg_temp.len; i++) {
2088 if (ceph_osd_is_down(osdmap, pg->pg_temp.osds[i])) {
2089 if (ceph_can_shift_osds(pi))
2090 continue;
2091
2092 temp->osds[temp->size++] = CRUSH_ITEM_NONE;
and so requests get directed to the second OSD in the set instead of the first, resulting in OSD-side errors like:
[WRN] : client.4239 192.168.122.21:0/2444980242 misdirected client.4239.1:2827 pg 2.5df899f2 to osd.4 not [1,4,6] in e680/680
and hung rbds on the client:
[ 493.566367] rbd: rbd0: write 400000 at 11cc00000 (0) [ 493.566805] rbd: rbd0: result -6 xferred 400000 [ 493.567011] blk_update_request: I/O error, dev rbd0, sector 9330688
The fix is to decouple application from the decoding and:
- apply new_weight first
- apply new_state before new_up_client
- twiddle osd_state flags if marking in
- clear out some of the state if osd is destroyed
--- net/ceph/osdmap.c | 156 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 113 insertions(+), 43 deletions(-)
net/ceph/osdmap.c +113 -43
@@ -1192,6 +1192,115 @@ struct ceph_osdmap *ceph_osdmap_decode(v }/* +* Encoding order is (new_up_client, new_state, new_weight). Need to +* apply in the (new_weight, new_state, new_up_client) order, because +* an incremental map may look like e.g. +* +* new_up_client: { osd=6, addr=... } # set osd_state and addr +* new_state: { osd=6, xorstate=EXISTS } # clear osd_state +*/ +static int decode_new_up_state_weight (void **p,void *end, +struct ceph_osdmap *map) +{ +void *new_up_client; +void *new_state; +void *new_weight_end; +u32 len; + + new_up_client = *p; +ceph_decode_32_safe (p, end, len, e_inval); + len *=sizeof (u32) +sizeof (struct ceph_entity_addr ); +ceph_decode_need (p, end, len, e_inval); + *p += len; + + new_state = *p; +ceph_decode_32_safe (p, end, len, e_inval); + len *=sizeof (u32) +sizeof (u8); +ceph_decode_need (p, end, len, e_inval); + *p += len; + +/* new_weight */ +ceph_decode_32_safe (p, end, len, e_inval); +while (len--) { +s32 osd; +u32 w; + +ceph_decode_need (p, end,2 *sizeof (u32), e_inval); + osd =ceph_decode_32 (p); + w =ceph_decode_32 (p); +BUG_ON (osd >= map->max_osd); +pr_info ("osd%d weight 0x%x %s\n" , osd, w, + w ==CEPH_OSD_IN ?"(in)" : + (w ==CEPH_OSD_OUT ?"(out)" :"" )); + map->osd_weight[osd] = w; + +/* +* If we are marking in, set the EXISTS, and clear the +* AUTOOUT and NEW bits. +*/ +if (w) { + map->osd_state[osd] |=CEPH_OSD_EXISTS ; + map->osd_state[osd] &= ~(CEPH_OSD_AUTOOUT | +CEPH_OSD_NEW ); + } + } + new_weight_end = *p; + +/* new_state (up/down) */ + *p = new_state; + len =ceph_decode_32 (p); +while (len--) { +s32 osd; +u8 xorstate; +int ret; + + osd =ceph_decode_32 (p); + xorstate =ceph_decode_8 (p); +if (xorstate ==0 ) + xorstate =CEPH_OSD_UP ; +BUG_ON (osd >= map->max_osd); +if ((map->osd_state[osd] &CEPH_OSD_UP ) && + (xorstate &CEPH_OSD_UP )) +pr_info ("osd%d down\n" , osd); +if ((map->osd_state[osd] &CEPH_OSD_EXISTS ) && + (xorstate &CEPH_OSD_EXISTS )) { +pr_info ("osd%d does not exist\n" , osd); + map->osd_weight[osd] =CEPH_OSD_IN ; + ret =set_primary_affinity (map, osd, +CEPH_OSD_DEFAULT_PRIMARY_AFFINITY ); +if (ret) +return ret; +memset (map->osd_addr + osd,0 ,sizeof (*map->osd_addr)); + map->osd_state[osd] =0 ; + }else { + map->osd_state[osd] ^= xorstate; + } + } + +/* new_up_client */ + *p = new_up_client; + len =ceph_decode_32 (p); +while (len--) { +s32 osd; +struct ceph_entity_addr addr; + + osd =ceph_decode_32 (p); +ceph_decode_copy (p, &addr,sizeof (addr)); +ceph_decode_addr (&addr); +BUG_ON (osd >= map->max_osd); +pr_info ("osd%d up\n" , osd); + map->osd_state[osd] |=CEPH_OSD_EXISTS |CEPH_OSD_UP ; + map->osd_addr[osd] = addr; + } + + *p = new_weight_end; +return 0 ; + +e_inval: +return -EINVAL ; +} + +/* * decode and apply an incremental map update. */ struct ceph_osdmap *osdmap_apply_incremental(void **p, void *end,
@@ -1290,49 +1399,10 @@ struct ceph_osdmap *osdmap_apply_increme__remove_pg_pool (&map->pg_pools, pi); } -/* new_up */ -ceph_decode_32_safe (p, end, len, e_inval); -while (len--) { -u32 osd; -struct ceph_entity_addr addr; -ceph_decode_32_safe (p, end, osd, e_inval); -ceph_decode_copy_safe (p, end, &addr,sizeof (addr), e_inval); -ceph_decode_addr (&addr); -pr_info ("osd%d up\n" , osd); -BUG_ON (osd >= map->max_osd); - map->osd_state[osd] |=CEPH_OSD_UP |CEPH_OSD_EXISTS ; - map->osd_addr[osd] = addr; - } - -/* new_state */ -ceph_decode_32_safe (p, end, len, e_inval); -while (len--) { -u32 osd; -u8 xorstate; -ceph_decode_32_safe (p, end, osd, e_inval); - xorstate = **(u8 **)p; - (*p)++;/* clean flag */ -if (xorstate ==0 ) - xorstate =CEPH_OSD_UP ; -if (xorstate &CEPH_OSD_UP ) -pr_info ("osd%d down\n" , osd); -if (osd < map->max_osd) - map->osd_state[osd] ^= xorstate; - } - -/* new_weight */ -ceph_decode_32_safe (p, end, len, e_inval); -while (len--) { -u32 osd, off; -ceph_decode_need (p, end,sizeof (u32)*2 , e_inval); - osd =ceph_decode_32 (p); - off =ceph_decode_32 (p); -pr_info ("osd%d weight 0x%x %s\n" , osd, off, - off ==CEPH_OSD_IN ?"(in)" : - (off ==CEPH_OSD_OUT ?"(out)" :"" )); -if (osd < map->max_osd) - map->osd_weight[osd] = off; - } +/* new_up_client, new_state, new_weight */ + err =decode_new_up_state_weight (p, end, map); +if (err) + goto bad;/* new_pg_temp */ err =decode_new_pg_temp (p, end, map);
Greg Kroah-Hartman
maintainerPATCH 65/68 net: mvneta: set real interrupt per packet for tx_done
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitri Epshtein <[email protected]>
commit 06708f81528725148473c0869d6af5f809c6824b upstream.
Commit aebea2ba0f74 ("net: mvneta: fix Tx interrupt delay") intended to set coalescing threshold to a value guaranteeing interrupt generation per each sent packet, so that buffers can be released with no delay.
In fact setting threshold to '1' was wrong, because it causes interrupt every two packets. According to the documentation a reason behind it is following - interrupt occurs once sent buffers counter reaches a value, which is higher than one specified in MVNETA_TXQ_SIZE_REG(q). This behavior was confirmed during tests. Also when testing the SoC working as a NAS device, better performance was observed with int-per-packet, as it strongly depends on the fact that all transmitted packets are released immediately.
This commit enables NETA controller work in interrupt per sent packet mode by setting coalescing threshold to 0.
Fixes aebea2ba0f74 ("net: mvneta: fix Tx interrupt delay")
--- drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/mvneta.c +1 -1
@@ -226,7 +226,7 @@/* Various constants */ /* Coalescing */ -#define MVNETA_TXDONE_COAL_PKTS 1 +#define MVNETA_TXDONE_COAL_PKTS 0/* interrupt per packet */ #define MVNETA_RX_COAL_PKTS 32#define MVNETA_RX_COAL_USEC 100
Greg Kroah-Hartman
maintainerPATCH 66/68 intel_th: pci: Add Kaby Lake PCH-H support
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Shishkin <[email protected]>
commit 7a1a47ce35821b40f5b2ce46379ba14393bc3873 upstream.
This adds Intel(R) Trace Hub PCI ID for Kaby Lake PCH-H.
--- drivers/hwtracing/intel_th/pci.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/hwtracing/intel_th/pci.c +5 -0
@@ -67,6 +67,11 @@ static const struct pci_device_id intel_ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa126), .driver_data = (kernel_ulong_t)0, }, + { +/* Kaby Lake PCH-H */ + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa2a6), + .driver_data = (kernel_ulong_t )0 , + }, { 0 }, };
Greg Kroah-Hartman
maintainerPATCH 67/68 intel_th: Fix a deadlock in modprobing
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Alexander Shishkin <[email protected]>
commit a36aa80f3cb2540fb1dbad6240852de4365a2e82 upstream.
Driver initialization tries to request a hub (GTH) driver module from its probe callback, resulting in a deadlock.
This patch solves the problem by adding a deferred work for requesting the hub module.
--- drivers/hwtracing/intel_th/core.c | 35 +++++++++++++++++++++++++++++++++- drivers/hwtracing/intel_th/intel_th.h | 3 ++ 2 files changed, 37 insertions(+), 1 deletion(-)
drivers/hwtracing/intel_th/core.c +34 -1
@@ -419,6 +419,38 @@ static struct intel_th_subdevice { }, }; +#ifdef CONFIG_MODULES +static void __intel_th_request_hub_module (struct work_struct *work) +{ + struct intel_th *th = container_of(work, struct intel_th, + request_module_work); + +request_module ("intel_th_%s" , th->hub->name); +} + +static int intel_th_request_hub_module (struct intel_th *th) +{ +INIT_WORK (&th->request_module_work, __intel_th_request_hub_module); +schedule_work (&th->request_module_work); + +return 0 ; +} + +static void intel_th_request_hub_module_flush (struct intel_th *th) +{ +flush_work (&th->request_module_work); +} +#else +static inline int intel_th_request_hub_module (struct intel_th *th) +{ +return -EINVAL ; +} + +static inline void intel_th_request_hub_module_flush (struct intel_th *th) +{ +} +#endif /* CONFIG_MODULES */ +static int intel_th_populate (struct intel_th *th,struct resource *devres,unsigned int ndevres,int irq) {
@@ -488,7 +520,7 @@ static int intel_th_populate(struct inte/* need switch driver to be loaded to enumerate the rest */ if (subdev->type ==INTEL_TH_SWITCH && !req) { th->hub = thdev; - err =request_module ("intel_th_%s" , subdev->name); + err =intel_th_request_hub_module (th);if (!err) req++; }
@@ -603,6 +635,7 @@ void intel_th_free(struct intel_th *th) {int i; +intel_th_request_hub_module_flush (th);for (i =0 ; i <TH_SUBDEVICE_MAX ; i++)if (th->thdev[i] != th->hub)intel_th_device_remove (th->thdev[i]);
drivers/hwtracing/intel_th/intel_th.h +3 -0
@@ -197,6 +197,9 @@ struct intel_th {int id;int major; +#ifdef CONFIG_MODULES +struct work_struct request_module_work; +#endif /* CONFIG_MODULES */ #ifdef CONFIG_INTEL_TH_DEBUG struct dentry *dbg;#endif
Greg Kroah-Hartman
maintainerPATCH 68/68 vfs: fix deadlock in file_remove_privs() on overlayfs
In reply to Greg Kroah-Hartman4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <[email protected]>
commit c1892c37769cf89c7e7ba57528ae2ccb5d153c9b upstream.
file_remove_privs() is called with inode lock on file_inode(), which proceeds to calling notify_change() on file->f_path.dentry. Which triggers the WARN_ON_ONCE(!inode_is_locked(inode)) in addition to deadlocking later when ovl_setattr tries to lock the underlying inode again.
Fix this mess by not mixing the layers, but doing everything on underlying dentry/inode.
--- fs/inode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/inode.c +3 -3
@@ -1733,8 +1733,8 @@ static int __remove_privs(struct dentry*/ int file_remove_privs (struct file *file) { -struct dentry *dentry = file->f_path.dentry; -struct inode *inode =d_inode (dentry); +struct dentry *dentry =file_dentry (file); +struct inode *inode =file_inode (file);int kill;int error =0 ;
@@ -1742,7 +1742,7 @@ int file_remove_privs(struct file *file)if (IS_NOSEC (inode))return 0 ; - kill =file_needs_remove_privs (file); + kill =dentry_needs_remove_privs (dentry);if (kill <0 )return kill;if (kill)
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.17 release. There are 68 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 Aug 10 18:01:56 UTC 2016. Anything received after that time might be too late.
Build results:
total: 148 pass: 146 fail: 2
Failed builds:
arm:allmodconfig
arm64:allmodconfig
Qemu test results:
total: 101 pass: 99 fail: 2
Failed tests:
arm64:smp:defconfig
arm64:nosmp:defconfig
Common build error:
drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_read_one':drivers/i2c/busses/i2c-qup.c:438:2: error: 'idx' undeclared
Culprit: ae5451257fc2 ("i2c: qup: Fix wrong value of index variable")
Guenter
Greg Kroah-Hartman
maintainerQuoted 22 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.17 release. There are 68 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 Aug 10 18:01:56 UTC 2016. Anything received after that time might be too late.
Build results:
total: 148 pass: 146 fail: 2Failed builds:
arm:allmodconfig
arm64:allmodconfigQemu test results:
total: 101 pass: 99 fail: 2Failed tests:
arm64:smp:defconfig
arm64:nosmp:defconfig
Quoted 6 lines
Common build error:
drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_read_one':drivers/i2c/busses/i2c-qup.c:438:2: error: 'idx' undeclaredCulprit:
ae5451257fc2("i2c: qup: Fix wrong value of index variable")
Ah, thanks, kbuild just caught this one as well. I've dropped it from the queue now.
thanks,
greg k-h
Quoted 25 lines · Greg Kroah-Hartman
Quoted 24 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.17 release. There are 68 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 Aug 10 18:01:56 UTC 2016. Anything received after that time might be too late.
Build results:
total: 148 pass: 146 fail: 2Failed builds:
arm:allmodconfig
arm64:allmodconfigQemu test results:
total: 101 pass: 99 fail: 2Failed tests:
arm64:smp:defconfig
arm64:nosmp:defconfigCommon build error:
Quoted 8 lines
Quoted 4 lines
drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_read_one':drivers/i2c/busses/i2c-qup.c:438:2: error: 'idx' undeclaredCulprit:
ae5451257fc2("i2c: qup: Fix wrong value of index variable")Ah, thanks, kbuild just caught this one as well. I've dropped it from the queue now.
Build and qemu tests are now clean.
Guenter
Greg Kroah-Hartman
maintainerQuoted 29 lines · Guenter Roeck
Quoted 28 lines · Greg Kroah-Hartman
Quoted 27 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.17 release. There are 68 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 Aug 10 18:01:56 UTC 2016. Anything received after that time might be too late.
Build results:
total: 148 pass: 146 fail: 2Failed builds:
arm:allmodconfig
arm64:allmodconfigQemu test results:
total: 101 pass: 99 fail: 2Failed tests:
arm64:smp:defconfig
arm64:nosmp:defconfigCommon build error:
drivers/i2c/busses/i2c-qup.c: In function 'qup_i2c_read_one':drivers/i2c/busses/i2c-qup.c:438:2: error: 'idx' undeclared
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
Culprit:
ae5451257fc2("i2c: qup: Fix wrong value of index variable")Ah, thanks, kbuild just caught this one as well. I've dropped it from the queue now.
Build and qemu tests are now clean.
Wonderful, thanks.
greg k-h
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.4.17 release. There are 68 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.
Quoted 10 lines
Responses should be made by Wed Aug 10 18:01:56 UTC 2016. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.4.17-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.4.y
and the diffstat can be found below.
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Signature · 5 lines
Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America(Silicon Valley) [email protected]