Skip to contentSkip to conversation

Linux 5.4.283

DISCUSSION Greg Kroah-Hartman 1 participant 2 messages Sep 4, 2024 Stable branch

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

I'm announcing the release of the 5.4.283 kernel.

All users of the 5.4 kernel series must upgrade.

The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/process/deprecated.rst                    |   20 
 Makefile                                                |    2 
 arch/arm64/kernel/acpi_numa.c                           |    2 
 arch/openrisc/kernel/setup.c                            |    6 
 arch/parisc/kernel/irq.c                                |    4 
 arch/powerpc/boot/simple_alloc.c                        |    7 
 arch/powerpc/sysdev/xics/icp-native.c                   |    2 
 arch/s390/include/asm/uv.h                              |    5 
 arch/x86/kernel/process.c                               |    5 
 drivers/ata/libata-core.c                               |    3 
 drivers/atm/idt77252.c                                  |    9 
 drivers/bluetooth/hci_ldisc.c                           |    3 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c                 |    8 
 drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c                 |    3 
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c                |    5 
 drivers/gpu/drm/lima/lima_gp.c                          |   12 
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h                 |   14 
 drivers/hid/hid-ids.h                                   |   10 
 drivers/hid/hid-microsoft.c                             |   11 
 drivers/hid/wacom_wac.c                                 |    4 
 drivers/i2c/busses/i2c-riic.c                           |    2 
 drivers/infiniband/hw/hfi1/chip.c                       |    5 
 drivers/input/input-mt.c                                |    3 
 drivers/irqchip/irq-gic-v3-its.c                        |    2 
 drivers/md/dm-clone-metadata.c                          |    5 
 drivers/md/dm-ioctl.c                                   |   22 -
 drivers/md/dm-mpath.c                                   |    9 
 drivers/md/dm-path-selector.h                           |    2 
 drivers/md/dm-queue-length.c                            |    2 
 drivers/md/dm-rq.c                                      |    4 
 drivers/md/dm-service-time.c                            |    2 
 drivers/md/dm.c                                         |   67 ++-
 drivers/md/md.c                                         |    5 
 drivers/md/persistent-data/dm-space-map-metadata.c      |    4 
 drivers/media/pci/cx23885/cx23885-video.c               |    8 
 drivers/media/pci/solo6x10/solo6x10-offsets.h           |   10 
 drivers/media/radio/radio-isa.c                         |    2 
 drivers/media/usb/uvc/uvc_video.c                       |   10 
 drivers/mmc/core/mmc_test.c                             |    9 
 drivers/mmc/host/dw_mmc.c                               |    8 
 drivers/net/dsa/mv88e6xxx/Makefile                      |    4 
 drivers/net/dsa/mv88e6xxx/global1.h                     |    1 
 drivers/net/dsa/mv88e6xxx/global1_atu.c                 |   87 +++-
 drivers/net/dsa/mv88e6xxx/global2.c                     |   13 
 drivers/net/dsa/mv88e6xxx/global2.h                     |   25 +
 drivers/net/dsa/mv88e6xxx/trace.c                       |    6 
 drivers/net/dsa/mv88e6xxx/trace.h                       |   66 +++
 drivers/net/dsa/vitesse-vsc73xx-core.c                  |    2 
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c       |    3 
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c         |    3 
 drivers/net/ethernet/i825xx/sun3_82586.c                |    2 
 drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c |    2 
 drivers/net/ethernet/xilinx/xilinx_axienet.h            |   34 -
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c       |  337 +++++++++++-----
 drivers/net/gtp.c                                       |    5 
 drivers/net/usb/r8152.c                                 |   73 ---
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c           |    2 
 drivers/net/wireless/marvell/mwifiex/cfg80211.c         |   32 +
 drivers/net/wireless/st/cw1200/txrx.c                   |    2 
 drivers/nfc/pn533/pn533.c                               |  210 +++++++++
 drivers/nfc/pn533/pn533.h                               |   19 
 drivers/nvme/host/core.c                                |    5 
 drivers/nvme/target/rdma.c                              |   16 
 drivers/nvme/target/tcp.c                               |    1 
 drivers/nvme/target/trace.c                             |    6 
 drivers/nvme/target/trace.h                             |   28 -
 drivers/pinctrl/pinctrl-single.c                        |    2 
 drivers/s390/block/dasd.c                               |   36 +
 drivers/s390/block/dasd_3990_erp.c                      |   10 
 drivers/s390/block/dasd_eckd.c                          |   55 +-
 drivers/s390/block/dasd_int.h                           |    2 
 drivers/s390/cio/idset.c                                |   12 
 drivers/scsi/aacraid/comminit.c                         |    2 
 drivers/scsi/lpfc/lpfc_sli.c                            |    2 
 drivers/scsi/scsi_transport_spi.c                       |    4 
 drivers/soc/qcom/cmd-db.c                               |    2 
 drivers/soundwire/stream.c                              |    8 
 drivers/ssb/main.c                                      |    2 
 drivers/staging/ks7010/ks7010_sdio.c                    |    4 
 drivers/usb/class/cdc-acm.c                             |    3 
 drivers/usb/core/sysfs.c                                |    1 
 drivers/usb/dwc3/core.c                                 |   21 
 drivers/usb/dwc3/dwc3-omap.c                            |    4 
 drivers/usb/dwc3/dwc3-st.c                              |   16 
 drivers/usb/gadget/udc/fsl_udc_core.c                   |    2 
 drivers/usb/host/xhci.c                                 |    8 
 drivers/usb/serial/option.c                             |    5 
 fs/binfmt_elf_fdpic.c                                   |    2 
 fs/binfmt_misc.c                                        |  216 +++++++---
 fs/btrfs/delayed-inode.c                                |    2 
 fs/btrfs/free-space-cache.c                             |    8 
 fs/btrfs/inode.c                                        |    9 
 fs/btrfs/qgroup.c                                       |    2 
 fs/btrfs/send.c                                         |    7 
 fs/ext4/extents.c                                       |    3 
 fs/ext4/mballoc.c                                       |    3 
 fs/f2fs/segment.c                                       |    5 
 fs/file.c                                               |   30 -
 fs/fuse/dev.c                                           |    6 
 fs/fuse/virtio_fs.c                                     |   10 
 fs/gfs2/inode.c                                         |    2 
 fs/inode.c                                              |   39 +
 fs/locks.c                                              |    4 
 fs/nfs/pnfs.c                                           |    8 
 fs/quota/dquot.c                                        |    5 
 include/linux/bitmap.h                                  |   20 
 include/linux/blkdev.h                                  |    2 
 include/linux/cpumask.h                                 |    2 
 include/linux/device-mapper.h                           |    2 
 include/linux/fs.h                                      |    5 
 include/linux/overflow.h                                |  115 +++--
 include/net/busy_poll.h                                 |    2 
 include/net/kcm.h                                       |    1 
 ipc/util.c                                              |   16 
 kernel/cgroup/cpuset.c                                  |   13 
 kernel/time/hrtimer.c                                   |    2 
 lib/math/prime_numbers.c                                |    2 
 lib/test_overflow.c                                     |   98 ++++
 mm/memcontrol.c                                         |    7 
 net/bluetooth/bnep/core.c                               |    3 
 net/bluetooth/hci_core.c                                |   58 +-
 net/bluetooth/mgmt.c                                    |    4 
 net/core/ethtool.c                                      |    3 
 net/core/net-sysfs.c                                    |    2 
 net/ipv6/ip6_output.c                                   |    2 
 net/iucv/iucv.c                                         |    3 
 net/kcm/kcmsock.c                                       |    4 
 net/netfilter/nft_counter.c                             |    5 
 net/rds/recv.c                                          |   13 
 net/sched/sch_netem.c                                   |   47 +-
 security/selinux/avc.c                                  |    2 
 sound/core/timer.c                                      |    2 
 sound/pci/hda/patch_realtek.c                           |    1 
 sound/usb/quirks-table.h                                |    1 
 tools/include/linux/align.h                             |   12 
 tools/include/linux/bitmap.h                            |    8 
 tools/testing/selftests/tc-testing/tdc.py               |    1 
 137 files changed, 1699 insertions(+), 621 deletions(-)

Al Viro (2):
fix bitmap corruption on close_range() with CLOSE_RANGE_UNSHARE memcg_write_event_control(): fix a user-triggerable oops

Aleksandr Mishin (1):
nfc: pn533: Add poll mod list filling check

Alex Deucher (1):
drm/amdkfd: don't allow mapping the MMIO HDP page with large pages

Alexander Gordeev (1):
s390/iucv: fix receive buffer virtual vs physical address confusion

Alexander Lobakin (4):
bitmap: introduce generic optimized bitmap_size() s390/cio: rename bitmap_size() -> idset_bitmap_size()
btrfs: rename bitmap_set_bits() -> btrfs_bitmap_set_bits()
tools: move alignment-related macros to new <linux/align.h>

Allison Henderson (1):
net:rds: Fix possible deadlock in rds_message_put

Andre Przywara (8):
net: axienet: Fix DMA descriptor cleanup path
net: axienet: Improve DMA error handling
net: axienet: Factor out TX descriptor chain cleanup
net: axienet: Check for DMA mapping errors
net: axienet: Drop MDIO interrupt registers from ethtools dump
net: axienet: Wrap DMA pointer writes to prepare for 64 bit
net: axienet: Upgrade descriptors to hold 64-bit addresses
net: axienet: Autodetect 64-bit DMA capability

Andreas Gruenbacher (1):
gfs2: setattr_chown: Add missing initialization

Andrew Lunn (3):
net: dsa: mv88e6xxx: global2: Expose ATU stats register
net: dsa: mv88e6xxx: global1_atu: Add helper for get next
net: dsa: mv8e6xxx: Fix stub function parameters

Aurelien Jarno (1):
media: solo6x10: replace max(a, min(b, c)) by clamp(b, a, c)

Baokun Li (2):
ext4: do not trim the group with corrupted block bitmap
ext4: set the type of max_zeroout to unsigned int to avoid overflow

Bas Nieuwenhuizen (1):
drm/amdgpu: Actually check flags for all context ops.

Ben Hutchings (1):
scsi: aacraid: Fix double-free on probe failure

Ben Whitten (1):
mmc: dw_mmc: allow biu and ciu clocks to defer

Chen Ridong (1):
cgroup/cpuset: Prevent UAF in proc_cpuset_show()

Chengfeng Ye (2):
staging: ks7010: disable bh on tx_dev_lock
IB/hfi1: Fix potential deadlock on &irq_src_lock and &dd->uctxt_lock

Christian Brauner (1):
binfmt_misc: cleanup on filesystem umount

Claudio Imbrenda (1):
s390/uv: Panic for set and remove shared access UVC errors

Cong Wang (1):
gtp: fix a potential NULL pointer dereference

Cosmin Ratiu (1):
net/mlx5e: Correctly report errors for ethtool rx flows

Dan Carpenter (2):
atm: idt77252: prevent use after free in dequeue_rx()
mmc: mmc_test: Fix NULL dereference on allocation failure

Daniel Wagner (1):
nvmet-trace: avoid dereferencing pointer too early

David Sterba (4):
btrfs: change BUG_ON to assertion when checking for delayed_node root
btrfs: handle invalid root reference found in may_destroy_subvol()
btrfs: send: handle unexpected data in header buffer in begin_cmd()
btrfs: delete pointless BUG_ON check on quota root in btrfs_qgroup_account_extent()

Dmitry Baryshkov (1):
drm/msm/dpu: don't play tricks with debug macros

Eric Dumazet (3):
gtp: pull network headers in gtp_dev_xmit()
ipv6: prevent UAF in ip6_send_skb()
net: busy-poll: use ktime_get_ns() instead of local_clock()

Erico Nunes (1):
drm/lima: set gp bus_stop bit before hard reset

Gabriel Krisman Bertazi (1):
dm mpath: pass IO start time to path selector

Greg Kroah-Hartman (1):

      Linux 5.4.283

Griffin Kroah-Hartman (1):
Bluetooth: MGMT: Add error handling to pair_device()

Guanrui Huang (1):
irqchip/gic-v3-its: Remove BUG_ON in its_vpe_irq_domain_alloc

Gustavo A. R. Silva (1):
overflow.h: Add flex_array_size() helper

Haibo Xu (1):
arm64: ACPI: NUMA: initialize all values of acpi_early_node_map to NUMA_NO_NODE

Hannes Reinecke (1):
nvmet-tcp: do not continue for invalid icreq

Hans J. Schultz (1):
net: dsa: mv88e6xxx: read FID when handling ATU violations

Hans Verkuil (2):
media: radio-isa: use dev_name to fill in bus_info
media: pci: cx23885: check cx23885_vdev_init() return

Helge Deller (1):
parisc: Use irq_enter_rcu() to fix warning at kernel/context_tracking.c:367

Ian Ray (1):
cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller

Jamie Bainbridge (1):
ethtool: check device is present when getting link settings

Jan Kara (1):
quota: Remove BUG_ON from dqget()

Jani Nikula (1):
drm/msm: use drm_debug_enabled() to check for debug categories

Jann Horn (1):
fuse: Initialize beyond-EOF page contents before setting uptodate

Jason Gerecke (1):
HID: wacom: Defer calculation of resolution until resolution_code is known

Jeff Johnson (1):
wifi: cw1200: Avoid processing an invalid TIM IE

Jesse Zhang (1):
drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc

Jie Wang (1):
net: hns3: fix a deadlock problem when config TC during resetting

Joseph Huang (1):
net: dsa: mv88e6xxx: Fix out-of-bound access

Juan José Arboleda (1):
ALSA: usb-audio: Support Yamaha P-125 quirk entry

Justin Tee (1):
scsi: lpfc: Initialize status local variable in lpfc_sli4_repost_sgl_list()

Kees Cook (3):
overflow: Implement size_t saturating arithmetic helpers net/sun3_82586: Avoid reading past buffer in debug output
x86: Increase brk randomness entropy for 64-bit systems

Keith Busch (1):
nvme: clear caller pointer on identify failure

Khazhismel Kumykov (1):
dm resume: don't return EINVAL when signalled

Krishna Kurapati (1):
usb: dwc3: core: Skip setting event buffers for host only controllers

Krzysztof Kozlowski (4):
soundwire: stream: fix programming slave ports for non-continous port maps
usb: dwc3: omap: add missing depopulate in probe error path
usb: dwc3: st: fix probed platform device ref count on probe error path
usb: dwc3: st: add missing depopulate in probe error path

Kuniyuki Iwashima (1):
kcm: Serialise kcm_sendmsg() for the same socket.

Kunwu Chan (1):
powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu

Lars Poeschel (2):
nfc: pn533: Add dev_up/dev_down hooks to phy_ops
nfc: pn533: Add autopoll capability

Lee, Chun-Yi (1):
Bluetooth: hci_ldisc: check HCI_UART_PROTO_READY flag in HCIUARTGETPROTO

Li Nan (1):
md: clean up invalid BUG_ON in md_ioctl

Li zeming (1):
powerpc/boot: Handle allocation failure in simple_realloc()

Long Li (1):
filelock: Correct the filelock owner in fcntl_setlk/fcntl_setlk64

Luiz Augusto von Dentz (4):
Bluetooth: bnep: Fix out-of-bound access
Bluetooth: Make use of __check_timeout on hci_sched_le
Bluetooth: hci_core: Fix not handling link timeouts propertly
Bluetooth: hci_core: Fix LE quote calculation

Ma Ke (1):
pinctrl: single: fix potential NULL dereference in pcs_get_function()

Mathias Nyman (1):
xhci: Fix Panther point NULL pointer deref at full-speed re-enumeration

Max Filippov (1):
fs: binfmt_elf_efpic: don't use missing interpreter's properties

Michael Ellerman (1):
powerpc/boot: Only free if realloc() succeeds

Mike Christie (1):
scsi: spi: Fix sshdr use

Mikulas Patocka (2):
dm persistent data: fix memory allocation failure dm suspend: return -ERESTARTSYS instead of -EINTR

Ming Lei (1):
dm: do not use waitqueue for request-based DM

Miri Korenblit (1):
wifi: iwlwifi: abort scan when rfkill on but device enabled

NeilBrown (1):
NFS: avoid infinite loop in pnfs_update_layout.

Niklas Cassel (1):
ata: libata-core: Fix null pointer dereference on error

Nikolay Kuratov (1):
cxgb4: add forgotten u64 ivlan cast before shift

Oreoluwa Babatunde (1):
openrisc: Call setup_memory() earlier in the init sequence

Parsa Poorshikhian (1):
ALSA: hda/realtek: Fix noise from speakers on Lenovo IdeaPad 3 15IAU7

Pawel Dembicki (1):
net: dsa: vsc73xx: pass value in phy_write operation

Phil Chang (1):
hrtimer: Prevent queuing of hrtimer without a function callback

Prashant Malani (1):
r8152: Factor out OOB link list waits

Radhey Shyam Pandey (1):
net: axienet: Fix register defines comment description

Rafael Aquini (1):
ipc: replace costly bailout check in sysvipc_find_ipc()

Rand Deeb (1):
ssb: Fix division by zero issue in ssb_calc_clock_rate

Ricardo Ribalda (1):
media: uvcvideo: Fix integer overflow calculating timestamp

Sagi Grimberg (1):
nvmet-rdma: fix possible bad dereference when freeing rsps

Sascha Hauer (1):
wifi: mwifiex: duplicate static structs used in driver instances

Sean Anderson (2):
net: xilinx: axienet: Always disable promiscuous mode
net: xilinx: axienet: Fix dangling multicast addresses

Sebastian Andrzej Siewior (1):
netfilter: nft_counter: Synchronize nft_counter_reset() against reader.

Selvarasu Ganesan (1):
usb: dwc3: core: Prevent USB core invalid event buffer address access

Siarhei Vishniakou (1):
HID: microsoft: Add rumble support to latest xbox controllers

Simon Horman (1):
tc-testing: don't access non-existent variable on exception

Stefan Haberland (1):
s390/dasd: fix error recovery leading to data corruption on ESE devices

Stefan Hajnoczi (1):
virtiofs: forbid newlines in tags

Stephen Hemminger (1):
netem: fix return value if duplicate enqueue fails

Takashi Iwai (1):
ALSA: timer: Relax start tick time check for slave timer elements

Tetsuo Handa (2):
block: use "unsigned long" for blk_validate_block_size().
Input: MT - limit max slots

Uwe Kleine-König (1):
usb: gadget: fsl: Increase size of name buffer for endpoints

Vladimir Oltean (1):
net: dsa: mv88e6xxx: replace ATU violation prints with trace points

Volodymyr Babchuk (1):
soc: qcom: cmd-db: Map shared memory as WC, not WB

Wolfram Sang (1):
i2c: riic: avoid potential division by zero

ZHANG Yuntian (1):
USB: serial: option: add MeiG Smart SRM825L

Zhen Lei (1):
selinux: fix potential counting error in avc_add_xperms_decision()

Zhiguo Niu (1):
f2fs: fix to do sanity check in update_sit_entry

Zhihao Cheng (1):
vfs: Don't evict inode under the inode lru traversing context

Zijun Hu (1):
usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes()

author maintainer
#1 lore raw
Documentation/process/deprecated.rst +17 -3
index 179f2a5625a0..95a3e7a40414 100644
@@ -48,6 +48,9 @@ Instead, the 2-factor form of the allocator should be used::
 
 	foo = kmalloc_array(count, size, GFP_KERNEL);
 
+Specifically, kmalloc() can be replaced with kmalloc_array(), and
+kzalloc() can be replaced with kcalloc().
+
 If no 2-factor form is available, the saturate-on-overflow helpers should
 be used::
 
@@ -63,9 +66,20 @@ Instead, use the helper::
 
 	header = kzalloc(struct_size(header, item, count), GFP_KERNEL);
 
-See :c:func:`array_size`, :c:func:`array3_size`, and :c:func:`struct_size`,
-for more details as well as the related :c:func:`check_add_overflow` and
-:c:func:`check_mul_overflow` family of functions.
+For other calculations, please compose the use of the size_mul(),
+size_add(), and size_sub() helpers. For example, in the case of::
+
+	foo = krealloc(current_size + chunk_size * (count - 3), GFP_KERNEL);
+
+Instead, use the helpers::
+
+	foo = krealloc(size_add(current_size,
+				size_mul(chunk_size,
+					 size_sub(count, 3))), GFP_KERNEL);
+
+For more details, also see array3_size() and flex_array_size(),
+as well as the related check_mul_overflow(), check_add_overflow(),
+check_sub_overflow(), and check_shl_overflow() family of functions.
 
 simple_strtol(), simple_strtoll(), simple_strtoul(), simple_strtoull()
 ----------------------------------------------------------------------
Makefile +1 -1
index 4e9e7945fef4..362e593d630f 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 5
 PATCHLEVEL = 4
-SUBLEVEL = 282
+SUBLEVEL = 283
 EXTRAVERSION =
 NAME = Kleptomaniac Octopus
 
arch/arm64/kernel/acpi_numa.c +1 -1
index 7ff800045434..048b75cadd2f 100644
@@ -27,7 +27,7 @@
 
 #include <asm/numa.h>
 
-static int acpi_early_node_map[NR_CPUS] __initdata = { NUMA_NO_NODE };
+static int acpi_early_node_map[NR_CPUS] __initdata = { [0 ... NR_CPUS - 1] = NUMA_NO_NODE };
 
 int __init acpi_numa_get_nid(unsigned int cpu)
 {
arch/openrisc/kernel/setup.c +3 -3
index ae104eb4becc..bd0ba3157d51 100644
@@ -280,6 +280,9 @@ void calibrate_delay(void)
 
 void __init setup_arch(char **cmdline_p)
 {
+	/* setup memblock allocator */
+	setup_memory();
+
 	unflatten_and_copy_device_tree();
 
 	setup_cpuinfo();
@@ -304,9 +307,6 @@ void __init setup_arch(char **cmdline_p)
 	initrd_below_start_ok = 1;
 #endif
 
-	/* setup memblock allocator */
-	setup_memory();
-
 	/* paging_init() sets up the MMU and marks all pages as reserved */
 	paging_init();
 
arch/parisc/kernel/irq.c +2 -2
index b4aa5af943ba..c4c06bcd0483 100644
@@ -520,7 +520,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
 
 	old_regs = set_irq_regs(regs);
 	local_irq_disable();
-	irq_enter();
+	irq_enter_rcu();
 
 	eirr_val = mfctl(23) & cpu_eiem & per_cpu(local_ack_eiem, cpu);
 	if (!eirr_val)
@@ -555,7 +555,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
 #endif /* CONFIG_IRQSTACKS */
 
  out:
-	irq_exit();
+	irq_exit_rcu();
 	set_irq_regs(old_regs);
 	return;
 
arch/powerpc/boot/simple_alloc.c +5 -2
index 65ec135d0157..bc99f75b8582 100644
@@ -114,8 +114,11 @@ static void *simple_realloc(void *ptr, unsigned long size)
 		return ptr;
 
 	new = simple_malloc(size);
-	memcpy(new, ptr, p->size);
-	simple_free(ptr);
+	if (new) {
+		memcpy(new, ptr, p->size);
+		simple_free(ptr);
+	}
+
 	return new;
 }
 
arch/powerpc/sysdev/xics/icp-native.c +2 -0
index 7d13d2ef5a90..66de291b27d0 100644
@@ -235,6 +235,8 @@ static int __init icp_native_map_one_cpu(int hw_id, unsigned long addr,
 	rname = kasprintf(GFP_KERNEL, "CPU %d [0x%x] Interrupt Presentation",
 			  cpu, hw_id);
 
+	if (!rname)
+		return -ENOMEM;
 	if (!request_mem_region(addr, size, rname)) {
 		pr_warn("icp_native: Could not reserve ICP MMIO for CPU %d, interrupt server #0x%x\n",
 			cpu, hw_id);
arch/s390/include/asm/uv.h +4 -1
index ef3c00b049ab..67f63b76dc18 100644
@@ -97,7 +97,10 @@ static inline int share(unsigned long addr, u16 cmd)
 
 	if (!uv_call(0, (u64)&uvcb))
 		return 0;
-	return -EINVAL;
+	pr_err("%s UVC failed (rc: 0x%x, rrc: 0x%x), possible hypervisor bug.\n",
+	       uvcb.header.cmd == UVC_CMD_SET_SHARED_ACCESS ? "Share" : "Unshare",
+	       uvcb.header.rc, uvcb.header.rrc);
+	panic("System security cannot be guaranteed unless the system panics now.\n");
 }
 
 /*
arch/x86/kernel/process.c +4 -1
index b8de27bb6e09..c402b079b74e 100644
@@ -793,7 +793,10 @@ unsigned long arch_align_stack(unsigned long sp)
 
 unsigned long arch_randomize_brk(struct mm_struct *mm)
 {
-	return randomize_page(mm->brk, 0x02000000);
+	if (mmap_is_ia32())
+		return randomize_page(mm->brk, SZ_32M);
+
+	return randomize_page(mm->brk, SZ_1G);
 }
 
 /*
drivers/ata/libata-core.c +3 -0
index d1d279107a72..2ee0ee2b4752 100644
@@ -6141,6 +6141,9 @@ static void ata_host_release(struct kref *kref)
 	for (i = 0; i < host->n_ports; i++) {
 		struct ata_port *ap = host->ports[i];
 
+		if (!ap)
+			continue;
+
 		kfree(ap->pmp_link);
 		kfree(ap->slave_link);
 		kfree(ap);
drivers/atm/idt77252.c +5 -4
index 605e992d25df..06e2fea1ffa9 100644
@@ -1117,8 +1117,8 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
 	rpp->len += skb->len;
 
 	if (stat & SAR_RSQE_EPDU) {
+		unsigned int len, truesize;
 		unsigned char *l1l2;
-		unsigned int len;
 
 		l1l2 = (unsigned char *) ((unsigned long) skb->data + skb->len - 6);
 
@@ -1188,14 +1188,15 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe)
 		ATM_SKB(skb)->vcc = vcc;
 		__net_timestamp(skb);
 
+		truesize = skb->truesize;
 		vcc->push(vcc, skb);
 		atomic_inc(&vcc->stats->rx);
 
-		if (skb->truesize > SAR_FB_SIZE_3)
+		if (truesize > SAR_FB_SIZE_3)
 			add_rx_skb(card, 3, SAR_FB_SIZE_3, 1);
-		else if (skb->truesize > SAR_FB_SIZE_2)
+		else if (truesize > SAR_FB_SIZE_2)
 			add_rx_skb(card, 2, SAR_FB_SIZE_2, 1);
-		else if (skb->truesize > SAR_FB_SIZE_1)
+		else if (truesize > SAR_FB_SIZE_1)
 			add_rx_skb(card, 1, SAR_FB_SIZE_1, 1);
 		else
 			add_rx_skb(card, 0, SAR_FB_SIZE_0, 1);
drivers/bluetooth/hci_ldisc.c +2 -1
index 8be4d807d137..600c88fc3145 100644
@@ -765,7 +765,8 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file *file,
 		break;
 
 	case HCIUARTGETPROTO:
-		if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
+		if (test_bit(HCI_UART_PROTO_SET, &hu->flags) &&
+		    test_bit(HCI_UART_PROTO_READY, &hu->flags))
 			err = hu->proto->id;
 		else
 			err = -EUNATCH;
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +8 -0
index 39ca0718ced0..863c3a14d309 100644
@@ -401,16 +401,24 @@ int amdgpu_ctx_ioctl(struct drm_device *dev, void *data,
 
 	switch (args->in.op) {
 	case AMDGPU_CTX_OP_ALLOC_CTX:
+		if (args->in.flags)
+			return -EINVAL;
 		r = amdgpu_ctx_alloc(adev, fpriv, filp, priority, &id);
 		args->out.alloc.ctx_id = id;
 		break;
 	case AMDGPU_CTX_OP_FREE_CTX:
+		if (args->in.flags)
+			return -EINVAL;
 		r = amdgpu_ctx_free(fpriv, id);
 		break;
 	case AMDGPU_CTX_OP_QUERY_STATE:
+		if (args->in.flags)
+			return -EINVAL;
 		r = amdgpu_ctx_query(adev, fpriv, id, &args->out);
 		break;
 	case AMDGPU_CTX_OP_QUERY_STATE2:
+		if (args->in.flags)
+			return -EINVAL;
 		r = amdgpu_ctx_query2(adev, fpriv, id, &args->out);
 		break;
 	default:
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +2 -1
index 65044b1b3d4c..eac1997844e6 100644
@@ -715,7 +715,8 @@ int amdgpu_vce_ring_parse_cs(struct amdgpu_cs_parser *p, uint32_t ib_idx)
 	uint32_t created = 0;
 	uint32_t allocated = 0;
 	uint32_t tmp, handle = 0;
-	uint32_t *size = &tmp;
+	uint32_t dummy = 0xffffffff;
+	uint32_t *size = &dummy;
 	unsigned idx;
 	int i, r = 0;
 
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +4 -1
index 990ffc0eeb6b..b99e6b2e0aca 100644
@@ -1278,7 +1278,7 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep,
 		if (args->size != PAGE_SIZE)
 			return -EINVAL;
 		offset = amdgpu_amdkfd_get_mmio_remap_phys_addr(dev->kgd);
-		if (!offset)
+		if (!offset || (PAGE_SIZE > 4096))
 			return -ENOMEM;
 	}
 
@@ -1872,6 +1872,9 @@ static int kfd_mmio_mmap(struct kfd_dev *dev, struct kfd_process *process,
 	if (vma->vm_end - vma->vm_start != PAGE_SIZE)
 		return -EINVAL;
 
+	if (PAGE_SIZE > 4096)
+		return -EINVAL;
+
 	address = amdgpu_amdkfd_get_mmio_remap_phys_addr(dev->kgd);
 
 	vma->vm_flags |= VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_NORESERVE |
drivers/gpu/drm/lima/lima_gp.c +12 -0
index 3fca560087c9..4bf216cb3303 100644
@@ -138,6 +138,11 @@ static void lima_gp_task_run(struct lima_sched_pipe *pipe,
 	gp_write(LIMA_GP_CMD, cmd);
 }
 
+static int lima_gp_bus_stop_poll(struct lima_ip *ip)
+{
+	return !!(gp_read(LIMA_GP_STATUS) & LIMA_GP_STATUS_BUS_STOPPED);
+}
+
 static int lima_gp_hard_reset_poll(struct lima_ip *ip)
 {
 	gp_write(LIMA_GP_PERF_CNT_0_LIMIT, 0xC01A0000);
@@ -151,6 +156,13 @@ static int lima_gp_hard_reset(struct lima_ip *ip)
 
 	gp_write(LIMA_GP_PERF_CNT_0_LIMIT, 0xC0FFE000);
 	gp_write(LIMA_GP_INT_MASK, 0);
+
+	gp_write(LIMA_GP_CMD, LIMA_GP_CMD_STOP_BUS);
+	ret = lima_poll_timeout(ip, lima_gp_bus_stop_poll, 10, 100);
+	if (ret) {
+		dev_err(dev->dev, "%s bus stop timeout\n", lima_ip_name(ip));
+		return ret;
+	}
 	gp_write(LIMA_GP_CMD, LIMA_GP_CMD_RESET);
 	ret = lima_poll_timeout(ip, lima_gp_hard_reset_poll, 10, 100);
 	if (ret) {
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +2 -12
index 6a4813505c33..c1b9a0500fa2 100644
@@ -30,24 +30,14 @@
  * @fmt: Pointer to format string
  */
 #define DPU_DEBUG(fmt, ...)                                                \
-	do {                                                               \
-		if (unlikely(drm_debug & DRM_UT_KMS))                      \
-			DRM_DEBUG(fmt, ##__VA_ARGS__); \
-		else                                                       \
-			pr_debug(fmt, ##__VA_ARGS__);                      \
-	} while (0)
+	DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
 
 /**
  * DPU_DEBUG_DRIVER - macro for hardware driver logging
  * @fmt: Pointer to format string
  */
 #define DPU_DEBUG_DRIVER(fmt, ...)                                         \
-	do {                                                               \
-		if (unlikely(drm_debug & DRM_UT_DRIVER))                   \
-			DRM_ERROR(fmt, ##__VA_ARGS__); \
-		else                                                       \
-			pr_debug(fmt, ##__VA_ARGS__);                      \
-	} while (0)
+	DRM_DEBUG_DRIVER(fmt, ##__VA_ARGS__)
 
 #define DPU_ERROR(fmt, ...) pr_err("[dpu error]" fmt, ##__VA_ARGS__)
 #define DPU_ERROR_RATELIMITED(fmt, ...) pr_err_ratelimited("[dpu error]" fmt, ##__VA_ARGS__)
drivers/hid/hid-ids.h +9 -1
index 839430b48755..6fbb2a387460 100644
@@ -866,7 +866,15 @@
 #define USB_DEVICE_ID_MS_TYPE_COVER_2    0x07a9
 #define USB_DEVICE_ID_MS_POWER_COVER     0x07da
 #define USB_DEVICE_ID_MS_SURFACE3_COVER		0x07de
-#define USB_DEVICE_ID_MS_XBOX_ONE_S_CONTROLLER	0x02fd
+/*
+ * For a description of the Xbox controller models, refer to:
+ * https://en.wikipedia.org/wiki/Xbox_Wireless_Controller#Summary
+ */
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708	0x02fd
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708_BLE	0x0b20
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1914	0x0b13
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797	0x0b05
+#define USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797_BLE	0x0b22
 #define USB_DEVICE_ID_MS_PIXART_MOUSE    0x00cb
 #define USB_DEVICE_ID_8BITDO_SN30_PRO_PLUS      0x02e0
 #define USB_DEVICE_ID_MS_MOUSE_0783      0x0783
drivers/hid/hid-microsoft.c +10 -1
index 8cb1ca1936e4..c0e93f7f3307 100644
@@ -449,7 +449,16 @@ static const struct hid_device_id ms_devices[] = {
 		.driver_data = MS_PRESENTER },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, 0x091B),
 		.driver_data = MS_SURFACE_DIAL },
-	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S_CONTROLLER),
+
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708),
+		.driver_data = MS_QUIRK_FF },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1708_BLE),
+		.driver_data = MS_QUIRK_FF },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1914),
+		.driver_data = MS_QUIRK_FF },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797),
+		.driver_data = MS_QUIRK_FF },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_CONTROLLER_MODEL_1797_BLE),
 		.driver_data = MS_QUIRK_FF },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_8BITDO_SN30_PRO_PLUS),
 		.driver_data = MS_QUIRK_FF },
drivers/hid/wacom_wac.c +3 -1
index 62a7a1c9a02f..e083e21fe742 100644
@@ -1920,12 +1920,14 @@ static void wacom_map_usage(struct input_dev *input, struct hid_usage *usage,
 	int fmax = field->logical_maximum;
 	unsigned int equivalent_usage = wacom_equivalent_usage(usage->hid);
 	int resolution_code = code;
-	int resolution = hidinput_calc_abs_res(field, resolution_code);
+	int resolution;
 
 	if (equivalent_usage == HID_DG_TWIST) {
 		resolution_code = ABS_RZ;
 	}
 
+	resolution = hidinput_calc_abs_res(field, resolution_code);
+
 	if (equivalent_usage == HID_GD_X) {
 		fmin += features->offset_left;
 		fmax -= features->offset_right;
drivers/i2c/busses/i2c-riic.c +1 -1
index 800414886f6b..588a3efb09c2 100644
@@ -312,7 +312,7 @@ static int riic_init_hw(struct riic_dev *riic, struct i2c_timings *t)
 	 * frequency with only 62 clock ticks max (31 high, 31 low).
 	 * Aim for a duty of 60% LOW, 40% HIGH.
 	 */
-	total_ticks = DIV_ROUND_UP(rate, t->bus_freq_hz);
+	total_ticks = DIV_ROUND_UP(rate, t->bus_freq_hz ?: 1);
 
 	for (cks = 0; cks < 7; cks++) {
 		/*
drivers/infiniband/hw/hfi1/chip.c +3 -2
index 65d6bf34614c..6cf87fcfc4eb 100644
@@ -13067,15 +13067,16 @@ static void read_mod_write(struct hfi1_devdata *dd, u16 src, u64 bits,
 {
 	u64 reg;
 	u16 idx = src / BITS_PER_REGISTER;
+	unsigned long flags;
 
-	spin_lock(&dd->irq_src_lock);
+	spin_lock_irqsave(&dd->irq_src_lock, flags);
 	reg = read_csr(dd, CCE_INT_MASK + (8 * idx));
 	if (set)
 		reg |= bits;
 	else
 		reg &= ~bits;
 	write_csr(dd, CCE_INT_MASK + (8 * idx), reg);
-	spin_unlock(&dd->irq_src_lock);
+	spin_unlock_irqrestore(&dd->irq_src_lock, flags);
 }
 
 /**
drivers/input/input-mt.c +3 -0
index a81e14148407..dd457403a1a0 100644
@@ -45,6 +45,9 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots,
 		return 0;
 	if (mt)
 		return mt->num_slots != num_slots ? -EINVAL : 0;
+	/* Arbitrary limit for avoiding too large memory allocation. */
+	if (num_slots > 1024)
+		return -EINVAL;
 
 	mt = kzalloc(struct_size(mt, slots, num_slots), GFP_KERNEL);
 	if (!mt)
drivers/irqchip/irq-gic-v3-its.c +0 -2
index d16776c6dee7..ae3378ef469b 100644
@@ -3085,8 +3085,6 @@ static int its_vpe_irq_domain_alloc(struct irq_domain *domain, unsigned int virq
 	struct page *vprop_page;
 	int base, nr_ids, i, err = 0;
 
-	BUG_ON(!vm);
-
 	bitmap = its_lpi_alloc(roundup_pow_of_two(nr_irqs), &base, &nr_ids);
 	if (!bitmap)
 		return -ENOMEM;
drivers/md/dm-clone-metadata.c +0 -5
index 17712456fa63..383258eae750 100644
@@ -471,11 +471,6 @@ static void __destroy_persistent_data_structures(struct dm_clone_metadata *cmd)
 
 /*---------------------------------------------------------------------------*/
 
-static size_t bitmap_size(unsigned long nr_bits)
-{
-	return BITS_TO_LONGS(nr_bits) * sizeof(long);
-}
-
 static int __dirty_map_init(struct dirty_map *dmap, unsigned long nr_words,
 			    unsigned long nr_regions)
 {
drivers/md/dm-ioctl.c +20 -2
index e89e710dd292..83727fa05c16 100644
@@ -1064,8 +1064,26 @@ static int do_resume(struct dm_ioctl *param)
 			suspend_flags &= ~DM_SUSPEND_LOCKFS_FLAG;
 		if (param->flags & DM_NOFLUSH_FLAG)
 			suspend_flags |= DM_SUSPEND_NOFLUSH_FLAG;
-		if (!dm_suspended_md(md))
-			dm_suspend(md, suspend_flags);
+		if (!dm_suspended_md(md)) {
+			r = dm_suspend(md, suspend_flags);
+			if (r) {
+				down_write(&_hash_lock);
+				hc = dm_get_mdptr(md);
+				if (hc && !hc->new_map) {
+					hc->new_map = new_map;
+					new_map = NULL;
+				} else {
+					r = -ENXIO;
+				}
+				up_write(&_hash_lock);
+				if (new_map) {
+					dm_sync_table(md);
+					dm_table_destroy(new_map);
+				}
+				dm_put(md);
+				return r;
+			}
+		}
 
 		old_map = dm_swap_table(md, new_map);
 		if (IS_ERR(old_map)) {
drivers/md/dm-mpath.c +6 -3
index 54ecfea2cf47..4f6a54452b1c 100644
@@ -558,7 +558,8 @@ static void multipath_release_clone(struct request *clone,
 		if (pgpath && pgpath->pg->ps.type->end_io)
 			pgpath->pg->ps.type->end_io(&pgpath->pg->ps,
 						    &pgpath->path,
-						    mpio->nr_bytes);
+						    mpio->nr_bytes,
+						    clone->io_start_time_ns);
 	}
 
 	blk_put_request(clone);
@@ -1568,7 +1569,8 @@ static int multipath_end_io(struct dm_target *ti, struct request *clone,
 		struct path_selector *ps = &pgpath->pg->ps;
 
 		if (ps->type->end_io)
-			ps->type->end_io(ps, &pgpath->path, mpio->nr_bytes);
+			ps->type->end_io(ps, &pgpath->path, mpio->nr_bytes,
+					 clone->io_start_time_ns);
 	}
 
 	return r;
@@ -1612,7 +1614,8 @@ static int multipath_end_io_bio(struct dm_target *ti, struct bio *clone,
 		struct path_selector *ps = &pgpath->pg->ps;
 
 		if (ps->type->end_io)
-			ps->type->end_io(ps, &pgpath->path, mpio->nr_bytes);
+			ps->type->end_io(ps, &pgpath->path, mpio->nr_bytes,
+					 dm_start_time_ns_from_clone(clone));
 	}
 
 	return r;
drivers/md/dm-path-selector.h +1 -1
index b6eb5365b1a4..c47bc0e20275 100644
@@ -74,7 +74,7 @@ struct path_selector_type {
 	int (*start_io) (struct path_selector *ps, struct dm_path *path,
 			 size_t nr_bytes);
 	int (*end_io) (struct path_selector *ps, struct dm_path *path,
-		       size_t nr_bytes);
+		       size_t nr_bytes, u64 start_time);
 };
 
 /* Register a path selector */
drivers/md/dm-queue-length.c +1 -1
index 969c4f1a3633..5fd018d18418 100644
@@ -227,7 +227,7 @@ static int ql_start_io(struct path_selector *ps, struct dm_path *path,
 }
 
 static int ql_end_io(struct path_selector *ps, struct dm_path *path,
-		     size_t nr_bytes)
+		     size_t nr_bytes, u64 start_time)
 {
 	struct path_info *pi = path->pscontext;
 
drivers/md/dm-rq.c +0 -4
index 6bc61927d320..3d6ac63ee85a 100644
@@ -143,10 +143,6 @@ static void rq_end_stats(struct mapped_device *md, struct request *orig)
  */
 static void rq_completed(struct mapped_device *md)
 {
-	/* nudge anyone waiting on suspend queue */
-	if (unlikely(wq_has_sleeper(&md->wait)))
-		wake_up(&md->wait);
-
 	/*
 	 * dm_put() must be at the end of this function. See the comment above
 	 */
drivers/md/dm-service-time.c +1 -1
index f006a9005593..9cfda665e9eb 100644
@@ -309,7 +309,7 @@ static int st_start_io(struct path_selector *ps, struct dm_path *path,
 }
 
 static int st_end_io(struct path_selector *ps, struct dm_path *path,
-		     size_t nr_bytes)
+		     size_t nr_bytes, u64 start_time)
 {
 	struct path_info *pi = path->pscontext;
 
drivers/md/dm.c +45 -22

97 lines not on this page · raw message

drivers/md/md.c +0 -5
index 61c3e8df1b55..e5f3010debb8 100644
@@ -7396,11 +7396,6 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
 
 	mddev = bdev->bd_disk->private_data;
 
-	if (!mddev) {
-		BUG();
-		goto out;
-	}
-
 	/* Some actions do not requires the mutex */
 	switch (cmd) {
 	case GET_ARRAY_INFO:
drivers/md/persistent-data/dm-space-map-metadata.c +2 -2
index da439ac85796..25ce7fb7fd9d 100644
@@ -275,7 +275,7 @@ static void sm_metadata_destroy(struct dm_space_map *sm)
 {
 	struct sm_metadata *smm = container_of(sm, struct sm_metadata, sm);
 
-	kfree(smm);
+	kvfree(smm);
 }
 
 static int sm_metadata_get_nr_blocks(struct dm_space_map *sm, dm_block_t *count)
@@ -759,7 +759,7 @@ struct dm_space_map *dm_sm_metadata_init(void)
 {
 	struct sm_metadata *smm;
 
-	smm = kmalloc(sizeof(*smm), GFP_KERNEL);
+	smm = kvmalloc(sizeof(*smm), GFP_KERNEL);
 	if (!smm)
 		return ERR_PTR(-ENOMEM);
 
drivers/media/pci/cx23885/cx23885-video.c +8 -0
index 90224a994702..e4e295067a7e 100644
@@ -1299,6 +1299,10 @@ int cx23885_video_register(struct cx23885_dev *dev)
 	/* register Video device */
 	dev->video_dev = cx23885_vdev_init(dev, dev->pci,
 		&cx23885_video_template, "video");
+	if (!dev->video_dev) {
+		err = -ENOMEM;
+		goto fail_unreg;
+	}
 	dev->video_dev->queue = &dev->vb2_vidq;
 	dev->video_dev->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
 				      V4L2_CAP_AUDIO | V4L2_CAP_VIDEO_CAPTURE;
@@ -1317,6 +1321,10 @@ int cx23885_video_register(struct cx23885_dev *dev)
 	/* register VBI device */
 	dev->vbi_dev = cx23885_vdev_init(dev, dev->pci,
 		&cx23885_vbi_template, "vbi");
+	if (!dev->vbi_dev) {
+		err = -ENOMEM;
+		goto fail_unreg;
+	}
 	dev->vbi_dev->queue = &dev->vb2_vbiq;
 	dev->vbi_dev->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
 				    V4L2_CAP_AUDIO | V4L2_CAP_VBI_CAPTURE;
drivers/media/pci/solo6x10/solo6x10-offsets.h +5 -5
index e3ae6a02dbb9..244837395f02 100644
@@ -57,16 +57,16 @@
 #define SOLO_MP4E_EXT_ADDR(__solo) \
 	(SOLO_EREF_EXT_ADDR(__solo) + SOLO_EREF_EXT_AREA(__solo))
 #define SOLO_MP4E_EXT_SIZE(__solo) \
-	max((__solo->nr_chans * 0x00080000),				\
-	    min(((__solo->sdram_size - SOLO_MP4E_EXT_ADDR(__solo)) -	\
-		 __SOLO_JPEG_MIN_SIZE(__solo)), 0x00ff0000))
+	clamp(__solo->sdram_size - SOLO_MP4E_EXT_ADDR(__solo) -	\
+	      __SOLO_JPEG_MIN_SIZE(__solo),			\
+	      __solo->nr_chans * 0x00080000, 0x00ff0000)
 
 #define __SOLO_JPEG_MIN_SIZE(__solo)		(__solo->nr_chans * 0x00080000)
 #define SOLO_JPEG_EXT_ADDR(__solo) \
 		(SOLO_MP4E_EXT_ADDR(__solo) + SOLO_MP4E_EXT_SIZE(__solo))
 #define SOLO_JPEG_EXT_SIZE(__solo) \
-	max(__SOLO_JPEG_MIN_SIZE(__solo),				\
-	    min((__solo->sdram_size - SOLO_JPEG_EXT_ADDR(__solo)), 0x00ff0000))
+	clamp(__solo->sdram_size - SOLO_JPEG_EXT_ADDR(__solo),	\
+	      __SOLO_JPEG_MIN_SIZE(__solo), 0x00ff0000)
 
 #define SOLO_SDRAM_END(__solo) \
 	(SOLO_JPEG_EXT_ADDR(__solo) + SOLO_JPEG_EXT_SIZE(__solo))
drivers/media/radio/radio-isa.c +1 -1
index ad2ac16ff12d..610d3e326951 100644
@@ -36,7 +36,7 @@ static int radio_isa_querycap(struct file *file, void  *priv,
 
 	strscpy(v->driver, isa->drv->driver.driver.name, sizeof(v->driver));
 	strscpy(v->card, isa->drv->card, sizeof(v->card));
-	snprintf(v->bus_info, sizeof(v->bus_info), "ISA:%s", isa->v4l2_dev.name);
+	snprintf(v->bus_info, sizeof(v->bus_info), "ISA:%s", dev_name(isa->v4l2_dev.dev));
 	return 0;
 }
 
drivers/media/usb/uvc/uvc_video.c +5 -5
index 8a8271e23c63..e62afdee20db 100644
@@ -723,11 +723,11 @@ void uvc_video_clock_update(struct uvc_streaming *stream,
 	unsigned long flags;
 	u64 timestamp;
 	u32 delta_stc;
-	u32 y1, y2;
+	u32 y1;
 	u32 x1, x2;
 	u32 mean;
 	u32 sof;
-	u64 y;
+	u64 y, y2;
 
 	if (!uvc_hw_timestamps_param)
 		return;
@@ -767,7 +767,7 @@ void uvc_video_clock_update(struct uvc_streaming *stream,
 	sof = y;
 
 	uvc_trace(UVC_TRACE_CLOCK, "%s: PTS %u y %llu.%06llu SOF %u.%06llu "
-		  "(x1 %u x2 %u y1 %u y2 %u SOF offset %u)\n",
+		  "(x1 %u x2 %u y1 %u y2 %llu SOF offset %u)\n",
 		  stream->dev->name, buf->pts,
 		  y >> 16, div_u64((y & 0xffff) * 1000000, 65536),
 		  sof >> 16, div_u64(((u64)sof & 0xffff) * 1000000LLU, 65536),
@@ -782,7 +782,7 @@ void uvc_video_clock_update(struct uvc_streaming *stream,
 		goto done;
 
 	y1 = NSEC_PER_SEC;
-	y2 = (u32)ktime_to_ns(ktime_sub(last->host_time, first->host_time)) + y1;
+	y2 = ktime_to_ns(ktime_sub(last->host_time, first->host_time)) + y1;
 
 	/* Interpolated and host SOF timestamps can wrap around at slightly
 	 * different times. Handle this by adding or removing 2048 to or from
@@ -802,7 +802,7 @@ void uvc_video_clock_update(struct uvc_streaming *stream,
 	timestamp = ktime_to_ns(first->host_time) + y - y1;
 
 	uvc_trace(UVC_TRACE_CLOCK, "%s: SOF %u.%06llu y %llu ts %llu "
-		  "buf ts %llu (x1 %u/%u/%u x2 %u/%u/%u y1 %u y2 %u)\n",
+		  "buf ts %llu (x1 %u/%u/%u x2 %u/%u/%u y1 %u y2 %llu)\n",
 		  stream->dev->name,
 		  sof >> 16, div_u64(((u64)sof & 0xffff) * 1000000LLU, 65536),
 		  y, timestamp, vbuf->vb2_buf.timestamp,
drivers/mmc/core/mmc_test.c +5 -4
index cd64e0f23ae5..8fcaec5544ff 100644
@@ -3097,13 +3097,13 @@ static ssize_t mtf_test_write(struct file *file, const char __user *buf,
 	test->buffer = kzalloc(BUFFER_SIZE, GFP_KERNEL);
 #ifdef CONFIG_HIGHMEM
 	test->highmem = alloc_pages(GFP_KERNEL | __GFP_HIGHMEM, BUFFER_ORDER);
+	if (!test->highmem) {
+		count = -ENOMEM;
+		goto free_test_buffer;
+	}
 #endif
 
-#ifdef CONFIG_HIGHMEM
-	if (test->buffer && test->highmem) {
-#else
 	if (test->buffer) {
-#endif
 		mutex_lock(&mmc_test_lock);
 		mmc_test_run(test, testcase);
 		mutex_unlock(&mmc_test_lock);
@@ -3111,6 +3111,7 @@ static ssize_t mtf_test_write(struct file *file, const char __user *buf,
 
 #ifdef CONFIG_HIGHMEM
 	__free_pages(test->highmem, BUFFER_ORDER);
+free_test_buffer:
 #endif
 	kfree(test->buffer);
 	kfree(test);
drivers/mmc/host/dw_mmc.c +8 -0
index ba37be8e423c..78e20327828a 100644
@@ -3179,6 +3179,10 @@ int dw_mci_probe(struct dw_mci *host)
 	host->biu_clk = devm_clk_get(host->dev, "biu");
 	if (IS_ERR(host->biu_clk)) {
 		dev_dbg(host->dev, "biu clock not available\n");
+		ret = PTR_ERR(host->biu_clk);
+		if (ret == -EPROBE_DEFER)
+			return ret;
+
 	} else {
 		ret = clk_prepare_enable(host->biu_clk);
 		if (ret) {
@@ -3190,6 +3194,10 @@ int dw_mci_probe(struct dw_mci *host)
 	host->ciu_clk = devm_clk_get(host->dev, "ciu");
 	if (IS_ERR(host->ciu_clk)) {
 		dev_dbg(host->dev, "ciu clock not available\n");
+		ret = PTR_ERR(host->ciu_clk);
+		if (ret == -EPROBE_DEFER)
+			goto err_clk_biu;
+
 		host->bus_hz = host->pdata->bus_hz;
 	} else {
 		ret = clk_prepare_enable(host->ciu_clk);
drivers/net/dsa/mv88e6xxx/Makefile +4 -0
index aa645ff86f64..2347d56c7155 100644
@@ -14,3 +14,7 @@ mv88e6xxx-objs += port_hidden.o
 mv88e6xxx-$(CONFIG_NET_DSA_MV88E6XXX_PTP) += ptp.o
 mv88e6xxx-objs += serdes.o
 mv88e6xxx-objs += smi.o
+mv88e6xxx-objs += trace.o
+
+# for tracing framework to find trace.h
+CFLAGS_trace.o := -I$(src)
drivers/net/dsa/mv88e6xxx/global1.h +1 -0
index 0ae96a1e919b..dc44e197817a 100644
@@ -339,5 +339,6 @@ int mv88e6390_g1_vtu_loadpurge(struct mv88e6xxx_chip *chip,
 int mv88e6xxx_g1_vtu_flush(struct mv88e6xxx_chip *chip);
 int mv88e6xxx_g1_vtu_prob_irq_setup(struct mv88e6xxx_chip *chip);
 void mv88e6xxx_g1_vtu_prob_irq_free(struct mv88e6xxx_chip *chip);
+int mv88e6xxx_g1_atu_get_next(struct mv88e6xxx_chip *chip, u16 fid);
 
 #endif /* _MV88E6XXX_GLOBAL1_H */
drivers/net/dsa/mv88e6xxx/global1_atu.c +72 -15

134 lines not on this page · raw message

drivers/net/dsa/mv88e6xxx/global2.c +13 -0
index 7674b0b8cc70..4d4bd4a16281 100644
@@ -280,6 +280,19 @@ int mv88e6xxx_g2_set_switch_mac(struct mv88e6xxx_chip *chip, u8 *addr)
 	return err;
 }
 
+/* Offset 0x0E: ATU Statistics */
+
+int mv88e6xxx_g2_atu_stats_set(struct mv88e6xxx_chip *chip, u16 kind, u16 bin)
+{
+	return mv88e6xxx_g2_write(chip, MV88E6XXX_G2_ATU_STATS,
+				  kind | bin);
+}
+
+int mv88e6xxx_g2_atu_stats_get(struct mv88e6xxx_chip *chip, u16 *stats)
+{
+	return mv88e6xxx_g2_read(chip, MV88E6XXX_G2_ATU_STATS, stats);
+}
+
 /* Offset 0x0F: Priority Override Table */
 
 static int mv88e6xxx_g2_pot_write(struct mv88e6xxx_chip *chip, int pointer,
drivers/net/dsa/mv88e6xxx/global2.h +24 -1
index 12807e52ecea..de63e3f08e5c 100644
@@ -113,7 +113,16 @@
 #define MV88E6XXX_G2_SWITCH_MAC_DATA_MASK	0x00ff
 
 /* Offset 0x0E: ATU Stats Register */
-#define MV88E6XXX_G2_ATU_STATS		0x0e
+#define MV88E6XXX_G2_ATU_STATS				0x0e
+#define MV88E6XXX_G2_ATU_STATS_BIN_0			(0x0 << 14)
+#define MV88E6XXX_G2_ATU_STATS_BIN_1			(0x1 << 14)
+#define MV88E6XXX_G2_ATU_STATS_BIN_2			(0x2 << 14)
+#define MV88E6XXX_G2_ATU_STATS_BIN_3			(0x3 << 14)
+#define MV88E6XXX_G2_ATU_STATS_MODE_ALL			(0x0 << 12)
+#define MV88E6XXX_G2_ATU_STATS_MODE_ALL_DYNAMIC		(0x1 << 12)
+#define MV88E6XXX_G2_ATU_STATS_MODE_FID_ALL		(0x2 << 12)
+#define MV88E6XXX_G2_ATU_STATS_MODE_FID_ALL_DYNAMIC	(0x3 << 12)
+#define MV88E6XXX_G2_ATU_STATS_MASK			0x0fff
 
 /* Offset 0x0F: Priority Override Table */
 #define MV88E6XXX_G2_PRIO_OVERRIDE		0x0f
@@ -354,6 +363,8 @@ extern const struct mv88e6xxx_gpio_ops mv88e6352_gpio_ops;
 
 int mv88e6xxx_g2_scratch_gpio_set_smi(struct mv88e6xxx_chip *chip,
 				      bool external);
+int mv88e6xxx_g2_atu_stats_set(struct mv88e6xxx_chip *chip, u16 kind, u16 bin);
+int mv88e6xxx_g2_atu_stats_get(struct mv88e6xxx_chip *chip, u16 *stats);
 
 #else /* !CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 */
 
@@ -516,6 +527,18 @@ static inline int mv88e6xxx_g2_device_mapping_write(struct mv88e6xxx_chip *chip,
 	return -EOPNOTSUPP;
 }
 
+static inline int mv88e6xxx_g2_atu_stats_set(struct mv88e6xxx_chip *chip,
+					     u16 kind, u16 bin)
+{
+	return -EOPNOTSUPP;
+}
+
+static inline int mv88e6xxx_g2_atu_stats_get(struct mv88e6xxx_chip *chip,
+					     u16 *stats)
+{
+	return -EOPNOTSUPP;
+}
+
 #endif /* CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 */
 
 #endif /* _MV88E6XXX_GLOBAL2_H */
drivers/net/dsa/mv88e6xxx/trace.c new file +6 -0
new file mode 100644
index 000000000000..7833cb50ca5d
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/* Copyright 2022 NXP
+ */
+
+#define CREATE_TRACE_POINTS
+#include "trace.h"
drivers/net/dsa/mv88e6xxx/trace.h new file +66 -0

66 lines not on this page · raw message

drivers/net/dsa/vitesse-vsc73xx-core.c +1 -1
index c7ff98c26ee3..a1dd82d25ce3 100644
@@ -531,7 +531,7 @@ static int vsc73xx_phy_write(struct dsa_switch *ds, int phy, int regnum,
 		return 0;
 	}
 
-	cmd = (phy << 21) | (regnum << 16);
+	cmd = (phy << 21) | (regnum << 16) | val;
 	ret = vsc73xx_write(vsc, VSC73XX_BLOCK_MII, 0, 1, cmd);
 	if (ret)
 		return ret;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +2 -1
index 44f86a33ef62..75ed4723070f 100644
@@ -969,7 +969,8 @@ static u64 hash_filter_ntuple(struct ch_filter_specification *fs,
 	 * in the Compressed Filter Tuple.
 	 */
 	if (tp->vlan_shift >= 0 && fs->mask.ivlan)
-		ntuple |= (FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift;
+		ntuple |= (u64)(FT_VLAN_VLD_F |
+				fs->val.ivlan) << tp->vlan_shift;
 
 	if (tp->port_shift >= 0 && fs->mask.iport)
 		ntuple |= (u64)fs->val.iport << tp->port_shift;
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +3 -0
index d09cc10b3517..8736e254f098 100644
@@ -4388,6 +4388,9 @@ static int hns3_reset_notify_uninit_enet(struct hnae3_handle *handle)
 	struct hns3_nic_priv *priv = netdev_priv(netdev);
 	int ret;
 
+	if (!test_bit(HNS3_NIC_STATE_DOWN, &priv->state))
+		hns3_nic_net_stop(netdev);
+
 	if (!test_and_clear_bit(HNS3_NIC_STATE_INITED, &priv->state)) {
 		netdev_warn(netdev, "already uninitialized\n");
 		return 0;
drivers/net/ethernet/i825xx/sun3_82586.c +1 -1
index 1a86184d44c0..e0c9fee4e1e6 100644
@@ -990,7 +990,7 @@ static void sun3_82586_timeout(struct net_device *dev)
 	{
 #ifdef DEBUG
 		printk("%s: xmitter timed out, try to restart! stat: %02x\n",dev->name,p->scb->cus);
-		printk("%s: command-stats: %04x %04x\n",dev->name,swab16(p->xmit_cmds[0]->cmd_status),swab16(p->xmit_cmds[1]->cmd_status));
+		printk("%s: command-stats: %04x\n", dev->name, swab16(p->xmit_cmds[0]->cmd_status));
 		printk("%s: check, whether you set the right interrupt number!\n",dev->name);
 #endif
 		sun3_82586_close(dev);
drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c +1 -1
index acd946f2ddbe..be49a2a53f29 100644
@@ -676,7 +676,7 @@ mlx5e_ethtool_flow_replace(struct mlx5e_priv *priv,
 	if (num_tuples <= 0) {
 		netdev_warn(priv->netdev, "%s: flow is not valid %d\n",
 			    __func__, num_tuples);
-		return num_tuples;
+		return num_tuples < 0 ? num_tuples : -EINVAL;
 	}
 
 	eth_ft = get_flow_table(priv, fs, num_tuples);
drivers/net/ethernet/xilinx/xilinx_axienet.h +15 -19
index 04e51af32178..c43d437f22bd 100644
@@ -159,22 +159,17 @@
 #define XAE_RCW1_OFFSET		0x00000404 /* Rx Configuration Word 1 */
 #define XAE_TC_OFFSET		0x00000408 /* Tx Configuration */
 #define XAE_FCC_OFFSET		0x0000040C /* Flow Control Configuration */
-#define XAE_EMMC_OFFSET		0x00000410 /* EMAC mode configuration */
-#define XAE_PHYC_OFFSET		0x00000414 /* RGMII/SGMII configuration */
-#define XAE_MDIO_MC_OFFSET	0x00000500 /* MII Management Config */
-#define XAE_MDIO_MCR_OFFSET	0x00000504 /* MII Management Control */
-#define XAE_MDIO_MWD_OFFSET	0x00000508 /* MII Management Write Data */
-#define XAE_MDIO_MRD_OFFSET	0x0000050C /* MII Management Read Data */
-#define XAE_MDIO_MIS_OFFSET	0x00000600 /* MII Management Interrupt Status */
-/* MII Mgmt Interrupt Pending register offset */
-#define XAE_MDIO_MIP_OFFSET	0x00000620
-/* MII Management Interrupt Enable register offset */
-#define XAE_MDIO_MIE_OFFSET	0x00000640
-/* MII Management Interrupt Clear register offset. */
-#define XAE_MDIO_MIC_OFFSET	0x00000660
+#define XAE_EMMC_OFFSET		0x00000410 /* MAC speed configuration */
+#define XAE_PHYC_OFFSET		0x00000414 /* RX Max Frame Configuration */
+#define XAE_ID_OFFSET		0x000004F8 /* Identification register */
+#define XAE_MDIO_MC_OFFSET	0x00000500 /* MDIO Setup */
+#define XAE_MDIO_MCR_OFFSET	0x00000504 /* MDIO Control */
+#define XAE_MDIO_MWD_OFFSET	0x00000508 /* MDIO Write Data */
+#define XAE_MDIO_MRD_OFFSET	0x0000050C /* MDIO Read Data */
 #define XAE_UAW0_OFFSET		0x00000700 /* Unicast address word 0 */
 #define XAE_UAW1_OFFSET		0x00000704 /* Unicast address word 1 */
-#define XAE_FMI_OFFSET		0x00000708 /* Filter Mask Index */
+#define XAE_FMI_OFFSET		0x00000708 /* Frame Filter Control */
+#define XAE_FFE_OFFSET		0x0000070C /* Frame Filter Enable */
 #define XAE_AF0_OFFSET		0x00000710 /* Address Filter 0 */
 #define XAE_AF1_OFFSET		0x00000714 /* Address Filter 1 */
 
@@ -313,7 +308,7 @@
  */
 #define XAE_UAW1_UNICASTADDR_MASK	0x0000FFFF
 
-/* Bit masks for Axi Ethernet FMI register */
+/* Bit masks for Axi Ethernet FMC register */
 #define XAE_FMI_PM_MASK			0x80000000 /* Promis. mode enable */
 #define XAE_FMI_IND_MASK		0x00000003 /* Index Mask */
 
@@ -335,6 +330,7 @@
 #define XAE_FEATURE_PARTIAL_TX_CSUM	(1 << 1)
 #define XAE_FEATURE_FULL_RX_CSUM	(1 << 2)
 #define XAE_FEATURE_FULL_TX_CSUM	(1 << 3)
+#define XAE_FEATURE_DMA_64BIT		(1 << 4)
 
 #define XAE_NO_CSUM_OFFLOAD		0
 
@@ -347,9 +343,9 @@
 /**
  * struct axidma_bd - Axi Dma buffer descriptor layout
  * @next:         MM2S/S2MM Next Descriptor Pointer
- * @reserved1:    Reserved and not used
+ * @next_msb:     MM2S/S2MM Next Descriptor Pointer (high 32 bits)
  * @phys:         MM2S/S2MM Buffer Address
- * @reserved2:    Reserved and not used
+ * @phys_msb:     MM2S/S2MM Buffer Address (high 32 bits)
  * @reserved3:    Reserved and not used
  * @reserved4:    Reserved and not used
  * @cntrl:        MM2S/S2MM Control value
@@ -362,9 +358,9 @@
  */
 struct axidma_bd {
 	u32 next;	/* Physical address of next buffer descriptor */
-	u32 reserved1;
+	u32 next_msb;	/* high 32 bits for IP >= v7.1, reserved on older IP */
 	u32 phys;
-	u32 reserved2;
+	u32 phys_msb;	/* for IP >= v7.1, reserved for older IP */
 	u32 reserved3;
 	u32 reserved4;
 	u32 cntrl;
drivers/net/ethernet/xilinx/xilinx_axienet_main.c +243 -94

532 lines not on this page · raw message

drivers/net/gtp.c +4 -1
index 0d6d2fe9eabd..c868f4ffa240 100644
@@ -573,6 +573,9 @@ static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (skb_cow_head(skb, dev->needed_headroom))
 		goto tx_err;
 
+	if (!pskb_inet_may_pull(skb))
+		goto tx_err;
+
 	skb_reset_inner_headers(skb);
 
 	/* PDP context lookups in gtp_build_skb_*() need rcu read-side lock. */
@@ -804,7 +807,7 @@ static struct sock *gtp_encap_enable_socket(int fd, int type,
 	sock = sockfd_lookup(fd, &err);
 	if (!sock) {
 		pr_debug("gtp socket fd=%d not found\n", fd);
-		return NULL;
+		return ERR_PTR(err);
 	}
 
 	sk = sock->sk;
drivers/net/usb/r8152.c +21 -52

145 lines not on this page · raw message

drivers/net/wireless/intel/iwlwifi/mvm/scan.c +1 -1
index 3a58267d3d71..3bce3b59a12b 100644
@@ -2140,7 +2140,7 @@ int iwl_mvm_scan_stop(struct iwl_mvm *mvm, int type, bool notify)
 	if (!(mvm->scan_status & type))
 		return 0;
 
-	if (iwl_mvm_is_radio_killed(mvm)) {
+	if (!test_bit(STATUS_DEVICE_ENABLED, &mvm->trans->status)) {
 		ret = 0;
 		goto out;
 	}
drivers/net/wireless/marvell/mwifiex/cfg80211.c +26 -6
index f0f966cecc3a..e40f727547ec 100644
@@ -4319,11 +4319,27 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
 	if (ISSUPP_ADHOC_ENABLED(adapter->fw_cap_info))
 		wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC);
 
-	wiphy->bands[NL80211_BAND_2GHZ] = &mwifiex_band_2ghz;
-	if (adapter->config_bands & BAND_A)
-		wiphy->bands[NL80211_BAND_5GHZ] = &mwifiex_band_5ghz;
-	else
+	wiphy->bands[NL80211_BAND_2GHZ] = devm_kmemdup(adapter->dev,
+						       &mwifiex_band_2ghz,
+						       sizeof(mwifiex_band_2ghz),
+						       GFP_KERNEL);
+	if (!wiphy->bands[NL80211_BAND_2GHZ]) {
+		ret = -ENOMEM;
+		goto err;
+	}
+
+	if (adapter->config_bands & BAND_A) {
+		wiphy->bands[NL80211_BAND_5GHZ] = devm_kmemdup(adapter->dev,
+							       &mwifiex_band_5ghz,
+							       sizeof(mwifiex_band_5ghz),
+							       GFP_KERNEL);
+		if (!wiphy->bands[NL80211_BAND_5GHZ]) {
+			ret = -ENOMEM;
+			goto err;
+		}
+	} else {
 		wiphy->bands[NL80211_BAND_5GHZ] = NULL;
+	}
 
 	if (adapter->drcs_enabled && ISSUPP_DRCS_ENABLED(adapter->fw_cap_info))
 		wiphy->iface_combinations = &mwifiex_iface_comb_ap_sta_drcs;
@@ -4411,8 +4427,7 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
 	if (ret < 0) {
 		mwifiex_dbg(adapter, ERROR,
 			    "%s: wiphy_register failed: %d\n", __func__, ret);
-		wiphy_free(wiphy);
-		return ret;
+		goto err;
 	}
 
 	if (!adapter->regd) {
@@ -4454,4 +4469,9 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
 
 	adapter->wiphy = wiphy;
 	return ret;
+
+err:
+	wiphy_free(wiphy);
+
+	return ret;
 }
drivers/net/wireless/st/cw1200/txrx.c +1 -1
index 2dfcdb145944..31f5b2d8f519 100644
@@ -1170,7 +1170,7 @@ void cw1200_rx_cb(struct cw1200_common *priv,
 		size_t ies_len = skb->len - (ies - (u8 *)(skb->data));
 
 		tim_ie = cfg80211_find_ie(WLAN_EID_TIM, ies, ies_len);
-		if (tim_ie) {
+		if (tim_ie && tim_ie[1] >= sizeof(struct ieee80211_tim_ie)) {
 			struct ieee80211_tim_ie *tim =
 				(struct ieee80211_tim_ie *)&tim_ie[2];
 
drivers/nfc/pn533/pn533.c +207 -3

260 lines not on this page · raw message

drivers/nfc/pn533/pn533.h +15 -4
index 8bf9d6ece0f5..f9256e5485ac 100644
@@ -6,10 +6,11 @@
  * Copyright (C) 2012-2013 Tieto Poland
  */
 
-#define PN533_DEVICE_STD     0x1
-#define PN533_DEVICE_PASORI  0x2
-#define PN533_DEVICE_ACR122U 0x3
-#define PN533_DEVICE_PN532   0x4
+#define PN533_DEVICE_STD		0x1
+#define PN533_DEVICE_PASORI		0x2
+#define PN533_DEVICE_ACR122U		0x3
+#define PN533_DEVICE_PN532		0x4
+#define PN533_DEVICE_PN532_AUTOPOLL	0x5
 
 #define PN533_ALL_PROTOCOLS (NFC_PROTO_JEWEL_MASK | NFC_PROTO_MIFARE_MASK |\
 			     NFC_PROTO_FELICA_MASK | NFC_PROTO_ISO14443_MASK |\
@@ -70,6 +71,7 @@
 #define PN533_CMD_IN_ATR 0x50
 #define PN533_CMD_IN_RELEASE 0x52
 #define PN533_CMD_IN_JUMP_FOR_DEP 0x56
+#define PN533_CMD_IN_AUTOPOLL 0x60
 
 #define PN533_CMD_TG_INIT_AS_TARGET 0x8c
 #define PN533_CMD_TG_GET_DATA 0x86
@@ -207,6 +209,15 @@ struct pn533_phy_ops {
 			  struct sk_buff *out);
 	int (*send_ack)(struct pn533 *dev, gfp_t flags);
 	void (*abort_cmd)(struct pn533 *priv, gfp_t flags);
+	/*
+	 * dev_up and dev_down are optional.
+	 * They are used to inform the phy layer that the nfc chip
+	 * is going to be really used very soon. The phy layer can then
+	 * bring up it's interface to the chip and have it suspended for power
+	 * saving reasons otherwise.
+	 */
+	void (*dev_up)(struct pn533 *priv);
+	void (*dev_down)(struct pn533 *priv);
 };
 
 
drivers/nvme/host/core.c +4 -1
index 9144ed14b074..0676637e1eab 100644
@@ -1080,8 +1080,10 @@ static int nvme_identify_ctrl(struct nvme_ctrl *dev, struct nvme_id_ctrl **id)
 
 	error = nvme_submit_sync_cmd(dev->admin_q, &c, *id,
 			sizeof(struct nvme_id_ctrl));
-	if (error)
+	if (error) {
 		kfree(*id);
+		*id = NULL;
+	}
 	return error;
 }
 
@@ -1193,6 +1195,7 @@ static int nvme_identify_ns(struct nvme_ctrl *ctrl,
 	if (error) {
 		dev_warn(ctrl->device, "Identify namespace failed (%d)\n", error);
 		kfree(*id);
+		*id = NULL;
 	}
 
 	return error;
drivers/nvme/target/rdma.c +4 -12
index 50e2007092bc..ae41b6001c7e 100644
@@ -428,12 +428,8 @@ nvmet_rdma_alloc_rsps(struct nvmet_rdma_queue *queue)
 	return 0;
 
 out_free:
-	while (--i >= 0) {
-		struct nvmet_rdma_rsp *rsp = &queue->rsps[i];
-
-		list_del(&rsp->free_list);
-		nvmet_rdma_free_rsp(ndev, rsp);
-	}
+	while (--i >= 0)
+		nvmet_rdma_free_rsp(ndev, &queue->rsps[i]);
 	kfree(queue->rsps);
 out:
 	return ret;
@@ -444,12 +440,8 @@ static void nvmet_rdma_free_rsps(struct nvmet_rdma_queue *queue)
 	struct nvmet_rdma_device *ndev = queue->dev;
 	int i, nr_rsps = queue->recv_queue_size * 2;
 
-	for (i = 0; i < nr_rsps; i++) {
-		struct nvmet_rdma_rsp *rsp = &queue->rsps[i];
-
-		list_del(&rsp->free_list);
-		nvmet_rdma_free_rsp(ndev, rsp);
-	}
+	for (i = 0; i < nr_rsps; i++)
+		nvmet_rdma_free_rsp(ndev, &queue->rsps[i]);
 	kfree(queue->rsps);
 }
 
drivers/nvme/target/tcp.c +1 -0
index d40bd57537ba..fa6e7fbf356e 100644
@@ -792,6 +792,7 @@ static int nvmet_tcp_handle_icreq(struct nvmet_tcp_queue *queue)
 		pr_err("bad nvme-tcp pdu length (%d)\n",
 			le32_to_cpu(icreq->hdr.plen));
 		nvmet_tcp_fatal_error(queue);
+		return -EPROTO;
 	}
 
 	if (icreq->pfv != NVME_TCP_PFV_1_0) {
drivers/nvme/target/trace.c +3 -3
index 1373a3c67962..a3564e12927b 100644
@@ -195,7 +195,7 @@ const char *nvmet_trace_disk_name(struct trace_seq *p, char *name)
 	return ret;
 }
 
-const char *nvmet_trace_ctrl_name(struct trace_seq *p, struct nvmet_ctrl *ctrl)
+const char *nvmet_trace_ctrl_id(struct trace_seq *p, u16 ctrl_id)
 {
 	const char *ret = trace_seq_buffer_ptr(p);
 
@@ -208,8 +208,8 @@ const char *nvmet_trace_ctrl_name(struct trace_seq *p, struct nvmet_ctrl *ctrl)
 	 * If we can know the extra data of the connect command in this stage,
 	 * we can update this print statement later.
 	 */
-	if (ctrl)
-		trace_seq_printf(p, "%d", ctrl->cntlid);
+	if (ctrl_id)
+		trace_seq_printf(p, "%d", ctrl_id);
 	else
 		trace_seq_printf(p, "_");
 	trace_seq_putc(p, 0);
drivers/nvme/target/trace.h +17 -11
index 3f61b6657175..5b00a338d52c 100644
@@ -32,18 +32,24 @@ const char *nvmet_trace_parse_fabrics_cmd(struct trace_seq *p, u8 fctype,
 	 nvmet_trace_parse_nvm_cmd(p, opcode, cdw10) :			\
 	 nvmet_trace_parse_admin_cmd(p, opcode, cdw10)))
 
-const char *nvmet_trace_ctrl_name(struct trace_seq *p, struct nvmet_ctrl *ctrl);
-#define __print_ctrl_name(ctrl)				\
-	nvmet_trace_ctrl_name(p, ctrl)
+const char *nvmet_trace_ctrl_id(struct trace_seq *p, u16 ctrl_id);
+#define __print_ctrl_id(ctrl_id)			\
+	nvmet_trace_ctrl_id(p, ctrl_id)
 
 const char *nvmet_trace_disk_name(struct trace_seq *p, char *name);
 #define __print_disk_name(name)				\
 	nvmet_trace_disk_name(p, name)
 
 #ifndef TRACE_HEADER_MULTI_READ
-static inline struct nvmet_ctrl *nvmet_req_to_ctrl(struct nvmet_req *req)
+static inline u16 nvmet_req_to_ctrl_id(struct nvmet_req *req)
 {
-	return req->sq->ctrl;
+	/*
+	 * The queue and controller pointers are not valid until an association
+	 * has been established.
+	 */
+	if (!req->sq || !req->sq->ctrl)
+		return 0;
+	return req->sq->ctrl->cntlid;
 }
 
 static inline void __assign_req_name(char *name, struct nvmet_req *req)
@@ -60,7 +66,7 @@ TRACE_EVENT(nvmet_req_init,
 	TP_ARGS(req, cmd),
 	TP_STRUCT__entry(
 		__field(struct nvme_command *, cmd)
-		__field(struct nvmet_ctrl *, ctrl)
+		__field(u16, ctrl_id)
 		__array(char, disk, DISK_NAME_LEN)
 		__field(int, qid)
 		__field(u16, cid)
@@ -73,7 +79,7 @@ TRACE_EVENT(nvmet_req_init,
 	),
 	TP_fast_assign(
 		__entry->cmd = cmd;
-		__entry->ctrl = nvmet_req_to_ctrl(req);
+		__entry->ctrl_id = nvmet_req_to_ctrl_id(req);
 		__assign_req_name(__entry->disk, req);
 		__entry->qid = req->sq->qid;
 		__entry->cid = cmd->common.command_id;
@@ -87,7 +93,7 @@ TRACE_EVENT(nvmet_req_init,
 	),
 	TP_printk("nvmet%s: %sqid=%d, cmdid=%u, nsid=%u, flags=%#x, "
 		  "meta=%#llx, cmd=(%s, %s)",
-		__print_ctrl_name(__entry->ctrl),
+		__print_ctrl_id(__entry->ctrl_id),
 		__print_disk_name(__entry->disk),
 		__entry->qid, __entry->cid, __entry->nsid,
 		__entry->flags, __entry->metadata,
@@ -101,7 +107,7 @@ TRACE_EVENT(nvmet_req_complete,
 	TP_PROTO(struct nvmet_req *req),
 	TP_ARGS(req),
 	TP_STRUCT__entry(
-		__field(struct nvmet_ctrl *, ctrl)
+		__field(u16, ctrl_id)
 		__array(char, disk, DISK_NAME_LEN)
 		__field(int, qid)
 		__field(int, cid)
@@ -109,7 +115,7 @@ TRACE_EVENT(nvmet_req_complete,
 		__field(u16, status)
 	),
 	TP_fast_assign(
-		__entry->ctrl = nvmet_req_to_ctrl(req);
+		__entry->ctrl_id = nvmet_req_to_ctrl_id(req);
 		__entry->qid = req->cq->qid;
 		__entry->cid = req->cqe->command_id;
 		__entry->result = le64_to_cpu(req->cqe->result.u64);
@@ -117,7 +123,7 @@ TRACE_EVENT(nvmet_req_complete,
 		__assign_req_name(__entry->disk, req);
 	),
 	TP_printk("nvmet%s: %sqid=%d, cmdid=%u, res=%#llx, status=%#x",
-		__print_ctrl_name(__entry->ctrl),
+		__print_ctrl_id(__entry->ctrl_id),
 		__print_disk_name(__entry->disk),
 		__entry->qid, __entry->cid, __entry->result, __entry->status)
 
drivers/pinctrl/pinctrl-single.c +2 -0
index 13517243355c..43b25119efa2 100644
@@ -323,6 +323,8 @@ static int pcs_get_function(struct pinctrl_dev *pctldev, unsigned pin,
 		return -ENOTSUPP;
 	fselector = setting->func;
 	function = pinmux_generic_get_function(pctldev, fselector);
+	if (!function)
+		return -EINVAL;
 	*func = function->data;
 	if (!(*func)) {
 		dev_err(pcs->dev, "%s could not find function%i\n",
drivers/s390/block/dasd.c +23 -13
index a5cee56ffe61..05363aaa7cfe 100644
@@ -1665,9 +1665,15 @@ static int dasd_ese_needs_format(struct dasd_block *block, struct irb *irb)
 	if (!sense)
 		return 0;
 
-	return !!(sense[1] & SNS1_NO_REC_FOUND) ||
-		!!(sense[1] & SNS1_FILE_PROTECTED) ||
-		scsw_cstat(&irb->scsw) == SCHN_STAT_INCORR_LEN;
+	if (sense[1] & SNS1_NO_REC_FOUND)
+		return 1;
+
+	if ((sense[1] & SNS1_INV_TRACK_FORMAT) &&
+	    scsw_is_tm(&irb->scsw) &&
+	    !(sense[2] & SNS2_ENV_DATA_PRESENT))
+		return 1;
+
+	return 0;
 }
 
 static int dasd_ese_oos_cond(u8 *sense)
@@ -1688,7 +1694,7 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
 	struct dasd_device *device;
 	unsigned long now;
 	int nrf_suppressed = 0;
-	int fp_suppressed = 0;
+	int it_suppressed = 0;
 	struct request *req;
 	u8 *sense = NULL;
 	int expires;
@@ -1743,8 +1749,9 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
 		 */
 		sense = dasd_get_sense(irb);
 		if (sense) {
-			fp_suppressed = (sense[1] & SNS1_FILE_PROTECTED) &&
-				test_bit(DASD_CQR_SUPPRESS_FP, &cqr->flags);
+			it_suppressed =	(sense[1] & SNS1_INV_TRACK_FORMAT) &&
+				!(sense[2] & SNS2_ENV_DATA_PRESENT) &&
+				test_bit(DASD_CQR_SUPPRESS_IT, &cqr->flags);
 			nrf_suppressed = (sense[1] & SNS1_NO_REC_FOUND) &&
 				test_bit(DASD_CQR_SUPPRESS_NRF, &cqr->flags);
 
@@ -1759,7 +1766,7 @@ void dasd_int_handler(struct ccw_device *cdev, unsigned long intparm,
 				return;
 			}
 		}
-		if (!(fp_suppressed || nrf_suppressed))
+		if (!(it_suppressed || nrf_suppressed))
 			device->discipline->dump_sense_dbf(device, irb, "int");
 
 		if (device->features & DASD_FEATURE_ERPLOG)
@@ -2513,14 +2520,17 @@ static int _dasd_sleep_on_queue(struct list_head *ccw_queue, int interruptible)
 	rc = 0;
 	list_for_each_entry_safe(cqr, n, ccw_queue, blocklist) {
 		/*
-		 * In some cases the 'File Protected' or 'Incorrect Length'
-		 * error might be expected and error recovery would be
-		 * unnecessary in these cases.	Check if the according suppress
-		 * bit is set.
+		 * In some cases certain errors might be expected and
+		 * error recovery would be unnecessary in these cases.
+		 * Check if the according suppress bit is set.
 		 */
 		sense = dasd_get_sense(&cqr->irb);
-		if (sense && sense[1] & SNS1_FILE_PROTECTED &&
-		    test_bit(DASD_CQR_SUPPRESS_FP, &cqr->flags))
+		if (sense && (sense[1] & SNS1_INV_TRACK_FORMAT) &&
+		    !(sense[2] & SNS2_ENV_DATA_PRESENT) &&
+		    test_bit(DASD_CQR_SUPPRESS_IT, &cqr->flags))
+			continue;
+		if (sense && (sense[1] & SNS1_NO_REC_FOUND) &&
+		    test_bit(DASD_CQR_SUPPRESS_NRF, &cqr->flags))
 			continue;
 		if (scsw_cstat(&cqr->irb.scsw) == 0x40 &&
 		    test_bit(DASD_CQR_SUPPRESS_IL, &cqr->flags))
drivers/s390/block/dasd_3990_erp.c +2 -8
index 8598c792ded3..e2163176bd9d 100644
@@ -1401,14 +1401,8 @@ dasd_3990_erp_file_prot(struct dasd_ccw_req * erp)
 
 	struct dasd_device *device = erp->startdev;
 
-	/*
-	 * In some cases the 'File Protected' error might be expected and
-	 * log messages shouldn't be written then.
-	 * Check if the according suppress bit is set.
-	 */
-	if (!test_bit(DASD_CQR_SUPPRESS_FP, &erp->flags))
-		dev_err(&device->cdev->dev,
-			"Accessing the DASD failed because of a hardware error\n");
+	dev_err(&device->cdev->dev,
+		"Accessing the DASD failed because of a hardware error\n");
 
 	return dasd_3990_erp_cleanup(erp, DASD_CQR_FAILED);
 
drivers/s390/block/dasd_eckd.c +24 -31

90 lines not on this page · raw message

drivers/s390/block/dasd_int.h +1 -1
index 5d7d35ca5eb4..052b5d1ba9c1 100644
@@ -226,7 +226,7 @@ struct dasd_ccw_req {
  * The following flags are used to suppress output of certain errors.
  */
 #define DASD_CQR_SUPPRESS_NRF	4	/* Suppress 'No Record Found' error */
-#define DASD_CQR_SUPPRESS_FP	5	/* Suppress 'File Protected' error*/
+#define DASD_CQR_SUPPRESS_IT	5	/* Suppress 'Invalid Track' error*/
 #define DASD_CQR_SUPPRESS_IL	6	/* Suppress 'Incorrect Length' error */
 #define DASD_CQR_SUPPRESS_CR	7	/* Suppress 'Command Reject' error */
 
drivers/s390/cio/idset.c +7 -5
index 835de44dbbcc..b98526d3ddfd 100644
@@ -16,20 +16,21 @@ struct idset {
 	unsigned long bitmap[0];
 };
 
-static inline unsigned long bitmap_size(int num_ssid, int num_id)
+static inline unsigned long idset_bitmap_size(int num_ssid, int num_id)
 {
-	return BITS_TO_LONGS(num_ssid * num_id) * sizeof(unsigned long);
+	return bitmap_size(size_mul(num_ssid, num_id));
 }
 
 static struct idset *idset_new(int num_ssid, int num_id)
 {
 	struct idset *set;
 
-	set = vmalloc(sizeof(struct idset) + bitmap_size(num_ssid, num_id));
+	set = vmalloc(sizeof(struct idset) +
+		      idset_bitmap_size(num_ssid, num_id));
 	if (set) {
 		set->num_ssid = num_ssid;
 		set->num_id = num_id;
-		memset(set->bitmap, 0, bitmap_size(num_ssid, num_id));
+		memset(set->bitmap, 0, idset_bitmap_size(num_ssid, num_id));
 	}
 	return set;
 }
@@ -41,7 +42,8 @@ void idset_free(struct idset *set)
 
 void idset_fill(struct idset *set)
 {
-	memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id));
+	memset(set->bitmap, 0xff,
+	       idset_bitmap_size(set->num_ssid, set->num_id));
 }
 
 static inline void idset_add(struct idset *set, int ssid, int id)
drivers/scsi/aacraid/comminit.c +2 -0
index d4fcfa1e54e0..8849eca08a49 100644
@@ -638,6 +638,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
 
 	if (aac_comm_init(dev)<0){
 		kfree(dev->queues);
+		dev->queues = NULL;
 		return NULL;
 	}
 	/*
@@ -645,6 +646,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
 	 */
 	if (aac_fib_setup(dev) < 0) {
 		kfree(dev->queues);
+		dev->queues = NULL;
 		return NULL;
 	}
 		
drivers/scsi/lpfc/lpfc_sli.c +1 -1
index e489c68cfb63..04b9a94f2f5e 100644
@@ -6902,7 +6902,7 @@ lpfc_sli4_repost_sgl_list(struct lpfc_hba *phba,
 	struct lpfc_sglq *sglq_entry = NULL;
 	struct lpfc_sglq *sglq_entry_next = NULL;
 	struct lpfc_sglq *sglq_entry_first = NULL;
-	int status, total_cnt;
+	int status = 0, total_cnt;
 	int post_cnt = 0, num_posted = 0, block_cnt = 0;
 	int last_xritag = NO_XRI;
 	LIST_HEAD(prep_sgl_list);
drivers/scsi/scsi_transport_spi.c +2 -2
index c37dd15d16d2..83f2576ed2aa 100644
@@ -677,10 +677,10 @@ spi_dv_device_echo_buffer(struct scsi_device *sdev, u8 *buffer,
 	for (r = 0; r < retries; r++) {
 		result = spi_execute(sdev, spi_write_buffer, DMA_TO_DEVICE,
 				     buffer, len, &sshdr);
-		if(result || !scsi_device_online(sdev)) {
+		if (result || !scsi_device_online(sdev)) {
 
 			scsi_device_set_state(sdev, SDEV_QUIESCE);
-			if (scsi_sense_valid(&sshdr)
+			if (result > 0 && scsi_sense_valid(&sshdr)
 			    && sshdr.sense_key == ILLEGAL_REQUEST
 			    /* INVALID FIELD IN CDB */
 			    && sshdr.asc == 0x24 && sshdr.ascq == 0x00)
drivers/soc/qcom/cmd-db.c +1 -1
index f6c3d17b05c7..c447f3ede514 100644
@@ -247,7 +247,7 @@ static int cmd_db_dev_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	cmd_db_header = memremap(rmem->base, rmem->size, MEMREMAP_WB);
+	cmd_db_header = memremap(rmem->base, rmem->size, MEMREMAP_WC);
 	if (!cmd_db_header) {
 		ret = -ENOMEM;
 		cmd_db_header = NULL;
drivers/soundwire/stream.c +4 -4
index 3b3f909407c3..b7d81bde35ca 100644
@@ -1407,18 +1407,18 @@ struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave,
 					    unsigned int port_num)
 {
 	struct sdw_dpn_prop *dpn_prop;
-	u8 num_ports;
+	unsigned long mask;
 	int i;
 
 	if (direction == SDW_DATA_DIR_TX) {
-		num_ports = hweight32(slave->prop.source_ports);
+		mask = slave->prop.source_ports;
 		dpn_prop = slave->prop.src_dpn_prop;
 	} else {
-		num_ports = hweight32(slave->prop.sink_ports);
+		mask = slave->prop.sink_ports;
 		dpn_prop = slave->prop.sink_dpn_prop;
 	}
 
-	for (i = 0; i < num_ports; i++) {
+	for_each_set_bit(i, &mask, 32) {
 		if (dpn_prop[i].num == port_num)
 			return &dpn_prop[i];
 	}
drivers/ssb/main.c +1 -1
index 0a26984acb2c..9e54bc7eec66 100644
@@ -835,7 +835,7 @@ static u32 clkfactor_f6_resolve(u32 v)
 	case SSB_CHIPCO_CLK_F6_7:
 		return 7;
 	}
-	return 0;
+	return 1;
 }
 
 /* Calculate the speed the backplane would run at a given set of clockcontrol values */
drivers/staging/ks7010/ks7010_sdio.c +2 -2
index 3fbe223d59b8..28723db44a8f 100644
@@ -395,9 +395,9 @@ int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
 	priv->hostt.buff[priv->hostt.qtail] = le16_to_cpu(hdr->event);
 	priv->hostt.qtail = (priv->hostt.qtail + 1) % SME_EVENT_BUFF_SIZE;
 
-	spin_lock(&priv->tx_dev.tx_dev_lock);
+	spin_lock_bh(&priv->tx_dev.tx_dev_lock);
 	result = enqueue_txdev(priv, p, size, complete_handler, skb);
-	spin_unlock(&priv->tx_dev.tx_dev_lock);
+	spin_unlock_bh(&priv->tx_dev.tx_dev_lock);
 
 	if (txq_has_space(priv))
 		queue_delayed_work(priv->wq, &priv->rw_dwork, 0);
drivers/usb/class/cdc-acm.c +3 -0
index edb62b49f572..e8768d33efd6 100644
@@ -1767,6 +1767,9 @@ static const struct usb_device_id acm_ids[] = {
 	{ USB_DEVICE(0x11ca, 0x0201), /* VeriFone Mx870 Gadget Serial */
 	.driver_info = SINGLE_RX_URB,
 	},
+	{ USB_DEVICE(0x1901, 0x0006), /* GE Healthcare Patient Monitor UI Controller */
+	.driver_info = DISABLE_ECHO, /* DISABLE ECHO in termios flag */
+	},
 	{ USB_DEVICE(0x1965, 0x0018), /* Uniden UBC125XLT */
 	.driver_info = NO_UNION_NORMAL, /* has no union descriptor */
 	},
drivers/usb/core/sysfs.c +1 -0
index 4a4f39c458a9..859388d96117 100644
@@ -690,6 +690,7 @@ static int add_power_attributes(struct device *dev)
 
 static void remove_power_attributes(struct device *dev)
 {
+	sysfs_unmerge_group(&dev->kobj, &usb3_hardware_lpm_attr_group);
 	sysfs_unmerge_group(&dev->kobj, &usb2_hardware_lpm_attr_group);
 	sysfs_unmerge_group(&dev->kobj, &power_attr_group);
 }
drivers/usb/dwc3/core.c +21 -0
index 12e72e804278..d77092d154df 100644
@@ -391,6 +391,13 @@ static void dwc3_free_event_buffers(struct dwc3 *dwc)
 static int dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length)
 {
 	struct dwc3_event_buffer *evt;
+	unsigned int hw_mode;
+
+	hw_mode = DWC3_GHWPARAMS0_MODE(dwc->hwparams.hwparams0);
+	if (hw_mode == DWC3_GHWPARAMS0_MODE_HOST) {
+		dwc->ev_buf = NULL;
+		return 0;
+	}
 
 	evt = dwc3_alloc_one_event_buffer(dwc, length);
 	if (IS_ERR(evt)) {
@@ -412,6 +419,9 @@ int dwc3_event_buffers_setup(struct dwc3 *dwc)
 {
 	struct dwc3_event_buffer	*evt;
 
+	if (!dwc->ev_buf)
+		return 0;
+
 	evt = dwc->ev_buf;
 	evt->lpos = 0;
 	dwc3_writel(dwc->regs, DWC3_GEVNTADRLO(0),
@@ -428,6 +438,17 @@ int dwc3_event_buffers_setup(struct dwc3 *dwc)
 void dwc3_event_buffers_cleanup(struct dwc3 *dwc)
 {
 	struct dwc3_event_buffer	*evt;
+	u32				reg;
+
+	if (!dwc->ev_buf)
+		return;
+	/*
+	 * Exynos platforms may not be able to access event buffer if the
+	 * controller failed to halt on dwc3_core_exit().
+	 */
+	reg = dwc3_readl(dwc->regs, DWC3_DSTS);
+	if (!(reg & DWC3_DSTS_DEVCTRLHLT))
+		return;
 
 	evt = dwc->ev_buf;
 
drivers/usb/dwc3/dwc3-omap.c +3 -1
index 81ee1cd794f7..5465b355f00b 100644
@@ -527,11 +527,13 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 	if (ret) {
 		dev_err(dev, "failed to request IRQ #%d --> %d\n",
 			omap->irq, ret);
-		goto err1;
+		goto err2;
 	}
 	dwc3_omap_enable_irqs(omap);
 	return 0;
 
+err2:
+	of_platform_depopulate(dev);
 err1:
 	pm_runtime_put_sync(dev);
 	pm_runtime_disable(dev);
drivers/usb/dwc3/dwc3-st.c +7 -9
index c682420f25ca..c48fd6bb97b7 100644
@@ -219,10 +219,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
 	dwc3_data->regmap = regmap;
 
 	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "syscfg-reg");
-	if (!res) {
-		ret = -ENXIO;
-		goto undo_platform_dev_alloc;
-	}
+	if (!res)
+		return -ENXIO;
 
 	dwc3_data->syscfg_reg_off = res->start;
 
@@ -233,8 +231,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
 		devm_reset_control_get_exclusive(dev, "powerdown");
 	if (IS_ERR(dwc3_data->rstc_pwrdn)) {
 		dev_err(&pdev->dev, "could not get power controller\n");
-		ret = PTR_ERR(dwc3_data->rstc_pwrdn);
-		goto undo_platform_dev_alloc;
+		return PTR_ERR(dwc3_data->rstc_pwrdn);
 	}
 
 	/* Manage PowerDown */
@@ -269,7 +266,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
 	if (!child_pdev) {
 		dev_err(dev, "failed to find dwc3 core device\n");
 		ret = -ENODEV;
-		goto err_node_put;
+		goto depopulate;
 	}
 
 	dwc3_data->dr_mode = usb_get_dr_mode(&child_pdev->dev);
@@ -285,6 +282,7 @@ static int st_dwc3_probe(struct platform_device *pdev)
 	ret = st_dwc3_drd_init(dwc3_data);
 	if (ret) {
 		dev_err(dev, "drd initialisation failed\n");
+		of_platform_depopulate(dev);
 		goto undo_softreset;
 	}
 
@@ -294,14 +292,14 @@ static int st_dwc3_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, dwc3_data);
 	return 0;
 
+depopulate:
+	of_platform_depopulate(dev);
 err_node_put:
 	of_node_put(child);
 undo_softreset:
 	reset_control_assert(dwc3_data->rstc_rst);
 undo_powerdown:
 	reset_control_assert(dwc3_data->rstc_pwrdn);
-undo_platform_dev_alloc:
-	platform_device_put(pdev);
 	return ret;
 }
 
drivers/usb/gadget/udc/fsl_udc_core.c +1 -1
index 9a05863b2876..6a4e206b1e2d 100644
@@ -2503,7 +2503,7 @@ static int fsl_udc_probe(struct platform_device *pdev)
 	/* setup the udc->eps[] for non-control endpoints and link
 	 * to gadget.ep_list */
 	for (i = 1; i < (int)(udc_controller->max_ep / 2); i++) {
-		char name[14];
+		char name[16];
 
 		sprintf(name, "ep%dout", i);
 		struct_ep_setup(udc_controller, i * 2, name, 1);
drivers/usb/host/xhci.c +5 -3
index eb78091d1b35..dfc406be0856 100644
@@ -2819,7 +2819,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
 				xhci->num_active_eps);
 		return -ENOMEM;
 	}
-	if ((xhci->quirks & XHCI_SW_BW_CHECKING) &&
+	if ((xhci->quirks & XHCI_SW_BW_CHECKING) && !ctx_change &&
 	    xhci_reserve_bandwidth(xhci, virt_dev, command->in_ctx)) {
 		if ((xhci->quirks & XHCI_EP_LIMIT_QUIRK))
 			xhci_free_host_resources(xhci, ctrl_ctx);
@@ -4231,8 +4231,10 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 		mutex_unlock(&xhci->mutex);
 		ret = xhci_disable_slot(xhci, udev->slot_id);
 		xhci_free_virt_device(xhci, udev->slot_id);
-		if (!ret)
-			xhci_alloc_dev(hcd, udev);
+		if (!ret) {
+			if (xhci_alloc_dev(hcd, udev) == 1)
+				xhci_setup_addressable_virt_dev(xhci, udev);
+		}
 		kfree(command->completion);
 		kfree(command);
 		return -EPROTO;
drivers/usb/serial/option.c +5 -0
index 6545b295be99..35bd9c10518f 100644
@@ -619,6 +619,8 @@ static void option_instat_callback(struct urb *urb);
 
 /* MeiG Smart Technology products */
 #define MEIGSMART_VENDOR_ID			0x2dee
+/* MeiG Smart SRM825L based on Qualcomm 315 */
+#define MEIGSMART_PRODUCT_SRM825L		0x4d22
 /* MeiG Smart SLM320 based on UNISOC UIS8910 */
 #define MEIGSMART_PRODUCT_SLM320		0x4d41
 
@@ -2366,6 +2368,9 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff, 0, 0) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(UNISOC_VENDOR_ID, LUAT_PRODUCT_AIR720U, 0xff, 0, 0) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SLM320, 0xff, 0, 0) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x30) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x40) },
+	{ USB_DEVICE_AND_INTERFACE_INFO(MEIGSMART_VENDOR_ID, MEIGSMART_PRODUCT_SRM825L, 0xff, 0xff, 0x60) },
 	{ } /* Terminating entry */
 };
 MODULE_DEVICE_TABLE(usb, option_ids);
fs/binfmt_elf_fdpic.c +1 -1
index 28aef31a6e6f..aeeba59fa734 100644
@@ -320,7 +320,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm)
 	else
 		executable_stack = EXSTACK_DEFAULT;
 
-	if (stack_size == 0) {
+	if (stack_size == 0 && interp_params.flags & ELF_FDPIC_FLAG_PRESENT) {
 		stack_size = interp_params.stack_size;
 		if (interp_params.flags & ELF_FDPIC_FLAG_EXEC_STACK)
 			executable_stack = EXSTACK_ENABLE_X;
fs/binfmt_misc.c +168 -48

209 lines not on this page · raw message

fs/btrfs/delayed-inode.c +1 -1
index 95afe5ef7500..e3a43bf63f06 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/free-space-cache.c +4 -4
index af89fce57ff7..7819bae9be29 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/inode.c +8 -1
index 2c86be3fc25c..d2a988bf9c89 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/qgroup.c +0 -2
index d6184b6206ff..7d0b7e58d66a 100644

Lines of this file are not shown. View the raw message.

fs/btrfs/send.c +6 -1
index 576c027909f8..e1063ef3dece 100644

Lines of this file are not shown. View the raw message.

fs/ext4/extents.c +2 -1
index 90b12c7c0f20..fed3dfed2c24 100644

Lines of this file are not shown. View the raw message.

fs/ext4/mballoc.c +3 -0
index 9bc590564ea1..b268dc0e1df4 100644

Lines of this file are not shown. View the raw message.

fs/f2fs/segment.c +3 -2
index e43b57755a7f..da37e2b8a0ec 100644

Lines of this file are not shown. View the raw message.

fs/file.c +13 -17
index 9e6281046274..cf7c04f35564 100644

Lines of this file are not shown. View the raw message.

fs/fuse/dev.c +4 -2
index ac6a8da34013..2d02008ecb5b 100644

Lines of this file are not shown. View the raw message.

fs/fuse/virtio_fs.c +10 -0
index fadf6fb90fe2..48f144d08381 100644

Lines of this file are not shown. View the raw message.

fs/gfs2/inode.c +1 -1
index 988bb7b17ed8..4e0c933e0800 100644

Lines of this file are not shown. View the raw message.

fs/inode.c +37 -2
index a6c4c443d45a..8c850a062300 100644

Lines of this file are not shown. View the raw message.

fs/locks.c +2 -2
index 85c8af53d4eb..cf6ed857664b 100644

Lines of this file are not shown. View the raw message.

fs/nfs/pnfs.c +8 -0
index 3b19fa74b062..3f7d905d7528 100644

Lines of this file are not shown. View the raw message.

fs/quota/dquot.c +2 -3
index a7ddb874912d..14c0dd5b65a4 100644

Lines of this file are not shown. View the raw message.

include/linux/bitmap.h +17 -3
index 29fc933df3bf..a92ecbc391ef 100644

Lines of this file are not shown. View the raw message.

include/linux/blkdev.h +1 -1
index 308c2d8cdca1..5194467d7d75 100644

Lines of this file are not shown. View the raw message.

include/linux/cpumask.h +1 -1
index 78a73eba64dd..30c0c3c610ad 100644

Lines of this file are not shown. View the raw message.

include/linux/device-mapper.h +2 -0
index 60631f3abddb..b077f3204365 100644

Lines of this file are not shown. View the raw message.

include/linux/fs.h +5 -0
index 5e122cb506d6..d4f5fcc60744 100644

Lines of this file are not shown. View the raw message.

include/linux/overflow.h +80 -35

115 lines not on this page · raw message

include/net/busy_poll.h +1 -1
index 16258c0c7319..36259516ec0d 100644

Lines of this file are not shown. View the raw message.

include/net/kcm.h +1 -0
index 2d704f8f4905..8e8252e08a9c 100644

Lines of this file are not shown. View the raw message.

ipc/util.c +4 -12
index 09c3bd9f8e76..aaf28b14a030 100644

Lines of this file are not shown. View the raw message.

kernel/cgroup/cpuset.c +9 -4
index 6ec74b9120b7..807fc3fbd5ab 100644

Lines of this file are not shown. View the raw message.

kernel/time/hrtimer.c +2 -0
index 1b301dd1692b..2e4f136bdf6a 100644

Lines of this file are not shown. View the raw message.

lib/math/prime_numbers.c +0 -2
index 052f5b727be7..d6b3964197d3 100644

Lines of this file are not shown. View the raw message.

lib/test_overflow.c +98 -0

98 lines not on this page · raw message

mm/memcontrol.c +5 -2
index 0cc7ee52d6bd..5ac119509335 100644

Lines of this file are not shown. View the raw message.

net/bluetooth/bnep/core.c +2 -1
index 43c284158f63..089160361dde 100644

Lines of this file are not shown. View the raw message.

net/bluetooth/hci_core.c +30 -28

58 lines not on this page · raw message

net/bluetooth/mgmt.c +4 -0
index 0ae5d3cab4dc..2706e238ca44 100644

Lines of this file are not shown. View the raw message.

net/core/ethtool.c +3 -0
index 9ae38c3e2bf0..f0346cf4462e 100644

Lines of this file are not shown. View the raw message.

net/core/net-sysfs.c +1 -1
index ad45f13a0370..bcad7028bbf4 100644

Lines of this file are not shown. View the raw message.

net/ipv6/ip6_output.c +2 -0
index c67d634dccd4..a34a562b0954 100644

Lines of this file are not shown. View the raw message.

net/iucv/iucv.c +1 -2
index f0364649186b..dc8597347928 100644

Lines of this file are not shown. View the raw message.

net/kcm/kcmsock.c +4 -0
index 920b0ebf1cb8..50dceed77ba6 100644

Lines of this file are not shown. View the raw message.

net/netfilter/nft_counter.c +5 -0
index f6d4d0fa23a6..bf829fabf278 100644

Lines of this file are not shown. View the raw message.

net/rds/recv.c +11 -2
index 967d115f97ef..f570d64367a4 100644

Lines of this file are not shown. View the raw message.

net/sched/sch_netem.c +29 -18

47 lines not on this page · raw message

security/selinux/avc.c +1 -1
index 4a744b1cebc8..ebe3d08cccac 100644

Lines of this file are not shown. View the raw message.

sound/core/timer.c +1 -1
index 246fabc0f667..98ee2a898b39 100644

Lines of this file are not shown. View the raw message.

sound/pci/hda/patch_realtek.c +0 -1
index 77034c31fa12..dddf3f55cb13 100644

Lines of this file are not shown. View the raw message.

sound/usb/quirks-table.h +1 -0
index 96d32766e93c..a5b0a1a0fc57 100644

Lines of this file are not shown. View the raw message.

tools/include/linux/align.h new file +12 -0
new file mode 100644
index 000000000000..14e34ace80dd

Lines of this file are not shown. View the raw message.

tools/include/linux/bitmap.h +5 -3
index 05dca5c203f3..61cf3b9a23a6 100644

Lines of this file are not shown. View the raw message.

tools/testing/selftests/tc-testing/tdc.py +0 -1
index e566c70e64a1..81f76a5d12ac 100755

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.