Merge 4.14.228 into android-4.14-q
Linux 4.14.228
xen-blkback: don't leak persistent grants from xen_blkbk_map()
can: peak_usb: Revert "can: peak_usb: add forgotten supported devices"
* ext4: add reclaim checks to xattr code
fs/ext4/xattr.c
mac80211: fix double free in ibss_leave
* net: qrtr: fix a kernel-infoleak in qrtr_recvmsg()
net/qrtr/qrtr.c
net: sched: validate stab values
* can: dev: Move device back to init netns on owning netns delete
include/net/rtnetlink.h
net/core/dev.c
* locking/mutex: Fix non debug version of mutex_lock_io_nested()
include/linux/mutex.h
scsi: mpt3sas: Fix error return code of mpt3sas_base_attach()
scsi: qedi: Fix error return code of qedi_alloc_global_queues()
perf auxtrace: Fix auxtrace queue conflict
ACPI: scan: Use unique number for instance_no
ACPI: scan: Rearrange memory allocation in acpi_device_add()
RDMA/cxgb4: Fix adapter LE hash errors while destroying ipv6 listening server
net/mlx5e: Fix error path for ethtool set-priv-flag
arm64: kdump: update ppos when reading elfcorehdr
* drm/msm: fix shutdown hook in case GPU components failed to bind
drivers/gpu/drm/msm/msm_drv.c
net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes
net: cdc-phonet: fix data-interface release on probe failure
mac80211: fix rate mask reset
can: m_can: m_can_do_rx_poll(): fix extraneous msg loss warning
can: c_can: move runtime PM enable/disable to c_can_platform
can: c_can_pci: c_can_pci_remove(): fix use-after-free
can: peak_usb: add forgotten supported devices
ftgmac100: Restart MAC HW once
net/qlcnic: Fix a use after free in qlcnic_83xx_get_minidump_template
e1000e: Fix error handling in e1000_set_d0_lplu_state_82571
e1000e: add rtnl_lock() to e1000_reset_task
net: dsa: bcm_sf2: Qualify phydev->dev_flags based on port
* macvlan: macvlan_count_rx() needs to be aware of preemption
include/linux/if_macvlan.h
libbpf: Fix INSTALL flag order
bus: omap_l3_noc: mark l3 irqs as IRQF_NO_THREAD
* dm ioctl: fix out of bounds array access when no devices
drivers/md/dm-ioctl.c
ARM: dts: at91-sama5d27_som1: fix phy address to 7
arm64: dts: ls1043a: mark crypto engine dma coherent
arm64: dts: ls1012a: mark crypto engine dma coherent
arm64: dts: ls1046a: mark crypto engine dma coherent
squashfs: fix xattr id and id lookup sanity checks
* squashfs: fix inode lookup sanity checks
fs/squashfs/squashfs_fs.h
ia64: fix ptrace(PTRACE_SYSCALL_INFO_EXIT) sign
ia64: fix ia64_syscall_get_set_arguments() for break-based syscalls
nfs: we don't support removing system.nfs4_acl
* drm/radeon: fix AGP dependency
drivers/gpu/drm/Kconfig
* u64_stats,lockdep: Fix u64_stats_init() vs lockdep
include/linux/u64_stats_sync.h
sparc64: Fix opcode filtering in handling of no fault loads
atm: idt77252: fix null-ptr-dereference
atm: uPD98402: fix incorrect allocation
net: wan: fix error return code of uhdlc_init()
net: hisilicon: hns: fix error return code of hns_nic_clear_all_rx_fetch()
NFS: Correct size calculation for create reply length
* nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default
fs/nfs/Kconfig
gpiolib: acpi: Add missing IRQF_ONESHOT
sun/niu: fix wrong RXMAC_BC_FRM_CNT_COUNT count
net: tehuti: fix error return code in bdx_probe()
ixgbe: Fix memleak in ixgbe_configure_clsu32
* Revert "r8152: adjust the settings about MAC clock speed down for RTL8153"
drivers/net/usb/r8152.c
atm: lanai: dont run lanai_dev_close if not open
atm: eni: dont release is never initialized
powerpc/4xx: Fix build errors from mfdcr()
net: fec: ptp: avoid register access when ipg clock is disabled
ANDROID: Make vsock virtio packet buff size configurable
Merge 4.14.227 into android-4.14-q
Linux 4.14.227
* genirq: Disable interrupts for force threaded handlers
kernel/irq/manage.c
* ext4: fix potential error in ext4_do_update_inode
fs/ext4/inode.c
* ext4: do not try to set xattr into ea_inode if value is empty
fs/ext4/xattr.c
* ext4: find old entry again if failed to rename whiteout
fs/ext4/namei.c
x86: Introduce TS_COMPAT_RESTART to fix get_nr_restart_syscall()
x86: Move TS_COMPAT back to asm/thread_info.h
* kernel, fs: Introduce and use set_restart_fn() and arch_set_restart_data()
fs/select.c
include/linux/thread_info.h
kernel/futex.c
kernel/time/alarmtimer.c
kernel/time/hrtimer.c
kernel/time/posix-cpu-timers.c
x86/ioapic: Ignore IRQ2 again
perf/x86/intel: Fix a crash caused by zero PEBS status
PCI: rpadlpar: Fix potential drc_name corruption in store functions
iio: hid-sensor-temperature: Fix issues of timestamp channel
iio: hid-sensor-prox: Fix scale not correct issue
iio: hid-sensor-humidity: Fix alignment issue of timestamp channel
iio: gyro: mpu3050: Fix error handling in mpu3050_trigger_handler
iio: adis16400: Fix an error code in adis16400_initial_setup()
iio:adc:qcom-spmi-vadc: add default scale to LR_MUX2_BAT_ID channel
* iio:adc:stm32-adc: Add HAS_IOMEM dependency
drivers/iio/adc/Kconfig
* usb: gadget: configfs: Fix KASAN use-after-free
drivers/usb/gadget/configfs.c
* USB: replace hardcode maximum usb string length by definition
drivers/usb/gadget/composite.c
drivers/usb/gadget/configfs.c
drivers/usb/gadget/usbstring.c
include/uapi/linux/usb/ch9.h
* usb-storage: Add quirk to defeat Kindle's automatic unload
drivers/usb/storage/transport.c
drivers/usb/storage/unusual_devs.h
include/linux/usb_usual.h
nvme-rdma: fix possible hang when failing to set io queues
scsi: lpfc: Fix some error codes in debugfs
* net/qrtr: fix __netdev_alloc_skb call
net/qrtr/qrtr.c
sunrpc: fix refcount leak for rpc auth modules
svcrdma: disable timeouts on rdma backchannel
NFSD: Repair misuse of sv_lock in 5.10.16-rt30.
nvmet: don't check iosqes,iocqes for discovery controllers
btrfs: fix race when cloning extent buffer during rewind of an old root
tools build feature: Check if pthread_barrier_t is available
perf: Make perf able to build with latest libbfd
tools build: Check if gettid() is available before providing helper
tools build feature: Check if eventfd() is available
tools build feature: Check if get_current_dir_name() is available
perf tools: Use %define api.pure full instead of %pure-parser
* Revert "PM: runtime: Update device status before letting suppliers suspend"
drivers/base/power/runtime.c
* bpf: Prohibit alu ops for pointer types not defining ptr_limit
kernel/bpf/verifier.c
net: dsa: b53: Support setting learning on port
* bpf: Add sanity check for upper ptr_limit
kernel/bpf/verifier.c
* bpf: Simplify alu_limit masking for pointer arithmetic
kernel/bpf/verifier.c
* bpf: Fix off-by-one for area size in creating mask to left
kernel/bpf/verifier.c
* ext4: check journal inode extents more carefully
fs/ext4/block_validity.c
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/indirect.c
fs/ext4/inode.c
fs/ext4/mballoc.c
* ext4: don't allow overlapping system zones
fs/ext4/block_validity.c
* ext4: handle error of ext4_setup_system_zone() on remount
fs/ext4/super.c
Merge 4.14.226 into android-4.14-q
Linux 4.14.226
xen/events: avoid handling the same event on two cpus at the same time
xen/events: don't unmask an event channel when an eoi is pending
xen/events: reset affinity of 2-level event when tearing it down
iio: imu: adis16400: release allocated memory on failure
KVM: arm64: Fix exclusive limit for IPA size
hwmon: (lm90) Fix max6658 sporadic wrong temperature reading
binfmt_misc: fix possible deadlock in bm_register_write
powerpc/64s: Fix instruction encoding for lis in ppc_function_entry()
* include/linux/sched/mm.h: use rcu_dereference in in_vfork()
include/linux/sched/mm.h
* stop_machine: mark helpers __always_inline
include/linux/stop_machine.h
* configfs: fix a use-after-free in __configfs_open_file
fs/configfs/file.c
block: rsxx: fix error return code of rsxx_pci_probe()
NFSv4.2: fix return value of _nfs4_get_security_label()
sh_eth: fix TRSCER mask for R7S72100
staging: comedi: pcl818: Fix endian problem for AI command data
staging: comedi: pcl711: Fix endian problem for AI command data
staging: comedi: me4000: Fix endian problem for AI command data
staging: comedi: dmm32at: Fix endian problem for AI command data
staging: comedi: das800: Fix endian problem for AI command data
staging: comedi: das6402: Fix endian problem for AI command data
staging: comedi: adv_pci1710: Fix endian problem for AI command data
staging: comedi: addi_apci_1500: Fix endian problem for command sample
staging: comedi: addi_apci_1032: Fix endian problem for COS sample
staging: rtl8192e: Fix possible buffer overflow in _rtl92e_wx_set_scan
staging: rtl8712: Fix possible buffer overflow in r8712_sitesurvey_cmd
staging: ks7010: prevent buffer overflow in ks_wlan_set_scan()
staging: rtl8188eu: fix potential memory corruption in rtw_check_beacon_data()
staging: rtl8712: unterminated string leads to read overflow
staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
staging: rtl8192u: fix ->ssid overflow in r8192_wx_set_scan()
usbip: fix vhci_hcd attach_store() races leading to gpf
usbip: fix stub_dev usbip_sockfd_store() races leading to gpf
usbip: fix vudc to check for stream socket
usbip: fix vhci_hcd to check for stream socket
usbip: fix stub_dev to check for stream socket
USB: serial: cp210x: add some more GE USB IDs
USB: serial: cp210x: add ID for Acuity Brands nLight Air Adapter
USB: serial: ch341: add new Product ID
USB: serial: io_edgeport: fix memory leak in edge_startup
* usb: xhci: Fix ASMedia ASM1042A and ASM3242 DMA addressing
drivers/usb/host/xhci-pci.c
* xhci: Improve detection of device initiated wake signal.
drivers/usb/host/xhci.c
usb: renesas_usbhs: Clear PIPECFG for re-enabling pipe with other EPNUM
usb: gadget: f_uac1: stop playback on function disable
usb: gadget: f_uac2: always increase endpoint max_packet_size by one audio slot
* USB: gadget: u_ether: Fix a configfs return code
drivers/usb/gadget/function/u_ether_configfs.h
Goodix Fingerprint device is not a modem
mmc: core: Fix partition switch time for eMMC
s390/dasd: fix hanging IO request during DASD driver unbind
s390/dasd: fix hanging DASD driver unbind
* Revert 95ebabde382c ("capabilities: Don't allow writing ambiguous v3 file capabilities")
security/commoncap.c
* ALSA: usb-audio: Fix "cannot get freq eq" errors on Dell AE515 sound bar
sound/usb/quirks.c
ALSA: hda: Avoid spurious unsol event handling during S3/S4
ALSA: hda: Drop the BATCH workaround for AMD controllers
ALSA: hda/hdmi: Cancel pending works before suspend
scsi: libiscsi: Fix iscsi_prep_scsi_cmd_pdu() error handling
s390/smp: __smp_rescan_cpus() - move cpumask away from stack
PCI: mediatek: Add missing of_node_put() to fix reference leak
PCI: xgene-msi: Fix race in installing chained irq handler
powerpc/perf: Record counter overflow always if SAMPLE_IP is unset
powerpc: improve handling of unrecoverable system reset
mmc: mediatek: fix race condition between msdc_request_timeout and irq
mmc: mxs-mmc: Fix a resource leak in an error handling path in 'mxs_mmc_probe()'
udf: fix silent AED tagLocation corruption
* net: phy: fix save wrong speed and duplex problem if autoneg is on
drivers/net/phy/phy.c
media: usbtv: Fix deadlock on suspend
s390/cio: return -EFAULT if copy_to_user() fails
drm: meson_drv add shutdown function
* drm/compat: Clear bounce structures
drivers/gpu/drm/drm_ioc32.c
s390/cio: return -EFAULT if copy_to_user() fails again
perf traceevent: Ensure read cmdlines are null terminated.
net: stmmac: stop each tx channel independently
net: davicom: Fix regulator not turned off on driver removal
net: davicom: Fix regulator not turned off on failed probe
net: lapbether: Remove netif_start_queue / netif_stop_queue
* cipso,calipso: resolve a number of problems with the DOI refcounts
net/ipv4/cipso_ipv4.c
net/ipv6/calipso.c
net/netlabel/netlabel_cipso_v4.c
net: usb: qmi_wwan: allow qmimux add/del with master up
* net: sched: avoid duplicates in classes dump
net/sched/sch_api.c
net: stmmac: fix incorrect DMA channel intr enable setting of EQoS v4.10
net/mlx4_en: update moderation when config reset
sh_eth: fix TRSCER mask for SH771x
* Revert "mm, slub: consider rest of partial list if acquire_slab() fails"
mm/slub.c
scripts/recordmcount.{c,pl}: support -ffunction-sections .text.* section names
cifs: return proper error code in statfs(2)
* netfilter: x_tables: gpf inside xt_find_revision()
net/netfilter/x_tables.c
can: flexcan: enable RX FIFO after FRZ/HALT valid
can: flexcan: assert FRZ bit in flexcan_chip_freeze()
can: skb: can_skb_set_owner(): fix ref counting if socket was closed before setting skb ownership
net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0
* net: check if protocol extracted by virtio_net_hdr_set_proto is correct
include/linux/virtio_net.h
* net: Introduce parse_protocol header_ops callback
include/linux/netdevice.h
* net: Fix gro aggregation for udp encaps with zero csum
net/ipv4/udp_offload.c
ath9k: fix transmitting to stations in dynamic SMPS mode
ethernet: alx: fix order of calls on resume
uapi: nfnetlink_cthelper.h: fix userspace compilation error
* FROMGIT: configfs: fix a use-after-free in __configfs_open_file
fs/configfs/file.c
Merge 4.14.225 into android-4.14-q
Linux 4.14.225
drm/msm/a5xx: Remove overwriting A5XX_PC_DBG_ECO_CNTL register
misc: eeprom_93xx46: Add quirk to support Microchip 93LC46B eeprom
* PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller
drivers/pci/quirks.c
platform/x86: acer-wmi: Add ACER_CAP_KBD_DOCK quirk for the Aspire Switch 10E SW3-016
platform/x86: acer-wmi: Add support for SW_TABLET_MODE on Switch devices
platform/x86: acer-wmi: Add ACER_CAP_SET_FUNCTION_MODE capability flag
platform/x86: acer-wmi: Add new force_caps module parameter
platform/x86: acer-wmi: Cleanup accelerometer device handling
platform/x86: acer-wmi: Cleanup ACER_CAP_FOO defines
mwifiex: pcie: skip cancel_work_sync() on reset failure path
iommu/amd: Fix sleeping in atomic in increase_address_space()
* dm table: fix zoned iterate_devices based device capability checks
drivers/md/dm-table.c
* dm table: fix DAX iterate_devices based device capability checks
drivers/md/dm-table.c
* dm table: fix iterate_devices based device capability checks
drivers/md/dm-table.c
rsxx: Return -EFAULT if copy_to_user() fails
ALSA: ctxfi: cthw20k2: fix mask on conf to allow 4 bits
usbip: tools: fix build error for multiple definition
* PM: runtime: Update device status before letting suppliers suspend
drivers/base/power/runtime.c
btrfs: fix raid6 qstripe kmap
btrfs: raid56: simplify tracking of Q stripe presence
Merge 4.14.224 into android-4.14-q
Linux 4.14.224
* media: v4l: ioctl: Fix memory leak in video_usercopy
drivers/media/v4l2-core/v4l2-ioctl.c
* swap: fix swapfile read/write offset
mm/page_io.c
mm/swapfile.c
* zsmalloc: account the number of compacted pages correctly
drivers/block/zram/zram_drv.c
include/linux/zsmalloc.h
mm/zsmalloc.c
xen-netback: respect gnttab_map_refs()'s return value
Xen/gnttab: handle p2m update errors on a per-slot basis
scsi: iscsi: Verify lengths on passthrough PDUs
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
* sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output
fs/sysfs/file.c
include/linux/sysfs.h
scsi: iscsi: Restrict sessions and handles to admin capabilities
parisc: Bump 64-bit IRQ stack size to 64 KB
* f2fs: handle unallocated section and zone on pinned/atgc
fs/f2fs/segment.h
* media: uvcvideo: Allow entities with no pads
drivers/media/usb/uvc/uvc_driver.c
staging: most: sound: add sanity check for function argument
* Bluetooth: Fix null pointer dereference in amp_read_loc_assoc_final_data
net/bluetooth/amp.c
x86/build: Treat R_386_PLT32 relocation as R_386_PC32
ath10k: fix wmi mgmt tx queue full due to race condition
pktgen: fix misuse of BUG_ON() in pktgen_thread_worker()
wlcore: Fix command execute failure 19 for wl12xx
vt/consolemap: do font sum unsigned
x86/reboot: Add Zotac ZBOX CI327 nano PCI reboot quirk
staging: fwserial: Fix error handling in fwserial_create
dt-bindings: net: btusb: DT fix s/interrupt-name/interrupt-names/
* net: bridge: use switchdev for port flags set through sysfs too
net/bridge/br_sysfs_if.c
mm/hugetlb.c: fix unnecessary address expansion of pmd sharing
* net: fix up truesize of cloned skb in skb_prepare_for_shift()
net/core/skbuff.c
* smackfs: restrict bytes count in smackfs write functions
security/smack/smackfs.c
xfs: Fix assert failure in xfs_setattr_size()
media: mceusb: sanity check for prescaler value
JFS: more checks for invalid superblock
* arm64: Use correct ll/sc atomic constraints
arch/arm64/include/asm/atomic_ll_sc.h
* arm64: cmpxchg: Use "K" instead of "L" for ll/sc immediate constraint
arch/arm64/include/asm/atomic_ll_sc.h
* arm64: Avoid redundant type conversions in xchg() and cmpxchg()
arch/arm64/include/asm/atomic_ll_sc.h
arch/arm64/include/asm/atomic_lse.h
arch/arm64/include/asm/cmpxchg.h
* arm64 module: set plt* section addresses to 0x0
arch/arm64/kernel/module.lds
virtio/s390: implement virtio-ccw revision 2 correctly
drm/virtio: use kvmalloc for large allocations
hugetlb: fix update_and_free_page contig page struct assumption
* scripts: set proper OpenSSL include dir also for sign-file
scripts/Makefile
* scripts: use pkg-config to locate libcrypto
scripts/Makefile
net: usb: qmi_wwan: support ZTE P685M modem
Merge 4.14.223 into android-4.14-q
Linux 4.14.223
dm era: Update in-core bitset after committing the metadata
* net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending
include/linux/icmpv6.h
include/linux/ipv6.h
include/net/icmp.h
net/ipv4/icmp.c
net/ipv6/icmp.c
net/ipv6/ip6_icmp.c
* ipv6: silence compilation warning for non-IPV6 builds
include/linux/icmpv6.h
* ipv6: icmp6: avoid indirect call for icmpv6_send()
include/linux/icmpv6.h
net/ipv6/icmp.c
net/ipv6/ip6_icmp.c
sunvnet: use icmp_ndo_send helper
gtp: use icmp_ndo_send helper
* icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n
include/linux/icmpv6.h
* icmp: introduce helper for nat'd source address in network device context
include/linux/icmpv6.h
include/net/icmp.h
net/ipv4/icmp.c
net/ipv6/ip6_icmp.c
dm era: only resize metadata in preresume
dm era: Reinitialize bitset cache before digesting a new writeset
dm era: Use correct value size in equality function of writeset tree
dm era: Fix bitset memory leaks
dm era: Verify the data block size hasn't changed
dm era: Recover committed writeset after crash
gfs2: Don't skip dlm unlock if glock has an lvb
sparc32: fix a user-triggerable oops in clear_user()
* f2fs: fix out-of-repair __setattr_copy()
fs/f2fs/file.c
* printk: fix deadlock when kernel panic
kernel/printk/printk_safe.c
gpio: pcf857x: Fix missing first interrupt
mmc: sdhci-esdhc-imx: fix kernel panic when remove module
* module: Ignore _GLOBAL_OFFSET_TABLE_ when warning for undefined symbols
kernel/module.c
libnvdimm/dimm: Avoid race between probe and available_slots_show()
usb: renesas_usbhs: Clear pipe running flag in usbhs_pkt_pop()
mm: hugetlb: fix a race between freeing and dissolving the page
* hugetlb: fix copy_huge_page_from_user contig page struct assumption
mm/memory.c
fs/affs: release old buffer head on error path
mtd: spi-nor: hisi-sfc: Put child node np on error path
watchdog: mei_wdt: request stop on unregister
* arm64: uprobe: Return EOPNOTSUPP for AARCH32 instruction probing
arch/arm64/kernel/probes/uprobes.c
floppy: reintroduce O_NDELAY fix
x86/reboot: Force all cpus to exit VMX root if VMX is supported
staging: rtl8188eu: Add Edimax EW-7811UN V2 to device table
drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue
* seccomp: Add missing return in non-void function
kernel/seccomp.c
crypto: sun4i-ss - handle BigEndian for cipher
crypto: sun4i-ss - checking sg length is not sufficient
btrfs: fix extent buffer leak on failure to copy root
btrfs: fix reloc root leak with 0 ref reloc roots on recovery
btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root
KEYS: trusted: Fix migratable=1 failing
tpm_tis: Fix check_locality for correct locality acquisition
ALSA: hda/realtek: modify EAPD in the ALC886
* usb: dwc3: gadget: Fix dep->interval for fullspeed interrupt
drivers/usb/dwc3/gadget.c
* usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1
drivers/usb/dwc3/gadget.c
USB: serial: mos7720: fix error code in mos7720_write()
USB: serial: mos7840: fix error code in mos7840_write()
usb: musb: Fix runtime PM race in musb_queue_resume_work
USB: serial: option: update interface mapping for ZTE P685M
Input: i8042 - add ASUS Zenbook Flip to noselftest list
Input: joydev - prevent potential read overflow in ioctl
* Input: xpad - add support for PowerA Enhanced Wired Controller for Xbox Series X|S
drivers/input/joystick/xpad.c
Input: raydium_ts_i2c - do not send zero length
HID: wacom: Ignore attempts to overwrite the touch_max value from HID
ACPI: configfs: add missing check after configfs_register_default_group()
ACPI: property: Fix fwnode string properties matching
* blk-settings: align max_sectors on "logical_block_size" boundary
block/blk-settings.c
* scsi: bnx2fc: Fix Kconfig warning & CNIC build errors
drivers/scsi/bnx2fc/Kconfig
* mm/rmap: fix potential pte_unmap on an not mapped pte
include/linux/rmap.h
i2c: brcmstb: Fix brcmstd_send_i2c_cmd condition
* arm64: Add missing ISB after invalidating TLB in __primary_switch
arch/arm64/kernel/head.S
mm/hugetlb: fix potential double free in hugetlb_register_node() error path
* mm/memory.c: fix potential pte_unmap_unlock pte error
mm/memory.c
ocfs2: fix a use after free on error
net/mlx4_core: Add missed mlx4_free_cmd_mailbox()
i40e: Fix overwriting flow control settings during driver loading
i40e: Fix flow for IPv6 next header (extension header)
* ext4: fix potential htree index checksum corruption
fs/ext4/namei.c
drm/msm/dsi: Correct io_start for MSM8994 (20nm PHY)
* PCI: Align checking of syscall user config accessors
drivers/pci/syscall.c
VMCI: Use set_page_dirty_lock() when unregistering guest memory
pwm: rockchip: rockchip_pwm_probe(): Remove superfluous clk_unprepare()
misc: eeprom_93xx46: Add module alias to avoid breaking support for non device tree users
misc: eeprom_93xx46: Fix module alias to enable module autoprobe
sparc64: only select COMPAT_BINFMT_ELF if BINFMT_ELF is set
Input: elo - fix an error code in elo_connect()
perf test: Fix unaligned access in sample parsing test
perf intel-pt: Fix missing CYC processing in PSB
spi: pxa2xx: Fix the controller numbering for Wildcat Point
powerpc/8xx: Fix software emulation interrupt
powerpc/pseries/dlpar: handle ibm, configure-connector delay status
mfd: wm831x-auxadc: Prevent use after free in wm831x_auxadc_read_irq()
spi: stm32: properly handle 0 byte transfer
RDMA/rxe: Fix coding error in rxe_recv.c
perf tools: Fix DSO filtering when not finding a map for a sampled address
* tracepoint: Do not fail unregistering a probe due to memory failure
kernel/tracepoint.c
* amba: Fix resource leak for drivers without .remove
drivers/amba/bus.c
ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores
mmc: usdhi6rol0: Fix a resource leak in the error handling path of the probe
powerpc/47x: Disable 256k page size
IB/umad: Return EIO in case of when device disassociated
auxdisplay: ht16k33: Fix refresh rate handling
isofs: release buffer head before return
spi: atmel: Put allocated master before return
* certs: Fix blacklist flag type confusion
include/linux/key.h
security/keys/key.c
regulator: axp20x: Fix reference cout leak
clocksource/drivers/mxs_timer: Add missing semicolon when DEBUG is defined
* rtc: s5m: select REGMAP_I2C
drivers/rtc/Kconfig
power: reset: at91-sama5d2_shdwc: fix wkupdbc mask
* of/fdt: Make sure no-map does not remove already reserved regions
drivers/of/fdt.c
* fdt: Properly handle "no-map" field in the memory region
drivers/of/fdt.c
mfd: bd9571mwv: Use devm_mfd_add_devices()
dmaengine: hsu: disable spurious interrupt
dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function
dmaengine: fsldma: Fix a resource leak in the remove function
* HID: core: detect and skip invalid inputs to snto32()
drivers/hid/hid-core.c
spi: cadence-quadspi: Abort read if dummy cycles required are too many
* quota: Fix memory leak when handling corrupted quota file
fs/quota/quota_v2.c
clk: meson: clk-pll: fix initializing the old rate (fallback) for a PLL
* capabilities: Don't allow writing ambiguous v3 file capabilities
security/commoncap.c
jffs2: fix use after free in jffs2_sum_write_data()
fs/jfs: fix potential integer overflow on shift of a int
* ima: Free IMA measurement buffer after kexec syscall
include/linux/kexec.h
ima: Free IMA measurement buffer on error
* crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key()
crypto/ecdh_helper.c
hwrng: timeriomem - Fix cooldown period calculation
btrfs: clarify error returns values in __load_free_space_cache
Drivers: hv: vmbus: Avoid use-after-free in vmbus_onoffer_rescind()
ata: ahci_brcm: Add back regulators management
* media: uvcvideo: Accept invalid bFormatIndex and bFrameIndex values
drivers/media/usb/uvc/uvc_v4l2.c
media: pxa_camera: declare variable when DEBUG is defined
media: cx25821: Fix a bug when reallocating some dma memory
media: qm1d1c0042: fix error return code in qm1d1c0042_init()
media: lmedm04: Fix misuse of comma
crypto: bcm - Rename struct device_private to bcm_device_private
ASoC: cs42l56: fix up error handling in probe
media: tm6000: Fix memleak in tm6000_start_stream
media: media/pci: Fix memleak in empress_init
media: vsp1: Fix an error handling path in the probe function
media: i2c: ov5670: Fix PIXEL_RATE minimum value
MIPS: lantiq: Explicitly compare LTQ_EBU_PCC_ISTAT against 0
MIPS: c-r4k: Fix section mismatch for loongson2_sc_init
crypto: sun4i-ss - fix kmap usage
gma500: clean up error handling in init
drm/gma500: Fix error return code in psb_driver_load()
* fbdev: aty: SPARC64 requires FB_ATY_CT
drivers/video/fbdev/Kconfig
net: mvneta: Remove per-cpu queue mapping for Armada 3700
net: amd-xgbe: Reset link when the link never comes back
net: amd-xgbe: Reset the PHY rx data path when mailbox command timeout
ibmvnic: skip send_request_unmap for timeout reset
b43: N-PHY: Fix the update of coef for the PHY revision >= 3case
mac80211: fix potential overflow when multiplying to u32 integers
xen/netback: fix spurious event detection for common event case
bnxt_en: reverse order of TX disable and carrier off
ath9k: fix data bus crash when setting nf_override via debugfs
* bpf_lru_list: Read double-checked variable once without lock
kernel/bpf/bpf_lru_list.c
ARM: s3c: fix fiq for clang IAS
arm64: dts: msm8916: Fix reserved and rfsa nodes unit address
staging: rtl8723bs: wifi_regd.c: Fix incorrect number of regulatory rules
usb: dwc2: Make "trimming xfer length" a debug message
usb: dwc2: Abort transaction after errors with unknown reason
usb: dwc2: Do not update data length if it is 0 on inbound transfers
ARM: dts: Configure missing thermal interrupt for 4430
* Bluetooth: Put HCI device if inquiry procedure interrupts
net/bluetooth/hci_core.c
* Bluetooth: drop HCI device reference before return
net/bluetooth/a2mp.c
usb: gadget: u_audio: Free requests only after callback
cpufreq: brcmstb-avs-cpufreq: Fix resource leaks in ->remove()
arm64: dts: exynos: correct PMIC interrupt trigger level on Espresso
arm64: dts: exynos: correct PMIC interrupt trigger level on TM2
ARM: dts: exynos: correct PMIC interrupt trigger level on Arndale Octa
ARM: dts: exynos: correct PMIC interrupt trigger level on Spring
ARM: dts: exynos: correct PMIC interrupt trigger level on Rinato
ARM: dts: exynos: correct PMIC interrupt trigger level on Monk
* Bluetooth: Fix initializing response id after clearing struct
net/bluetooth/a2mp.c
Bluetooth: btqcomsmd: Fix a resource leak in error handling paths in the probe function
* random: fix the RNDRESEEDCRNG ioctl
drivers/char/random.c
MIPS: vmlinux.lds.S: add missing PAGE_ALIGNED_DATA() section
kdb: Make memory allocations more robust
* vmlinux.lds.h: add DWARF v5 sections
include/asm-generic/vmlinux.lds.h
scripts/recordmcount.pl: support big endian for ARCH sh
cifs: Set CIFS_MOUNT_USE_PREFIX_PATH flag on setting cifs_sb->prepath.
NET: usb: qmi_wwan: Adding support for Cinterion MV31
arm64: tegra: Add power-domain for Tegra210 HDA
ntfs: check for valid standard information attribute
* usb: quirks: add quirk to start video capture on ELMO L-12F document camera reliable
drivers/usb/core/quirks.c
* HID: make arrays usage and value to be the same
drivers/hid/hid-core.c
Bug: 184596728
Change-Id: Ic17c2a90ae511d999a28d59bbececa78a5ae3704
Signed-off-by: Lucas Wei <lucaswei@google.com>
174 lines
4.4 KiB
C
174 lines
4.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* thread_info.h: common low-level thread information accessors
|
|
*
|
|
* Copyright (C) 2002 David Howells (dhowells@redhat.com)
|
|
* - Incorporating suggestions made by Linus Torvalds
|
|
*/
|
|
|
|
#ifndef _LINUX_THREAD_INFO_H
|
|
#define _LINUX_THREAD_INFO_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/bug.h>
|
|
#include <linux/restart_block.h>
|
|
#include <linux/errno.h>
|
|
|
|
#ifdef CONFIG_THREAD_INFO_IN_TASK
|
|
/*
|
|
* For CONFIG_THREAD_INFO_IN_TASK kernels we need <asm/current.h> for the
|
|
* definition of current, but for !CONFIG_THREAD_INFO_IN_TASK kernels,
|
|
* including <asm/current.h> can cause a circular dependency on some platforms.
|
|
*/
|
|
#include <asm/current.h>
|
|
#define current_thread_info() ((struct thread_info *)current)
|
|
#endif
|
|
|
|
#include <linux/bitops.h>
|
|
|
|
/*
|
|
* For per-arch arch_within_stack_frames() implementations, defined in
|
|
* asm/thread_info.h.
|
|
*/
|
|
enum {
|
|
BAD_STACK = -1,
|
|
NOT_STACK = 0,
|
|
GOOD_FRAME,
|
|
GOOD_STACK,
|
|
};
|
|
|
|
#include <asm/thread_info.h>
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#ifndef arch_set_restart_data
|
|
#define arch_set_restart_data(restart) do { } while (0)
|
|
#endif
|
|
|
|
static inline long set_restart_fn(struct restart_block *restart,
|
|
long (*fn)(struct restart_block *))
|
|
{
|
|
restart->fn = fn;
|
|
arch_set_restart_data(restart);
|
|
return -ERESTART_RESTARTBLOCK;
|
|
}
|
|
|
|
#ifndef THREAD_ALIGN
|
|
#define THREAD_ALIGN THREAD_SIZE
|
|
#endif
|
|
|
|
#define THREADINFO_GFP (GFP_KERNEL_ACCOUNT | __GFP_ZERO)
|
|
|
|
/*
|
|
* flag set/clear/test wrappers
|
|
* - pass TIF_xxxx constants to these functions
|
|
*/
|
|
|
|
static inline void set_ti_thread_flag(struct thread_info *ti, int flag)
|
|
{
|
|
set_bit(flag, (unsigned long *)&ti->flags);
|
|
}
|
|
|
|
static inline void clear_ti_thread_flag(struct thread_info *ti, int flag)
|
|
{
|
|
clear_bit(flag, (unsigned long *)&ti->flags);
|
|
}
|
|
|
|
static inline void update_ti_thread_flag(struct thread_info *ti, int flag,
|
|
bool value)
|
|
{
|
|
if (value)
|
|
set_ti_thread_flag(ti, flag);
|
|
else
|
|
clear_ti_thread_flag(ti, flag);
|
|
}
|
|
|
|
static inline int test_and_set_ti_thread_flag(struct thread_info *ti, int flag)
|
|
{
|
|
return test_and_set_bit(flag, (unsigned long *)&ti->flags);
|
|
}
|
|
|
|
static inline int test_and_clear_ti_thread_flag(struct thread_info *ti, int flag)
|
|
{
|
|
return test_and_clear_bit(flag, (unsigned long *)&ti->flags);
|
|
}
|
|
|
|
static inline int test_ti_thread_flag(struct thread_info *ti, int flag)
|
|
{
|
|
return test_bit(flag, (unsigned long *)&ti->flags);
|
|
}
|
|
|
|
#define set_thread_flag(flag) \
|
|
set_ti_thread_flag(current_thread_info(), flag)
|
|
#define clear_thread_flag(flag) \
|
|
clear_ti_thread_flag(current_thread_info(), flag)
|
|
#define update_thread_flag(flag, value) \
|
|
update_ti_thread_flag(current_thread_info(), flag, value)
|
|
#define test_and_set_thread_flag(flag) \
|
|
test_and_set_ti_thread_flag(current_thread_info(), flag)
|
|
#define test_and_clear_thread_flag(flag) \
|
|
test_and_clear_ti_thread_flag(current_thread_info(), flag)
|
|
#define test_thread_flag(flag) \
|
|
test_ti_thread_flag(current_thread_info(), flag)
|
|
|
|
#define tif_need_resched() test_thread_flag(TIF_NEED_RESCHED)
|
|
|
|
#ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES
|
|
static inline int arch_within_stack_frames(const void * const stack,
|
|
const void * const stackend,
|
|
const void *obj, unsigned long len)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
#ifdef CONFIG_HARDENED_USERCOPY
|
|
extern void __check_object_size(const void *ptr, unsigned long n,
|
|
bool to_user);
|
|
|
|
static __always_inline void check_object_size(const void *ptr, unsigned long n,
|
|
bool to_user)
|
|
{
|
|
if (!__builtin_constant_p(n))
|
|
__check_object_size(ptr, n, to_user);
|
|
}
|
|
#else
|
|
static inline void check_object_size(const void *ptr, unsigned long n,
|
|
bool to_user)
|
|
{ }
|
|
#endif /* CONFIG_HARDENED_USERCOPY */
|
|
|
|
extern void __compiletime_error("copy source size is too small")
|
|
__bad_copy_from(void);
|
|
extern void __compiletime_error("copy destination size is too small")
|
|
__bad_copy_to(void);
|
|
|
|
static inline void copy_overflow(int size, unsigned long count)
|
|
{
|
|
WARN(1, "Buffer overflow detected (%d < %lu)!\n", size, count);
|
|
}
|
|
|
|
static __always_inline bool
|
|
check_copy_size(const void *addr, size_t bytes, bool is_source)
|
|
{
|
|
int sz = __compiletime_object_size(addr);
|
|
if (unlikely(sz >= 0 && sz < bytes)) {
|
|
if (!__builtin_constant_p(bytes))
|
|
copy_overflow(sz, bytes);
|
|
else if (is_source)
|
|
__bad_copy_from();
|
|
else
|
|
__bad_copy_to();
|
|
return false;
|
|
}
|
|
check_object_size(addr, bytes, is_source);
|
|
return true;
|
|
}
|
|
|
|
#ifndef arch_setup_new_exec
|
|
static inline void arch_setup_new_exec(void) { }
|
|
#endif
|
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
#endif /* _LINUX_THREAD_INFO_H */
|