* [PATCH 3.2 00/94] 3.2.82-rc1 review
@ 2016-08-13 17:42 Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 35/94] Input: xpad - prevent spurious input from wired Xbox 360 controllers Ben Hutchings
` (93 more replies)
0 siblings, 94 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds, Guenter Roeck, akpm
This is the start of the stable review cycle for the 3.2.82 release.
There are 94 patches in this series, which will be posted as responses
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Tue Aug 16 00:00:00 UTC 2016.
Anything received after that time might be too late.
A combined patch relative to 3.2.81 will be posted as an additional
response to this. A shortlog and diffstat can be found below.
Ben.
-------------
Adrian Hunter (1):
mmc: mmc: Fix partition switch timeout for some eMMCs
[1c447116d017a98c90f8f71c8c5a611e0aa42178]
Al Viro (1):
fix d_walk()/non-delayed __d_free() race
[3d56c25e3bb0726a5c5e16fc2d9e38f8ed763085]
Alex Deucher (1):
drm/radeon: fix asic initialization for virtualized environments
[05082b8bbd1a0ffc74235449c4b8930a8c240f85]
Andrew F. Davis (1):
regmap: cache: Fix typo in cache_bypass parameter description
[267c85860308d36bc163c5573308cd024f659d7c]
Andrew Goodbody (2):
usb: musb: Ensure rx reinit occurs for shared_fifo endpoints
[f3eec0cf784e0d6c47822ca6b66df3d5812af7e6]
usb: musb: Stop bulk endpoint while queue is rotated
[7b2c17f829545df27a910e8d82e133c21c9a8c9c]
Andrey Grodzovsky (1):
xen/pciback: Fix conf_space read/write overlap check.
[02ef871ecac290919ea0c783d05da7eedeffc10e]
Andrey Ryabinin (1):
kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w
[57675cb976eff977aefb428e68e4e0236d48a9ff]
Arnd Bergmann (1):
gcov: disable tree-loop-im to reduce stack usage
[c87bf431448b404a6ef5fbabd74c0e3e42157a7f]
Bjorn Helgaas (2):
PCI: Supply CPU physical address (not bus address) to iomem_is_exclusive()
[ca620723d4ff9ea7ed484eab46264c3af871b9ae]
alpha/PCI: Call iomem_is_exclusive() for IORESOURCE_MEM, but not IORESOURCE_IO
[c20e128030caf0537d5e906753eac1c28fefdb75]
Borislav Petkov (1):
x86/amd_nb: Fix boot crash on non-AMD systems
[1ead852dd88779eda12cb09cc894a03d9abfe1ec]
Cameron Gutman (1):
Input: xpad - prevent spurious input from wired Xbox 360 controllers
[1ff5fa3c6732f08e01ae12f12286d4728c9e4d86]
Christophe JAILLET (1):
ALSA: echoaudio: Fix memory allocation
[9c6795a9b3cbb56a9fbfaf43909c5c22999ba317]
Chuck Lever (1):
sunrpc: Update RPCBIND_MAXNETIDLEN
[4b9c7f9db9a003f5c342184dc4401c1b7f2efb39]
Crestez Dan Leonard (1):
iio: Fix error handling in iio_trigger_attach_poll_func
[99543823357966ac938d9a310947e731b67338e6]
Dan Carpenter (3):
ACPI / sysfs: fix error code in get_status()
[f18ebc211e259d4f591e39e74b2aa2de226c9a1d]
KEYS: potential uninitialized variable
[38327424b40bcebe2de92d07312c89360ac9229a]
usb: f_fs: off by one bug in _ffs_func_bind()
[0015f9156092d07b3ec06d37d014328419d5832e]
Dmitry Torokhov (1):
Input: elantech - add more IC body types to the list
[226ba707744a51acb4244724e09caacb1d96aed9]
Duan Jiong (1):
etherdevice: introduce help function eth_zero_addr()
[6d57e9078e880a3dd232d579f42ac437a8f1ef7b]
Eric Dumazet (2):
bonding: prevent out of bound accesses
[f87fda00b6ed232a817c655b8d179b48bde8fdbe]
tcp: make challenge acks less predictable
[75ff39ccc1bd5d3c455b6822ab09e533c551f758]
Geert Uytterhoeven (1):
char: Drop bogus dependency of DEVPORT on !M68K
[309124e2648d668a0c23539c5078815660a4a850]
H. Peter Anvin (1):
x86, build: copy ldlinux.c32 to image.iso
[9c77679cadb118c0aa99e6f88533d91765a131ba]
Helge Deller (1):
parisc: Fix pagefault crash in unaligned __get_user() call
[8b78f260887df532da529f225c49195d18fef36b]
Honggang Li (1):
RDMA/cxgb3: device driver frees DMA memory with different size
[0de4cbb3dddca35ecd06b95918f38439c9c6401f]
Jan Beulich (1):
xenbus: don't BUG() on user mode induced condition
[0beef634b86a1350c31da5fcc2992f0d7c8a622b]
Jann Horn (1):
proc: prevent stacking filesystems on top
[e54ad7f1ee263ffa5a2de9c609d58dfa27b21cd9]
Jason Gunthorpe (1):
IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs
[8c5122e45a10a9262f872b53f151a592e870f905]
Jeff Mahoney (1):
ecryptfs: don't allow mmap when the lower fs doesn't support it
[f0fe970df3838c202ef6c07a4c2b36838ef0a88b]
Jerome Marchand (1):
cifs: dynamic allocation of ntlmssp blob
[b8da344b74c822e966c6d19d6b2321efe82c5d97]
Jiri Slaby (2):
base: make module_create_drivers_dir race-free
[7e1b1fc4dabd6ec8e28baa0708866e13fa93c9b3]
tty: vt, return error when con_startup fails
[6798df4c5fe0a7e6d2065cf79649a794e5ba7114]
Jonathan Cameron (1):
staging:iio: trigger fixes for repeat request of same trigger and allocation failure
[5dd72ecb0166498852705939163f375d693d37f3]
Joseph Salisbury (1):
ath5k: Change led pin configuration for compaq c700 laptop
[7b9bc799a445aea95f64f15e0083cb19b5789abe]
Joshua Kinard (1):
MIPS: Adjust set_pte() SMP fix to handle R10000_LLSC_WAR
[128639395b2ceacc6a56a0141d0261012bfe04d3]
Kangjie Lu (6):
ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
[cec8f96e49d9be372fdb0c3836dcf31ec71e457e]
ALSA: timer: Fix leak in events via snd_timer_user_ccallback
[9a47e9cff994f37f7f0dbd9ae23740d0f64f9fe6]
ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt
[e4ec8cc8039a7063e24204299b462bd1383184a5]
USB: usbfs: fix potential infoleak in devio
[681fef8380eb818c0b845fca5d2ab1dcbab114ee]
rds: fix an infoleak in rds_inc_info_copy
[4116def2337991b39919f3b448326e21c40e0dbb]
tipc: fix an infoleak in tipc_nl_compat_link_dump
[5d2be1422e02ccd697ccfcd45c85b4a26e6178e2]
Kirill A. Shutemov (1):
UBIFS: Implement ->migratepage()
[4ac1c17b2044a1b4b2fbed74451947e905fc2992]
Krzysztof Kozlowski (1):
crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks
[79152e8d085fd64484afd473ef6830b45518acba]
Lei Liu (2):
USB: serial: option: add even more ZTE device ids
[74d2a91aec97ab832790c9398d320413ad185321]
USB: serial: option: add more ZTE device ids
[f0d09463c59c2d764a6c6d492cbe6d2c77f27153]
Linus Walleij (1):
iio: accel: kxsd9: fix the usage of spi_w8r8()
[0c1f91b98552da49d9d8eed32b3132a58d2f4598]
Luis de Bethencourt (1):
staging: iio: accel: fix error check
[ef3149eb3ddb7f9125e11c90f8330e371b55cffd]
Luke Dashjr (1):
btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl
[4c63c2454eff996c5e27991221106eb511f7db38]
Manfred Schlaegl (1):
Input: pwm-beeper - fix - scheduling while atomic
[f49cf3b8b4c841457244c461c66186a719e13bcc]
Mans Rullgard (1):
ata: sata_dwc_460ex: remove incorrect locking
[55e610cdd28c0ad3dce0652030c0296d549673f3]
Marek Szyprowski (1):
crypto: s5p-sss - fix incorrect usage of scatterlists api
[d1497977fecb9acce05988d6322ad415ef93bb39]
Martin Willi (1):
mac80211_hwsim: Add missing check for HWSIM_ATTR_SIGNAL
[62397da50bb20a6b812c949ef465d7e69fe54bb6]
Masami Hiramatsu (1):
kprobes/x86: Clear TF bit in fault on single-stepping
[dcfc47248d3f7d28df6f531e6426b933de94370d]
Michael Ellerman (2):
powerpc/mm/hash64: Factor out hash preload psize check
[8bbc9b7b001eaab8abf7e9e24edf1bb285c8d825]
powerpc/mm/hash64: Fix subpage protection with 4K HPTE config
[aac55d7573c5d46ed9a62818d5d3e69dd2060105]
Miklos Szeredi (1):
fs: limit filesystem stacking depth
[69c433ed2ecd2d3264efd7afec4439524b319121]
Oleg Nesterov (1):
wait/ptrace: assume __WALL if the child is traced
[bf959931ddb88c4e4366e96dd22e68fa0db9527c]
Oliver Hartkopp (1):
can: fix oops caused by wrong rtnl dellink usage
[25e1ed6e64f52a692ba3191c4fde650aab3ecc07]
Olivier Sobrie (1):
Input: pwm-beeper - remove useless call to pwm_config()
[d1b12075ffa808dce33dd46b7ad035bebf8da215]
Pali Rohár (1):
hwmon: (dell-smm) Restrict fan control and serial number to CAP_SYS_ADMIN by default
[7613663cc186f8f3c50279390ddc60286758001c]
Paolo Bonzini (1):
KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS
[d14bdb553f9196169f003058ae1cdabe514470e6]
Paul Moore (1):
audit: fix a double fetch in audit_log_single_execve_arg()
[43761473c254b45883a64441dd0bc85a42f3645c]
Ping Cheng (1):
Input: wacom_w8001 - w8001_MAX_LENGTH should be 13
[12afb34400eb2b301f06b2aa3535497d14faee59]
Prarit Bhargava (2):
PCI: Disable all BAR sizing for devices with non-compliant BARs
[ad67b437f187ea818b2860524d10f878fadfdd99]
x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs
[da77b67195de1c65bef4908fa29967c4d0af2da2]
Prasun Maiti (1):
wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel
[3d5fdff46c4b2b9534fa2f9fc78e90a48e0ff724]
Raghava Aditya Renukunta (1):
aacraid: Fix for aac_command_thread hang
[fc4bf75ea300a5e62a2419f89dd0e22189dd7ab7]
Richard Weinberger (2):
mm: Export migrate_page_move_mapping and migrate_page_copy
[1118dce773d84f39ebd51a9fe7261f9169cb056e]
ubi: Make recover_peb power cut aware
[972228d87445dc46c0a01f5f3de673ac017626f7]
Ricky Liang (1):
Input: uinput - handle compat ioctl for UI_SET_PHYS
[affa80bd97f7ca282d1faa91667b3ee9e4c590e6]
Ross Lagerwall (1):
xen/events: Don't move disabled irqs
[f0f393877c71ad227d36705d61d1e4062bc29cf5]
Russell King (1):
ARM: fix PTRACE_SETVFPREGS on SMP systems
[e2dfb4b880146bfd4b6aa8e138c0205407cebbaf]
Scott Bauer (1):
HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands
[93a2001bdfd5376c3dc2158653034c20392d15c5]
Stefan Metzmacher (4):
fs/cifs: correctly to anonymous authentication for the LANMAN authentication
[fa8f3a354bb775ec586e4475bcb07f7dece97e0c]
fs/cifs: correctly to anonymous authentication for the NTLM(v1) authentication
[777f69b8d26bf35ade4a76b08f203c11e048365d]
fs/cifs: correctly to anonymous authentication for the NTLM(v2) authentication
[1a967d6c9b39c226be1b45f13acd4d8a5ab3dc44]
fs/cifs: correctly to anonymous authentication via NTLMSSP
[cfda35d98298131bf38fbad3ce4cd5ecb3cf18db]
Sven Eckelmann (1):
batman-adv: Fix use-after-free/double-free of tt_req_node
[9c4604a298e0a9807eaf2cd912d1ebf24d98fbeb]
Takashi Iwai (3):
ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift()
[62db7152c924e4c060e42b34a69cd39658e8a0dc]
ALSA: dummy: Fix a use-after-free at closing
[d5dbbe6569481bf12dcbe3e12cff72c5f78d272c]
ALSA: timer: Fix negative queue usage by racy accesses
[3fa6993fef634e05d200d141a85df0b044572364]
Tariq Toukan (1):
net/mlx4_core: Fix access to uninitialized index
[2bb07e155bb3e0c722c806723f737cf8020961ef]
Theodore Ts'o (1):
ext4: fix hang when processing corrupted orphaned inode list
[c9eb13a9105e2e418f72e46a2b6da3f49e696902]
Torsten Hilbrich (1):
fs/nilfs2: fix potential underflow in call to crc32_le
[63d2f95d63396059200c391ca87161897b99e74a]
Trond Myklebust (1):
NFS: Fix another OPEN_DOWNGRADE bug
[e547f2628327fec6afd2e03b46f113f614cca05b]
Ursula Braun (1):
qeth: delete napi struct when removing a qeth device
[7831b4ff0d926e0deeaabef9db8800ed069a2757]
Vik Heyndrickx (1):
sched/loadavg: Fix loadavg artifacts on fully idle and on fully loaded systems
[20878232c52329f92423d27a60e48b6a6389e0dd]
William Breathitt Gray (1):
isa: Call isa_bus_init before dependent ISA bus drivers register
[32a5a0c047343b11f581f663a2309cf43d13466f]
Wolfgang Grandegger (1):
can: at91_can: RX queue could get stuck at high bus load
[43200a4480cbbe660309621817f54cbb93907108]
Xiubo Li (1):
kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES
[caf1ff26e1aa178133df68ac3d40815fed2187d9]
Xypron.Glpk@Gmx.De (1):
net: ehea: avoid null pointer dereference
[1740c29a46b30a2f157afc473156f157e599d4c2]
Yishai Hadas (1):
IB/mlx4: Fix the SQ size of an RC QP
[f2940e2c76bb554a7fbdd28ca5b90904117a9e96]
Makefile | 6 +-
arch/alpha/kernel/pci-sysfs.c | 4 +-
arch/arm/kernel/ptrace.c | 2 +-
arch/mips/include/asm/pgtable.h | 45 ++--
arch/parisc/kernel/unaligned.c | 10 +-
arch/powerpc/mm/hash_utils_64.c | 29 ++-
arch/x86/boot/Makefile | 3 +
arch/x86/kernel/amd_nb.c | 4 +-
arch/x86/kernel/kprobes.c | 12 ++
arch/x86/kvm/x86.c | 5 +
arch/x86/pci/fixup.c | 7 +
drivers/acpi/sysfs.c | 7 +-
drivers/ata/sata_dwc_460ex.c | 4 +-
drivers/base/isa.c | 2 +-
drivers/base/module.c | 8 +-
drivers/base/regmap/regcache.c | 2 +-
drivers/char/Kconfig | 1 -
drivers/char/i8k.c | 18 +-
drivers/crypto/s5p-sss.c | 61 ++++--
drivers/gpu/drm/radeon/radeon_device.c | 21 ++
drivers/hid/usbhid/hiddev.c | 10 +-
drivers/infiniband/hw/cxgb3/cxio_hal.c | 2 +-
drivers/infiniband/hw/mlx4/ah.c | 2 +-
drivers/infiniband/hw/mlx4/qp.c | 2 +-
drivers/input/joystick/xpad.c | 4 +
drivers/input/misc/pwm-beeper.c | 70 ++++--
drivers/input/misc/uinput.c | 6 +
drivers/input/mouse/elantech.c | 8 +-
drivers/input/touchscreen/wacom_w8001.c | 2 +-
drivers/mmc/core/mmc.c | 7 +
drivers/mtd/ubi/eba.c | 19 +-
drivers/net/bonding/bond_3ad.c | 13 +-
drivers/net/bonding/bond_alb.c | 7 +-
drivers/net/bonding/bonding.h | 3 +
drivers/net/can/at91_can.c | 5 +-
drivers/net/can/dev.c | 6 +
drivers/net/ethernet/ibm/ehea/ehea_main.c | 9 +-
drivers/net/ethernet/mellanox/mlx4/mcg.c | 4 +-
drivers/net/wireless/ath/ath5k/led.c | 2 +-
drivers/net/wireless/mac80211_hwsim.c | 1 +
drivers/pci/pci-sysfs.c | 7 +-
drivers/pci/probe.c | 6 +-
drivers/s390/net/qeth_l2_main.c | 1 +
drivers/s390/net/qeth_l3_main.c | 1 +
drivers/scsi/aacraid/commsup.c | 4 +
drivers/staging/iio/accel/kxsd9.c | 4 +-
drivers/staging/iio/accel/sca3000_core.c | 2 +-
drivers/staging/iio/industrialio-trigger.c | 25 ++-
drivers/tty/vt/vt.c | 5 +-
drivers/usb/core/devio.c | 9 +-
drivers/usb/gadget/f_fs.c | 6 +-
drivers/usb/musb/musb_host.c | 21 +-
drivers/usb/serial/option.c | 129 ++++++++++-
drivers/xen/events.c | 6 +-
drivers/xen/xen-pciback/conf_space.c | 6 +-
drivers/xen/xenfs/xenbus.c | 14 +-
fs/btrfs/ctree.h | 1 +
fs/btrfs/file.c | 2 +-
fs/btrfs/inode.c | 2 +-
fs/btrfs/ioctl.c | 21 ++
fs/cifs/sess.c | 207 ++++++++++--------
fs/dcache.c | 5 +-
fs/ecryptfs/file.c | 15 +-
fs/ecryptfs/main.c | 7 +
fs/ext4/ialloc.c | 10 +-
fs/nfs/nfs4proc.c | 5 +-
fs/nilfs2/the_nilfs.c | 2 +-
fs/proc/root.c | 7 +
fs/ubifs/file.c | 24 +++
include/linux/etherdevice.h | 11 +
include/linux/fs.h | 11 +
include/linux/migrate.h | 3 +
include/linux/sunrpc/msg_prot.h | 4 +-
kernel/auditsc.c | 333 ++++++++++++++---------------
kernel/exit.c | 29 ++-
kernel/sched.c | 17 +-
mm/migrate.c | 4 +-
net/batman-adv/translation-table.c | 42 +++-
net/batman-adv/types.h | 1 +
net/ipv4/tcp_input.c | 17 +-
net/rds/recv.c | 2 +
net/tipc/node.c | 3 +-
net/wireless/wext-core.c | 25 ++-
security/keys/key.c | 2 +-
sound/core/timer.c | 5 +-
sound/drivers/dummy.c | 1 +
sound/pci/au88x0/au88x0_core.c | 5 +-
sound/pci/echoaudio/echoaudio.c | 4 +-
virt/kvm/assigned-dev.c | 2 +-
89 files changed, 1031 insertions(+), 477 deletions(-)
--
Ben Hutchings
Everything should be made as simple as possible, but not simpler.
- Albert Einstein
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 11/94] tty: vt, return error when con_startup fails
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (89 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 39/94] ARM: fix PTRACE_SETVFPREGS on SMP systems Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 76/94] ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift() Ben Hutchings
` (2 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Dan Carpenter, Jiri Slaby, Greg Kroah-Hartman
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Slaby <jslaby@suse.cz>
commit 6798df4c5fe0a7e6d2065cf79649a794e5ba7114 upstream.
When csw->con_startup() fails in do_register_con_driver, we return no
error (i.e. 0). This was changed back in 2006 by commit 3e795de763.
Before that we used to return -ENODEV.
So fix the return value to be -ENODEV in that case again.
Fixes: 3e795de763 ("VT binding: Add binding/unbinding support for the VT console")
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: "Dan Carpenter" <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/tty/vt/vt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3550,9 +3550,10 @@ static int do_register_con_driver(const
goto err;
desc = csw->con_startup();
-
- if (!desc)
+ if (!desc) {
+ retval = -ENODEV;
goto err;
+ }
retval = -EINVAL;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 63/94] can: fix oops caused by wrong rtnl dellink usage
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (82 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 81/94] qeth: delete napi struct when removing a qeth device Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 72/94] iio: accel: kxsd9: fix the usage of spi_w8r8() Ben Hutchings
` (9 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Marc Kleine-Budde, ajneu, Oliver Hartkopp
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Oliver Hartkopp <socketcan@hartkopp.net>
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.
Reported-by: ajneu <ajneu1@gmail.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/can/dev.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -730,6 +730,11 @@ static int can_newlink(struct net *src_n
return -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,
@@ -737,6 +742,7 @@ static struct rtnl_link_ops can_link_ops
.setup = can_setup,
.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,
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 15/94] MIPS: Adjust set_pte() SMP fix to handle R10000_LLSC_WAR
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (45 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 50/94] drm/radeon: fix asic initialization for virtualized environments Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 65/94] IB/mlx4: Fix the SQ size of an RC QP Ben Hutchings
` (46 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Ralf Baechle, David Daney, Joshua Kinard, Linux/MIPS
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Joshua Kinard <kumba@gentoo.org>
commit 128639395b2ceacc6a56a0141d0261012bfe04d3 upstream.
Update the recent changes to set_pte() that were added in 46011e6ea392
to handle R10000_LLSC_WAR, and format the assembly to match other areas
of the MIPS tree using the same WAR.
This also incorporates a patch recently sent in my Markos Chandras,
"Remove local LL/SC preprocessor variants", so that patch doesn't need
to be applied if this one is accepted.
Signed-off-by: Joshua Kinard <kumba@gentoo.org>
Fixes: 46011e6ea392 ("MIPS: Make set_pte() SMP safe.)
Cc: David Daney <david.daney@cavium.com>
Cc: Linux/MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/11103/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
[bwh: Backported to 3.2:
- Use {LL,SC}_INSN not __{LL,SC}
- Use literal arch=r4000 instead of MIPS_ISA_ARCH_LEVEL since R6 is not
supported]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/mips/include/asm/pgtable.h | 45 +++++++++++++++++++++++++++++------------
1 file changed, 32 insertions(+), 13 deletions(-)
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -168,20 +168,39 @@ static inline void set_pte(pte_t *ptep,
unsigned long page_global = _PAGE_GLOBAL;
unsigned long tmp;
- __asm__ __volatile__ (
- " .set push\n"
- " .set noreorder\n"
- "1: " LL_INSN " %[tmp], %[buddy]\n"
- " bnez %[tmp], 2f\n"
- " or %[tmp], %[tmp], %[global]\n"
- " " SC_INSN " %[tmp], %[buddy]\n"
- " beqz %[tmp], 1b\n"
- " nop\n"
- "2:\n"
- " .set pop"
- : [buddy] "+m" (buddy->pte),
- [tmp] "=&r" (tmp)
+ if (kernel_uses_llsc && R10000_LLSC_WAR) {
+ __asm__ __volatile__ (
+ " .set arch=r4000 \n"
+ " .set push \n"
+ " .set noreorder \n"
+ "1:" LL_INSN " %[tmp], %[buddy] \n"
+ " bnez %[tmp], 2f \n"
+ " or %[tmp], %[tmp], %[global] \n"
+ SC_INSN " %[tmp], %[buddy] \n"
+ " beqzl %[tmp], 1b \n"
+ " nop \n"
+ "2: \n"
+ " .set pop \n"
+ " .set mips0 \n"
+ : [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp)
: [global] "r" (page_global));
+ } else if (kernel_uses_llsc) {
+ __asm__ __volatile__ (
+ " .set arch=r4000 \n"
+ " .set push \n"
+ " .set noreorder \n"
+ "1:" LL_INSN " %[tmp], %[buddy] \n"
+ " bnez %[tmp], 2f \n"
+ " or %[tmp], %[tmp], %[global] \n"
+ SC_INSN " %[tmp], %[buddy] \n"
+ " beqz %[tmp], 1b \n"
+ " nop \n"
+ "2: \n"
+ " .set pop \n"
+ " .set mips0 \n"
+ : [buddy] "+m" (buddy->pte), [tmp] "=&r" (tmp)
+ : [global] "r" (page_global));
+ }
#else /* !CONFIG_SMP */
if (pte_none(*buddy))
pte_val(*buddy) = pte_val(*buddy) | _PAGE_GLOBAL;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 07/94] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (15 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 37/94] Input: pwm-beeper - fix - scheduling while atomic Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 36/94] Input: pwm-beeper - remove useless call to pwm_config() Ben Hutchings
` (76 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Josef Bacik, Luke Dashjr, David Sterba, Luke Dashjr
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Luke Dashjr <luke@dashjr.org>
commit 4c63c2454eff996c5e27991221106eb511f7db38 upstream.
32-bit ioctl uses these rather than the regular FS_IOC_* versions. They can
be handled in btrfs using the same code. Without this, 32-bit {ch,ls}attr
fail.
Signed-off-by: Luke Dashjr <luke-jr+git@utopios.org>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/btrfs/ctree.h | 1 +
fs/btrfs/file.c | 2 +-
fs/btrfs/inode.c | 2 +-
fs/btrfs/ioctl.c | 21 +++++++++++++++++++++
4 files changed, 24 insertions(+), 2 deletions(-)
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2749,6 +2749,7 @@ extern const struct dentry_operations bt
/* ioctl.c */
long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
+long btrfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
void btrfs_update_iflags(struct inode *inode);
void btrfs_inherit_iflags(struct inode *inode, struct inode *dir);
int btrfs_defrag_file(struct inode *inode, struct file *file,
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1895,6 +1895,6 @@ const struct file_operations btrfs_file_
.fallocate = btrfs_fallocate,
.unlocked_ioctl = btrfs_ioctl,
#ifdef CONFIG_COMPAT
- .compat_ioctl = btrfs_ioctl,
+ .compat_ioctl = btrfs_compat_ioctl,
#endif
};
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7475,7 +7475,7 @@ static const struct file_operations btrf
.readdir = btrfs_real_readdir,
.unlocked_ioctl = btrfs_ioctl,
#ifdef CONFIG_COMPAT
- .compat_ioctl = btrfs_ioctl,
+ .compat_ioctl = btrfs_compat_ioctl,
#endif
.release = btrfs_release_file,
.fsync = btrfs_sync_file,
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3260,3 +3260,24 @@ long btrfs_ioctl(struct file *file, unsi
return -ENOTTY;
}
+
+#ifdef CONFIG_COMPAT
+long btrfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+ switch (cmd) {
+ case FS_IOC32_GETFLAGS:
+ cmd = FS_IOC_GETFLAGS;
+ break;
+ case FS_IOC32_SETFLAGS:
+ cmd = FS_IOC_SETFLAGS;
+ break;
+ case FS_IOC32_GETVERSION:
+ cmd = FS_IOC_GETVERSION;
+ break;
+ default:
+ return -ENOIOCTLCMD;
+ }
+
+ return btrfs_ioctl(file, cmd, (unsigned long) compat_ptr(arg));
+}
+#endif
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 34/94] RDMA/cxgb3: device driver frees DMA memory with different size
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (20 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 05/94] alpha/PCI: Call iomem_is_exclusive() for IORESOURCE_MEM, but not IORESOURCE_IO Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 12/94] USB: serial: option: add more ZTE device ids Ben Hutchings
` (71 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Leon Romanovsky, Doug Ledford, Honggang Li, Steve Wise
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Honggang Li <honli@redhat.com>
commit 0de4cbb3dddca35ecd06b95918f38439c9c6401f upstream.
[ 598.852037] ------------[ cut here ]------------
[ 598.856698] WARNING: at lib/dma-debug.c:887 check_unmap+0xf8/0x920()
[ 598.863079] cxgb3 0000:01:00.0: DMA-API: device driver frees DMA memory with different size [device address=0x0000000003310000] [map size=17 bytes] [unmap size=16 bytes]
[ 598.878265] Modules linked in: xprtrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_sa ib_mad kvm_amd kvm ipmi_devintf ipmi_ssif dcdbas pcspkr ipmi_si sg ipmi_msghandler acpi_power_meter amd64_edac_mod shpchp edac_core sp5100_tco k10temp edac_mce_amd i2c_piix4 acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic crct10dif_common ata_generic iw_cxgb3 pata_acpi ib_core ib_addr mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit drm_kms_helper ttm pata_atiixp drm ahci libahci serio_raw i2c_core cxgb3 libata bnx2 mdio dm_mirror dm_region_hash dm_log dm_mod
[ 598.946822] CPU: 3 PID: 11820 Comm: cmtime Not tainted 3.10.0-327.el7.x86_64.debug #1
[ 598.954681] Hardware name: Dell Inc. PowerEdge R415/0GXH08, BIOS 2.0.2 10/22/2012
[ 598.962193] ffff8808077479a8 000000000381a432 ffff880807747960 ffffffff81700918
[ 598.969663] ffff880807747998 ffffffff8108b6c0 ffff880807747a80 ffff8808063f55c0
[ 598.977132] ffffffff833ca850 0000000000000282 ffff88080b1bb800 ffff880807747a00
[ 598.984602] Call Trace:
[ 598.987062] [<ffffffff81700918>] dump_stack+0x19/0x1b
[ 598.992224] [<ffffffff8108b6c0>] warn_slowpath_common+0x70/0xb0
[ 598.998254] [<ffffffff8108b75c>] warn_slowpath_fmt+0x5c/0x80
[ 599.004033] [<ffffffff813903b8>] check_unmap+0xf8/0x920
[ 599.009369] [<ffffffff81025959>] ? sched_clock+0x9/0x10
[ 599.014702] [<ffffffff81390cee>] debug_dma_free_coherent+0x7e/0xa0
[ 599.021008] [<ffffffffa01ece2c>] cxio_destroy_cq+0xcc/0x160 [iw_cxgb3]
[ 599.027654] [<ffffffffa01e8da0>] iwch_destroy_cq+0xf0/0x140 [iw_cxgb3]
[ 599.034307] [<ffffffffa01c4bfe>] ib_destroy_cq+0x1e/0x30 [ib_core]
[ 599.040601] [<ffffffffa04ff2d2>] ib_uverbs_close+0x302/0x4d0 [ib_uverbs]
[ 599.047417] [<ffffffff812335a2>] __fput+0x102/0x310
[ 599.052401] [<ffffffff8123388e>] ____fput+0xe/0x10
[ 599.057297] [<ffffffff810bbde4>] task_work_run+0xb4/0xe0
[ 599.062719] [<ffffffff81092a84>] do_exit+0x304/0xc60
[ 599.067789] [<ffffffff81025905>] ? native_sched_clock+0x35/0x80
[ 599.073820] [<ffffffff81025959>] ? sched_clock+0x9/0x10
[ 599.079153] [<ffffffff8170a49c>] ? _raw_spin_unlock_irq+0x2c/0x50
[ 599.085358] [<ffffffff8109346c>] do_group_exit+0x4c/0xc0
[ 599.090779] [<ffffffff810a8661>] get_signal_to_deliver+0x2e1/0x960
[ 599.097071] [<ffffffff8101c497>] do_signal+0x57/0x6e0
[ 599.102229] [<ffffffff81714bd1>] ? sysret_signal+0x5/0x4e
[ 599.107738] [<ffffffff8101cb7f>] do_notify_resume+0x5f/0xb0
[ 599.113418] [<ffffffff81714e7d>] int_signal+0x12/0x17
[ 599.118576] ---[ end trace 1e4653102e7e7019 ]---
[ 599.123211] Mapped at:
[ 599.125577] [<ffffffff8138ed8b>] debug_dma_alloc_coherent+0x2b/0x80
[ 599.131968] [<ffffffffa01ec862>] cxio_create_cq+0xf2/0x1f0 [iw_cxgb3]
[ 599.139920] [<ffffffffa01e9c05>] iwch_create_cq+0x105/0x4e0 [iw_cxgb3]
[ 599.147895] [<ffffffffa0500584>] create_cq.constprop.14+0x184/0x2e0 [ib_uverbs]
[ 599.156649] [<ffffffffa05027fb>] ib_uverbs_create_cq+0x10b/0x140 [ib_uverbs]
Fixes: b955150ea784 ('RDMA/cxgb3: When a user QP is marked in error, also mark the CQs in error')
Signed-off-by: Honggang Li <honli@redhat.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/infiniband/hw/cxgb3/cxio_hal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
+++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
@@ -327,7 +327,7 @@ int cxio_destroy_cq(struct cxio_rdev *rd
kfree(cq->sw_queue);
dma_free_coherent(&(rdev_p->rnic_info.pdev->dev),
(1UL << (cq->size_log2))
- * sizeof(struct t3_cqe), cq->queue,
+ * sizeof(struct t3_cqe) + 1, cq->queue,
dma_unmap_addr(cq, mapping));
cxio_hal_put_cqid(rdev_p->rscp, cq->cqid);
return err;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 74/94] NFS: Fix another OPEN_DOWNGRADE bug
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (91 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 76/94] ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 20:42 ` [PATCH 3.2 00/94] 3.2.82-rc1 review Guenter Roeck
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Anna Schumaker, Olga Kornievskaia, Trond Myklebust
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Trond Myklebust <trond.myklebust@primarydata.com>
commit e547f2628327fec6afd2e03b46f113f614cca05b upstream.
Olga Kornievskaia reports that the following test fails to trigger
an OPEN_DOWNGRADE on the wire, and only triggers the final CLOSE.
fd0 = open(foo, RDRW) -- should be open on the wire for "both"
fd1 = open(foo, RDONLY) -- should be open on the wire for "read"
close(fd0) -- should trigger an open_downgrade
read(fd1)
close(fd1)
The issue is that we're missing a check for whether or not the current
state transitioned from an O_RDWR state as opposed to having transitioned
from a combination of O_RDONLY and O_WRONLY.
Reported-by: Olga Kornievskaia <aglo@umich.edu>
Fixes: cd9288ffaea4 ("NFSv4: Fix another bug in the close/open_downgrade code")
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/nfs/nfs4proc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2025,12 +2025,11 @@ static void nfs4_close_prepare(struct rp
call_close |= is_wronly;
else if (is_wronly)
calldata->arg.fmode |= FMODE_WRITE;
+ if (calldata->arg.fmode != (FMODE_READ|FMODE_WRITE))
+ call_close |= is_rdwr;
} else if (is_rdwr)
calldata->arg.fmode |= FMODE_READ|FMODE_WRITE;
- if (calldata->arg.fmode == 0)
- call_close |= is_rdwr;
-
spin_unlock(&state->owner->so_lock);
if (!call_close) {
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 84/94] cifs: dynamic allocation of ntlmssp blob
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (18 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 73/94] ALSA: echoaudio: Fix memory allocation Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 05/94] alpha/PCI: Call iomem_is_exclusive() for IORESOURCE_MEM, but not IORESOURCE_IO Ben Hutchings
` (73 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Jerome Marchand, Steve French
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jerome Marchand <jmarchan@redhat.com>
commit b8da344b74c822e966c6d19d6b2321efe82c5d97 upstream.
In sess_auth_rawntlmssp_authenticate(), the ntlmssp blob is allocated
statically and its size is an "empirical" 5*sizeof(struct
_AUTHENTICATE_MESSAGE) (320B on x86_64). I don't know where this value
comes from or if it was ever appropriate, but it is currently
insufficient: the user and domain name in UTF16 could take 1kB by
themselves. Because of that, build_ntlmssp_auth_blob() might corrupt
memory (out-of-bounds write). The size of ntlmssp_blob in
SMB2_sess_setup() is too small too (sizeof(struct _NEGOTIATE_MESSAGE)
+ 500).
This patch allocates the blob dynamically in
build_ntlmssp_auth_blob().
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
[bwh: Backported to 3.2:
- Adjust context, indentation
- build_ntlmssp_auth_blob() is static
- Drop changes to smb2pdu.c
- Use cERROR() instead of cifs_dbg(VFS, ...)
- Use MAX_USERNAME_SIZE instead of CIFS_MAX_USERNAME_LEN]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -444,19 +444,43 @@ static void build_ntlmssp_negotiate_blob
sec_blob->DomainName.MaximumLength = 0;
}
-/* We do not malloc the blob, it is passed in pbuffer, because its
- maximum possible size is fixed and small, making this approach cleaner.
- This function returns the length of the data in the blob */
-static int build_ntlmssp_auth_blob(unsigned char *pbuffer,
+static int size_of_ntlmssp_blob(struct cifs_ses *ses)
+{
+ int sz = sizeof(AUTHENTICATE_MESSAGE) + ses->auth_key.len
+ - CIFS_SESS_KEY_SIZE + CIFS_CPHTXT_SIZE + 2;
+
+ if (ses->domainName)
+ sz += 2 * strnlen(ses->domainName, CIFS_MAX_DOMAINNAME_LEN);
+ else
+ sz += 2;
+
+ if (ses->user_name)
+ sz += 2 * strnlen(ses->user_name, MAX_USERNAME_SIZE);
+ else
+ sz += 2;
+
+ return sz;
+}
+
+static int build_ntlmssp_auth_blob(unsigned char **pbuffer,
u16 *buflen,
struct cifs_ses *ses,
const struct nls_table *nls_cp)
{
int rc;
- AUTHENTICATE_MESSAGE *sec_blob = (AUTHENTICATE_MESSAGE *)pbuffer;
+ AUTHENTICATE_MESSAGE *sec_blob;
__u32 flags;
unsigned char *tmp;
+ rc = setup_ntlmv2_rsp(ses, nls_cp);
+ if (rc) {
+ cERROR(1, "Error %d during NTLMSSP authentication", rc);
+ *buflen = 0;
+ goto setup_ntlmv2_ret;
+ }
+ *pbuffer = kmalloc(size_of_ntlmssp_blob(ses), GFP_KERNEL);
+ sec_blob = (AUTHENTICATE_MESSAGE *)*pbuffer;
+
memcpy(sec_blob->Signature, NTLMSSP_SIGNATURE, 8);
sec_blob->MessageType = NtLmAuthenticate;
@@ -471,7 +495,7 @@ static int build_ntlmssp_auth_blob(unsig
flags |= NTLMSSP_NEGOTIATE_KEY_XCH;
}
- tmp = pbuffer + sizeof(AUTHENTICATE_MESSAGE);
+ tmp = *pbuffer + sizeof(AUTHENTICATE_MESSAGE);
sec_blob->NegotiateFlags = cpu_to_le32(flags);
sec_blob->LmChallengeResponse.BufferOffset =
@@ -479,13 +503,9 @@ static int build_ntlmssp_auth_blob(unsig
sec_blob->LmChallengeResponse.Length = 0;
sec_blob->LmChallengeResponse.MaximumLength = 0;
- sec_blob->NtChallengeResponse.BufferOffset = cpu_to_le32(tmp - pbuffer);
+ sec_blob->NtChallengeResponse.BufferOffset =
+ cpu_to_le32(tmp - *pbuffer);
if (ses->user_name != NULL) {
- rc = setup_ntlmv2_rsp(ses, nls_cp);
- if (rc) {
- cERROR(1, "Error %d during NTLMSSP authentication", rc);
- goto setup_ntlmv2_ret;
- }
memcpy(tmp, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
ses->auth_key.len - CIFS_SESS_KEY_SIZE);
tmp += ses->auth_key.len - CIFS_SESS_KEY_SIZE;
@@ -503,7 +523,7 @@ static int build_ntlmssp_auth_blob(unsig
}
if (ses->domainName == NULL) {
- sec_blob->DomainName.BufferOffset = cpu_to_le32(tmp - pbuffer);
+ sec_blob->DomainName.BufferOffset = cpu_to_le32(tmp - *pbuffer);
sec_blob->DomainName.Length = 0;
sec_blob->DomainName.MaximumLength = 0;
tmp += 2;
@@ -512,14 +532,14 @@ static int build_ntlmssp_auth_blob(unsig
len = cifs_strtoUCS((__le16 *)tmp, ses->domainName,
MAX_USERNAME_SIZE, nls_cp);
len *= 2; /* unicode is 2 bytes each */
- sec_blob->DomainName.BufferOffset = cpu_to_le32(tmp - pbuffer);
+ sec_blob->DomainName.BufferOffset = cpu_to_le32(tmp - *pbuffer);
sec_blob->DomainName.Length = cpu_to_le16(len);
sec_blob->DomainName.MaximumLength = cpu_to_le16(len);
tmp += len;
}
if (ses->user_name == NULL) {
- sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - pbuffer);
+ sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - *pbuffer);
sec_blob->UserName.Length = 0;
sec_blob->UserName.MaximumLength = 0;
tmp += 2;
@@ -528,13 +548,13 @@ static int build_ntlmssp_auth_blob(unsig
len = cifs_strtoUCS((__le16 *)tmp, ses->user_name,
MAX_USERNAME_SIZE, nls_cp);
len *= 2; /* unicode is 2 bytes each */
- sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - pbuffer);
+ sec_blob->UserName.BufferOffset = cpu_to_le32(tmp - *pbuffer);
sec_blob->UserName.Length = cpu_to_le16(len);
sec_blob->UserName.MaximumLength = cpu_to_le16(len);
tmp += len;
}
- sec_blob->WorkstationName.BufferOffset = cpu_to_le32(tmp - pbuffer);
+ sec_blob->WorkstationName.BufferOffset = cpu_to_le32(tmp - *pbuffer);
sec_blob->WorkstationName.Length = 0;
sec_blob->WorkstationName.MaximumLength = 0;
tmp += 2;
@@ -543,19 +563,19 @@ static int build_ntlmssp_auth_blob(unsig
(ses->ntlmssp->server_flags & NTLMSSP_NEGOTIATE_EXTENDED_SEC))
&& !calc_seckey(ses)) {
memcpy(tmp, ses->ntlmssp->ciphertext, CIFS_CPHTXT_SIZE);
- sec_blob->SessionKey.BufferOffset = cpu_to_le32(tmp - pbuffer);
+ sec_blob->SessionKey.BufferOffset = cpu_to_le32(tmp - *pbuffer);
sec_blob->SessionKey.Length = cpu_to_le16(CIFS_CPHTXT_SIZE);
sec_blob->SessionKey.MaximumLength =
cpu_to_le16(CIFS_CPHTXT_SIZE);
tmp += CIFS_CPHTXT_SIZE;
} else {
- sec_blob->SessionKey.BufferOffset = cpu_to_le32(tmp - pbuffer);
+ sec_blob->SessionKey.BufferOffset = cpu_to_le32(tmp - *pbuffer);
sec_blob->SessionKey.Length = 0;
sec_blob->SessionKey.MaximumLength = 0;
}
+ *buflen = tmp - *pbuffer;
setup_ntlmv2_ret:
- *buflen = tmp - pbuffer;
return rc;
}
@@ -578,7 +598,7 @@ CIFS_SessSetup(unsigned int xid, struct
struct key *spnego_key = NULL;
__le32 phase = NtLmNegotiate; /* NTLMSSP, if needed, is multistage */
u16 blob_len;
- char *ntlmsspblob = NULL;
+ unsigned char *ntlmsspblob = NULL;
if (ses == NULL)
return -EINVAL;
@@ -832,21 +852,7 @@ ssetup_ntlmssp_authenticate:
cpu_to_le16(sizeof(NEGOTIATE_MESSAGE));
break;
case NtLmAuthenticate:
- /*
- * 5 is an empirical value, large enough to hold
- * authenticate message plus max 10 of av paris,
- * domain, user, workstation names, flags, etc.
- */
- ntlmsspblob = kzalloc(
- 5*sizeof(struct _AUTHENTICATE_MESSAGE),
- GFP_KERNEL);
- if (!ntlmsspblob) {
- cERROR(1, "Can't allocate NTLMSSP blob");
- rc = -ENOMEM;
- goto ssetup_exit;
- }
-
- rc = build_ntlmssp_auth_blob(ntlmsspblob,
+ rc = build_ntlmssp_auth_blob(&ntlmsspblob,
&blob_len, ses, nls_cp);
if (rc)
goto ssetup_exit;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 57/94] isa: Call isa_bus_init before dependent ISA bus drivers register
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (51 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 80/94] ALSA: timer: Fix negative queue usage by racy accesses Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 18/94] powerpc/mm/hash64: Factor out hash preload psize check Ben Hutchings
` (40 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Rene Herman, Greg Kroah-Hartman, William Breathitt Gray
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: William Breathitt Gray <vilhelm.gray@gmail.com>
commit 32a5a0c047343b11f581f663a2309cf43d13466f upstream.
The isa_bus_init function must be called before drivers which utilize
the ISA bus driver are registered. A race condition for initilization
exists if device_initcall is used (the isa_bus_init callback is placed
in the same initcall level as dependent drivers which use module_init).
This patch ensures that isa_bus_init is called first by utilizing
postcore_initcall in favor of device_initcall.
Fixes: a5117ba7da37 ("[PATCH] Driver model: add ISA bus")
Cc: Rene Herman <rene.herman@keyaccess.nl>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/base/isa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/base/isa.c
+++ b/drivers/base/isa.c
@@ -180,4 +180,4 @@ static int __init isa_bus_init(void)
return error;
}
-device_initcall(isa_bus_init);
+postcore_initcall(isa_bus_init);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 13/94] USB: serial: option: add even more ZTE device ids
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (12 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 70/94] fs/nilfs2: fix potential underflow in call to crc32_le Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 16/94] gcov: disable tree-loop-im to reduce stack usage Ben Hutchings
` (79 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, lei liu, Lei Liu, Johan Hovold
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Lei Liu <lei35151@163.com>
commit 74d2a91aec97ab832790c9398d320413ad185321 upstream.
Add even more ZTE device ids.
Signed-off-by: lei liu <liu.lei78@zte.com.cn>
[johan: rebase and replace commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/usb/serial/option.c | 54 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1688,6 +1688,60 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff92, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff9f, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa0, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa1, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa2, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa3, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa4, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa5, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa6, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa7, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa8, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffa9, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffaa, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffab, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffac, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffae, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffaf, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb0, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb1, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb2, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb3, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb4, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb5, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb6, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb7, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb8, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffb9, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffba, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbb, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbc, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbd, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbe, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffbf, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc0, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc1, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc2, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc3, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc4, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc5, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc6, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc7, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc8, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffc9, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffca, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffcb, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffcc, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffcd, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffce, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffcf, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd0, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd1, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd2, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd3, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd4, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffd5, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffe9, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 23/94] x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (8 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 21/94] mmc: mmc: Fix partition switch timeout for some eMMCs Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 69/94] ALSA: dummy: Fix a use-after-free at closing Ben Hutchings
` (83 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Ingo Molnar, Prarit Bhargava, Thomas Gleixner,
H. Peter Anvin, Bjorn Helgaas, Andi Kleen
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Prarit Bhargava <prarit@redhat.com>
commit da77b67195de1c65bef4908fa29967c4d0af2da2 upstream.
Commit b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having
non-compliant BARs") marked Home Agent 0 & PCU has having non-compliant
BARs. Home Agent 1 also has non-compliant BARs.
Mark Home Agent 1 as having non-compliant BARs so the PCI core doesn't
touch them.
The problem with these devices is documented in the Xeon v4 specification
update:
BDF2 PCI BARs in the Home Agent Will Return Non-Zero Values
During Enumeration
Problem: During system initialization the Operating System may access
the standard PCI BARs (Base Address Registers). Due to
this erratum, accesses to the Home Agent BAR registers (Bus
1; Device 18; Function 0,4; Offsets (0x14-0x24) will return
non-zero values.
Implication: The operating system may issue a warning. Intel has not
observed any functional failures due to this erratum.
Link: http://www.intel.com/content/www/us/en/processors/xeon/xeon-e5-v4-spec-update.html
Fixes: b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs")
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/x86/pci/fixup.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -539,9 +539,16 @@ static void __devinit twinhead_reserve_k
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x27B9, twinhead_reserve_killing_zone);
+/*
+ * Broadwell EP Home Agent BARs erroneously return non-zero values when read.
+ *
+ * See http://www.intel.com/content/www/us/en/processors/xeon/xeon-e5-v4-spec-update.html
+ * entry BDF2.
+ */
static void pci_bdwep_bar(struct pci_dev *dev)
{
dev->non_compliant_bars = 1;
}
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6f60, pci_bdwep_bar);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fa0, pci_bdwep_bar);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x6fc0, pci_bdwep_bar);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 14/94] ACPI / sysfs: fix error code in get_status()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (28 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 90/94] ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 38/94] mac80211_hwsim: Add missing check for HWSIM_ATTR_SIGNAL Ben Hutchings
` (63 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Dan Carpenter, Rafael J. Wysocki
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit f18ebc211e259d4f591e39e74b2aa2de226c9a1d upstream.
The problem with ornamental, do-nothing gotos is that they lead to
"forgot to set the error code" bugs. We should be returning -EINVAL
here but we don't. It leads to an uninitalized variable in
counter_show():
drivers/acpi/sysfs.c:603 counter_show()
error: uninitialized symbol 'status'.
Fixes: 1c8fce27e275 (ACPI: introduce drivers/acpi/sysfs.c)
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/acpi/sysfs.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -489,23 +489,22 @@ static void acpi_gbl_event_handler(u32 e
static int get_status(u32 index, acpi_event_status *status,
acpi_handle *handle)
{
- int result = 0;
+ int result;
if (index >= num_gpes + ACPI_NUM_FIXED_EVENTS)
- goto end;
+ return -EINVAL;
if (index < num_gpes) {
result = acpi_get_gpe_device(index, handle);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_NOT_FOUND,
"Invalid GPE 0x%x\n", index));
- goto end;
+ return result;
}
result = acpi_get_gpe_status(*handle, index, status);
} else if (index < (num_gpes + ACPI_NUM_FIXED_EVENTS))
result = acpi_get_event_status(index - num_gpes, status);
-end:
return result;
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 82/94] xenbus: don't BUG() on user mode induced condition
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (67 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 54/94] kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 22/94] net/mlx4_core: Fix access to uninitialized index Ben Hutchings
` (24 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, David Vrabel, Jan Beulich, Jan Beulich
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jan Beulich <JBeulich@suse.com>
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.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/xen/xenfs/xenbus.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- a/drivers/xen/xenfs/xenbus.c
+++ b/drivers/xen/xenfs/xenbus.c
@@ -310,11 +310,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;
}
@@ -324,12 +331,7 @@ static int xenbus_write_transaction(unsi
list_add(&trans->list, &u->transactions);
} else if (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);
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 81/94] qeth: delete napi struct when removing a qeth device
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (81 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 85/94] fs: limit filesystem stacking depth Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 63/94] can: fix oops caused by wrong rtnl dellink usage Ben Hutchings
` (10 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Ursula Braun, Alexander Klein, David S. Miller
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Ursula Braun <ubraun@linux.vnet.ibm.com>
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.
Fixes: a1c3ed4c9ca ("qeth: NAPI support for l2 and l3 discipline")
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Tested-by: Alexander Klein <ALKL@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/s390/net/qeth_l2_main.c | 1 +
drivers/s390/net/qeth_l3_main.c | 1 +
2 files changed, 2 insertions(+)
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -897,6 +897,7 @@ static void qeth_l2_remove_device(struct
qeth_l2_set_offline(cgdev);
if (card->dev) {
+ netif_napi_del(&card->napi);
unregister_netdev(card->dev);
card->dev = NULL;
}
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3395,6 +3395,7 @@ static void qeth_l3_remove_device(struct
qeth_l3_set_offline(cgdev);
if (card->dev) {
+ netif_napi_del(&card->napi);
unregister_netdev(card->dev);
card->dev = NULL;
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 04/94] PCI: Supply CPU physical address (not bus address) to iomem_is_exclusive()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (71 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 30/94] net: ehea: avoid null pointer dereference Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 59/94] can: at91_can: RX queue could get stuck at high bus load Ben Hutchings
` (20 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Yinghai Lu, Bjorn Helgaas, Arjan van de Ven
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Helgaas <bhelgaas@google.com>
commit ca620723d4ff9ea7ed484eab46264c3af871b9ae upstream.
iomem_is_exclusive() requires a CPU physical address, but on some arches we
supplied a PCI bus address instead.
On most arches, pci_resource_to_user(res) returns "res->start", which is a
CPU physical address. But on microblaze, mips, powerpc, and sparc, it
returns the PCI bus address corresponding to "res->start".
The result is that pci_mmap_resource() may fail when it shouldn't (if the
bus address happens to match an existing resource), or it may succeed when
it should fail (if the resource is exclusive but the bus address doesn't
match it).
Call iomem_is_exclusive() with "res->start", which is always a CPU physical
address, not the result of pci_resource_to_user().
Fixes: e8de1481fd71 ("resource: allow MMIO exclusivity for device drivers")
Suggested-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/pci/pci-sysfs.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -813,6 +813,9 @@ pci_mmap_resource(struct kobject *kobj,
if (i >= PCI_ROM_RESOURCE)
return -ENODEV;
+ if (res->flags & IORESOURCE_MEM && iomem_is_exclusive(res->start))
+ return -EINVAL;
+
if (!pci_mmap_fits(pdev, i, vma, PCI_MMAP_SYSFS)) {
WARN(1, "process \"%s\" tried to map 0x%08lx bytes "
"at page 0x%08lx on %s BAR %d (start 0x%16Lx, size 0x%16Lx)\n",
@@ -830,10 +833,6 @@ pci_mmap_resource(struct kobject *kobj,
pci_resource_to_user(pdev, i, res, &start, &end);
vma->vm_pgoff += start >> PAGE_SHIFT;
mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io;
-
- if (res->flags & IORESOURCE_MEM && iomem_is_exclusive(start))
- return -EINVAL;
-
return pci_mmap_page_range(pdev, vma, mmap_type, write_combine);
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 77/94] x86/amd_nb: Fix boot crash on non-AMD systems
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (55 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 68/94] HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 87/94] USB: usbfs: fix potential infoleak in devio Ben Hutchings
` (36 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Linus Torvalds, Peter Zijlstra
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Borislav Petkov <bp@suse.de>
commit 1ead852dd88779eda12cb09cc894a03d9abfe1ec upstream.
Fix boot crash that triggers if this driver is built into a kernel and
run on non-AMD systems.
AMD northbridges users call amd_cache_northbridges() and it returns
a negative value to signal that we weren't able to cache/detect any
northbridges on the system.
At least, it should do so as all its callers expect it to do so. But it
does return a negative value only when kmalloc() fails.
Fix it to return -ENODEV if there are no NBs cached as otherwise, amd_nb
users like amd64_edac, for example, which relies on it to know whether
it should load or not, gets loaded on systems like Intel Xeons where it
shouldn't.
Reported-and-tested-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1466097230-5333-2-git-send-email-bp@alien8.de
Link: https://lkml.kernel.org/r/5761BEB0.9000807@cybernetics.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/x86/kernel/amd_nb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -59,8 +59,8 @@ int amd_cache_northbridges(void)
while ((misc = next_northbridge(misc, amd_nb_misc_ids)) != NULL)
i++;
- if (i == 0)
- return 0;
+ if (!i)
+ return -ENODEV;
nb = kzalloc(i * sizeof(struct amd_northbridge), GFP_KERNEL);
if (!nb)
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 12/94] USB: serial: option: add more ZTE device ids
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (21 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 34/94] RDMA/cxgb3: device driver frees DMA memory with different size Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 89/94] ALSA: timer: Fix leak in events via snd_timer_user_ccallback Ben Hutchings
` (70 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, lei liu, Greg Kroah-Hartman, Johan Hovold
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: lei liu <liu.lei78@zte.com.cn>
commit f0d09463c59c2d764a6c6d492cbe6d2c77f27153 upstream.
More ZTE device ids.
Signed-off-by: lei liu <liu.lei78@zte.com.cn>
[properly sort them - gregkh]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/usb/serial/option.c | 75 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 74 insertions(+), 1 deletion(-)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1605,7 +1605,79 @@ static const struct usb_device_id option
.driver_info = (kernel_ulong_t)&net_intf3_blacklist },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0178, 0xff, 0xff, 0xff),
.driver_info = (kernel_ulong_t)&net_intf3_blacklist },
- { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffe9, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff42, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff43, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff44, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff45, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff46, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff47, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff48, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff49, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4a, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4b, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4c, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4d, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4e, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff4f, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff50, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff51, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff52, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff53, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff54, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff55, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff56, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff57, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff58, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff59, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5a, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5b, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5c, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5d, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5e, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff5f, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff60, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff61, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff62, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff63, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff64, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff65, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff66, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff67, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff68, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff69, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6a, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6b, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6c, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6d, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6e, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff6f, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff70, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff71, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff72, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff73, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff74, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff75, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff76, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff77, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff78, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff79, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7a, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7b, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7c, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7d, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7e, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff7f, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff80, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff81, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff82, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff83, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff84, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff85, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff86, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff87, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff88, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff89, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8a, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8b, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8c, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff8d, 0xff, 0xff, 0xff) },
@@ -1616,6 +1688,7 @@ static const struct usb_device_id option
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff92, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff93, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xff94, 0xff, 0xff, 0xff) },
+ { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0xffe9, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH, 0xff, 0xff, 0xff) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_AC8710, 0xff, 0xff, 0xff) },
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 19/94] powerpc/mm/hash64: Fix subpage protection with 4K HPTE config
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (63 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 56/94] IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 32/94] wait/ptrace: assume __WALL if the child is traced Ben Hutchings
` (28 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Michael Ellerman, Aneesh Kumar K.V
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <mpe@ellerman.id.au>
commit aac55d7573c5d46ed9a62818d5d3e69dd2060105 upstream.
With Linux page size of 64K and hardware only supporting 4K HPTE, if we
use subpage protection, we always fail for the subpage 0 as shown
below (using the selftest subpage_prot test):
520175565: (4520111850): Failed at 0x3fffad4b0000 (p=13,sp=0,w=0), want=fault, got=pass !
4520890210: (4520826495): Failed at 0x3fffad5b0000 (p=29,sp=0,w=0), want=fault, got=pass !
4521574251: (4521510536): Failed at 0x3fffad6b0000 (p=45,sp=0,w=0), want=fault, got=pass !
4522258324: (4522194609): Failed at 0x3fffad7b0000 (p=61,sp=0,w=0), want=fault, got=pass !
This is because hash preload wrongly inserts the HPTE entry for subpage
0 without looking at the subpage protection information.
Fix it by teaching should_hash_preload() not to preload if we have
subpage protection configured for that range.
It appears this has been broken since it was introduced in 2008.
Fixes: fa28237cfcc5 ("[POWERPC] Provide a way to protect 4k subpages when using 64k pages")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
[mpe: Rework into should_hash_preload() to avoid build fails w/SLICES=n]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/powerpc/mm/hash_utils_64.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -1077,8 +1077,16 @@ EXPORT_SYMBOL_GPL(hash_page);
#ifdef CONFIG_PPC_MM_SLICES
static bool should_hash_preload(struct mm_struct *mm, unsigned long ea)
{
+ int psize = get_slice_psize(mm, ea);
+
/* We only prefault standard pages for now */
- if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize))
+ if (unlikely(psize != mm->context.user_psize))
+ return false;
+
+ /*
+ * Don't prefault if subpage protection is enabled for the EA.
+ */
+ if (unlikely((psize == MMU_PAGE_4K) && subpage_protection(mm, ea)))
return false;
return true;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 22/94] net/mlx4_core: Fix access to uninitialized index
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (68 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 82/94] xenbus: don't BUG() on user mode induced condition Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 60/94] ubi: Make recover_peb power cut aware Ben Hutchings
` (23 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Dan Carpenter, David S. Miller, Tariq Toukan
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Tariq Toukan <tariqt@mellanox.com>
commit 2bb07e155bb3e0c722c806723f737cf8020961ef upstream.
Prevent using uninitialized or negative index when handling
steering entries.
Fixes: b12d93d63c32 ('mlx4: Add support for promiscuous mode in the new steering model.')
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/ethernet/mellanox/mlx4/mcg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/mellanox/mlx4/mcg.c
+++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c
@@ -615,7 +615,7 @@ int mlx4_qp_attach_common(struct mlx4_de
struct mlx4_mgm *mgm;
u32 members_count;
u16 hash;
- int index, prev;
+ int index = -1, prev;
int link = 0;
int i;
int err;
@@ -693,7 +693,7 @@ int mlx4_qp_attach_common(struct mlx4_de
goto out;
out:
- if (prot == MLX4_PROT_ETH) {
+ if (prot == MLX4_PROT_ETH && index != -1) {
/* manage the steering entry for promisc mode */
if (new_entry)
new_steering_entry(dev, 0, port, steer, index, qp->qpn);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 60/94] ubi: Make recover_peb power cut aware
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (69 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 22/94] net/mlx4_core: Fix access to uninitialized index Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 30/94] net: ehea: avoid null pointer dereference Ben Hutchings
` (22 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Richard Weinberger, Jörg Pfähler
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Richard Weinberger <richard@nod.at>
commit 972228d87445dc46c0a01f5f3de673ac017626f7 upstream.
recover_peb() was never power cut aware,
if a power cut happened right after writing the VID header
upon next attach UBI would blindly use the new partial written
PEB and all data from the old PEB is lost.
In order to make recover_peb() power cut aware, write the new
VID with a proper crc and copy_flag set such that the UBI attach
process will detect whether the new PEB is completely written
or not.
We cannot directly use ubi_eba_atomic_leb_change() since we'd
have to unlock the LEB which is facing a write error.
Reported-by: Jörg Pfähler <pfaehler@isse.de>
Reviewed-by: Jörg Pfähler <pfaehler@isse.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
[bwh: Backported to 3.2:
- Adjust context
- Use next_sqnum() instead of ubi_next_sqnum()
- Use ubi_device::peb_buf1 instead of ubi_device::peb_buf
- No need to unlock ubi->fm_eba_sem on error]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/mtd/ubi/eba.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
--- a/drivers/mtd/ubi/eba.c
+++ b/drivers/mtd/ubi/eba.c
@@ -501,6 +501,7 @@ static int recover_peb(struct ubi_device
int err, idx = vol_id2idx(ubi, vol_id), new_pnum, data_size, tries = 0;
struct ubi_volume *vol = ubi->volumes[idx];
struct ubi_vid_hdr *vid_hdr;
+ uint32_t crc;
vid_hdr = ubi_zalloc_vid_hdr(ubi, GFP_NOFS);
if (!vid_hdr)
@@ -522,12 +523,8 @@ retry:
goto out_put;
}
- vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
- err = ubi_io_write_vid_hdr(ubi, new_pnum, vid_hdr);
- if (err)
- goto write_error;
+ ubi_assert(vid_hdr->vol_type == UBI_VID_DYNAMIC);
- data_size = offset + len;
mutex_lock(&ubi->buf_mutex);
memset(ubi->peb_buf1 + offset, 0xFF, len);
@@ -540,6 +537,18 @@ retry:
memcpy(ubi->peb_buf1 + offset, buf, len);
+ data_size = offset + len;
+ crc = crc32(UBI_CRC32_INIT, ubi->peb_buf1, data_size);
+ vid_hdr->sqnum = cpu_to_be64(next_sqnum(ubi));
+ vid_hdr->copy_flag = 1;
+ vid_hdr->data_size = cpu_to_be32(data_size);
+ vid_hdr->data_crc = cpu_to_be32(crc);
+ err = ubi_io_write_vid_hdr(ubi, new_pnum, vid_hdr);
+ if (err) {
+ mutex_unlock(&ubi->buf_mutex);
+ goto write_error;
+ }
+
err = ubi_io_write_data(ubi, ubi->peb_buf1, new_pnum, 0, data_size);
if (err) {
mutex_unlock(&ubi->buf_mutex);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 71/94] staging: iio: accel: fix error check
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (42 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 24/94] PCI: Disable all BAR sizing for devices with non-compliant BARs Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 17/94] ata: sata_dwc_460ex: remove incorrect locking Ben Hutchings
` (49 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Jonathan Cameron, Luis de Bethencourt
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Luis de Bethencourt <luisbg@osg.samsung.com>
commit ef3149eb3ddb7f9125e11c90f8330e371b55cffd upstream.
sca3000_read_ctrl_reg() returns a negative number on failure, check for
this instead of zero.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/staging/iio/accel/sca3000_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/iio/accel/sca3000_core.c
+++ b/drivers/staging/iio/accel/sca3000_core.c
@@ -579,7 +579,7 @@ static ssize_t sca3000_read_frequency(st
goto error_ret_mut;
ret = sca3000_read_ctrl_reg(st, SCA3000_REG_CTRL_SEL_OUT_CTRL);
mutex_unlock(&st->lock);
- if (ret)
+ if (ret < 0)
goto error_ret;
val = ret;
if (base_freq > 0)
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 02/94] ath5k: Change led pin configuration for compaq c700 laptop
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (2 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 61/94] mm: Export migrate_page_move_mapping and migrate_page_copy Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 03/94] crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks Ben Hutchings
` (89 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Kalle Valo, Joseph Salisbury
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Joseph Salisbury <joseph.salisbury@canonical.com>
commit 7b9bc799a445aea95f64f15e0083cb19b5789abe upstream.
BugLink: http://bugs.launchpad.net/bugs/972604
Commit 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin
configuration for compaq c700 laptop") added a pin configuration for the Compaq
c700 laptop. However, the polarity of the led pin is reversed. It should be
red for wifi off and blue for wifi on, but it is the opposite. This bug was
reported in the following bug report:
http://pad.lv/972604
Fixes: 09c9bae26b0d3c9472cb6ae45010460a2cee8b8d ("ath5k: add led pin configuration for compaq c700 laptop")
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/wireless/ath/ath5k/led.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/ath/ath5k/led.c
+++ b/drivers/net/wireless/ath/ath5k/led.c
@@ -75,7 +75,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath5k_led
/* HP Compaq CQ60-206US (ddreggors@jumptv.com) */
{ ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137a), ATH_LED(3, 1) },
/* HP Compaq C700 (nitrousnrg@gmail.com) */
- { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137b), ATH_LED(3, 1) },
+ { ATH_SDEVICE(PCI_VENDOR_ID_HP, 0x0137b), ATH_LED(3, 0) },
/* LiteOn AR5BXB63 (magooz@salug.it) */
{ ATH_SDEVICE(PCI_VENDOR_ID_ATHEROS, 0x3067), ATH_LED(3, 0) },
/* IBM-specific AR5212 (all others) */
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 83/94] ecryptfs: don't allow mmap when the lower fs doesn't support it
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (78 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 64/94] xen/pciback: Fix conf_space read/write overlap check Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 45/94] usb: f_fs: off by one bug in _ffs_func_bind() Ben Hutchings
` (13 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Jeff Mahoney, Tyler Hicks
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Mahoney <jeffm@suse.com>
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
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
[tyhicks: clean up f_op check by using ecryptfs_file_to_lower()]
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/ecryptfs/file.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -183,6 +183,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
@@ -382,7 +395,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,
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 42/94] x86, build: copy ldlinux.c32 to image.iso
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (30 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 38/94] mac80211_hwsim: Add missing check for HWSIM_ATTR_SIGNAL Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 08/94] aacraid: Fix for aac_command_thread hang Ben Hutchings
` (61 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, H. Peter Anvin
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: "H. Peter Anvin" <hpa@zytor.com>
commit 9c77679cadb118c0aa99e6f88533d91765a131ba upstream.
For newer versions of Syslinux, we need ldlinux.c32 in addition to
isolinux.bin to reside on the boot disk, so if the latter is found,
copy it, too, to the isoimage tree.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/x86/boot/Makefile | 3 +++
1 file changed, 3 insertions(+)
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -166,6 +166,9 @@ isoimage: $(obj)/bzImage
for i in lib lib64 share end ; do \
if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \
cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \
+ if [ -f /usr/$$i/syslinux/ldlinux.c32 ]; then \
+ cp /usr/$$i/syslinux/ldlinux.c32 $(obj)/isoimage ; \
+ fi ; \
break ; \
fi ; \
if [ $$i = end ] ; then exit 1 ; fi ; \
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 62/94] UBIFS: Implement ->migratepage()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (87 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 06/94] crypto: s5p-sss - fix incorrect usage of scatterlists api Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 39/94] ARM: fix PTRACE_SETVFPREGS on SMP systems Ben Hutchings
` (4 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Richard Weinberger, Christoph Hellwig, Kirill A. Shutemov
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
commit 4ac1c17b2044a1b4b2fbed74451947e905fc2992 upstream.
During page migrations UBIFS might get confused
and the following assert triggers:
[ 213.480000] UBIFS assert failed in ubifs_set_page_dirty at 1451 (pid 436)
[ 213.490000] CPU: 0 PID: 436 Comm: drm-stress-test Not tainted 4.4.4-00176-geaa802524636-dirty #1008
[ 213.490000] Hardware name: Allwinner sun4i/sun5i Families
[ 213.490000] [<c0015e70>] (unwind_backtrace) from [<c0012cdc>] (show_stack+0x10/0x14)
[ 213.490000] [<c0012cdc>] (show_stack) from [<c02ad834>] (dump_stack+0x8c/0xa0)
[ 213.490000] [<c02ad834>] (dump_stack) from [<c0236ee8>] (ubifs_set_page_dirty+0x44/0x50)
[ 213.490000] [<c0236ee8>] (ubifs_set_page_dirty) from [<c00fa0bc>] (try_to_unmap_one+0x10c/0x3a8)
[ 213.490000] [<c00fa0bc>] (try_to_unmap_one) from [<c00fadb4>] (rmap_walk+0xb4/0x290)
[ 213.490000] [<c00fadb4>] (rmap_walk) from [<c00fb1bc>] (try_to_unmap+0x64/0x80)
[ 213.490000] [<c00fb1bc>] (try_to_unmap) from [<c010dc28>] (migrate_pages+0x328/0x7a0)
[ 213.490000] [<c010dc28>] (migrate_pages) from [<c00d0cb0>] (alloc_contig_range+0x168/0x2f4)
[ 213.490000] [<c00d0cb0>] (alloc_contig_range) from [<c010ec00>] (cma_alloc+0x170/0x2c0)
[ 213.490000] [<c010ec00>] (cma_alloc) from [<c001a958>] (__alloc_from_contiguous+0x38/0xd8)
[ 213.490000] [<c001a958>] (__alloc_from_contiguous) from [<c001ad44>] (__dma_alloc+0x23c/0x274)
[ 213.490000] [<c001ad44>] (__dma_alloc) from [<c001ae08>] (arm_dma_alloc+0x54/0x5c)
[ 213.490000] [<c001ae08>] (arm_dma_alloc) from [<c035cecc>] (drm_gem_cma_create+0xb8/0xf0)
[ 213.490000] [<c035cecc>] (drm_gem_cma_create) from [<c035cf20>] (drm_gem_cma_create_with_handle+0x1c/0xe8)
[ 213.490000] [<c035cf20>] (drm_gem_cma_create_with_handle) from [<c035d088>] (drm_gem_cma_dumb_create+0x3c/0x48)
[ 213.490000] [<c035d088>] (drm_gem_cma_dumb_create) from [<c0341ed8>] (drm_ioctl+0x12c/0x444)
[ 213.490000] [<c0341ed8>] (drm_ioctl) from [<c0121adc>] (do_vfs_ioctl+0x3f4/0x614)
[ 213.490000] [<c0121adc>] (do_vfs_ioctl) from [<c0121d30>] (SyS_ioctl+0x34/0x5c)
[ 213.490000] [<c0121d30>] (SyS_ioctl) from [<c000f2c0>] (ret_fast_syscall+0x0/0x34)
UBIFS is using PagePrivate() which can have different meanings across
filesystems. Therefore the generic page migration code cannot handle this
case correctly.
We have to implement our own migration function which basically does a
plain copy but also duplicates the page private flag.
UBIFS is not a block device filesystem and cannot use buffer_migrate_page().
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
[rw: Massaged changelog, build fixes, etc...]
Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Christoph Hellwig <hch@lst.de>
[bwh: Backported to 3.2:
- migrate_page_move_mapping() doesn't take an extra_count parameter
- Use literal 0 instead of MIGRATEPAGE_SUCCESS]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/ubifs/file.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -53,6 +53,7 @@
#include <linux/mount.h>
#include <linux/namei.h>
#include <linux/slab.h>
+#include <linux/migrate.h>
static int read_block(struct inode *inode, void *addr, unsigned int block,
struct ubifs_data_node *dn)
@@ -1421,6 +1422,26 @@ static int ubifs_set_page_dirty(struct p
return ret;
}
+#ifdef CONFIG_MIGRATION
+static int ubifs_migrate_page(struct address_space *mapping,
+ struct page *newpage, struct page *page, enum migrate_mode mode)
+{
+ int rc;
+
+ rc = migrate_page_move_mapping(mapping, newpage, page, NULL, mode);
+ if (rc != 0)
+ return rc;
+
+ if (PagePrivate(page)) {
+ ClearPagePrivate(page);
+ SetPagePrivate(newpage);
+ }
+
+ migrate_page_copy(newpage, page);
+ return 0;
+}
+#endif
+
static int ubifs_releasepage(struct page *page, gfp_t unused_gfp_flags)
{
/*
@@ -1555,6 +1576,9 @@ const struct address_space_operations ub
.write_end = ubifs_write_end,
.invalidatepage = ubifs_invalidatepage,
.set_page_dirty = ubifs_set_page_dirty,
+#ifdef CONFIG_MIGRATION
+ .migratepage = ubifs_migrate_page,
+#endif
.releasepage = ubifs_releasepage,
};
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 24/94] PCI: Disable all BAR sizing for devices with non-compliant BARs
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (41 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 33/94] xen/events: Don't move disabled irqs Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 71/94] staging: iio: accel: fix error check Ben Hutchings
` (50 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, H. Peter Anvin, Andi Kleen, Bjorn Helgaas, Ingo Molnar,
Prarit Bhargava, Thomas Gleixner
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Prarit Bhargava <prarit@redhat.com>
commit ad67b437f187ea818b2860524d10f878fadfdd99 upstream.
b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with non-compliant
BARs") disabled BAR sizing for BARs 0-5 of devices that don't comply with
the PCI spec. But it didn't do anything for expansion ROM BARs, so we
still try to size them, resulting in warnings like this on Broadwell-EP:
pci 0000:ff:12.0: BAR 6: failed to assign [mem size 0x00000001 pref]
Move the non-compliant BAR check from __pci_read_base() up to
pci_read_bases() so it applies to the expansion ROM BAR as well as
to BARs 0-5.
Note that direct callers of __pci_read_base(), like sriov_init(), will now
bypass this check. We haven't had reports of devices with broken SR-IOV
BARs yet.
[bhelgaas: changelog]
Fixes: b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with non-compliant BARs")
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Ingo Molnar <mingo@redhat.com>
CC: "H. Peter Anvin" <hpa@zytor.com>
CC: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/pci/probe.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -136,9 +136,6 @@ int __pci_read_base(struct pci_dev *dev,
u32 l, sz, mask;
u16 orig_cmd;
- if (dev->non_compliant_bars)
- return 0;
-
mask = type ? PCI_ROM_ADDRESS_MASK : ~0;
if (!dev->mmio_always_on) {
@@ -251,6 +248,9 @@ static void pci_read_bases(struct pci_de
{
unsigned int pos, reg;
+ if (dev->non_compliant_bars)
+ return;
+
for (pos = 0; pos < howmany; pos++) {
struct resource *res = &dev->resource[pos];
reg = PCI_BASE_ADDRESS_0 + (pos << 2);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 32/94] wait/ptrace: assume __WALL if the child is traced
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (64 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 19/94] powerpc/mm/hash64: Fix subpage protection with 4K HPTE config Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 49/94] iio: Fix error handling in iio_trigger_attach_poll_func Ben Hutchings
` (27 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, syzkaller, Dmitry Vyukov, Pedro Alves,
Michael Kerrisk (man-pages), Roland McGrath, Jan Kratochvil,
Linus Torvalds, Oleg Nesterov, Denys Vlasenko
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Oleg Nesterov <oleg@redhat.com>
commit bf959931ddb88c4e4366e96dd22e68fa0db9527c upstream.
The following program (simplified version of generated by syzkaller)
#include <pthread.h>
#include <unistd.h>
#include <sys/ptrace.h>
#include <stdio.h>
#include <signal.h>
void *thread_func(void *arg)
{
ptrace(PTRACE_TRACEME, 0,0,0);
return 0;
}
int main(void)
{
pthread_t thread;
if (fork())
return 0;
while (getppid() != 1)
;
pthread_create(&thread, NULL, thread_func, NULL);
pthread_join(thread, NULL);
return 0;
}
creates an unreapable zombie if /sbin/init doesn't use __WALL.
This is not a kernel bug, at least in a sense that everything works as
expected: debugger should reap a traced sub-thread before it can reap the
leader, but without __WALL/__WCLONE do_wait() ignores sub-threads.
Unfortunately, it seems that /sbin/init in most (all?) distributions
doesn't use it and we have to change the kernel to avoid the problem.
Note also that most init's use sys_waitid() which doesn't allow __WALL, so
the necessary user-space fix is not that trivial.
This patch just adds the "ptrace" check into eligible_child(). To some
degree this matches the "tsk->ptrace" in exit_notify(), ->exit_signal is
mostly ignored when the tracee reports to debugger. Or WSTOPPED, the
tracer doesn't need to set this flag to wait for the stopped tracee.
This obviously means the user-visible change: __WCLONE and __WALL no
longer have any meaning for debugger. And I can only hope that this won't
break something, but at least strace/gdb won't suffer.
We could make a more conservative change. Say, we can take __WCLONE into
account, or !thread_group_leader(). But it would be nice to not
complicate these historical/confusing checks.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: Pedro Alves <palves@redhat.com>
Cc: Roland McGrath <roland@hack.frob.com>
Cc: <syzkaller@googlegroups.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
kernel/exit.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1138,17 +1138,28 @@ static int eligible_pid(struct wait_opts
task_pid_type(p, wo->wo_type) == wo->wo_pid;
}
-static int eligible_child(struct wait_opts *wo, struct task_struct *p)
+static int
+eligible_child(struct wait_opts *wo, bool ptrace, struct task_struct *p)
{
if (!eligible_pid(wo, p))
return 0;
- /* Wait for all children (clone and not) if __WALL is set;
- * otherwise, wait for clone children *only* if __WCLONE is
- * set; otherwise, wait for non-clone children *only*. (Note:
- * A "clone" child here is one that reports to its parent
- * using a signal other than SIGCHLD.) */
- if (((p->exit_signal != SIGCHLD) ^ !!(wo->wo_flags & __WCLONE))
- && !(wo->wo_flags & __WALL))
+
+ /*
+ * Wait for all children (clone and not) if __WALL is set or
+ * if it is traced by us.
+ */
+ if (ptrace || (wo->wo_flags & __WALL))
+ return 1;
+
+ /*
+ * Otherwise, wait for clone children *only* if __WCLONE is set;
+ * otherwise, wait for non-clone children *only*.
+ *
+ * Note: a "clone" child here is one that reports to its parent
+ * using a signal other than SIGCHLD, or a non-leader thread which
+ * we can only see if it is traced by us.
+ */
+ if ((p->exit_signal != SIGCHLD) ^ !!(wo->wo_flags & __WCLONE))
return 0;
return 1;
@@ -1525,7 +1536,7 @@ static int wait_task_continued(struct wa
static int wait_consider_task(struct wait_opts *wo, int ptrace,
struct task_struct *p)
{
- int ret = eligible_child(wo, p);
+ int ret = eligible_child(wo, ptrace, p);
if (!ret)
return ret;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 39/94] ARM: fix PTRACE_SETVFPREGS on SMP systems
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (88 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 62/94] UBIFS: Implement ->migratepage() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 11/94] tty: vt, return error when con_startup fails Ben Hutchings
` (3 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Simon Marchi, Will Deacon, Russell King
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Russell King <rmk+kernel@armlinux.org.uk>
commit e2dfb4b880146bfd4b6aa8e138c0205407cebbaf upstream.
PTRACE_SETVFPREGS fails to properly mark the VFP register set to be
reloaded, because it undoes one of the effects of vfp_flush_hwstate().
Specifically vfp_flush_hwstate() sets thread->vfpstate.hard.cpu to
an invalid CPU number, but vfp_set() overwrites this with the original
CPU number, thereby rendering the hardware state as apparently "valid",
even though the software state is more recent.
Fix this by reverting the previous change.
Fixes: 8130b9d7b9d8 ("ARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers")
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Simon Marchi <simon.marchi@ericsson.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/arm/kernel/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -726,8 +726,8 @@ static int vfp_set(struct task_struct *t
if (ret)
return ret;
- vfp_flush_hwstate(thread);
thread->vfpstate.hard = new_vfp;
+ vfp_flush_hwstate(thread);
return 0;
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 69/94] ALSA: dummy: Fix a use-after-free at closing
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (9 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 23/94] x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 75/94] batman-adv: Fix use-after-free/double-free of tt_req_node Ben Hutchings
` (82 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Dmitry Vyukov, Takashi Iwai
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit d5dbbe6569481bf12dcbe3e12cff72c5f78d272c upstream.
syzkaller fuzzer spotted a potential use-after-free case in snd-dummy
driver when hrtimer is used as backend:
> ==================================================================
> BUG: KASAN: use-after-free in rb_erase+0x1b17/0x2010 at addr ffff88005e5b6f68
> Read of size 8 by task syz-executor/8984
> =============================================================================
> BUG kmalloc-192 (Not tainted): kasan: bad access detected
> -----------------------------------------------------------------------------
>
> Disabling lock debugging due to kernel taint
> INFO: Allocated in 0xbbbbbbbbbbbbbbbb age=18446705582212484632
> ....
> [< none >] dummy_hrtimer_create+0x49/0x1a0 sound/drivers/dummy.c:464
> ....
> INFO: Freed in 0xfffd8e09 age=18446705496313138713 cpu=2164287125 pid=-1
> [< none >] dummy_hrtimer_free+0x68/0x80 sound/drivers/dummy.c:481
> ....
> Call Trace:
> [<ffffffff8179e59e>] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:333
> [< inline >] rb_set_parent include/linux/rbtree_augmented.h:111
> [< inline >] __rb_erase_augmented include/linux/rbtree_augmented.h:218
> [<ffffffff82ca5787>] rb_erase+0x1b17/0x2010 lib/rbtree.c:427
> [<ffffffff82cb02e8>] timerqueue_del+0x78/0x170 lib/timerqueue.c:86
> [<ffffffff814d0c80>] __remove_hrtimer+0x90/0x220 kernel/time/hrtimer.c:903
> [< inline >] remove_hrtimer kernel/time/hrtimer.c:945
> [<ffffffff814d23da>] hrtimer_try_to_cancel+0x22a/0x570 kernel/time/hrtimer.c:1046
> [<ffffffff814d2742>] hrtimer_cancel+0x22/0x40 kernel/time/hrtimer.c:1066
> [<ffffffff85420531>] dummy_hrtimer_stop+0x91/0xb0 sound/drivers/dummy.c:417
> [<ffffffff854228bf>] dummy_pcm_trigger+0x17f/0x1e0 sound/drivers/dummy.c:507
> [<ffffffff85392170>] snd_pcm_do_stop+0x160/0x1b0 sound/core/pcm_native.c:1106
> [<ffffffff85391b26>] snd_pcm_action_single+0x76/0x120 sound/core/pcm_native.c:956
> [<ffffffff85391e01>] snd_pcm_action+0x231/0x290 sound/core/pcm_native.c:974
> [< inline >] snd_pcm_stop sound/core/pcm_native.c:1139
> [<ffffffff8539754d>] snd_pcm_drop+0x12d/0x1d0 sound/core/pcm_native.c:1784
> [<ffffffff8539d3be>] snd_pcm_common_ioctl1+0xfae/0x2150 sound/core/pcm_native.c:2805
> [<ffffffff8539ee91>] snd_pcm_capture_ioctl1+0x2a1/0x5e0 sound/core/pcm_native.c:2976
> [<ffffffff8539f2ec>] snd_pcm_kernel_ioctl+0x11c/0x160 sound/core/pcm_native.c:3020
> [<ffffffff853d9a44>] snd_pcm_oss_sync+0x3a4/0xa30 sound/core/oss/pcm_oss.c:1693
> [<ffffffff853da27d>] snd_pcm_oss_release+0x1ad/0x280 sound/core/oss/pcm_oss.c:2483
> .....
A workaround is to call hrtimer_cancel() in dummy_hrtimer_sync() which
is called certainly before other blocking ops.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
sound/drivers/dummy.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -419,6 +419,7 @@ static int dummy_hrtimer_stop(struct snd
static inline void dummy_hrtimer_sync(struct dummy_hrtimer_pcm *dpcm)
{
+ hrtimer_cancel(&dpcm->timer);
tasklet_kill(&dpcm->tasklet);
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 66/94] Input: wacom_w8001 - w8001_MAX_LENGTH should be 13
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (34 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 79/94] bonding: prevent out of bound accesses Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 88/94] ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS Ben Hutchings
` (57 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Peter Hutterer, Ping Cheng, Ping Cheng, Dmitry Torokhov
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Ping Cheng <pinglinux@gmail.com>
commit 12afb34400eb2b301f06b2aa3535497d14faee59 upstream.
Somehow the patch that added two-finger touch support forgot to update
W8001_MAX_LENGTH from 11 to 13.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/input/touchscreen/wacom_w8001.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -28,7 +28,7 @@ MODULE_AUTHOR("Jaya Kumar <jayakumar.lkm
MODULE_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
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 33/94] xen/events: Don't move disabled irqs
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (40 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 55/94] KEYS: potential uninitialized variable Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 24/94] PCI: Disable all BAR sizing for devices with non-compliant BARs Ben Hutchings
` (51 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Ross Lagerwall, David Vrabel, Boris Ostrovsky
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Ross Lagerwall <ross.lagerwall@citrix.com>
commit f0f393877c71ad227d36705d61d1e4062bc29cf5 upstream.
Commit ff1e22e7a638 ("xen/events: Mask a moving irq") open-coded
irq_move_irq() but left out checking if the IRQ is disabled. This broke
resuming from suspend since it tries to move a (disabled) irq without
holding the IRQ's desc->lock. Fix it by adding in a check for disabled
IRQs.
The resulting stacktrace was:
kernel BUG at /build/linux-UbQGH5/linux-4.4.0/kernel/irq/migration.c:31!
invalid opcode: 0000 [#1] SMP
Modules linked in: xenfs xen_privcmd ...
CPU: 0 PID: 9 Comm: migration/0 Not tainted 4.4.0-22-generic #39-Ubuntu
Hardware name: Xen HVM domU, BIOS 4.6.1-xs125180 05/04/2016
task: ffff88003d75ee00 ti: ffff88003d7bc000 task.ti: ffff88003d7bc000
RIP: 0010:[<ffffffff810e26e2>] [<ffffffff810e26e2>] irq_move_masked_irq+0xd2/0xe0
RSP: 0018:ffff88003d7bfc50 EFLAGS: 00010046
RAX: 0000000000000000 RBX: ffff88003d40ba00 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000100 RDI: ffff88003d40bad8
RBP: ffff88003d7bfc68 R08: 0000000000000000 R09: ffff88003d000000
R10: 0000000000000000 R11: 000000000000023c R12: ffff88003d40bad0
R13: ffffffff81f3a4a0 R14: 0000000000000010 R15: 00000000ffffffff
FS: 0000000000000000(0000) GS:ffff88003da00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd4264de624 CR3: 0000000037922000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
ffff88003d40ba38 0000000000000024 0000000000000000 ffff88003d7bfca0
ffffffff814c8d92 00000010813ef89d 00000000805ea732 0000000000000009
0000000000000024 ffff88003cc39b80 ffff88003d7bfce0 ffffffff814c8f66
Call Trace:
[<ffffffff814c8d92>] eoi_pirq+0xb2/0xf0
[<ffffffff814c8f66>] __startup_pirq+0xe6/0x150
[<ffffffff814ca659>] xen_irq_resume+0x319/0x360
[<ffffffff814c7e75>] xen_suspend+0xb5/0x180
[<ffffffff81120155>] multi_cpu_stop+0xb5/0xe0
[<ffffffff811200a0>] ? cpu_stop_queue_work+0x80/0x80
[<ffffffff811203d0>] cpu_stopper_thread+0xb0/0x140
[<ffffffff810a94e6>] ? finish_task_switch+0x76/0x220
[<ffffffff810ca731>] ? __raw_callee_save___pv_queued_spin_unlock+0x11/0x20
[<ffffffff810a3935>] smpboot_thread_fn+0x105/0x160
[<ffffffff810a3830>] ? sort_range+0x30/0x30
[<ffffffff810a0588>] kthread+0xd8/0xf0
[<ffffffff810a04b0>] ? kthread_create_on_node+0x1e0/0x1e0
[<ffffffff8182568f>] ret_from_fork+0x3f/0x70
[<ffffffff810a04b0>] ? kthread_create_on_node+0x1e0/0x1e0
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/xen/events.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -516,7 +516,8 @@ static void eoi_pirq(struct irq_data *da
if (!VALID_EVTCHN(evtchn))
return;
- if (unlikely(irqd_is_setaffinity_pending(data))) {
+ if (unlikely(irqd_is_setaffinity_pending(data)) &&
+ likely(!irqd_irq_disabled(data))) {
int masked = test_and_set_mask(evtchn);
clear_evtchn(evtchn);
@@ -1446,7 +1447,8 @@ static void ack_dynirq(struct irq_data *
if (!VALID_EVTCHN(evtchn))
return;
- if (unlikely(irqd_is_setaffinity_pending(data))) {
+ if (unlikely(irqd_is_setaffinity_pending(data)) &&
+ likely(!irqd_irq_disabled(data))) {
int masked = test_and_set_mask(evtchn);
clear_evtchn(evtchn);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 73/94] ALSA: echoaudio: Fix memory allocation
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (17 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 36/94] Input: pwm-beeper - remove useless call to pwm_config() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 84/94] cifs: dynamic allocation of ntlmssp blob Ben Hutchings
` (74 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Takashi Iwai, Christophe JAILLET
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
commit 9c6795a9b3cbb56a9fbfaf43909c5c22999ba317 upstream.
'commpage_bak' is allocated with 'sizeof(struct echoaudio)' bytes.
We then copy 'sizeof(struct comm_page)' bytes in it.
On my system, smatch complains because one is 2960 and the other is 3072.
This would result in memory corruption or a oops.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
sound/pci/echoaudio/echoaudio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -2251,11 +2251,11 @@ static int snd_echo_resume(struct pci_de
DE_INIT(("resume start\n"));
pci_restore_state(pci);
- commpage_bak = kmalloc(sizeof(struct echoaudio), GFP_KERNEL);
+ commpage_bak = kmalloc(sizeof(*commpage), GFP_KERNEL);
if (commpage_bak == NULL)
return -ENOMEM;
commpage = chip->comm_page;
- memcpy(commpage_bak, commpage, sizeof(struct comm_page));
+ memcpy(commpage_bak, commpage, sizeof(*commpage));
err = init_hw(chip, chip->pci->device, chip->pci->subsystem_device);
if (err < 0) {
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 31/94] Input: uinput - handle compat ioctl for UI_SET_PHYS
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (57 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 87/94] USB: usbfs: fix potential infoleak in devio Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 48/94] staging:iio: trigger fixes for repeat request of same trigger and allocation failure Ben Hutchings
` (34 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Ricky Liang, Dmitry Torokhov
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Ricky Liang <jcliang@chromium.org>
commit affa80bd97f7ca282d1faa91667b3ee9e4c590e6 upstream.
When running a 32-bit userspace on a 64-bit kernel, the UI_SET_PHYS
ioctl needs to be treated with special care, as it has the pointer
size encoded in the command.
Signed-off-by: Ricky Liang <jcliang@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/input/misc/uinput.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -786,8 +786,14 @@ static long uinput_ioctl(struct file *fi
}
#ifdef CONFIG_COMPAT
+
+#define UI_SET_PHYS_COMPAT _IOW(UINPUT_IOCTL_BASE, 108, compat_uptr_t)
+
static long uinput_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
+ if (cmd == UI_SET_PHYS_COMPAT)
+ cmd = UI_SET_PHYS;
+
return uinput_ioctl_handler(file, cmd, arg, compat_ptr(arg));
}
#endif
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 03/94] crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (3 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 02/94] ath5k: Change led pin configuration for compaq c700 laptop Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 58/94] hwmon: (dell-smm) Restrict fan control and serial number to CAP_SYS_ADMIN by default Ben Hutchings
` (88 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Marek Szyprowski, Krzysztof Kozlowski, Herbert Xu
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
commit 79152e8d085fd64484afd473ef6830b45518acba upstream.
The tcrypt testing module on Exynos5422-based Odroid XU3/4 board failed on
testing 8 kB size blocks:
$ sudo modprobe tcrypt sec=1 mode=500
testing speed of async ecb(aes) (ecb-aes-s5p) encryption
test 0 (128 bit key, 16 byte blocks): 21971 operations in 1 seconds (351536 bytes)
test 1 (128 bit key, 64 byte blocks): 21731 operations in 1 seconds (1390784 bytes)
test 2 (128 bit key, 256 byte blocks): 21932 operations in 1 seconds (5614592 bytes)
test 3 (128 bit key, 1024 byte blocks): 21685 operations in 1 seconds (22205440 bytes)
test 4 (128 bit key, 8192 byte blocks):
This was caused by a race issue of missed BRDMA_DONE ("Block cipher
Receiving DMA") interrupt. Device starts processing the data in DMA mode
immediately after setting length of DMA block: receiving (FCBRDMAL) or
transmitting (FCBTDMAL). The driver sets these lengths from interrupt
handler through s5p_set_dma_indata() function (or xxx_setdata()).
However the interrupt handler was first dealing with receive buffer
(dma-unmap old, dma-map new, set receive block length which starts the
operation), then with transmit buffer and finally was clearing pending
interrupts (FCINTPEND). Because of the time window between setting
receive buffer length and clearing pending interrupts, the operation on
receive buffer could end already and driver would miss new interrupt.
User manual for Exynos5422 confirms in example code that setting DMA
block lengths should be the last operation.
The tcrypt hang could be also observed in following blocked-task dmesg:
INFO: task modprobe:258 blocked for more than 120 seconds.
Not tainted 4.6.0-rc4-next-20160419-00005-g9eac8b7b7753-dirty #42
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
modprobe D c06b09d8 0 258 256 0x00000000
[<c06b09d8>] (__schedule) from [<c06b0f24>] (schedule+0x40/0xac)
[<c06b0f24>] (schedule) from [<c06b49f8>] (schedule_timeout+0x124/0x178)
[<c06b49f8>] (schedule_timeout) from [<c06b17fc>] (wait_for_common+0xb8/0x144)
[<c06b17fc>] (wait_for_common) from [<bf0013b8>] (test_acipher_speed+0x49c/0x740 [tcrypt])
[<bf0013b8>] (test_acipher_speed [tcrypt]) from [<bf003e8c>] (do_test+0x2240/0x30ec [tcrypt])
[<bf003e8c>] (do_test [tcrypt]) from [<bf008048>] (tcrypt_mod_init+0x48/0xa4 [tcrypt])
[<bf008048>] (tcrypt_mod_init [tcrypt]) from [<c010177c>] (do_one_initcall+0x3c/0x16c)
[<c010177c>] (do_one_initcall) from [<c0191ff0>] (do_init_module+0x5c/0x1ac)
[<c0191ff0>] (do_init_module) from [<c0185610>] (load_module+0x1a30/0x1d08)
[<c0185610>] (load_module) from [<c0185ab0>] (SyS_finit_module+0x8c/0x98)
[<c0185ab0>] (SyS_finit_module) from [<c01078c0>] (ret_fast_syscall+0x0/0x3c)
Fixes: a49e490c7a8a ("crypto: s5p-sss - add S5PV210 advanced crypto engine support")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/crypto/s5p-sss.c | 53 +++++++++++++++++++++++++++++++++++-------------
1 file changed, 39 insertions(+), 14 deletions(-)
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -258,39 +258,51 @@ static int s5p_set_indata(struct s5p_aes
return err;
}
-static void s5p_aes_tx(struct s5p_aes_dev *dev)
+/*
+ * Returns true if new transmitting (output) data is ready and its
+ * address+length have to be written to device (by calling
+ * s5p_set_dma_outdata()). False otherwise.
+ */
+static bool s5p_aes_tx(struct s5p_aes_dev *dev)
{
int err = 0;
+ bool ret = false;
s5p_unset_outdata(dev);
if (!sg_is_last(dev->sg_dst)) {
err = s5p_set_outdata(dev, sg_next(dev->sg_dst));
- if (err) {
+ if (err)
s5p_aes_complete(dev, err);
- return;
- }
-
- s5p_set_dma_outdata(dev, dev->sg_dst);
+ else
+ ret = true;
} else
s5p_aes_complete(dev, err);
+
+ return ret;
}
-static void s5p_aes_rx(struct s5p_aes_dev *dev)
+/*
+ * Returns true if new receiving (input) data is ready and its
+ * address+length have to be written to device (by calling
+ * s5p_set_dma_indata()). False otherwise.
+ */
+static bool s5p_aes_rx(struct s5p_aes_dev *dev)
{
int err;
+ bool ret = false;
s5p_unset_indata(dev);
if (!sg_is_last(dev->sg_src)) {
err = s5p_set_indata(dev, sg_next(dev->sg_src));
- if (err) {
+ if (err)
s5p_aes_complete(dev, err);
- return;
- }
-
- s5p_set_dma_indata(dev, dev->sg_src);
+ else
+ ret = true;
}
+
+ return ret;
}
static irqreturn_t s5p_aes_interrupt(int irq, void *dev_id)
@@ -299,19 +311,32 @@ static irqreturn_t s5p_aes_interrupt(int
struct s5p_aes_dev *dev = platform_get_drvdata(pdev);
uint32_t status;
unsigned long flags;
+ bool set_dma_tx = false;
+ bool set_dma_rx = false;
spin_lock_irqsave(&dev->lock, flags);
if (irq == dev->irq_fc) {
status = SSS_READ(dev, FCINTSTAT);
if (status & SSS_FCINTSTAT_BRDMAINT)
- s5p_aes_rx(dev);
+ set_dma_rx = s5p_aes_rx(dev);
if (status & SSS_FCINTSTAT_BTDMAINT)
- s5p_aes_tx(dev);
+ set_dma_tx = s5p_aes_tx(dev);
SSS_WRITE(dev, FCINTPEND, status);
}
+ /*
+ * Writing length of DMA block (either receiving or transmitting)
+ * will start the operation immediately, so this should be done
+ * at the end (even after clearing pending interrupts to not miss the
+ * interrupt).
+ */
+ if (set_dma_tx)
+ s5p_set_dma_outdata(dev, dev->sg_dst);
+ if (set_dma_rx)
+ s5p_set_dma_indata(dev, dev->sg_src);
+
spin_unlock_irqrestore(&dev->lock, flags);
return IRQ_HANDLED;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 70/94] fs/nilfs2: fix potential underflow in call to crc32_le
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (11 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 75/94] batman-adv: Fix use-after-free/double-free of tt_req_node Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 13/94] USB: serial: option: add even more ZTE device ids Ben Hutchings
` (80 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Torsten Hilbrich, Ryusuke Konishi, Linus Torvalds
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Torsten Hilbrich <torsten.hilbrich@secunet.com>
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
Link: http://lkml.kernel.org/r/1466778587-5184-2-git-send-email-konishi.ryusuke@lab.ntt.co.jp
Signed-off-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Tested-by: Torsten Hilbrich <torsten.hilbrich@secunet.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/nilfs2/the_nilfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -425,7 +425,7 @@ static int nilfs_valid_sb(struct nilfs_s
if (!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);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 55/94] KEYS: potential uninitialized variable
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (39 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 28/94] fs/cifs: correctly to anonymous authentication for the NTLM(v2) authentication Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 33/94] xen/events: Don't move disabled irqs Ben Hutchings
` (52 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Linus Torvalds, Dan Carpenter, David Howells
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 38327424b40bcebe2de92d07312c89360ac9229a upstream.
If __key_link_begin() failed then "edit" would be uninitialized. I've
added a check to fix that.
This allows a random user to crash the kernel, though it's quite
difficult to achieve. There are three ways it can be done as the user
would have to cause an error to occur in __key_link():
(1) Cause the kernel to run out of memory. In practice, this is difficult
to achieve without ENOMEM cropping up elsewhere and aborting the
attempt.
(2) Revoke the destination keyring between the keyring ID being looked up
and it being tested for revocation. In practice, this is difficult to
time correctly because the KEYCTL_REJECT function can only be used
from the request-key upcall process. Further, users can only make use
of what's in /sbin/request-key.conf, though this does including a
rejection debugging test - which means that the destination keyring
has to be the caller's session keyring in practice.
(3) Have just enough key quota available to create a key, a new session
keyring for the upcall and a link in the session keyring, but not then
sufficient quota to create a link in the nominated destination keyring
so that it fails with EDQUOT.
The bug can be triggered using option (3) above using something like the
following:
echo 80 >/proc/sys/kernel/keys/root_maxbytes
keyctl request2 user debug:fred negate @t
The above sets the quota to something much lower (80) to make the bug
easier to trigger, but this is dependent on the system. Note also that
the name of the keyring created contains a random number that may be
between 1 and 10 characters in size, so may throw the test off by
changing the amount of quota used.
Assuming the failure occurs, something like the following will be seen:
kfree_debugcheck: out of range ptr 6b6b6b6b6b6b6b68h
------------[ cut here ]------------
kernel BUG at ../mm/slab.c:2821!
...
RIP: 0010:[<ffffffff811600f9>] kfree_debugcheck+0x20/0x25
RSP: 0018:ffff8804014a7de8 EFLAGS: 00010092
RAX: 0000000000000034 RBX: 6b6b6b6b6b6b6b68 RCX: 0000000000000000
RDX: 0000000000040001 RSI: 00000000000000f6 RDI: 0000000000000300
RBP: ffff8804014a7df0 R08: 0000000000000001 R09: 0000000000000000
R10: ffff8804014a7e68 R11: 0000000000000054 R12: 0000000000000202
R13: ffffffff81318a66 R14: 0000000000000000 R15: 0000000000000001
...
Call Trace:
kfree+0xde/0x1bc
assoc_array_cancel_edit+0x1f/0x36
__key_link_end+0x55/0x63
key_reject_and_link+0x124/0x155
keyctl_reject_key+0xb6/0xe0
keyctl_negate_key+0x10/0x12
SyS_keyctl+0x9f/0xe7
do_syscall_64+0x63/0x13a
entry_SYSCALL64_slow_path+0x25/0x25
Fixes: f70e2e06196a ('KEYS: Do preallocation for __key_link()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
security/keys/key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -572,7 +572,7 @@ int key_reject_and_link(struct key *key,
mutex_unlock(&key_construction_mutex);
- if (keyring)
+ if (keyring && link_ret == 0)
__key_link_end(keyring, key->type, prealloc);
/* wake up anyone waiting for a key to be constructed */
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 91/94] tipc: fix an infoleak in tipc_nl_compat_link_dump
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (32 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 08/94] aacraid: Fix for aac_command_thread hang Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 79/94] bonding: prevent out of bound accesses Ben Hutchings
` (59 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Kangjie Lu, David S. Miller, Kangjie Lu
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Kangjie Lu <kangjielu@gmail.com>
commit 5d2be1422e02ccd697ccfcd45c85b4a26e6178e2 upstream.
link_info.str is a char array of size 60. Memory after the NULL
byte is not initialized. Sending the whole object out can cause
a leak.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: the unpadded strcpy() is in tipc_node_get_links()
and no nlattr is involved, so use strncpy()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -485,7 +485,8 @@ struct sk_buff *tipc_node_get_links(cons
continue;
link_info.dest = htonl(n_ptr->addr);
link_info.up = htonl(tipc_link_is_up(n_ptr->links[i]));
- strcpy(link_info.str, n_ptr->links[i]->name);
+ strncpy(link_info.str, n_ptr->links[i]->name,
+ sizeof(link_info.str));
tipc_cfg_append_tlv(buf, TIPC_TLV_LINK_INFO,
&link_info, sizeof(link_info));
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 94/94] audit: fix a double fetch in audit_log_single_execve_arg()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (36 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 88/94] ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 41/94] parisc: Fix pagefault crash in unaligned __get_user() call Ben Hutchings
` (55 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Pengfei Wang, Paul Moore
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Paul Moore <paul@paul-moore.com>
commit 43761473c254b45883a64441dd0bc85a42f3645c upstream.
There is a double fetch problem in audit_log_single_execve_arg()
where we first check the execve(2) argumnets for any "bad" characters
which would require hex encoding and then re-fetch the arguments for
logging in the audit record[1]. Of course this leaves a window of
opportunity for an unsavory application to munge with the data.
This patch reworks things by only fetching the argument data once[2]
into a buffer where it is scanned and logged into the audit
records(s). In addition to fixing the double fetch, this patch
improves on the original code in a few other ways: better handling
of large arguments which require encoding, stricter record length
checking, and some performance improvements (completely unverified,
but we got rid of some strlen() calls, that's got to be a good
thing).
As part of the development of this patch, I've also created a basic
regression test for the audit-testsuite, the test can be tracked on
GitHub at the following link:
* https://github.com/linux-audit/audit-testsuite/issues/25
[1] If you pay careful attention, there is actually a triple fetch
problem due to a strnlen_user() call at the top of the function.
[2] This is a tiny white lie, we do make a call to strnlen_user()
prior to fetching the argument data. I don't like it, but due to the
way the audit record is structured we really have no choice unless we
copy the entire argument at once (which would require a rather
wasteful allocation). The good news is that with this patch the
kernel no longer relies on this strnlen_user() value for anything
beyond recording it in the log, we also update it with a trustworthy
value whenever possible.
Reported-by: Pengfei Wang <wpengfeinudt@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
[bwh: Backported to 3.2:
- In audit_log_execve_info() various information is retrieved via
the extra parameter struct audit_aux_data_execve *axi
- Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
kernel/auditsc.c | 332 +++++++++++++++++++++++++++----------------------------
1 file changed, 164 insertions(+), 168 deletions(-)
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -67,6 +67,7 @@
#include <linux/syscalls.h>
#include <linux/capability.h>
#include <linux/fs_struct.h>
+#include <linux/uaccess.h>
#include "audit.h"
@@ -77,7 +78,8 @@
/* Indicates that audit should log the full pathname. */
#define AUDIT_NAME_FULL -1
-/* no execve audit message should be longer than this (userspace limits) */
+/* no execve audit message should be longer than this (userspace limits),
+ * see the note near the top of audit_log_execve_info() about this value */
#define MAX_EXECVE_AUDIT_LEN 7500
/* number of audit rules */
@@ -1026,189 +1028,184 @@ static int audit_log_pid_context(struct
return rc;
}
-/*
- * to_send and len_sent accounting are very loose estimates. We aren't
- * really worried about a hard cap to MAX_EXECVE_AUDIT_LEN so much as being
- * within about 500 bytes (next page boundary)
- *
- * why snprintf? an int is up to 12 digits long. if we just assumed when
- * logging that a[%d]= was going to be 16 characters long we would be wasting
- * space in every audit message. In one 7500 byte message we can log up to
- * about 1000 min size arguments. That comes down to about 50% waste of space
- * if we didn't do the snprintf to find out how long arg_num_len was.
- */
-static int audit_log_single_execve_arg(struct audit_context *context,
- struct audit_buffer **ab,
- int arg_num,
- size_t *len_sent,
- const char __user *p,
- char *buf)
-{
- char arg_num_len_buf[12];
- const char __user *tmp_p = p;
- /* how many digits are in arg_num? 5 is the length of ' a=""' */
- size_t arg_num_len = snprintf(arg_num_len_buf, 12, "%d", arg_num) + 5;
- size_t len, len_left, to_send;
- size_t max_execve_audit_len = MAX_EXECVE_AUDIT_LEN;
- unsigned int i, has_cntl = 0, too_long = 0;
- int ret;
-
- /* strnlen_user includes the null we don't want to send */
- len_left = len = strnlen_user(p, MAX_ARG_STRLEN) - 1;
-
- /*
- * We just created this mm, if we can't find the strings
- * we just copied into it something is _very_ wrong. Similar
- * for strings that are too long, we should not have created
- * any.
- */
- if (unlikely((len == -1) || len > MAX_ARG_STRLEN - 1)) {
- WARN_ON(1);
- send_sig(SIGKILL, current, 0);
- return -1;
- }
-
- /* walk the whole argument looking for non-ascii chars */
- do {
- if (len_left > MAX_EXECVE_AUDIT_LEN)
- to_send = MAX_EXECVE_AUDIT_LEN;
- else
- to_send = len_left;
- ret = copy_from_user(buf, tmp_p, to_send);
- /*
- * There is no reason for this copy to be short. We just
- * copied them here, and the mm hasn't been exposed to user-
- * space yet.
- */
- if (ret) {
- WARN_ON(1);
- send_sig(SIGKILL, current, 0);
- return -1;
- }
- buf[to_send] = '\0';
- has_cntl = audit_string_contains_control(buf, to_send);
- if (has_cntl) {
- /*
- * hex messages get logged as 2 bytes, so we can only
- * send half as much in each message
- */
- max_execve_audit_len = MAX_EXECVE_AUDIT_LEN / 2;
- break;
- }
- len_left -= to_send;
- tmp_p += to_send;
- } while (len_left > 0);
-
- len_left = len;
-
- if (len > max_execve_audit_len)
- too_long = 1;
-
- /* rewalk the argument actually logging the message */
- for (i = 0; len_left > 0; i++) {
- int room_left;
-
- if (len_left > max_execve_audit_len)
- to_send = max_execve_audit_len;
- else
- to_send = len_left;
-
- /* do we have space left to send this argument in this ab? */
- room_left = MAX_EXECVE_AUDIT_LEN - arg_num_len - *len_sent;
- if (has_cntl)
- room_left -= (to_send * 2);
- else
- room_left -= to_send;
- if (room_left < 0) {
- *len_sent = 0;
- audit_log_end(*ab);
- *ab = audit_log_start(context, GFP_KERNEL, AUDIT_EXECVE);
- if (!*ab)
- return 0;
- }
-
- /*
- * first record needs to say how long the original string was
- * so we can be sure nothing was lost.
- */
- if ((i == 0) && (too_long))
- audit_log_format(*ab, " a%d_len=%zu", arg_num,
- has_cntl ? 2*len : len);
-
- /*
- * normally arguments are small enough to fit and we already
- * filled buf above when we checked for control characters
- * so don't bother with another copy_from_user
- */
- if (len >= max_execve_audit_len)
- ret = copy_from_user(buf, p, to_send);
- else
- ret = 0;
- if (ret) {
- WARN_ON(1);
- send_sig(SIGKILL, current, 0);
- return -1;
- }
- buf[to_send] = '\0';
-
- /* actually log it */
- audit_log_format(*ab, " a%d", arg_num);
- if (too_long)
- audit_log_format(*ab, "[%d]", i);
- audit_log_format(*ab, "=");
- if (has_cntl)
- audit_log_n_hex(*ab, buf, to_send);
- else
- audit_log_string(*ab, buf);
-
- p += to_send;
- len_left -= to_send;
- *len_sent += arg_num_len;
- if (has_cntl)
- *len_sent += to_send * 2;
- else
- *len_sent += to_send;
- }
- /* include the null we didn't log */
- return len + 1;
-}
-
static void audit_log_execve_info(struct audit_context *context,
struct audit_buffer **ab,
struct audit_aux_data_execve *axi)
{
- int i;
- size_t len, len_sent = 0;
- const char __user *p;
+ long len_max;
+ long len_rem;
+ long len_full;
+ long len_buf;
+ long len_abuf;
+ long len_tmp;
+ bool require_data;
+ bool encode;
+ unsigned int iter;
+ unsigned int arg;
+ char *buf_head;
char *buf;
+ const char __user *p;
+
+ /* NOTE: this buffer needs to be large enough to hold all the non-arg
+ * data we put in the audit record for this argument (see the
+ * code below) ... at this point in time 96 is plenty */
+ char abuf[96];
if (axi->mm != current->mm)
return; /* execve failed, no additional info */
p = (const char __user *)axi->mm->arg_start;
- audit_log_format(*ab, "argc=%d", axi->argc);
-
- /*
- * we need some kernel buffer to hold the userspace args. Just
- * allocate one big one rather than allocating one of the right size
- * for every single argument inside audit_log_single_execve_arg()
- * should be <8k allocation so should be pretty safe.
- */
- buf = kmalloc(MAX_EXECVE_AUDIT_LEN + 1, GFP_KERNEL);
- if (!buf) {
+ /* NOTE: we set MAX_EXECVE_AUDIT_LEN to a rather arbitrary limit, the
+ * current value of 7500 is not as important as the fact that it
+ * is less than 8k, a setting of 7500 gives us plenty of wiggle
+ * room if we go over a little bit in the logging below */
+ WARN_ON_ONCE(MAX_EXECVE_AUDIT_LEN > 7500);
+ len_max = MAX_EXECVE_AUDIT_LEN;
+
+ /* scratch buffer to hold the userspace args */
+ buf_head = kmalloc(MAX_EXECVE_AUDIT_LEN + 1, GFP_KERNEL);
+ if (!buf_head) {
audit_panic("out of memory for argv string\n");
return;
}
+ buf = buf_head;
- for (i = 0; i < axi->argc; i++) {
- len = audit_log_single_execve_arg(context, ab, i,
- &len_sent, p, buf);
- if (len <= 0)
- break;
- p += len;
- }
- kfree(buf);
+ audit_log_format(*ab, "argc=%d", axi->argc);
+
+ len_rem = len_max;
+ len_buf = 0;
+ len_full = 0;
+ require_data = true;
+ encode = false;
+ iter = 0;
+ arg = 0;
+ do {
+ /* NOTE: we don't ever want to trust this value for anything
+ * serious, but the audit record format insists we
+ * provide an argument length for really long arguments,
+ * e.g. > MAX_EXECVE_AUDIT_LEN, so we have no choice but
+ * to use strncpy_from_user() to obtain this value for
+ * recording in the log, although we don't use it
+ * anywhere here to avoid a double-fetch problem */
+ if (len_full == 0)
+ len_full = strnlen_user(p, MAX_ARG_STRLEN) - 1;
+
+ /* read more data from userspace */
+ if (require_data) {
+ /* can we make more room in the buffer? */
+ if (buf != buf_head) {
+ memmove(buf_head, buf, len_buf);
+ buf = buf_head;
+ }
+
+ /* fetch as much as we can of the argument */
+ len_tmp = strncpy_from_user(&buf_head[len_buf], p,
+ len_max - len_buf);
+ if (len_tmp == -EFAULT) {
+ /* unable to copy from userspace */
+ send_sig(SIGKILL, current, 0);
+ goto out;
+ } else if (len_tmp == (len_max - len_buf)) {
+ /* buffer is not large enough */
+ require_data = true;
+ /* NOTE: if we are going to span multiple
+ * buffers force the encoding so we stand
+ * a chance at a sane len_full value and
+ * consistent record encoding */
+ encode = true;
+ len_full = len_full * 2;
+ p += len_tmp;
+ } else {
+ require_data = false;
+ if (!encode)
+ encode = audit_string_contains_control(
+ buf, len_tmp);
+ /* try to use a trusted value for len_full */
+ if (len_full < len_max)
+ len_full = (encode ?
+ len_tmp * 2 : len_tmp);
+ p += len_tmp + 1;
+ }
+ len_buf += len_tmp;
+ buf_head[len_buf] = '\0';
+
+ /* length of the buffer in the audit record? */
+ len_abuf = (encode ? len_buf * 2 : len_buf + 2);
+ }
+
+ /* write as much as we can to the audit log */
+ if (len_buf > 0) {
+ /* NOTE: some magic numbers here - basically if we
+ * can't fit a reasonable amount of data into the
+ * existing audit buffer, flush it and start with
+ * a new buffer */
+ if ((sizeof(abuf) + 8) > len_rem) {
+ len_rem = len_max;
+ audit_log_end(*ab);
+ *ab = audit_log_start(context,
+ GFP_KERNEL, AUDIT_EXECVE);
+ if (!*ab)
+ goto out;
+ }
+
+ /* create the non-arg portion of the arg record */
+ len_tmp = 0;
+ if (require_data || (iter > 0) ||
+ ((len_abuf + sizeof(abuf)) > len_rem)) {
+ if (iter == 0) {
+ len_tmp += snprintf(&abuf[len_tmp],
+ sizeof(abuf) - len_tmp,
+ " a%d_len=%lu",
+ arg, len_full);
+ }
+ len_tmp += snprintf(&abuf[len_tmp],
+ sizeof(abuf) - len_tmp,
+ " a%d[%d]=", arg, iter++);
+ } else
+ len_tmp += snprintf(&abuf[len_tmp],
+ sizeof(abuf) - len_tmp,
+ " a%d=", arg);
+ WARN_ON(len_tmp >= sizeof(abuf));
+ abuf[sizeof(abuf) - 1] = '\0';
+
+ /* log the arg in the audit record */
+ audit_log_format(*ab, "%s", abuf);
+ len_rem -= len_tmp;
+ len_tmp = len_buf;
+ if (encode) {
+ if (len_abuf > len_rem)
+ len_tmp = len_rem / 2; /* encoding */
+ audit_log_n_hex(*ab, buf, len_tmp);
+ len_rem -= len_tmp * 2;
+ len_abuf -= len_tmp * 2;
+ } else {
+ if (len_abuf > len_rem)
+ len_tmp = len_rem - 2; /* quotes */
+ audit_log_n_string(*ab, buf, len_tmp);
+ len_rem -= len_tmp + 2;
+ /* don't subtract the "2" because we still need
+ * to add quotes to the remaining string */
+ len_abuf -= len_tmp;
+ }
+ len_buf -= len_tmp;
+ buf += len_tmp;
+ }
+
+ /* ready to move to the next argument? */
+ if ((len_buf == 0) && !require_data) {
+ arg++;
+ iter = 0;
+ len_full = 0;
+ require_data = true;
+ encode = false;
+ }
+ } while (arg < axi->argc);
+
+ /* NOTE: the caller handles the final audit_log_end() call */
+
+out:
+ kfree(buf_head);
}
static void audit_log_cap(struct audit_buffer *ab, char *prefix, kernel_cap_t *cap)
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 49/94] iio: Fix error handling in iio_trigger_attach_poll_func
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (65 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 32/94] wait/ptrace: assume __WALL if the child is traced Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 54/94] kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES Ben Hutchings
` (26 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Jonathan Cameron, Crestez Dan Leonard
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Crestez Dan Leonard <leonard.crestez@intel.com>
commit 99543823357966ac938d9a310947e731b67338e6 upstream.
When attaching a pollfunc iio_trigger_attach_poll_func will allocate a
virtual irq and call the driver's set_trigger_state function. Fix error
handling to undo previous steps if any fails.
In particular this fixes handling errors from a driver's
set_trigger_state function. When using triggered buffers a failure to
enable the trigger used to make the buffer unusable.
Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/staging/iio/industrialio-trigger.c | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
--- a/drivers/staging/iio/industrialio-trigger.c
+++ b/drivers/staging/iio/industrialio-trigger.c
@@ -218,22 +218,35 @@ static int iio_trigger_attach_poll_func(
/* Prevent the module being removed whilst attached to a trigger */
__module_get(pf->indio_dev->info->driver_module);
+
+ /* Get irq number */
pf->irq = iio_trigger_get_irq(trig);
+ if (pf->irq < 0)
+ goto out_put_module;
+
+ /* Request irq */
ret = request_threaded_irq(pf->irq, pf->h, pf->thread,
pf->type, pf->name,
pf);
- if (ret < 0) {
- module_put(pf->indio_dev->info->driver_module);
- return ret;
- }
+ if (ret < 0)
+ goto out_put_irq;
+ /* Enable trigger in driver */
if (trig->ops && trig->ops->set_trigger_state && notinuse) {
ret = trig->ops->set_trigger_state(trig, true);
if (ret < 0)
- module_put(pf->indio_dev->info->driver_module);
+ goto out_free_irq;
}
return ret;
+
+out_free_irq:
+ free_irq(pf->irq, pf);
+out_put_irq:
+ iio_trigger_put_irq(trig, pf->irq);
+out_put_module:
+ module_put(pf->indio_dev->info->driver_module);
+ return ret;
}
static int iio_trigger_dettach_poll_func(struct iio_trigger *trig,
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 30/94] net: ehea: avoid null pointer dereference
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (70 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 60/94] ubi: Make recover_peb power cut aware Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 04/94] PCI: Supply CPU physical address (not bus address) to iomem_is_exclusive() Ben Hutchings
` (21 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, xypron.glpk@gmx.de, David S. Miller,
Thadeu Lima de Souza Cascardo
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: "xypron.glpk@gmx.de" <xypron.glpk@gmx.de>
commit 1740c29a46b30a2f157afc473156f157e599d4c2 upstream.
ehea_get_port may return NULL. Do not dereference NULL value.
Fixes: 8c4877a4128e ("ehea: Use the standard logging functions")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/ethernet/ibm/ehea/ehea_main.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -1157,16 +1157,15 @@ static void ehea_parse_eqe(struct ehea_a
ec = EHEA_BMASK_GET(NEQE_EVENT_CODE, eqe);
portnum = EHEA_BMASK_GET(NEQE_PORTNUM, eqe);
port = ehea_get_port(adapter, portnum);
+ if (!port) {
+ netdev_err(NULL, "unknown portnum %x\n", portnum);
+ return;
+ }
dev = port->netdev;
switch (ec) {
case EHEA_EC_PORTSTATE_CHG: /* port state change */
- if (!port) {
- netdev_err(dev, "unknown portnum %x\n", portnum);
- break;
- }
-
if (EHEA_BMASK_GET(NEQE_PORT_UP, eqe)) {
if (!netif_carrier_ok(dev)) {
ret = ehea_sense_port_attr(port);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 53/94] base: make module_create_drivers_dir race-free
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (74 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 09/94] ext4: fix hang when processing corrupted orphaned inode list Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 67/94] Input: elantech - add more IC body types to the list Ben Hutchings
` (17 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Greg Kroah-Hartman, Jiri Slaby
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Slaby <jslaby@suse.cz>
commit 7e1b1fc4dabd6ec8e28baa0708866e13fa93c9b3 upstream.
Modules which register drivers via standard path (driver_register) in
parallel can cause a warning:
WARNING: CPU: 2 PID: 3492 at ../fs/sysfs/dir.c:31 sysfs_warn_dup+0x62/0x80
sysfs: cannot create duplicate filename '/module/saa7146/drivers'
Modules linked in: hexium_gemini(+) mxb(+) ...
...
Call Trace:
...
[<ffffffff812e63a2>] sysfs_warn_dup+0x62/0x80
[<ffffffff812e6487>] sysfs_create_dir_ns+0x77/0x90
[<ffffffff8140f2c4>] kobject_add_internal+0xb4/0x340
[<ffffffff8140f5b8>] kobject_add+0x68/0xb0
[<ffffffff8140f631>] kobject_create_and_add+0x31/0x70
[<ffffffff8157a703>] module_add_driver+0xc3/0xd0
[<ffffffff8155e5d4>] bus_add_driver+0x154/0x280
[<ffffffff815604c0>] driver_register+0x60/0xe0
[<ffffffff8145bed0>] __pci_register_driver+0x60/0x70
[<ffffffffa0273e14>] saa7146_register_extension+0x64/0x90 [saa7146]
[<ffffffffa0033011>] hexium_init_module+0x11/0x1000 [hexium_gemini]
...
As can be (mostly) seen, driver_register causes this call sequence:
-> bus_add_driver
-> module_add_driver
-> module_create_drivers_dir
The last one creates "drivers" directory in /sys/module/<...>. When
this is done in parallel, the directory is attempted to be created
twice at the same time.
This can be easily reproduced by loading mxb and hexium_gemini in
parallel:
while :; do
modprobe mxb &
modprobe hexium_gemini
wait
rmmod mxb hexium_gemini saa7146_vv saa7146
done
saa7146 calls pci_register_driver for both mxb and hexium_gemini,
which means /sys/module/saa7146/drivers is to be created for both of
them.
Fix this by a new mutex in module_create_drivers_dir which makes the
test-and-create "drivers" dir atomic.
I inverted the condition and removed 'return' to avoid multiple
unlocks or a goto.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Fixes: fe480a2675ed (Modules: only add drivers/ direcory if needed)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/base/module.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/drivers/base/module.c
+++ b/drivers/base/module.c
@@ -24,10 +24,12 @@ static char *make_driver_name(struct dev
static void module_create_drivers_dir(struct module_kobject *mk)
{
- if (!mk || mk->drivers_dir)
- return;
+ static DEFINE_MUTEX(drivers_dir_mutex);
- mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj);
+ mutex_lock(&drivers_dir_mutex);
+ if (mk && !mk->drivers_dir)
+ mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj);
+ mutex_unlock(&drivers_dir_mutex);
}
void module_add_driver(struct module *mod, struct device_driver *drv)
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 16/94] gcov: disable tree-loop-im to reduce stack usage
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (13 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 13/94] USB: serial: option: add even more ZTE device ids Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 37/94] Input: pwm-beeper - fix - scheduling while atomic Ben Hutchings
` (78 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Arnd Bergmann, Michal Marek, Peter Oberparleiter
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <arnd@arndb.de>
commit c87bf431448b404a6ef5fbabd74c0e3e42157a7f upstream.
Enabling CONFIG_GCOV_PROFILE_ALL produces us a lot of warnings like
lib/lz4/lz4hc_compress.c: In function 'lz4_compresshcctx':
lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1504 bytes is larger than 1024 bytes [-Wframe-larger-than=]
After some investigation, I found that this behavior started with gcc-4.9,
and opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69702.
A suggested workaround for it is to use the -fno-tree-loop-im
flag that turns off one of the optimization stages in gcc, so the
code runs a little slower but does not use excessive amounts
of stack.
We could make this conditional on the gcc version, but I could not
find an easy way to do this in Kbuild and the benefit would be
fairly small, given that most of the gcc version in production are
affected now.
I'm marking this for 'stable' backports because it addresses a bug
with code generation in gcc that exists in all kernel versions
with the affected gcc releases.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/Makefile
+++ b/Makefile
@@ -352,7 +352,7 @@ AFLAGS_MODULE =
LDFLAGS_MODULE =
CFLAGS_KERNEL =
AFLAGS_KERNEL =
-CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
+CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im
# Use LINUXINCLUDE when you must reference the include/ directory.
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 44/94] wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (49 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 26/94] fs/cifs: correctly to anonymous authentication for the LANMAN authentication Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-15 5:51 ` Johannes Berg
2016-08-13 17:42 ` [PATCH 3.2 80/94] ALSA: timer: Fix negative queue usage by racy accesses Ben Hutchings
` (42 subsequent siblings)
93 siblings, 1 reply; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Prasun Maiti, Johannes Berg, Ujjal Roy, Dibyajyoti Ghosh
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Prasun Maiti <prasunmaiti87@gmail.com>
commit 3d5fdff46c4b2b9534fa2f9fc78e90a48e0ff724 upstream.
iwpriv app uses iw_point structure to send data to Kernel. The iw_point
structure holds a pointer. For compatibility Kernel converts the pointer
as required for WEXT IOCTLs (SIOCIWFIRST to SIOCIWLAST). Some drivers
may use iw_handler_def.private_args to populate iwpriv commands instead
of iw_handler_def.private. For those case, the IOCTLs from
SIOCIWFIRSTPRIV to SIOCIWLASTPRIV will follow the path ndo_do_ioctl().
Accordingly when the filled up iw_point structure comes from 32 bit
iwpriv to 64 bit Kernel, Kernel will not convert the pointer and sends
it to driver. So, the driver may get the invalid data.
The pointer conversion for the IOCTLs (SIOCIWFIRSTPRIV to
SIOCIWLASTPRIV), which follow the path ndo_do_ioctl(), is mandatory.
This patch adds pointer conversion from 32 bit to 64 bit and vice versa,
if the ioctl comes from 32 bit iwpriv to 64 bit Kernel.
Signed-off-by: Prasun Maiti <prasunmaiti87@gmail.com>
Signed-off-by: Ujjal Roy <royujjal@gmail.com>
Tested-by: Dibyajyoti Ghosh <dibyajyotig@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
net/wireless/wext-core.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
--- a/net/wireless/wext-core.c
+++ b/net/wireless/wext-core.c
@@ -952,8 +952,29 @@ static int wireless_process_ioctl(struct
return private(dev, iwr, cmd, info, handler);
}
/* Old driver API : call driver ioctl handler */
- if (dev->netdev_ops->ndo_do_ioctl)
- return dev->netdev_ops->ndo_do_ioctl(dev, ifr, cmd);
+ if (dev->netdev_ops->ndo_do_ioctl) {
+#ifdef CONFIG_COMPAT
+ if (info->flags & IW_REQUEST_FLAG_COMPAT) {
+ int ret = 0;
+ struct iwreq iwr_lcl;
+ struct compat_iw_point *iwp_compat = (void *) &iwr->u.data;
+
+ memcpy(&iwr_lcl, iwr, sizeof(struct iwreq));
+ iwr_lcl.u.data.pointer = compat_ptr(iwp_compat->pointer);
+ iwr_lcl.u.data.length = iwp_compat->length;
+ iwr_lcl.u.data.flags = iwp_compat->flags;
+
+ ret = dev->netdev_ops->ndo_do_ioctl(dev, (void *) &iwr_lcl, cmd);
+
+ iwp_compat->pointer = ptr_to_compat(iwr_lcl.u.data.pointer);
+ iwp_compat->length = iwr_lcl.u.data.length;
+ iwp_compat->flags = iwr_lcl.u.data.flags;
+
+ return ret;
+ } else
+#endif
+ return dev->netdev_ops->ndo_do_ioctl(dev, ifr, cmd);
+ }
return -EOPNOTSUPP;
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 58/94] hwmon: (dell-smm) Restrict fan control and serial number to CAP_SYS_ADMIN by default
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (4 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 03/94] crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 40/94] KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS Ben Hutchings
` (87 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Guenter Roeck, Mario Limonciello, Pali Rohár
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <pali.rohar@gmail.com>
commit 7613663cc186f8f3c50279390ddc60286758001c upstream.
For security reasons ordinary user must not be able to control fan speed
via /proc/i8k by default. Some malicious software running under "nobody"
user could be able to turn fan off and cause HW problems. So this patch
changes default value of "restricted" parameter to 1.
Also restrict reading of DMI_PRODUCT_SERIAL from /proc/i8k via "restricted"
parameter. It is because non root user cannot read DMI_PRODUCT_SERIAL from
sysfs file /sys/class/dmi/id/product_serial.
Old non secure behaviour of file /proc/i8k can be achieved by loading this
module with "restricted" parameter set to 0.
Note that this patch has effects only for kernels compiled with CONFIG_I8K
and only for file /proc/i8k. Hwmon interface provided by this driver was
not changed and root access for setting fan speed was needed also before.
Reported-by: Mario Limonciello <Mario_Limonciello@dell.com>
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/char/i8k.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
--- a/drivers/char/i8k.c
+++ b/drivers/char/i8k.c
@@ -63,6 +63,7 @@
static DEFINE_MUTEX(i8k_mutex);
static char bios_version[4];
+static char bios_machineid[16];
static struct device *i8k_hwmon_dev;
MODULE_AUTHOR("Massimo Dal Zotto (dz@debian.org)");
@@ -77,13 +78,13 @@ static int ignore_dmi;
module_param(ignore_dmi, bool, 0);
MODULE_PARM_DESC(ignore_dmi, "Continue probing hardware even if DMI data does not match");
-static int restricted;
+static int restricted = true;
module_param(restricted, bool, 0);
-MODULE_PARM_DESC(restricted, "Allow fan control if SYS_ADMIN capability set");
+MODULE_PARM_DESC(restricted, "Restrict fan control and serial number to CAP_SYS_ADMIN (default: 1)");
static int power_status;
module_param(power_status, bool, 0600);
-MODULE_PARM_DESC(power_status, "Report power status in /proc/i8k");
+MODULE_PARM_DESC(power_status, "Report power status in /proc/i8k (default: 0)");
static int fan_mult = I8K_FAN_MULT;
module_param(fan_mult, int, 0);
@@ -332,8 +333,11 @@ i8k_ioctl_unlocked(struct file *fp, unsi
break;
case I8K_MACHINE_ID:
- memset(buff, 0, 16);
- strlcpy(buff, i8k_get_dmi_data(DMI_PRODUCT_SERIAL), sizeof(buff));
+ if (restricted && !capable(CAP_SYS_ADMIN))
+ return -EPERM;
+
+ memset(buff, 0, sizeof(buff));
+ strlcpy(buff, bios_machineid, sizeof(buff));
break;
case I8K_FN_STATUS:
@@ -450,7 +454,7 @@ static int i8k_proc_show(struct seq_file
return seq_printf(seq, "%s %s %s %d %d %d %d %d %d %d\n",
I8K_PROC_FMT,
bios_version,
- i8k_get_dmi_data(DMI_PRODUCT_SERIAL),
+ (restricted && !capable(CAP_SYS_ADMIN)) ? "-1" : bios_machineid,
cpu_temp,
left_fan, right_fan, left_speed, right_speed,
ac_power, fn_key);
@@ -697,6 +701,8 @@ static int __init i8k_probe(void)
}
strlcpy(bios_version, i8k_get_dmi_data(DMI_BIOS_VERSION), sizeof(bios_version));
+ strlcpy(bios_machineid, i8k_get_dmi_data(DMI_PRODUCT_SERIAL),
+ sizeof(bios_machineid));
/*
* Get SMM Dell signature
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 05/94] alpha/PCI: Call iomem_is_exclusive() for IORESOURCE_MEM, but not IORESOURCE_IO
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (19 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 84/94] cifs: dynamic allocation of ntlmssp blob Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 34/94] RDMA/cxgb3: device driver frees DMA memory with different size Ben Hutchings
` (72 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Ivan Kokshaysky, Bjorn Helgaas
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Bjorn Helgaas <bhelgaas@google.com>
commit c20e128030caf0537d5e906753eac1c28fefdb75 upstream.
The alpha pci_mmap_resource() is used for both IORESOURCE_MEM and
IORESOURCE_IO resources, but iomem_is_exclusive() is only applicable for
IORESOURCE_MEM.
Call iomem_is_exclusive() only for IORESOURCE_MEM resources, and do it
earlier to match the generic version of pci_mmap_resource().
Fixes: 10a0ef39fbd1 ("PCI/alpha: pci sysfs resources")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/alpha/kernel/pci-sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/alpha/kernel/pci-sysfs.c
+++ b/arch/alpha/kernel/pci-sysfs.c
@@ -78,10 +78,10 @@ static int pci_mmap_resource(struct kobj
if (i >= PCI_ROM_RESOURCE)
return -ENODEV;
- if (!__pci_mmap_fits(pdev, i, vma, sparse))
+ if (res->flags & IORESOURCE_MEM && iomem_is_exclusive(res->start))
return -EINVAL;
- if (iomem_is_exclusive(res->start))
+ if (!__pci_mmap_fits(pdev, i, vma, sparse))
return -EINVAL;
pcibios_resource_to_bus(pdev, &bar, res);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 76/94] ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (90 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 11/94] tty: vt, return error when con_startup fails Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 74/94] NFS: Fix another OPEN_DOWNGRADE bug Ben Hutchings
2016-08-13 20:42 ` [PATCH 3.2 00/94] 3.2.82-rc1 review Guenter Roeck
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Takashi Iwai, Dan Carpenter
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 62db7152c924e4c060e42b34a69cd39658e8a0dc upstream.
vortex_wtdma_bufshift() function does calculate the page index
wrongly, first masking then shift, which always results in zero.
The proper computation is to first shift, then mask.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
sound/pci/au88x0/au88x0_core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/sound/pci/au88x0/au88x0_core.c
+++ b/sound/pci/au88x0/au88x0_core.c
@@ -1444,9 +1444,8 @@ static int vortex_wtdma_bufshift(vortex_
int page, p, pp, delta, i;
page =
- (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2)) &
- WT_SUBBUF_MASK)
- >> WT_SUBBUF_SHIFT;
+ (hwread(vortex->mmio, VORTEX_WTDMA_STAT + (wtdma << 2))
+ >> WT_SUBBUF_SHIFT) & WT_SUBBUF_MASK;
if (dma->nr_periods >= 4)
delta = (page - dma->period_real) & 3;
else {
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 78/94] etherdevice: introduce help function eth_zero_addr()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (85 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 01/94] regmap: cache: Fix typo in cache_bypass parameter description Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 06/94] crypto: s5p-sss - fix incorrect usage of scatterlists api Ben Hutchings
` (6 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, David S. Miller, Duan Jiong
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Duan Jiong <djduanjiong@gmail.com>
commit 6d57e9078e880a3dd232d579f42ac437a8f1ef7b upstream.
a lot of code has either the memset or an inefficient copy
from a static array that contains the all-zeros Ethernet address.
Introduce help function eth_zero_addr() to fill an address with
all zeros, making the code clearer and allowing us to get rid of
some constant arrays.
Signed-off-by: Duan Jiong <djduanjiong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
include/linux/etherdevice.h | 11 +++++++++++
1 file changed, 11 insertions(+)
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -140,6 +140,17 @@ static inline void random_ether_addr(u8
}
/**
+ * eth_zero_addr - Assign zero address
+ * @addr: Pointer to a six-byte array containing the Ethernet address
+ *
+ * Assign the zero address to the given address array.
+ */
+static inline void eth_zero_addr(u8 *addr)
+{
+ memset(addr, 0x00, ETH_ALEN);
+}
+
+/**
* dev_hw_addr_random - Create random MAC and set device flag
* @dev: pointer to net_device structure
* @hwaddr: Pointer to a six-byte array containing the Ethernet address
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 61/94] mm: Export migrate_page_move_mapping and migrate_page_copy
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 35/94] Input: xpad - prevent spurious input from wired Xbox 360 controllers Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 27/94] fs/cifs: correctly to anonymous authentication for the NTLM(v1) authentication Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 02/94] ath5k: Change led pin configuration for compaq c700 laptop Ben Hutchings
` (90 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Richard Weinberger, Christoph Hellwig
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Richard Weinberger <richard@nod.at>
commit 1118dce773d84f39ebd51a9fe7261f9169cb056e upstream.
Export these symbols such that UBIFS can implement
->migratepage.
Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Christoph Hellwig <hch@lst.de>
[bwh: Backported to 3.2: also change migrate_page_move_mapping() from
static to extern, done as part of an earlier commit upstream]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
mm/migrate.c | 2 ++
1 file changed, 2 insertions(+)
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -294,7 +294,7 @@ static inline bool buffer_migrate_lock_b
* 2 for pages with a mapping
* 3 for pages with a mapping and PagePrivate/PagePrivate2 set.
*/
-static int migrate_page_move_mapping(struct address_space *mapping,
+int migrate_page_move_mapping(struct address_space *mapping,
struct page *newpage, struct page *page,
struct buffer_head *head, enum migrate_mode mode)
{
@@ -377,6 +377,7 @@ static int migrate_page_move_mapping(str
return 0;
}
+EXPORT_SYMBOL(migrate_page_move_mapping);
/*
* The expected number of remaining references is the same as that
@@ -476,6 +477,7 @@ void migrate_page_copy(struct page *newp
if (PageWriteback(newpage))
end_page_writeback(newpage);
}
+EXPORT_SYMBOL(migrate_page_copy);
/************************************************************
* Migration functions
--- a/include/linux/migrate.h
+++ b/include/linux/migrate.h
@@ -43,6 +43,9 @@ extern int migrate_vmas(struct mm_struct
extern void migrate_page_copy(struct page *newpage, struct page *page);
extern int migrate_huge_page_move_mapping(struct address_space *mapping,
struct page *newpage, struct page *page);
+extern int migrate_page_move_mapping(struct address_space *mapping,
+ struct page *newpage, struct page *page,
+ struct buffer_head *head, enum migrate_mode mode);
#else
#define PAGE_MIGRATION 0
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 50/94] drm/radeon: fix asic initialization for virtualized environments
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (44 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 17/94] ata: sata_dwc_460ex: remove incorrect locking Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 15/94] MIPS: Adjust set_pte() SMP fix to handle R10000_LLSC_WAR Ben Hutchings
` (47 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Andres Rodriguez, Alex Williamson, Alex Deucher
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Alex Deucher <alexander.deucher@amd.com>
commit 05082b8bbd1a0ffc74235449c4b8930a8c240f85 upstream.
When executing in a PCI passthrough based virtuzliation environment, the
hypervisor will usually attempt to send a PCIe bus reset signal to the
ASIC when the VM reboots. In this scenario, the card is not correctly
initialized, but we still consider it to be posted. Therefore, in a
passthrough based environemnt we should always post the card to guarantee
it is in a good state for driver initialization.
Ported from amdgpu commit:
amdgpu: fix asic initialization for virtualized environments
Cc: Andres Rodriguez <andres.rodriguez@amd.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/gpu/drm/radeon/radeon_device.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -350,10 +350,31 @@ void radeon_gtt_location(struct radeon_d
/*
* GPU helpers function.
*/
+
+/**
+ * radeon_device_is_virtual - check if we are running is a virtual environment
+ *
+ * Check if the asic has been passed through to a VM (all asics).
+ * Used at driver startup.
+ * Returns true if virtual or false if not.
+ */
+static bool radeon_device_is_virtual(void)
+{
+#ifdef CONFIG_X86
+ return boot_cpu_has(X86_FEATURE_HYPERVISOR);
+#else
+ return false;
+#endif
+}
+
bool radeon_card_posted(struct radeon_device *rdev)
{
uint32_t reg;
+ /* for pass through, always force asic_init */
+ if (radeon_device_is_virtual())
+ return false;
+
if (efi_enabled(EFI_BOOT) &&
rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE)
return false;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 21/94] mmc: mmc: Fix partition switch timeout for some eMMCs
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (7 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 92/94] rds: fix an infoleak in rds_inc_info_copy Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 23/94] x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs Ben Hutchings
` (84 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Adrian Hunter, Ulf Hansson
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Adrian Hunter <adrian.hunter@intel.com>
commit 1c447116d017a98c90f8f71c8c5a611e0aa42178 upstream.
Some eMMCs set the partition switch timeout too low.
Now typically eMMCs are considered a critical component (e.g. because
they store the root file system) and consequently are expected to be
reliable. Thus we can neglect the use case where eMMCs can't switch
reliably and we might want a lower timeout to facilitate speedy
recovery.
Although we could employ a quirk for the cards that are affected (if
we could identify them all), as described above, there is little
benefit to having a low timeout, so instead simply set a minimum
timeout.
The minimum is set to 300ms somewhat arbitrarily - the examples that
have been seen had a timeout of 10ms but were sometimes taking 60-70ms.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/mmc/core/mmc.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -235,6 +235,9 @@ static int mmc_get_ext_csd(struct mmc_ca
return err;
}
+/* Minimum partition switch timeout in milliseconds */
+#define MMC_MIN_PART_SWITCH_TIME 300
+
/*
* Decode extended CSD.
*/
@@ -325,6 +328,10 @@ static int mmc_read_ext_csd(struct mmc_c
/* EXT_CSD value is in units of 10ms, but we store in ms */
card->ext_csd.part_time = 10 * ext_csd[EXT_CSD_PART_SWITCH_TIME];
+ /* Some eMMC set the value too low so set a minimum */
+ if (card->ext_csd.part_time &&
+ card->ext_csd.part_time < MMC_MIN_PART_SWITCH_TIME)
+ card->ext_csd.part_time = MMC_MIN_PART_SWITCH_TIME;
/* Sleep / awake timeout in 100ns units */
if (sa_shift > 0 && sa_shift <= 0x17)
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 88/94] ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (35 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 66/94] Input: wacom_w8001 - w8001_MAX_LENGTH should be 13 Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 94/94] audit: fix a double fetch in audit_log_single_execve_arg() Ben Hutchings
` (56 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Kangjie Lu, Takashi Iwai, Kangjie Lu
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Kangjie Lu <kangjielu@gmail.com>
commit cec8f96e49d9be372fdb0c3836dcf31ec71e457e upstream.
The stack object “tread” has a total size of 32 bytes. Its field
“event” and “val” both contain 4 bytes padding. These 8 bytes
padding bytes are sent to user without being initialized.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
sound/core/timer.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1712,6 +1712,7 @@ static int snd_timer_user_params(struct
if (tu->timeri->flags & SNDRV_TIMER_IFLG_EARLY_EVENT) {
if (tu->tread) {
struct snd_timer_tread tread;
+ memset(&tread, 0, sizeof(tread));
tread.event = SNDRV_TIMER_EVENT_EARLY;
tread.tstamp.tv_sec = 0;
tread.tstamp.tv_nsec = 0;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 65/94] IB/mlx4: Fix the SQ size of an RC QP
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (46 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 15/94] MIPS: Adjust set_pte() SMP fix to handle R10000_LLSC_WAR Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 93/94] tcp: make challenge acks less predictable Ben Hutchings
` (45 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Eran Ben Elisha, Doug Ledford, Leon Romanovsky,
Yishai Hadas, Jack Morgenstein
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Yishai Hadas <yishaih@mellanox.com>
commit f2940e2c76bb554a7fbdd28ca5b90904117a9e96 upstream.
When calculating the required size of an RC QP send queue, leave
enough space for masked atomic operations, which require more space than
"regular" atomic operation.
Fixes: 6fa8f719844b ("IB/mlx4: Add support for masked atomic operations")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Jack Morgenstein <jackm@mellanox.co.il>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/infiniband/hw/mlx4/qp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -283,7 +283,7 @@ static int send_wqe_overhead(enum ib_qp_
sizeof (struct mlx4_wqe_raddr_seg);
case IB_QPT_RC:
return sizeof (struct mlx4_wqe_ctrl_seg) +
- sizeof (struct mlx4_wqe_atomic_seg) +
+ sizeof (struct mlx4_wqe_masked_atomic_seg) +
sizeof (struct mlx4_wqe_raddr_seg);
case IB_QPT_SMI:
case IB_QPT_GSI:
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 93/94] tcp: make challenge acks less predictable
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (47 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 65/94] IB/mlx4: Fix the SQ size of an RC QP Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 26/94] fs/cifs: correctly to anonymous authentication for the LANMAN authentication Ben Hutchings
` (44 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Neal Cardwell, Yuchung Cheng, Yue Cao, David S. Miller,
Linus Torvalds, Eric Dumazet
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
commit 75ff39ccc1bd5d3c455b6822ab09e533c551f758 upstream.
Yue Cao claims that current host rate limiting of challenge ACKS
(RFC 5961) could leak enough information to allow a patient attacker
to hijack TCP sessions. He will soon provide details in an academic
paper.
This patch increases the default limit from 100 to 1000, and adds
some randomization so that the attacker can no longer hijack
sessions without spending a considerable amount of probes.
Based on initial analysis and patch from Linus.
Note that we also have per socket rate limiting, so it is tempting
to remove the host limit in the future.
v2: randomize the count of challenge acks per second, not the period.
Fixes: 282f23c6ee34 ("tcp: implement RFC 5961 3.2")
Reported-by: Yue Cao <ycao009@ucr.edu>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2:
- Adjust context
- Use ACCESS_ONCE() instead of {READ,WRITE}_ONCE()
- Open-code prandom_u32_max()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
net/ipv4/tcp_input.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -87,7 +87,7 @@ int sysctl_tcp_adv_win_scale __read_most
EXPORT_SYMBOL(sysctl_tcp_adv_win_scale);
/* rfc5961 challenge ack rate limiting */
-int sysctl_tcp_challenge_ack_limit = 100;
+int sysctl_tcp_challenge_ack_limit = 1000;
int sysctl_tcp_stdurg __read_mostly;
int sysctl_tcp_rfc1337 __read_mostly;
@@ -3715,13 +3715,20 @@ static void tcp_send_challenge_ack(struc
/* unprotected vars, we dont care of overwrites */
static u32 challenge_timestamp;
static unsigned int challenge_count;
- u32 now = jiffies / HZ;
+ u32 count, now = jiffies / HZ;
if (now != challenge_timestamp) {
+ u32 half = (sysctl_tcp_challenge_ack_limit + 1) >> 1;
+
challenge_timestamp = now;
- challenge_count = 0;
- }
- if (++challenge_count <= sysctl_tcp_challenge_ack_limit) {
+ ACCESS_ONCE(challenge_count) =
+ half + (u32)(
+ ((u64) random32() * sysctl_tcp_challenge_ack_limit)
+ >> 32);
+ }
+ count = ACCESS_ONCE(challenge_count);
+ if (count > 0) {
+ ACCESS_ONCE(challenge_count) = count - 1;
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPCHALLENGEACK);
tcp_send_ack(sk);
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 06/94] crypto: s5p-sss - fix incorrect usage of scatterlists api
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (86 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 78/94] etherdevice: introduce help function eth_zero_addr() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 62/94] UBIFS: Implement ->migratepage() Ben Hutchings
` (5 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Herbert Xu, Vladimir Zapolskiy, Krzysztof Kozlowski,
Marek Szyprowski
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Marek Szyprowski <m.szyprowski@samsung.com>
commit d1497977fecb9acce05988d6322ad415ef93bb39 upstream.
sg_dma_len() macro can be used only on scattelists which are mapped, so
all calls to it before dma_map_sg() are invalid. Replace them by proper
check for direct sg segment length read.
Fixes: a49e490c7a8a ("crypto: s5p-sss - add S5PV210 advanced crypto engine support")
Fixes: 9e4a1100a445 ("crypto: s5p-sss - Handle unaligned buffers")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[bwh: Backported to 3.2: unaligned DMA is unsupported so there is a different
set of calls to replace]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -210,11 +210,11 @@ static int s5p_set_outdata(struct s5p_ae
{
int err;
- if (!IS_ALIGNED(sg_dma_len(sg), AES_BLOCK_SIZE)) {
+ if (!IS_ALIGNED(sg->length, AES_BLOCK_SIZE)) {
err = -EINVAL;
goto exit;
}
- if (!sg_dma_len(sg)) {
+ if (!sg->length) {
err = -EINVAL;
goto exit;
}
@@ -236,11 +236,11 @@ static int s5p_set_indata(struct s5p_aes
{
int err;
- if (!IS_ALIGNED(sg_dma_len(sg), AES_BLOCK_SIZE)) {
+ if (!IS_ALIGNED(sg->length, AES_BLOCK_SIZE)) {
err = -EINVAL;
goto exit;
}
- if (!sg_dma_len(sg)) {
+ if (!sg->length) {
err = -EINVAL;
goto exit;
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 52/94] kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (53 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 18/94] powerpc/mm/hash64: Factor out hash preload psize check Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 68/94] HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands Ben Hutchings
` (38 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
Peter Zijlstra, Andrey Ryabinin
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Ryabinin <aryabinin@virtuozzo.com>
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.
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1465474805-14641-1-git-send-email-aryabinin@virtuozzo.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
kernel/sched.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6260,14 +6260,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);
} while_each_thread(g, p);
- touch_all_softlockup_watchdogs();
-
#ifdef CONFIG_SCHED_DEBUG
sysrq_sched_debug_show();
#endif
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 72/94] iio: accel: kxsd9: fix the usage of spi_w8r8()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (83 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 63/94] can: fix oops caused by wrong rtnl dellink usage Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 01/94] regmap: cache: Fix typo in cache_bypass parameter description Ben Hutchings
` (8 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Jonathan Cameron, Linus Walleij
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Linus Walleij <linus.walleij@linaro.org>
commit 0c1f91b98552da49d9d8eed32b3132a58d2f4598 upstream.
These two spi_w8r8() calls return a value with is used by the code
following the error check. The dubious use was caused by a cleanup
patch.
Fixes: d34dbee8ac8e ("staging:iio:accel:kxsd9 cleanup and conversion to iio_chan_spec.")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/staging/iio/accel/kxsd9.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/staging/iio/accel/kxsd9.c
+++ b/drivers/staging/iio/accel/kxsd9.c
@@ -81,7 +81,7 @@ static int kxsd9_write_scale(struct iio_
mutex_lock(&st->buf_lock);
ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));
- if (ret)
+ if (ret < 0)
goto error_ret;
st->tx[0] = KXSD9_WRITE(KXSD9_REG_CTRL_C);
st->tx[1] = (ret & ~KXSD9_FS_MASK) | i;
@@ -166,7 +166,7 @@ static int kxsd9_read_raw(struct iio_dev
break;
case (1 << IIO_CHAN_INFO_SCALE_SHARED):
ret = spi_w8r8(st->us, KXSD9_READ(KXSD9_REG_CTRL_C));
- if (ret)
+ if (ret < 0)
goto error_ret;
*val2 = kxsd9_micro_scales[ret & KXSD9_FS_MASK];
ret = IIO_VAL_INT_PLUS_MICRO;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 51/94] kprobes/x86: Clear TF bit in fault on single-stepping
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (76 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 67/94] Input: elantech - add more IC body types to the list Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 64/94] xen/pciback: Fix conf_space read/write overlap check Ben Hutchings
` (15 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, H. Peter Anvin, Andy Lutomirski, systemtap, Peter Zijlstra,
Steven Rostedt, Borislav Petkov, Vince Weaver, Jiri Olsa,
Brian Gerst, Masami Hiramatsu, Alexander Shishkin,
Stephane Eranian, Linus Torvalds, Denys Vlasenko,
Ananth N Mavinakayanahalli, Thomas Gleixner, Ingo Molnar,
Arnaldo Carvalho de Melo
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Masami Hiramatsu <mhiramat@kernel.org>
commit dcfc47248d3f7d28df6f531e6426b933de94370d upstream.
Fix kprobe_fault_handler() to clear the TF (trap flag) bit of
the flags register in the case of a fault fixup on single-stepping.
If we put a kprobe on the instruction which caused a
page fault (e.g. actual mov instructions in copy_user_*),
that fault happens on the single-stepping buffer. In this
case, kprobes resets running instance so that the CPU can
retry execution on the original ip address.
However, current code forgets to reset the TF bit. Since this
fault happens with TF bit set for enabling single-stepping,
when it retries, it causes a debug exception and kprobes
can not handle it because it already reset itself.
On the most of x86-64 platform, it can be easily reproduced
by using kprobe tracer. E.g.
# cd /sys/kernel/debug/tracing
# echo p copy_user_enhanced_fast_string+5 > kprobe_events
# echo 1 > events/kprobes/enable
And you'll see a kernel panic on do_debug(), since the debug
trap is not handled by kprobes.
To fix this problem, we just need to clear the TF bit when
resetting running kprobe.
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: systemtap@sourceware.org
Link: http://lkml.kernel.org/r/20160611140648.25885.37482.stgit@devbox
[ Updated the comments. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/x86/kernel/kprobes.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/arch/x86/kernel/kprobes.c
+++ b/arch/x86/kernel/kprobes.c
@@ -949,7 +949,19 @@ int __kprobes kprobe_fault_handler(struc
* normal page fault.
*/
regs->ip = (unsigned long)cur->addr;
+ /*
+ * Trap flag (TF) has been set here because this fault
+ * happened where the single stepping will be done.
+ * So clear it by resetting the current kprobe:
+ */
+ regs->flags &= ~X86_EFLAGS_TF;
+
+ /*
+ * If the TF flag was set before the kprobe hit,
+ * don't touch it:
+ */
regs->flags |= kcb->kprobe_old_flags;
+
if (kcb->kprobe_status == KPROBE_REENTER)
restore_previous_kprobe(kcb);
else
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 79/94] bonding: prevent out of bound accesses
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (33 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 91/94] tipc: fix an infoleak in tipc_nl_compat_link_dump Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 66/94] Input: wacom_w8001 - w8001_MAX_LENGTH should be 13 Ben Hutchings
` (58 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, David S. Miller, Ding Tianhong, Dmitry Vyukov,
Nikolay Aleksandrov, Eric Dumazet
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
commit f87fda00b6ed232a817c655b8d179b48bde8fdbe upstream.
ether_addr_equal_64bits() requires some care about its arguments,
namely that 8 bytes might be read, even if last 2 byte values are not
used.
KASan detected a violation with null_mac_addr and lacpdu_mcast_addr
in bond_3ad.c
Same problem with mac_bcast[] and mac_v6_allmcast[] in bond_alb.c :
Although the 8-byte alignment was there, KASan would detect out
of bound accesses.
Fixes: 815117adaf5b ("bonding: use ether_addr_equal_unaligned for bond addr compare")
Fixes: bb54e58929f3 ("bonding: Verify RX LACPDU has proper dest mac-addr")
Fixes: 885a136c52a8 ("bonding: use compare_ether_addr_64bits() in ALB")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Acked-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2:
- Adjust filename
- Drop change to bond_params::ad_actor_system
- Fix one more copy of null_mac_addr to use eth_zero_addr()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/bonding/bond_3ad.c | 11 +++++++----
drivers/net/bonding/bond_alb.c | 7 ++-----
drivers/net/bonding/bonding.h | 7 ++++++-
3 files changed, 15 insertions(+), 10 deletions(-)
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -93,11 +93,14 @@
// compare MAC addresses
#define MAC_ADDRESS_COMPARE(A, B) memcmp(A, B, ETH_ALEN)
-static struct mac_addr null_mac_addr = { { 0, 0, 0, 0, 0, 0 } };
+static const u8 null_mac_addr[ETH_ALEN + 2] __long_aligned = {
+ 0, 0, 0, 0, 0, 0
+};
static u16 ad_ticks_per_sec;
static const int ad_delta_in_ticks = (AD_TIMER_INTERVAL * HZ) / 1000;
-static const u8 lacpdu_mcast_addr[ETH_ALEN] = MULTICAST_LACPDU_ADDR;
+static const u8 lacpdu_mcast_addr[ETH_ALEN + 2] __long_aligned =
+ MULTICAST_LACPDU_ADDR;
// ================= main 802.3ad protocol functions ==================
static int ad_lacpdu_send(struct port *port);
@@ -1627,7 +1630,7 @@ static void ad_clear_agg(struct aggregat
aggregator->is_individual = false;
aggregator->actor_admin_aggregator_key = 0;
aggregator->actor_oper_aggregator_key = 0;
- aggregator->partner_system = null_mac_addr;
+ eth_zero_addr(aggregator->partner_system.mac_addr_value);
aggregator->partner_system_priority = 0;
aggregator->partner_oper_aggregator_key = 0;
aggregator->receive_state = 0;
@@ -1650,7 +1653,7 @@ static void ad_initialize_agg(struct agg
if (aggregator) {
ad_clear_agg(aggregator);
- aggregator->aggregator_mac_address = null_mac_addr;
+ eth_zero_addr(aggregator->aggregator_mac_address.mac_addr_value);
aggregator->aggregator_identifier = 0;
aggregator->slave = NULL;
}
@@ -1686,7 +1689,7 @@ static void ad_initialize_port(struct po
if (port) {
port->actor_port_number = 1;
port->actor_port_priority = 0xff;
- port->actor_system = null_mac_addr;
+ eth_zero_addr(port->actor_system.mac_addr_value);
port->actor_system_priority = 0xffff;
port->actor_port_aggregator_identifier = 0;
port->ntt = false;
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -45,13 +45,10 @@
-#ifndef __long_aligned
-#define __long_aligned __attribute__((aligned((sizeof(long)))))
-#endif
-static const u8 mac_bcast[ETH_ALEN] __long_aligned = {
+static const u8 mac_bcast[ETH_ALEN + 2] __long_aligned = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
-static const u8 mac_v6_allmcast[ETH_ALEN] __long_aligned = {
+static const u8 mac_v6_allmcast[ETH_ALEN + 2] __long_aligned = {
0x33, 0x33, 0x00, 0x00, 0x00, 0x01
};
static const int alb_delta_in_ticks = HZ / ALB_TIMER_TICKS_PER_SEC;
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -38,6 +38,9 @@
netif_running(dev) && \
netif_carrier_ok(dev))
+#ifndef __long_aligned
+#define __long_aligned __attribute__((aligned((sizeof(long)))))
+#endif
/*
* Checks whether slave is ready for transmit.
*/
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 68/94] HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (54 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 52/94] kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 77/94] x86/amd_nb: Fix boot crash on non-AMD systems Ben Hutchings
` (37 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Scott Bauer, Jiri Kosina
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Scott Bauer <sbauer@plzdonthack.me>
commit 93a2001bdfd5376c3dc2158653034c20392d15c5 upstream.
This patch validates the num_values parameter from userland during the
HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set
to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter
leading to a heap overflow.
Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/hid/usbhid/hiddev.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/hid/usbhid/hiddev.c
+++ b/drivers/hid/usbhid/hiddev.c
@@ -515,13 +515,13 @@ static noinline int hiddev_ioctl_usage(s
goto inval;
} else if (uref->usage_index >= field->report_count)
goto inval;
-
- else if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&
- (uref_multi->num_values > HID_MAX_MULTI_USAGES ||
- uref->usage_index + uref_multi->num_values > field->report_count))
- goto inval;
}
+ if ((cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) &&
+ (uref_multi->num_values > HID_MAX_MULTI_USAGES ||
+ uref->usage_index + uref_multi->num_values > field->report_count))
+ goto inval;
+
switch (cmd) {
case HIDIOCGUSAGE:
uref->value = field->value[uref->usage_index];
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 25/94] fs/cifs: correctly to anonymous authentication via NTLMSSP
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (60 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 20/94] sched/loadavg: Fix loadavg artifacts on fully idle and on fully loaded systems Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 46/94] usb: musb: Ensure rx reinit occurs for shared_fifo endpoints Ben Hutchings
` (31 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Stefan Metzmacher, Steve French
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Metzmacher <metze@samba.org>
commit cfda35d98298131bf38fbad3ce4cd5ecb3cf18db upstream.
See [MS-NLMP] 3.2.5.1.2 Server Receives an AUTHENTICATE_MESSAGE from the Client:
...
Set NullSession to FALSE
If (AUTHENTICATE_MESSAGE.UserNameLen == 0 AND
AUTHENTICATE_MESSAGE.NtChallengeResponse.Length == 0 AND
(AUTHENTICATE_MESSAGE.LmChallengeResponse == Z(1)
OR
AUTHENTICATE_MESSAGE.LmChallengeResponse.Length == 0))
-- Special case: client requested anonymous authentication
Set NullSession to TRUE
...
Only server which map unknown users to guest will allow
access using a non-null NTChallengeResponse.
For Samba it's the "map to guest = bad user" option.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
[bwh: Backported to 3.2: keep using cERROR()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -480,19 +480,27 @@ static int build_ntlmssp_auth_blob(unsig
sec_blob->LmChallengeResponse.MaximumLength = 0;
sec_blob->NtChallengeResponse.BufferOffset = cpu_to_le32(tmp - pbuffer);
- rc = setup_ntlmv2_rsp(ses, nls_cp);
- if (rc) {
- cERROR(1, "Error %d during NTLMSSP authentication", rc);
- goto setup_ntlmv2_ret;
- }
- memcpy(tmp, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
- ses->auth_key.len - CIFS_SESS_KEY_SIZE);
- tmp += ses->auth_key.len - CIFS_SESS_KEY_SIZE;
+ if (ses->user_name != NULL) {
+ rc = setup_ntlmv2_rsp(ses, nls_cp);
+ if (rc) {
+ cERROR(1, "Error %d during NTLMSSP authentication", rc);
+ goto setup_ntlmv2_ret;
+ }
+ memcpy(tmp, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
+ ses->auth_key.len - CIFS_SESS_KEY_SIZE);
+ tmp += ses->auth_key.len - CIFS_SESS_KEY_SIZE;
- sec_blob->NtChallengeResponse.Length =
- cpu_to_le16(ses->auth_key.len - CIFS_SESS_KEY_SIZE);
- sec_blob->NtChallengeResponse.MaximumLength =
- cpu_to_le16(ses->auth_key.len - CIFS_SESS_KEY_SIZE);
+ sec_blob->NtChallengeResponse.Length =
+ cpu_to_le16(ses->auth_key.len - CIFS_SESS_KEY_SIZE);
+ sec_blob->NtChallengeResponse.MaximumLength =
+ cpu_to_le16(ses->auth_key.len - CIFS_SESS_KEY_SIZE);
+ } else {
+ /*
+ * don't send an NT Response for anonymous access
+ */
+ sec_blob->NtChallengeResponse.Length = 0;
+ sec_blob->NtChallengeResponse.MaximumLength = 0;
+ }
if (ses->domainName == NULL) {
sec_blob->DomainName.BufferOffset = cpu_to_le32(tmp - pbuffer);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 45/94] usb: f_fs: off by one bug in _ffs_func_bind()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (79 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 83/94] ecryptfs: don't allow mmap when the lower fs doesn't support it Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 85/94] fs: limit filesystem stacking depth Ben Hutchings
` (12 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Michal Nazarewicz, Felipe Balbi, Dan Carpenter
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit 0015f9156092d07b3ec06d37d014328419d5832e upstream.
This loop is supposed to set all the .num[] values to -1 but it's off by
one so it skips the first element and sets one element past the end of
the array.
I've cleaned up the loop a little as well.
Fixes: ddf8abd25994 ('USB: f_fs: the FunctionFS driver')
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
[bwh: Backported to 3.2:
- Adjust filename, context
- Add 'i' for iteration but don't bother with 'eps_ptr' as the calculation is
simpler here]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -2165,7 +2165,7 @@ static int ffs_func_bind(struct usb_conf
const int high = gadget_is_dualspeed(func->gadget) &&
func->ffs->hs_descs_count;
- int ret;
+ int ret, i;
/* Make it a single chunk, less management later on */
struct {
@@ -2194,8 +2194,8 @@ static int ffs_func_bind(struct usb_conf
memset(data->eps, 0, sizeof data->eps);
memcpy(data->raw_descs, ffs->raw_descs + 16, sizeof data->raw_descs);
memset(data->inums, 0xff, sizeof data->inums);
- for (ret = ffs->eps_count; ret; --ret)
- data->eps[ret].num = -1;
+ for (i = 0; i < ffs->eps_count; i++)
+ data->eps[i].num = -1;
/* Save pointers */
func->eps = data->eps;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 09/94] ext4: fix hang when processing corrupted orphaned inode list
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (73 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 59/94] can: at91_can: RX queue could get stuck at high bus load Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 53/94] base: make module_create_drivers_dir race-free Ben Hutchings
` (18 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Theodore Ts'o
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Theodore Ts'o <tytso@mit.edu>
commit c9eb13a9105e2e418f72e46a2b6da3f49e696902 upstream.
If the orphaned inode list contains inode #5, ext4_iget() returns a
bad inode (since the bootloader inode should never be referenced
directly). Because of the bad inode, we end up processing the inode
repeatedly and this hangs the machine.
This can be reproduced via:
mke2fs -t ext4 /tmp/foo.img 100
debugfs -w -R "ssv last_orphan 5" /tmp/foo.img
mount -o loop /tmp/foo.img /mnt
(But don't do this if you are using an unpatched kernel if you care
about the system staying functional. :-)
This bug was found by the port of American Fuzzy Lop into the kernel
to find file system problems[1]. (Since it *only* happens if inode #5
shows up on the orphan list --- 3, 7, 8, etc. won't do it, it's not
surprising that AFL needed two hours before it found it.)
[1] http://events.linuxfoundation.org/sites/events/files/slides/AFL%20filesystem%20fuzzing%2C%20Vault%202016_0.pdf
Reported by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/ext4/ialloc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -999,11 +999,13 @@ struct inode *ext4_orphan_get(struct sup
goto iget_failed;
/*
- * If the orphans has i_nlinks > 0 then it should be able to be
- * truncated, otherwise it won't be removed from the orphan list
- * during processing and an infinite loop will result.
+ * If the orphans has i_nlinks > 0 then it should be able to
+ * be truncated, otherwise it won't be removed from the orphan
+ * list during processing and an infinite loop will result.
+ * Similarly, it must not be a bad inode.
*/
- if (inode->i_nlink && !ext4_can_truncate(inode))
+ if ((inode->i_nlink && !ext4_can_truncate(inode)) ||
+ is_bad_inode(inode))
goto bad_orphan;
if (NEXT_ORPHAN(inode) > max_ino)
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 92/94] rds: fix an infoleak in rds_inc_info_copy
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (6 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 40/94] KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 21/94] mmc: mmc: Fix partition switch timeout for some eMMCs Ben Hutchings
` (85 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Kangjie Lu, Santosh Shilimkar, Kangjie Lu, David S. Miller
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Kangjie Lu <kangjielu@gmail.com>
commit 4116def2337991b39919f3b448326e21c40e0dbb upstream.
The last field "flags" of object "minfo" is not initialized.
Copying this object out may leak kernel stack data.
Assign 0 to it to avoid leak.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
net/rds/recv.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -544,5 +544,7 @@ void rds_inc_info_copy(struct rds_incomi
minfo.fport = inc->i_hdr.h_dport;
}
+ minfo.flags = 0;
+
rds_info_copy(iter, &minfo, sizeof(minfo));
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 36/94] Input: pwm-beeper - remove useless call to pwm_config()
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (16 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 07/94] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 73/94] ALSA: echoaudio: Fix memory allocation Ben Hutchings
` (75 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Olivier Sobrie, Dmitry Torokhov
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Olivier Sobrie <olivier@sobrie.be>
commit d1b12075ffa808dce33dd46b7ad035bebf8da215 upstream.
Calling pwm_config() with a period equal to zero always results in
error (-EINVAL) and pwm chip config method is never called.
Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/input/misc/pwm-beeper.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/input/misc/pwm-beeper.c
+++ b/drivers/input/misc/pwm-beeper.c
@@ -49,7 +49,6 @@ static int pwm_beeper_event(struct input
}
if (value == 0) {
- pwm_config(beeper->pwm, 0, 0);
pwm_disable(beeper->pwm);
} else {
period = HZ_TO_NANOSECONDS(value);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 56/94] IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (62 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 46/94] usb: musb: Ensure rx reinit occurs for shared_fifo endpoints Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 19/94] powerpc/mm/hash64: Fix subpage protection with 4K HPTE config Ben Hutchings
` (29 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Doug Ledford, Jason Gunthorpe
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
commit 8c5122e45a10a9262f872b53f151a592e870f905 upstream.
When this code was reworked for IBoE support the order of assignments
for the sl_tclass_flowlabel got flipped around resulting in
TClass & FlowLabel being permanently set to 0 in the packet headers.
This breaks IB routers that rely on these headers, but only affects
kernel users - libmlx4 does this properly for user space.
Fixes: fa417f7b520e ("IB/mlx4: Add support for IBoE")
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/infiniband/hw/mlx4/ah.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/infiniband/hw/mlx4/ah.c
+++ b/drivers/infiniband/hw/mlx4/ah.c
@@ -65,6 +65,7 @@ static struct ib_ah *create_ib_ah(struct
ah->av.ib.port_pd = cpu_to_be32(to_mpd(pd)->pdn | (ah_attr->port_num << 24));
ah->av.ib.g_slid = ah_attr->src_path_bits;
+ ah->av.ib.sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28);
if (ah_attr->ah_flags & IB_AH_GRH) {
ah->av.ib.g_slid |= 0x80;
ah->av.ib.gid_index = ah_attr->grh.sgid_index;
@@ -82,7 +83,6 @@ static struct ib_ah *create_ib_ah(struct
!(1 << ah->av.ib.stat_rate & dev->caps.stat_rate_support))
--ah->av.ib.stat_rate;
}
- ah->av.ib.sl_tclass_flowlabel = cpu_to_be32(ah_attr->sl << 28);
return &ah->ibah;
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 86/94] proc: prevent stacking filesystems on top
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (25 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 10/94] char: Drop bogus dependency of DEVPORT on !M68K Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 29/94] sunrpc: Update RPCBIND_MAXNETIDLEN Ben Hutchings
` (66 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Jann Horn, Linus Torvalds
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jann Horn <jannh@google.com>
commit e54ad7f1ee263ffa5a2de9c609d58dfa27b21cd9 upstream.
This prevents stacking filesystems (ecryptfs and overlayfs) from using
procfs as lower filesystem. There is too much magic going on inside
procfs, and there is no good reason to stack stuff on top of procfs.
(For example, procfs does access checks in VFS open handlers, and
ecryptfs by design calls open handlers from a kernel thread that doesn't
drop privileges or so.)
Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/proc/root.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -53,6 +53,13 @@ static struct dentry *proc_mount(struct
if (IS_ERR(sb))
return ERR_CAST(sb);
+ /*
+ * procfs isn't actually a stacking filesystem; however, there is
+ * too much magic going on inside it to permit stacking things on
+ * top of it
+ */
+ sb->s_stack_depth = FILESYSTEM_MAX_STACK_DEPTH;
+
if (!sb->s_root) {
sb->s_flags = flags;
err = proc_fill_super(sb);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 40/94] KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (5 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 58/94] hwmon: (dell-smm) Restrict fan control and serial number to CAP_SYS_ADMIN by default Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 92/94] rds: fix an infoleak in rds_inc_info_copy Ben Hutchings
` (86 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Paolo Bonzini, Dmitry Vyukov, Radim Krčmář
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Paolo Bonzini <pbonzini@redhat.com>
commit d14bdb553f9196169f003058ae1cdabe514470e6 upstream.
MOV to DR6 or DR7 causes a #GP if an attempt is made to write a 1 to
any of bits 63:32. However, this is not detected at KVM_SET_DEBUGREGS
time, and the next KVM_RUN oopses:
general protection fault: 0000 [#1] SMP
CPU: 2 PID: 14987 Comm: a.out Not tainted 4.4.9-300.fc23.x86_64 #1
Hardware name: LENOVO 2325F51/2325F51, BIOS G2ET32WW (1.12 ) 05/30/2012
[...]
Call Trace:
[<ffffffffa072c93d>] kvm_arch_vcpu_ioctl_run+0x141d/0x14e0 [kvm]
[<ffffffffa071405d>] kvm_vcpu_ioctl+0x33d/0x620 [kvm]
[<ffffffff81241648>] do_vfs_ioctl+0x298/0x480
[<ffffffff812418a9>] SyS_ioctl+0x79/0x90
[<ffffffff817a0f2e>] entry_SYSCALL_64_fastpath+0x12/0x71
Code: 55 83 ff 07 48 89 e5 77 27 89 ff ff 24 fd 90 87 80 81 0f 23 fe 5d c3 0f 23 c6 5d c3 0f 23 ce 5d c3 0f 23 d6 5d c3 0f 23 de 5d c3 <0f> 23 f6 5d c3 0f 0b 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00
RIP [<ffffffff810639eb>] native_set_debugreg+0x2b/0x40
RSP <ffff88005836bd50>
Testcase (beautified/reduced from syzkaller output):
#include <unistd.h>
#include <sys/syscall.h>
#include <string.h>
#include <stdint.h>
#include <linux/kvm.h>
#include <fcntl.h>
#include <sys/ioctl.h>
long r[8];
int main()
{
struct kvm_debugregs dr = { 0 };
r[2] = open("/dev/kvm", O_RDONLY);
r[3] = ioctl(r[2], KVM_CREATE_VM, 0);
r[4] = ioctl(r[3], KVM_CREATE_VCPU, 7);
memcpy(&dr,
"\x5d\x6a\x6b\xe8\x57\x3b\x4b\x7e\xcf\x0d\xa1\x72"
"\xa3\x4a\x29\x0c\xfc\x6d\x44\x00\xa7\x52\xc7\xd8"
"\x00\xdb\x89\x9d\x78\xb5\x54\x6b\x6b\x13\x1c\xe9"
"\x5e\xd3\x0e\x40\x6f\xb4\x66\xf7\x5b\xe3\x36\xcb",
48);
r[7] = ioctl(r[4], KVM_SET_DEBUGREGS, &dr);
r[6] = ioctl(r[4], KVM_RUN, 0);
}
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/x86/kvm/x86.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2952,6 +2952,11 @@ static int kvm_vcpu_ioctl_x86_set_debugr
if (dbgregs->flags)
return -EINVAL;
+ if (dbgregs->dr6 & ~0xffffffffull)
+ return -EINVAL;
+ if (dbgregs->dr7 & ~0xffffffffull)
+ return -EINVAL;
+
memcpy(vcpu->arch.db, dbgregs->db, sizeof(vcpu->arch.db));
vcpu->arch.dr6 = dbgregs->dr6;
vcpu->arch.dr7 = dbgregs->dr7;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 17/94] ata: sata_dwc_460ex: remove incorrect locking
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (43 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 71/94] staging: iio: accel: fix error check Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 50/94] drm/radeon: fix asic initialization for virtualized environments Ben Hutchings
` (48 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Christian Lamparter, Mans Rullgard, Tejun Heo
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Mans Rullgard <mans@mansr.com>
commit 55e610cdd28c0ad3dce0652030c0296d549673f3 upstream.
This lock is already taken in ata_scsi_queuecmd() a few levels up the
call stack so attempting to take it here is an error. Moreover, it is
pointless in the first place since it only protects a single, atomic
assignment.
Enabling lock debugging gives the following output:
=============================================
[ INFO: possible recursive locking detected ]
4.4.0-rc5+ #189 Not tainted
---------------------------------------------
kworker/u2:3/37 is trying to acquire lock:
(&(&host->lock)->rlock){-.-...}, at: [<90283294>] sata_dwc_exec_command_by_tag.constprop.14+0x44/0x8c
but task is already holding lock:
(&(&host->lock)->rlock){-.-...}, at: [<902761ac>] ata_scsi_queuecmd+0x2c/0x330
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&(&host->lock)->rlock);
lock(&(&host->lock)->rlock);
*** DEADLOCK ***
May be due to missing lock nesting notation
4 locks held by kworker/u2:3/37:
#0: ("events_unbound"){.+.+.+}, at: [<9003a0a4>] process_one_work+0x12c/0x430
#1: ((&entry->work)){+.+.+.}, at: [<9003a0a4>] process_one_work+0x12c/0x430
#2: (&bdev->bd_mutex){+.+.+.}, at: [<9011fd54>] __blkdev_get+0x50/0x380
#3: (&(&host->lock)->rlock){-.-...}, at: [<902761ac>] ata_scsi_queuecmd+0x2c/0x330
stack backtrace:
CPU: 0 PID: 37 Comm: kworker/u2:3 Not tainted 4.4.0-rc5+ #189
Workqueue: events_unbound async_run_entry_fn
Stack : 90b38e30 00000021 00000003 9b2a6040 00000000 9005f3f0 904fc8dc 00000025
906b96e4 00000000 90528648 9b3336c4 904fc8dc 9009bf18 00000002 00000004
00000000 00000000 9b3336c4 9b3336e4 904fc8dc 9003d074 00000000 90500000
9005e738 00000000 00000000 00000000 00000000 00000000 00000000 00000000
6e657665 755f7374 756f626e 0000646e 00000000 00000000 9b00ca00 9b025000
...
Call Trace:
[<90009d6c>] show_stack+0x88/0xa4
[<90057744>] __lock_acquire+0x1ce8/0x2154
[<900583e4>] lock_acquire+0x64/0x8c
[<9045ff10>] _raw_spin_lock_irqsave+0x54/0x78
[<90283294>] sata_dwc_exec_command_by_tag.constprop.14+0x44/0x8c
[<90283484>] sata_dwc_qc_issue+0x1a8/0x24c
[<9026b39c>] ata_qc_issue+0x1f0/0x410
[<90273c6c>] ata_scsi_translate+0xb4/0x200
[<90276234>] ata_scsi_queuecmd+0xb4/0x330
[<9025800c>] scsi_dispatch_cmd+0xd0/0x128
[<90259934>] scsi_request_fn+0x58c/0x638
[<901a3e50>] __blk_run_queue+0x40/0x5c
[<901a83d4>] blk_queue_bio+0x27c/0x28c
[<901a5914>] generic_make_request+0xf0/0x188
[<901a5a54>] submit_bio+0xa8/0x194
[<9011adcc>] submit_bh_wbc.isra.23+0x15c/0x17c
[<9011c908>] block_read_full_page+0x3e4/0x428
[<9009e2e0>] do_read_cache_page+0xac/0x210
[<9009fd90>] read_cache_page+0x18/0x24
[<901bbd18>] read_dev_sector+0x38/0xb0
[<901bd174>] msdos_partition+0xb4/0x5c0
[<901bcb8c>] check_partition+0x140/0x274
[<901bba60>] rescan_partitions+0xa0/0x2b0
[<9011ff68>] __blkdev_get+0x264/0x380
[<901201ac>] blkdev_get+0x128/0x36c
[<901b9378>] add_disk+0x3c0/0x4bc
[<90268268>] sd_probe_async+0x100/0x224
[<90043a44>] async_run_entry_fn+0x50/0x124
[<9003a11c>] process_one_work+0x1a4/0x430
[<9003a4f4>] worker_thread+0x14c/0x4fc
[<900408f4>] kthread+0xd0/0xe8
[<90004338>] ret_from_kernel_thread+0x14/0x1c
Fixes: 62936009f35a ("[libata] Add 460EX on-chip SATA driver, sata_dwc_460ex")
Tested-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/ata/sata_dwc_460ex.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1386,15 +1386,13 @@ static void sata_dwc_exec_command_by_tag
struct ata_taskfile *tf,
u8 tag, u32 cmd_issued)
{
- unsigned long flags;
struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
dev_dbg(ap->dev, "%s cmd(0x%02x): %s tag=%d\n", __func__, tf->command,
ata_get_cmd_descript(tf->command), tag);
- spin_lock_irqsave(&ap->host->lock, flags);
hsdevp->cmd_issued[tag] = cmd_issued;
- spin_unlock_irqrestore(&ap->host->lock, flags);
+
/*
* Clear SError before executing a new command.
* sata_dwc_scr_write and read can not be used here. Clearing the PM
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 08/94] aacraid: Fix for aac_command_thread hang
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (31 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 42/94] x86, build: copy ldlinux.c32 to image.iso Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 91/94] tipc: fix an infoleak in tipc_nl_compat_link_dump Ben Hutchings
` (60 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Raghava Aditya Renukunta, Martin K. Petersen,
Johannes Thumshirn
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
commit fc4bf75ea300a5e62a2419f89dd0e22189dd7ab7 upstream.
Typically under error conditions, it is possible for aac_command_thread()
to miss the wakeup from kthread_stop() and go back to sleep, causing it
to hang aac_shutdown.
In the observed scenario, the adapter is not functioning correctly and so
aac_fib_send() never completes (or time-outs depending on how it was
called). Shortly after aac_command_thread() starts it performs
aac_fib_send(SendHostTime) which hangs. When aac_probe_one
/aac_get_adapter_info send time outs, kthread_stop is called which breaks
the command thread out of it's hang.
The code will still go back to sleep in schedule_timeout() without
checking kthread_should_stop() so it causes aac_probe_one to hang until
the schedule_timeout() which is 30 minutes.
Fixed by: Adding another kthread_should_stop() before schedule_timeout()
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/scsi/aacraid/commsup.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1890,6 +1890,10 @@ int aac_command_thread(void *data)
if (difference <= 0)
difference = 1;
set_current_state(TASK_INTERRUPTIBLE);
+
+ if (kthread_should_stop())
+ break;
+
schedule_timeout(difference);
if (kthread_should_stop())
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 28/94] fs/cifs: correctly to anonymous authentication for the NTLM(v2) authentication
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (38 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 41/94] parisc: Fix pagefault crash in unaligned __get_user() call Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 55/94] KEYS: potential uninitialized variable Ben Hutchings
` (53 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Steve French, Stefan Metzmacher
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Metzmacher <metze@samba.org>
commit 1a967d6c9b39c226be1b45f13acd4d8a5ab3dc44 upstream.
Only server which map unknown users to guest will allow
access using a non-null NTLMv2_Response.
For Samba it's the "map to guest = bad user" option.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
[bwh: Backported to 3.2:
- Adjust context, indentation
- Keep using cERROR()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -727,21 +727,26 @@ ssetup_ntlmssp_authenticate:
/* LM2 password would be here if we supported it */
pSMB->req_no_secext.CaseInsensitivePasswordLength = 0;
- /* calculate nlmv2 response and session key */
- rc = setup_ntlmv2_rsp(ses, nls_cp);
- if (rc) {
- cERROR(1, "Error %d during NTLMv2 authentication", rc);
- goto ssetup_exit;
- }
- memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
- ses->auth_key.len - CIFS_SESS_KEY_SIZE);
- bcc_ptr += ses->auth_key.len - CIFS_SESS_KEY_SIZE;
+ if (ses->user_name != NULL) {
+ /* calculate nlmv2 response and session key */
+ rc = setup_ntlmv2_rsp(ses, nls_cp);
+ if (rc) {
+ cERROR(1, "Error %d during NTLMv2 authentication", rc);
+ goto ssetup_exit;
+ }
+
+ memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
+ ses->auth_key.len - CIFS_SESS_KEY_SIZE);
+ bcc_ptr += ses->auth_key.len - CIFS_SESS_KEY_SIZE;
- /* set case sensitive password length after tilen may get
- * assigned, tilen is 0 otherwise.
- */
- pSMB->req_no_secext.CaseSensitivePasswordLength =
- cpu_to_le16(ses->auth_key.len - CIFS_SESS_KEY_SIZE);
+ /* set case sensitive password length after tilen may get
+ * assigned, tilen is 0 otherwise.
+ */
+ pSMB->req_no_secext.CaseSensitivePasswordLength =
+ cpu_to_le16(ses->auth_key.len - CIFS_SESS_KEY_SIZE);
+ } else {
+ pSMB->req_no_secext.CaseSensitivePasswordLength = 0;
+ }
if (ses->capabilities & CAP_UNICODE) {
if (iov[0].iov_len % 2) {
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 29/94] sunrpc: Update RPCBIND_MAXNETIDLEN
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (26 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 86/94] proc: prevent stacking filesystems on top Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 90/94] ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt Ben Hutchings
` (65 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Chuck Lever, Anna Schumaker
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Chuck Lever <chuck.lever@oracle.com>
commit 4b9c7f9db9a003f5c342184dc4401c1b7f2efb39 upstream.
Commit 176e21ee2ec8 ("SUNRPC: Support for RPC over AF_LOCAL
transports") added a 5-character netid, but did not bump
RPCBIND_MAXNETIDLEN from 4 to 5.
Fixes: 176e21ee2ec8 ("SUNRPC: Support for RPC over AF_LOCAL ...")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
include/linux/sunrpc/msg_prot.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/include/linux/sunrpc/msg_prot.h
+++ b/include/linux/sunrpc/msg_prot.h
@@ -149,9 +149,9 @@ typedef __be32 rpc_fraghdr;
/*
* Note that RFC 1833 does not put any size restrictions on the
- * netid string, but all currently defined netid's fit in 4 bytes.
+ * netid string, but all currently defined netid's fit in 5 bytes.
*/
-#define RPCBIND_MAXNETIDLEN (4u)
+#define RPCBIND_MAXNETIDLEN (5u)
/*
* Universal addresses are introduced in RFC 1833 and further spelled
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 67/94] Input: elantech - add more IC body types to the list
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (75 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 53/94] base: make module_create_drivers_dir race-free Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 51/94] kprobes/x86: Clear TF bit in fault on single-stepping Ben Hutchings
` (16 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Dmitry Torokhov, Patrick Lessard
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
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.
Reported-by: Patrick Lessard <Patrick.Lessard@cogeco.com>
Tested-by: Patrick Lessard <Patrick.Lessard@cogeco.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/input/mouse/elantech.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1284,13 +1284,7 @@ static int elantech_set_properties(struc
case 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:
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 48/94] staging:iio: trigger fixes for repeat request of same trigger and allocation failure
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (58 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 31/94] Input: uinput - handle compat ioctl for UI_SET_PHYS Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 20/94] sched/loadavg: Fix loadavg artifacts on fully idle and on fully loaded systems Ben Hutchings
` (33 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Jonathan Cameron, Greg Kroah-Hartman
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Jonathan Cameron <jic23@cam.ac.uk>
commit 5dd72ecb0166498852705939163f375d693d37f3 upstream.
Both of these are decidedly silly bugs show up whilst testing
completely different code paths.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/staging/iio/industrialio-trigger.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/drivers/staging/iio/industrialio-trigger.c
+++ b/drivers/staging/iio/industrialio-trigger.c
@@ -222,8 +222,16 @@ static int iio_trigger_attach_poll_func(
ret = request_threaded_irq(pf->irq, pf->h, pf->thread,
pf->type, pf->name,
pf);
- if (trig->ops && trig->ops->set_trigger_state && notinuse)
+ if (ret < 0) {
+ module_put(pf->indio_dev->info->driver_module);
+ return ret;
+ }
+
+ if (trig->ops && trig->ops->set_trigger_state && notinuse) {
ret = trig->ops->set_trigger_state(trig, true);
+ if (ret < 0)
+ module_put(pf->indio_dev->info->driver_module);
+ }
return ret;
}
@@ -336,6 +344,8 @@ static ssize_t iio_trigger_write_current
mutex_unlock(&indio_dev->mlock);
trig = iio_trigger_find_by_name(buf, len);
+ if (oldtrig == trig)
+ return len;
if (trig && indio_dev->info->validate_trigger) {
ret = indio_dev->info->validate_trigger(indio_dev, trig);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 80/94] ALSA: timer: Fix negative queue usage by racy accesses
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (50 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 44/94] wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 57/94] isa: Call isa_bus_init before dependent ISA bus drivers register Ben Hutchings
` (41 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Takashi Iwai
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 3fa6993fef634e05d200d141a85df0b044572364 upstream.
The user timer tu->qused counter may go to a negative value when
multiple concurrent reads are performed since both the check and the
decrement of tu->qused are done in two individual locked contexts.
This results in bogus read outs, and the endless loop in the
user-space side.
The fix is to move the decrement of the tu->qused counter into the
same spinlock context as the zero-check of the counter.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
sound/core/timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1923,6 +1923,7 @@ static ssize_t snd_timer_user_read(struc
qhead = tu->qhead++;
tu->qhead %= tu->queue_size;
+ tu->qused--;
spin_unlock_irq(&tu->qlock);
if (tu->tread) {
@@ -1936,7 +1937,6 @@ static ssize_t snd_timer_user_read(struc
}
spin_lock_irq(&tu->qlock);
- tu->qused--;
if (err < 0)
goto _error;
result += unit;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 37/94] Input: pwm-beeper - fix - scheduling while atomic
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (14 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 16/94] gcov: disable tree-loop-im to reduce stack usage Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 07/94] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl Ben Hutchings
` (77 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Dmitry Torokhov, Manfred Schlaegl
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Manfred Schlaegl <manfred.schlaegl@gmx.at>
commit f49cf3b8b4c841457244c461c66186a719e13bcc upstream.
Pwm config may sleep so defer it using a worker.
On a Freescale i.MX53 based board we ran into "BUG: scheduling while
atomic" because input_inject_event locks interrupts, but
imx_pwm_config_v2 sleeps.
Tested on Freescale i.MX53 SoC with 4.6.0.
Signed-off-by: Manfred Schlaegl <manfred.schlaegl@gmx.at>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/input/misc/pwm-beeper.c | 69 ++++++++++++++++++++++++++++-------------
1 file changed, 48 insertions(+), 21 deletions(-)
--- a/drivers/input/misc/pwm-beeper.c
+++ b/drivers/input/misc/pwm-beeper.c
@@ -19,21 +19,40 @@
#include <linux/platform_device.h>
#include <linux/pwm.h>
#include <linux/slab.h>
+#include <linux/workqueue.h>
struct pwm_beeper {
struct input_dev *input;
struct pwm_device *pwm;
+ struct work_struct work;
unsigned long period;
};
#define HZ_TO_NANOSECONDS(x) (1000000000UL/(x))
+static void __pwm_beeper_set(struct pwm_beeper *beeper)
+{
+ unsigned long period = beeper->period;
+
+ if (period) {
+ pwm_config(beeper->pwm, period / 2, period);
+ pwm_enable(beeper->pwm);
+ } else
+ pwm_disable(beeper->pwm);
+}
+
+static void pwm_beeper_work(struct work_struct *work)
+{
+ struct pwm_beeper *beeper =
+ container_of(work, struct pwm_beeper, work);
+
+ __pwm_beeper_set(beeper);
+}
+
static int pwm_beeper_event(struct input_dev *input,
unsigned int type, unsigned int code, int value)
{
- int ret = 0;
struct pwm_beeper *beeper = input_get_drvdata(input);
- unsigned long period;
if (type != EV_SND || value < 0)
return -EINVAL;
@@ -48,22 +67,31 @@ static int pwm_beeper_event(struct input
return -EINVAL;
}
- if (value == 0) {
- pwm_disable(beeper->pwm);
- } else {
- period = HZ_TO_NANOSECONDS(value);
- ret = pwm_config(beeper->pwm, period / 2, period);
- if (ret)
- return ret;
- ret = pwm_enable(beeper->pwm);
- if (ret)
- return ret;
- beeper->period = period;
- }
+ if (value == 0)
+ beeper->period = 0;
+ else
+ beeper->period = HZ_TO_NANOSECONDS(value);
+
+ schedule_work(&beeper->work);
return 0;
}
+static void pwm_beeper_stop(struct pwm_beeper *beeper)
+{
+ cancel_work_sync(&beeper->work);
+
+ if (beeper->period)
+ pwm_disable(beeper->pwm);
+}
+
+static void pwm_beeper_close(struct input_dev *input)
+{
+ struct pwm_beeper *beeper = input_get_drvdata(input);
+
+ pwm_beeper_stop(beeper);
+}
+
static int __devinit pwm_beeper_probe(struct platform_device *pdev)
{
unsigned long pwm_id = (unsigned long)pdev->dev.platform_data;
@@ -82,6 +110,8 @@ static int __devinit pwm_beeper_probe(st
goto err_free;
}
+ INIT_WORK(&beeper->work, pwm_beeper_work);
+
beeper->input = input_allocate_device();
if (!beeper->input) {
dev_err(&pdev->dev, "Failed to allocate input device\n");
@@ -101,6 +131,7 @@ static int __devinit pwm_beeper_probe(st
beeper->input->sndbit[0] = BIT(SND_TONE) | BIT(SND_BELL);
beeper->input->event = pwm_beeper_event;
+ beeper->input->close = pwm_beeper_close;
input_set_drvdata(beeper->input, beeper);
@@ -131,7 +162,6 @@ static int __devexit pwm_beeper_remove(s
platform_set_drvdata(pdev, NULL);
input_unregister_device(beeper->input);
- pwm_disable(beeper->pwm);
pwm_free(beeper->pwm);
kfree(beeper);
@@ -144,8 +174,7 @@ static int pwm_beeper_suspend(struct dev
{
struct pwm_beeper *beeper = dev_get_drvdata(dev);
- if (beeper->period)
- pwm_disable(beeper->pwm);
+ pwm_beeper_stop(beeper);
return 0;
}
@@ -154,10 +183,8 @@ static int pwm_beeper_resume(struct devi
{
struct pwm_beeper *beeper = dev_get_drvdata(dev);
- if (beeper->period) {
- pwm_config(beeper->pwm, beeper->period / 2, beeper->period);
- pwm_enable(beeper->pwm);
- }
+ if (beeper->period)
+ __pwm_beeper_set(beeper);
return 0;
}
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 10/94] char: Drop bogus dependency of DEVPORT on !M68K
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (24 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 43/94] fix d_walk()/non-delayed __d_free() race Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 86/94] proc: prevent stacking filesystems on top Ben Hutchings
` (67 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Al Stone, Greg Kroah-Hartman, Geert Uytterhoeven
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <geert@linux-m68k.org>
commit 309124e2648d668a0c23539c5078815660a4a850 upstream.
According to full-history-linux commit d3794f4fa7c3edc3 ("[PATCH] M68k
update (part 25)"), port operations are allowed on m68k if CONFIG_ISA is
defined.
However, commit 153dcc54df826d2f ("[PATCH] mem driver: fix conditional
on isa i/o support") accidentally changed an "||" into an "&&",
disabling it completely on m68k. This logic was retained when
introducing the DEVPORT symbol in commit 4f911d64e04a44c4 ("Make
/dev/port conditional on config symbol").
Drop the bogus dependency on !M68K to fix this.
Fixes: 153dcc54df826d2f ("[PATCH] mem driver: fix conditional on isa i/o support")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Al Stone <ahs3@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/char/Kconfig | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -594,7 +594,6 @@ config TELCLOCK
config DEVPORT
bool
- depends on !M68K
depends on ISA || PCI
default y
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 38/94] mac80211_hwsim: Add missing check for HWSIM_ATTR_SIGNAL
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (29 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 14/94] ACPI / sysfs: fix error code in get_status() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 42/94] x86, build: copy ldlinux.c32 to image.iso Ben Hutchings
` (62 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Johannes Berg, Martin Willi
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Martin Willi <martin@strongswan.org>
commit 62397da50bb20a6b812c949ef465d7e69fe54bb6 upstream.
A wmediumd that does not send this attribute causes a NULL pointer
dereference, as the attribute is accessed even if it does not exist.
The attribute was required but never checked ever since userspace frame
forwarding has been introduced. The issue gets more problematic once we
allow wmediumd registration from user namespaces.
Fixes: 7882513bacb1 ("mac80211_hwsim driver support userspace frame tx/rx")
Signed-off-by: Martin Willi <martin@strongswan.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
[bwh: Backported to 3.2: adjust context, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/wireless/mac80211_hwsim.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1440,6 +1440,7 @@ static int hwsim_tx_info_frame_received_
if (!info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER] ||
!info->attrs[HWSIM_ATTR_FLAGS] ||
!info->attrs[HWSIM_ATTR_COOKIE] ||
+ !info->attrs[HWSIM_ATTR_SIGNAL] ||
!info->attrs[HWSIM_ATTR_TX_INFO])
goto out;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 35/94] Input: xpad - prevent spurious input from wired Xbox 360 controllers
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 27/94] fs/cifs: correctly to anonymous authentication for the NTLM(v1) authentication Ben Hutchings
` (92 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Dmitry Torokhov, Cameron Gutman, Pavel Rojtberg
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Cameron Gutman <aicommander@gmail.com>
commit 1ff5fa3c6732f08e01ae12f12286d4728c9e4d86 upstream.
After initially connecting a wired Xbox 360 controller or sending it
a command to change LEDs, a status/response packet is interpreted as
controller input. This causes the state of buttons represented in
byte 2 of the controller data packet to be incorrect until the next
valid input packet. Wireless Xbox 360 controllers are not affected.
Writing a new value to the LED device while holding the Start button
and running jstest is sufficient to reproduce this bug. An event will
come through with the Start button released.
Xboxdrv also won't attempt to read controller input from a packet
where byte 0 is non-zero. It also checks that byte 1 is 0x14, but
that value differs between wired and wireless controllers and this
code is shared by both. I think just checking byte 0 is enough to
eliminate unwanted packets.
The following are some examples of 3-byte status packets I saw:
01 03 02
02 03 00
03 03 03
08 03 00
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/input/joystick/xpad.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -368,6 +368,10 @@ static void xpad360_process_packet(struc
{
struct input_dev *dev = xpad->dev;
+ /* valid pad data */
+ if (data[0] != 0x00)
+ return;
+
/* digital pad */
if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
/* dpad as buttons (left, right, up, down) */
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 75/94] batman-adv: Fix use-after-free/double-free of tt_req_node
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (10 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 69/94] ALSA: dummy: Fix a use-after-free at closing Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 70/94] fs/nilfs2: fix potential underflow in call to crc32_le Ben Hutchings
` (81 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Marek Lindner, Amadeus Alfa, Sven Eckelmann, Martin Weinelt,
David S. Miller
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Sven Eckelmann <sven@narfation.org>
commit 9c4604a298e0a9807eaf2cd912d1ebf24d98fbeb upstream.
The tt_req_node is added and removed from a list inside a spinlock. But the
locking is sometimes removed even when the object is still referenced and
will be used later via this reference. For example batadv_send_tt_request
can create a new tt_req_node (including add to a list) and later
re-acquires the lock to remove it from the list and to free it. But at this
time another context could have already removed this tt_req_node from the
list and freed it.
CPU#0
batadv_batman_skb_recv from net_device 0
-> batadv_iv_ogm_receive
-> batadv_iv_ogm_process
-> batadv_iv_ogm_process_per_outif
-> batadv_tvlv_ogm_receive
-> batadv_tvlv_ogm_receive
-> batadv_tvlv_containers_process
-> batadv_tvlv_call_handler
-> batadv_tt_tvlv_ogm_handler_v1
-> batadv_tt_update_orig
-> batadv_send_tt_request
-> batadv_tt_req_node_new
spin_lock(...)
allocates new tt_req_node and adds it to list
spin_unlock(...)
return tt_req_node
CPU#1
batadv_batman_skb_recv from net_device 1
-> batadv_recv_unicast_tvlv
-> batadv_tvlv_containers_process
-> batadv_tvlv_call_handler
-> batadv_tt_tvlv_unicast_handler_v1
-> batadv_handle_tt_response
spin_lock(...)
tt_req_node gets removed from list and is freed
spin_unlock(...)
CPU#0
<- returned to batadv_send_tt_request
spin_lock(...)
tt_req_node gets removed from list and is freed
MEMORY CORRUPTION/SEGFAULT/...
spin_unlock(...)
This can only be solved via reference counting to allow multiple contexts
to handle the list manipulation while making sure that only the last
context holding a reference will free the object.
Fixes: a73105b8d4c7 ("batman-adv: improved client announcement mechanism")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Tested-by: Martin Weinelt <martin@darmstadt.freifunk.net>
Tested-by: Amadeus Alfa <amadeus@chemnitz.freifunk.net>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2:
- Adjust context
- Use struct tt_req_node instead of struct batadv_tt_req_node
- Use list_empty() instead of hlist_unhashed()
- Drop kernel-doc change]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
net/batman-adv/translation-table.c | 43 ++++++++++++++++++++++++++++++++------
net/batman-adv/types.h | 2 ++
2 files changed, 39 insertions(+), 6 deletions(-)
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -952,6 +952,29 @@ uint16_t tt_local_crc(struct bat_priv *b
return total;
}
+/**
+ * batadv_tt_req_node_release - free tt_req node entry
+ * @ref: kref pointer of the tt req_node entry
+ */
+static void batadv_tt_req_node_release(struct kref *ref)
+{
+ struct tt_req_node *tt_req_node;
+
+ tt_req_node = container_of(ref, struct tt_req_node, refcount);
+
+ kfree(tt_req_node);
+}
+
+/**
+ * batadv_tt_req_node_put - decrement the tt_req_node refcounter and
+ * possibly release it
+ * @tt_req_node: tt_req_node to be free'd
+ */
+static void batadv_tt_req_node_put(struct tt_req_node *tt_req_node)
+{
+ kref_put(&tt_req_node->refcount, batadv_tt_req_node_release);
+}
+
static void tt_req_list_free(struct bat_priv *bat_priv)
{
struct tt_req_node *node, *safe;
@@ -960,7 +983,7 @@ static void tt_req_list_free(struct bat_
list_for_each_entry_safe(node, safe, &bat_priv->tt_req_list, list) {
list_del(&node->list);
- kfree(node);
+ batadv_tt_req_node_put(node);
}
spin_unlock_bh(&bat_priv->tt_req_list_lock);
@@ -995,7 +1018,7 @@ static void tt_req_purge(struct bat_priv
if (is_out_of_time(node->issued_at,
TT_REQUEST_TIMEOUT * 1000)) {
list_del(&node->list);
- kfree(node);
+ batadv_tt_req_node_put(node);
}
}
spin_unlock_bh(&bat_priv->tt_req_list_lock);
@@ -1020,9 +1043,11 @@ static struct tt_req_node *new_tt_req_no
if (!tt_req_node)
goto unlock;
+ kref_init(&tt_req_node->refcount);
memcpy(tt_req_node->addr, orig_node->orig, ETH_ALEN);
tt_req_node->issued_at = jiffies;
+ kref_get(&tt_req_node->refcount);
list_add(&tt_req_node->list, &bat_priv->tt_req_list);
unlock:
spin_unlock_bh(&bat_priv->tt_req_list_lock);
@@ -1174,12 +1199,19 @@ out:
hardif_free_ref(primary_if);
if (ret)
kfree_skb(skb);
+
if (ret && tt_req_node) {
spin_lock_bh(&bat_priv->tt_req_list_lock);
- list_del(&tt_req_node->list);
+ if (!list_empty(&tt_req_node->list)) {
+ list_del(&tt_req_node->list);
+ batadv_tt_req_node_put(tt_req_node);
+ }
spin_unlock_bh(&bat_priv->tt_req_list_lock);
- kfree(tt_req_node);
}
+
+ if (tt_req_node)
+ batadv_tt_req_node_put(tt_req_node);
+
return ret;
}
@@ -1552,7 +1584,7 @@ void handle_tt_response(struct bat_priv
if (!compare_eth(node->addr, tt_response->src))
continue;
list_del(&node->list);
- kfree(node);
+ batadv_tt_req_node_put(node);
}
spin_unlock_bh(&bat_priv->tt_req_list_lock);
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -250,6 +250,7 @@ struct tt_change_node {
struct tt_req_node {
uint8_t addr[ETH_ALEN];
unsigned long issued_at;
+ struct kref refcount;
struct list_head list;
};
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 54/94] kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (66 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 49/94] iio: Fix error handling in iio_trigger_attach_poll_func Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 82/94] xenbus: don't BUG() on user mode induced condition Ben Hutchings
` (25 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Wei Tang, Xiubo Li, Zhang Zhuoyu, Paolo Bonzini
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Xiubo Li <lixiubo@cmss.chinamobile.com>
commit caf1ff26e1aa178133df68ac3d40815fed2187d9 upstream.
These days, we experienced one guest crash with 8 cores and 3 disks,
with qemu error logs as bellow:
qemu-system-x86_64: /build/qemu-2.0.0/kvm-all.c:984:
kvm_irqchip_commit_routes: Assertion `ret == 0' failed.
And then we found one patch(bdf026317d) in qemu tree, which said
could fix this bug.
Execute the following script will reproduce the BUG quickly:
irq_affinity.sh
========================================================================
vda_irq_num=25
vdb_irq_num=27
while [ 1 ]
do
for irq in {1,2,4,8,10,20,40,80}
do
echo $irq > /proc/irq/$vda_irq_num/smp_affinity
echo $irq > /proc/irq/$vdb_irq_num/smp_affinity
dd if=/dev/vda of=/dev/zero bs=4K count=100 iflag=direct
dd if=/dev/vdb of=/dev/zero bs=4K count=100 iflag=direct
done
done
========================================================================
The following qemu log is added in the qemu code and is displayed when
this bug reproduced:
kvm_irqchip_commit_routes: max gsi: 1008, nr_allocated_irq_routes: 1024,
irq_routes->nr: 1024, gsi_count: 1024.
That's to say when irq_routes->nr == 1024, there are 1024 routing entries,
but in the kernel code when routes->nr >= 1024, will just return -EINVAL;
The nr is the number of the routing entries which is in of
[1 ~ KVM_MAX_IRQ_ROUTES], not the index in [0 ~ KVM_MAX_IRQ_ROUTES - 1].
This patch fix the BUG above.
Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
Signed-off-by: Wei Tang <tangwei@cmss.chinamobile.com>
Signed-off-by: Zhang Zhuoyu <zhangzhuoyu@cmss.chinamobile.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
virt/kvm/assigned-dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/virt/kvm/assigned-dev.c
+++ b/virt/kvm/assigned-dev.c
@@ -826,7 +826,7 @@ long kvm_vm_ioctl_assigned_device(struct
if (copy_from_user(&routing, argp, sizeof(routing)))
goto out;
r = -EINVAL;
- if (routing.nr >= KVM_MAX_IRQ_ROUTES)
+ if (routing.nr > KVM_MAX_IRQ_ROUTES)
goto out;
if (routing.flags)
goto out;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 90/94] ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (27 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 29/94] sunrpc: Update RPCBIND_MAXNETIDLEN Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 14/94] ACPI / sysfs: fix error code in get_status() Ben Hutchings
` (64 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Kangjie Lu, Takashi Iwai, Kangjie Lu
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Kangjie Lu <kangjielu@gmail.com>
commit e4ec8cc8039a7063e24204299b462bd1383184a5 upstream.
The stack object “r1” has a total size of 32 bytes. Its field
“event” and “val” both contain 4 bytes padding. These 8 bytes
padding bytes are sent to user without being initialized.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
sound/core/timer.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1248,6 +1248,7 @@ static void snd_timer_user_tinterrupt(st
}
if ((tu->filter & (1 << SNDRV_TIMER_EVENT_RESOLUTION)) &&
tu->last_resolution != resolution) {
+ memset(&r1, 0, sizeof(r1));
r1.event = SNDRV_TIMER_EVENT_RESOLUTION;
r1.tstamp = tstamp;
r1.val = resolution;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 85/94] fs: limit filesystem stacking depth
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (80 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 45/94] usb: f_fs: off by one bug in _ffs_func_bind() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 81/94] qeth: delete napi struct when removing a qeth device Ben Hutchings
` (11 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Miklos Szeredi
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Miklos Szeredi <mszeredi@suse.cz>
commit 69c433ed2ecd2d3264efd7afec4439524b319121 upstream.
Add a simple read-only counter to super_block that indicates how deep this
is in the stack of filesystems. Previously ecryptfs was the only stackable
filesystem and it explicitly disallowed multiple layers of itself.
Overlayfs, however, can be stacked recursively and also may be stacked
on top of ecryptfs or vice versa.
To limit the kernel stack usage we must limit the depth of the
filesystem stack. Initially the limit is set to 2.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
[bwh: Backported to 3.2:
- Drop changes to overlayfs
- Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/ecryptfs/main.c | 7 +++++++
include/linux/fs.h | 11 +++++++++++
3 files changed, 27 insertions(+)
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -576,6 +576,13 @@ static struct dentry *ecryptfs_mount(str
s->s_maxbytes = path.dentry->d_sb->s_maxbytes;
s->s_blocksize = path.dentry->d_sb->s_blocksize;
s->s_magic = ECRYPTFS_SUPER_MAGIC;
+ s->s_stack_depth = path.dentry->d_sb->s_stack_depth + 1;
+
+ rc = -EINVAL;
+ if (s->s_stack_depth > FILESYSTEM_MAX_STACK_DEPTH) {
+ pr_err("eCryptfs: maximum fs stacking depth exceeded\n");
+ goto out_free;
+ }
inode = ecryptfs_get_inode(path.dentry->d_inode, s);
rc = PTR_ERR(inode);
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -486,6 +486,12 @@ struct iattr {
*/
#include <linux/quota.h>
+/*
+ * Maximum number of layers of fs stack. Needs to be limited to
+ * prevent kernel stack overflow
+ */
+#define FILESYSTEM_MAX_STACK_DEPTH 2
+
/**
* enum positive_aop_returns - aop return codes with specific semantics
*
@@ -1497,6 +1503,11 @@ struct super_block {
int cleancache_poolid;
struct shrinker s_shrink; /* per-sb shrinker handle */
+
+ /*
+ * Indicates how deep in a filesystem stack this SB is
+ */
+ int s_stack_depth;
};
/* superblock cache pruning functions */
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 27/94] fs/cifs: correctly to anonymous authentication for the NTLM(v1) authentication
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 35/94] Input: xpad - prevent spurious input from wired Xbox 360 controllers Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 61/94] mm: Export migrate_page_move_mapping and migrate_page_copy Ben Hutchings
` (91 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Stefan Metzmacher, Steve French
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Metzmacher <metze@samba.org>
commit 777f69b8d26bf35ade4a76b08f203c11e048365d upstream.
Only server which map unknown users to guest will allow
access using a non-null NTChallengeResponse.
For Samba it's the "map to guest = bad user" option.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
[bwh: Backported to 3.2:
- Adjust context, indentation
- Keep using cERROR()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -686,25 +686,31 @@ ssetup_ntlmssp_authenticate:
#endif
} else if (type == NTLM) {
pSMB->req_no_secext.Capabilities = cpu_to_le32(capabilities);
- pSMB->req_no_secext.CaseInsensitivePasswordLength =
- cpu_to_le16(CIFS_AUTH_RESP_SIZE);
- pSMB->req_no_secext.CaseSensitivePasswordLength =
- cpu_to_le16(CIFS_AUTH_RESP_SIZE);
+ if (ses->user_name != NULL) {
+ pSMB->req_no_secext.CaseInsensitivePasswordLength =
+ cpu_to_le16(CIFS_AUTH_RESP_SIZE);
+ pSMB->req_no_secext.CaseSensitivePasswordLength =
+ cpu_to_le16(CIFS_AUTH_RESP_SIZE);
- /* calculate ntlm response and session key */
- rc = setup_ntlm_response(ses, nls_cp);
- if (rc) {
- cERROR(1, "Error %d during NTLM authentication", rc);
- goto ssetup_exit;
- }
+ /* calculate ntlm response and session key */
+ rc = setup_ntlm_response(ses, nls_cp);
+ if (rc) {
+ cERROR(1, "Error %d during NTLM authentication",
+ rc);
+ goto ssetup_exit;
+ }
- /* copy ntlm response */
- memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
- CIFS_AUTH_RESP_SIZE);
- bcc_ptr += CIFS_AUTH_RESP_SIZE;
- memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
- CIFS_AUTH_RESP_SIZE);
- bcc_ptr += CIFS_AUTH_RESP_SIZE;
+ /* copy ntlm response */
+ memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
+ CIFS_AUTH_RESP_SIZE);
+ bcc_ptr += CIFS_AUTH_RESP_SIZE;
+ memcpy(bcc_ptr, ses->auth_key.response + CIFS_SESS_KEY_SIZE,
+ CIFS_AUTH_RESP_SIZE);
+ bcc_ptr += CIFS_AUTH_RESP_SIZE;
+ } else {
+ pSMB->req_no_secext.CaseInsensitivePasswordLength = 0;
+ pSMB->req_no_secext.CaseSensitivePasswordLength = 0;
+ }
if (ses->capabilities & CAP_UNICODE) {
/* unicode strings must be word aligned */
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 18/94] powerpc/mm/hash64: Factor out hash preload psize check
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (52 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 57/94] isa: Call isa_bus_init before dependent ISA bus drivers register Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 52/94] kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w Ben Hutchings
` (39 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Michael Ellerman
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Michael Ellerman <mpe@ellerman.id.au>
commit 8bbc9b7b001eaab8abf7e9e24edf1bb285c8d825 upstream.
Currently we have a check in hash_preload() against the psize, which is
only included when CONFIG_PPC_MM_SLICES is enabled. We want to expand
this check in a subsequent patch, so factor it out to allow that. As a
bonus it removes the #ifdef in the C code.
Unfortunately we can't put this in the existing CONFIG_PPC_MM_SLICES
block because it would require a forward declaration.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/powerpc/mm/hash_utils_64.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -1074,6 +1074,22 @@ int hash_page(unsigned long ea, unsigned
}
EXPORT_SYMBOL_GPL(hash_page);
+#ifdef CONFIG_PPC_MM_SLICES
+static bool should_hash_preload(struct mm_struct *mm, unsigned long ea)
+{
+ /* We only prefault standard pages for now */
+ if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize))
+ return false;
+
+ return true;
+}
+#else
+static bool should_hash_preload(struct mm_struct *mm, unsigned long ea)
+{
+ return true;
+}
+#endif
+
void hash_preload(struct mm_struct *mm, unsigned long ea,
unsigned long access, unsigned long trap)
{
@@ -1085,11 +1101,8 @@ void hash_preload(struct mm_struct *mm,
BUG_ON(REGION_ID(ea) != USER_REGION_ID);
-#ifdef CONFIG_PPC_MM_SLICES
- /* We only prefault standard pages for now */
- if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize))
+ if (!should_hash_preload(mm, ea))
return;
-#endif
DBG_LOW("hash_preload(mm=%p, mm->pgdir=%p, ea=%016lx, access=%lx,"
" trap=%lx\n", mm, mm->pgd, ea, access, trap);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 20/94] sched/loadavg: Fix loadavg artifacts on fully idle and on fully loaded systems
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (59 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 48/94] staging:iio: trigger fixes for repeat request of same trigger and allocation failure Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 25/94] fs/cifs: correctly to anonymous authentication via NTLMSSP Ben Hutchings
` (32 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Damien Wyart, Peter Zijlstra (Intel), Doug Smythies,
Linus Torvalds, Mike Galbraith, Ingo Molnar, Vik Heyndrickx,
Thomas Gleixner
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Vik Heyndrickx <vik.heyndrickx@veribox.net>
commit 20878232c52329f92423d27a60e48b6a6389e0dd upstream.
Systems show a minimal load average of 0.00, 0.01, 0.05 even when they
have no load at all.
Uptime and /proc/loadavg on all systems with kernels released during the
last five years up until kernel version 4.6-rc5, show a 5- and 15-minute
minimum loadavg of 0.01 and 0.05 respectively. This should be 0.00 on
idle systems, but the way the kernel calculates this value prevents it
from getting lower than the mentioned values.
Likewise but not as obviously noticeable, a fully loaded system with no
processes waiting, shows a maximum 1/5/15 loadavg of 1.00, 0.99, 0.95
(multiplied by number of cores).
Once the (old) load becomes 93 or higher, it mathematically can never
get lower than 93, even when the active (load) remains 0 forever.
This results in the strange 0.00, 0.01, 0.05 uptime values on idle
systems. Note: 93/2048 = 0.0454..., which rounds up to 0.05.
It is not correct to add a 0.5 rounding (=1024/2048) here, since the
result from this function is fed back into the next iteration again,
so the result of that +0.5 rounding value then gets multiplied by
(2048-2037), and then rounded again, so there is a virtual "ghost"
load created, next to the old and active load terms.
By changing the way the internally kept value is rounded, that internal
value equivalent now can reach 0.00 on idle, and 1.00 on full load. Upon
increasing load, the internally kept load value is rounded up, when the
load is decreasing, the load value is rounded down.
The modified code was tested on nohz=off and nohz kernels. It was tested
on vanilla kernel 4.6-rc5 and on centos 7.1 kernel 3.10.0-327. It was
tested on single, dual, and octal cores system. It was tested on virtual
hosts and bare hardware. No unwanted effects have been observed, and the
problems that the patch intended to fix were indeed gone.
Tested-by: Damien Wyart <damien.wyart@free.fr>
Signed-off-by: Vik Heyndrickx <vik.heyndrickx@veribox.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Doug Smythies <dsmythies@telus.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 0f004f5a696a ("sched: Cure more NO_HZ load average woes")
Link: http://lkml.kernel.org/r/e8d32bff-d544-7748-72b5-3c86cc71f09f@veribox.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
kernel/sched.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3507,10 +3507,13 @@ static long calc_load_fold_active(struct
static unsigned long
calc_load(unsigned long load, unsigned long exp, unsigned long active)
{
- load *= exp;
- load += active * (FIXED_1 - exp);
- load += 1UL << (FSHIFT - 1);
- return load >> FSHIFT;
+ unsigned long newload;
+
+ newload = load * exp + active * (FIXED_1 - exp);
+ if (active >= load)
+ newload += FIXED_1-1;
+
+ return newload / FIXED_1;
}
#ifdef CONFIG_NO_HZ
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 64/94] xen/pciback: Fix conf_space read/write overlap check.
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (77 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 51/94] kprobes/x86: Clear TF bit in fault on single-stepping Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 83/94] ecryptfs: don't allow mmap when the lower fs doesn't support it Ben Hutchings
` (14 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Jan Beulich, Boris Ostrovsky, Andrey Grodzovsky,
David Vrabel
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Andrey Grodzovsky <andrey2805@gmail.com>
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.
Signed-off-by: Andrey Grodzovsky <andrey2805@gmail.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/xen/xen-pciback/conf_space.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/drivers/xen/xen-pciback/conf_space.c
+++ b/drivers/xen/xen-pciback/conf_space.c
@@ -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,
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 01/94] regmap: cache: Fix typo in cache_bypass parameter description
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (84 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 72/94] iio: accel: kxsd9: fix the usage of spi_w8r8() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 78/94] etherdevice: introduce help function eth_zero_addr() Ben Hutchings
` (7 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Andrew F. Davis, Mark Brown
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: "Andrew F. Davis" <afd@ti.com>
commit 267c85860308d36bc163c5573308cd024f659d7c upstream.
Setting the flag 'cache_bypass' will bypass the cache not the hardware.
Fix this comment here.
Fixes: 0eef6b0415f5 ("regmap: Fix doc comment")
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/base/regmap/regcache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -294,7 +294,7 @@ EXPORT_SYMBOL_GPL(regcache_cache_only);
* regcache_cache_bypass: Put a register map into cache bypass mode
*
* @map: map to configure
- * @cache_bypass: flag if changes should not be written to the hardware
+ * @cache_bypass: flag if changes should not be written to the cache
*
* When a register map is marked with the cache bypass option, writes
* to the register map API will only update the hardware and not the
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 87/94] USB: usbfs: fix potential infoleak in devio
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (56 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 77/94] x86/amd_nb: Fix boot crash on non-AMD systems Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 31/94] Input: uinput - handle compat ioctl for UI_SET_PHYS Ben Hutchings
` (35 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Greg Kroah-Hartman, Kangjie Lu, Kangjie Lu
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Kangjie Lu <kangjielu@gmail.com>
commit 681fef8380eb818c0b845fca5d2ab1dcbab114ee upstream.
The stack object “ci” has a total size of 8 bytes. Its last 3 bytes
are padding bytes which are not initialized and leaked to userland
via “copy_to_user”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/usb/core/devio.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1005,10 +1005,11 @@ static int proc_getdriver(struct dev_sta
static int proc_connectinfo(struct dev_state *ps, void __user *arg)
{
- struct usbdevfs_connectinfo ci = {
- .devnum = ps->dev->devnum,
- .slow = ps->dev->speed == USB_SPEED_LOW
- };
+ struct usbdevfs_connectinfo ci;
+
+ memset(&ci, 0, sizeof(ci));
+ ci.devnum = ps->dev->devnum;
+ ci.slow = ps->dev->speed == USB_SPEED_LOW;
if (copy_to_user(arg, &ci, sizeof(ci)))
return -EFAULT;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 46/94] usb: musb: Ensure rx reinit occurs for shared_fifo endpoints
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (61 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 25/94] fs/cifs: correctly to anonymous authentication via NTLMSSP Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 56/94] IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs Ben Hutchings
` (30 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Greg Kroah-Hartman, Bin Liu, Andrew Goodbody
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Goodbody <andrew.goodbody@cambrionix.com>
commit f3eec0cf784e0d6c47822ca6b66df3d5812af7e6 upstream.
shared_fifo endpoints would only get a previous tx state cleared
out, the rx state was only cleared for non shared_fifo endpoints
Change this so that the rx state is cleared for all endpoints.
This addresses an issue that resulted in rx packets being dropped
silently.
Signed-off-by: Andrew Goodbody <andrew.goodbody@cambrionix.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/usb/musb/musb_host.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -571,14 +571,13 @@ musb_rx_reinit(struct musb *musb, struct
musb_writew(ep->regs, MUSB_TXCSR, 0);
/* scrub all previous state, clearing toggle */
- } else {
- csr = musb_readw(ep->regs, MUSB_RXCSR);
- if (csr & MUSB_RXCSR_RXPKTRDY)
- WARNING("rx%d, packet/%d ready?\n", ep->epnum,
- musb_readw(ep->regs, MUSB_RXCOUNT));
-
- musb_h_flush_rxfifo(ep, MUSB_RXCSR_CLRDATATOG);
}
+ csr = musb_readw(ep->regs, MUSB_RXCSR);
+ if (csr & MUSB_RXCSR_RXPKTRDY)
+ WARNING("rx%d, packet/%d ready?\n", ep->epnum,
+ musb_readw(ep->regs, MUSB_RXCOUNT));
+
+ musb_h_flush_rxfifo(ep, MUSB_RXCSR_CLRDATATOG);
/* target addr and (for multipoint) hub addr/port */
if (musb->is_multipoint) {
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 26/94] fs/cifs: correctly to anonymous authentication for the LANMAN authentication
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (48 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 93/94] tcp: make challenge acks less predictable Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 44/94] wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel Ben Hutchings
` (43 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Stefan Metzmacher, Steve French
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Stefan Metzmacher <metze@samba.org>
commit fa8f3a354bb775ec586e4475bcb07f7dece97e0c upstream.
Only server which map unknown users to guest will allow
access using a non-null LMChallengeResponse.
For Samba it's the "map to guest = bad user" option.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
[bwh: Backported to 3.2:
- Adjust context, indentation
- Keep ses->flags assignment out of the new if-statement]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/fs/cifs/sess.c
+++ b/fs/cifs/sess.c
@@ -655,23 +655,25 @@ ssetup_ntlmssp_authenticate:
pSMB->req.hdr.Flags2 &= ~SMBFLG2_UNICODE;
- /* no capabilities flags in old lanman negotiation */
-
- pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE);
-
- /* Calculate hash with password and copy into bcc_ptr.
- * Encryption Key (stored as in cryptkey) gets used if the
- * security mode bit in Negottiate Protocol response states
- * to use challenge/response method (i.e. Password bit is 1).
- */
-
- rc = calc_lanman_hash(ses->password, ses->server->cryptkey,
- ses->server->sec_mode & SECMODE_PW_ENCRYPT ?
- true : false, lnm_session_key);
-
+ if (ses->user_name != NULL) {
+ /* no capabilities flags in old lanman negotiation */
+ pSMB->old_req.PasswordLength = cpu_to_le16(CIFS_AUTH_RESP_SIZE);
+
+ /* Calculate hash with password and copy into bcc_ptr.
+ * Encryption Key (stored as in cryptkey) gets used if the
+ * security mode bit in Negottiate Protocol response states
+ * to use challenge/response method (i.e. Password bit is 1).
+ */
+ rc = calc_lanman_hash(ses->password, ses->server->cryptkey,
+ ses->server->sec_mode & SECMODE_PW_ENCRYPT ?
+ true : false, lnm_session_key);
+
+ memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE);
+ bcc_ptr += CIFS_AUTH_RESP_SIZE;
+ } else {
+ pSMB->old_req.PasswordLength = 0;
+ }
ses->flags |= CIFS_SES_LANMAN;
- memcpy(bcc_ptr, (char *)lnm_session_key, CIFS_AUTH_RESP_SIZE);
- bcc_ptr += CIFS_AUTH_RESP_SIZE;
/* can not sign if LANMAN negotiated so no need
to calculate signing key? but what if server
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 89/94] ALSA: timer: Fix leak in events via snd_timer_user_ccallback
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (22 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 12/94] USB: serial: option: add more ZTE device ids Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 43/94] fix d_walk()/non-delayed __d_free() race Ben Hutchings
` (69 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Kangjie Lu, Kangjie Lu, Takashi Iwai
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Kangjie Lu <kangjielu@gmail.com>
commit 9a47e9cff994f37f7f0dbd9ae23740d0f64f9fe6 upstream.
The stack object “r1” has a total size of 32 bytes. Its field
“event” and “val” both contain 4 bytes padding. These 8 bytes
padding bytes are sent to user without being initialized.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
sound/core/timer.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1213,6 +1213,7 @@ static void snd_timer_user_ccallback(str
tu->tstamp = *tstamp;
if ((tu->filter & (1 << event)) == 0 || !tu->tread)
return;
+ memset(&r1, 0, sizeof(r1));
r1.event = event;
r1.tstamp = *tstamp;
r1.val = resolution;
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 41/94] parisc: Fix pagefault crash in unaligned __get_user() call
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (37 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 94/94] audit: fix a double fetch in audit_log_single_execve_arg() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 28/94] fs/cifs: correctly to anonymous authentication for the NTLM(v2) authentication Ben Hutchings
` (54 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Helge Deller
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Helge Deller <deller@gmx.de>
commit 8b78f260887df532da529f225c49195d18fef36b upstream.
One of the debian buildd servers had this crash in the syslog without
any other information:
Unaligned handler failed, ret = -2
clock_adjtime (pid 22578): Unaligned data reference (code 28)
CPU: 1 PID: 22578 Comm: clock_adjtime Tainted: G E 4.5.0-2-parisc64-smp #1 Debian 4.5.4-1
task: 000000007d9960f8 ti: 00000001bde7c000 task.ti: 00000001bde7c000
YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00001000000001001111100000001111 Tainted: G E
r00-03 000000ff0804f80f 00000001bde7c2b0 00000000402d2be8 00000001bde7c2b0
r04-07 00000000409e1fd0 00000000fa6f7fff 00000001bde7c148 00000000fa6f7fff
r08-11 0000000000000000 00000000ffffffff 00000000fac9bb7b 000000000002b4d4
r12-15 000000000015241c 000000000015242c 000000000000002d 00000000fac9bb7b
r16-19 0000000000028800 0000000000000001 0000000000000070 00000001bde7c218
r20-23 0000000000000000 00000001bde7c210 0000000000000002 0000000000000000
r24-27 0000000000000000 0000000000000000 00000001bde7c148 00000000409e1fd0
r28-31 0000000000000001 00000001bde7c320 00000001bde7c350 00000001bde7c218
sr00-03 0000000001200000 0000000001200000 0000000000000000 0000000001200000
sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000
IASQ: 0000000000000000 0000000000000000 IAOQ: 00000000402d2e84 00000000402d2e88
IIR: 0ca0d089 ISR: 0000000001200000 IOR: 00000000fa6f7fff
CPU: 1 CR30: 00000001bde7c000 CR31: ffffffffffffffff
ORIG_R28: 00000002369fe628
IAOQ[0]: compat_get_timex+0x2dc/0x3c0
IAOQ[1]: compat_get_timex+0x2e0/0x3c0
RP(r2): compat_get_timex+0x40/0x3c0
Backtrace:
[<00000000402d4608>] compat_SyS_clock_adjtime+0x40/0xc0
[<0000000040205024>] syscall_exit+0x0/0x14
This means the userspace program clock_adjtime called the clock_adjtime()
syscall and then crashed inside the compat_get_timex() function.
Syscalls should never crash programs, but instead return EFAULT.
The IIR register contains the executed instruction, which disassebles
into "ldw 0(sr3,r5),r9".
This load-word instruction is part of __get_user() which tried to read the word
at %r5/IOR (0xfa6f7fff). This means the unaligned handler jumped in. The
unaligned handler is able to emulate all ldw instructions, but it fails if it
fails to read the source e.g. because of page fault.
The following program reproduces the problem:
#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/mman.h>
int main(void) {
/* allocate 8k */
char *ptr = mmap(NULL, 2*4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
/* free second half (upper 4k) and make it invalid. */
munmap(ptr+4096, 4096);
/* syscall where first int is unaligned and clobbers into invalid memory region */
/* syscall should return EFAULT */
return syscall(__NR_clock_adjtime, 0, ptr+4095);
}
To fix this issue we simply need to check if the faulting instruction address
is in the exception fixup table when the unaligned handler failed. If it
is, call the fixup routine instead of crashing.
While looking at the unaligned handler I found another issue as well: The
target register should not be modified if the handler was unsuccessful.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
arch/parisc/kernel/unaligned.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/arch/parisc/kernel/unaligned.c
+++ b/arch/parisc/kernel/unaligned.c
@@ -663,7 +663,7 @@ void handle_unaligned(struct pt_regs *re
break;
}
- if (modify && R1(regs->iir))
+ if (ret == 0 && modify && R1(regs->iir))
regs->gr[R1(regs->iir)] = newbase;
@@ -674,6 +674,14 @@ void handle_unaligned(struct pt_regs *re
if (ret)
{
+ /*
+ * The unaligned handler failed.
+ * If we were called by __get_user() or __put_user() jump
+ * to it's exception fixup handler instead of crashing.
+ */
+ if (!user_mode(regs) && fixup_exception(regs))
+ return;
+
printk(KERN_CRIT "Unaligned handler failed, ret = %d\n", ret);
die_if_kernel("Unaligned data reference", regs, 28);
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 43/94] fix d_walk()/non-delayed __d_free() race
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (23 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 89/94] ALSA: timer: Fix leak in events via snd_timer_user_ccallback Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 10/94] char: Drop bogus dependency of DEVPORT on !M68K Ben Hutchings
` (68 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: akpm, Al Viro
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Al Viro <viro@zeniv.linux.org.uk>
commit 3d56c25e3bb0726a5c5e16fc2d9e38f8ed763085 upstream.
Ascend-to-parent logics in d_walk() depends on all encountered child
dentries not getting freed without an RCU delay. Unfortunately, in
quite a few cases it is not true, with hard-to-hit oopsable race as
the result.
Fortunately, the fix is simiple; right now the rule is "if it ever
been hashed, freeing must be delayed" and changing it to "if it
ever had a parent, freeing must be delayed" closes that hole and
covers all cases the old rule used to cover. Moreover, pipes and
sockets remain _not_ covered, so we do not introduce RCU delay in
the cases which are the reason for having that delay conditional
in the first place.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[bwh: Backported to 3.2:
- Adjust context
- Also set the flag in __d_materialise_dentry())]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/dcache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1261,7 +1261,7 @@ struct dentry *d_alloc(struct dentry * p
struct dentry *dentry = __d_alloc(parent->d_sb, name);
if (!dentry)
return NULL;
-
+ dentry->d_flags |= DCACHE_RCUACCESS;
spin_lock(&parent->d_lock);
/*
* don't need child lock because it is not subject
@@ -2011,7 +2011,6 @@ static void __d_rehash(struct dentry * e
{
BUG_ON(!d_unhashed(entry));
hlist_bl_lock(b);
- entry->d_flags |= DCACHE_RCUACCESS;
hlist_bl_add_head_rcu(&entry->d_hash, b);
hlist_bl_unlock(b);
}
@@ -2195,6 +2194,7 @@ static void __d_move(struct dentry * den
/* ... and switch the parents */
if (IS_ROOT(dentry)) {
+ dentry->d_flags |= DCACHE_RCUACCESS;
dentry->d_parent = target->d_parent;
target->d_parent = target;
INIT_LIST_HEAD(&target->d_child);
@@ -2311,6 +2311,7 @@ static void __d_materialise_dentry(struc
switch_names(dentry, anon);
swap(dentry->d_name.hash, anon->d_name.hash);
+ dentry->d_flags |= DCACHE_RCUACCESS;
dentry->d_parent = (aparent == anon) ? dentry : aparent;
list_del(&dentry->d_child);
if (!IS_ROOT(dentry))
^ permalink raw reply [flat|nested] 98+ messages in thread
* [PATCH 3.2 59/94] can: at91_can: RX queue could get stuck at high bus load
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (72 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 04/94] PCI: Supply CPU physical address (not bus address) to iomem_is_exclusive() Ben Hutchings
@ 2016-08-13 17:42 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 09/94] ext4: fix hang when processing corrupted orphaned inode list Ben Hutchings
` (19 subsequent siblings)
93 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-13 17:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: akpm, Amr Bekhit, Wolfgang Grandegger, Marc Kleine-Budde
3.2.82-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Wolfgang Grandegger <wg@grandegger.com>
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.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Tested-by: Amr Bekhit <amrbekhit@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/can/at91_can.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -727,9 +727,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;
^ permalink raw reply [flat|nested] 98+ messages in thread
* Re: [PATCH 3.2 00/94] 3.2.82-rc1 review
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
` (92 preceding siblings ...)
2016-08-13 17:42 ` [PATCH 3.2 74/94] NFS: Fix another OPEN_DOWNGRADE bug Ben Hutchings
@ 2016-08-13 20:42 ` Guenter Roeck
2016-08-14 7:56 ` Ben Hutchings
93 siblings, 1 reply; 98+ messages in thread
From: Guenter Roeck @ 2016-08-13 20:42 UTC (permalink / raw)
To: Ben Hutchings, linux-kernel, stable; +Cc: torvalds, akpm
On 08/13/2016 10:42 AM, Ben Hutchings wrote:
> This is the start of the stable review cycle for the 3.2.82 release.
> There are 94 patches in this series, which will be posted as responses
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Tue Aug 16 00:00:00 UTC 2016.
> Anything received after that time might be too late.
>
Build results:
total: 89 pass: 89 fail: 0
Qemu test results:
total: 61 pass: 61 fail: 0
Details are available at http://kerneltests.org/builders/
Guenter
^ permalink raw reply [flat|nested] 98+ messages in thread
* Re: [PATCH 3.2 00/94] 3.2.82-rc1 review
2016-08-13 20:42 ` [PATCH 3.2 00/94] 3.2.82-rc1 review Guenter Roeck
@ 2016-08-14 7:56 ` Ben Hutchings
0 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-14 7:56 UTC (permalink / raw)
To: Guenter Roeck, linux-kernel, stable; +Cc: torvalds, akpm
[-- Attachment #1: Type: text/plain, Size: 810 bytes --]
On Sat, 2016-08-13 at 13:42 -0700, Guenter Roeck wrote:
> On 08/13/2016 10:42 AM, Ben Hutchings wrote:
> >
> > This is the start of the stable review cycle for the 3.2.82
> > release.
> > There are 94 patches in this series, which will be posted as
> > responses
> > to this one. If anyone has any issues with these being applied,
> > please
> > let me know.
> >
> > Responses should be made by Tue Aug 16 00:00:00 UTC 2016.
> > Anything received after that time might be too late.
> >
>
> Build results:
> total: 89 pass: 89 fail: 0
> Qemu test results:
> total: 61 pass: 61 fail: 0
>
> Details are available at http://kerneltests.org/builders/
Thanks for checking.
Ben.
--
Ben Hutchings
Make three consecutive correct guesses and you will be considered an
expert.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 98+ messages in thread
* Re: [PATCH 3.2 44/94] wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel
2016-08-13 17:42 ` [PATCH 3.2 44/94] wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel Ben Hutchings
@ 2016-08-15 5:51 ` Johannes Berg
2016-08-15 22:05 ` Ben Hutchings
0 siblings, 1 reply; 98+ messages in thread
From: Johannes Berg @ 2016-08-15 5:51 UTC (permalink / raw)
To: Ben Hutchings, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Cc: akpm@linux-foundation.org, Prasun Maiti, Ujjal Roy,
Dibyajyoti Ghosh
On Sat, 2016-08-13 at 17:42 +0000, Ben Hutchings wrote:
> 3.2.82-rc1 review patch. If anyone has any objections, please let me
> know.
>
> ------------------
>
> From: Prasun Maiti <prasunmaiti87@gmail.com>
>
> commit 3d5fdff46c4b2b9534fa2f9fc78e90a48e0ff724 upstream.
>
Did you just include this by accident? You had pointed out yourself
that this was broken if anything but iwpoint was transferred, and since
the Marvell people shouldn't be using wext anyway I reverted it
already.
johannes
^ permalink raw reply [flat|nested] 98+ messages in thread
* Re: [PATCH 3.2 44/94] wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel
2016-08-15 5:51 ` Johannes Berg
@ 2016-08-15 22:05 ` Ben Hutchings
0 siblings, 0 replies; 98+ messages in thread
From: Ben Hutchings @ 2016-08-15 22:05 UTC (permalink / raw)
To: Johannes Berg, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Cc: akpm@linux-foundation.org, Prasun Maiti, Ujjal Roy,
Dibyajyoti Ghosh
[-- Attachment #1: Type: text/plain, Size: 741 bytes --]
On Mon, 2016-08-15 at 07:51 +0200, Johannes Berg wrote:
> On Sat, 2016-08-13 at 17:42 +0000, Ben Hutchings wrote:
> >
> > 3.2.82-rc1 review patch. If anyone has any objections, please let me
> > know.
> >
> > ------------------
> >
> > > > From: Prasun Maiti <prasunmaiti87@gmail.com>
> >
> > commit 3d5fdff46c4b2b9534fa2f9fc78e90a48e0ff724 upstream.
> >
>
> Did you just include this by accident? You had pointed out yourself
> that this was broken if anything but iwpoint was transferred, and since
> the Marvell people shouldn't be using wext anyway I reverted it
> already.
Yes, this was an accident and I'll drop it.
Ben.
--
Ben Hutchings
This sentence contradicts itself - no actually it doesn't.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 98+ messages in thread
end of thread, other threads:[~2016-08-15 22:05 UTC | newest]
Thread overview: 98+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-13 17:42 [PATCH 3.2 00/94] 3.2.82-rc1 review Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 35/94] Input: xpad - prevent spurious input from wired Xbox 360 controllers Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 27/94] fs/cifs: correctly to anonymous authentication for the NTLM(v1) authentication Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 61/94] mm: Export migrate_page_move_mapping and migrate_page_copy Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 02/94] ath5k: Change led pin configuration for compaq c700 laptop Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 03/94] crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 58/94] hwmon: (dell-smm) Restrict fan control and serial number to CAP_SYS_ADMIN by default Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 40/94] KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 92/94] rds: fix an infoleak in rds_inc_info_copy Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 21/94] mmc: mmc: Fix partition switch timeout for some eMMCs Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 23/94] x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 69/94] ALSA: dummy: Fix a use-after-free at closing Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 75/94] batman-adv: Fix use-after-free/double-free of tt_req_node Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 70/94] fs/nilfs2: fix potential underflow in call to crc32_le Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 13/94] USB: serial: option: add even more ZTE device ids Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 16/94] gcov: disable tree-loop-im to reduce stack usage Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 37/94] Input: pwm-beeper - fix - scheduling while atomic Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 07/94] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 36/94] Input: pwm-beeper - remove useless call to pwm_config() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 73/94] ALSA: echoaudio: Fix memory allocation Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 84/94] cifs: dynamic allocation of ntlmssp blob Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 05/94] alpha/PCI: Call iomem_is_exclusive() for IORESOURCE_MEM, but not IORESOURCE_IO Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 34/94] RDMA/cxgb3: device driver frees DMA memory with different size Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 12/94] USB: serial: option: add more ZTE device ids Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 89/94] ALSA: timer: Fix leak in events via snd_timer_user_ccallback Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 43/94] fix d_walk()/non-delayed __d_free() race Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 10/94] char: Drop bogus dependency of DEVPORT on !M68K Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 86/94] proc: prevent stacking filesystems on top Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 29/94] sunrpc: Update RPCBIND_MAXNETIDLEN Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 90/94] ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 14/94] ACPI / sysfs: fix error code in get_status() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 38/94] mac80211_hwsim: Add missing check for HWSIM_ATTR_SIGNAL Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 42/94] x86, build: copy ldlinux.c32 to image.iso Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 08/94] aacraid: Fix for aac_command_thread hang Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 91/94] tipc: fix an infoleak in tipc_nl_compat_link_dump Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 79/94] bonding: prevent out of bound accesses Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 66/94] Input: wacom_w8001 - w8001_MAX_LENGTH should be 13 Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 88/94] ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMS Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 94/94] audit: fix a double fetch in audit_log_single_execve_arg() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 41/94] parisc: Fix pagefault crash in unaligned __get_user() call Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 28/94] fs/cifs: correctly to anonymous authentication for the NTLM(v2) authentication Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 55/94] KEYS: potential uninitialized variable Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 33/94] xen/events: Don't move disabled irqs Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 24/94] PCI: Disable all BAR sizing for devices with non-compliant BARs Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 71/94] staging: iio: accel: fix error check Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 17/94] ata: sata_dwc_460ex: remove incorrect locking Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 50/94] drm/radeon: fix asic initialization for virtualized environments Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 15/94] MIPS: Adjust set_pte() SMP fix to handle R10000_LLSC_WAR Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 65/94] IB/mlx4: Fix the SQ size of an RC QP Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 93/94] tcp: make challenge acks less predictable Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 26/94] fs/cifs: correctly to anonymous authentication for the LANMAN authentication Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 44/94] wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel Ben Hutchings
2016-08-15 5:51 ` Johannes Berg
2016-08-15 22:05 ` Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 80/94] ALSA: timer: Fix negative queue usage by racy accesses Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 57/94] isa: Call isa_bus_init before dependent ISA bus drivers register Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 18/94] powerpc/mm/hash64: Factor out hash preload psize check Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 52/94] kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 68/94] HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 77/94] x86/amd_nb: Fix boot crash on non-AMD systems Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 87/94] USB: usbfs: fix potential infoleak in devio Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 31/94] Input: uinput - handle compat ioctl for UI_SET_PHYS Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 48/94] staging:iio: trigger fixes for repeat request of same trigger and allocation failure Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 20/94] sched/loadavg: Fix loadavg artifacts on fully idle and on fully loaded systems Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 25/94] fs/cifs: correctly to anonymous authentication via NTLMSSP Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 46/94] usb: musb: Ensure rx reinit occurs for shared_fifo endpoints Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 56/94] IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 19/94] powerpc/mm/hash64: Fix subpage protection with 4K HPTE config Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 32/94] wait/ptrace: assume __WALL if the child is traced Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 49/94] iio: Fix error handling in iio_trigger_attach_poll_func Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 54/94] kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 82/94] xenbus: don't BUG() on user mode induced condition Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 22/94] net/mlx4_core: Fix access to uninitialized index Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 60/94] ubi: Make recover_peb power cut aware Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 30/94] net: ehea: avoid null pointer dereference Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 04/94] PCI: Supply CPU physical address (not bus address) to iomem_is_exclusive() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 59/94] can: at91_can: RX queue could get stuck at high bus load Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 09/94] ext4: fix hang when processing corrupted orphaned inode list Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 53/94] base: make module_create_drivers_dir race-free Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 67/94] Input: elantech - add more IC body types to the list Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 51/94] kprobes/x86: Clear TF bit in fault on single-stepping Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 64/94] xen/pciback: Fix conf_space read/write overlap check Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 83/94] ecryptfs: don't allow mmap when the lower fs doesn't support it Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 45/94] usb: f_fs: off by one bug in _ffs_func_bind() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 85/94] fs: limit filesystem stacking depth Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 81/94] qeth: delete napi struct when removing a qeth device Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 63/94] can: fix oops caused by wrong rtnl dellink usage Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 72/94] iio: accel: kxsd9: fix the usage of spi_w8r8() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 01/94] regmap: cache: Fix typo in cache_bypass parameter description Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 78/94] etherdevice: introduce help function eth_zero_addr() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 06/94] crypto: s5p-sss - fix incorrect usage of scatterlists api Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 62/94] UBIFS: Implement ->migratepage() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 39/94] ARM: fix PTRACE_SETVFPREGS on SMP systems Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 11/94] tty: vt, return error when con_startup fails Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 76/94] ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift() Ben Hutchings
2016-08-13 17:42 ` [PATCH 3.2 74/94] NFS: Fix another OPEN_DOWNGRADE bug Ben Hutchings
2016-08-13 20:42 ` [PATCH 3.2 00/94] 3.2.82-rc1 review Guenter Roeck
2016-08-14 7:56 ` Ben Hutchings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).