Commit graph

17928 commits

Author SHA1 Message Date
Michael Bestas
bfc560ed37
Merge tag 'ASB-2024-01-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2024-01-01

* tag 'ASB-2024-01-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.304
  block: Don't invalidate pagecache for invalid falloc modes
  dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
  smb: client: fix OOB in smbCalcSize()
  usb: fotg210-hcd: delete an incorrect bounds test
  usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
  x86/alternatives: Sync core before enabling interrupts
  net: rfkill: gpio: set GPIO direction
  net: 9p: avoid freeing uninit memory in p9pdu_vreadf
  Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
  USB: serial: option: add Quectel RM500Q R13 firmware support
  USB: serial: option: add Foxconn T99W265 with new baseline
  USB: serial: option: add Quectel EG912Y module support
  USB: serial: ftdi_sio: update Actisense PIDs constant names
  wifi: cfg80211: fix certs build to not depend on file order
  wifi: cfg80211: Add my certificate
  iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
  scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
  scsi: bnx2fc: Remove set but not used variable 'oxid'
  Input: ipaq-micro-keys - add error handling for devm_kmemdup
  iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
  btrfs: do not allow non subvolume root targets for snapshot
  smb: client: fix NULL deref in asn1_ber_decoder()
  pinctrl: at91-pio4: use dedicated lock class for IRQ
  net: check dev->gso_max_size in gso_features_check()
  net: warn if gso_type isn't set for a GSO SKB
  afs: Fix the dynamic root's d_delete to always delete unused dentries
  net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
  net/rose: fix races in rose_kill_by_device()
  ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
  net: sched: ife: fix potential use-after-free
  net/mlx5: Fix fw tracer first block check
  net/mlx5: improve some comments
  wifi: mac80211: mesh_plink: fix matches_local logic
  s390/vx: fix save/restore of fpu kernel context
  reset: Fix crash when freeing non-existent optional resets
  ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
  ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE
  ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
  ALSA: hda/realtek: Enable headset onLenovo M70/M90
  ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
  arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names
  Revert "cred: switch to using atomic_long_t"
  Linux 4.19.303
  powerpc/ftrace: Fix stack teardown in ftrace_no_trace
  powerpc/ftrace: Create a dummy stackframe to fix stack unwind
  mmc: block: Be sure to wait while busy in CQE error recovery
  ring-buffer: Fix memory leak of free page
  team: Fix use-after-free when an option instance allocation fails
  arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify
  ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS
  perf: Fix perf_event_validate_size() lockdep splat
  HID: hid-asus: add const to read-only outgoing usb buffer
  net: usb: qmi_wwan: claim interface 4 for ZTE MF290
  asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation
  HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad
  HID: hid-asus: reset the backlight brightness level on resume
  HID: add ALWAYS_POLL quirk for Apple kb
  platform/x86: intel_telemetry: Fix kernel doc descriptions
  bcache: avoid NULL checking to c->root in run_cache_set()
  bcache: add code comments for bch_btree_node_get() and __bch_btree_node_alloc()
  bcache: avoid oversize memory allocation by small stripe_size
  blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!"
  cred: switch to using atomic_long_t
  Revert "PCI: acpiphp: Reassign resources on bridge if necessary"
  appletalk: Fix Use-After-Free in atalk_ioctl
  net: stmmac: Handle disabled MDIO busses from devicetree
  vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()
  sign-file: Fix incorrect return values check
  net: Remove acked SYN flag from packet in the transmit queue correctly
  qed: Fix a potential use-after-free in qed_cxt_tables_alloc
  net/rose: Fix Use-After-Free in rose_ioctl
  atm: Fix Use-After-Free in do_vcc_ioctl
  atm: solos-pci: Fix potential deadlock on &tx_queue_lock
  atm: solos-pci: Fix potential deadlock on &cli_queue_lock
  qca_spi: Fix reset behavior
  qca_debug: Fix ethtool -G iface tx behavior
  qca_debug: Prevent crash on TX ring changes
  Revert "psample: Require 'CAP_NET_ADMIN' when joining "packets" group"
  Revert "genetlink: add CAP_NET_ADMIN test for multicast bind"
  Revert "drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group"
  Revert "perf/core: Add a new read format to get a number of lost samples"
  Revert "perf: Fix perf_event_validate_size()"
  Revert "hrtimers: Push pending hrtimers away from outgoing CPU earlier"
  ANDROID: Snapshot Mainline's version of checkpatch.pl
  Linux 4.19.302
  devcoredump: Send uevent once devcd is ready
  devcoredump : Serialize devcd_del work
  IB/isert: Fix unaligned immediate-data handling
  tools headers UAPI: Sync linux/perf_event.h with the kernel sources
  drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group
  psample: Require 'CAP_NET_ADMIN' when joining "packets" group
  genetlink: add CAP_NET_ADMIN test for multicast bind
  netlink: don't call ->netlink_bind with table lock held
  nilfs2: fix missing error check for sb_set_blocksize call
  KVM: s390/mm: Properly reset no-dat
  x86/CPU/AMD: Check vendor in the AMD microcode callback
  serial: 8250_omap: Add earlycon support for the AM654 UART controller
  serial: sc16is7xx: address RX timeout interrupt errata
  usb: typec: class: fix typec_altmode_put_partner to put plugs
  parport: Add support for Brainboxes IX/UC/PX parallel cards
  usb: gadget: f_hid: fix report descriptor allocation
  gpiolib: sysfs: Fix error handling on failed export
  perf: Fix perf_event_validate_size()
  perf/core: Add a new read format to get a number of lost samples
  tracing: Fix a possible race when disabling buffered events
  tracing: Fix incomplete locking when disabling buffered events
  tracing: Always update snapshot buffer size
  nilfs2: prevent WARNING in nilfs_sufile_set_segment_usage()
  packet: Move reference count in packet_sock to atomic_long_t
  ALSA: pcm: fix out-of-bounds in snd_pcm_state_names
  ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt
  ARM: dts: imx: make gpt node name generic
  ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
  scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle()
  tracing: Fix a warning when allocating buffered events fails
  hwmon: (acpi_power_meter) Fix 4.29 MW bug
  RDMA/bnxt_re: Correct module description string
  tcp: do not accept ACK of bytes we never sent
  netfilter: xt_owner: Fix for unsafe access of sk->sk_socket
  netfilter: xt_owner: Add supplementary groups option
  net: hns: fix fake link up on xge port
  ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()
  arcnet: restoring support for multiple Sohard Arcnet cards
  net: arcnet: com20020 fix error handling
  net: arcnet: Fix RESET flag handling
  hv_netvsc: rndis_filter needs to select NLS
  ipv6: fix potential NULL deref in fib6_add()
  drm/amdgpu: correct chunk_ptr to a pointer to chunk.
  kconfig: fix memory leak from range properties
  tg3: Increment tx_dropped in tg3_tso_bug()
  tg3: Move the [rt]x_dropped counters to tg3_napi
  netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test
  hrtimers: Push pending hrtimers away from outgoing CPU earlier
  media: davinci: vpif_capture: fix potential double free
  spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook.
  spi: imx: correct wml as the last sg length
  spi: imx: move wml setting to later than setup_transfer
  spi: imx: add a device specific prepare_message callback
  Linux 4.19.301
  mmc: block: Retry commands in CQE error recovery
  mmc: core: convert comma to semicolon
  mmc: cqhci: Fix task clearing in CQE error recovery
  mmc: cqhci: Warn of halt or task clear failure
  mmc: cqhci: Increase recovery halt timeout
  cpufreq: imx6q: Don't disable 792 Mhz OPP unnecessarily
  cpufreq: imx6q: don't warn for disabling a non-existing frequency
  ima: detect changes to the backing overlay file
  ovl: skip overlayfs superblocks at global sync
  ima: annotate iint mutex to avoid lockdep false positive warnings
  fbdev: stifb: Make the STI next font pointer a 32-bit signed offset
  mtd: cfi_cmdset_0001: Byte swap OTP info
  mtd: cfi_cmdset_0001: Support the absence of protection registers
  s390/cmma: fix detection of DAT pages
  s390/mm: fix phys vs virt confusion in mark_kernel_pXd() functions family
  smb3: fix touch -h of symlink
  net: ravb: Start TX queues after HW initialization succeeded
  ravb: Fix races between ravb_tx_timeout_work() and net related ops
  ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
  Input: xpad - add HyperX Clutch Gladiate Support
  btrfs: send: ensure send_fd is writable
  btrfs: fix off-by-one when checking chunk map includes logical address
  powerpc: Don't clobber f0/vs0 during fp|altivec register save
  bcache: revert replacing IS_ERR_OR_NULL with IS_ERR
  dm verity: don't perform FEC for failed readahead IO
  dm-verity: align struct dm_verity_fec_io properly
  ALSA: hda/realtek: Headset Mic VREF to 100%
  ALSA: hda: Disable power-save on KONTRON SinglePC
  mmc: block: Do not lose cache flush during CQE error recovery
  firewire: core: fix possible memory leak in create_units()
  pinctrl: avoid reload of p state in list iteration
  USB: dwc3: qcom: fix wakeup after probe deferral
  usb: dwc3: set the dma max_seg_size
  USB: dwc2: write HCINT with INTMASK applied
  USB: serial: option: don't claim interface 4 for ZTE MF290
  USB: serial: option: fix FM101R-GL defines
  USB: serial: option: add Fibocom L7xx modules
  bcache: prevent potential division by zero error
  bcache: check return value from btree_node_alloc_replacement()
  dm-delay: fix a race between delay_presuspend and delay_bio
  hv_netvsc: Mark VF as slave before exposing it to user-mode
  hv_netvsc: Fix race of register_netdevice_notifier and VF register
  USB: serial: option: add Luat Air72*U series products
  s390/dasd: protect device queue against concurrent access
  bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
  mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips
  KVM: arm64: limit PMU version to PMUv3 for ARMv8.1
  arm64: cpufeature: Extract capped perfmon fields
  MIPS: KVM: Fix a build warning about variable set but not used
  net: axienet: Fix check for partial TX checksum
  amd-xgbe: propagate the correct speed and duplex status
  amd-xgbe: handle the corner-case during tx completion
  amd-xgbe: handle corner-case during sfp hotplug
  arm/xen: fix xen_vcpu_info allocation alignment
  net: usb: ax88179_178a: fix failed operations during ax88179_reset
  ipv4: Correct/silence an endian warning in __ip_do_redirect
  HID: fix HID device resource race between HID core and debugging support
  HID: core: store the unique system identifier in hid_device
  drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
  ata: pata_isapnp: Add missing error check for devm_ioport_map()
  drm/panel: simple: Fix Innolux G101ICE-L01 timings
  RDMA/irdma: Prevent zero-length STAG registration
  driver core: Release all resources during unbind before updating device links

 Conflicts:
	drivers/mmc/host/cqhci.c
	drivers/net/usb/ax88179_178a.c
	drivers/usb/dwc3/core.c
	scripts/checkpatch.pl

Change-Id: I571c71df4f4c1c612d4101c9b9c2b901b4408103
2024-01-13 21:09:02 +02:00
Greg Kroah-Hartman
38d95b42c4 This is the 4.19.304 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmWbzh8ACgkQONu9yGCS
 aT6nzxAAkwiBVc/j4TFLnZw8XhsDiZdfTMdCHT5BmqH2uz1E9JNShKY3dO3PaTU1
 vSBjpj/K1l0wuQwwyM0uNTDOxCsJ+4xnbQdrN3QsE7jNnSaJRT+tGFF8DED1saky
 1vvMm+aZmNVuOSm6zrQqq8Mz/pgeyfbvGF0wE+aYQg1b2b7gBJlmtafIg05jChi7
 J+fbZbQpw0/Peb0cNGmiOnypw5cXy/Th8S+Ua9IWTr7UbEf2uRS2ExakCpUbTjHU
 OUOd1gy9qgUMzS2aWacuR9jtfVxVZrC6MhrGNMAohhY9wJbF4ZlKSn75nCJwSDgd
 150JY6QRwYwMcljJN7LWDW0d9aUV2Gs3y/OgfuHiwLdLG8yc1O88g4booV1dd/+K
 3+D1layqNNvoT0dDRwBrea3gHD4AyNR9qHtPmiTWi3e1KYbzA/OTc3wucHtc30Bf
 /PwuOPEp6VyKD1wqE75d9cks2TgbsG9rxYrmWyxp3sfGsXO3FgiNul8JNXqz/P3Q
 U9SR9jXJ8GKW/e5DUfM+c6hK9kXFmccK0hf7+2TDoFOxdCss+RY8VTALqxcc89TC
 UISEP+1KeGmSFzNc+Re+FvLpjQKFfTKe8Ak2sVXySdK+w5uZbUGhE82RxaDDldjN
 u7iZRIHkc5Y8GDFWvHED8awsMcFsrqnrGunYmqahBek8eQu7JXU=
 =ck1B
 -----END PGP SIGNATURE-----

Merge 4.19.304 into android-4.19-stable

Changes in 4.19.304
	arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names
	ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
	ALSA: hda/realtek: Enable headset onLenovo M70/M90
	ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
	ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE
	ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
	reset: Fix crash when freeing non-existent optional resets
	s390/vx: fix save/restore of fpu kernel context
	wifi: mac80211: mesh_plink: fix matches_local logic
	net/mlx5: improve some comments
	net/mlx5: Fix fw tracer first block check
	net: sched: ife: fix potential use-after-free
	ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
	net/rose: fix races in rose_kill_by_device()
	net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
	afs: Fix the dynamic root's d_delete to always delete unused dentries
	net: warn if gso_type isn't set for a GSO SKB
	net: check dev->gso_max_size in gso_features_check()
	pinctrl: at91-pio4: use dedicated lock class for IRQ
	smb: client: fix NULL deref in asn1_ber_decoder()
	btrfs: do not allow non subvolume root targets for snapshot
	iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
	Input: ipaq-micro-keys - add error handling for devm_kmemdup
	scsi: bnx2fc: Remove set but not used variable 'oxid'
	scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
	iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
	wifi: cfg80211: Add my certificate
	wifi: cfg80211: fix certs build to not depend on file order
	USB: serial: ftdi_sio: update Actisense PIDs constant names
	USB: serial: option: add Quectel EG912Y module support
	USB: serial: option: add Foxconn T99W265 with new baseline
	USB: serial: option: add Quectel RM500Q R13 firmware support
	Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
	net: 9p: avoid freeing uninit memory in p9pdu_vreadf
	net: rfkill: gpio: set GPIO direction
	x86/alternatives: Sync core before enabling interrupts
	usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
	usb: fotg210-hcd: delete an incorrect bounds test
	smb: client: fix OOB in smbCalcSize()
	dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
	block: Don't invalidate pagecache for invalid falloc modes
	Linux 4.19.304

Change-Id: I924e0479cdd444b14c25d83a165ca082fa2c9f80
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-01-08 16:07:42 +00:00
Wei Yongjun
ce228fff38 scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
[ Upstream commit 08c94d80b2da481652fb633e79cbc41e9e326a91 ]

skb_share_check() already drops the reference to the skb when returning
NULL. Using kfree_skb() in the error handling path leads to an skb double
free.

Fix this by removing the variable tmp_skb, and return directly when
skb_share_check() returns NULL.

Fixes: 01a4cc4d0c ("bnx2fc: do not add shared skbs to the fcoe_rx_list")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20221114110626.526643-1-weiyongjun@huaweicloud.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-08 11:27:35 +01:00
YueHaibing
5777781b66 scsi: bnx2fc: Remove set but not used variable 'oxid'
[ Upstream commit efcbe99818ac9bd93ac41e8cf954e9aa64dd9971 ]

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/scsi/bnx2fc/bnx2fc_fcoe.c: In function 'bnx2fc_rcv':
drivers/scsi/bnx2fc/bnx2fc_fcoe.c:435:17: warning:
 variable 'oxid' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 08c94d80b2da ("scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-08 11:27:35 +01:00
Michael Bestas
33ef102789
Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-12-01

* tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Revert "macsec: use DEV_STATS_INC()"
  Revert "net: add DEV_STATS_READ() helper"
  Linux 4.19.300
  net: sched: fix race condition in qdisc_graft()
  iomap: Set all uptodate bits for an Uptodate page
  scsi: virtio_scsi: limit number of hw queues by nr_cpu_ids
  drm/amdgpu: fix error handling in amdgpu_bo_list_get()
  ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks
  ext4: correct return value of ext4_convert_meta_bg
  ext4: correct offset of gdb backup in non meta_bg group to update_backups
  ext4: apply umask if ACL support is disabled
  Revert "net: r8169: Disable multicast filter for RTL8168H and RTL8107E"
  media: venus: hfi: add checks to handle capabilities from firmware
  media: venus: hfi: fix the check to handle session buffer requirement
  media: venus: hfi_parser: Add check to keep the number of codecs within range
  media: sharp: fix sharp encoding
  media: lirc: drop trailing space from scancode transmit
  i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
  net: dsa: lan9303: consequently nested-lock physical MDIO
  tty: serial: meson: fix hard LOCKUP on crtscts mode
  serial: meson: Use platform_get_irq() to get the interrupt
  tty: serial: meson: retrieve port FIFO size from DT
  serial: meson: remove redundant initialization of variable id
  tty: serial: meson: if no alias specified use an available id
  ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC
  ALSA: info: Fix potential deadlock at disconnection
  parisc/pgtable: Do not drop upper 5 address bits of physical address
  parisc: Prevent booting 64-bit kernels on PA1.x machines
  dmaengine: stm32-mdma: correct desc prep when channel running
  mcb: fix error handling for different scenarios when parsing
  quota: explicitly forbid quota files from being encrypted
  jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev
  PM: hibernate: Clean up sync_read handling in snapshot_write_next()
  PM: hibernate: Use __get_safe_page() rather than touching the list
  mmc: vub300: fix an error code
  clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from PLL clocks
  parisc/pdc: Add width field to struct pdc_model
  PCI: keystone: Don't discard .probe() callback
  PCI: keystone: Don't discard .remove() callback
  genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
  mmc: meson-gx: Remove setting of CMD_CFG_ERROR
  PCI/sysfs: Protect driver's D3cold preference from user space
  hvc/xen: fix error path in xen_hvc_init() to always register frontend driver
  audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()
  audit: don't take task_lock() in audit_exe_compare() code path
  KVM: x86: Ignore MSR_AMD64_TW_CFG access
  randstruct: Fix gcc-plugin performance mode to stay in group
  media: venus: hfi: add checks to perform sanity on queue pointers
  cifs: spnego: add ';' in HOST_KEY_LEN
  macvlan: Don't propagate promisc change to lower dev in passthru
  net: ethernet: cortina: Fix MTU max setting
  net: ethernet: cortina: Handle large frames
  net: ethernet: cortina: Fix max RX frame define
  ptp: annotate data-race around q->head and q->tail
  xen/events: fix delayed eoi list handling
  ppp: limit MRU to 64K
  tipc: Fix kernel-infoleak due to uninitialized TLV value
  tty: Fix uninit-value access in ppp_sync_receive()
  ipvlan: add ipvlan_route_v6_outbound() helper
  NFSv4.1: fix SP4_MACH_CRED protection for pnfs IO
  pwm: Fix double shift bug
  drm/amd/display: Avoid NULL dereference of timing generator
  gfs2: ignore negated quota changes
  media: vivid: avoid integer overflow
  media: gspca: cpia1: shift-out-of-bounds in set_flicker
  i2c: sun6i-p2wi: Prevent potential division by zero
  usb: gadget: f_ncm: Always set current gadget in ncm_bind()
  tty: vcc: Add check for kstrdup() in vcc_probe()
  HID: Add quirk for Dell Pro Wireless Keyboard and Mouse KM5221W
  scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
  atm: iphase: Do PCI error checks on own line
  ALSA: hda: Fix possible null-ptr-deref when assigning a stream
  ARM: 9320/1: fix stack depot IRQ stack filter
  jfs: fix array-index-out-of-bounds in diAlloc
  jfs: fix array-index-out-of-bounds in dbFindLeaf
  fs/jfs: Add validity check for db_maxag and db_agpref
  fs/jfs: Add check for negative db_l2nbperpage
  RDMA/hfi1: Use FIELD_GET() to extract Link Width
  crypto: pcrypt - Fix hungtask for PADATA_RESET
  selftests/efivarfs: create-read: fix a resource leak
  drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL
  drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga
  drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
  platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e
  Bluetooth: Fix double free in hci_conn_cleanup
  net: annotate data-races around sk->sk_dst_pending_confirm
  net: annotate data-races around sk->sk_tx_queue_mapping
  wifi: ath10k: fix clang-specific fortify warning
  wifi: ath9k: fix clang-specific fortify warnings
  wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
  x86/mm: Drop the 4 MB restriction on minimal NUMA node memory size
  clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware
  clocksource/drivers/timer-imx-gpt: Fix potential memory leak
  perf/core: Bail out early if the request AUX area is out of bound
  locking/ww_mutex/test: Fix potential workqueue corruption
  Revert "ipvlan: properly track tx_errors"
  ANDROID: fix up platform_device ABI break
  Linux 4.19.299
  btrfs: use u64 for buffer sizes in the tree search ioctls
  Revert "mmc: core: Capture correct oemid-bits for eMMC cards"
  fbdev: fsl-diu-fb: mark wr_reg_wa() static
  fbdev: imsttfb: fix a resource leak in probe
  fbdev: imsttfb: Fix error path of imsttfb_probe()
  netfilter: xt_recent: fix (increase) ipv6 literal buffer length
  r8169: respect userspace disabling IFF_MULTICAST
  tg3: power down device only on SYSTEM_POWER_OFF
  net/smc: fix dangling sock under state SMC_APPFINCLOSEWAIT
  net/smc: wait for pending work before clcsock release_sock
  net/smc: postpone release of clcsock
  net: r8169: Disable multicast filter for RTL8168H and RTL8107E
  r8169: improve rtl_set_rx_mode
  dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.
  dccp: Call security_inet_conn_request() after setting IPv4 addresses.
  tipc: Change nla_policy for bearer-related names to NLA_NUL_STRING
  llc: verify mac len before reading mac header
  Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()
  pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
  pwm: sti: Reduce number of allocations and drop usage of chip_data
  pwm: sti: Avoid conditional gotos
  media: dvb-usb-v2: af9035: fix missing unlock
  media: s3c-camif: Avoid inappropriate kfree()
  media: bttv: fix use after free error due to btv->timeout timer
  pcmcia: ds: fix possible name leak in error path in pcmcia_device_add()
  pcmcia: ds: fix refcount leak in pcmcia_device_add()
  pcmcia: cs: fix possible hung task and memory leak pccardd()
  f2fs: fix to initialize map.m_pblk in f2fs_precache_extents()
  dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc()
  USB: usbip: fix stub_dev hub disconnect
  tools: iio: iio_generic_buffer ensure alignment
  tools: iio: iio_generic_buffer: Fix some integer type and calculation
  tools: iio: privatize globals and functions in iio_generic_buffer.c file
  misc: st_core: Do not call kfree_skb() under spin_lock_irqsave()
  dmaengine: ti: edma: handle irq_of_parse_and_map() errors
  usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency
  tty: tty_jobctrl: fix pid memleak in disassociate_ctty()
  leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu'
  ledtrig-cpu: Limit to 8 CPUs
  leds: pwm: Don't disable the PWM when the LED should be off
  leds: pwm: convert to atomic PWM API
  leds: pwm: simplify if condition
  mfd: dln2: Fix double put in dln2_probe
  ASoC: ams-delta.c: use component after check
  ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails
  sh: bios: Revive earlyprintk support
  RDMA/hfi1: Workaround truncation compilation error
  ext4: move 'ix' sanity check to corrent position
  ARM: 9321/1: memset: cast the constant byte to unsigned char
  hid: cp2112: Fix duplicate workqueue initialization
  HID: cp2112: Use irqchip template
  nd_btt: Make BTT lanes preemptible
  sched/rt: Provide migrate_disable/enable() inlines
  hwrng: geode - fix accessing registers
  clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
  firmware: ti_sci: Mark driver as non removable
  ARM: dts: qcom: mdm9615: populate vsdcc fixed regulator
  drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe()
  drm/radeon: possible buffer overflow
  drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs
  hwmon: (coretemp) Fix potentially truncated sysfs attribute name
  platform/x86: wmi: Fix opening of char device
  platform/x86: wmi: remove unnecessary initializations
  platform/x86: wmi: Fix probe failure when failing to register WMI devices
  clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data
  clk: mediatek: clk-mt6797: Add check for mtk_alloc_clk_data
  clk: npcm7xx: Fix incorrect kfree
  clk: keystone: pll: fix a couple NULL vs IS_ERR() checks
  clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies
  regmap: debugfs: Fix a erroneous check after snprintf()
  ipvlan: properly track tx_errors
  net: add DEV_STATS_READ() helper
  macsec: use DEV_STATS_INC()
  macsec: Fix traffic counters/statistics
  ipv6: avoid atomic fragment on GSO packets
  ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias()
  chtls: fix tp->rcv_tstamp initialization
  thermal: core: prevent potential string overflow
  can: dev: can_restart(): fix race condition between controller restart and netif_carrier_on()
  can: dev: can_restart(): don't crash kernel if carrier is OK
  can: dev: move driver related infrastructure into separate subdir
  wifi: rtlwifi: fix EDCA limit set by BT coexistence
  tcp_metrics: do not create an entry from tcp_init_metrics()
  tcp_metrics: properly set tp->snd_ssthresh in tcp_init_metrics()
  tcp_metrics: add missing barriers on delete
  i40e: fix potential memory leaks in i40e_remove()
  genirq/matrix: Exclude managed interrupts in irq_matrix_allocated()
  vfs: fix readahead(2) on block devices
  Linux 4.19.298
  tty: 8250: Add support for Intashield IS-100
  tty: 8250: Add support for Brainboxes UP cards
  tty: 8250: Add support for additional Brainboxes UC cards
  tty: 8250: Remove UC-257 and UC-431
  usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
  PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
  remove the sx8 block driver
  ata: ahci: fix enum constants for gcc-13
  net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
  platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e
  scsi: mpt3sas: Fix in error path
  fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit()
  ASoC: rt5650: fix the wrong result of key button
  netfilter: nfnetlink_log: silence bogus compiler warning
  fbdev: atyfb: only use ioremap_uc() on i386 and ia64
  Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport
  dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
  irqchip/stm32-exti: add missing DT IRQ flag translation
  Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table
  ASoC: simple-card: fixup asoc_simple_probe() error handling
  MAINTAINERS: r8169: Update path to the driver
  x86: Fix .brk attribute in linker script
  rpmsg: Fix possible refcount leak in rpmsg_register_device_override()
  rpmsg: glink: Release driver_override
  rpmsg: Fix calling device_lock() on non-initialized device
  rpmsg: Fix kfree() of static memory on setting driver_override
  rpmsg: Constify local variable in field store macro
  driver: platform: Add helper for safer setting of driver_override
  x86/mm: Fix RESERVE_BRK() for older binutils
  x86/mm: Simplify RESERVE_BRK()
  nfsd: lock_rename() needs both directories to live on the same fs
  f2fs: fix to do sanity check on inode type during garbage collection
  smbdirect: missing rc checks while waiting for rdma events
  kobject: Fix slab-out-of-bounds in fill_kobj_path()
  arm64: fix a concurrency issue in emulation_proc_handler()
  drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
  ARM: 8933/1: replace Sun/Solaris style flag on section directive
  NFS: Don't call generic_error_remove_page() while holding locks
  x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
  iio: exynos-adc: request second interupt only when touchscreen mode is used
  perf/core: Fix potential NULL deref
  nvmem: imx: correct nregs for i.MX6UL
  nvmem: imx: correct nregs for i.MX6SLL
  i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
  i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()
  i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()
  i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
  i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
  gtp: fix fragmentation needed check with gso
  igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
  treewide: Spelling fix in comment
  r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1
  r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1
  r8169: rename r8169.c to r8169_main.c
  virtio-mmio: fix memory leak of vm_dev
  virtio_balloon: Fix endless deflation and inflation on arm64
  mcb-lpc: Reallocate memory region to avoid memory overlapping
  mcb: Return actual parsed size when reading chameleon table
  selftests/ftrace: Add new test case which checks non unique symbol
  mmc: core: sdio: hold retuning if sdio in 1-bit mode
  mmc: sdio: Don't re-initialize powered-on removable SDIO cards at resume

 Conflicts:
	drivers/clk/qcom/clk-rcg2.c
	drivers/leds/leds-pwm.c
	drivers/mmc/core/sdio.c
	drivers/rpmsg/qcom_glink_native.c
	drivers/thermal/thermal_core.c
	drivers/usb/gadget/function/f_ncm.c

Change-Id: I230a2c820e39dd863a874bfc0c7a411896b0ba9c
2023-12-14 13:13:51 +02:00
Greg Kroah-Hartman
cd086b6516 This is the 4.19.302 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmV53vEACgkQONu9yGCS
 aT4wng/9ECVr1tNbX+0oo5p4GFnY2wR3I39TslGkS048Yo1UiW/m7WX2nDJPhJXO
 YLLiSsm0xOKZEn1xDh99L5kIWZHeHywajMdrIDZwRhOtBj8RHX0NyWQQzxg2ftxs
 7IrgXyt/38b6kcQ2or8rqPqINGeZWAErukMfGMQZIMkp48D68cyfPDk0xfFwryAL
 mfn1tQOe6OgPFSbNR7MiV1mWzC6f06J6ZOx3kUvS6tqu0ZF61yhE8QkB/U2dQb/z
 S7VTM4BQ5NuW9BiGfLF39OAppEZ7jB/JZjCzh5h2ZUWpKhxl09u5FFqT81fOqtBN
 b/rhPnNnG1gFarGChrRbdvU4YnomBce7f7knpe0/vUiZW+UBxIW5yagUoXz7Eo0X
 Lyowuj5bXhDAJ1T/G/AV8Fv0eIunBRUyXcdeF6qeHWV2NzDmcYbswY6gh5eWDZL3
 ST83NvEq+p5uGzZHEbjbP3AX0P5wHDPAkhLXKLCwTsylHKrfL12e1+FWY2Jv40PA
 Ze+8SNCZrdHIYXZWSczrGZJM+GJh1KCkOQt/wSkGzPPAmoqcOTyMqD7Tj7o8qUER
 lQGDYzEO7+ZGMQ3QtSqQ//3Mlaeh4JYjzEYgpuXA7bFeepn/9FVDUurKZW39A/o5
 0TTWsgwRlt2j92Jfi8ajbT5aAVJ0+o6KFqElUhc2onMMEWngUXs=
 =Ryx9
 -----END PGP SIGNATURE-----

Merge 4.19.302 into android-4.19-stable

Changes in 4.19.302
	spi: imx: add a device specific prepare_message callback
	spi: imx: move wml setting to later than setup_transfer
	spi: imx: correct wml as the last sg length
	spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook.
	media: davinci: vpif_capture: fix potential double free
	hrtimers: Push pending hrtimers away from outgoing CPU earlier
	netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test
	tg3: Move the [rt]x_dropped counters to tg3_napi
	tg3: Increment tx_dropped in tg3_tso_bug()
	kconfig: fix memory leak from range properties
	drm/amdgpu: correct chunk_ptr to a pointer to chunk.
	ipv6: fix potential NULL deref in fib6_add()
	hv_netvsc: rndis_filter needs to select NLS
	net: arcnet: Fix RESET flag handling
	net: arcnet: com20020 fix error handling
	arcnet: restoring support for multiple Sohard Arcnet cards
	ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()
	net: hns: fix fake link up on xge port
	netfilter: xt_owner: Add supplementary groups option
	netfilter: xt_owner: Fix for unsafe access of sk->sk_socket
	tcp: do not accept ACK of bytes we never sent
	RDMA/bnxt_re: Correct module description string
	hwmon: (acpi_power_meter) Fix 4.29 MW bug
	tracing: Fix a warning when allocating buffered events fails
	scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle()
	ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
	ARM: dts: imx: make gpt node name generic
	ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt
	ALSA: pcm: fix out-of-bounds in snd_pcm_state_names
	packet: Move reference count in packet_sock to atomic_long_t
	nilfs2: prevent WARNING in nilfs_sufile_set_segment_usage()
	tracing: Always update snapshot buffer size
	tracing: Fix incomplete locking when disabling buffered events
	tracing: Fix a possible race when disabling buffered events
	perf/core: Add a new read format to get a number of lost samples
	perf: Fix perf_event_validate_size()
	gpiolib: sysfs: Fix error handling on failed export
	usb: gadget: f_hid: fix report descriptor allocation
	parport: Add support for Brainboxes IX/UC/PX parallel cards
	usb: typec: class: fix typec_altmode_put_partner to put plugs
	serial: sc16is7xx: address RX timeout interrupt errata
	serial: 8250_omap: Add earlycon support for the AM654 UART controller
	x86/CPU/AMD: Check vendor in the AMD microcode callback
	KVM: s390/mm: Properly reset no-dat
	nilfs2: fix missing error check for sb_set_blocksize call
	netlink: don't call ->netlink_bind with table lock held
	genetlink: add CAP_NET_ADMIN test for multicast bind
	psample: Require 'CAP_NET_ADMIN' when joining "packets" group
	drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group
	tools headers UAPI: Sync linux/perf_event.h with the kernel sources
	IB/isert: Fix unaligned immediate-data handling
	devcoredump : Serialize devcd_del work
	devcoredump: Send uevent once devcd is ready
	Linux 4.19.302

Change-Id: If04a1c5d3950ac7c1cbe4b71df951dcf3e8e8ed1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-14 09:05:30 +00:00
Dinghao Liu
9682d5777a scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle()
[ Upstream commit 235f2b548d7f4ac5931d834f05d3f7f5166a2e72 ]

When an error occurs in the for loop of beiscsi_init_wrb_handle(), we
should free phwi_ctxt->be_wrbq before returning an error code to prevent
potential memleak.

Fixes: a7909b396b ("[SCSI] be2iscsi: Fix dynamic CID allocation Mechanism in driver")
Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
Link: https://lore.kernel.org/r/20231123081941.24854-1-dinghao.liu@zju.edu.cn
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 17:42:17 +01:00
Greg Kroah-Hartman
11806753ba This is the 4.19.300 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmVmGaYACgkQONu9yGCS
 aT6nzRAApEttSs9XhWbu1hXqfcOUKBsq2BLss2+9zfp2jwhCVQFQOApU5xggjpww
 5ATVq2FQGEk1kMRpESeDdkW7fnFevwEgyZafYrBbbBk6/9bbWMyqMBhlGP7RWNY9
 KoEhpMOejOYfCc+Z/II+BDf3KK2roXnrO8L5rFnyOTeJxgmofAqWYe5WWtHlcDtK
 z5KceJiXy0ddjgm6+nvpHrfStu9uDs+O63nf0XG6gmgFeRa/tI7hQg1mSUlpR8X3
 Ip5kk5pYjZ+T3gwepDJmhpOLW+xHeXKrbAb3nN38lPrRnnM/7lxp6FJkhkts6FqF
 r/8MgWcKe2XpnxwiLvIFGV4jIG1GNC8ZYdVWYVNZxi+SdD6Jz9qLraAoTQDR6zSR
 R60pond+MdjBzFeKsFvV6F5a4cDTY+REaVK92YV7y1U70IRR9UrsZipxmqcD0dxa
 eRgLxM663DF0b1hjiP2WL4IxQSlVTPMJMj8U6eXtfdHebDOb+J/Qoq7mlQHd9ExL
 S3snvJhAco0+SopK4v4GN1a5SHKx7a2Ua2OOG3CfHTRK3yoH5F/qE/cLpRR6vxxl
 NVyB5N2s9zkgX4p+2rFi8XR2/DsBReTu2C8hzXQ6AGYLZ15qIvRIkXCSUBNZO3tt
 r7h3+oUwmNQ478y7NWpAVGcczZQBel3NjHDZMIdWZJPLVffLP+A=
 =B47s
 -----END PGP SIGNATURE-----

Merge 4.19.300 into android-4.19-stable

Changes in 4.19.300
	locking/ww_mutex/test: Fix potential workqueue corruption
	perf/core: Bail out early if the request AUX area is out of bound
	clocksource/drivers/timer-imx-gpt: Fix potential memory leak
	clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware
	x86/mm: Drop the 4 MB restriction on minimal NUMA node memory size
	wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
	wifi: ath9k: fix clang-specific fortify warnings
	wifi: ath10k: fix clang-specific fortify warning
	net: annotate data-races around sk->sk_tx_queue_mapping
	net: annotate data-races around sk->sk_dst_pending_confirm
	Bluetooth: Fix double free in hci_conn_cleanup
	platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e
	drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
	drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga
	drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL
	selftests/efivarfs: create-read: fix a resource leak
	crypto: pcrypt - Fix hungtask for PADATA_RESET
	RDMA/hfi1: Use FIELD_GET() to extract Link Width
	fs/jfs: Add check for negative db_l2nbperpage
	fs/jfs: Add validity check for db_maxag and db_agpref
	jfs: fix array-index-out-of-bounds in dbFindLeaf
	jfs: fix array-index-out-of-bounds in diAlloc
	ARM: 9320/1: fix stack depot IRQ stack filter
	ALSA: hda: Fix possible null-ptr-deref when assigning a stream
	atm: iphase: Do PCI error checks on own line
	scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
	HID: Add quirk for Dell Pro Wireless Keyboard and Mouse KM5221W
	tty: vcc: Add check for kstrdup() in vcc_probe()
	usb: gadget: f_ncm: Always set current gadget in ncm_bind()
	i2c: sun6i-p2wi: Prevent potential division by zero
	media: gspca: cpia1: shift-out-of-bounds in set_flicker
	media: vivid: avoid integer overflow
	gfs2: ignore negated quota changes
	drm/amd/display: Avoid NULL dereference of timing generator
	pwm: Fix double shift bug
	NFSv4.1: fix SP4_MACH_CRED protection for pnfs IO
	ipvlan: add ipvlan_route_v6_outbound() helper
	tty: Fix uninit-value access in ppp_sync_receive()
	tipc: Fix kernel-infoleak due to uninitialized TLV value
	ppp: limit MRU to 64K
	xen/events: fix delayed eoi list handling
	ptp: annotate data-race around q->head and q->tail
	net: ethernet: cortina: Fix max RX frame define
	net: ethernet: cortina: Handle large frames
	net: ethernet: cortina: Fix MTU max setting
	macvlan: Don't propagate promisc change to lower dev in passthru
	cifs: spnego: add ';' in HOST_KEY_LEN
	media: venus: hfi: add checks to perform sanity on queue pointers
	randstruct: Fix gcc-plugin performance mode to stay in group
	KVM: x86: Ignore MSR_AMD64_TW_CFG access
	audit: don't take task_lock() in audit_exe_compare() code path
	audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()
	hvc/xen: fix error path in xen_hvc_init() to always register frontend driver
	PCI/sysfs: Protect driver's D3cold preference from user space
	mmc: meson-gx: Remove setting of CMD_CFG_ERROR
	genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
	PCI: keystone: Don't discard .remove() callback
	PCI: keystone: Don't discard .probe() callback
	parisc/pdc: Add width field to struct pdc_model
	clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from PLL clocks
	mmc: vub300: fix an error code
	PM: hibernate: Use __get_safe_page() rather than touching the list
	PM: hibernate: Clean up sync_read handling in snapshot_write_next()
	jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev
	quota: explicitly forbid quota files from being encrypted
	mcb: fix error handling for different scenarios when parsing
	dmaengine: stm32-mdma: correct desc prep when channel running
	parisc: Prevent booting 64-bit kernels on PA1.x machines
	parisc/pgtable: Do not drop upper 5 address bits of physical address
	ALSA: info: Fix potential deadlock at disconnection
	ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC
	tty: serial: meson: if no alias specified use an available id
	serial: meson: remove redundant initialization of variable id
	tty: serial: meson: retrieve port FIFO size from DT
	serial: meson: Use platform_get_irq() to get the interrupt
	tty: serial: meson: fix hard LOCKUP on crtscts mode
	net: dsa: lan9303: consequently nested-lock physical MDIO
	i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
	media: lirc: drop trailing space from scancode transmit
	media: sharp: fix sharp encoding
	media: venus: hfi_parser: Add check to keep the number of codecs within range
	media: venus: hfi: fix the check to handle session buffer requirement
	media: venus: hfi: add checks to handle capabilities from firmware
	Revert "net: r8169: Disable multicast filter for RTL8168H and RTL8107E"
	ext4: apply umask if ACL support is disabled
	ext4: correct offset of gdb backup in non meta_bg group to update_backups
	ext4: correct return value of ext4_convert_meta_bg
	ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks
	drm/amdgpu: fix error handling in amdgpu_bo_list_get()
	scsi: virtio_scsi: limit number of hw queues by nr_cpu_ids
	iomap: Set all uptodate bits for an Uptodate page
	net: sched: fix race condition in qdisc_graft()
	Linux 4.19.300

Change-Id: I21f68d5f5dc85afe62bbc6e9a7aac12faee56621
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-30 09:36:03 +00:00
Dongli Zhang
7907729cc5 scsi: virtio_scsi: limit number of hw queues by nr_cpu_ids
commit 1978f30a87732d4d9072a20abeded9fe17884f1b upstream.

When tag_set->nr_maps is 1, the block layer limits the number of hw queues
by nr_cpu_ids. No matter how many hw queues are used by virtio-scsi, as it
has (tag_set->nr_maps == 1), it can use at most nr_cpu_ids hw queues.

In addition, specifically for pci scenario, when the 'num_queues' specified
by qemu is more than maxcpus, virtio-scsi would not be able to allocate
more than maxcpus vectors in order to have a vector for each queue. As a
result, it falls back into MSI-X with one vector for config and one shared
for queues.

Considering above reasons, this patch limits the number of hw queues used
by virtio-scsi by nr_cpu_ids.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-28 16:46:36 +00:00
Wenchao Hao
77072ec41d scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
[ Upstream commit 4df105f0ce9f6f30cda4e99f577150d23f0c9c5f ]

fc_lport_ptp_setup() did not check the return value of fc_rport_create()
which can return NULL and would cause a NULL pointer dereference. Address
this issue by checking return value of fc_rport_create() and log error
message on fc_rport_create() failed.

Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
Link: https://lore.kernel.org/r/20231011130350.819571-1-haowenchao2@huawei.com
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-28 16:46:32 +00:00
Michael Bestas
9cd6ae99b7
Merge tag 'ASB-2023-11-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-11-01

* tag 'ASB-2023-11-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Reapply "perf: Disallow mis-matched inherited group reads"
  Revert "perf: Disallow mis-matched inherited group reads"
  Revert "xfrm: fix a data-race in xfrm_gen_index()"
  Revert "Bluetooth: hci_core: Fix build warnings"
  Revert "xfrm: interface: use DEV_STATS_INC()"
  Linux 4.19.297
  xfrm6: fix inet6_dev refcount underflow problem
  Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name
  Bluetooth: hci_sock: fix slab oob read in create_monitor_event
  phy: mapphone-mdm6600: Fix runtime PM for remove
  ASoC: pxa: fix a memory leak in probe()
  gpio: vf610: set value before the direction to avoid a glitch
  s390/pci: fix iommu bitmap allocation
  perf: Disallow mis-matched inherited group reads
  USB: serial: option: add Fibocom to DELL custom modem FM101R-GL
  USB: serial: option: add entry for Sierra EM9191 with new firmware
  USB: serial: option: add Telit LE910C4-WWX 0x1035 composition
  ACPI: irq: Fix incorrect return value in acpi_register_gsi()
  Revert "pinctrl: avoid unsafe code pattern in find_pinctrl()"
  mmc: core: Capture correct oemid-bits for eMMC cards
  mtd: spinand: micron: correct bitmask for ecc status
  mtd: rawnand: qcom: Unmap the right resource upon probe failure
  Bluetooth: hci_event: Fix using memcmp when comparing keys
  btrfs: fix some -Wmaybe-uninitialized warnings in ioctl.c
  drm: panel-orientation-quirks: Add quirk for One Mix 2S
  sky2: Make sure there is at least one frag_addr available
  wifi: cfg80211: avoid leaking stack data into trace
  wifi: mac80211: allow transmitting EAPOL frames with tainted key
  Bluetooth: hci_core: Fix build warnings
  Bluetooth: Avoid redundant authentication
  HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event
  tracing: relax trace_event_eval_update() execution with cond_resched()
  ata: libata-eh: Fix compilation warning in ata_eh_link_report()
  gpio: timberdale: Fix potential deadlock on &tgpio->lock
  overlayfs: set ctime when setting mtime and atime
  i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
  btrfs: initialize start_slot in btrfs_log_prealloc_extents
  btrfs: return -EUCLEAN for delayed tree ref with a ref count not equals to 1
  ARM: dts: ti: omap: Fix noisy serial with overrun-throttle-ms for mapphone
  libceph: use kernel_connect()
  libceph: fix unaligned accesses in ceph_entity_addr handling
  net: pktgen: Fix interface flags printing
  netfilter: nft_set_rbtree: .deactivate fails if element has expired
  net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve
  i40e: prevent crash on probe if hw registers have invalid values
  net: usb: smsc95xx: Fix an error code in smsc95xx_reset()
  tcp: tsq: relax tcp_small_queue_check() when rtx queue contains a single skb
  tcp: fix excessive TLP and RACK timeouts from HZ rounding
  net: rfkill: gpio: prevent value glitch during probe
  net: ipv6: fix return value check in esp_remove_trailer
  net: ipv4: fix return value check in esp_remove_trailer
  xfrm: interface: use DEV_STATS_INC()
  xfrm: fix a data-race in xfrm_gen_index()
  netfilter: nft_payload: fix wrong mac header matching
  KVM: x86: Mask LVTPC when handling a PMI
  regmap: fix NULL deref on lookup
  nfc: nci: fix possible NULL pointer dereference in send_acknowledge()
  Bluetooth: avoid memcmp() out of bounds warning
  Bluetooth: hci_event: Fix coding style
  Bluetooth: vhci: Fix race when opening vhci device
  Bluetooth: Fix a refcnt underflow problem for hci_conn
  Bluetooth: Reject connection with the device which has same BD_ADDR
  Bluetooth: hci_event: Ignore NULL link key
  usb: hub: Guard against accesses to uninitialized BOS descriptors
  dev_forward_skb: do not scrub skb mark within the same name space
  x86/alternatives: Disable KASAN in apply_alternatives()
  powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()
  usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call
  usb: gadget: udc-xilinx: replace memcpy with memcpy_toio
  x86/cpu: Fix AMD erratum #1485 on Zen4-based CPUs
  pinctrl: avoid unsafe code pattern in find_pinctrl()
  cgroup: Remove duplicates in cgroup v1 tasks file
  Input: xpad - add PXN V900 support
  Input: psmouse - fix fast_reconnect function for PS/2 mode
  Input: powermate - fix use-after-free in powermate_config_complete
  ceph: fix incorrect revoked caps assert in ceph_fill_file_size()
  mcb: remove is_added flag from mcb_device struct
  iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
  iio: pressure: bmp280: Fix NULL pointer exception
  usb: musb: Modify the "HWVers" register address
  usb: musb: Get the musb_qh poniter after musb_giveback
  usb: dwc3: Soft reset phy on probe for host
  net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read
  usb: xhci: xhci-ring: Use sysdev for mapping bounce buffer
  dmaengine: stm32-mdma: abort resume if no ongoing transfer
  sched,idle,rcu: Push rcu_idle deeper into the idle path
  workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()
  nfc: nci: assert requested protocol is valid
  net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()
  ixgbe: fix crash with empty VF macvlan list
  drm/vmwgfx: fix typo of sizeof argument
  xen-netback: use default TX queue size for vifs
  ieee802154: ca8210: Fix a potential UAF in ca8210_probe
  drm/msm/dsi: skip the wait for video mode done if not applicable
  drm: etvnaviv: fix bad backport leading to warning
  net: prevent address rewrite in kernel_bind()
  quota: Fix slow quotaoff
  HID: logitech-hidpp: Fix kernel crash on receiver USB disconnect
  RDMA/cxgb4: Check skb value for failure to allocate
  net: prevent rewrite of msg_name in sock_sendmsg()
  net: fix kernel-doc warnings for socket.c
  net: use indirect calls helpers at the socket layer
  indirect call wrappers: helpers to speed-up indirect calls of builtin
  Revert "net: add atomic_long_t to net_device_stats fields"
  Revert "net: Fix unwanted sign extension in netdev_stats_to_stats64()"
  Revert "net: bridge: use DEV_STATS_INC()"
  Linux 4.19.296
  xen/events: replace evtchn_rwlock with RCU
  rtnetlink: Reject negative ifindexes in RTM_NEWLINK
  Revert "rtnetlink: Reject negative ifindexes in RTM_NEWLINK"
  dccp: fix dccp_v4_err()/dccp_v6_err() again
  parisc: Restore __ldcw_align for PA-RISC 2.0 processors
  RDMA/mlx5: Fix NULL string error
  RDMA/cma: Fix truncation compilation warning in make_cma_ports
  gpio: pxa: disable pinctrl calls for MMP_GPIO
  gpio: aspeed: fix the GPIO number passed to pinctrl_gpio_set_config()
  IB/mlx4: Fix the size of a buffer in add_port_entries()
  cpupower: add Makefile dependencies for install targets
  sctp: update hb timer immediately after users change hb_interval
  sctp: update transport state when processing a dupcook packet
  tcp: fix delayed ACKs for MSS boundary condition
  tcp: fix quick-ack counting to count actual ACKs of new data
  net: stmmac: dwmac-stm32: fix resume on STM32 MCU
  net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg
  ipv4, ipv6: Fix handling of transhdrlen in __ip{,6}_append_data()
  modpost: add missing else to the "of" check
  scsi: target: core: Fix deadlock due to recursive locking
  regmap: rbtree: Fix wrong register marked as in-cache when creating new node
  drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()
  wifi: mwifiex: Fix oob check condition in mwifiex_process_rx_packet
  ubi: Refuse attaching if mtd's erasesize is 0
  net: replace calls to sock->ops->connect() with kernel_connect()
  wifi: mwifiex: Fix tlv_buf_left calculation
  qed/red_ll2: Fix undefined behavior bug in struct qed_ll2_info
  scsi: zfcp: Fix a double put in zfcp_port_enqueue()
  Revert "PCI: qcom: Disable write access to read only registers for IP v2.3.3"
  media: dvb: symbol fixup for dvb_attach() - again
  Revert "drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions"
  ata: libata: disallow dev-initiated LPM transitions to unsupported states
  ext4: fix rec_len verify error
  fs: binfmt_elf_efpic: fix personality for ELF-FDPIC
  ata: libata-sata: increase PMP SRST timeout to 10s
  ata: libata-core: Do not register PM operations for SAS ports
  ata: libata-core: Fix port and device removal
  ata: libata-core: Fix ata_port_request_pm() locking
  net: thunderbolt: Fix TCPv6 GSO checksum calculation
  btrfs: properly report 0 avail for very full file systems
  i2c: i801: unregister tco_pdev in i801_probe() error path
  ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES
  ALSA: hda: Disable power save for solving pop issue on Lenovo ThinkCentre M70q
  nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()
  serial: 8250_port: Check IRQ data before use
  smack: Record transmuting in smk_transmuted
  smack: Retrieve transmuting information in smack_inode_getsecurity()
  Smack:- Use overlay inode label in smack_inode_copy_up()
  scsi: megaraid_sas: Enable msix_load_balance for Invader and later controllers
  net: Fix unwanted sign extension in netdev_stats_to_stats64()
  watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running
  watchdog: iTCO_wdt: No need to stop the timer in probe
  nvme-pci: do not set the NUMA node of device if it has none
  fbdev/sh7760fb: Depend on FB=y
  bpf: Clarify error expectations from bpf_clone_redirect
  ata: libata-eh: do not clear ATA_PFLAG_EH_PENDING in ata_eh_reset()
  ring-buffer: Avoid softlockup in ring_buffer_resize()
  selftests/ftrace: Correctly enable event in instance-event.tc
  parisc: irq: Make irq_stack_union static to avoid sparse warning
  parisc: drivers: Fix sparse warning
  parisc: iosapic.c: Fix sparse warnings
  parisc: sba: Fix compile warning wrt list of SBA devices
  gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
  ARM: dts: ti: omap: motorola-mapphone: Fix abe_clkctrl warning on boot
  clk: tegra: fix error return case for recalc_rate
  MIPS: Alchemy: only build mmc support helpers if au1xmmc is enabled
  ext4: do not let fstrim block system suspend
  ext4: move setting of trimmed bit into ext4_try_to_trim_range()
  ext4: replace the traditional ternary conditional operator with with max()/min()
  ext4: mark group as trimmed only if it was fully scanned
  ext4: change s_last_trim_minblks type to unsigned long
  ext4: scope ret locally in ext4_try_to_trim_range()
  ext4: add new helper interface ext4_try_to_trim_range()
  ext4: remove the 'group' parameter of ext4_trim_extent
  scsi: megaraid_sas: Fix deadlock on firmware crashdump
  scsi: megaraid_sas: Load balance completions across all MSI-X
  scsi: qla2xxx: Remove unsupported ql2xenabledif option
  scsi: qla2xxx: Add protection mask module parameters
  Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
  i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()
  gpio: tb10x: Fix an error handling path in tb10x_gpio_probe()
  team: fix null-ptr-deref when team device type is changed
  net: bridge: use DEV_STATS_INC()
  net: add atomic_long_t to net_device_stats fields
  net: hns3: add 5ms delay before clear firmware reset irq source
  powerpc/perf/hv-24x7: Update domain value check
  ipv4: fix null-deref in ipv4_link_failure
  selftests: tls: swap the TX and RX sockets in some tests
  selftests/tls: Add {} to avoid static checker warning
  netfilter: nf_tables: disallow element removal on anonymous sets
  ata: libahci: clear pending interrupt status
  ata: ahci: Drop pointless VPRINTK() calls and convert the remaining ones
  NFS/pNFS: Report EINVAL errors from connect() to the server
  ANDROID: ALSA: jack: Revert mismerge done in v4.19.291

 Conflicts:
	include/net/tcp.h
	kernel/events/core.c
	kernel/sched/idle.c

Change-Id: I141cc494dcfda5fbd11f8bd2f7166bf3bf157084
2023-11-09 14:55:01 +02:00
Greg Kroah-Hartman
4f5e88e555 This is the 4.19.298 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmVLYWMACgkQONu9yGCS
 aT7TWxAArWfLx5B55f2sGj/cDvs2xil315t1p/uhXCtgcstc/E+lxRipw3Bi3B0g
 IwoBHoxteAhHVzscTJUypzi/lzNdKuIoNvtD/IxpIt/vcP2T/JMBVzrMTsClGkDI
 xnaMq51lWT6Kpc3zt0k4EeAA9ifAeM45kIbZlPooJ15D6zuCLLMGdKiai8eYbOkM
 X65dzw2FxtCvIP3FfBxr4opRsWmkXSxD7diRVe4XPE/RyLFePPMitFg/NvpK/QLW
 +3aR6n0hhafvsYBE3T2+mb2A408uK7nT4aup25k9JF/RKhSzU2ZKTTZEtp92pZBr
 pHiUGa2bitYryBvSt69wRRamqctonrwXcW0FCAX+JxxujcfBmSR/z1GudQEbKBm8
 ALY2vgoDHeilbVxUCVGqnBpvu8NgwBw7J3z5S5m913X2CtMpeotvGzgksEE+gzdV
 Dw+l6bhj0vxAveYEgA5WVritymrh9NFNPQh32zeMG6FCcQCzuUd3gZPDECjcgFji
 keK3e71vjVemvgsvwAyx1WPpD0KDwjqZCAUL39Zmc7gQUzLZx8E2ujTIabefwJIA
 L3RQHFsVE141FojccKFpHhF/5ne6qAv74ZlXz0DBxstgx/acUCxqN7XJSVZw7OHN
 bpF3F3KNv1xOpN28rh+4Qjzds4TKQ+de9OEVJA3ZG2QuUqoFWXE=
 =013M
 -----END PGP SIGNATURE-----

Merge 4.19.298 into android-4.19-stable

Changes in 4.19.298
	mmc: sdio: Don't re-initialize powered-on removable SDIO cards at resume
	mmc: core: sdio: hold retuning if sdio in 1-bit mode
	selftests/ftrace: Add new test case which checks non unique symbol
	mcb: Return actual parsed size when reading chameleon table
	mcb-lpc: Reallocate memory region to avoid memory overlapping
	virtio_balloon: Fix endless deflation and inflation on arm64
	virtio-mmio: fix memory leak of vm_dev
	r8169: rename r8169.c to r8169_main.c
	r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1
	r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1
	treewide: Spelling fix in comment
	igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
	gtp: fix fragmentation needed check with gso
	i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
	i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
	i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()
	i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()
	i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
	nvmem: imx: correct nregs for i.MX6SLL
	nvmem: imx: correct nregs for i.MX6UL
	perf/core: Fix potential NULL deref
	iio: exynos-adc: request second interupt only when touchscreen mode is used
	x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
	NFS: Don't call generic_error_remove_page() while holding locks
	ARM: 8933/1: replace Sun/Solaris style flag on section directive
	drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
	arm64: fix a concurrency issue in emulation_proc_handler()
	kobject: Fix slab-out-of-bounds in fill_kobj_path()
	smbdirect: missing rc checks while waiting for rdma events
	f2fs: fix to do sanity check on inode type during garbage collection
	nfsd: lock_rename() needs both directories to live on the same fs
	x86/mm: Simplify RESERVE_BRK()
	x86/mm: Fix RESERVE_BRK() for older binutils
	driver: platform: Add helper for safer setting of driver_override
	rpmsg: Constify local variable in field store macro
	rpmsg: Fix kfree() of static memory on setting driver_override
	rpmsg: Fix calling device_lock() on non-initialized device
	rpmsg: glink: Release driver_override
	rpmsg: Fix possible refcount leak in rpmsg_register_device_override()
	x86: Fix .brk attribute in linker script
	MAINTAINERS: r8169: Update path to the driver
	ASoC: simple-card: fixup asoc_simple_probe() error handling
	Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table
	irqchip/stm32-exti: add missing DT IRQ flag translation
	dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
	Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport
	fbdev: atyfb: only use ioremap_uc() on i386 and ia64
	netfilter: nfnetlink_log: silence bogus compiler warning
	ASoC: rt5650: fix the wrong result of key button
	fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit()
	scsi: mpt3sas: Fix in error path
	platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e
	net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
	ata: ahci: fix enum constants for gcc-13
	remove the sx8 block driver
	PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
	usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
	tty: 8250: Remove UC-257 and UC-431
	tty: 8250: Add support for additional Brainboxes UC cards
	tty: 8250: Add support for Brainboxes UP cards
	tty: 8250: Add support for Intashield IS-100
	Linux 4.19.298

Change-Id: Ifb32a27a5d614f8234d0fb282c57304fdd2ce5de
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-08 11:10:34 +00:00
Tomas Henzl
0af1e2367e scsi: mpt3sas: Fix in error path
[ Upstream commit e40c04ade0e2f3916b78211d747317843b11ce10 ]

The driver should be deregistered as misc driver after PCI registration
failure.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Link: https://lore.kernel.org/r/20231015114529.10725-1-thenzl@redhat.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-08 11:22:20 +01:00
Michael Bestas
dd55724109
Merge tag 'ASB-2023-10-06_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-10-01

* tag 'ASB-2023-10-06_4.19-stable' of https://android.googlesource.com/kernel/common:
  UPSTREAM: net/sched: sch_hfsc: Ensure inner classes have fsc curve
  UPSTREAM: net: sched: sch_qfq: Fix UAF in qfq_dequeue()
  Linux 4.19.295
  net/sched: Retire rsvp classifier
  net/sched: cls_fw: No longer copy tcf_result on update to avoid use-after-free
  mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller
  nfsd: fix change_info in NFSv4 RENAME replies
  btrfs: fix lockdep splat and potential deadlock after failure running delayed items
  attr: block mode changes of symlinks
  md/raid1: fix error: ISO C90 forbids mixed declarations
  kobject: Add sanity check for kset->kobj.ktype in kset_register()
  media: pci: ipu3-cio2: Initialise timing struct to avoid a compiler warning
  serial: cpm_uart: Avoid suspicious locking
  scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show()
  usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc
  media: pci: cx23885: replace BUG with error return
  media: tuners: qt1010: replace BUG_ON with a regular error
  iio: core: Use min() instead of min_t() to make code more robust
  media: az6007: Fix null-ptr-deref in az6007_i2c_xfer()
  media: anysee: fix null-ptr-deref in anysee_master_xfer
  media: af9005: Fix null-ptr-deref in af9005_i2c_xfer
  media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
  media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer
  powerpc/pseries: fix possible memory leak in ibmebus_bus_init()
  jfs: fix invalid free of JFS_IP(ipimap)->i_imap in diUnmount
  fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount()
  ext2: fix datatype of block number in ext2_xattr_set2()
  md: raid1: fix potential OOB in raid1_remove_disk()
  drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()
  alx: fix OOB-read compiler warning
  tpm_tis: Resend command to recover from data transfer errors
  crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()
  wifi: mwifiex: fix fortify warning
  wifi: ath9k: fix printk specifier
  hw_breakpoint: fix single-stepping when using bpf_overflow_handler
  ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470
  ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer
  btrfs: output extra debug info if we failed to find an inline backref
  autofs: fix memory leak of waitqueues in autofs_catatonic_mode
  parisc: Drop loops_per_jiffy from per_cpu struct
  drm/amd/display: Fix a bug when searching for insert_above_mpcc
  kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg().
  ixgbe: fix timestamp configuration code
  kcm: Fix memory leak in error path of kcm_sendmsg()
  net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()
  perf hists browser: Fix hierarchy mode header
  mtd: rawnand: brcmnand: Fix potential false time out warning
  mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write
  mtd: rawnand: brcmnand: Fix crash during the panic_write
  btrfs: don't start transaction when joining with TRANS_JOIN_NOSTART
  ata: pata_ftide010: Add missing MODULE_DESCRIPTION
  ata: sata_gemini: Add missing MODULE_DESCRIPTION
  netfilter: nfnetlink_osf: avoid OOB read
  idr: fix param name in idr_alloc_cyclic() doc
  igb: Change IGB_MIN to allow set rx/tx value between 64 and 80
  igbvf: Change IGBVF_MIN to allow set rx/tx value between 64 and 80
  kcm: Destroy mutex in kcm_exit_net()
  net: sched: sch_qfq: Fix UAF in qfq_dequeue()
  af_unix: Fix data race around sk->sk_err.
  af_unix: Fix data-races around sk->sk_shutdown.
  af_unix: Fix data-race around unix_tot_inflight.
  af_unix: Fix data-races around user->unix_inflight.
  net: ipv6/addrconf: avoid integer underflow in ipv6_create_tempaddr
  veth: Fixing transmit return status for dropped packets
  igb: disable virtualization features on 82580
  net: read sk->sk_family once in sk_mc_loop()
  pwm: lpc32xx: Remove handling of PWM channels
  watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load
  x86/virt: Drop unnecessary check on extended CPUID level in cpu_has_svm()
  kconfig: fix possible buffer overflow
  NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info
  soc: qcom: qmi_encdec: Restrict string length in decode
  clk: qcom: gcc-mdm9615: use proper parent for pll0_vote clock
  parisc: led: Reduce CPU overhead for disk & lan LED computation
  parisc: led: Fix LAN receive and transmit LEDs
  drm/ast: Fix DRAM init on AST2200
  fbdev/ep93xx-fb: Do not assign to struct fb_info.dev
  scsi: qla2xxx: Turn off noisy message log
  scsi: qla2xxx: fix inconsistent TMF timeout
  udf: initialize newblock to 0
  usb: typec: tcpci: clear the fault status bit
  serial: sc16is7xx: fix broken port 0 uart init
  sc16is7xx: Set iobase to device index
  PCI/ATS: Add inline to pci_prg_resp_pasid_required()
  pstore/ram: Check start of empty przs during init
  net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
  X.509: if signature is unsupported skip validation
  cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
  crypto: stm32 - fix loop iterating through scatterlist for DMA
  dccp: Fix out of bounds access in DCCP error handler
  dlm: fix plock lookup when using multiple lockspaces
  parisc: Fix /proc/cpuinfo output for lscpu
  procfs: block chmod on /proc/thread-self/comm
  Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
  ntb: Fix calculation ntb_transport_tx_free_entry()
  ntb: Clean up tx tail index on link down
  ntb: Drop packets when qp link is down
  media: dvb: symbol fixup for dvb_attach()
  backlight/lv5207lp: Compare against struct fb_info.device
  backlight/bd6107: Compare against struct fb_info.device
  backlight/gpio_backlight: Compare against struct fb_info.device
  ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
  ipmi_si: fix a memleak in try_smi_init()
  ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
  PM / devfreq: Fix leak in devfreq_dev_release()
  igb: set max size RX buffer when store bad packet is enabled
  skbuff: skb_segment, Call zero copy functions before using skbuff frags
  netfilter: xt_sctp: validate the flag_info count
  netfilter: xt_u32: validate user space input
  netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
  igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
  dmaengine: ste_dma40: Add missing IRQ check in d40_probe
  um: Fix hostaudio build errors
  arch: um: drivers: Kconfig: pedantic formatting
  rpmsg: glink: Add check for kstrdup
  HID: multitouch: Correct devm device reference for hidinput input_dev name
  Revert "IB/isert: Fix incorrect release of isert connection"
  amba: bus: fix refcount leak
  serial: tegra: handle clk prepare error in tegra_uart_hw_init()
  scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
  scsi: core: Use 32-bit hostnum in scsi_host_lookup()
  cgroup:namespace: Remove unused cgroup_namespaces_init()
  media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors
  media: ov2680: Fix vflip / hflip set functions
  media: ov2680: Fix ov2680_bayer_order()
  media: ov2680: Remove auto-gain and auto-exposure controls
  media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips
  USB: gadget: f_mass_storage: Fix unused variable warning
  media: go7007: Remove redundant if statement
  IB/uverbs: Fix an potential error pointer dereference
  dma-buf/sync_file: Fix docs syntax
  scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
  scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
  x86/APM: drop the duplicate APM_MINOR_DEV macro
  scsi: qla4xxx: Add length check when parsing nlattrs
  scsi: be2iscsi: Add length check when parsing nlattrs
  scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
  usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()
  media: mediatek: vcodec: Return NULL if no vdec_fb is found
  media: cx24120: Add retval check for cx24120_message_send()
  media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
  media: dib7000p: Fix potential division by zero
  drivers: usb: smsusb: fix error handling code in smsusb_init_device
  media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
  media: v4l2-fwnode: simplify v4l2_fwnode_parse_link
  media: v4l2-fwnode: fix v4l2_fwnode_parse_link handling
  media: Use of_node_name_eq for node name comparisons
  NFSD: da_addr_body field missing in some GETDEVICEINFO replies
  fs: lockd: avoid possible wrong NULL parameter
  jfs: validate max amount of blocks before allocation.
  powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
  nfs/blocklayout: Use the passed in gfp flags
  wifi: ath10k: Use RMW accessors for changing LNKCTL
  drm/radeon: Use RMW accessors for changing LNKCTL
  drm/radeon: Prefer pcie_capability_read_word()
  drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions
  drm/radeon: Correct Transmit Margin masks
  drm/amdgpu: Use RMW accessors for changing LNKCTL
  drm/amdgpu: Prefer pcie_capability_read_word()
  drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions
  drm/amdgpu: Correct Transmit Margin masks
  PCI: Add #defines for Enter Compliance, Transmit Margin
  PCI: Decode PCIe 32 GT/s link speed
  PCI: Cleanup register definition width and whitespace
  PCI/ATS: Add pci_prg_resp_pasid_required() interface.
  PCI/ASPM: Use RMW accessors for changing LNKCTL
  PCI: pciehp: Use RMW accessors for changing LNKCTL
  PCI: Mark NVIDIA T4 GPUs to avoid bus reset
  clk: sunxi-ng: Modify mismatched function name
  drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
  ALSA: ac97: Fix possible error value of *rac97
  of: unittest: Fix overlay type in apply/revert check
  audit: fix possible soft lockup in __audit_inode_child()
  smackfs: Prevent underflow in smk_set_cipso()
  drm/msm/mdp5: Don't leak some plane state
  drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions
  of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
  drm/tegra: dpaux: Fix incorrect return value of platform_get_irq
  drm/tegra: Remove superfluous error messages around platform_get_irq()
  ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
  drm: adv7511: Fix low refresh rate register for ADV7533/5
  ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)
  ARM: dts: s5pv210: add dummy 5V regulator for backlight on SMDKv210
  ARM: dts: s5pv210: correct ethernet unit address in SMDKV210
  ARM: dts: s5pv210: use defines for IRQ flags in SMDKV210
  ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKV210
  ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
  ARM: dts: s3c64xx: align pinctrl with dtschema
  ARM: dts: s3c6410: align node SROM bus node name with dtschema in Mini6410
  ARM: dts: s3c6410: move fixed clocks under root node in Mini6410
  ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
  ARM: dts: BCM53573: Add cells sizes to PCIe node
  ARM: dts: BCM53573: Drop nonexistent #usb-cells
  ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch
  ARM: dts: BCM5301X: Harmonize EHCI/OHCI DT nodes name
  drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar()
  arm64: dts: qcom: msm8996: Add missing interrupt to the USB2 controller
  arm64: dts: msm8996: thermal: Add interrupt support
  quota: fix dqput() to follow the guarantees dquot_srcu should provide
  quota: add new helper dquot_active()
  quota: rename dquot_active() to inode_quota_active()
  quota: factor out dquot_write_dquot()
  quota: avoid increasing DQST_LOOKUPS when iterating over dirty/inuse list
  quota: add dqi_dirty_list description to comment of Dquot List Management
  netrom: Deny concurrent connect().
  net/sched: sch_hfsc: Ensure inner classes have fsc curve
  net: arcnet: Do not call kfree_skb() under local_irq_disable()
  wifi: ath9k: use IS_ERR() with debugfs_create_dir()
  wifi: mwifiex: avoid possible NULL skb pointer dereference
  wifi: ath9k: protect WMI command response buffer replacement with a lock
  wifi: ath9k: fix races between ath9k_wmi_cmd and ath9k_wmi_ctrl_rx
  wifi: mwifiex: Fix missed return in oob checks failed path
  wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
  fs: ocfs2: namei: check return value of ocfs2_add_entry()
  lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
  crypto: caam - fix unchecked return value error
  Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
  wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
  mwifiex: switch from 'pci_' to 'dma_' API
  mwifiex: drop 'set_consistent_dma_mask' log message
  wifi: mwifiex: Fix OOB and integer underflow when rx packets
  can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
  spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
  regmap: rbtree: Use alloc_flags for memory allocations
  tcp: tcp_enter_quickack_mode() should be static
  bpf: Clear the probe_addr for uprobe
  cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
  fs: Fix error checking for d_hash_and_lookup()
  netfilter: nf_tables: missing NFT_TRANS_PREPARE_ERROR in flowtable deactivatation
  netfilter: nft_flow_offload: fix underflow in flowtable reference counter
  new helper: lookup_positive_unlocked()
  eventfd: prevent underflow for eventfd semaphores
  eventfd: Export eventfd_ctx_do_read()
  reiserfs: Check the return value from __getblk()
  Revert "net: macsec: preserve ingress frame ordering"
  udf: Handle error when adding extent to a file
  udf: Check consistency of Space Bitmap Descriptor
  powerpc/32s: Fix assembler warning about r0
  powerpc/32: Include .branch_lt in data section
  net: Avoid address overwrite in kernel_connect
  ALSA: seq: oss: Fix racy open/close of MIDI devices
  cifs: add a warning when the in-flight count goes negative
  sctp: handle invalid error codes without calling BUG()
  bnx2x: fix page fault following EEH recovery
  netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
  scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
  idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
  net: usb: qmi_wwan: add Quectel EM05GV2
  security: keys: perform capable check only on privileged operations
  platform/x86: intel: hid: Always call BTNL ACPI method
  ASoC: atmel: Fix the 8K sample parameter in I2SC master
  ASoc: codecs: ES8316: Fix DMIC config
  fs/nls: make load_nls() take a const parameter
  s390/dasd: fix hanging device after request requeue
  s390/dasd: use correct number of retries for ERP requests
  m68k: Fix invalid .section syntax
  vxlan: generalize vxlan_parse_gpe_hdr and remove unused args
  ethernet: atheros: fix return value check in atl1c_tso_csum()
  ASoC: da7219: Check for failure reading AAD IRQ events
  ASoC: da7219: Flush pending AAD IRQ when suspending
  9p: virtio: make sure 'offs' is initialized in zc_request
  pinctrl: amd: Don't show `Invalid config param` errors
  nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
  nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
  fsi: master-ast-cf: Add MODULE_FIRMWARE macro
  serial: sc16is7xx: fix bug when first setting GPIO direction
  Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition
  HID: wacom: remove the battery when the EKR is off
  USB: serial: option: add FOXCONN T99W368/T99W373 product
  USB: serial: option: add Quectel EM05G variant (0x030e)
  modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
  rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
  mmc: au1xmmc: force non-modular build and remove symbol_get usage
  ARM: pxa: remove use of symbol_get()
  erofs: ensure that the post-EOF tails are all zeroed

 Conflicts:
	include/net/tcp.h

Change-Id: Ia73d7be3d6cae8d4fd38da7c6d85a977840872d3
2023-10-16 15:01:41 +03:00
Greg Kroah-Hartman
7f2e810705 This is the 4.19.296 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmUlqccACgkQONu9yGCS
 aT4gqQ/+MgTjBf9wQ4KfZI5RZaQJhRVuubL58TmHD0HMkGhaQhPgsswQ7Sil5nQ2
 889+PhxTJ6p9tNFYdYz/urv0qM197vWFOpWvkKqBlLLkHEIU14e7OiLdZuydYPVV
 iyFXNrEr5xVerYo7tTsmuOYNzgArwVxmEa/GNlpy/AJl7uP/wxt5g8sbChziM1k2
 erSmRrBp0tCG2xVjLWx1LEIWqmB11rTuP0Kl5j86THnS5czzCmdQyvWypMDB+M1o
 UX6SF1bFMdvh59ultJQN+SYfq+HSo66xxKNDCRRiqvBi2BvBOYKwnDZYwLuf9H8/
 ELOQ//RbWv42wrhosoj637748CwWlgJQCNYR1RiV09CA/bHqlKDwfZM7sUbzeebM
 5/Z+ODM/WtJ1/jdbvu1KkkurVLFaKGOmDKefiosZt+4KMXPbyy6jg6J6/moLZqJ8
 hbym4x8n6KWYMBrvxQt9Ukyo/SBkcoFAJfCdks1hqtkEL7L+VAxaC1mfUqcNzhlY
 RXopvFhEoMlBQ2pOQzK1lDy2m3rZS+md5UUO8G+DZ0keerK7oKVLKVstBTBzx++k
 d2SZ7ijRHqqvSfCYbtNrzgBdc06Ou9zT5vOK9KuWR5CQxIwW3NTu23umg7AmMcdT
 WkdxqcpO1YZCCbH9oK40ynbP4Ap0fYzZ0SGIoNuclknGX+NJ1E0=
 =LBDu
 -----END PGP SIGNATURE-----

Merge 4.19.296 into android-4.19-stable

Changes in 4.19.296
	NFS/pNFS: Report EINVAL errors from connect() to the server
	ata: ahci: Drop pointless VPRINTK() calls and convert the remaining ones
	ata: libahci: clear pending interrupt status
	netfilter: nf_tables: disallow element removal on anonymous sets
	selftests/tls: Add {} to avoid static checker warning
	selftests: tls: swap the TX and RX sockets in some tests
	ipv4: fix null-deref in ipv4_link_failure
	powerpc/perf/hv-24x7: Update domain value check
	net: hns3: add 5ms delay before clear firmware reset irq source
	net: add atomic_long_t to net_device_stats fields
	net: bridge: use DEV_STATS_INC()
	team: fix null-ptr-deref when team device type is changed
	gpio: tb10x: Fix an error handling path in tb10x_gpio_probe()
	i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()
	Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
	scsi: qla2xxx: Add protection mask module parameters
	scsi: qla2xxx: Remove unsupported ql2xenabledif option
	scsi: megaraid_sas: Load balance completions across all MSI-X
	scsi: megaraid_sas: Fix deadlock on firmware crashdump
	ext4: remove the 'group' parameter of ext4_trim_extent
	ext4: add new helper interface ext4_try_to_trim_range()
	ext4: scope ret locally in ext4_try_to_trim_range()
	ext4: change s_last_trim_minblks type to unsigned long
	ext4: mark group as trimmed only if it was fully scanned
	ext4: replace the traditional ternary conditional operator with with max()/min()
	ext4: move setting of trimmed bit into ext4_try_to_trim_range()
	ext4: do not let fstrim block system suspend
	MIPS: Alchemy: only build mmc support helpers if au1xmmc is enabled
	clk: tegra: fix error return case for recalc_rate
	ARM: dts: ti: omap: motorola-mapphone: Fix abe_clkctrl warning on boot
	gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
	parisc: sba: Fix compile warning wrt list of SBA devices
	parisc: iosapic.c: Fix sparse warnings
	parisc: drivers: Fix sparse warning
	parisc: irq: Make irq_stack_union static to avoid sparse warning
	selftests/ftrace: Correctly enable event in instance-event.tc
	ring-buffer: Avoid softlockup in ring_buffer_resize()
	ata: libata-eh: do not clear ATA_PFLAG_EH_PENDING in ata_eh_reset()
	bpf: Clarify error expectations from bpf_clone_redirect
	fbdev/sh7760fb: Depend on FB=y
	nvme-pci: do not set the NUMA node of device if it has none
	watchdog: iTCO_wdt: No need to stop the timer in probe
	watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running
	net: Fix unwanted sign extension in netdev_stats_to_stats64()
	scsi: megaraid_sas: Enable msix_load_balance for Invader and later controllers
	Smack:- Use overlay inode label in smack_inode_copy_up()
	smack: Retrieve transmuting information in smack_inode_getsecurity()
	smack: Record transmuting in smk_transmuted
	serial: 8250_port: Check IRQ data before use
	nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()
	ALSA: hda: Disable power save for solving pop issue on Lenovo ThinkCentre M70q
	ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES
	i2c: i801: unregister tco_pdev in i801_probe() error path
	btrfs: properly report 0 avail for very full file systems
	net: thunderbolt: Fix TCPv6 GSO checksum calculation
	ata: libata-core: Fix ata_port_request_pm() locking
	ata: libata-core: Fix port and device removal
	ata: libata-core: Do not register PM operations for SAS ports
	ata: libata-sata: increase PMP SRST timeout to 10s
	fs: binfmt_elf_efpic: fix personality for ELF-FDPIC
	ext4: fix rec_len verify error
	ata: libata: disallow dev-initiated LPM transitions to unsupported states
	Revert "drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions"
	media: dvb: symbol fixup for dvb_attach() - again
	Revert "PCI: qcom: Disable write access to read only registers for IP v2.3.3"
	scsi: zfcp: Fix a double put in zfcp_port_enqueue()
	qed/red_ll2: Fix undefined behavior bug in struct qed_ll2_info
	wifi: mwifiex: Fix tlv_buf_left calculation
	net: replace calls to sock->ops->connect() with kernel_connect()
	ubi: Refuse attaching if mtd's erasesize is 0
	wifi: mwifiex: Fix oob check condition in mwifiex_process_rx_packet
	drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()
	regmap: rbtree: Fix wrong register marked as in-cache when creating new node
	scsi: target: core: Fix deadlock due to recursive locking
	modpost: add missing else to the "of" check
	ipv4, ipv6: Fix handling of transhdrlen in __ip{,6}_append_data()
	net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg
	net: stmmac: dwmac-stm32: fix resume on STM32 MCU
	tcp: fix quick-ack counting to count actual ACKs of new data
	tcp: fix delayed ACKs for MSS boundary condition
	sctp: update transport state when processing a dupcook packet
	sctp: update hb timer immediately after users change hb_interval
	cpupower: add Makefile dependencies for install targets
	IB/mlx4: Fix the size of a buffer in add_port_entries()
	gpio: aspeed: fix the GPIO number passed to pinctrl_gpio_set_config()
	gpio: pxa: disable pinctrl calls for MMP_GPIO
	RDMA/cma: Fix truncation compilation warning in make_cma_ports
	RDMA/mlx5: Fix NULL string error
	parisc: Restore __ldcw_align for PA-RISC 2.0 processors
	dccp: fix dccp_v4_err()/dccp_v6_err() again
	Revert "rtnetlink: Reject negative ifindexes in RTM_NEWLINK"
	rtnetlink: Reject negative ifindexes in RTM_NEWLINK
	xen/events: replace evtchn_rwlock with RCU
	Linux 4.19.296

Change-Id: I4f76959ead91691fe9a242cb5b158fc8dc67bf39
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-10-11 19:17:39 +00:00
Shivasharan S
dd1524d5d9 scsi: megaraid_sas: Enable msix_load_balance for Invader and later controllers
[ Upstream commit 1175b88452cad208894412b955ee698934968aed ]

Load balancing IO completions across all available MSI-X vectors should be
enabled for Invader and later generation controllers only.  This needs to
be disabled for older controllers.  Add an adapter type check before
setting msix_load_balance flag.

Fixes: 1d15d9098ad1 ("scsi: megaraid_sas: Load balance completions across all MSI-X")
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 21:44:59 +02:00
Junxiao Bi
a96d784736 scsi: megaraid_sas: Fix deadlock on firmware crashdump
[ Upstream commit 0b0747d507bffb827e40fc0f9fb5883fffc23477 ]

The following processes run into a deadlock. CPU 41 was waiting for CPU 29
to handle a CSD request while holding spinlock "crashdump_lock", but CPU 29
was hung by that spinlock with IRQs disabled.

  PID: 17360    TASK: ffff95c1090c5c40  CPU: 41  COMMAND: "mrdiagd"
  !# 0 [ffffb80edbf37b58] __read_once_size at ffffffff9b871a40 include/linux/compiler.h:185:0
  !# 1 [ffffb80edbf37b58] atomic_read at ffffffff9b871a40 arch/x86/include/asm/atomic.h:27:0
  !# 2 [ffffb80edbf37b58] dump_stack at ffffffff9b871a40 lib/dump_stack.c:54:0
   # 3 [ffffb80edbf37b78] csd_lock_wait_toolong at ffffffff9b131ad5 kernel/smp.c:364:0
   # 4 [ffffb80edbf37b78] __csd_lock_wait at ffffffff9b131ad5 kernel/smp.c:384:0
   # 5 [ffffb80edbf37bf8] csd_lock_wait at ffffffff9b13267a kernel/smp.c:394:0
   # 6 [ffffb80edbf37bf8] smp_call_function_many at ffffffff9b13267a kernel/smp.c:843:0
   # 7 [ffffb80edbf37c50] smp_call_function at ffffffff9b13279d kernel/smp.c:867:0
   # 8 [ffffb80edbf37c50] on_each_cpu at ffffffff9b13279d kernel/smp.c:976:0
   # 9 [ffffb80edbf37c78] flush_tlb_kernel_range at ffffffff9b085c4b arch/x86/mm/tlb.c:742:0
   #10 [ffffb80edbf37cb8] __purge_vmap_area_lazy at ffffffff9b23a1e0 mm/vmalloc.c:701:0
   #11 [ffffb80edbf37ce0] try_purge_vmap_area_lazy at ffffffff9b23a2cc mm/vmalloc.c:722:0
   #12 [ffffb80edbf37ce0] free_vmap_area_noflush at ffffffff9b23a2cc mm/vmalloc.c:754:0
   #13 [ffffb80edbf37cf8] free_unmap_vmap_area at ffffffff9b23bb3b mm/vmalloc.c:764:0
   #14 [ffffb80edbf37cf8] remove_vm_area at ffffffff9b23bb3b mm/vmalloc.c:1509:0
   #15 [ffffb80edbf37d18] __vunmap at ffffffff9b23bb8a mm/vmalloc.c:1537:0
   #16 [ffffb80edbf37d40] vfree at ffffffff9b23bc85 mm/vmalloc.c:1612:0
   #17 [ffffb80edbf37d58] megasas_free_host_crash_buffer [megaraid_sas] at ffffffffc020b7f2 drivers/scsi/megaraid/megaraid_sas_fusion.c:3932:0
   #18 [ffffb80edbf37d80] fw_crash_state_store [megaraid_sas] at ffffffffc01f804d drivers/scsi/megaraid/megaraid_sas_base.c:3291:0
   #19 [ffffb80edbf37dc0] dev_attr_store at ffffffff9b56dd7b drivers/base/core.c:758:0
   #20 [ffffb80edbf37dd0] sysfs_kf_write at ffffffff9b326acf fs/sysfs/file.c:144:0
   #21 [ffffb80edbf37de0] kernfs_fop_write at ffffffff9b325fd4 fs/kernfs/file.c:316:0
   #22 [ffffb80edbf37e20] __vfs_write at ffffffff9b29418a fs/read_write.c:480:0
   #23 [ffffb80edbf37ea8] vfs_write at ffffffff9b294462 fs/read_write.c:544:0
   #24 [ffffb80edbf37ee8] SYSC_write at ffffffff9b2946ec fs/read_write.c:590:0
   #25 [ffffb80edbf37ee8] SyS_write at ffffffff9b2946ec fs/read_write.c:582:0
   #26 [ffffb80edbf37f30] do_syscall_64 at ffffffff9b003ca9 arch/x86/entry/common.c:298:0
   #27 [ffffb80edbf37f58] entry_SYSCALL_64 at ffffffff9ba001b1 arch/x86/entry/entry_64.S:238:0

  PID: 17355    TASK: ffff95c1090c3d80  CPU: 29  COMMAND: "mrdiagd"
  !# 0 [ffffb80f2d3c7d30] __read_once_size at ffffffff9b0f2ab0 include/linux/compiler.h:185:0
  !# 1 [ffffb80f2d3c7d30] native_queued_spin_lock_slowpath at ffffffff9b0f2ab0 kernel/locking/qspinlock.c:368:0
   # 2 [ffffb80f2d3c7d58] pv_queued_spin_lock_slowpath at ffffffff9b0f244b arch/x86/include/asm/paravirt.h:674:0
   # 3 [ffffb80f2d3c7d58] queued_spin_lock_slowpath at ffffffff9b0f244b arch/x86/include/asm/qspinlock.h:53:0
   # 4 [ffffb80f2d3c7d68] queued_spin_lock at ffffffff9b8961a6 include/asm-generic/qspinlock.h:90:0
   # 5 [ffffb80f2d3c7d68] do_raw_spin_lock_flags at ffffffff9b8961a6 include/linux/spinlock.h:173:0
   # 6 [ffffb80f2d3c7d68] __raw_spin_lock_irqsave at ffffffff9b8961a6 include/linux/spinlock_api_smp.h:122:0
   # 7 [ffffb80f2d3c7d68] _raw_spin_lock_irqsave at ffffffff9b8961a6 kernel/locking/spinlock.c:160:0
   # 8 [ffffb80f2d3c7d88] fw_crash_buffer_store [megaraid_sas] at ffffffffc01f8129 drivers/scsi/megaraid/megaraid_sas_base.c:3205:0
   # 9 [ffffb80f2d3c7dc0] dev_attr_store at ffffffff9b56dd7b drivers/base/core.c:758:0
   #10 [ffffb80f2d3c7dd0] sysfs_kf_write at ffffffff9b326acf fs/sysfs/file.c:144:0
   #11 [ffffb80f2d3c7de0] kernfs_fop_write at ffffffff9b325fd4 fs/kernfs/file.c:316:0
   #12 [ffffb80f2d3c7e20] __vfs_write at ffffffff9b29418a fs/read_write.c:480:0
   #13 [ffffb80f2d3c7ea8] vfs_write at ffffffff9b294462 fs/read_write.c:544:0
   #14 [ffffb80f2d3c7ee8] SYSC_write at ffffffff9b2946ec fs/read_write.c:590:0
   #15 [ffffb80f2d3c7ee8] SyS_write at ffffffff9b2946ec fs/read_write.c:582:0
   #16 [ffffb80f2d3c7f30] do_syscall_64 at ffffffff9b003ca9 arch/x86/entry/common.c:298:0
   #17 [ffffb80f2d3c7f58] entry_SYSCALL_64 at ffffffff9ba001b1 arch/x86/entry/entry_64.S:238:0

The lock is used to synchronize different sysfs operations, it doesn't
protect any resource that will be touched by an interrupt. Consequently
it's not required to disable IRQs. Replace the spinlock with a mutex to fix
the deadlock.

Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Link: https://lore.kernel.org/r/20230828221018.19471-1-junxiao.bi@oracle.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 21:44:57 +02:00
Shivasharan S
c718a19fa2 scsi: megaraid_sas: Load balance completions across all MSI-X
[ Upstream commit 1d15d9098ad12b0021ac5a6b851f26d1ab021e5a ]

Driver will use "reply descriptor post queues" in round robin fashion when
the combined MSI-X mode is not enabled. With this IO completions are
distributed and load balanced across all the available reply descriptor
post queues equally.

This is enabled only if combined MSI-X mode is not enabled in firmware.
This improves performance and also fixes soft lockups.

When load balancing is enabled, IRQ affinity from driver needs to be
disabled.

Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 0b0747d507bf ("scsi: megaraid_sas: Fix deadlock on firmware crashdump")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 21:44:57 +02:00
Manish Rangankar
75d6b6babb scsi: qla2xxx: Remove unsupported ql2xenabledif option
[ Upstream commit e9105c4b7a9208a21a9bda133707624f12ddabc2 ]

User accidently passed module parameter ql2xenabledif=1 which is
unsupported. However, driver still initialized which lead to guard tag
errors during device discovery.

Remove unsupported ql2xenabledif=1 option and validate the user input.

Cc: stable@vger.kernel.org
Signed-off-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230821130045.34850-7-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 21:44:57 +02:00
Martin K. Petersen
f892a5b5bc scsi: qla2xxx: Add protection mask module parameters
[ Upstream commit 7855d2ba1172d716d96a628af7c5bafa5725ac57 ]

Allow user to selectively enable/disable DIF/DIX protection
capabilities mask.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: e9105c4b7a92 ("scsi: qla2xxx: Remove unsupported ql2xenabledif option")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 21:44:57 +02:00
Greg Kroah-Hartman
501b721387 This is the 4.19.295 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmUOpmEACgkQONu9yGCS
 aT6vSQ/8D3yjJUYiUnHkiSzTMZHAtwR5qk0jCsqw1Xlr+XVouGCG/wpk8z7ckT6W
 4gsG5+QvuB4SfWXmbIn/rPApqQdQSiTicOfHrev705v0U+ib+kw1vgBKv38qkOlI
 EZKuo7Ir1vZUnqghw9uIGperU3kEAt2EvWK37EBryukDoxbzDGIctOvAN7KMMbAJ
 jPQciVOOAJrNNdgPOSrxs1OCdAkEYlDaNuBZ+9j/HjNQLB9KtdtsJ50gerCPA4rS
 oKpZhnx9VJYXI9szor3T7q71iNfpJeL+mOrnpCSFVAFCPkesXQ+MG/GdgJJQDCMJ
 9VF12W6rpqVcKfYFdPX9WevkqMfHRpE4brotDQx36rpUwVFcP7HClJ2zE3p36QWV
 Mfu4O31ZNkLUF8SmFXc3JXVyrwe/ARiha9nLH9VKZ7cSHoYUKlO4NeSGyHjz5J99
 RErBGpea7SgHTSLk30+sHaB3zhdUZyv8ej++zjTG9QA8bRbMp97I9psQ7FWhWDng
 l6f87mdta1X76OJJPkL3yZfbiB/M58e514ptbDNhu4cnH/S6aB6I3K5IYVtfZI/9
 zESuavKEUks+Ng1vBUGsPGN/eHDaPWUkl7HewP7WXRDOQUjaIX/0saeaSiUFYNI7
 UYa72hD9fKMblkwxIl75ybI/WZRgw9fyrQeGG0DfX3t6kt6BhHM=
 =bQT4
 -----END PGP SIGNATURE-----

Merge 4.19.295 into android-4.19-stable

Changes in 4.19.295
	erofs: ensure that the post-EOF tails are all zeroed
	ARM: pxa: remove use of symbol_get()
	mmc: au1xmmc: force non-modular build and remove symbol_get usage
	rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
	modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
	USB: serial: option: add Quectel EM05G variant (0x030e)
	USB: serial: option: add FOXCONN T99W368/T99W373 product
	HID: wacom: remove the battery when the EKR is off
	Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition
	serial: sc16is7xx: fix bug when first setting GPIO direction
	fsi: master-ast-cf: Add MODULE_FIRMWARE macro
	nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
	nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
	pinctrl: amd: Don't show `Invalid config param` errors
	9p: virtio: make sure 'offs' is initialized in zc_request
	ASoC: da7219: Flush pending AAD IRQ when suspending
	ASoC: da7219: Check for failure reading AAD IRQ events
	ethernet: atheros: fix return value check in atl1c_tso_csum()
	vxlan: generalize vxlan_parse_gpe_hdr and remove unused args
	m68k: Fix invalid .section syntax
	s390/dasd: use correct number of retries for ERP requests
	s390/dasd: fix hanging device after request requeue
	fs/nls: make load_nls() take a const parameter
	ASoc: codecs: ES8316: Fix DMIC config
	ASoC: atmel: Fix the 8K sample parameter in I2SC master
	platform/x86: intel: hid: Always call BTNL ACPI method
	security: keys: perform capable check only on privileged operations
	net: usb: qmi_wwan: add Quectel EM05GV2
	idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
	scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
	netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
	bnx2x: fix page fault following EEH recovery
	sctp: handle invalid error codes without calling BUG()
	cifs: add a warning when the in-flight count goes negative
	ALSA: seq: oss: Fix racy open/close of MIDI devices
	net: Avoid address overwrite in kernel_connect
	powerpc/32: Include .branch_lt in data section
	powerpc/32s: Fix assembler warning about r0
	udf: Check consistency of Space Bitmap Descriptor
	udf: Handle error when adding extent to a file
	Revert "net: macsec: preserve ingress frame ordering"
	reiserfs: Check the return value from __getblk()
	eventfd: Export eventfd_ctx_do_read()
	eventfd: prevent underflow for eventfd semaphores
	new helper: lookup_positive_unlocked()
	netfilter: nft_flow_offload: fix underflow in flowtable reference counter
	netfilter: nf_tables: missing NFT_TRANS_PREPARE_ERROR in flowtable deactivatation
	fs: Fix error checking for d_hash_and_lookup()
	cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
	bpf: Clear the probe_addr for uprobe
	tcp: tcp_enter_quickack_mode() should be static
	regmap: rbtree: Use alloc_flags for memory allocations
	spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
	can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
	wifi: mwifiex: Fix OOB and integer underflow when rx packets
	mwifiex: drop 'set_consistent_dma_mask' log message
	mwifiex: switch from 'pci_' to 'dma_' API
	wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
	Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
	crypto: caam - fix unchecked return value error
	lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
	fs: ocfs2: namei: check return value of ocfs2_add_entry()
	wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
	wifi: mwifiex: Fix missed return in oob checks failed path
	wifi: ath9k: fix races between ath9k_wmi_cmd and ath9k_wmi_ctrl_rx
	wifi: ath9k: protect WMI command response buffer replacement with a lock
	wifi: mwifiex: avoid possible NULL skb pointer dereference
	wifi: ath9k: use IS_ERR() with debugfs_create_dir()
	net: arcnet: Do not call kfree_skb() under local_irq_disable()
	net/sched: sch_hfsc: Ensure inner classes have fsc curve
	netrom: Deny concurrent connect().
	quota: add dqi_dirty_list description to comment of Dquot List Management
	quota: avoid increasing DQST_LOOKUPS when iterating over dirty/inuse list
	quota: factor out dquot_write_dquot()
	quota: rename dquot_active() to inode_quota_active()
	quota: add new helper dquot_active()
	quota: fix dqput() to follow the guarantees dquot_srcu should provide
	arm64: dts: msm8996: thermal: Add interrupt support
	arm64: dts: qcom: msm8996: Add missing interrupt to the USB2 controller
	drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar()
	ARM: dts: BCM5301X: Harmonize EHCI/OHCI DT nodes name
	ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch
	ARM: dts: BCM53573: Drop nonexistent #usb-cells
	ARM: dts: BCM53573: Add cells sizes to PCIe node
	ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
	ARM: dts: s3c6410: move fixed clocks under root node in Mini6410
	ARM: dts: s3c6410: align node SROM bus node name with dtschema in Mini6410
	ARM: dts: s3c64xx: align pinctrl with dtschema
	ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
	ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKV210
	ARM: dts: s5pv210: use defines for IRQ flags in SMDKV210
	ARM: dts: s5pv210: correct ethernet unit address in SMDKV210
	ARM: dts: s5pv210: add dummy 5V regulator for backlight on SMDKv210
	ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)
	drm: adv7511: Fix low refresh rate register for ADV7533/5
	ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
	drm/tegra: Remove superfluous error messages around platform_get_irq()
	drm/tegra: dpaux: Fix incorrect return value of platform_get_irq
	of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
	drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions
	drm/msm/mdp5: Don't leak some plane state
	smackfs: Prevent underflow in smk_set_cipso()
	audit: fix possible soft lockup in __audit_inode_child()
	of: unittest: Fix overlay type in apply/revert check
	ALSA: ac97: Fix possible error value of *rac97
	drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
	clk: sunxi-ng: Modify mismatched function name
	PCI: Mark NVIDIA T4 GPUs to avoid bus reset
	PCI: pciehp: Use RMW accessors for changing LNKCTL
	PCI/ASPM: Use RMW accessors for changing LNKCTL
	PCI/ATS: Add pci_prg_resp_pasid_required() interface.
	PCI: Cleanup register definition width and whitespace
	PCI: Decode PCIe 32 GT/s link speed
	PCI: Add #defines for Enter Compliance, Transmit Margin
	drm/amdgpu: Correct Transmit Margin masks
	drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions
	drm/amdgpu: Prefer pcie_capability_read_word()
	drm/amdgpu: Use RMW accessors for changing LNKCTL
	drm/radeon: Correct Transmit Margin masks
	drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions
	drm/radeon: Prefer pcie_capability_read_word()
	drm/radeon: Use RMW accessors for changing LNKCTL
	wifi: ath10k: Use RMW accessors for changing LNKCTL
	nfs/blocklayout: Use the passed in gfp flags
	powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
	jfs: validate max amount of blocks before allocation.
	fs: lockd: avoid possible wrong NULL parameter
	NFSD: da_addr_body field missing in some GETDEVICEINFO replies
	media: Use of_node_name_eq for node name comparisons
	media: v4l2-fwnode: fix v4l2_fwnode_parse_link handling
	media: v4l2-fwnode: simplify v4l2_fwnode_parse_link
	media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
	drivers: usb: smsusb: fix error handling code in smsusb_init_device
	media: dib7000p: Fix potential division by zero
	media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
	media: cx24120: Add retval check for cx24120_message_send()
	media: mediatek: vcodec: Return NULL if no vdec_fb is found
	usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()
	scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
	scsi: be2iscsi: Add length check when parsing nlattrs
	scsi: qla4xxx: Add length check when parsing nlattrs
	x86/APM: drop the duplicate APM_MINOR_DEV macro
	scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
	scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
	dma-buf/sync_file: Fix docs syntax
	IB/uverbs: Fix an potential error pointer dereference
	media: go7007: Remove redundant if statement
	USB: gadget: f_mass_storage: Fix unused variable warning
	media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips
	media: ov2680: Remove auto-gain and auto-exposure controls
	media: ov2680: Fix ov2680_bayer_order()
	media: ov2680: Fix vflip / hflip set functions
	media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors
	cgroup:namespace: Remove unused cgroup_namespaces_init()
	scsi: core: Use 32-bit hostnum in scsi_host_lookup()
	scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
	serial: tegra: handle clk prepare error in tegra_uart_hw_init()
	amba: bus: fix refcount leak
	Revert "IB/isert: Fix incorrect release of isert connection"
	HID: multitouch: Correct devm device reference for hidinput input_dev name
	rpmsg: glink: Add check for kstrdup
	arch: um: drivers: Kconfig: pedantic formatting
	um: Fix hostaudio build errors
	dmaengine: ste_dma40: Add missing IRQ check in d40_probe
	igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
	netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
	netfilter: xt_u32: validate user space input
	netfilter: xt_sctp: validate the flag_info count
	skbuff: skb_segment, Call zero copy functions before using skbuff frags
	igb: set max size RX buffer when store bad packet is enabled
	PM / devfreq: Fix leak in devfreq_dev_release()
	ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
	ipmi_si: fix a memleak in try_smi_init()
	ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
	backlight/gpio_backlight: Compare against struct fb_info.device
	backlight/bd6107: Compare against struct fb_info.device
	backlight/lv5207lp: Compare against struct fb_info.device
	media: dvb: symbol fixup for dvb_attach()
	ntb: Drop packets when qp link is down
	ntb: Clean up tx tail index on link down
	ntb: Fix calculation ntb_transport_tx_free_entry()
	Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
	procfs: block chmod on /proc/thread-self/comm
	parisc: Fix /proc/cpuinfo output for lscpu
	dlm: fix plock lookup when using multiple lockspaces
	dccp: Fix out of bounds access in DCCP error handler
	crypto: stm32 - fix loop iterating through scatterlist for DMA
	cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
	X.509: if signature is unsupported skip validation
	net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
	pstore/ram: Check start of empty przs during init
	PCI/ATS: Add inline to pci_prg_resp_pasid_required()
	sc16is7xx: Set iobase to device index
	serial: sc16is7xx: fix broken port 0 uart init
	usb: typec: tcpci: clear the fault status bit
	udf: initialize newblock to 0
	scsi: qla2xxx: fix inconsistent TMF timeout
	scsi: qla2xxx: Turn off noisy message log
	fbdev/ep93xx-fb: Do not assign to struct fb_info.dev
	drm/ast: Fix DRAM init on AST2200
	parisc: led: Fix LAN receive and transmit LEDs
	parisc: led: Reduce CPU overhead for disk & lan LED computation
	clk: qcom: gcc-mdm9615: use proper parent for pll0_vote clock
	soc: qcom: qmi_encdec: Restrict string length in decode
	NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info
	kconfig: fix possible buffer overflow
	x86/virt: Drop unnecessary check on extended CPUID level in cpu_has_svm()
	watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load
	pwm: lpc32xx: Remove handling of PWM channels
	net: read sk->sk_family once in sk_mc_loop()
	igb: disable virtualization features on 82580
	veth: Fixing transmit return status for dropped packets
	net: ipv6/addrconf: avoid integer underflow in ipv6_create_tempaddr
	af_unix: Fix data-races around user->unix_inflight.
	af_unix: Fix data-race around unix_tot_inflight.
	af_unix: Fix data-races around sk->sk_shutdown.
	af_unix: Fix data race around sk->sk_err.
	net: sched: sch_qfq: Fix UAF in qfq_dequeue()
	kcm: Destroy mutex in kcm_exit_net()
	igbvf: Change IGBVF_MIN to allow set rx/tx value between 64 and 80
	igb: Change IGB_MIN to allow set rx/tx value between 64 and 80
	idr: fix param name in idr_alloc_cyclic() doc
	netfilter: nfnetlink_osf: avoid OOB read
	ata: sata_gemini: Add missing MODULE_DESCRIPTION
	ata: pata_ftide010: Add missing MODULE_DESCRIPTION
	btrfs: don't start transaction when joining with TRANS_JOIN_NOSTART
	mtd: rawnand: brcmnand: Fix crash during the panic_write
	mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write
	mtd: rawnand: brcmnand: Fix potential false time out warning
	perf hists browser: Fix hierarchy mode header
	net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()
	kcm: Fix memory leak in error path of kcm_sendmsg()
	ixgbe: fix timestamp configuration code
	kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg().
	drm/amd/display: Fix a bug when searching for insert_above_mpcc
	parisc: Drop loops_per_jiffy from per_cpu struct
	autofs: fix memory leak of waitqueues in autofs_catatonic_mode
	btrfs: output extra debug info if we failed to find an inline backref
	ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer
	ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470
	hw_breakpoint: fix single-stepping when using bpf_overflow_handler
	wifi: ath9k: fix printk specifier
	wifi: mwifiex: fix fortify warning
	crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()
	tpm_tis: Resend command to recover from data transfer errors
	alx: fix OOB-read compiler warning
	drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()
	md: raid1: fix potential OOB in raid1_remove_disk()
	ext2: fix datatype of block number in ext2_xattr_set2()
	fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount()
	jfs: fix invalid free of JFS_IP(ipimap)->i_imap in diUnmount
	powerpc/pseries: fix possible memory leak in ibmebus_bus_init()
	media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer
	media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
	media: af9005: Fix null-ptr-deref in af9005_i2c_xfer
	media: anysee: fix null-ptr-deref in anysee_master_xfer
	media: az6007: Fix null-ptr-deref in az6007_i2c_xfer()
	iio: core: Use min() instead of min_t() to make code more robust
	media: tuners: qt1010: replace BUG_ON with a regular error
	media: pci: cx23885: replace BUG with error return
	usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc
	scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show()
	serial: cpm_uart: Avoid suspicious locking
	media: pci: ipu3-cio2: Initialise timing struct to avoid a compiler warning
	kobject: Add sanity check for kset->kobj.ktype in kset_register()
	md/raid1: fix error: ISO C90 forbids mixed declarations
	attr: block mode changes of symlinks
	btrfs: fix lockdep splat and potential deadlock after failure running delayed items
	nfsd: fix change_info in NFSv4 RENAME replies
	mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller
	net/sched: cls_fw: No longer copy tcf_result on update to avoid use-after-free
	net/sched: Retire rsvp classifier
	Linux 4.19.295

Change-Id: I5de88dc1e8cebe5736df3023205233cb40c4aa35
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-09-30 11:47:07 +00:00
Quinn Tran
7308e40520 scsi: qla2xxx: Turn off noisy message log
commit 8ebaa45163a3fedc885c1dc7d43ea987a2f00a06 upstream.

Some consider noisy log as test failure.  Turn off noisy message log.

Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230714070104.40052-8-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-23 10:48:12 +02:00
Quinn Tran
d882f2b3f5 scsi: qla2xxx: fix inconsistent TMF timeout
commit 009e7fe4a1ed52276b332842a6b6e23b07200f2d upstream.

Different behavior were experienced of session being torn down vs not when
TMF is timed out. When FW detects the time out, the session is torn down.
When driver detects the time out, the session is not torn down.

Allow TMF error to return to upper layer without session tear down.

Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230714070104.40052-10-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-23 10:48:12 +02:00
Chengfeng Ye
264eae2f52 scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
[ Upstream commit 1a1975551943f681772720f639ff42fbaa746212 ]

There is a long call chain that &fip->ctlr_lock is acquired by isr
fnic_isr_msix_wq_copy() under hard IRQ context. Thus other process context
code acquiring the lock should disable IRQ, otherwise deadlock could happen
if the IRQ preempts the execution while the lock is held in process context
on the same CPU.

[ISR]
fnic_isr_msix_wq_copy()
 -> fnic_wq_copy_cmpl_handler()
 -> fnic_fcpio_cmpl_handler()
 -> fnic_fcpio_flogi_reg_cmpl_handler()
 -> fnic_flush_tx()
 -> fnic_send_frame()
 -> fcoe_ctlr_els_send()
 -> spin_lock_bh(&fip->ctlr_lock)

[Process Context]
1. fcoe_ctlr_timer_work()
 -> fcoe_ctlr_flogi_send()
 -> spin_lock_bh(&fip->ctlr_lock)

2. fcoe_ctlr_recv_work()
 -> fcoe_ctlr_recv_handler()
 -> fcoe_ctlr_recv_els()
 -> fcoe_ctlr_announce()
 -> spin_lock_bh(&fip->ctlr_lock)

3. fcoe_ctlr_recv_work()
 -> fcoe_ctlr_recv_handler()
 -> fcoe_ctlr_recv_els()
 -> fcoe_ctlr_flogi_retry()
 -> spin_lock_bh(&fip->ctlr_lock)

4. -> fcoe_xmit()
 -> fcoe_ctlr_els_send()
 -> spin_lock_bh(&fip->ctlr_lock)

spin_lock_bh() is not enough since fnic_isr_msix_wq_copy() is a
hardirq.

These flaws were found by an experimental static analysis tool I am
developing for irq-related deadlock.

The patch fix the potential deadlocks by spin_lock_irqsave() to disable
hard irq.

Fixes: 794d98e77f ("[SCSI] libfcoe: retry rejected FLOGI to another FCF if possible")
Signed-off-by: Chengfeng Ye <dg573847474@gmail.com>
Link: https://lore.kernel.org/r/20230817074708.7509-1-dg573847474@gmail.com
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:08 +02:00
Tony Battersby
13f3849ed6 scsi: core: Use 32-bit hostnum in scsi_host_lookup()
[ Upstream commit 62ec2092095b678ff89ce4ba51c2938cd1e8e630 ]

Change scsi_host_lookup() hostnum argument type from unsigned short to
unsigned int to match the type used everywhere else.

Fixes: 6d49f63b41 ("[SCSI] Make host_no an unsigned int")
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Link: https://lore.kernel.org/r/a02497e7-c12b-ef15-47fc-3f0a0b00ffce@cybernetics.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:08 +02:00
Oleksandr Natalenko
ebf482cf2c scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
[ Upstream commit 25dbc20deab5165f847b4eb42f376f725a986ee8 ]

The qedf_dbg_fp_int_cmd_read() function invokes sprintf() directly on a
__user pointer, which may crash the kernel.

Avoid doing that by vmalloc()'ating a buffer for scnprintf() and then
calling simple_read_from_buffer() which does a proper copy_to_user() call.

Fixes: 61d8658b4a ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Link: https://lore.kernel.org/lkml/20230724120241.40495-1-oleksandr@redhat.com/
Link: https://lore.kernel.org/linux-scsi/20230726101236.11922-1-skashyap@marvell.com/
Cc: Saurav Kashyap <skashyap@marvell.com>
Cc: Rob Evers <revers@redhat.com>
Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Jozef Bacik <jobacik@redhat.com>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: GR-QLogic-Storage-Upstream@marvell.com
Cc: linux-scsi@vger.kernel.org
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Oleksandr Natalenko <oleksandr@redhat.com>
Link: https://lore.kernel.org/r/20230731084034.37021-4-oleksandr@redhat.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:08 +02:00
Oleksandr Natalenko
de496b8057 scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
[ Upstream commit 7d3d20dee4f648ec44e9717d5f647d594d184433 ]

The qedf_dbg_stop_io_on_error_cmd_read() function invokes sprintf()
directly on a __user pointer, which may crash the kernel.

Avoid doing that by using a small on-stack buffer for scnprintf() and then
calling simple_read_from_buffer() which does a proper copy_to_user() call.

Fixes: 61d8658b4a ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.")
Link: https://lore.kernel.org/lkml/20230724120241.40495-1-oleksandr@redhat.com/
Link: https://lore.kernel.org/linux-scsi/20230726101236.11922-1-skashyap@marvell.com/
Cc: Saurav Kashyap <skashyap@marvell.com>
Cc: Rob Evers <revers@redhat.com>
Cc: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Jozef Bacik <jobacik@redhat.com>
Cc: Laurence Oberman <loberman@redhat.com>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: GR-QLogic-Storage-Upstream@marvell.com
Cc: linux-scsi@vger.kernel.org
Reviewed-by: Laurence Oberman <loberman@redhat.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Laurence Oberman <loberman@redhat.com>
Acked-by: Saurav Kashyap <skashyap@marvell.com>
Signed-off-by: Oleksandr Natalenko <oleksandr@redhat.com>
Link: https://lore.kernel.org/r/20230731084034.37021-2-oleksandr@redhat.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:08 +02:00
Lin Ma
5925e224cc scsi: qla4xxx: Add length check when parsing nlattrs
[ Upstream commit 47cd3770e31df942e2bb925a9a855c79ed0662eb ]

There are three places that qla4xxx parses nlattrs:

 - qla4xxx_set_chap_entry()

 - qla4xxx_iface_set_param()

 - qla4xxx_sysfs_ddb_set_param()

and each of them directly converts the nlattr to specific pointer of
structure without length checking. This could be dangerous as those
attributes are not validated and a malformed nlattr (e.g., length 0) could
result in an OOB read that leaks heap dirty data.

Add the nla_len check before accessing the nlattr data and return EINVAL if
the length check fails.

Fixes: 26ffd7b45f ("[SCSI] qla4xxx: Add support to set CHAP entries")
Fixes: 1e9e2be3ee ("[SCSI] qla4xxx: Add flash node mgmt support")
Fixes: 00c31889f7 ("[SCSI] qla4xxx: fix data alignment and use nl helpers")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Link: https://lore.kernel.org/r/20230723080053.3714534-1-linma@zju.edu.cn
Reviewed-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:07 +02:00
Lin Ma
94ec7f3460 scsi: be2iscsi: Add length check when parsing nlattrs
[ Upstream commit ee0268f230f66cb472df3424f380ea668da2749a ]

beiscsi_iface_set_param() parses nlattr with nla_for_each_attr and assumes
every attributes can be viewed as struct iscsi_iface_param_info.

This is not true because there is no any nla_policy to validate the
attributes passed from the upper function iscsi_set_iface_params().

Add the nla_len check before accessing the nlattr data and return EINVAL if
the length check fails.

Fixes: 0e43895ec1 ("[SCSI] be2iscsi: adding functionality to change network settings using iscsiadm")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Link: https://lore.kernel.org/r/20230723075938.3713864-1-linma@zju.edu.cn
Reviewed-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:07 +02:00
Lin Ma
dded34dd7d scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
[ Upstream commit ce51c817008450ef4188471db31639d42d37a5e1 ]

The functions iscsi_if_set_param() and iscsi_if_set_host_param() convert an
nlattr payload to type char* and then call C string handling functions like
sscanf and kstrdup:

  char *data = (char*)ev + sizeof(*ev);
  ...
  sscanf(data, "%d", &value);

However, since the nlattr is provided by the user-space program and the
nlmsg skb is allocated with GFP_KERNEL instead of GFP_ZERO flag (see
netlink_alloc_large_skb() in netlink_sendmsg()), dirty data on the heap can
lead to an OOB access for those string handling functions.

By investigating how the bug is introduced, we find it is really
interesting as the old version parsing code starting from commit
fd7255f51a ("[SCSI] iscsi: add sysfs attrs for uspace sync up") treated
the nlattr as integer bytes instead of string and had length check in
iscsi_copy_param():

  if (ev->u.set_param.len != sizeof(uint32_t))
    BUG();

But, since the commit a54a52caad ("[SCSI] iscsi: fixup set/get param
functions"), the code treated the nlattr as C string while forgetting to
add any strlen checks(), opening the possibility of an OOB access.

Fix the potential OOB by adding the strlen() check before accessing the
buf. If the data passes this check, all low-level set_param handlers can
safely treat this buf as legal C string.

Fixes: fd7255f51a ("[SCSI] iscsi: add sysfs attrs for uspace sync up")
Fixes: 1d9bf13a9c ("[SCSI] iscsi class: add iscsi host set param event")
Signed-off-by: Lin Ma <linma@zju.edu.cn>
Link: https://lore.kernel.org/r/20230723075820.3713119-1-linma@zju.edu.cn
Reviewed-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:07 +02:00
Chengfeng Ye
90e17ab02a scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
[ Upstream commit dd64f80587190265ca8a0f4be6c64c2fda6d3ac2 ]

As &qedi_percpu->p_work_lock is acquired by hard IRQ qedi_msix_handler(),
other acquisitions of the same lock under process context should disable
IRQ, otherwise deadlock could happen if the IRQ preempts the execution
while the lock is held in process context on the same CPU.

qedi_cpu_offline() is one such function which acquires the lock in process
context.

[Deadlock Scenario]
qedi_cpu_offline()
    ->spin_lock(&p->p_work_lock)
        <irq>
        ->qedi_msix_handler()
        ->edi_process_completions()
        ->spin_lock_irqsave(&p->p_work_lock, flags); (deadlock here)

This flaw was found by an experimental static analysis tool I am developing
for IRQ-related deadlocks.

The tentative patch fix the potential deadlock by spin_lock_irqsave()
under process context.

Signed-off-by: Chengfeng Ye <dg573847474@gmail.com>
Link: https://lore.kernel.org/r/20230726125655.4197-1-dg573847474@gmail.com
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:47:58 +02:00
Michael Bestas
1b59618ce4
Merge tag 'ASB-2023-09-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-09-01

* tag 'ASB-2023-09-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.294
  Revert "ARM: ep93xx: fix missing-prototype warnings"
  Revert "MIPS: Alchemy: fix dbdma2"
  Linux 4.19.293
  dma-buf/sw_sync: Avoid recursive lock during fence signal
  clk: Fix undefined reference to `clk_rate_exclusive_{get,put}'
  scsi: core: raid_class: Remove raid_component_add()
  scsi: snic: Fix double free in snic_tgt_create()
  irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
  rtnetlink: Reject negative ifindexes in RTM_NEWLINK
  netfilter: nf_queue: fix socket leak
  sched/rt: pick_next_rt_entity(): check list_entry
  mmc: block: Fix in_flight[issue_type] value error
  x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4
  PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus
  media: vcodec: Fix potential array out-of-bounds in encoder queue_setup
  lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
  batman-adv: Fix batadv_v_ogm_aggr_send memory leak
  batman-adv: Fix TT global entry leak when client roamed back
  batman-adv: Do not get eth header before batadv_check_management_packet
  batman-adv: Don't increase MTU when set by user
  batman-adv: Trigger events for auto adjusted MTU
  nfsd: Fix race to FREE_STATEID and cl_revoked
  ibmveth: Use dcbf rather than dcbfl
  ipvs: fix racy memcpy in proc_do_sync_threshold
  ipvs: Improve robustness to the ipvs sysctl
  bonding: fix macvlan over alb bond support
  net: remove bond_slave_has_mac_rcu()
  net/sched: fix a qdisc modification with ambiguous command request
  igb: Avoid starting unnecessary workqueues
  dccp: annotate data-races in dccp_poll()
  sock: annotate data-races around prot->memory_pressure
  tracing: Fix memleak due to race between current_tracer and trace
  drm/amd/display: check TG is non-null before checking if enabled
  drm/amd/display: do not wait for mpc idle if tg is disabled
  regmap: Account for register length in SMBus I/O limits
  dm integrity: reduce vmalloc space footprint on 32-bit architectures
  dm integrity: increase RECALC_SECTORS to improve recalculate speed
  powerpc: Fail build if using recordmcount with binutils v2.37
  powerpc: remove leftover code of old GCC version checks
  powerpc/32: add stack protector support
  fbdev: fix potential OOB read in fast_imageblit()
  fbdev: Fix sys_imageblit() for arbitrary image widths
  fbdev: Improve performance of sys_imageblit()
  tty: serial: fsl_lpuart: add earlycon for imx8ulp platform
  Revert "tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP"
  MIPS: cpu-features: Use boot_cpu_type for CPU type based features
  MIPS: cpu-features: Enable octeon_cache by cpu_type
  fs: dlm: fix mismatch of plock results from userspace
  fs: dlm: use dlm_plock_info for do_unlock_close
  fs: dlm: change plock interrupted message to debug again
  fs: dlm: add pid to debug log
  dlm: replace usage of found with dedicated list iterator variable
  dlm: improve plock logging if interrupted
  PCI: acpiphp: Reassign resources on bridge if necessary
  net: phy: broadcom: stub c45 read/write for 54810
  net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure
  net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
  virtio-net: set queues after driver_ok
  af_unix: Fix null-ptr-deref in unix_stream_sendpage().
  netfilter: set default timeout to 3 secs for sctp shutdown send and recv state
  test_firmware: prevent race conditions by a correct implementation of locking
  mmc: wbsd: fix double mmc_free_host() in wbsd_init()
  cifs: Release folio lock on fscache read hit.
  ALSA: usb-audio: Add support for Mythware XA001AU capture and playback interfaces.
  serial: 8250: Fix oops for port->pm on uart_change_pm()
  ASoC: meson: axg-tdm-formatter: fix channel slot allocation
  ASoC: rt5665: add missed regulator_bulk_disable
  net: do not allow gso_size to be set to GSO_BY_FRAGS
  sock: Fix misuse of sk_under_memory_pressure()
  i40e: fix misleading debug logs
  team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
  netfilter: nft_dynset: disallow object maps
  selftests: mirror_gre_changes: Tighten up the TTL test match
  xfrm: add NULL check in xfrm_update_ae_params
  ip_vti: fix potential slab-use-after-free in decode_session6
  ip6_vti: fix slab-use-after-free in decode_session6
  xfrm: fix slab-use-after-free in decode_session6
  xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c
  net: af_key: fix sadb_x_filter validation
  net: xfrm: Fix xfrm_address_filter OOB read
  btrfs: fix BUG_ON condition in btrfs_cancel_balance
  powerpc/rtas_flash: allow user copy to flash block cache objects
  fbdev: mmp: fix value check in mmphw_probe()
  virtio-mmio: don't break lifecycle of vm_dev
  virtio-mmio: Use to_virtio_mmio_device() to simply code
  virtio-mmio: convert to devm_platform_ioremap_resource
  nfsd: Remove incorrect check in nfsd4_validate_stateid
  nfsd4: kill warnings on testing stateids with mismatched clientids
  block: fix signed int overflow in Amiga partition support
  mmc: sunxi: fix deferred probing
  mmc: bcm2835: fix deferred probing
  mmc: Remove dev_err() usage after platform_get_irq()
  mmc: tmio: move tmio_mmc_set_clock() to platform hook
  mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock()
  mmc: meson-gx: remove redundant mmc_request_done() call from irq context
  mmc: meson-gx: remove useless lock
  USB: dwc3: qcom: fix NULL-deref on suspend
  usb: dwc3: qcom: Add helper functions to enable,disable wake irqs
  irqchip/mips-gic: Use raw spinlock for gic_lock
  irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()
  x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms
  powerpc/64s/radix: Fix soft dirty tracking
  powerpc: Move page table dump files in a dedicated subdirectory
  powerpc/mm: dump block address translation on book3s/32
  powerpc/mm: dump segment registers on book3s/32
  powerpc/mm: Move pgtable_t into platform headers
  powerpc/mm: move platform specific mmu-xxx.h in platform directories
  iio: addac: stx104: Fix race condition when converting analog-to-digital
  iio: addac: stx104: Fix race condition for stx104_write_raw()
  iio: adc: stx104: Implement and utilize register structures
  iio: adc: stx104: Utilize iomap interface
  iio: add addac subdirectory
  IMA: allow/fix UML builds
  drm/amdgpu: Fix potential fence use-after-free v2
  Bluetooth: L2CAP: Fix use-after-free
  pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()
  gfs2: Fix possible data races in gfs2_show_options()
  media: platform: mediatek: vpu: fix NULL ptr dereference
  media: v4l2-mem2mem: add lock to protect parameter num_rdy
  FS: JFS: Check for read-only mounted filesystem in txBegin
  FS: JFS: Fix null-ptr-deref Read in txBegin
  MIPS: dec: prom: Address -Warray-bounds warning
  fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
  udf: Fix uninitialized array access for some pathnames
  HID: add quirk for 03f0:464a HP Elite Presenter Mouse
  quota: fix warning in dqgrab()
  quota: Properly disable quotas when add_dquot_ref() fails
  ALSA: emu10k1: roll up loops in DSP setup code for Audigy
  drm/radeon: Fix integer overflow in radeon_cs_parser_init
  selftests: forwarding: tc_flower: Relax success criterion
  lib/mpi: Eliminate unused umul_ppmm definitions for MIPS
  Revert "posix-timers: Ensure timer ID search-loop limit is valid"
  UPSTREAM: media: usb: siano: Fix warning due to null work_func_t function pointer
  UPSTREAM: Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
  UPSTREAM: net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
  UPSTREAM: net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
  Linux 4.19.292
  sch_netem: fix issues in netem_change() vs get_dist_table()
  alpha: remove __init annotation from exported page_is_ram()
  scsi: core: Fix possible memory leak if device_add() fails
  scsi: snic: Fix possible memory leak if device_add() fails
  scsi: 53c700: Check that command slot is not NULL
  scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
  scsi: core: Fix legacy /proc parsing buffer overflow
  netfilter: nf_tables: report use refcount overflow
  netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush
  btrfs: don't stop integrity writeback too early
  ibmvnic: Handle DMA unmapping of login buffs in release functions
  wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
  IB/hfi1: Fix possible panic during hotplug remove
  drivers: net: prevent tun_build_skb() to exceed the packet size limit
  dccp: fix data-race around dp->dccps_mss_cache
  bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
  net/packet: annotate data-races around tp->status
  mISDN: Update parameter type of dsp_cmx_send()
  drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
  x86: Move gds_ucode_mitigated() declaration to header
  x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
  x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
  usb: dwc3: Properly handle processing of pending events
  usb-storage: alauda: Fix uninit-value in alauda_check_media()
  binder: fix memory leak in binder_init()
  iio: cros_ec: Fix the allocation size for cros_ec_command
  nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
  radix tree test suite: fix incorrect allocation size for pthreads
  drm/nouveau/gr: enable memory loads on helper invocation on all channels
  dmaengine: pl330: Return DMA_PAUSED when transaction is paused
  ipv6: adjust ndisc_is_useropt() to also return true for PIO
  mmc: moxart: read scr register without changing byte order
  sparc: fix up arch_cpu_finalize_init() build breakage.
  UPSTREAM: net/sched: cls_fw: Fix improper refcount update leads to use-after-free
  Linux 4.19.291
  drm/edid: fix objtool warning in drm_cvt_modes()
  arm64: dts: stratix10: fix incorrect I2C property for SCL signal
  drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
  ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node
  ARM: dts: imx6sll: fixup of operating points
  ARM: dts: imx: add usb alias
  ARM: dts: imx6sll: Make ssi node name same as other platforms
  PM: sleep: wakeirq: fix wake irq arming
  PM / wakeirq: support enabling wake-up irq after runtime_suspend called
  powerpc/mm/altmap: Fix altmap boundary check
  mtd: rawnand: omap_elm: Fix incorrect type in assignment
  test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
  test_firmware: fix a memory leak with reqs buffer
  ext2: Drop fragment support
  net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
  Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
  fs/sysv: Null check to prevent null-ptr-deref bug
  USB: zaurus: Add ID for A-300/B-500/C-700
  libceph: fix potential hang in ceph_osdc_notify()
  scsi: zfcp: Defer fc_rport blocking until after ADISC response
  tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
  tcp_metrics: annotate data-races around tm->tcpm_net
  tcp_metrics: annotate data-races around tm->tcpm_vals[]
  tcp_metrics: annotate data-races around tm->tcpm_lock
  tcp_metrics: annotate data-races around tm->tcpm_stamp
  tcp_metrics: fix addr_same() helper
  ip6mr: Fix skb_under_panic in ip6mr_cache_report()
  net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
  net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
  net: add missing data-race annotation for sk_ll_usec
  net: add missing data-race annotations around sk->sk_peek_off
  net: sched: cls_u32: Fix match key mis-addressing
  perf test uprobe_from_different_cu: Skip if there is no gcc
  net/mlx5e: fix return value check in mlx5e_ipsec_remove_trailer()
  KVM: s390: fix sthyi error handling
  word-at-a-time: use the same return type for has_zero regardless of endianness
  loop: Select I/O scheduler 'none' from inside add_disk()
  perf: Fix function pointer case
  net/sched: cls_u32: Fix reference counter leak leading to overflow
  ASoC: cs42l51: fix driver to properly autoload with automatic module loading
  net/sched: sch_qfq: account for stab overhead in qfq_enqueue
  net/sched: cls_fw: Fix improper refcount update leads to use-after-free
  drm/client: Fix memory leak in drm_client_target_cloned
  dm cache policy smq: ensure IO doesn't prevent cleaner policy progress
  ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register
  s390/dasd: fix hanging device after quiesce/resume
  virtio-net: fix race between set queues and probe
  serial: 8250_dw: Preserve original value of DLF register
  serial: 8250_dw: split Synopsys DesignWare 8250 common functions
  irq-bcm6345-l1: Do not assume a fixed block to cpu mapping
  tpm_tis: Explicitly check for error code
  btrfs: check for commit error at btrfs_attach_transaction_barrier()
  hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
  staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
  Documentation: security-bugs.rst: clarify CVE handling
  Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
  usb: xhci-mtk: set the dma max_seg_size
  USB: quirks: add quirk for Focusrite Scarlett
  usb: ohci-at91: Fix the unhandle interrupt when resume
  usb: dwc3: don't reset device side if dwc3 was configured as host-only
  usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
  Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
  can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED
  USB: serial: simple: sort driver entries
  USB: serial: simple: add Kaufmann RKS+CAN VCP
  USB: serial: option: add Quectel EC200A module support
  USB: serial: option: support Quectel EM060K_128
  tracing: Fix warning in trace_buffered_event_disable()
  ring-buffer: Fix wrong stat of cpu_buffer->read
  ata: pata_ns87415: mark ns87560_tf_read static
  dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths
  block: Fix a source code comment in include/uapi/linux/blkzoned.h
  ASoC: fsl_spdif: Silence output on stop
  drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
  RDMA/mlx4: Make check for invalid flags stricter
  benet: fix return value check in be_lancer_xmit_workarounds()
  net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64
  net/sched: mqprio: add extack to mqprio_parse_nlattr()
  net/sched: mqprio: refactor nlattr parsing to a separate function
  platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
  team: reset team's flags when down link is P2P device
  bonding: reset bond's flags when down link is P2P device
  tcp: Reduce chance of collisions in inet6_hashfn().
  ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address
  ethernet: atheros: fix return value check in atl1e_tso_csum()
  phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
  i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
  ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
  scsi: qla2xxx: Array index may go out of bound
  scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c
  ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
  ftrace: Store the order of pages allocated in ftrace_page
  ftrace: Check if pages were allocated before calling free_pages()
  ftrace: Add information on number of page groups allocated
  fs: dlm: interrupt posix locks only when process is killed
  dlm: rearrange async condition return
  dlm: cleanup plock_op vs plock_xop
  PCI/ASPM: Avoid link retraining race
  PCI/ASPM: Factor out pcie_wait_for_retrain()
  PCI/ASPM: Return 0 or -ETIMEDOUT from pcie_retrain_link()
  PCI: Rework pcie_retrain_link() wait loop
  ext4: Fix reusing stale buffer heads from last failed mounting
  ext4: rename journal_dev to s_journal_dev inside ext4_sb_info
  btrfs: fix extent buffer leak after tree mod log failure at split_node()
  bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent
  bcache: remove 'int n' from parameter list of bch_bucket_alloc_set()
  bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set
  gpio: tps68470: Make tps68470_gpio_output() always set the initial value
  tracing/histograms: Return an error if we fail to add histogram to hist_vars list
  tcp: annotate data-races around fastopenq.max_qlen
  tcp: annotate data-races around tp->notsent_lowat
  tcp: annotate data-races around rskq_defer_accept
  tcp: annotate data-races around tp->linger2
  net: Replace the limit of TCP_LINGER2 with TCP_FIN_TIMEOUT_MAX
  netfilter: nf_tables: can't schedule in nft_chain_validate
  netfilter: nf_tables: fix spurious set element insertion failure
  llc: Don't drop packet from non-root netns.
  fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
  Revert "tcp: avoid the lookup process failing to get sk in ehash table"
  net:ipv6: check return value of pskb_trim()
  net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
  pinctrl: amd: Use amd_pinconf_set() for all config options
  fbdev: imxfb: warn about invalid left/right margin
  spi: bcm63xx: fix max prepend length
  igb: Fix igb_down hung on surprise removal
  wifi: iwlwifi: mvm: avoid baid size integer overflow
  wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point()
  bpf: Address KCSAN report on bpf_lru_list
  sched/fair: Don't balance task to its current running CPU
  posix-timers: Ensure timer ID search-loop limit is valid
  md/raid10: prevent soft lockup while flush writes
  md: fix data corruption for raid456 when reshape restart while grow up
  nbd: Add the maximum limit of allocated index in nbd_dev_add
  debugobjects: Recheck debug_objects_enabled before reporting
  ext4: correct inline offset when handling xattrs in inode body
  can: bcm: Fix UAF in bcm_proc_show()
  fuse: revalidate: don't invalidate if interrupted
  perf probe: Add test for regression introduced by switch to die_get_decl_file()
  tracing/histograms: Add histograms to hist_vars if they have referenced variables
  drm/atomic: Fix potential use-after-free in nonblocking commits
  scsi: qla2xxx: Pointer may be dereferenced
  scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
  scsi: qla2xxx: Fix potential NULL pointer dereference
  scsi: qla2xxx: Wait for io return on terminate rport
  xtensa: ISS: fix call to split_if_spec
  ring-buffer: Fix deadloop issue on reading trace_pipe
  tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk
  tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() in case of error
  Revert "8250: add support for ASIX devices with a FIFO bug"
  meson saradc: fix clock divider mask length
  ceph: don't let check_caps skip sending responses for revoke msgs
  hwrng: imx-rngc - fix the timeout for init and self check
  serial: atmel: don't enable IRQs prematurely
  fs: dlm: return positive pid value for F_GETLK
  md/raid0: add discard support for the 'original' layout
  misc: pci_endpoint_test: Re-init completion for every test
  misc: pci_endpoint_test: Free IRQs before removing the device
  PCI: rockchip: Use u32 variable to access 32-bit registers
  PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core
  PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked
  PCI: rockchip: Write PCI Device ID to correct register
  PCI: rockchip: Assert PCI Configuration Enable bit after probe
  PCI: qcom: Disable write access to read only registers for IP v2.3.3
  PCI: Add function 1 DMA alias quirk for Marvell 88SE9235
  PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold
  jfs: jfs_dmap: Validate db_l2nbperpage while mounting
  ext4: only update i_reserved_data_blocks on successful block allocation
  ext4: fix wrong unit use in ext4_mb_clear_bb
  perf intel-pt: Fix CYC timestamps after standalone CBR
  SUNRPC: Fix UAF in svc_tcp_listen_data_ready()
  net: bcmgenet: Ensure MDIO unregistration has clocks enabled
  tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
  pinctrl: amd: Only use special debounce behavior for GPIO 0
  pinctrl: amd: Detect internal GPIO0 debounce handling
  pinctrl: amd: Fix mistake in handling clearing pins at startup
  net/sched: make psched_mtu() RTNL-less safe
  wifi: airo: avoid uninitialized warning in airo_get_rate()
  ipv6/addrconf: fix a potential refcount underflow for idev
  NTB: ntb_tool: Add check for devm_kcalloc
  NTB: ntb_transport: fix possible memory leak while device_register() fails
  ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
  NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
  ntb: idt: Fix error handling in idt_pci_driver_init()
  udp6: fix udp6_ehashfn() typo
  icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().
  vrf: Increment Icmp6InMsgs on the original netdev
  net: mvneta: fix txq_map in case of txq_number==1
  workqueue: clean up WORK_* constant types, clarify masking
  net: lan743x: Don't sleep in atomic context
  netfilter: nf_tables: prevent OOB access in nft_byteorder_eval
  netfilter: conntrack: Avoid nf_ct_helper_hash uses after free
  netfilter: nf_tables: fix scheduling-while-atomic splat
  netfilter: nf_tables: unbind non-anonymous set if rule construction fails
  netfilter: nf_tables: reject unbound anonymous set before commit phase
  netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
  netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
  netfilter: nf_tables: use net_generic infra for transaction data
  netfilter: add helper function to set up the nfnetlink header and use it
  netfilter: nftables: add helper function to set the base sequence number
  netfilter: nf_tables: add rescheduling points during loop detection walks
  netfilter: nf_tables: fix nat hook table deletion
  spi: spi-fsl-spi: allow changing bits_per_word while CS is still active
  spi: spi-fsl-spi: relax message sanity checking a little
  spi: spi-fsl-spi: remove always-true conditional in fsl_spi_do_one_msg
  ARM: orion5x: fix d2net gpio initialization
  btrfs: fix race when deleting quota root from the dirty cow roots list
  jffs2: reduce stack usage in jffs2_build_xattr_subsystem()
  integrity: Fix possible multiple allocation in integrity_inode_get()
  bcache: Remove unnecessary NULL point check in node allocations
  mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M
  mmc: core: disable TRIM on Kingston EMMC04G-M627
  NFSD: add encoding of op_recall flag for write delegation
  ALSA: jack: Fix mutex call in snd_jack_report()
  i2c: xiic: Don't try to handle more interrupt events after error
  i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process()
  sh: dma: Fix DMA channel offset calculation
  net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX
  tcp: annotate data races in __tcp_oow_rate_limited()
  net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
  powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y
  f2fs: fix error path handling in truncate_dnode()
  mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
  spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
  Add MODULE_FIRMWARE() for FIRMWARE_TG357766.
  sctp: fix potential deadlock on &net->sctp.addr_wq_lock
  rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
  mfd: stmpe: Only disable the regulators if they are enabled
  mfd: intel-lpss: Add missing check for platform_get_resource
  KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes
  mfd: rt5033: Drop rt5033-battery sub-device
  usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
  extcon: Fix kernel doc of property capability fields to avoid warnings
  extcon: Fix kernel doc of property fields to avoid warnings
  media: usb: siano: Fix warning due to null work_func_t function pointer
  media: videodev2.h: Fix struct v4l2_input tuner index comment
  media: usb: Check az6007_read() return value
  sh: j2: Use ioremap() to translate device tree address into kernel memory
  w1: fix loop in w1_fini()
  block: change all __u32 annotations to __be32 in affs_hardblocks.h
  USB: serial: option: add LARA-R6 01B PIDs
  ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard
  ARCv2: entry: rewrite to enable use of double load/stores LDD/STD
  ARCv2: entry: avoid a branch
  ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE
  ARCv2: entry: comments about hardware auto-save on taken interrupts
  modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}
  modpost: fix section mismatch message for R_ARM_ABS32
  crypto: nx - fix build warnings when DEBUG_FS is not enabled
  hwrng: virtio - Fix race on data_avail and actual data
  hwrng: virtio - always add a pending request
  hwrng: virtio - don't waste entropy
  hwrng: virtio - don't wait on cleanup
  hwrng: virtio - add an internal buffer
  pinctrl: at91-pio4: check return value of devm_kasprintf()
  perf dwarf-aux: Fix off-by-one in die_get_varname()
  pinctrl: cherryview: Return correct value if pin in push-pull mode
  PCI: Add pci_clear_master() stub for non-CONFIG_PCI
  scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()
  ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer
  drm/radeon: fix possible division-by-zero errors
  fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()
  arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1
  IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
  soc/fsl/qe: fix usb.c build errors
  ASoC: es8316: Increment max value for ALC Capture Target Volume control
  ARM: ep93xx: fix missing-prototype warnings
  drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H
  Input: adxl34x - do not hardcode interrupt trigger type
  ARM: dts: BCM5301X: Drop "clock-names" from the SPI node
  Input: drv260x - sleep between polling GO bit
  radeon: avoid double free in ci_dpm_init()
  netlink: Add __sock_i_ino() for __netlink_diag_dump().
  ipvlan: Fix return value of ipvlan_queue_xmit()
  netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
  lib/ts_bm: reset initial match offset for every block of text
  gtp: Fix use-after-free in __gtp_encap_destroy().
  netlink: do not hard code device address lenth in fdb dumps
  netlink: fix potential deadlock in netlink_set_err()
  wifi: ath9k: convert msecs to jiffies where needed
  wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key()
  memstick r592: make memstick_debug_get_tpc_name() static
  kexec: fix a memory leak in crash_shrink_memory()
  watchdog/perf: more properly prevent false positives with turbo modes
  watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config
  wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown
  wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes
  wifi: ray_cs: Fix an error handling path in ray_probe()
  wifi: ray_cs: Drop useless status variable in parse_addr()
  wifi: ray_cs: Utilize strnlen() in parse_addr()
  wifi: wl3501_cs: Fix an error handling path in wl3501_probe()
  wl3501_cs: use eth_hw_addr_set()
  net: create netdev->dev_addr assignment helpers
  wl3501_cs: Fix misspelling and provide missing documentation
  wl3501_cs: Remove unnecessary NULL check
  wl3501_cs: Fix a bunch of formatting issues related to function docs
  wifi: atmel: Fix an error handling path in atmel_probe()
  wifi: orinoco: Fix an error handling path in orinoco_cs_probe()
  wifi: orinoco: Fix an error handling path in spectrum_cs_probe()
  nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()
  nfc: constify several pointers to u8, char and sk_buff
  wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()
  samples/bpf: Fix buffer overflow in tcp_basertt
  wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
  wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation
  evm: Complete description of evm_inode_setattr()
  ARM: 9303/1: kprobes: avoid missing-declaration warnings
  PM: domains: fix integer overflow issues in genpd_parse_state()
  clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
  clocksource/drivers/cadence-ttc: Use ttc driver as platform driver
  clocksource/drivers: Unify the names to timer-* format
  irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
  irqchip/jcore-aic: Kill use of irq_create_strict_mappings()
  md/raid10: fix io loss while replacement replace rdev
  md/raid10: fix wrong setting of max_corr_read_errors
  md/raid10: fix overflow of md/safe_mode_delay
  md/raid10: check slab-out-of-bounds in md_bitmap_get_counter
  treewide: Remove uninitialized_var() usage
  drm/amdgpu: Validate VM ioctl flags.
  scripts/tags.sh: Resolve gtags empty index generation
  drm/edid: Fix uninitialized variable in drm_cvt_modes()
  fbdev: imsttfb: Fix use after free bug in imsttfb_probe
  video: imsttfb: check for ioremap() failures
  x86/smp: Use dedicated cache-line for mwait_play_dead()
  gfs2: Don't deref jdesc in evict
  Linux 4.19.290
  x86: fix backwards merge of GDS/SRSO bit
  xen/netback: Fix buffer overrun triggered by unusual packet
  Documentation/x86: Fix backwards on/off logic about YMM support
  x86/xen: Fix secondary processors' FPU initialization
  KVM: Add GDS_NO support to KVM
  x86/speculation: Add Kconfig option for GDS
  x86/speculation: Add force option to GDS mitigation
  x86/speculation: Add Gather Data Sampling mitigation
  x86/fpu: Move FPU initialization into arch_cpu_finalize_init()
  x86/fpu: Mark init functions __init
  x86/fpu: Remove cpuinfo argument from init functions
  init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init()
  init: Invoke arch_cpu_finalize_init() earlier
  init: Remove check_bugs() leftovers
  um/cpu: Switch to arch_cpu_finalize_init()
  sparc/cpu: Switch to arch_cpu_finalize_init()
  sh/cpu: Switch to arch_cpu_finalize_init()
  mips/cpu: Switch to arch_cpu_finalize_init()
  m68k/cpu: Switch to arch_cpu_finalize_init()
  ia64/cpu: Switch to arch_cpu_finalize_init()
  ARM: cpu: Switch to arch_cpu_finalize_init()
  x86/cpu: Switch to arch_cpu_finalize_init()
  init: Provide arch_cpu_finalize_init()

 Conflicts:
	drivers/mmc/core/block.c
	drivers/mmc/host/sdhci-msm.c
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/gadget.c

Change-Id: Id2f4d5c8067f8e5eda39c0eaa5e59d54a394b4c7
2023-09-19 18:11:03 +03:00
Greg Kroah-Hartman
ab7141647e This is the 4.19.293 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmTvUuwACgkQONu9yGCS
 aT7LpA/+N7Em43G700yL9LlPAwa6xWE22OMyidakDJfd2pZ/yfi7/rsdCKMpPi4o
 Y+jyax8jj1V473rAM1emBUpy8EMnJD+0Fh/279rO3C0F61wgt8QLU9M+8bb5g/lE
 IWziYXdugRoBsLvp22GYlNT1s/EAd1g5eWrUYkPaL0nZe6p1eF+rFF0+qUCbY77q
 q3jSh3SCeGPn9x3IGBwD7v21dA4ZlpIkbie3Pd8ARSKfeGKKaiRSVNH4xoEcimFt
 6j13d0VEdJC4Ew5Ir5S0oFHaTsYAR8EcKiJoaPsJ+SAUNh+RH2v3D+t8+oBbXkj5
 JxTRwohL2P9MQAW/xXrArwuKN4PghtJeE3xZGjkwS/wJzuQ0oqxfZwFNsU1p467O
 KkInV+soyD9GoAAzpbGO3GwgP1mybUOpLzS5ERwn43yKgOad6XjYiTw7PIzahgJ7
 gvBrqqOQMFOMrPoLhVzhWnUP9kcVSjvn49HJ9blX0sg5ShDra/q0bs8l9fSIAJnv
 GBZkV7CyqoZNULXjG8/jqlzijf5FpGwTX4mHJ1n2M58CskmXxqRt2bP/KmFzn8j/
 ny3aVIN06c6VTNZ4Cu2h9CC1T4ZW0CNteMzweHMY+0PU8Y3BA+XBQVnQ1F+r+TF5
 hbSxiPB5uYJJFfTkUlf8QMAfC7h1pbxgCy4YsJ1QlEt3Ai8ypo4=
 =gx/M
 -----END PGP SIGNATURE-----

Merge 4.19.293 into android-4.19-stable

Changes in 4.19.293
	lib/mpi: Eliminate unused umul_ppmm definitions for MIPS
	selftests: forwarding: tc_flower: Relax success criterion
	drm/radeon: Fix integer overflow in radeon_cs_parser_init
	ALSA: emu10k1: roll up loops in DSP setup code for Audigy
	quota: Properly disable quotas when add_dquot_ref() fails
	quota: fix warning in dqgrab()
	HID: add quirk for 03f0:464a HP Elite Presenter Mouse
	udf: Fix uninitialized array access for some pathnames
	fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
	MIPS: dec: prom: Address -Warray-bounds warning
	FS: JFS: Fix null-ptr-deref Read in txBegin
	FS: JFS: Check for read-only mounted filesystem in txBegin
	media: v4l2-mem2mem: add lock to protect parameter num_rdy
	media: platform: mediatek: vpu: fix NULL ptr dereference
	gfs2: Fix possible data races in gfs2_show_options()
	pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()
	Bluetooth: L2CAP: Fix use-after-free
	drm/amdgpu: Fix potential fence use-after-free v2
	IMA: allow/fix UML builds
	iio: add addac subdirectory
	iio: adc: stx104: Utilize iomap interface
	iio: adc: stx104: Implement and utilize register structures
	iio: addac: stx104: Fix race condition for stx104_write_raw()
	iio: addac: stx104: Fix race condition when converting analog-to-digital
	powerpc/mm: move platform specific mmu-xxx.h in platform directories
	powerpc/mm: Move pgtable_t into platform headers
	powerpc/mm: dump segment registers on book3s/32
	powerpc/mm: dump block address translation on book3s/32
	powerpc: Move page table dump files in a dedicated subdirectory
	powerpc/64s/radix: Fix soft dirty tracking
	x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms
	irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()
	irqchip/mips-gic: Use raw spinlock for gic_lock
	usb: dwc3: qcom: Add helper functions to enable,disable wake irqs
	USB: dwc3: qcom: fix NULL-deref on suspend
	mmc: meson-gx: remove useless lock
	mmc: meson-gx: remove redundant mmc_request_done() call from irq context
	mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock()
	mmc: tmio: move tmio_mmc_set_clock() to platform hook
	mmc: Remove dev_err() usage after platform_get_irq()
	mmc: bcm2835: fix deferred probing
	mmc: sunxi: fix deferred probing
	block: fix signed int overflow in Amiga partition support
	nfsd4: kill warnings on testing stateids with mismatched clientids
	nfsd: Remove incorrect check in nfsd4_validate_stateid
	virtio-mmio: convert to devm_platform_ioremap_resource
	virtio-mmio: Use to_virtio_mmio_device() to simply code
	virtio-mmio: don't break lifecycle of vm_dev
	fbdev: mmp: fix value check in mmphw_probe()
	powerpc/rtas_flash: allow user copy to flash block cache objects
	btrfs: fix BUG_ON condition in btrfs_cancel_balance
	net: xfrm: Fix xfrm_address_filter OOB read
	net: af_key: fix sadb_x_filter validation
	xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c
	xfrm: fix slab-use-after-free in decode_session6
	ip6_vti: fix slab-use-after-free in decode_session6
	ip_vti: fix potential slab-use-after-free in decode_session6
	xfrm: add NULL check in xfrm_update_ae_params
	selftests: mirror_gre_changes: Tighten up the TTL test match
	netfilter: nft_dynset: disallow object maps
	team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
	i40e: fix misleading debug logs
	sock: Fix misuse of sk_under_memory_pressure()
	net: do not allow gso_size to be set to GSO_BY_FRAGS
	ASoC: rt5665: add missed regulator_bulk_disable
	ASoC: meson: axg-tdm-formatter: fix channel slot allocation
	serial: 8250: Fix oops for port->pm on uart_change_pm()
	ALSA: usb-audio: Add support for Mythware XA001AU capture and playback interfaces.
	cifs: Release folio lock on fscache read hit.
	mmc: wbsd: fix double mmc_free_host() in wbsd_init()
	test_firmware: prevent race conditions by a correct implementation of locking
	netfilter: set default timeout to 3 secs for sctp shutdown send and recv state
	af_unix: Fix null-ptr-deref in unix_stream_sendpage().
	virtio-net: set queues after driver_ok
	net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
	net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure
	net: phy: broadcom: stub c45 read/write for 54810
	PCI: acpiphp: Reassign resources on bridge if necessary
	dlm: improve plock logging if interrupted
	dlm: replace usage of found with dedicated list iterator variable
	fs: dlm: add pid to debug log
	fs: dlm: change plock interrupted message to debug again
	fs: dlm: use dlm_plock_info for do_unlock_close
	fs: dlm: fix mismatch of plock results from userspace
	MIPS: cpu-features: Enable octeon_cache by cpu_type
	MIPS: cpu-features: Use boot_cpu_type for CPU type based features
	Revert "tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP"
	tty: serial: fsl_lpuart: add earlycon for imx8ulp platform
	fbdev: Improve performance of sys_imageblit()
	fbdev: Fix sys_imageblit() for arbitrary image widths
	fbdev: fix potential OOB read in fast_imageblit()
	powerpc/32: add stack protector support
	powerpc: remove leftover code of old GCC version checks
	powerpc: Fail build if using recordmcount with binutils v2.37
	dm integrity: increase RECALC_SECTORS to improve recalculate speed
	dm integrity: reduce vmalloc space footprint on 32-bit architectures
	regmap: Account for register length in SMBus I/O limits
	drm/amd/display: do not wait for mpc idle if tg is disabled
	drm/amd/display: check TG is non-null before checking if enabled
	tracing: Fix memleak due to race between current_tracer and trace
	sock: annotate data-races around prot->memory_pressure
	dccp: annotate data-races in dccp_poll()
	igb: Avoid starting unnecessary workqueues
	net/sched: fix a qdisc modification with ambiguous command request
	net: remove bond_slave_has_mac_rcu()
	bonding: fix macvlan over alb bond support
	ipvs: Improve robustness to the ipvs sysctl
	ipvs: fix racy memcpy in proc_do_sync_threshold
	ibmveth: Use dcbf rather than dcbfl
	nfsd: Fix race to FREE_STATEID and cl_revoked
	batman-adv: Trigger events for auto adjusted MTU
	batman-adv: Don't increase MTU when set by user
	batman-adv: Do not get eth header before batadv_check_management_packet
	batman-adv: Fix TT global entry leak when client roamed back
	batman-adv: Fix batadv_v_ogm_aggr_send memory leak
	lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
	media: vcodec: Fix potential array out-of-bounds in encoder queue_setup
	PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus
	x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4
	mmc: block: Fix in_flight[issue_type] value error
	sched/rt: pick_next_rt_entity(): check list_entry
	netfilter: nf_queue: fix socket leak
	rtnetlink: Reject negative ifindexes in RTM_NEWLINK
	irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
	scsi: snic: Fix double free in snic_tgt_create()
	scsi: core: raid_class: Remove raid_component_add()
	clk: Fix undefined reference to `clk_rate_exclusive_{get,put}'
	dma-buf/sw_sync: Avoid recursive lock during fence signal
	Linux 4.19.293

Change-Id: Idd55c28550596932baf6645b788c48b548cc6271
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-08-30 16:38:16 +00:00
Zhu Wang
11c8670818 scsi: core: raid_class: Remove raid_component_add()
commit 60c5fd2e8f3c42a5abc565ba9876ead1da5ad2b7 upstream.

The raid_component_add() function was added to the kernel tree via patch
"[SCSI] embryonic RAID class" (2005). Remove this function since it never
has had any callers in the Linux kernel. And also raid_component_release()
is only used in raid_component_add(), so it is also removed.

Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230822015254.184270-1-wangzhu9@huawei.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Fixes: 04b5b5cb0136 ("scsi: core: Fix possible memory leak if device_add() fails")
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:31:56 +02:00
Zhu Wang
247661752b scsi: snic: Fix double free in snic_tgt_create()
commit 1bd3a76880b2bce017987cf53780b372cf59528e upstream.

Commit 41320b18a0e0 ("scsi: snic: Fix possible memory leak if device_add()
fails") fixed the memory leak caused by dev_set_name() when device_add()
failed. However, it did not consider that 'tgt' has already been released
when put_device(&tgt->dev) is called. Remove kfree(tgt) in the error path
to avoid double free of 'tgt' and move put_device(&tgt->dev) after the
removed kfree(tgt) to avoid a use-after-free.

Fixes: 41320b18a0e0 ("scsi: snic: Fix possible memory leak if device_add() fails")
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230819083941.164365-1-wangzhu9@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:31:56 +02:00
Greg Kroah-Hartman
b2cb45e59d Merge 4.19.292 into android-4.19-stable
Changes in 4.19.292
	sparc: fix up arch_cpu_finalize_init() build breakage.
	mmc: moxart: read scr register without changing byte order
	ipv6: adjust ndisc_is_useropt() to also return true for PIO
	dmaengine: pl330: Return DMA_PAUSED when transaction is paused
	drm/nouveau/gr: enable memory loads on helper invocation on all channels
	radix tree test suite: fix incorrect allocation size for pthreads
	nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
	iio: cros_ec: Fix the allocation size for cros_ec_command
	binder: fix memory leak in binder_init()
	usb-storage: alauda: Fix uninit-value in alauda_check_media()
	usb: dwc3: Properly handle processing of pending events
	x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
	x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
	x86: Move gds_ucode_mitigated() declaration to header
	drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
	mISDN: Update parameter type of dsp_cmx_send()
	net/packet: annotate data-races around tp->status
	bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
	dccp: fix data-race around dp->dccps_mss_cache
	drivers: net: prevent tun_build_skb() to exceed the packet size limit
	IB/hfi1: Fix possible panic during hotplug remove
	wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
	ibmvnic: Handle DMA unmapping of login buffs in release functions
	btrfs: don't stop integrity writeback too early
	netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush
	netfilter: nf_tables: report use refcount overflow
	scsi: core: Fix legacy /proc parsing buffer overflow
	scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
	scsi: 53c700: Check that command slot is not NULL
	scsi: snic: Fix possible memory leak if device_add() fails
	scsi: core: Fix possible memory leak if device_add() fails
	alpha: remove __init annotation from exported page_is_ram()
	sch_netem: fix issues in netem_change() vs get_dist_table()
	Linux 4.19.292

Change-Id: Ie4a1393c672e280631d9a0949e081f134dff3e3b
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-08-28 15:24:42 +00:00
Greg Kroah-Hartman
813e482b1b This is the 4.19.291 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmTWBMYACgkQONu9yGCS
 aT5fcw//f8IqgXhnM1RmdENWcj8Yttld1jY0L8+z2fRvkzmuqFJAnOuTEP/BV9Zk
 iMNH6Hg5iZh/ajGyW4OxsWHvaDNyZtpPOgNtQkhHPPDq5tqAgg+8ZgPlZkmbvnGd
 askxaSJE7OuJOfG193o/Uf0CR/boSIN1ioIu0vumqhrP2NUbe44/PLeSB239ZdGy
 nIaBo1JXffOH8P7kSS4E9NSrfoA9MQEuJgcYPkc1c08W2FWO8MftM/hdQtXGwbNC
 LCy4yGc3PN40MT7tOsXE0w3P+ZUXfP6g8NgHooRKuLimSiAYodLgCwnvELZ/Nsg+
 w1TPDxbLD99te5J16GzlzhN4+9BUtf2qq9ZgiJQ8lmKaGc+hAMRKF2h2E5Qhla8R
 TJubYFjD5yilANlRumVHMzNJZntROw0hG0ZIX6An/1QM5JAy7B736jI6jt+RZFSx
 r08xhBXcO+m3s2Vc2OojJFKLot9i0ugiKkTuQBZsBFDfcOtSrUUarB6Vz6wZvCY8
 sojQOS0eoYb+2GlKJ0UzTPLEHrCpusRkEnv3QMAPfTkw6vqvkrYACfOEbBujfT8e
 TtC7wuS3beULYPKpObe9HrpCooOXX8YQFXyld5e5iBINXwt/UT4daDL85BbMsPEu
 MPaSKrTMGXUsRoOWHiuPumT/MDE5LBSCqhyi41k90R9qRW6M+Wk=
 =KuAb
 -----END PGP SIGNATURE-----

Merge 4.19.291 into android-4.19-stable

Changes in 4.19.291
	gfs2: Don't deref jdesc in evict
	x86/smp: Use dedicated cache-line for mwait_play_dead()
	video: imsttfb: check for ioremap() failures
	fbdev: imsttfb: Fix use after free bug in imsttfb_probe
	drm/edid: Fix uninitialized variable in drm_cvt_modes()
	scripts/tags.sh: Resolve gtags empty index generation
	drm/amdgpu: Validate VM ioctl flags.
	treewide: Remove uninitialized_var() usage
	md/raid10: check slab-out-of-bounds in md_bitmap_get_counter
	md/raid10: fix overflow of md/safe_mode_delay
	md/raid10: fix wrong setting of max_corr_read_errors
	md/raid10: fix io loss while replacement replace rdev
	irqchip/jcore-aic: Kill use of irq_create_strict_mappings()
	irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
	clocksource/drivers: Unify the names to timer-* format
	clocksource/drivers/cadence-ttc: Use ttc driver as platform driver
	clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
	PM: domains: fix integer overflow issues in genpd_parse_state()
	ARM: 9303/1: kprobes: avoid missing-declaration warnings
	evm: Complete description of evm_inode_setattr()
	wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation
	wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
	samples/bpf: Fix buffer overflow in tcp_basertt
	wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()
	nfc: constify several pointers to u8, char and sk_buff
	nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()
	wifi: orinoco: Fix an error handling path in spectrum_cs_probe()
	wifi: orinoco: Fix an error handling path in orinoco_cs_probe()
	wifi: atmel: Fix an error handling path in atmel_probe()
	wl3501_cs: Fix a bunch of formatting issues related to function docs
	wl3501_cs: Remove unnecessary NULL check
	wl3501_cs: Fix misspelling and provide missing documentation
	net: create netdev->dev_addr assignment helpers
	wl3501_cs: use eth_hw_addr_set()
	wifi: wl3501_cs: Fix an error handling path in wl3501_probe()
	wifi: ray_cs: Utilize strnlen() in parse_addr()
	wifi: ray_cs: Drop useless status variable in parse_addr()
	wifi: ray_cs: Fix an error handling path in ray_probe()
	wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes
	wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown
	watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config
	watchdog/perf: more properly prevent false positives with turbo modes
	kexec: fix a memory leak in crash_shrink_memory()
	memstick r592: make memstick_debug_get_tpc_name() static
	wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key()
	wifi: ath9k: convert msecs to jiffies where needed
	netlink: fix potential deadlock in netlink_set_err()
	netlink: do not hard code device address lenth in fdb dumps
	gtp: Fix use-after-free in __gtp_encap_destroy().
	lib/ts_bm: reset initial match offset for every block of text
	netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
	ipvlan: Fix return value of ipvlan_queue_xmit()
	netlink: Add __sock_i_ino() for __netlink_diag_dump().
	radeon: avoid double free in ci_dpm_init()
	Input: drv260x - sleep between polling GO bit
	ARM: dts: BCM5301X: Drop "clock-names" from the SPI node
	Input: adxl34x - do not hardcode interrupt trigger type
	drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H
	ARM: ep93xx: fix missing-prototype warnings
	ASoC: es8316: Increment max value for ALC Capture Target Volume control
	soc/fsl/qe: fix usb.c build errors
	IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
	arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1
	fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()
	drm/radeon: fix possible division-by-zero errors
	ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer
	scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()
	PCI: Add pci_clear_master() stub for non-CONFIG_PCI
	pinctrl: cherryview: Return correct value if pin in push-pull mode
	perf dwarf-aux: Fix off-by-one in die_get_varname()
	pinctrl: at91-pio4: check return value of devm_kasprintf()
	hwrng: virtio - add an internal buffer
	hwrng: virtio - don't wait on cleanup
	hwrng: virtio - don't waste entropy
	hwrng: virtio - always add a pending request
	hwrng: virtio - Fix race on data_avail and actual data
	crypto: nx - fix build warnings when DEBUG_FS is not enabled
	modpost: fix section mismatch message for R_ARM_ABS32
	modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}
	ARCv2: entry: comments about hardware auto-save on taken interrupts
	ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE
	ARCv2: entry: avoid a branch
	ARCv2: entry: rewrite to enable use of double load/stores LDD/STD
	ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard
	USB: serial: option: add LARA-R6 01B PIDs
	block: change all __u32 annotations to __be32 in affs_hardblocks.h
	w1: fix loop in w1_fini()
	sh: j2: Use ioremap() to translate device tree address into kernel memory
	media: usb: Check az6007_read() return value
	media: videodev2.h: Fix struct v4l2_input tuner index comment
	media: usb: siano: Fix warning due to null work_func_t function pointer
	extcon: Fix kernel doc of property fields to avoid warnings
	extcon: Fix kernel doc of property capability fields to avoid warnings
	usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
	mfd: rt5033: Drop rt5033-battery sub-device
	KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes
	mfd: intel-lpss: Add missing check for platform_get_resource
	mfd: stmpe: Only disable the regulators if they are enabled
	rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
	sctp: fix potential deadlock on &net->sctp.addr_wq_lock
	Add MODULE_FIRMWARE() for FIRMWARE_TG357766.
	spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
	mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
	f2fs: fix error path handling in truncate_dnode()
	powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y
	net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
	tcp: annotate data races in __tcp_oow_rate_limited()
	net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX
	sh: dma: Fix DMA channel offset calculation
	i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process()
	i2c: xiic: Don't try to handle more interrupt events after error
	ALSA: jack: Fix mutex call in snd_jack_report()
	NFSD: add encoding of op_recall flag for write delegation
	mmc: core: disable TRIM on Kingston EMMC04G-M627
	mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M
	bcache: Remove unnecessary NULL point check in node allocations
	integrity: Fix possible multiple allocation in integrity_inode_get()
	jffs2: reduce stack usage in jffs2_build_xattr_subsystem()
	btrfs: fix race when deleting quota root from the dirty cow roots list
	ARM: orion5x: fix d2net gpio initialization
	spi: spi-fsl-spi: remove always-true conditional in fsl_spi_do_one_msg
	spi: spi-fsl-spi: relax message sanity checking a little
	spi: spi-fsl-spi: allow changing bits_per_word while CS is still active
	netfilter: nf_tables: fix nat hook table deletion
	netfilter: nf_tables: add rescheduling points during loop detection walks
	netfilter: nftables: add helper function to set the base sequence number
	netfilter: add helper function to set up the nfnetlink header and use it
	netfilter: nf_tables: use net_generic infra for transaction data
	netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
	netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
	netfilter: nf_tables: reject unbound anonymous set before commit phase
	netfilter: nf_tables: unbind non-anonymous set if rule construction fails
	netfilter: nf_tables: fix scheduling-while-atomic splat
	netfilter: conntrack: Avoid nf_ct_helper_hash uses after free
	netfilter: nf_tables: prevent OOB access in nft_byteorder_eval
	net: lan743x: Don't sleep in atomic context
	workqueue: clean up WORK_* constant types, clarify masking
	net: mvneta: fix txq_map in case of txq_number==1
	vrf: Increment Icmp6InMsgs on the original netdev
	icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().
	udp6: fix udp6_ehashfn() typo
	ntb: idt: Fix error handling in idt_pci_driver_init()
	NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
	ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
	NTB: ntb_transport: fix possible memory leak while device_register() fails
	NTB: ntb_tool: Add check for devm_kcalloc
	ipv6/addrconf: fix a potential refcount underflow for idev
	wifi: airo: avoid uninitialized warning in airo_get_rate()
	net/sched: make psched_mtu() RTNL-less safe
	pinctrl: amd: Fix mistake in handling clearing pins at startup
	pinctrl: amd: Detect internal GPIO0 debounce handling
	pinctrl: amd: Only use special debounce behavior for GPIO 0
	tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
	net: bcmgenet: Ensure MDIO unregistration has clocks enabled
	SUNRPC: Fix UAF in svc_tcp_listen_data_ready()
	perf intel-pt: Fix CYC timestamps after standalone CBR
	ext4: fix wrong unit use in ext4_mb_clear_bb
	ext4: only update i_reserved_data_blocks on successful block allocation
	jfs: jfs_dmap: Validate db_l2nbperpage while mounting
	PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold
	PCI: Add function 1 DMA alias quirk for Marvell 88SE9235
	PCI: qcom: Disable write access to read only registers for IP v2.3.3
	PCI: rockchip: Assert PCI Configuration Enable bit after probe
	PCI: rockchip: Write PCI Device ID to correct register
	PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked
	PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core
	PCI: rockchip: Use u32 variable to access 32-bit registers
	misc: pci_endpoint_test: Free IRQs before removing the device
	misc: pci_endpoint_test: Re-init completion for every test
	md/raid0: add discard support for the 'original' layout
	fs: dlm: return positive pid value for F_GETLK
	serial: atmel: don't enable IRQs prematurely
	hwrng: imx-rngc - fix the timeout for init and self check
	ceph: don't let check_caps skip sending responses for revoke msgs
	meson saradc: fix clock divider mask length
	Revert "8250: add support for ASIX devices with a FIFO bug"
	tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() in case of error
	tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk
	ring-buffer: Fix deadloop issue on reading trace_pipe
	xtensa: ISS: fix call to split_if_spec
	scsi: qla2xxx: Wait for io return on terminate rport
	scsi: qla2xxx: Fix potential NULL pointer dereference
	scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
	scsi: qla2xxx: Pointer may be dereferenced
	drm/atomic: Fix potential use-after-free in nonblocking commits
	tracing/histograms: Add histograms to hist_vars if they have referenced variables
	perf probe: Add test for regression introduced by switch to die_get_decl_file()
	fuse: revalidate: don't invalidate if interrupted
	can: bcm: Fix UAF in bcm_proc_show()
	ext4: correct inline offset when handling xattrs in inode body
	debugobjects: Recheck debug_objects_enabled before reporting
	nbd: Add the maximum limit of allocated index in nbd_dev_add
	md: fix data corruption for raid456 when reshape restart while grow up
	md/raid10: prevent soft lockup while flush writes
	posix-timers: Ensure timer ID search-loop limit is valid
	sched/fair: Don't balance task to its current running CPU
	bpf: Address KCSAN report on bpf_lru_list
	wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point()
	wifi: iwlwifi: mvm: avoid baid size integer overflow
	igb: Fix igb_down hung on surprise removal
	spi: bcm63xx: fix max prepend length
	fbdev: imxfb: warn about invalid left/right margin
	pinctrl: amd: Use amd_pinconf_set() for all config options
	net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
	net:ipv6: check return value of pskb_trim()
	Revert "tcp: avoid the lookup process failing to get sk in ehash table"
	fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
	llc: Don't drop packet from non-root netns.
	netfilter: nf_tables: fix spurious set element insertion failure
	netfilter: nf_tables: can't schedule in nft_chain_validate
	net: Replace the limit of TCP_LINGER2 with TCP_FIN_TIMEOUT_MAX
	tcp: annotate data-races around tp->linger2
	tcp: annotate data-races around rskq_defer_accept
	tcp: annotate data-races around tp->notsent_lowat
	tcp: annotate data-races around fastopenq.max_qlen
	tracing/histograms: Return an error if we fail to add histogram to hist_vars list
	gpio: tps68470: Make tps68470_gpio_output() always set the initial value
	bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set
	bcache: remove 'int n' from parameter list of bch_bucket_alloc_set()
	bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent
	btrfs: fix extent buffer leak after tree mod log failure at split_node()
	ext4: rename journal_dev to s_journal_dev inside ext4_sb_info
	ext4: Fix reusing stale buffer heads from last failed mounting
	PCI: Rework pcie_retrain_link() wait loop
	PCI/ASPM: Return 0 or -ETIMEDOUT from pcie_retrain_link()
	PCI/ASPM: Factor out pcie_wait_for_retrain()
	PCI/ASPM: Avoid link retraining race
	dlm: cleanup plock_op vs plock_xop
	dlm: rearrange async condition return
	fs: dlm: interrupt posix locks only when process is killed
	ftrace: Add information on number of page groups allocated
	ftrace: Check if pages were allocated before calling free_pages()
	ftrace: Store the order of pages allocated in ftrace_page
	ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
	scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c
	scsi: qla2xxx: Array index may go out of bound
	ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
	i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
	phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
	ethernet: atheros: fix return value check in atl1e_tso_csum()
	ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address
	tcp: Reduce chance of collisions in inet6_hashfn().
	bonding: reset bond's flags when down link is P2P device
	team: reset team's flags when down link is P2P device
	platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
	net/sched: mqprio: refactor nlattr parsing to a separate function
	net/sched: mqprio: add extack to mqprio_parse_nlattr()
	net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64
	benet: fix return value check in be_lancer_xmit_workarounds()
	RDMA/mlx4: Make check for invalid flags stricter
	drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
	ASoC: fsl_spdif: Silence output on stop
	block: Fix a source code comment in include/uapi/linux/blkzoned.h
	dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths
	ata: pata_ns87415: mark ns87560_tf_read static
	ring-buffer: Fix wrong stat of cpu_buffer->read
	tracing: Fix warning in trace_buffered_event_disable()
	USB: serial: option: support Quectel EM060K_128
	USB: serial: option: add Quectel EC200A module support
	USB: serial: simple: add Kaufmann RKS+CAN VCP
	USB: serial: simple: sort driver entries
	can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED
	Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
	usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
	usb: dwc3: don't reset device side if dwc3 was configured as host-only
	usb: ohci-at91: Fix the unhandle interrupt when resume
	USB: quirks: add quirk for Focusrite Scarlett
	usb: xhci-mtk: set the dma max_seg_size
	Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
	Documentation: security-bugs.rst: clarify CVE handling
	staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
	hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
	btrfs: check for commit error at btrfs_attach_transaction_barrier()
	tpm_tis: Explicitly check for error code
	irq-bcm6345-l1: Do not assume a fixed block to cpu mapping
	serial: 8250_dw: split Synopsys DesignWare 8250 common functions
	serial: 8250_dw: Preserve original value of DLF register
	virtio-net: fix race between set queues and probe
	s390/dasd: fix hanging device after quiesce/resume
	ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register
	dm cache policy smq: ensure IO doesn't prevent cleaner policy progress
	drm/client: Fix memory leak in drm_client_target_cloned
	net/sched: cls_fw: Fix improper refcount update leads to use-after-free
	net/sched: sch_qfq: account for stab overhead in qfq_enqueue
	ASoC: cs42l51: fix driver to properly autoload with automatic module loading
	net/sched: cls_u32: Fix reference counter leak leading to overflow
	perf: Fix function pointer case
	loop: Select I/O scheduler 'none' from inside add_disk()
	word-at-a-time: use the same return type for has_zero regardless of endianness
	KVM: s390: fix sthyi error handling
	net/mlx5e: fix return value check in mlx5e_ipsec_remove_trailer()
	perf test uprobe_from_different_cu: Skip if there is no gcc
	net: sched: cls_u32: Fix match key mis-addressing
	net: add missing data-race annotations around sk->sk_peek_off
	net: add missing data-race annotation for sk_ll_usec
	net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
	net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
	ip6mr: Fix skb_under_panic in ip6mr_cache_report()
	tcp_metrics: fix addr_same() helper
	tcp_metrics: annotate data-races around tm->tcpm_stamp
	tcp_metrics: annotate data-races around tm->tcpm_lock
	tcp_metrics: annotate data-races around tm->tcpm_vals[]
	tcp_metrics: annotate data-races around tm->tcpm_net
	tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
	scsi: zfcp: Defer fc_rport blocking until after ADISC response
	libceph: fix potential hang in ceph_osdc_notify()
	USB: zaurus: Add ID for A-300/B-500/C-700
	fs/sysv: Null check to prevent null-ptr-deref bug
	Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
	net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
	ext2: Drop fragment support
	test_firmware: fix a memory leak with reqs buffer
	test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
	mtd: rawnand: omap_elm: Fix incorrect type in assignment
	powerpc/mm/altmap: Fix altmap boundary check
	PM / wakeirq: support enabling wake-up irq after runtime_suspend called
	PM: sleep: wakeirq: fix wake irq arming
	ARM: dts: imx6sll: Make ssi node name same as other platforms
	ARM: dts: imx: add usb alias
	ARM: dts: imx6sll: fixup of operating points
	ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node
	drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
	arm64: dts: stratix10: fix incorrect I2C property for SCL signal
	drm/edid: fix objtool warning in drm_cvt_modes()
	Linux 4.19.291

Change-Id: I4f78e25efd18415989ecf5e227a17e05b0d6386c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-08-25 11:24:56 +00:00
Zhu Wang
06c5340858 scsi: core: Fix possible memory leak if device_add() fails
commit 04b5b5cb0136ce970333a9c6cec7e46adba1ea3a upstream.

If device_add() returns error, the name allocated by dev_set_name() needs
be freed. As the comment of device_add() says, put_device() should be used
to decrease the reference count in the error path. So fix this by calling
put_device(), then the name can be freed in kobject_cleanp().

Fixes: ee959b00c3 ("SCSI: convert struct class_device to struct device")
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Link: https://lore.kernel.org/r/20230803020230.226903-1-wangzhu9@huawei.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:13:01 +02:00
Zhu Wang
f830968d46 scsi: snic: Fix possible memory leak if device_add() fails
commit 41320b18a0e0dfb236dba4edb9be12dba1878156 upstream.

If device_add() returns error, the name allocated by dev_set_name() needs
be freed. As the comment of device_add() says, put_device() should be used
to give up the reference in the error path. So fix this by calling
put_device(), then the name can be freed in kobject_cleanp().

Fixes: c8806b6c9e ("snic: driver for Cisco SCSI HBA")
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Acked-by: Narsimhulu Musini <nmusini@cisco.com>
Link: https://lore.kernel.org/r/20230801111421.63651-1-wangzhu9@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:13:01 +02:00
Alexandra Diupina
964f4cab17 scsi: 53c700: Check that command slot is not NULL
commit 8366d1f1249a0d0bba41d0bd1298d63e5d34c7f7 upstream.

Add a check for the command slot value to avoid dereferencing a NULL
pointer.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Co-developed-by: Vladimir Telezhnikov <vtelezhnikov@astralinux.ru>
Signed-off-by: Vladimir Telezhnikov <vtelezhnikov@astralinux.ru>
Signed-off-by: Alexandra Diupina <adiupina@astralinux.ru>
Link: https://lore.kernel.org/r/20230728123521.18293-1-adiupina@astralinux.ru
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:13:01 +02:00
Michael Kelley
311db605e0 scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
commit 175544ad48cbf56affeef2a679c6a4d4fb1e2881 upstream.

Hyper-V provides the ability to connect Fibre Channel LUNs to the host
system and present them in a guest VM as a SCSI device. I/O to the vFC
device is handled by the storvsc driver. The storvsc driver includes a
partial integration with the FC transport implemented in the generic
portion of the Linux SCSI subsystem so that FC attributes can be displayed
in /sys.  However, the partial integration means that some aspects of vFC
don't work properly. Unfortunately, a full and correct integration isn't
practical because of limitations in what Hyper-V provides to the guest.

In particular, in the context of Hyper-V storvsc, the FC transport timeout
function fc_eh_timed_out() causes a kernel panic because it can't find the
rport and dereferences a NULL pointer. The original patch that added the
call from storvsc_eh_timed_out() to fc_eh_timed_out() is faulty in this
regard.

In many cases a timeout is due to a transient condition, so the situation
can be improved by just continuing to wait like with other I/O requests
issued by storvsc, and avoiding the guaranteed panic. For a permanent
failure, continuing to wait may result in a hung thread instead of a panic,
which again may be better.

So fix the panic by removing the storvsc call to fc_eh_timed_out().  This
allows storvsc to keep waiting for a response.  The change has been tested
by users who experienced a panic in fc_eh_timed_out() due to transient
timeouts, and it solves their problem.

In the future we may want to deprecate the vFC functionality in storvsc
since it can't be fully fixed. But it has current users for whom it is
working well enough, so it should probably stay for a while longer.

Fixes: 3930d73098 ("scsi: storvsc: use default I/O timeout handler for FC devices")
Cc: stable@vger.kernel.org
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1690606764-79669-1-git-send-email-mikelley@microsoft.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:13:01 +02:00
Tony Battersby
557bf48bda scsi: core: Fix legacy /proc parsing buffer overflow
commit 9426d3cef5000824e5f24f80ed5f42fb935f2488 upstream.

(lightly modified commit message mostly by Linus Torvalds)

The parsing code for /proc/scsi/scsi is disgusting and broken.  We should
have just used 'sscanf()' or something simple like that, but the logic may
actually predate our kernel sscanf library routine for all I know.  It
certainly predates both git and BK histories.

And we can't change it to be something sane like that now, because the
string matching at the start is done case-insensitively, and the separator
parsing between numbers isn't done at all, so *any* separator will work,
including a possible terminating NUL character.

This interface is root-only, and entirely for legacy use, so there is
absolutely no point in trying to tighten up the parsing.  Because any
separator has traditionally worked, it's entirely possible that people have
used random characters rather than the suggested space.

So don't bother to try to pretty it up, and let's just make a minimal patch
that can be back-ported and we can forget about this whole sorry thing for
another two decades.

Just make it at least not read past the end of the supplied data.

Link: https://lore.kernel.org/linux-scsi/b570f5fe-cb7c-863a-6ed9-f6774c219b88@cybernetics.com/
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin K Petersen <martin.petersen@oracle.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: stable@kernel.org
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Martin K Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:13:01 +02:00
Nilesh Javali
e697f466bf scsi: qla2xxx: Array index may go out of bound
[ Upstream commit d721b591b95cf3f290f8a7cbe90aa2ee0368388d ]

Klocwork reports array 'vha->host_str' of size 16 may use index value(s)
16..19.  Use snprintf() instead of sprintf().

Cc: stable@vger.kernel.org
Co-developed-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230607113843.37185-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:30 +02:00
Ye Bin
1fa93d95ef scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c
[ Upstream commit 250bd00923c72c846092271a9e51ee373db081b6 ]

Fix the following warnings:

[drivers/scsi/qla2xxx/qla_os.c:4882]: (warning) %ld in format string (no. 2)
	requires 'long' but the argument type is 'unsigned long'.
[drivers/scsi/qla2xxx/qla_os.c:5011]: (warning) %ld in format string (no. 1)
	requires 'long' but the argument type is 'unsigned long'.

Link: https://lore.kernel.org/r/20200930022515.2862532-3-yebin10@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: d721b591b95c ("scsi: qla2xxx: Array index may go out of bound")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:30 +02:00
Shreyas Deodhar
a69125a3ce scsi: qla2xxx: Pointer may be dereferenced
commit 00eca15319d9ce8c31cdf22f32a3467775423df4 upstream.

Klocwork tool reported pointer 'rport' returned from call to function
fc_bsg_to_rport() may be NULL and will be dereferenced.

Add a fix to validate rport before dereferencing.

Cc: stable@vger.kernel.org
Signed-off-by: Shreyas Deodhar <sdeodhar@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230607113843.37185-7-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:45:23 +02:00
Nilesh Javali
ccd3bc595b scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
commit af73f23a27206ffb3c477cac75b5fcf03410556e upstream.

Klocwork reported warning of rport maybe NULL and will be dereferenced.
rport returned by call to fc_bsg_to_rport() could be NULL and dereferenced.

Check valid rport returned by fc_bsg_to_rport().

Cc: stable@vger.kernel.org
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230607113843.37185-5-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:45:23 +02:00
Bikash Hazarika
ee4c9a9323 scsi: qla2xxx: Fix potential NULL pointer dereference
commit 464ea494a40c6e3e0e8f91dd325408aaf21515ba upstream.

Klocwork tool reported 'cur_dsd' may be dereferenced.  Add fix to validate
pointer before dereferencing the pointer.

Cc: stable@vger.kernel.org
Signed-off-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230607113843.37185-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:45:23 +02:00
Quinn Tran
4647d2e889 scsi: qla2xxx: Wait for io return on terminate rport
commit fc0cba0c7be8261a1625098bd1d695077ec621c9 upstream.

System crash due to use after free.
Current code allows terminate_rport_io to exit before making
sure all IOs has returned. For FCP-2 device, IO's can hang
on in HW because driver has not tear down the session in FW at
first sign of cable pull. When dev_loss_tmo timer pops,
terminate_rport_io is called and upper layer is about to
free various resources. Terminate_rport_io trigger qla to do
the final cleanup, but the cleanup might not be fast enough where it
leave qla still holding on to the same resource.

Wait for IO's to return to upper layer before resources are freed.

Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230428075339.32551-7-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:45:23 +02:00
Yuchen Yang
6e9671f9fa scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()
[ Upstream commit 2e2fe5ac695a00ab03cab4db1f4d6be07168ed9d ]

Smatch complains that:

tw_probe() warn: missing error code 'retval'

This patch adds error checking to tw_probe() to handle initialization
failure. If tw_reset_sequence() function returns a non-zero value, the
function will return -EINVAL to indicate initialization failure.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Yuchen Yang <u202114568@hust.edu.cn>
Link: https://lore.kernel.org/r/20230505141259.7730-1-u202114568@hust.edu.cn
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:09 +02:00
Kees Cook
b7e389235c treewide: Remove uninitialized_var() usage
commit 3f649ab728cda8038259d8f14492fe400fbab911 upstream.

Using uninitialized_var() is dangerous as it papers over real bugs[1]
(or can in the future), and suppresses unrelated compiler warnings
(e.g. "unused variable"). If the compiler thinks it is uninitialized,
either simply initialize the variable or make compiler changes.

In preparation for removing[2] the[3] macro[4], remove all remaining
needless uses with the following script:

git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
	xargs perl -pi -e \
		's/\buninitialized_var\(([^\)]+)\)/\1/g;
		 s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
pathological white-space.

No outstanding warnings were found building allmodconfig with GCC 9.3.0
for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
alpha, and m68k.

[1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
[2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
[3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
[4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

Reviewed-by: Leon Romanovsky <leonro@mellanox.com> # drivers/infiniband and mlx4/mlx5
Acked-by: Jason Gunthorpe <jgg@mellanox.com> # IB
Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless drivers
Reviewed-by: Chao Yu <yuchao0@huawei.com> # erofs
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:45:01 +02:00