[ Upstream commit 118b918018175d9fcd8db667f905012e986cc2c9 ]
This fixes a concurrency issue addressed in commit 34cb275283 ("UIO: Fix
concurrency issue"):
"In a SMP case there was a race condition issue between
Uio_pdrv_genirq_irqcontrol() running on one CPU and irq handler on
another CPU. Fix it by spin_locking shared resources access inside irq
handler."
The implementation of "uio_dmem_genirq" was based on "uio_pdrv_genirq" and
it is used in a similar manner to the "uio_pdrv_genirq" driver with respect
to interrupt configuration and handling. At the time "uio_dmem_genirq" was
merged, both had the same implementation of the 'uio_info' handlers
irqcontrol() and handler(), thus, both had the same concurrency issue
mentioned by the above commit. However, the above patch was only applied to
the "uio_pdrv_genirq" driver.
Split out from commit 34cb275283 ("UIO: Fix concurrency issue").
Fixes: 0a0c3b5a24 ("Add new uio device for dynamic memory allocation")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Link: https://lore.kernel.org/r/20220930224100.816175-3-rafaelmendsr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Rafael Mendoncaauthored and Greg Kroah-Hartmancommited 2023-01-07 12:07:24 +01:00
[ Upstream commit 9de255c461d1b3f0242b3ad1450c3323a3e00b34 ]
Commit b74351287d4b ("uio: fix a sleep-in-atomic-context bug in
uio_dmem_genirq_irqcontrol()") started calling disable_irq() without
holding the spinlock because it can sleep. However, that fix introduced
another bug: if interrupt is already disabled and a new disable request
comes in, then the spinlock is not unlocked:
root@localhost:~# printf '\x00\x00\x00\x00' > /dev/uio0
root@localhost:~# printf '\x00\x00\x00\x00' > /dev/uio0
root@localhost:~# [ 14.851538] BUG: scheduling while atomic: bash/223/0x00000002
[ 14.851991] Modules linked in: uio_dmem_genirq uio myfpga(OE) bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper drm snd_pcm ppdev joydev psmouse snd_timer snd e1000fb_sys_fops syscopyarea parport sysfillrect soundcore sysimgblt input_leds pcspkr i2c_piix4 serio_raw floppy evbug qemu_fw_cfg mac_hid pata_acpi ip_tables x_tables autofs4 [last unloaded: parport_pc]
[ 14.854206] CPU: 0 PID: 223 Comm: bash Tainted: G OE 6.0.0-rc7 #21
[ 14.854786] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
[ 14.855664] Call Trace:
[ 14.855861] <TASK>
[ 14.856025] dump_stack_lvl+0x4d/0x67
[ 14.856325] dump_stack+0x14/0x1a
[ 14.856583] __schedule_bug.cold+0x4b/0x5c
[ 14.856915] __schedule+0xe81/0x13d0
[ 14.857199] ? idr_find+0x13/0x20
[ 14.857456] ? get_work_pool+0x2d/0x50
[ 14.857756] ? __flush_work+0x233/0x280
[ 14.858068] ? __schedule+0xa95/0x13d0
[ 14.858307] ? idr_find+0x13/0x20
[ 14.858519] ? get_work_pool+0x2d/0x50
[ 14.858798] schedule+0x6c/0x100
[ 14.859009] schedule_hrtimeout_range_clock+0xff/0x110
[ 14.859335] ? tty_write_room+0x1f/0x30
[ 14.859598] ? n_tty_poll+0x1ec/0x220
[ 14.859830] ? tty_ldisc_deref+0x1a/0x20
[ 14.860090] schedule_hrtimeout_range+0x17/0x20
[ 14.860373] do_select+0x596/0x840
[ 14.860627] ? __kernel_text_address+0x16/0x50
[ 14.860954] ? poll_freewait+0xb0/0xb0
[ 14.861235] ? poll_freewait+0xb0/0xb0
[ 14.861517] ? rpm_resume+0x49d/0x780
[ 14.861798] ? common_interrupt+0x59/0xa0
[ 14.862127] ? asm_common_interrupt+0x2b/0x40
[ 14.862511] ? __uart_start.isra.0+0x61/0x70
[ 14.862902] ? __check_object_size+0x61/0x280
[ 14.863255] core_sys_select+0x1c6/0x400
[ 14.863575] ? vfs_write+0x1c9/0x3d0
[ 14.863853] ? vfs_write+0x1c9/0x3d0
[ 14.864121] ? _copy_from_user+0x45/0x70
[ 14.864526] do_pselect.constprop.0+0xb3/0xf0
[ 14.864893] ? do_syscall_64+0x6d/0x90
[ 14.865228] ? do_syscall_64+0x6d/0x90
[ 14.865556] __x64_sys_pselect6+0x76/0xa0
[ 14.865906] do_syscall_64+0x60/0x90
[ 14.866214] ? syscall_exit_to_user_mode+0x2a/0x50
[ 14.866640] ? do_syscall_64+0x6d/0x90
[ 14.866972] ? do_syscall_64+0x6d/0x90
[ 14.867286] ? do_syscall_64+0x6d/0x90
[ 14.867626] entry_SYSCALL_64_after_hwframe+0x63/0xcd
[...] stripped
[ 14.872959] </TASK>
('myfpga' is a simple 'uio_dmem_genirq' driver I wrote to test this)
The implementation of "uio_dmem_genirq" was based on "uio_pdrv_genirq" and
it is used in a similar manner to the "uio_pdrv_genirq" driver with respect
to interrupt configuration and handling. At the time "uio_dmem_genirq" was
introduced, both had the same implementation of the 'uio_info' handlers
irqcontrol() and handler(). Then commit 34cb275283 ("UIO: Fix concurrency
issue"), which was only applied to "uio_pdrv_genirq", ended up making them
a little different. That commit, among other things, changed disable_irq()
to disable_irq_nosync() in the implementation of irqcontrol(). The
motivation there was to avoid a deadlock between irqcontrol() and
handler(), since it added a spinlock in the irq handler, and disable_irq()
waits for the completion of the irq handler.
By changing disable_irq() to disable_irq_nosync() in irqcontrol(), we also
avoid the sleeping-while-atomic bug that commit b74351287d4b ("uio: fix a
sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()") was trying to
fix. Thus, this fixes the missing unlock in irqcontrol() by importing the
implementation of irqcontrol() handler from the "uio_pdrv_genirq" driver.
In the end, it reverts commit b74351287d4b ("uio: fix a
sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()") and change
disable_irq() to disable_irq_nosync().
It is worth noting that this still does not address the concurrency issue
fixed by commit 34cb275283 ("UIO: Fix concurrency issue"). It will be
addressed separately in the next commits.
Split out from commit 34cb275283 ("UIO: Fix concurrency issue").
Fixes: b74351287d4b ("uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Link: https://lore.kernel.org/r/20220930224100.816175-2-rafaelmendsr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Rafael Mendoncaauthored and Greg Kroah-Hartmancommited 2023-01-07 12:07:24 +01:00
commit bf12fdf0ab728ca8e5933aac46dd972c0dd0421e upstream.
While e3a3c3a205 ("UIO: fix uio_pdrv_genirq with device tree but no
interrupt") added support for using uio_pdrv_genirq for devices without
interrupt for device tree platforms, the removal of uio_pdrv in
26dac3c49d ("uio: Remove uio_pdrv and use uio_pdrv_genirq instead")
broke the support for non device tree platforms.
This change fixes this, so that uio_pdrv_genirq can be used without
interrupt on all platforms.
This still leaves the support that uio_pdrv had for custom interrupt
handler lacking, as uio_pdrv_genirq does not handle it (yet).
Fixes: 26dac3c49d ("uio: Remove uio_pdrv and use uio_pdrv_genirq instead")
Signed-off-by: Esben Haabendal <esben@geanix.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200701145659.3978-3-esben@geanix.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Esben Haabendalauthored and Greg Kroah-Hartmancommited 2020-07-22 09:10:53 +02:00
* refs/heads/tmp-60fbe70:
UPSTREAM: sched/psi: Fix OOB write when writing 0 bytes to PSI files
UPSTREAM: psi: Fix a division error in psi poll()
UPSTREAM: sched/psi: Fix sampling error and rare div0 crashes with cgroups and high uptime
UPSTREAM: sched/psi: Correct overly pessimistic size calculation
Linux 4.9.215
s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range
xen: Enable interrupts when calling _cond_resched()
ata: ahci: Add shutdown to freeze hardware resources of ahci
netfilter: xt_hashlimit: limit the max size of hashtable
ALSA: seq: Fix concurrent access to queue current tick/time
ALSA: seq: Avoid concurrent access to queue flags
ALSA: rawmidi: Avoid bit fields for state flags
ecryptfs: replace BUG_ON with error handling code
staging: greybus: use after free in gb_audio_manager_remove_all()
usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus
scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session"
scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout"
Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents
KVM: apic: avoid calculating pending eoi from an uninitialized val
KVM: nVMX: Check IO instruction VM-exit conditions
KVM: nVMX: Refactor IO bitmap checks into helper function
ext4: fix race between writepages and enabling EXT4_EXTENTS_FL
ext4: rename s_journal_flag_rwsem to s_writepages_rwsem
ext4: fix mount failure with quota configured as module
ext4: add cond_resched() to __ext4_find_entry()
ext4: fix a data race in EXT4_I(inode)->i_disksize
netfilter: xt_bpf: add overflow checks
KVM: nVMX: Don't emulate instructions in guest mode
lib/stackdepot.c: fix global out-of-bounds in stack_slabs
vt: vt_ioctl: fix race in VT_RESIZEX
VT_RESIZEX: get rid of field-by-field copyin
KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI
xhci: apply XHCI_PME_STUCK_QUIRK to Intel Comet Lake platforms
Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()"
tty: serial: imx: setup the correct sg entry for tx dma
tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode
x86/mce/amd: Fix kobject lifetime
x86/mce/amd: Publish the bank pointer only after setup has succeeded
staging: rtl8188eu: Fix potential overuse of kernel memory
staging: rtl8188eu: Fix potential security hole
USB: hub: Don't record a connect-change event during reset-resume
USB: Fix novation SourceControl XL after suspend
usb: uas: fix a plug & unplug racing
xhci: Force Maximum Packet size for Full-speed bulk devices to valid range.
staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.
staging: android: ashmem: Disallow ashmem memory from being remapped
vt: selection, handle pending signals in paste_selection
floppy: check FDC index for errors before assigning it
net/sched: flower: add missing validation of TCA_FLOWER_FLAGS
net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS
enic: prevent waking up stopped tx queues over watchdog reset
selinux: ensure we cleanup the internal AVC counters on error in avc_update()
help_next should increase position index
brd: check and limit max_part par
microblaze: Prevent the overflow of the start
iwlwifi: mvm: Fix thermal zone registration
irqchip/gic-v3-its: Reference to its_invall_cmd descriptor when building INVALL
bcache: explicity type cast in bset_bkey_last()
reiserfs: prevent NULL pointer dereference in reiserfs_insert_item()
lib/scatterlist.c: adjust indentation in __sg_alloc_table
ocfs2: fix a NULL pointer dereference when call ocfs2_update_inode_fsync_trans()
radeon: insert 10ms sleep in dce5_crtc_load_lut
trigger_next should increase position index
ftrace: fpid_next() should increase position index
drm/nouveau/disp/nv50-: prevent oops when no channel method map provided
irqchip/gic-v3: Only provision redistributors that are enabled in ACPI
cifs: fix NULL dereference in match_prepath
iwlegacy: ensure loop counter addr does not wrap and cause an infinite loop
hostap: Adjust indentation in prism2_hostapd_add_sta
ARM: 8951/1: Fix Kexec compilation issue.
jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record
powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV
ALSA: hda - Add docking station support for Lenovo Thinkpad T420s
driver core: platform: fix u32 greater or equal to zero comparison
s390/ftrace: generate traced function stack frame
x86/decoder: Add TEST opcode to Group3-2
remoteproc: Initialize rproc_class before use
ide: serverworks: potential overflow in svwks_set_pio_mode()
cmd64x: potential buffer overflow in cmd64x_program_timings()
pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional
arm64: fix alternatives with LLVM's integrated assembler
scsi: iscsi: Don't destroy session if there are outstanding connections
iommu/arm-smmu-v3: Use WRITE_ONCE() when changing validity of an STE
usb: musb: omap2430: Get rid of musb .set_vbus for omap2430 glue
drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add
drm/nouveau: Fix copy-paste error in nouveau_fence_wait_uevent_handler
drm/nouveau/gr/gk20a,gm200-: add terminators to method lists read from fw
vme: bridges: reduce stack usage
driver core: Print device when resources present in really_probe()
driver core: platform: Prevent resouce overflow from causing infinite loops
tty: synclink_gt: Adjust indentation in several functions
tty: synclinkmp: Adjust indentation in several functions
ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m
wan: ixp4xx_hss: fix compile-testing on 64-bit
Input: edt-ft5x06 - work around first register access error
rcu: Use WRITE_ONCE() for assignments to ->pprev for hlist_nulls
soc/tegra: fuse: Correct straps' address for older Tegra124 device trees
udf: Fix free space reporting for metadata and virtual partitions
usbip: Fix unsafe unaligned pointer usage
tools lib api fs: Fix gcc9 stringop-truncation compilation error
ALSA: sh: Fix compile warning wrt const
RDMA/rxe: Fix error type of mmap_offset
pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs
PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency
x86/vdso: Provide missing include file
ARM: dts: r8a7779: Add device node for ARM global timer
drm/mediatek: handle events when enabling/disabling crtc
scsi: aic7xxx: Adjust indentation in ahc_find_syncrate
ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1
orinoco: avoid assertion in case of NULL pointer
rtlwifi: rtl_pci: Fix -Wcast-function-type
iwlegacy: Fix -Wcast-function-type
ipw2x00: Fix -Wcast-function-type
b43legacy: Fix -Wcast-function-type
ALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status
reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling
media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros
NFC: port100: Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu().
PCI/IOV: Fix memory leak in pci_iov_add_virtfn()
net/wan/fsl_ucc_hdlc: reject muram offsets above 64K
regulator: rk808: Lower log level on optional GPIOs being not available
drm/amdgpu: remove 4 set but not used variable in amdgpu_atombios_get_connector_info_from_object_table
clk: qcom: rcg2: Don't crash if our parent can't be found; return an error
kconfig: fix broken dependency in randconfig-generated .config
ext4, jbd2: ensure panic when aborting with zero errno
tracing: Fix very unlikely race of registering two stat tracers
tracing: Fix tracing_stat return values in error handling paths
x86/sysfb: Fix check for bad VRAM size
jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal
usb: gadget: udc: fix possible sleep-in-atomic-context bugs in gr_probe()
uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol()
sparc: Add .exit.data section.
MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init()
efi/x86: Map the entire EFI vendor string before copying it
pinctrl: baytrail: Do not clear IRQ flags on direct-irq enabled pins
media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run()
gpio: gpio-grgpio: fix possible sleep-in-atomic-context bugs in grgpio_irq_map/unmap()
powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number
media: i2c: mt9v032: fix enum mbus codes and frame sizes
pxa168fb: Fix the function used to release some memory in an error handling path
pinctrl: sh-pfc: sh7264: Fix CAN function GPIOs
gianfar: Fix TX timestamping with a stacked DSA driver
brcmfmac: Fix use after free in brcmf_sdio_readframes()
cpu/hotplug, stop_machine: Fix stop_machine vs hotplug order
drm/gma500: Fixup fbdev stolen size usage evaluation
Revert "KVM: VMX: Add non-canonical check on writes to RTIT address MSRs"
scsi: qla2xxx: fix a potential NULL pointer dereference
btrfs: print message when tree-log replay starts
jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer
jbd2: move the clearing of b_modified flag to the journal_unmap_buffer()
hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions.
perf/x86/intel: Fix inaccurate period in context switch for auto-reload
s390/time: Fix clk type in get_tod_clock
padata: Remove broken queue flushing
perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map
btrfs: log message when rw remount is attempted with unclean tree-log
Btrfs: fix race between using extent maps and merging them
ext4: improve explanation of a mount failure caused by a misconfigured kernel
ext4: fix checksum errors with indexed dirs
ext4: don't assume that mmp_nodename/bdevname have NUL
ALSA: usb-audio: Apply sample rate quirk for Audioengine D1
ecryptfs: fix a memory leak bug in ecryptfs_init_messaging()
ecryptfs: fix a memory leak bug in parse_tag_1_packet()
ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs
KVM: x86: emulate RDPID
x86/vdso: Use RDPID in preference to LSL when available
Conflicts:
drivers/usb/host/xhci-mem.c
Change-Id: I96eafddc50120464633c0f4815302cbca0921df8
Signed-off-by: jianzhou <jianzhou@codeaurora.org>
[ Upstream commit b74351287d4bd90636c3f48bc188c2f53824c2d4 ]
The driver may sleep while holding a spinlock.
The function call path (from bottom to top) in Linux 4.19 is:
kernel/irq/manage.c, 523:
synchronize_irq in disable_irq
drivers/uio/uio_dmem_genirq.c, 140:
disable_irq in uio_dmem_genirq_irqcontrol
drivers/uio/uio_dmem_genirq.c, 134:
_raw_spin_lock_irqsave in uio_dmem_genirq_irqcontrol
synchronize_irq() can sleep at runtime.
To fix this bug, disable_irq() is called without holding the spinlock.
This bug is found by a static analysis tool STCheck written by myself.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20191218094405.6009-1-baijiaju1990@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Jia-Ju Baiauthored and Greg Kroah-Hartmancommited 2020-02-28 15:42:20 +01:00
* refs/heads/tmp-6328e64:
Revert "scsi: ufs: fix race between clock gating and devfreq scaling work"
Linux 4.9.145
kbuild: allow to use GCC toolchain not in Clang search path
kbuild: fix linker feature test macros when cross compiling with Clang
mac80211: ignore NullFunc frames in the duplicate detection
mac80211: fix reordering of buffered broadcast packets
mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext
mac80211: Clear beacon_int in ieee80211_do_stop
mac80211_hwsim: Timer should be initialized before device registered
kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var()
tty: do not set TTY_IO_ERROR flag if console port
tty: serial: 8250_mtk: always resume the device in probe.
staging: rtl8712: Fix possible buffer overrun
cifs: Fix separator when building path from dentry
Staging: lustre: remove two build warnings
vhost/vsock: fix use-after-free in network stack callers
vsock: lookup and setup guest_cid inside vhost_vsock_lock
swiotlb: clean up reporting
sr: pass down correctly sized SCSI sense buffer
xhci: Prevent U1/U2 link pm states if exit latency is too long
dmaengine: cppi41: delete channel from pending list when stop channel
SUNRPC: Fix leak of krb5p encode pages
virtio/s390: fix race in ccw_io_helper()
virtio/s390: avoid race on vcdev->config
ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570
ALSA: pcm: Fix interval evaluation with openmin/max
ALSA: pcm: Call snd_pcm_unlink() conditionally at closing
ALSA: pcm: Fix starvation on down_write_nonblock()
ALSA: hda: Add support for AMD Stoney Ridge
ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in card.c
USB: check usb_get_extra_descriptor for proper size
usb: appledisplay: Add 27" Apple Cinema Display
usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device
ARC: [zebu] Remove CONFIG_INITRAMFS_SOURCE from defconfigs
mm: don't warn about allocations which stall for too long
net: amd: add missing of_node_put()
team: no need to do team_notify_peers or team_mcast_rejoin when disabling port
iommu/vt-d: Use memunmap to free memremap
net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts
mtd: rawnand: qcom: Namespace prefix some commands
net/mlx4: Fix UBSAN warning of signed integer overflow
net/mlx4_core: Fix uninitialized variable compilation warning
net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command
qed: Fix reading wrong value in loop condition
qed: Fix PTT leak in qed_drain()
bnx2x: Assign unique DMAE channel number for FW DMAE transactions.
batman-adv: Expand merged fragment buffer for full packet
HID: input: Ignore battery reported by Symbol DS4308
can: rcar_can: Fix erroneous registration
iommu/ipmmu-vmsa: Fix crash on early domain free
brcmutil: really fix decoding channel info for 160 MHz bandwidth
iommu/vt-d: Fix NULL pointer dereference in prq_event_thread()
media: omap3isp: Unregister media device as first
ANDROID: cpufreq: times: add /proc/uid_concurrent_{active,policy}_time
ANDROID: modpost: add an exception for CFI stubs
FROMGIT: modpost: validate symbol names also in find_elf_symbol
Linux 4.9.144
hugetlbfs: fix bug in pgoff overflow checking
xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE
f2fs: fix to do sanity check with cp_pack_start_sum
f2fs: free meta pages if sanity check for ckpt is failed
f2fs: fix to do sanity check with block address in main area v2
f2fs: fix missing up_read
f2fs: fix to do sanity check with block address in main area
f2fs: fix to do sanity check with node footer and iblocks
f2fs: Add sanity_check_inode() function
f2fs: fix to do sanity check with user_block_count
f2fs: fix to do sanity check with secs_per_zone
f2fs: introduce and spread verify_blkaddr
f2fs: clean up with is_valid_blkaddr()
f2fs: enhance sanity_check_raw_super() to avoid potential overflow
f2fs: sanity check on sit entry
f2fs: check blkaddr more accuratly before issue a bio
f2fs: return error during fill_super
f2fs: detect wrong layout
f2fs: fix race condition in between free nid allocator/initializer
f2fs: fix a panic caused by NULL flush_cmd_control
btrfs: tree-checker: Fix misleading group system information
btrfs: tree-checker: Check level for leaves and nodes
btrfs: Check that each block group has corresponding chunk at mount time
btrfs: tree-checker: Detect invalid and empty essential trees
btrfs: tree-checker: Verify block_group_item
btrfs: tree-check: reduce stack consumption in check_dir_item
btrfs: tree-checker: use %zu format string for size_t
btrfs: tree-checker: Add checker for dir item
btrfs: tree-checker: Fix false panic for sanity test
btrfs: tree-checker: Enhance btrfs_check_node output
btrfs: struct-funcs, constify readers
btrfs: Move leaf and node validation checker to tree-checker.c
btrfs: Add checker for EXTENT_CSUM
btrfs: Add sanity check for EXTENT_DATA when reading out leaf
btrfs: Check if item pointer overlaps with the item itself
btrfs: Refactor check_leaf function for later expansion
btrfs: Verify that every chunk has corresponding block group at mount time
btrfs: validate type when reading a chunk
hugetlbfs: check for pgoff value overflow
hugetlbfs: fix offset overflow in hugetlbfs mmap
mm/hugetlb.c: don't call region_abort if region_chg fails
wil6210: missing length check in wmi_set_ie
bpf: Prevent memory disambiguation attack
bpf/verifier: Pass instruction index to check_mem_access() and check_xadd()
bpf/verifier: Add spi variable to check_stack_write()
libceph: check authorizer reply/challenge length before reading
libceph: weaken sizeof check in ceph_x_verify_authorizer_reply()
libceph: implement CEPHX_V2 calculation mode
libceph: add authorizer challenge
libceph: factor out encrypt_authorizer()
libceph: factor out __ceph_x_decrypt()
libceph: factor out __prepare_write_connect()
libceph: store ceph_auth_handshake pointer in ceph_connection
libceph: no need to drop con->mutex for ->get_authorizer()
libceph: drop len argument of *verify_authorizer_reply()
tipc: use destination length for copy string
net: qed: use correct strncpy() size
usb: gadget: dummy: fix nonsensical comparisons
mm: cleancache: fix corruption on missed inode invalidation
reset: remove remaining WARN_ON() in <linux/reset.h>
reset: make device_reset_optional() really optional
reset: add exported __reset_control_get, return NULL if optional
reset: fix optional reset_control_get stubs to return NULL
reset: core: fix reset_control_put
reset: make optional functions really optional
udf: Allow mounting volumes with incorrect identification strings
arc: [devboards] Add support of NFSv3 ACL
ARC: change defconfig defaults to ARCv2
Btrfs: fix use-after-free when dumping free space
btrfs: Always try all copies when reading extent buffers
Input: elan_i2c - add support for ELAN0621 touchpad
Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15ARR
Input: elan_i2c - add ELAN0620 to the ACPI table
Input: matrix_keypad - check for errors from of_get_named_gpio()
Input: xpad - quirk all PDP Xbox One gamepads
drm/mediatek: fix OF sibling-node lookup
svm: Add mutex_lock to protect apic_access_page_done on AMD systems
binder: fix proc->files use-after-free
kgdboc: Fix warning with module build
kgdboc: Fix restrict error
scsi: csiostor: Avoid content leaks and casts
ALSA: trident: Suppress gcc string warning
scsi: scsi_devinfo: cleanly zero-pad devinfo strings
drm: set is_master to 0 upon drm_new_set_master() failure
drm/ast: Fix incorrect free on ioregs
IB/mlx5: Avoid load failure due to unknown link width
mips: fix mips_get_syscall_arg o32 check
MIPS: ralink: Fix mt7620 nd_sd pinmux
uprobes: Fix handle_swbp() vs. unregister() + register() race once more
iser: set sector for ambiguous mr status errors
x86/power/64: Use char arrays for asm function names
kdb: use memmove instead of overlapping memcpy
staging: rts5208: fix gcc-8 logic error warning
scsi: bfa: convert to strlcpy/strlcat
drm: gma500: fix logic error
ip_tunnel: Fix name string concatenate in __ip_tunnel_create()
kernfs: Replace strncpy with memcpy
unifdef: use memcpy instead of strncpy
kobject: Replace strncpy with memcpy
test_hexdump: use memcpy instead of strncpy
disable stringop truncation warnings for now
Kbuild: suppress packed-not-aligned warning for default setting only
kbuild: Fix 4.9.138 mismerge
Linux 4.9.143
kbuild: Set KBUILD_CFLAGS before incl. arch Makefile
efi/libstub: Make file I/O chunking x86-specific
workqueue: avoid clang warning
ARM: trusted_foundations: do not use naked function
bus: arm-cci: remove unnecessary unreachable()
ARM: 8767/1: add support for building ARM kernel with clang
ARM: 8766/1: drop no-thumb-interwork in EABI mode
efi/libstub: arm: support building with clang
misc: mic/scif: fix copy-paste error in scif_create_remote_lookup
Drivers: hv: vmbus: check the creation_status in vmbus_establish_gpadl()
mm: use swp_offset as key in shmem_replace_page()
iio:st_magn: Fix enable device after trigger
Revert "usb: dwc3: gadget: skip Set/Clear Halt when invalid"
usb: core: quirks: add RESET_RESUME quirk for Cherry G230 Stream series
USB: usb-storage: Add new IDs to ums-realtek
btrfs: release metadata before running delayed refs
dmaengine: at_hdmac: fix module unloading
dmaengine: at_hdmac: fix memory leak in at_dma_xlate()
ext2: fix potential use after free
ALSA: sparc: Fix invalid snd_free_pages() at error path
ALSA: control: Fix race between adding and removing a user element
ALSA: ac97: Fix incorrect bit shift at AC97-SPSA control write
ALSA: wss: Fix invalid snd_free_pages() at error path
fs: fix lost error code in dio_complete
perf/x86/intel: Add generic branch tracing check to intel_pmu_has_bts()
perf/x86/intel: Move branch tracing setup to the Intel-specific source file
Btrfs: ensure path name is null terminated at btrfs_control_ioctl
xtensa: fix coprocessor context offset definitions
xtensa: enable coprocessors that are being flushed
KVM: X86: Fix scan ioapic use-before-initialization
kvm: svm: Ensure an IBPB on all affected CPUs when freeing a vmcb
kvm: mmu: Fix race in emulated page table writes
usbnet: ipheth: fix potential recvmsg bug and recvmsg bug 2
s390/qeth: fix length check in SNMP processing
rapidio/rionet: do not free skb before reading its length
net: skb_scrub_packet(): Scrub offload_fwd_mark
Revert "wlcore: Add missing PM call for wlcore_cmd_wait_for_event_or_timeout()"
media: em28xx: Fix use-after-free when disconnecting
mm/khugepaged: collapse_shmem() do not crash on Compound
mm/khugepaged: collapse_shmem() without freezing new_page
mm/khugepaged: minor reorderings in collapse_shmem()
mm/khugepaged: collapse_shmem() remember to clear holes
mm/khugepaged: fix crashes due to misaccounted holes
shmem: introduce shmem_inode_acct_block
shmem: shmem_charge: verify max_block is not exceeded before inode update
mm/khugepaged: collapse_shmem() stop if punched or truncated
mm/huge_memory: fix lockdep complaint on 32-bit i_size_read()
mm/huge_memory: splitting set mapping+index before unfreeze
mm/huge_memory.c: reorder operations in __split_huge_page_tail()
mm/huge_memory: rename freeze_page() to unmap_page()
UPSTREAM: binder: fix race that allows malicious free of live buffer
Linux 4.9.142
ima: re-initialize iint->atomic_flags
ima: re-introduce own integrity cache lock
EVM: Add support for portable signature format
ima: always measure and audit files in policy
Revert "evm: Translate user/group ids relative to s_user_ns when computing HMAC"
net: ieee802154: 6lowpan: fix frag reassembly
s390/mm: Check for valid vma before zapping in gmap_discard
lan78xx: Read MAC address from DT if present
namei: allow restricted O_CREAT of FIFOs and regular files
sched/core: Allow __sched_setscheduler() in interrupts when PI is not used
usb: xhci: fix uninitialized completion when USB3 port got wrong status
tty: wipe buffer if not echoing data
tty: wipe buffer.
include/linux/pfn_t.h: force '~' to be parsed as an unary operator
scsi: ufshcd: release resources if probe fails
scsi: ufs: fix race between clock gating and devfreq scaling work
scsi: ufshcd: Fix race between clk scaling and ungate work
scsi: ufs: fix bugs related to null pointer access and array size
mwifiex: fix p2p device doesn't find in scan problem
mwifiex: Fix NULL pointer dereference in skb_dequeue()
mwifiex: report error to PCIe for suspend failure
mwifiex: prevent register accesses after host is sleeping
cw1200: Don't leak memory if krealloc failes
Input: xpad - add support for Xbox1 PDP Camo series gamepad
Input: xpad - fix GPD Win 2 controller name
Input: xpad - add GPD Win 2 Controller USB IDs
Input: xpad - avoid using __set_bit() for capabilities
Input: xpad - fix some coding style issues
Input: xpad - add PDP device id 0x02a4
Input: xpad - add support for PDP Xbox One controllers
Input: xpad - validate USB endpoint type during probe
Input: xpad - fix PowerA init quirk for some gamepad models
Input: xpad - constify usb_device_id
Input: xpad - sync supported devices with XBCD
Input: xpad - sync supported devices with 360Controller
Input: xpad - add USB IDs for Mad Catz Brawlstick and Razer Sabertooth
Input: xpad - sync supported devices with xboxdrv
Input: xpad - sort supported devices by USB ID
Input: xpad - support some quirky Xbox One pads
Input: xpad - restore LED state after device resume
Input: xpad - fix stuck mode button on Xbox One S pad
Input: xpad - don't depend on endpoint order
Input: xpad - simplify error condition in init_output
Input: xpad - move reporting xbox one home button to common function
Input: xpad - correctly sort vendor id's
Input: xpad - fix Xbox One rumble stopping after 2.5 secs
Input: xpad - add product ID for Xbox One S pad
ath10k: fix kernel panic due to race in accessing arvif list
arm64: remove no-op -p linker flag
net: bcmgenet: fix OF child-node lookup
NFC: nfcmrvl_uart: fix OF child-node lookup
of: add helper to lookup compatible child node
tmpfs: make lseek(SEEK_DATA/SEK_HOLE) return ENXIO with a negative offset
efi/arm: Revert deferred unmap of early memmap mapping
powerpc/numa: Suppress "VPHN is not supported" messages
kdb: Use strscpy with destination buffer size
SUNRPC: Fix a bogus get/put in generic_key_to_expire()
perf/x86/intel/uncore: Add more IMC PCI IDs for KabyLake and CoffeeLake CPUs
powerpc/io: Fix the IO workarounds code to work with Radix
floppy: fix race condition in __floppy_read_block_0()
rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write
cpufreq: imx6q: add return value check for voltage scale
KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
pinctrl: meson: fix pinconf bias disable
usb: xhci: Prevent bus suspend if a port connect change or polling state is detected
IB/hfi1: Eliminate races in the SDMA send error path
IB/core: Fix for core panic
can: dev: __can_get_echo_skb(): print error message, if trying to echo non existing skb
can: dev: __can_get_echo_skb(): Don't crash the kernel if can_priv::echo_skb is accessed out of bounds
can: dev: __can_get_echo_skb(): replace struct can_frame by canfd_frame to access frame length
can: dev: can_get_echo_skb(): factor out non sending code to __can_get_echo_skb()
drm/ast: Remove existing framebuffers before loading driver
drm/ast: fixed cursor may disappear sometimes
drm/ast: change resolution may cause screen blurred
mm: don't warn about large allocations for slab
llc: do not use sk_eat_skb()
gfs2: Don't leave s_fs_info pointing to freed memory in init_sbd
sctp: clear the transport of some out_chunk_list chunks in sctp_assoc_rm_peer
bfs: add sanity check at bfs_fill_super()
selinux: Add __GFP_NOWARN to allocation at str_read()
v9fs_dir_readdir: fix double-free on p9stat_read error
tools/power/cpupower: fix compilation with STATIC=true
brcmfmac: fix reporting support for 160 MHz channels
iwlwifi: mvm: fix regulatory domain update when the firmware starts
iwlwifi: mvm: support sta_statistics() even on older firmware
gpio: don't free unallocated ida on gpiochip_add_data_with_key() error path
MAINTAINERS: Add Sasha as a stable branch maintainer
usb: xhci: fix timeout for transition from RExit to U0
usb: dwc3: core: Clean up ULPI device
usb: core: Fix hub port connection events lost
ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple
Revert "ANDROID: Kbuild, LLVMLinux: allow overriding clang target triple"
arch/arm64/crypto/sha1-ce-glue.c fix 4.9.129 merge issue
arch/arm64/crypto/sha2-ce-glue.c: fix 4.9.129 merge issue
ANDROID: sdcardfs: Add option to not link obb
ANDROID: sdcardfs: Add sandbox
Revert "proc: Convert proc_mount to use mount_ns."
xen: Fix 4.9.139 merge resolution
efi/libstub: Fix 4.9.139 merge resolution
Linux 4.9.141
libceph: fall back to sendmsg for slab pages
HID: uhid: forbid UHID_CREATE under KERNEL_DS or elevated privileges
new helper: uaccess_kernel()
ACPI / platform: Add SMB0001 HID to forbidden_id_list
drivers/misc/sgi-gru: fix Spectre v1 vulnerability
USB: misc: appledisplay: add 20" Apple Cinema Display
misc: atmel-ssc: Fix section annotation on atmel_ssc_get_driver_data
usb: quirks: Add delay-init quirk for Corsair K70 LUX RGB
USB: quirks: Add no-lpm quirk for Raydium touchscreens
usb: cdc-acm: add entry for Hiro (Conexant) modem
uio: Fix an Oops on load
media: v4l: event: Add subscription to list before calling "add" operation
Revert "Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV"
Revert "media: videobuf2-core: don't call memop 'finish' when queueing"
btrfs: fix pinned underflow after transaction aborted
btrfs: Ensure btrfs_trim_fs can trim the whole filesystem
btrfs: Enhance btrfs_trim_fs function to handle error better
ACPI / watchdog: Prefer iTCO_wdt always when WDAT table uses RTC SRAM
ACPI / watchdog: Prefer iTCO_wdt on Lenovo Z50-70
gfs2: Put bitmap buffers in put_super
SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer()
zram: close udev startup race condition as default groups
qed: Fix blocking/unlimited SPQ entries leak
qed: Fix memory/entry leak in qed_init_sp_request()
lib/raid6: Fix arm64 test build
clk: fixed-factor: fix of_node_get-put imbalance
hwmon: (ibmpowernv) Remove bogus __init annotations
s390/qeth: fix HiperSockets sniffer
netfilter: xt_IDLETIMER: add sysfs filename checking routine
netfilter: ipset: Correct rcu_dereference() call in ip_set_put_comment()
s390/mm: Fix ERROR: "__node_distance" undefined!
netfilter: ipset: actually allow allowable CIDR 0 in hash:net,port,net
s390/vdso: add missing FORCE to build targets
arm64: percpu: Initialize ret in the default case
platform/x86: acerhdf: Add BIOS entry for Gateway LT31 v1.3307
clk: samsung: exynos5420: Enable PERIS clocks for suspend
fs/exofs: fix potential memory leak in mount option parsing
clk: fixed-rate: fix of_node_get-put imbalance
platform/x86: intel_telemetry: report debugfs failure
drm/edid: Add 6 bpc quirk for BOE panel.
um: Give start_idle_thread() a return code
hfsplus: prevent btree data loss on root split
hfs: prevent btree data loss on root split
reiserfs: propagate errors from fill_with_dentries() properly
cifs: don't dereference smb_file_target before null check
Linux 4.9.140
Revert "ipv6: set rt6i_protocol properly in the route when it is installed"
Revert "x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation"
Linux 4.9.139
ARM: spectre-v1: mitigate user accesses
ARM: spectre-v1: use get_user() for __get_user()
ARM: use __inttype() in get_user()
ARM: oabi-compat: copy semops using __copy_from_user()
ARM: vfp: use __copy_from_user() when restoring VFP state
ARM: signal: copy registers using __copy_from_user()
ARM: spectre-v1: fix syscall entry
ARM: spectre-v1: add array_index_mask_nospec() implementation
ARM: spectre-v1: add speculation barrier (csdb) macros
ARM: KVM: report support for SMCCC_ARCH_WORKAROUND_1
ARM: KVM: Add SMCCC_ARCH_WORKAROUND_1 fast handling
ARM: spectre-v2: KVM: invalidate icache on guest exit for Brahma B15
ARM: KVM: invalidate icache on guest exit for Cortex-A15
ARM: KVM: invalidate BTB on guest exit for Cortex-A12/A17
ARM: spectre-v2: warn about incorrect context switching functions
ARM: spectre-v2: add firmware based hardening
ARM: spectre-v2: harden user aborts in kernel space
ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit
ARM: spectre-v2: harden branch predictor on context switches
ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre
ARM: bugs: add support for per-processor bug checking
ARM: bugs: hook processor bug checking into SMP and suspend paths
ARM: bugs: prepare processor bug infrastructure
ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs
arm64: uaccess: suppress spurious clang warning
Kbuild: use -fshort-wchar globally
x86/build: Use cc-option to validate stack alignment parameter
x86/build: Fix stack alignment for CLang
efi/libstub/arm64: Set -fpie when building the EFI stub
efi/libstub: Preserve .debug sections after absolute relocation check
efi/libstub/arm64: Force 'hidden' visibility for section markers
efi/libstub/arm64: Use hidden attribute for struct screen_info reference
x86/boot: #undef memcpy() et al in string.c
crypto: arm64/sha - avoid non-standard inline asm tricks
kbuild: clang: Disable 'address-of-packed-member' warning
x86/build: Specify stack alignment for clang
x86/build: Use __cc-option for boot code compiler options
kbuild: Add __cc-option macro
crypto, x86: aesni - fix token pasting for clang
x86/kbuild: Use cc-option to enable -falign-{jumps/loops}
modules: mark __inittest/__exittest as __maybe_unused
kbuild: Add support to generate LLVM assembly files
kbuild: use -Oz instead of -Os when using clang
kbuild, LLVMLinux: Add -Werror to cc-option to support clang
kbuild: drop -Wno-unknown-warning-option from clang options
kbuild: fix asm-offset generation to work with clang
kbuild: consolidate redundant sed script ASM offset generation
kbuild: Consolidate header generation from ASM offset information
kbuild: clang: add -no-integrated-as to KBUILD_[AC]FLAGS
kbuild: Add better clang cross build support
ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF
inet: frags: better deal with smp races
usbnet: smsc95xx: disable carrier check while suspending
tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths
sctp: not allow to set asoc prsctp_enable by sockopt
net-gro: reset skb->pkt_type in napi_reuse_skb()
ip_tunnel: don't force DF when MTU is locked
flow_dissector: do not dissect l4 ports for fragments
ANDROID: sched/debug: Make Energy Model read-only
Linux 4.9.138
KVM: arm64: Fix caching of host MDCR_EL2 value
drm/i915/execlists: Force write serialisation into context image vs execution
drm/i915/hdmi: Add HDMI 2.0 audio clock recovery N values
drm/dp_mst: Check if primary mstb is null
drm/rockchip: Allow driver to be shutdown on reboot/kexec
mm: migration: fix migration of huge PMD shared pages
hugetlbfs: fix kernel BUG at fs/hugetlbfs/inode.c:444!
lib/ubsan.c: don't mark __ubsan_handle_builtin_unreachable as noreturn
configfs: replace strncpy with memcpy
fuse: fix leaked notify reply
fuse: fix use-after-free in fuse_direct_IO()
rtc: hctosys: Add missing range error reporting
nfsd: COPY and CLONE operations require the saved filehandle to be set
sunrpc: correct the computation for page_ptr when truncating
mount: Prevent MNT_DETACH from disconnecting locked mounts
mount: Don't allow copying MNT_UNBINDABLE|MNT_LOCKED mounts
mount: Retest MNT_LOCKED in do_umount
ext4: fix buffer leak in __ext4_read_dirblock() on error path
ext4: fix buffer leak in ext4_xattr_move_to_block() on error path
ext4: release bs.bh before re-using in ext4_xattr_block_find()
ext4: fix possible leak of s_journal_flag_rwsem in error path
ext4: fix possible leak of sbi->s_group_desc_leak in error path
ext4: avoid possible double brelse() in add_new_gdb() on error path
ext4: fix missing cleanup if ext4_alloc_flex_bg_array() fails while resizing
ext4: avoid buffer leak in ext4_orphan_add() after prior errors
ext4: fix possible inode leak in the retry loop of ext4_resize_fs()
ext4: avoid potential extra brelse in setup_new_flex_group_blocks()
ext4: add missing brelse() add_new_gdb_meta_bg()'s error path
ext4: add missing brelse() in set_flexbg_block_bitmap()'s error path
ext4: add missing brelse() update_backups()'s error path
clockevents/drivers/i8253: Add support for PIT shutdown quirk
Btrfs: fix data corruption due to cloning of eof block
Btrfs: fix cur_offset in the error case for nocow
arch/alpha, termios: implement BOTHER, IBSHIFT and termios2
termios, tty/tty_baudrate.c: fix buffer overrun
of, numa: Validate some distance map rules
mtd: docg3: don't set conflicting BCH_CONST_PARAMS option
netfilter: conntrack: fix calculation of next bucket number in early_drop
mm: thp: relax __GFP_THISNODE for MADV_HUGEPAGE mappings
ocfs2: fix a misuse a of brelse after failing ocfs2_check_dir_entry
vhost/scsi: truncate T10 PI iov_iter to prot_bytes
reset: hisilicon: fix potential NULL pointer dereference
mach64: fix image corruption due to reading accelerator registers
mach64: fix display corruption on big endian machines
Revert "ceph: fix dentry leak in splice_dentry()"
libceph: bump CEPH_MSG_MAX_DATA_LEN
clk: rockchip: Fix static checker warning in rockchip_ddrclk_get_parent call
clk: at91: Fix division by zero in PLL recalc_rate()
clk: s2mps11: Fix matching when built as module and DT node contains compatible
xtensa: fix boot parameters address translation
xtensa: make sure bFLT stack is 16 byte aligned
xtensa: add NOTES section to the linker script
MIPS: Loongson-3: Fix BRIDGE irq delivery problem
MIPS: Loongson-3: Fix CPU UART irq delivery problem
parisc: Fix exported address of os_hpmc handler
parisc: Fix HPMC handler by increasing size to multiple of 16 bytes
parisc: Align os_hpmc_size on word boundary
bna: ethtool: Avoid reading past end of buffer
e1000: fix race condition between e1000_down() and e1000_watchdog
e1000: avoid null pointer dereference on invalid stat type
mm: do not bug_on on incorrect length in __mm_populate()
fuse: set FR_SENT while locked
fuse: fix blocked_waitq wakeup
fuse: Fix use-after-free in fuse_dev_do_write()
fuse: Fix use-after-free in fuse_dev_do_read()
scsi: qla2xxx: shutdown chip if reset fail
scsi: qla2xxx: Fix incorrect port speed being set for FC adapters
cdrom: fix improper type cast, which can leat to information leak.
9p: clear dangling pointers in p9stat_free
9p locks: fix glock.client_id leak in do_lock
powerpc/selftests: Wait all threads to join
media: tvp5150: fix width alignment during set_selection()
sc16is7xx: Fix for multi-channel stall
MIPS/PCI: Call pcie_bus_configure_settings() to set MPS/MRRS
powerpc/boot: Ensure _zimage_start is a weak symbol
MIPS: kexec: Mark CPU offline before disabling local IRQ
media: pci: cx23885: handle adding to list failure
drm/omap: fix memory barrier bug in DMM driver
powerpc/nohash: fix undefined behaviour when testing page size support
ARM: imx_v6_v7_defconfig: Select CONFIG_TMPFS_POSIX_ACL
tty: check name length in tty_find_polling_driver()
powerpc/eeh: Fix possible null deref in eeh_dump_dev_log()
Linux 4.9.137
MD: fix invalid stored role for a disk - try2
btrfs: set max_extent_size properly
Btrfs: fix null pointer dereference on compressed write path error
btrfs: qgroup: Dirty all qgroups before rescan
Btrfs: fix wrong dentries after fsync of file that got its parent replaced
btrfs: make sure we create all new block groups
btrfs: reset max_extent_size on clear in a bitmap
btrfs: wait on caching when putting the bg cache
btrfs: don't attempt to trim devices that don't support it
btrfs: iterate all devices during trim, instead of fs_devices::alloc_list
btrfs: fix error handling in free_log_tree
btrfs: locking: Add extra check in btrfs_init_new_buffer() to avoid deadlock
btrfs: Handle owner mismatch gracefully when walking up tree
soc/tegra: pmc: Fix child-node lookup
arm64: dts: stratix10: Correct System Manager register size
Cramfs: fix abad comparison when wrap-arounds occur
rpmsg: smd: fix memory leak on channel create
arm64: lse: remove -fcall-used-x0 flag
media: em28xx: make v4l2-compliance happier by starting sequence on zero
media: em28xx: fix input name for Terratec AV 350
media: tvp5150: avoid going past array on v4l2_querymenu()
media: em28xx: use a default format if TRY_FMT fails
xen: fix xen_qlock_wait()
kgdboc: Passing ekgdboc to command line causes panic
media: v4l2-tpg: fix kernel oops when enabling HFLIP and OSD
TC: Set DMA masks for devices
MIPS: OCTEON: fix out of bounds array access on CN68XX
powerpc/msi: Fix compile error on mpc83xx
dm ioctl: harden copy_params()'s copy_from_user() from malicious users
lockd: fix access beyond unterminated strings in prints
nfsd: Fix an Oops in free_session()
NFSv4.1: Fix the r/wsize checking
genirq: Fix race on spurious interrupt detection
printk: Fix panic caused by passing log_buf_len to command line
smb3: on kerberos mount if server doesn't specify auth type use krb5
smb3: do not attempt cifs operation in smb3 query info error path
smb3: allow stats which track session and share reconnects to be reset
w1: omap-hdq: fix missing bus unregister at removal
iio: adc: at91: fix wrong channel number in triggered buffer mode
iio: adc: at91: fix acking DRDY irq on simple conversions
iio: adc: imx25-gcq: Fix leak of device_node in mx25_gcq_setup_cfgs()
iio: ad5064: Fix regulator handling
kbuild: fix kernel/bounds.c 'W=1' warning
hugetlbfs: dirty pages as they are added to pagecache
ima: fix showing large 'violations' or 'runtime_measurements_count'
crypto: tcrypt - fix ghash-generic speed test
crypto: lrw - Fix out-of bounds access on counter overflow
signal/GenWQE: Fix sending of SIGKILL
PCI: Add Device IDs for Intel GPU "spurious interrupt" quirk
EDAC, skx_edac: Fix logical channel intermediate decoding
EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting
HID: hiddev: fix potential Spectre v1
ext4: propagate error from dquot_initialize() in EXT4_IOC_FSSETXATTR
ext4: initialize retries variable in ext4_da_write_inline_data_begin()
gfs2_meta: ->mount() can get NULL dev_name
jbd2: fix use after free in jbd2_log_do_checkpoint()
ASoC: intel: skylake: Add missing break in skl_tplg_get_token()
libnvdimm: Hold reference on parent while scheduling async init
net/ipv4: defensive cipso option parsing
iwlwifi: mvm: check return value of rs_rate_from_ucode_rate()
usbip:vudc: BUG kmalloc-2048 (Not tainted): Poison overwritten
libertas: don't set URB_ZERO_PACKET on IN USB transfer
xen: make xen_qlock_wait() nestable
xen: fix race in xen_qlock_wait()
xen/blkfront: avoid NULL blkfront_info dereference on device removal
tpm: Restore functionality to xen vtpm driver.
xen-swiotlb: use actually allocated size on check physical continuous
ARM: dts: exynos: Mark 1 GHz CPU OPP as suspend OPP on Exynos5250
ARM: dts: exynos: Convert exynos5250.dtsi to opp-v2 bindings
arm: dts: exynos: Add missing cooling device properties for CPUs
ARM: dts: exynos: Remove "cooling-{min|max}-level" for CPU nodes
ALSA: hda: Check the non-cached stream buffers more explicitly
dmaengine: dma-jz4780: Return error if not probed from DT
signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init
scsi: lpfc: Correct soft lockup when running mds diagnostics
uio: ensure class is registered before devices
driver/dma/ioat: Call del_timer_sync() without holding prep_lock
usb: chipidea: Prevent unbalanced IRQ disable
crypto: caam - fix implicit casts in endianness helpers
coresight: etb10: Fix handling of perf mode
PCI/MSI: Warn and return error if driver enables MSI/MSI-X twice
MD: fix invalid stored role for a disk
ext4: fix argument checking in EXT4_IOC_MOVE_EXT
usb: gadget: udc: atmel: handle at91sam9rl PMC
VMCI: Resource wildcard match fixed
tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated
IB/ipoib: Clear IPCB before icmp_send
RDMA/core: Do not expose unsupported counters
scsi: megaraid_sas: fix a missing-check bug
scsi: esp_scsi: Track residual for PIO transfers
cgroup, netclassid: add a preemption point to write_classid
ath10k: schedule hardware restart if WMI command times out
ixgbevf: VF2VF TCP RSS
pinctrl: ssbi-gpio: Fix pm8xxx_pin_config_get() to be compliant
pinctrl: spmi-mpp: Fix pmic_mpp_config_get() to be compliant
pinctrl: qcom: spmi-mpp: Fix drive strength setting
ACPI / LPSS: Add alternative ACPI HIDs for Cherry Trail DMA controllers
kprobes: Return error if we fail to reuse kprobe instead of BUG_ON()
brcmfmac: fix for proper support of 160MHz bandwidth
pinctrl: qcom: spmi-mpp: Fix err handling of pmic_mpp_set_mux
x86: boot: Fix EFI stub alignment
Bluetooth: btbcm: Add entry for BCM4335C0 UART bluetooth
cpufreq: dt: Try freeing static OPPs only if we have added them
x86/olpc: Indicate that legacy PC XO-1 platform should not register RTC
iwlwifi: pcie: avoid empty free RB queue
mmc: sdhci-pci-o2micro: Add quirk for O2 Micro dev 0x8620 rev 0x01
perf strbuf: Match va_{add,copy} with va_end
perf tools: Cleanup trace-event-info 'tdata' leak
perf tools: Free temporary 'sys' string in read_event_files()
hwmon: (pwm-fan) Set fan speed to 0 on suspend
s390/sthyi: Fix machine name validity indication
tun: Consistently configure generic netdev params via rtnetlink
swim: fix cleanup on setup error
ataflop: fix error handling during setup
locking/lockdep: Fix debug_locks off performance problem
i2c: rcar: cleanup DMA for all kinds of failure
selftests: ftrace: Add synthetic event syntax testcase
net: qla3xxx: Remove overflowing shift statement
x86/fpu: Remove second definition of fpu in __fpu__restore_sig()
perf cpu_map: Align cpu map synthesized events properly.
sched/fair: Fix the min_vruntime update logic in dequeue_entity()
sparc64: Make proc_id signed.
sparc: Fix single-pcr perf event counter management.
xfrm: policy: use hlist rcu variants on insert
Revert "perf tools: Fix PMU term format max value calculation"
bpf: do not blindly change rlimit in reuseport net selftest
x86/speculation: Support Enhanced IBRS on future CPUs
x86/corruption-check: Fix panic in memory_corruption_check() when boot option without value is provided
x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation
ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops
ALSA: hda - Add mic quirk for the Lenovo G50-30 (17aa:3905)
ALSA: hda - Fix headphone pin config for ASUS G751
ALSA: hda - Add quirk for ASUS G751 laptop
parisc: Fix map_pages() to not overwrite existing pte entries
parisc: Fix address in HPMC IVA
ipmi: Fix timer race with module unload
pcmcia: Implement CLKRUN protocol disabling for Ricoh bridges
jffs2: free jffs2_sb_info through jffs2_kill_sb()
hwmon: (pmbus) Fix page count auto-detection.
bcache: fix miss key refill->end in writeback
ANDROID: zram: set comp_len to PAGE_SIZE when page is huge
Linux 4.9.136
posix-timers: Sanitize overrun handling
net: fs_enet: do not call phy_stop() in interrupts
x86/time: Correct the attribute on jiffies' definition
x86/percpu: Fix this_cpu_read()
sched/fair: Fix throttle_list starvation with low CFS quota
Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15IGM
USB: fix the usbfs flag sanitization for control transfers
usb: gadget: storage: Fix Spectre v1 vulnerability
cdc-acm: correct counting of UART states in serial state notification
IB/ucm: Fix Spectre v1 vulnerability
RDMA/ucma: Fix Spectre v1 vulnerability
drm/edid: Add 6 bpc quirk for BOE panel in HP Pavilion 15-n233sl
ptp: fix Spectre v1 vulnerability
cachefiles: fix the race between cachefiles_bury_object() and rmdir(2)
xfs: truncate transaction does not modify the inobt
gpio: mxs: Get rid of external API call
ahci: don't ignore result code of ahci_reset_controller()
crypto: shash - Fix a sleep-in-atomic bug in shash_setkey_unaligned
Revert "x86/mm: Expand static page table for fixmap space"
ip6_tunnel: Fix encapsulation layout
rtnetlink: Disallow FDB configuration for non-Ethernet device
net: fix pskb_trim_rcsum_slow() with odd trim offset
net: drop skb on failure in ip_check_defrag()
bonding: fix length of actor system
ethtool: fix a privilege escalation bug
vhost: Fix Spectre V1 vulnerability
sctp: fix race on sctp_id2asoc
r8169: fix NAPI handling under high load
net: udp: fix handling of CHECKSUM_COMPLETE packets
net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules
net: socket: fix a missing-check bug
net: sched: gred: pass the right attribute to gred_change_table_def()
net/ipv6: Fix index counter for unicast addresses in in6_dump_addrs
llc: set SOCK_RCU_FREE in llc_sap_add_socket()
ipv6/ndisc: Preserve IPv6 control buffer if protocol error handlers are called
ipv6: mcast: fix a use-after-free in inet6_mc_check
net: bridge: remove ipv6 zero address check in mcast queries
bridge: do not add port to router list when receives query with source 0.0.0.0
perf tools: Disable parallelism for 'make clean'
Revert "netfilter: ipv6: nf_defrag: drop skb dst before queueing"
mtd: spi-nor: Add support for is25wp series chips
fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters()
net: ena: fix NULL dereference due to untimely napi initialization
rxrpc: Only take the rwind and mtu values from latest ACK
rxrpc: Don't check RXRPC_CALL_TX_LAST after calling rxrpc_rotate_tx_window()
ARM: dts: imx53-qsb: disable 1.2GHz OPP
perf tests: Fix indexing when invoking subtests
xhci: Fix USB3 NULL pointer dereference at logical disconnect.
libertas: call into generic suspend code before turning off power
IB/mlx4: Fix an error handling path in 'mlx4_ib_rereg_user_mr()'
x86/paravirt: Fix some warning messages
iio: buffer: fix the function signature to match implementation
nvmet: fix space padding in serial number
bonding: ratelimit failed speed/duplex update warning
enic: do not overwrite error code
xen-netfront: Fix mismatched rtnl_unlock
sparc64: Fix regression in pmdp_invalidate().
xen-netfront: Update features after registering netdev
test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches
ALSA: hda - Fix incorrect usage of IS_REACHABLE()
futex: futex_wake_op, do not fail on invalid op
cifs: Use ULL suffix for 64-bit constant
perf/core: Fix locking for children siblings group read
macsec: fix memory leaks when skb_to_sgvec fails
l2tp: remove configurable payload offset
iio: pressure: zpa2326: Remove always-true check which confuses gcc
module: fix DEBUG_SET_MODULE_RONX typo
drm/msm: Fix possible null dereference on failure of get_pages()
Btrfs: incremental send, fix invalid memory access
Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0"
i40e: avoid NVM acquire deadlock during NVM update
drm: bochs: Don't remove uninitialized fbdev framebuffer
scsi: qla2xxx: Avoid double completion of abort command
IB/mlx5: Avoid passing an invalid QP type to firmware
mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()'
nbd: only set MSG_MORE when we have more to send
IB/rxe: put the pool on allocation failure
IB/ipoib: Fix lockdep issue found on ipoib_ib_dev_heavy_flush
ipv6: fix cleanup ordering for ip6_mr failure
ath10k: convert warning about non-existent OTP board id to debug message
ALSA: hda - No loopback on ALC299 codec
sctp: use right member as the param of list_for_each_entry
net: cdc_ncm: GetNtbFormat endian fix
ocfs2: fix deadlock caused by recursive locking in xattr
qed: Warn PTT usage by wrong hw-function
iio: adc: Revert "axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications"
rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp
staging: wilc1000: Fix problem with wrong vif index
ptr_ring: fix up after recent ptr_ring changes
clk: samsung: Fix m2m scaler clock on Exynos542x
usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq
usb: renesas_usbhs: gadget: fix unused-but-set-variable warning
usb: renesas_usbhs: gadget: fix spin_lock_init() for &uep->lock
net/mlx5: Fix health work queue spin lock to IRQ safe
perf probe: Fix probe definition for inlined functions
perf evsel: Fix probing of precise_ip level for default cycles event
net/mlx5: Fix driver load error flow when firmware is stuck
ip6_tunnel: Correct tos value in collect_md mode
net/mlx5e: Fix fixpoint divide exception in mlx5e_am_stats_compare
ufs: we need to sync inode before freeing it
Btrfs: clear EXTENT_DEFRAG bits in finish_ordered_io
net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value
elevator: fix truncation of icq_cache_name
gpu: ipu-v3: Fix CSI selection for VDIC
ARM: 8677/1: boot/compressed: fix decompressor header layout for v7-M
x86/cpu/cyrix: Add alternative Device ID of Geode GX1 SoC
qlcnic: Fix tunnel offload for 82xx adapters
net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization
libata: fix error checking in in ata_parse_force_one()
mac80211: fix TX aggregation start/stop callback race
arch/sparc: increase CONFIG_NODES_SHIFT on SPARC64 to 5
ASoC: Intel: Skylake: Fix to parse consecutive string tkns in manifest
reset: hi6220: Set module license so that it can be loaded
ata: sata_rcar: Handle return value of clk_prepare_enable
btrfs: fiemap: Cache and merge fiemap extent before submit it to user
ARM: dts: bcm283x: Reserve first page for firmware
ath10k: fix NAPI enable/disable symmetry for AHB interface
bnxt_en: Don't use rtnl lock to protect link change logic in workqueue.
tipc: fix a race condition of releasing subscriber object
tipc: Fix tipc_sk_reinit handling of -EAGAIN
net/mlx5: Fix command completion after timeout access invalid structure
net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as well.
nvme-pci: fix CMB sysfs file removal in reset path
rxe: Fix a sleep-in-atomic bug in post_one_send
orangefs: off by ones in xattr size checks
IB/core: Fix the validations of a multicast LID in attach or detach operations
IB/ipoib: Do not warn if IPoIB debugfs doesn't exist
platform/x86: acer-wmi: setup accelerometer when ACPI device was found
ipv6: set rt6i_protocol properly in the route when it is installed
efi/fb: Correct PCI_STD_RESOURCE_END usage
i2c: bcm2835: Avoid possible NULL ptr dereference
PCI: Disable MSI for HiSilicon Hip06/Hip07 only in Root Port mode
ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs
igb: Remove superfluous reset to PHY and page 0 selection
f2fs: fix multiple f2fs_add_link() having same name for inline dentry
scsi: aacraid: Fix typo in blink status
MIPS: Handle non word sized instructions when examining frame
MIPS: microMIPS: Fix decoding of swsp16 instruction
mm/memory_hotplug.c: fix overflow in test_pages_in_a_zone()
perf symbols: Fix memory corruption because of zero length symbols
net: cxgb3_main: fix a missing-check bug
declance: Fix continuation with the adapter identification message
net: fec: fix rare tx timeout
perf/x86/intel/uncore: Fix PCI BDF address of M3UPI on SKX
perf/ring_buffer: Prevent concurent ring buffer access
smsc95xx: Check for Wake-on-LAN modes
smsc75xx: Check for Wake-on-LAN modes
r8152: Check for supported Wake-on-LAN Modes
sr9800: Check for supported Wake-on-LAN modes
lan78xx: Check for supported Wake-on-LAN modes
ax88179_178a: Check for supported Wake-on-LAN modes
asix: Check for supported Wake-on-LAN modes
qed: Avoid constant logical operation warning in qed_vf_pf_acquire
qed: Avoid implicit enum conversion in qed_roce_mode_to_flavor
pxa168fb: prepare the clock
Bluetooth: SMP: fix crash in unpairing
mac80211_hwsim: do not omit multicast announce of first added radio
nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT
soc: fsl: qe: Fix copy/paste bug in ucc_get_tdm_sync_shift()
soc: fsl: qbman: qman: avoid allocating from non existing gen_pool
net: macb: Clean 64b dma addresses if they are not detected
ARM: dts: BCM63xx: Fix incorrect interrupt specifiers
xfrm: validate template mode
ARM: 8799/1: mm: fix pci_ioremap_io() offset check
mac80211: TDLS: fix skb queue/priority assignment
cfg80211: Address some corner cases in scan result channel updating
mac80211: fix pending queue hang due to TX_DROP
cfg80211: reg: Init wiphy_idx in regulatory_hint_core()
mac80211: Always report TX status
xfrm6: call kfree_skb when skb is toobig
xfrm: Validate address prefix lengths in the xfrm selector.
BACKPORT: arm64: Expose support for optional ARMv8-A features
ANDROID: sdcardfs: Add option to drop unused dentries
UPSTREAM: xfrm: fix ptr_ret.cocci warnings
UPSTREAM: xfrm: Return detailed errors from xfrmi_newlink
UPSTREAM: xfrm: Allow xfrmi if_id to be updated by UPDSA
UPSTREAM: xfrm: Allow Set Mark to be Updated Using UPDSA
BACKPORT: xfrm: Add virtual xfrm interfaces
BACKPORT: xfrm: Add a new lookup key to match xfrm interfaces.
UPSTREAM: flow: Extend flow informations with xfrm interface id.
BACKPORT: xfrm: Extend the output_mark to support input direction and masking.
BACKPORT: xfrm: fix XFRMA_OUTPUT_MARK policy entry
f2fs: guarantee journalled quota data by checkpoint
f2fs: cleanup dirty pages if recover failed
f2fs: fix data corruption issue with hardware encryption
f2fs: fix to recover inode->i_flags of inode block during POR
f2fs: spread f2fs_set_inode_flags()
f2fs: fix to spread clear_cold_data()
Revert "f2fs: fix to clear PG_checked flag in set_page_dirty()"
f2fs: account read IOs and use IO counts for is_idle
f2fs: fix to account IO correctly for cgroup writeback
f2fs: fix to account IO correctly
f2fs: remove request_list check in is_idle()
f2fs: allow to mount, if quota is failed
f2fs: update REQ_TIME in f2fs_cross_rename()
f2fs: do not update REQ_TIME in case of error conditions
f2fs: remove unneeded disable_nat_bits()
f2fs: remove unused sbi->trigger_ssr_threshold
f2fs: shrink sbi->sb_lock coverage in set_file_temperature()
f2fs: fix to recover cold bit of inode block during POR
f2fs: submit cached bio to avoid endless PageWriteback
f2fs: checkpoint disabling
f2fs: clear PageError on the read path
f2fs: allow out-place-update for direct IO in LFS mode
f2fs: refactor ->page_mkwrite() flow
Revert: "f2fs: check last page index in cached bio to decide submission"
f2fs: support superblock checksum
f2fs: add to account skip count of background GC
f2fs: add to account meta IO
f2fs: keep lazytime on remount
f2fs: fix missing up_read
f2fs: return correct errno in f2fs_gc
f2fs: avoid f2fs_bug_on if f2fs_get_meta_page_nofail got EIO
f2fs: mark inode dirty explicitly in recover_inode()
f2fs: fix to recover inode's crtime during POR
f2fs: fix to recover inode's i_gc_failures during POR
f2fs: fix to recover inode's i_flags during POR
f2fs: fix to recover inode's project id during POR
f2fs: update i_size after DIO completion
f2fs: report ENOENT correctly in f2fs_rename
f2fs: fix remount problem of option io_bits
f2fs: fix to recover inode's uid/gid during POR
f2fs: avoid infinite loop in f2fs_alloc_nid
f2fs: add new idle interval timing for discard and gc paths
f2fs: split IO error injection according to RW
f2fs: add SPDX license identifiers
f2fs: surround fault_injection related option parsing using CONFIG_F2FS_FAULT_INJECTION
f2fs: avoid sleeping under spin_lock
f2fs: plug readahead IO in readdir()
f2fs: fix to do sanity check with current segment number
f2fs: fix memory leak of percpu counter in fill_super()
f2fs: fix memory leak of write_io in fill_super()
f2fs: cache NULL when both default_acl and acl are NULL
f2fs: fix to flush all dirty inodes recovered in readonly fs
f2fs: report error if quota off error during umount
f2fs: submit bio after shutdown
f2fs: avoid wrong decrypted data from disk
Revert "f2fs: use printk_ratelimited for f2fs_msg"
f2fs: fix unnecessary periodic wakeup of discard thread when dev is busy
f2fs: fix to avoid NULL pointer dereference on se->discard_map
f2fs: add additional sanity check in f2fs_acl_from_disk()
UPSTREAM: HID: sony: remove redundant check for -ve err
UPSTREAM: HID: sony: Make sure to unregister sensors on failure
UPSTREAM: HID: sony: Make DS4 bt poll interval adjustable
UPSTREAM: HID: sony: Set proper bit flags on DS4 output report
UPSTREAM: HID: sony: DS4 use brighter LED colors
UPSTREAM: HID: sony: Improve navigation controller axis/button mapping
UPSTREAM: HID: sony: Use DS3 MAC address as unique identifier on USB
UPSTREAM: HID: sony: Perform duplicate device check earlier on
UPSTREAM: HID: sony: Expose DS3 motion sensors through separate device
UPSTREAM: HID: sony: Print error on failure to active DS3 / Navigation controllers
UPSTREAM: HID: sony: DS3 comply to Linux gamepad spec
UPSTREAM: HID: sony: Mark DS4 touchpad device as a pointer
UPSTREAM: HID: sony: Support motion sensor calibration on dongle
UPSTREAM: HID: sony: Make work handling more generic
UPSTREAM: HID: sony: Treat the ds4 dongle as a separate device
UPSTREAM: HID: sony: Remove report descriptor fixup for DS4
UPSTREAM: HID: sony: Report hardware timestamp for DS4 sensor values
UPSTREAM: HID: sony: Calibrate DS4 motion sensors
UPSTREAM: HID: sony: Report DS4 motion sensors through a separate device
UPSTREAM: HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT
UPSTREAM: HID: sony: Ignore DS4 dongle reports when no device is connected
UPSTREAM: HID: sony: Use DS4 MAC address as unique identifier on USB
UPSTREAM: HID: sony: Fix error handling bug when touchpad registration fails
UPSTREAM: HID: sony: Comply to Linux gamepad spec for DS4
UPSTREAM: HID: sony: Make the DS4 touchpad a separate device
UPSTREAM: HID: sony: Fix memory issue when connecting device using both Bluetooth and USB
UPSTREAM: HID: sony: Adjust value range for motion sensors
UPSTREAM: HID: sony: Handle multiple touch events input record
UPSTREAM: HID: sony: Send ds4 output reports on output end-point
UPSTREAM: HID: sony: Perform CRC check on bluetooth input packets
UPSTREAM: HID: sony: Adjust HID report size name definitions
UPSTREAM: HID: sony: Fix race condition in sony_probe
Conflicts:
arch/arm/include/asm/cputype.h
drivers/gpu/drm/msm/msm_gem.c
drivers/scsi/ufs/ufshcd.c
drivers/usb/dwc3/core.c
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/segment.c
kernel/sched/core.c
net/xfrm/xfrm_user.c
Change-Id: I33a8fa8d996fb61c9730f4128b50e7716e84c9fe
Signed-off-by: jianzhou <jianzhou@codeaurora.org>
commit 432798195bbce1f8cd33d1c0284d0538835e25fb upstream.
I was trying to solve a double free but I introduced a more serious
NULL dereference bug. The problem is that if there is an IRQ which
triggers immediately, then we need "info->uio_dev" but it's not set yet.
This patch puts the original initialization back to how it was and just
sets info->uio_dev to NULL on the error path so it should solve both
the Oops and the double free.
Fixes: f019f07ecf6a ("uio: potential double frees if __uio_register_device() fails")
Reported-by: Mathias Thore <Mathias.Thore@infinera.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable <stable@vger.kernel.org>
Tested-by: Mathias Thore <Mathias.Thore@infinera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenterauthored and Greg Kroah-Hartmancommited 2018-11-27 16:09:41 +01:00
[ Upstream commit ae61cf5b9913027c6953a79ed3894da4f47061bd ]
When both uio and the uio drivers are built in the kernel, it is possible
for a driver to register devices before the uio class is registered.
This may result in a NULL pointer dereference later on in
get_device_parent() when accessing the class glue_dirs spinlock.
The trace looks like that:
Unable to handle kernel NULL pointer dereference at virtual address 00000140
[...]
[<ffff0000089cc234>] _raw_spin_lock+0x14/0x48
[<ffff0000084f56bc>] device_add+0x154/0x6a0
[<ffff0000084f5e48>] device_create_groups_vargs+0x120/0x128
[<ffff0000084f5edc>] device_create+0x54/0x60
[<ffff0000086e72c0>] __uio_register_device+0x120/0x4a8
[<ffff000008528b7c>] jaguar2_pci_probe+0x2d4/0x558
[<ffff0000083fc18c>] local_pci_probe+0x3c/0xb8
[<ffff0000083fd81c>] pci_device_probe+0x11c/0x180
[<ffff0000084f88bc>] driver_probe_device+0x22c/0x2d8
[<ffff0000084f8a24>] __driver_attach+0xbc/0xc0
[<ffff0000084f69fc>] bus_for_each_dev+0x4c/0x98
[<ffff0000084f81b8>] driver_attach+0x20/0x28
[<ffff0000084f7d08>] bus_add_driver+0x1b8/0x228
[<ffff0000084f93c0>] driver_register+0x60/0xf8
[<ffff0000083fb918>] __pci_register_driver+0x40/0x48
Return EPROBE_DEFER in that case so the driver can register the device
later.
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexandre Belloniauthored and Greg Kroah-Hartmancommited 2018-11-13 11:16:53 -08:00
* refs/heads/tmp-ba01a42:
Linux 4.9.128
mm: get rid of vmacache_flush_all() entirely
autofs: fix autofs_sbi() does not check super block type
mtd: ubi: wl: Fix error return code in ubi_wl_init()
netfilter: x_tables: avoid stack-out-of-bounds read in xt_copy_counters_from_user
xhci: Fix use-after-free in xhci_free_virt_device
RDMA/cma: Do not ignore net namespace for unbound cm_id
MIPS: WARN_ON invalid DMA cache maintenance, not BUG_ON
NFSv4.1: Fix a potential layoutget/layoutrecall deadlock
f2fs: fix to do sanity check with {sit,nat}_ver_bitmap_bytesize
mfd: ti_am335x_tscadc: Fix struct clk memory leak
iommu/ipmmu-vmsa: Fix allocation in atomic context
f2fs: Fix uninitialized return in f2fs_ioc_shutdown()
media: helene: fix xtal frequency setting at power on
partitions/aix: fix usage of uninitialized lv_info and lvname structures
partitions/aix: append null character to print data from disk
media: s5p-mfc: Fix buffer look up in s5p_mfc_handle_frame_{new, copy_time} functions
Input: atmel_mxt_ts - only use first T9 instance
net: dcb: For wild-card lookups, use priority -1, not 0
MIPS: generic: fix missing of_node_put()
MIPS: Octeon: add missing of_node_put()
f2fs: fix to do sanity check with reserved blkaddr of inline inode
tpm/tpm_i2c_infineon: switch to i2c_lock_bus(..., I2C_LOCK_SEGMENT)
tpm_tis_spi: Pass the SPI IRQ down to the driver
f2fs: fix to skip GC if type in SSA and SIT is inconsistent
f2fs: try grabbing node page lock aggressively in sync scenario
net: mvneta: fix mtu change on port without link
gpio: ml-ioh: Fix buffer underwrite on probe error path
x86/mm: Remove in_nmi() warning from vmalloc_fault()
Bluetooth: hidp: Fix handling of strncpy for hid->name information
ath10k: disable bundle mgmt tx completion event support
scsi: 3ware: fix return 0 on the error path of probe
ata: libahci: Correct setting of DEVSLP register
MIPS: Fix ISA virt/bus conversion for non-zero PHYS_OFFSET
wlcore: Set rx_status boottime_ns field on rx
ath10k: prevent active scans on potential unusable channels
ath9k_hw: fix channel maximum power level test
ath9k: report tx status on EOSP
macintosh/via-pmu: Add missing mmio accessors
NFSv4.0 fix client reference leak in callback
perf tools: Allow overriding MAX_NR_CPUS at compile time
f2fs: do not set free of current section
tty: rocket: Fix possible buffer overwrite on register_PCI
uio: potential double frees if __uio_register_device() fails
misc: ti-st: Fix memory leak in the error path of probe()
timers: Clear timer_base::must_forward_clk with timer_base::lock held
md/raid5: fix data corruption of replacements after originals dropped
scsi: target: fix __transport_register_session locking
net: phy: Fix the register offsets in Broadcom iProc mdio mux driver
gpio: tegra: Move driver registration to subsys_init level
Bluetooth: h5: Fix missing dependency on BT_HCIUART_SERDEV
ethtool: Remove trailing semicolon for static inline
misc: mic: SCIF Fix scif_get_new_port() error handling
ARC: [plat-axs*]: Enable SWAP
mm: remove seemingly spurious reclaimability check from laptop_mode gating
mm, vmscan: clear PGDAT_WRITEBACK when zone is balanced
locking/osq_lock: Fix osq_lock queue corruption
selinux: use GFP_NOWAIT in the AVC kmem_caches
locking/rwsem-xadd: Fix missed wakeup due to reordering of load
nl80211: fix null-ptr dereference on invalid mesh configuration
block,blkcg: use __GFP_NOWARN for best-effort allocations in blkcg
IB/rxe: do not copy extra stack memory to skb
staging/rts5208: Fix read overflow in memcpy
staging: rt5208: Fix a sleep-in-atomic bug in xd_copy_page
kthread: fix boot hang (regression) on MIPS/OpenRISC
kthread: Fix use-after-free if kthread fork fails
cfq: Give a chance for arming slice idle timer in case of group_idle
ALSA: hda - Fix cancel_work_sync() stall from jackpoll work
KVM: s390: vsie: copy wrapping keys to right place
i2c: i801: fix DNV's SMBCTRL register offset
i2c: xiic: Make the start and the byte count write atomic
Conflicts:
block/blk-cgroup.c
include/linux/mm_types.h
mm/vmscan.c
security/selinux/avc.c
Change-Id: I100199166469ab24d9e4675f11637c6589361d66
Signed-off-by: Minming Qi <mqi@codeaurora.org>
[ Upstream commit f019f07ecf6a6b8bd6d7853bce70925d90af02d1 ]
The uio_unregister_device() function assumes that if "info->uio_dev" is
non-NULL that means "info" is fully allocated. Setting info->uio_de
has to be the last thing in the function.
In the current code, if request_threaded_irq() fails then we return with
info->uio_dev set to non-NULL but info is not fully allocated and it can
lead to double frees.
Fixes: beafc54c4e ("UIO: Add the User IO core code")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenterauthored and Greg Kroah-Hartmancommited 2018-09-19 22:47:13 +02:00
* refs/heads/tmp-8683408:
ANDROID: Add build server config for cuttlefish.
ANDROID: Add defconfig for cuttlefish.
FROMLIST: staging: Android: Add 'vsoc' driver for cuttlefish.
Revert "ANDROID: proc: make oom adjustment files user read-only"
Revert "ANDROID: fixup! proc: make oom adjustment files user read-only"
Linux 4.9.94
Revert "xhci: plat: Register shutdown for xhci_plat"
vrf: Fix use after free and double free in vrf_finish_output
net sched actions: fix dumping which requires several messages to user space
strparser: Fix sign of err codes
net/mlx4_core: Fix memory leak while delete slave's resources
vhost_net: add missing lock nesting notation
team: move dev_mc_sync after master_upper_dev_link in team_port_add
route: check sysctl_fib_multipath_use_neigh earlier than hash
vhost: validate log when IOTLB is enabled
net/mlx4_en: Fix mixed PFC and Global pause user control requests
net/sched: fix NULL dereference on the error path of tcf_skbmod_init()
net/sched: fix NULL dereference in the error path of tunnel_key_init()
net/mlx5e: Sync netdev vxlan ports at open
vti6: better validate user provided tunnel names
ip6_tunnel: better validate user provided tunnel names
ip6_gre: better validate user provided tunnel names
ipv6: sit: better validate user provided tunnel names
ip_tunnel: better validate user provided tunnel names
net: fool proof dev_valid_name()
bonding: process the err returned by dev_set_allmulti properly in bond_enslave
bonding: move dev_mc_sync after master_upper_dev_link in bond_enslave
bonding: fix the err path for dev hwaddr sync in bond_enslave
vlan: also check phy_driver ts_info for vlan's real device
vhost: correctly remove wait queue during poll failure
sky2: Increase D3 delay to sky2 stops working after suspend
sctp: sctp_sockaddr_af must check minimal addr length for AF_INET6
sctp: do not leak kernel memory to user space
r8169: fix setting driver_data after register_netdev
pptp: remove a buggy dst release in pptp_connect()
net/sched: fix NULL dereference in the error path of tcf_bpf_init()
netlink: make sure nladdr has correct size in netlink_connect()
net/ipv6: Increment OUTxxx counters after netfilter hook
net/ipv6: Fix route leaking between VRFs
net: fix possible out-of-bound read in skb_network_protocol()
ipv6: the entire IPv6 header chain must fit the first fragment
arp: fix arp_filter on l3slave devices
clk: at91: fix clk-generated compilation
random: use lockless method of accessing and updating f->reg_idx
virtio_net: check return value of skb_to_sgvec in one more location
virtio_net: check return value of skb_to_sgvec always
rxrpc: check return value of skb_to_sgvec always
ipsec: check return value of skb_to_sgvec always
perf tools: Fix copyfile_offset update of output offset
mtd: mtd_oobtest: Handle bitflips during reads
Input: goodix - disable IRQs while suspended
sdhci: Advertise 2.0v supply on SDIO host controller
cxgb4vf: Fix SGE FL buffer initialization logic for 64K pages
EDAC, mv64x60: Fix an error handling path
tty: n_gsm: Allow ADM response in addition to UA for control dlci
blk-mq: fix kernel oops in blk_mq_tag_idle()
scsi: libsas: initialize sas_phy status according to response of DISCOVER
scsi: libsas: fix error when getting phy events
scsi: libsas: fix memory leak in sas_smp_get_phy_events()
bcache: segregate flash only volume write streams
bcache: stop writeback thread after detaching
drm/vc4: Fix resource leak in 'vc4_get_hang_state_ioctl()' in error handling path
selftests: kselftest_harness: Fix compile warning
hsr: fix incorrect warning
vxlan: dont migrate permanent fdb entries during learn
s390/dasd: fix hanging safe offline
ACPICA: Disassembler: Abort on an invalid/unknown AML opcode
ACPICA: Events: Add runtime stub support for event APIs
ACPICA: OSL: Add support to exclude stdarg.h
cpuidle: dt: Add missing 'of_node_put()'
Bluetooth: Send HCI Set Event Mask Page 2 command only when needed
clk: meson: meson8b: add compatibles for Meson8 and Meson8m2
net: ena: disable admin msix while working in polling mode
net: ena: add missing unmap bars on device removal
net: ena: add missing return when ena_com_get_io_handlers() fails
net: ena: fix race condition between submit and completion admin command
net: ena: fix rare uncompleted admin command false alarm
iio: magnetometer: st_magn_spi: fix spi_device_id table
sparc64: ldc abort during vds iso boot
net: fec: Add a fec_enet_clear_ethtool_stats() stub for CONFIG_M5272
sctp: fix recursive locking warning in sctp_do_peeloff
bnx2x: Allow vfs to disable txvlan offload
crypto: omap-sham - fix closing of hash with separate finalize call
crypto: omap-sham - buffer handling fixes for hashing later
geneve: add missing rx stats accounting
stmmac: fix ptp header for GMAC3 hw timestamp
coresight: tmc: Configure DMA mask appropriately
coresight: Fix reference count for software sources
pinctrl: meson-gxbb: remove non-existing pin GPIOX_22
X.509: Fix error code in x509_cert_parse()
xen: avoid type warning in xchg_xen_ulong
skbuff: only inherit relevant tx_flags
perf tests: Decompress kernel module before objdump
perf tools: Decompress kernel module when reading DSO data
net: emac: fix reset timeout with AR8035 phy
Fix loop device flush before configure v3
ARM: dts: armadillo800eva: Split LCD mux and gpio
MIPS: kprobes: flush_insn_slot should flush only if probe initialised
MIPS: mm: adjust PKMAP location
MIPS: mm: fixed mappings: correct initialisation
sched/deadline: Use the revised wakeup rule for suspending constrained dl tasks
perf/core: Correct event creation with PERF_FORMAT_GROUP
e1000e: Undo e1000e_pm_freeze if __e1000_shutdown fails
KVM: nVMX: Update vmcs12->guest_linear_address on nested VM-exit
nvme: fix hang in remove path
nvme-pci: fix multiple ctrl removal scheduling
ARM: imx: Add MXC_CPU_IMX6ULL and cpu_is_imx6ull
net: phy: avoid genphy_aneg_done() for PHYs without clause 22 support
mceusb: sporadic RX truncation corruption fix
cx25840: fix unchecked return values
cxl: Unlock on error in probe
igb: fix race condition with PTP_TX_IN_PROGRESS bits
e1000e: fix race condition around skb_tstamp_tx()
ARM: dts: qcom: ipq4019: fix i2c_0 node
tags: honor COMPILED_SOURCE with apart output directory
iwlwifi: fix min API version for 7265D, 3168, 8000 and 8265
iwlwifi: pcie: only use d0i3 in suspend/resume if system_pm is set to d0i3
iwlwifi: tt: move ucode_loaded check under mutex
iwlwifi: mvm: Fix command queue number on d0i3 flow
watchdog: f71808e_wdt: Add F71868 support
iwlwifi: mvm: fix firmware debug restart recording
perf report: Ensure the perf DSO mapping matches what libdw sees
perf header: Set proper module name when build-id event found
net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport
net/mlx4: Fix the check in attaching steering rules
sit: reload iphdr in ipip6_rcv
macsec: check return value of skb_to_sgvec always
skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow
ip6_tunnel: fix traffic class routing for tunnels
bio-integrity: Do not allocate integrity context for bio w/o data
Fix serial console on SNI RM400 machines
cxgb4: fix incorrect cim_la output for T6
powerpc/8xx: fix mpc8xx_get_irq() return on no irq
drm/omap: fix tiled buffer stride calculations
RDMA/hfi1: fix array termination by appending NULL to attr array
RDMA/iw_cxgb4: Avoid touch after free error in ARP failure handlers
net: phy: micrel: Restore led_mode and clk_sel on resume
mISDN: Fix a sleep-in-atomic bug
arm64: kernel: restrict /dev/mem read() calls to linear region
qlcnic: Fix a sleep-in-atomic bug in qlcnic_82xx_hw_write_wx_2M and qlcnic_82xx_hw_read_wx_2M
perf trace: Add mmap alias for s390
ath10k: add BMI parameters to fix calibration from DT/pre-cal
drm/amdkfd: NULL dereference involving create_process()
powerpc/spufs: Fix coredump of SPU contexts
clk: Fix __set_clk_rates error print-string
clk: scpi: fix return type of __scpi_dvfs_round_rate
KVM: SVM: do not zero out segment attributes if segment is unusable or not present
mtd: nand: check ecc->total sanity in nand_scan_tail
mtd: nand: gpmi: Fix gpmi_nand_init() error path
dt-bindings: display: sun4i: Add allwinner,tcon-channel property
drm/sun4i: Ignore the generic connectors for components
clk: at91: fix clk-generated parenting
net: freescale: fix potential null pointer dereference
SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()
rtc: interface: Validate alarm-time before handling rollover
rtc: opal: Handle disabled TPO in opal_get_tpo_time()
i40evf: fix merge error in older patch
rtc: m41t80: fix SQW dividers override when setting a date
cxgb4: Fix netdev_features flag
cxgb4: FW upgrade fixes
net/mlx5: avoid build warning for uniprocessor
arm64: futex: Fix undefined behaviour with FUTEX_OP_OPARG_SHIFT usage
backlight: Report error on failure
dmaengine: imx-sdma: Handle return value of clk_prepare_enable
powerpc/[booke|4xx]: Don't clobber TCR[WP] when setting TCR[DIE]
ovl: filter trusted xattr for non-admin
HID: i2c: Call acpi_device_fix_up_power for ACPI-enumerated devices
netfilter: conntrack: don't call iter for non-confirmed conntracks
x86/efi: Disable runtime services on kexec kernel if booted with efi=old_map
hdlcdrv: Fix divide by zero in hdlcdrv_ioctl
wl1251: check return from call to wl1251_acx_arp_ip_filter
rt2x00: do not pause queue unconditionally on error path
ASoC: Intel: sst: Fix the return value of 'sst_send_byte_stream_mrfld()'
pinctrl: baytrail: Enable glitch filter for GPIOs used as interrupts
backlight: tdo24m: Fix the SPI CS between transfers
blk-mq: fix race between updating nr_hw_queues and switching io sched
IB/rdmavt: Allocate CQ memory on the correct node
gpio: label descriptors using the device name
vfb: fix video mode and line_length being set when loaded
mac80211: Fix setting TX power on monitor interfaces
ACPI: EC: Fix debugfs_create_*() usage
irqchip/gic-v3: Fix the driver probe() fail due to disabled GICC entry
scsi: mpt3sas: Proper handling of set/clear of "ATA command pending" flag.
scsi: libiscsi: Allow sd_shutdown on bad transport
ASoC: Intel: cht_bsw_rt5645: Analog Mic support
ASoC: Intel: Skylake: Disable clock gating during firmware and library download
media: videobuf2-core: don't go out of the buffer range
hwmon: (ina2xx) Make calibration register value fixed
PM / devfreq: Fix potential NULL pointer dereference in governor_store
VFS: close race between getcwd() and d_move()
net/mlx4_en: Change default QoS settings
ACPI / video: Default lcd_only to true on Win8-ready and newer machines
rds; Reset rs->rs_bound_addr in rds_add_bound() failure path
l2tp: fix missing print session offset info
perf probe: Add warning message if there is unexpected event name
thermal: power_allocator: fix one race condition issue for thermal_instances list
ARM: dts: ls1021a: add "fsl,ls1021a-esdhc" compatible string to esdhc node
i40iw: Correct Q1/XF object count equation
i40iw: Fix sequence number for the first partial FPDU
drm/msm: Take the mutex before calling msm_gem_new_impl
net: llc: add lock_sock in llc_ui_bind to avoid a race condition
KVM: nVMX: Fix handling of lmsw instruction
KVM: X86: Fix preempt the preemption timer cancel
PCI/msi: fix the pci_alloc_irq_vectors_affinity stub
cpuhotplug: Link lock stacks for hotplug callbacks
bonding: Don't update slave->link until ready to commit
Input: elan_i2c - clear INT before resetting controller
net: move somaxconn init from sysctl code
tcp: better validation of received ack sequences
ARM64: PCI: Fix struct acpi_pci_root_ops allocation failure path
ext4: fix off-by-one on max nr_pages in ext4_find_unwritten_pgoff()
fix race in drivers/char/random.c:get_reg()
scsi: bnx2fc: fix race condition in bnx2fc_get_host_stats()
ASoC: rsnd: SSI PIO adjust to 24bit mode
pNFS/flexfiles: missing error code in ff_layout_alloc_lseg()
netfilter: ctnetlink: fix incorrect nf_ct_put during hash resize
perf report: Fix off-by-one for non-activation frames
libceph: NULL deref on crush_decode() error path
net: ieee802154: fix net_device reference release too early
mlx5: fix bug reading rss_hash_type from CQE
block: fix an error code in add_partition()
selinux: do not check open permission on sockets
net/mlx5: Tolerate irq_set_affinity_hint() failures
gpio: crystalcove: Do not write regular gpio registers for virtual GPIOs
sched/numa: Use down_read_trylock() for the mmap_sem
perf/core: Fix error handling in perf_event_alloc()
leds: pca955x: Correct I2C Functionality
net/wan/fsl_ucc_hdlc: fix muram allocation error
ray_cs: Avoid reading past end of buffer
ARM: davinci: da8xx: Create DSP device only when assigned memory
md-cluster: fix potential lock issue in add_new_disk
ext4: handle the rest of ext4_mb_load_buddy() ENOMEM errors
iio: light: rpr0521 poweroff for probe fails
iio: hi8435: cleanup reset gpio
iio: hi8435: avoid garbage event at first enable
ASoC: simple-card: fix mic jack initialization
xfrm: fix state migration copy replay sequence numbers
selftests/powerpc: Fix TM resched DSCR test with some compilers
ath5k: fix memory leak on buf on failed eeprom read
powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash
scsi: csiostor: fix use after free in csio_hw_use_fwconfig()
mlxsw: spectrum: Avoid possible NULL pointer dereference
sh_eth: Use platform device for printing before register_netdev()
fsl/qe: add bit description for SYNL register for GUMR
net/wan/fsl_ucc_hdlc: fix incorrect memory allocation
net/wan/fsl_ucc_hdlc: fix unitialized variable warnings
serial: sh-sci: Fix race condition causing garbage during shutdown
serial: 8250: omap: Disable DMA for console UART
USB: ene_usb6250: fix SCSI residue overwriting
net: x25: fix one potential use-after-free issue
USB: ene_usb6250: fix first command execution
pxa_camera: fix module remove codepath for v4l2 clock
usb: chipidea: properly handle host or gadget initialization failure
ARM: dts: rockchip: fix rk322x i2s1 pinctrl error
arp: honour gratuitous ARP _replies_
neighbour: update neigh timestamps iff update is effective
uio: fix incorrect memory leak cleanup
ipmr: vrf: Find VIFs using the actual device
ata: libahci: properly propagate return value of platform_get_irq()
btrfs: fix incorrect error return ret being passed to mapping_set_error
usb: dwc3: keystone: check return value
KVM: arm64: Restore host physical timer access on hyp_panic()
KVM: arm: Restore banked registers and physical timer access on hyp_panic()
async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome()
ipv6: avoid dad-failures for addresses with NODAD
mdio: mux: fix device_node_continue.cocci warnings
arm64: perf: Ignore exclude_hv when kernel is running in HYP
i2c: mux: reg: put away the parent i2c adapter on probe failure
ARM: dts: imx6qdl-wandboard: Fix audio channel swap
powerpc/modules: If mprofile-kernel is enabled add it to vermagic
x86/tsc: Provide 'tsc=unstable' boot parameter
clk: renesas: rcar-gen2: Fix PLL0 on R-Car V2H and E2
staging: wlan-ng: prism2mgmt.c: fixed a double endian conversion before calling hfa384x_drvr_setconfig16, also fixes relative sparse warning
ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin
iio: pressure: zpa2326: report interrupted case as failure
PowerCap: Fix an error code in powercap_register_zone()
bus: brcmstb_gisb: correct support for 64-bit address output
bus: brcmstb_gisb: Use register offsets with writes too
SMB2: Fix share type handling
mm, vmstat: Remove spurious WARN() during zoneinfo print
vmxnet3: ensure that adapter is in proper state during force_close
irqchip/mbigen: Fix the clear register offset calculation
KVM: PPC: Book3S PR: Check copy_to/from_user return values
Input: elantech - force relative mode on a certain module
Input: elan_i2c - check if device is there before really probing
mdio: mux: Correct mdio_mux_init error path issues
netxen_nic: set rcode to the return status from the call to netxen_issue_cmd
net: qca_spi: Fix alignment issues in rx path
blk-mq: NVMe 512B/4K+T10 DIF/DIX format returns I/O error on dd with split op
perf/callchain: Force USER_DS when invoking perf_callchain_user()
CIFS: silence lockdep splat in cifs_relock_file()
NFSv4.1: Work around a Linux server bug...
qed: Correct doorbell configuration for !4Kb pages
net/mlx4_en: Avoid adding steering rules with invalid ring
s390: move _text symbol to address higher than zero
pidns: disable pid allocation if pid_ns_prepare_proc() is failed in alloc_pid()
drivers/misc/vmw_vmci/vmci_queue_pair.c: fix a couple integer overflow tests
lockd: fix lockd shutdown race
net: ethernet: ti: cpsw: adjust cpsw fifos depth for fullduplex flow control
net: cdc_ncm: Fix TX zero padding
ipmi_ssif: unlock on allocation failure
ubi: fastmap: Fix slab corruption
qlge: Avoid reading past end of buffer
bna: Avoid reading past end of buffer
mac80211: bail out from prep_connection() if a reconfig is ongoing
af_key: Fix slab-out-of-bounds in pfkey_compile_policy.
IB/srpt: Avoid that aborting a command triggers a kernel warning
IB/srpt: Fix abort handling
x86/boot: Declare error() as noreturn
NFSv4.1: RECLAIM_COMPLETE must handle NFS4ERR_CONN_NOT_BOUND_TO_SESSION
ovl: persistent inode numbers for upper hardlinks
x86/mm/kaslr: Use the _ASM_MUL macro for multiplication to work around Clang incompatibility
x86/asm: Don't use RBP as a temporary register in csum_partial_copy_generic()
rtc: snvs: fix an incorrect check of return value
md/raid5: make use of spin_lock_irq over local_irq_disable + spin_lock
cfg80211: make RATE_INFO_BW_20 the default
qed: Fix overriding of supported autoneg value.
ANDROID: proc: add null check in proc_uid_init
f2fs/fscrypt: updates to v4.17-rc1
Revert "ANDROID: sched/tune: Initialize raw_spin_lock in boosted_groups"
ANDROID: uid_sys_stats: Replace tasklist lock with RCU in uid_cputime_show
ANDROID: arm64: mark kpti_install_ng_mappings as __nocfi
Conflicts:
arch/arm64/kernel/perf_event.c
drivers/gpu/drm/msm/msm_gem.c
drivers/hwtracing/coresight/coresight-tmc.c
drivers/hwtracing/coresight/coresight.c
Change-Id: I3a1bd6216f55601cff0a2b4344c480b2e1a771a6
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
[ Upstream commit 0d83539092ddb1ab79b4d65bccb866bf07ea2ccd ]
Commit 75f0aef622 ("uio: fix memory leak") has fixed up some
memory leaks during the failure paths of the addition of uio
attributes, but still is not correct entirely. A kobject_uevent()
failure still needs a kobject_put() and the kobject container
structure allocation failure before the kobject_init() doesn't
need a kobject_put(). Fix this properly.
Fixes: 75f0aef622 ("uio: fix memory leak")
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suman Annaauthored and Greg Kroah-Hartmancommited 2018-04-13 19:47:59 +02:00
If guard_memory dtsi property is set, then the shared memory
region will be guarded by SZ_4K at the start and at the end.
This is needed to overcome the XPU limitation on few MSM HW,
so as to make this memory not contiguous with other allocations
that may possibly happen from other clients in the system.
Change-Id: I57637619cea8fe7f0f7254624e07177ea4a4fce0
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
The variable debug_buffer is a global variable which is allocated
and free'd when open/close is called on debugfs file -
"/sys/kernel/debug/rmt_storage/info". The current code doesn't
have locks to handle concurrent accesses to the above file.
This results into use after free issue when debug_buffer is
accessed by two threads at the same time. Fix this by adding
a mutex lock to protect this global variable.
Change-Id: I6bc3f0ae2d7fca3ca9fe8561612f5863b6c3268a
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Sahitya Tummalaauthored and Ritesh Harjanicommited 2017-04-20 13:49:54 +05:30
Use proper printk format specifier to print phys_addr_t
type variable.
Change-Id: I7c55e44e813d8d41e1ead03280044c8542a24922
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Prasad Sodagudiauthored and Ritesh Harjanicommited 2017-04-20 13:49:51 +05:30
Add support for HYP call to setup the sharedmem permissions
for the MPSS client.
Change-Id: I3b48ae962865d8d0a0ea6e3fbb8e21278b59c690
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
[riteshh@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Nikhilesh Reddyauthored and Ritesh Harjanicommited 2017-04-20 13:49:49 +05:30
This is a snapshot of the MSM sharedmem driver as of msm-3.14
commit:
commit 149717c082aab81 ("uio: msm_sharedmem: Add custom mmap")
The following changes are included:
02d55287 uio: msm_sharedmem: Restrict debugfs write to root.
de961fc7 uio: msm_sharedmem: Return ENOMEM if the shared mem addr
is zero.
b974ce64 uio: msm_sharedmem: Add addtional information to debugfs
c46af547 uio: msm_sharedmem: Add support for dynamic shared memory
allocation
Change-Id: I49902f018bde1d59d41027b7e46268cc17231a3e
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
[riteshh@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: Ritesh Harjani <riteshh@codeaurora.org>
Nikhilesh Reddyauthored and Ritesh Harjanicommited 2017-04-20 13:49:17 +05:30
The variable i contains a total number of resources (including
IORESOURCE_IRQ). However, we want the dmem_region_start to point
after the last resource of type IORESOURCE_MEM. The original behaviour
leads (very likely) to skipping several UIO mapping regions and makes
them useless. Fix this by computing dmem_region_start from the uiomem
which points to the last used UIO mapping.
Fixes: 0a0c3b5a24 ("Add new uio device for dynamic memory allocation")
Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jan Viktorinauthored and Greg Kroah-Hartmancommited 2016-08-31 13:07:30 +02:00
My static checker complains that "ret" could be uninitialized at the
end, which is true but it's more likely that it would be set to zero.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenterauthored and Greg Kroah-Hartmancommited 2016-05-01 14:11:12 -07:00
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.
Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luis de Bethencourtauthored and Greg Kroah-Hartmancommited 2015-10-04 12:32:25 +01:00
Use module_platform_driver for drivers whose init and exit functions
only register and unregister, respectively.
A simplified version of the Coccinelle semantic patch that performs
this transformation is as follows:
@a@
identifier f, x;
@@
-static f(...) { return platform_driver_register(&x); }
@b depends on a@
identifier e, a.x;
@@
-static e(...) { platform_driver_unregister(&x); }
@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);
@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_platform_driver;
@@
-module_exit(e);
+module_platform_driver(x);
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Vaishali Thakkarauthored and Greg Kroah-Hartmancommited 2015-08-05 13:25:59 -07:00
mach-dependant stuff has been removed by
2eb2478d47 ("uio: uio_pruss: replace private SRAM API with genalloc")
There is no need to keep
depends on ARCH_DAVINCI_DA850
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matwey V. Kornilovauthored and Greg Kroah-Hartmancommited 2015-06-12 17:01:43 -07:00
uio_pruss uses io memory, that should be explicitly depend on it
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matwey V. Kornilovauthored and Greg Kroah-Hartmancommited 2015-06-12 17:01:43 -07:00
uio_pruss references SZ_16K and SZ_256K defines, but linux/sizes.h is not included.
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Matwey V. Kornilovauthored and Greg Kroah-Hartmancommited 2015-06-12 17:01:43 -07:00
UIO base driver should only free_irq that it has requested.
UIO supports drivers without interrupts (irq == 0) or custom handlers.
This fixes warnings like:
WARNING: CPU: 1 PID: 5478 at kernel/irq/manage.c:1244 __free_irq+0xa9/0x1e0()
Trying to free already-free IRQ 0
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stephen Hemmingerauthored and Greg Kroah-Hartmancommited 2015-05-24 11:55:15 -07:00
This reverts commit 4d8beff2ae.
It causes build warnings, and it's incorrect as we do write to this
structure.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
of_device_id is always used as const.
(See driver.of_match_table and open firmware functions)
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabian Frederickauthored and Greg Kroah-Hartmancommited 2015-03-25 12:25:28 +01:00
Separate irq request/free from the device lifecycle.
After device unregister the parent module can call pci_disable_msi.
>From the PCI MSI how to:
"Before calling this function, a device driver must always call free_irq()
on any interrupt for which it previously called request_irq().
Failure to do so results in a BUG_ON(), leaving the device with
MSI enabled and thus leaking its vector."
So we need to separately free the irq at unregister to allow the device
to be kept around in the case of it still having open FDs.
Signed-off-by: Brian Russell <brussell@brocade.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Brian Russellauthored and Greg Kroah-Hartmancommited 2015-03-20 13:18:16 +01:00
This driver provides UIO access to memory of a peripheral connected
to the Freescale enhanced local bus controller (eLBC) interface
using the general purpose chip-select mode (GPCM).
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John Ognessauthored and Greg Kroah-Hartmancommited 2015-01-12 05:04:13 -08:00
If uio_register_device() fails in probe(), it breaks off initialization,
deallocates all resources, but returns zero.
The patch adds proper error code propagation.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexey Khoroshilovauthored and Greg Kroah-Hartmancommited 2015-01-12 05:04:12 -08:00
Here's the big char/misc driver update for 3.19-rc1
Lots of little things all over the place in different drivers, and a new
subsystem, "coresight" has been added. Full details are in the
shortlog.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEABECAAYFAlSODosACgkQMUfUDdst+ykSNwCfcqx1Z3rQzbLwSrR2sa1fV3Zb
yEAAniJoLZ4ZkoQK4/1ozsFc31q+gXNm
=/epr
-----END PGP SIGNATURE-----
Merge tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here's the big char/misc driver update for 3.19-rc1
Lots of little things all over the place in different drivers, and a
new subsystem, "coresight" has been added. Full details are in the
shortlog"
* tag 'char-misc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (73 commits)
parport: parport_pc, do not remove parent devices early
spmi: Remove shutdown/suspend/resume kernel-doc
carma-fpga-program: drop videobuf dependency
carma-fpga: drop videobuf dependency
carma-fpga-program.c: fix compile errors
i8k: Fix temperature bug handling in i8k_get_temp()
cxl: Name interrupts in /proc/interrupt
CXL: Return error to PSL if IRQ demultiplexing fails & print clearer warning
coresight-replicator: remove .owner field for driver
coresight: fixed comments in coresight.h
coresight: fix typo in comment in coresight-priv.h
coresight: bindings for coresight drivers
coresight: Adding ABI documentation
w1: support auto-load of w1_bq27000 module.
w1: avoid potential u16 overflow
cn: verify msg->len before making callback
mei: export fw status registers through sysfs
mei: read and print all six FW status registers
mei: txe: add cherrytrail device id
mei: kill cached host and me csr values
...
This is a completion to 27a90700a4
The size field is also increased to allow values larger than 32 bits
on platforms that have more than 32 bit physical addresses.
Signed-off-by: Cristian Stoica <cristian.stoica@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cristian Stoicaauthored and Greg Kroah-Hartmancommited 2014-11-07 10:09:07 -08:00
In order to prevent a O(n) search of the filesystem to link up its uio
node with its target configuration, TCMU needs to know the minor number
that UIO assigned. Expose the definition of this struct so TCMU can
access this field.
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Andy Groverauthored and Nicholas Bellingercommited 2014-10-02 21:35:54 -07:00
This resolves a number of merge issues with changes in this tree and
Linus's tree at the same time.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Get rid of the repeating &dev->dev constructs and prevent introducing
new ones.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andre Heiderauthored and Greg Kroah-Hartmancommited 2014-07-09 17:32:06 -07:00
This reverts commit ddb09754e6.
Linus objected to this originally, I can see why it might be needed, but
given that no one spoke up defending this patch, I'm going to revert it.
If you have hardware that requires this change, please speak up in the
future and defend the patch.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Bin Wang <binw@marvell.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Norbert Ciosek <norbertciosek@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
the vma range size is always page size aligned in mmap, while the
real io space range may not be page aligned, thus leading to range
check failure in the uio_mmap_physical().
for example, in a case of io range size "mem->size == 1KB", and we
have (vma->vm_end - vma->vm_start) == 4KB, due to "len" is aligned
to page size in do_mmap_pgoff().
now fix this issue by align mem->size to page size in the check.
Signed-off-by: Bin Wang <binw@marvell.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bin Wangauthored and Greg Kroah-Hartmancommited 2014-05-27 14:11:06 -07:00
When platform_get_irq() is failed after "priv" allocated,
it need to free "priv". But the label of bad0 doesn't try
to free about "priv". So this patch changes that lable to "bad1".
But "bad1" has pm_runtime_disable() call, this function should
be called when uio_register_device() is failed. So it is moved
into handling error for uio_register_device().
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Daeseok Younauthored and Greg Kroah-Hartmancommited 2014-05-27 14:11:06 -07:00
Commit e6789cd3df (uio: Simplify uio error
path by using devres functions) converted uio to use devm_request_irq().
This introduced a change in behaviour since the IRQ is associated with
the parent device instead of the created UIO device. The IRQ will remain
active after uio_unregister_device() is called, and some drivers will
crash because of this. The patch fixes this.
Signed-off-by: Aaro Koskinen <aaro.koskinen@nsn.com>
Cc: stable <stable@vger.kernel.org> # 3.13
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinenauthored and Greg Kroah-Hartmancommited 2013-12-20 08:49:17 -08:00
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jingoo Hanauthored and Greg Kroah-Hartmancommited 2013-12-08 22:41:48 -08:00
In commit 7314e613d5 ("Fix a few incorrectly checked
[io_]remap_pfn_range() calls") the uio driver started more properly
checking the passed-in user mapping arguments against the size of the
actual uio driver data.
That in turn exposed that some driver authors apparently didn't realize
that mmap can only work on a page granularity, and had tried to use it
with smaller mappings, with the new size check catching that out.
So since it's not just the user mmap() arguments that can be confused,
make the uio mmap code also verify that the uio driver has the memory
allocated at page boundaries in order for mmap to work. If the device
memory isn't properly aligned, we return
[ENODEV]
The fildes argument refers to a file whose type is not supported by mmap().
as per the open group documentation on mmap.
Reported-by: Holger Brunck <holger.brunck@keymile.com>
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>