Commit Graph

1280036 Commits

Author SHA1 Message Date
Linus Torvalds
329f70c5be Kbuild fixes for v6.10 (second)
- Fix the initial state of the save button in 'make gconfig'
 
  - Improve the Kconfig documentation
 
  - Fix a Kconfig bug regarding property visibility
 
  - Fix build breakage for systems where 'sed' is not installed in /bin
 
  - Fix a false warning about missing MODULE_DESCRIPTION()
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmZkjoAVHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGEQgQAI6724AWOTd5pAkTxSGxNdzl12NB
 fzk3Sh/r1448QmzpXUbeGONHVXhwBRipl2oAZVwo/8YgwHOqUlAp/73GYD4ryz6P
 WCMHhVQ++yYSx9H1XvZ1hMM6RZI9hnBxk7KfSu+OYbg49shEq6MpToKBD8N/Fdlm
 HEmJWZXtGvANsxItRMpcZ1zHxYEDKcFmmyTc7vWEK929FLg0WAxj15C0vT+RAGs3
 byLsGsg84g/K3FNIjobXnBhKSV2qDbl0si+1T1DGmAHu2i/6i2bin6qqKt9P+CAa
 DY8GQfP07VdO/HPVUsCC2AxiNIsPycTPwF+1H0UGSNX8J3xguzdtwkNdn4dxenrn
 vV8JWyCyr2oMdhxlV9NmO5e7xWcg6c1gYJas8ilMmqCotV2NddY8EMLA3ta+/73n
 0Qvqiixy4J2K/8bNlHoDkn+Xnm82qcyU2w4qTB7+TUjYx/jsr+gnXYFqQBgjXQF8
 DGiyFhqGv5rd/dWoeKmSAhWjmOwOCXtx3T4s/PTpN+FIC+rMSX6l7lIrMBSiaTfM
 gLnytpUXdfSMUv071cqo/bizelLG44x8M8qv0+b/WaKO9U7YxwqxBMOyTzBwgnRB
 VGdEpROK/8FlKtRpk38AS884kn/1RStzjy868nvmmEZ582jO9FlqFMfK6sxD7uP1
 GOnXYcgDIKqmIROA
 =RzRM
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Fix the initial state of the save button in 'make gconfig'

 - Improve the Kconfig documentation

 - Fix a Kconfig bug regarding property visibility

 - Fix build breakage for systems where 'sed' is not installed in /bin

 - Fix a false warning about missing MODULE_DESCRIPTION()

* tag 'kbuild-fixes-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  modpost: do not warn about missing MODULE_DESCRIPTION() for vmlinux.o
  kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
  kconfig: remove wrong expr_trans_bool()
  kconfig: doc: document behavior of 'select' and 'imply' followed by 'if'
  kconfig: doc: fix a typo in the note about 'imply'
  kconfig: gconf: give a proper initial state to the Save button
  kconfig: remove unneeded code for user-supplied values being out of range
2024-06-08 10:12:33 -07:00
Linus Torvalds
1e7ccdd325 media fixes for v6.10-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE+QmuaPwR3wnBdVwACF8+vY7k4RUFAmZi4D8ACgkQCF8+vY7k
 4RXFYxAAnyyNn2GxGkc9tBbUMUC9O2GV8TYMDNcaUoD94dWQ4oMCH3ExdxjDAKEP
 +fR+ytKwbmb7/og0X5o0MTyJD4ttRkiAJwMNSoF+2Da8+KJhrHQOx9NL8Kpg3J/B
 ZsKtzEyVmxWx7+FwSA50hv1g0GdEtOS7F0fxgZYwt0tpZyYorW46DthqipA7N8Yl
 S50bV9rWy1n3Tt8XqVKqmZd0e77FpR8p6D899mLFxm3Q0NPkjtvmescamsmWpkzG
 r+KKeXqPOSCSPa/zRq+JMYXIeIXaK7akW9FQY+XWmP2nwWuwFb1EQXtlRVuatLK7
 P6PggXMzq1wP0+rGizooAFV79gaMb/HP00v9qGeaEdr3R502wLeRSbbQsnfL3ENe
 oaZ01ckms/dAYH8ph2trwS2ViUnfICiuV684VHVQJGZEsV74mVL5YyNmWftnRaJz
 xhtDptaTp0aICC36sqRg9CixU/ATPPuLoDpphgEQ/DAcEJphrSzXHZcZub1gAnMY
 RIECNp6YnLh7YwwRRaxgLE+n3xnppelyArKWbG498dOl/T5ccUvbKbfLWq9YDaPY
 JG3CZveYDr9FMCOQZuEROSMTFFpoyInBRUSUlROskRNp/+rPdkX3UrsQmvH+9+cb
 OspJZEkIPiFJZOfUP+PaUz24hpwSViABjeERHHVFmShZqXIG+zk=
 =4Zki
 -----END PGP SIGNATURE-----

Merge tag 'media/v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

 - fixes for the new ipu6 driver (and related fixes to mei csi driver)

 - fix a double debugfs remove logic at mgb4 driver

 - a documentation fix

* tag 'media/v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  media: intel/ipu6: add csi2 port sanity check in notifier bound
  media: intel/ipu6: update the maximum supported csi2 port number to 6
  media: mei: csi: Warn less verbosely of a missing device fwnode
  media: mei: csi: Put the IPU device reference
  media: intel/ipu6: fix the buffer flags caused by wrong parentheses
  media: intel/ipu6: Fix an error handling path in isys_probe()
  media: intel/ipu6: Move isys_remove() close to isys_probe()
  media: intel/ipu6: Fix some redundant resources freeing in ipu6_pci_remove()
  media: Documentation: v4l: Fix ACTIVE route flag
  media: mgb4: Fix double debugfs remove
2024-06-08 09:57:09 -07:00
Linus Torvalds
36714d69b1 Miscellaneous fixes:
- Fix possible memory leak the riscv-intc irqchip driver load failures
 
  - Fix boot crash in the sifive-plic irqchip driver caused by recently
    changed boot initialization order
 
  - Fix race condition in the gic-v3-its irqchip driver
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmZkDTMRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1hPsRAAoHgcHw9KGhI9+y7Xnnjt4W9Ud6S3W8cs
 AcmP9x83+iilnPQrrWlB/v5p02qBPPdpqnDvOnB/7bITxJGxnSBXj1awUuV45qX2
 QRS4sIDq6zkDH6pX0diiwqLbfWZwpcbvtnR3nXSGImOK0jI3yQiSLEc8vswt88Jr
 HnYg9UdvKCt7j+jbqf9PzPHJP8z/U+Kx6eMPF4H/6R+nccedtQ0D2BdR5RSKFVZM
 aQwpZp6LTTapp3B1lXOx6IJaVTkRMeEm9J2Zc4R/pD3dvKof0xpEwJ+dqBrPAjb0
 +ospUJcPz4Sw9XhBIrqq4A+LUewiVa9grI3t1qit+VtbXkVHfLK9mUlyXfQzgMFz
 JTlUgt3V4vpbceUbFZsefXeB2TDGAPpFQvwgNozvEx+IgEZjryrSa2SgAuhl4Y6b
 nIxwBYFMlG6GI8CIDVGyl3XK/DcKUXM1XloJwTRDWjN/cZloxaZjRIpIiACr+SYW
 S1axryYDqDG4VU3vfTEqb75VGm4rPtHLXqRDmu/ZL8/BIQ7CQqnD0eMGIQ79aEXj
 Ia5CccTWqu0dufA5rxl47lcacPEKYlVFTkTul1ujzM2ymllmwjTpPKvSEhcwUC6J
 XRR7iv372AUo1xnk1G34Wl6Mp9nbxW2DXNinX/eDuV0AqV/1EKxs6vqgddGKhOuX
 K+ER8F+is64=
 =98O/
 -----END PGP SIGNATURE-----

Merge tag 'irq-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:

 - Fix possible memory leak the riscv-intc irqchip driver load failures

 - Fix boot crash in the sifive-plic irqchip driver caused by recently
   changed boot initialization order

 - Fix race condition in the gic-v3-its irqchip driver

* tag 'irq-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/gic-v3-its: Fix potential race condition in its_vlpi_prop_update()
  irqchip/sifive-plic: Chain to parent IRQ after handlers are ready
  irqchip/riscv-intc: Prevent memory leak when riscv_intc_init_common() fails
2024-06-08 09:44:50 -07:00
Linus Torvalds
7cedb020d5 Miscellaneous fixes:
- Fix kexec() crash if call depth tracking is enabled
 
  - Fix SMN reads on inaccessible registers on certain AMD systems
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmZkC+0RHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1iPHA/+P+lT60i13QPX9HICpAKLC0ZPpBj+OXco
 jo/2MJddO04EVvYkojjzvvKVHEz4Q8O15IUprqeXbhp49xSdhX5Yn8o46xPrXoYz
 WkHphX6qiMKBeNE+i6hYzUKl+vfpyVQwUazUlfS/xk7H5CaolHdhOd5riIx6D9M1
 XYx9CT+8bWLppxL5LGTS1G1g03S+WnWDK0yr7FIY7i1SCzPqu0v2IUGFrvNhTrhu
 Ejj3YyVHDwBokkhDbzdV2rAUHzC7JkufipOM6I7TgFVRO783wP/o23b8syc+OtQD
 aNZUAyH7pNWiPUlUz4r3FjRUzqGIcQTKNZdHqGTDaHqH7dT/e09CYJ9LTiUEL0z4
 mx68gHemn8NKG+QuOixd78HiPTV27qhdivpwgVzFZyXZYILI38UTqqK55eKdsgba
 c0jtID74FGWTNpR06Ahs6G3uldQEqkZ5po08S7YTstw75vTb+c5iQznJffVwDKnb
 +fpBVfJBYIoVMZ7oWonEV3zPa3fMCkfnAByTcKqBNnAIkr7xgAuQuCOqgv+4b/7Y
 yDXbGlrdLCjoOdDVXVrpVPNXONd93M2wR8dXBeNJ+lp05ElfzNRyWriFBGA3kSOb
 H3T8XVN3O4nHWHNQfSwSrAqmChpV+W3TuBUjKtEHVAeQ3Ub31ja2us+RpbhQc1Jm
 iXMw3zNITeQ=
 =Gvh6
 -----END PGP SIGNATURE-----

Merge tag 'x86-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "Miscellaneous fixes:

   - Fix kexec() crash if call depth tracking is enabled

   - Fix SMN reads on inaccessible registers on certain AMD systems"

* tag 'x86-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/amd_nb: Check for invalid SMN reads
  x86/kexec: Fix bug with call depth tracking
2024-06-08 09:36:08 -07:00
Linus Torvalds
7cec2e16cb Fix race between perf_event_free_task() and perf_event_release_kernel()
that can result in missed wakeups and hung tasks.
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmZkCmARHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1hrsBAAsOlZWV+VN0l6TGUqqVZZuuZO03Nk3TX3
 kk4iq/xj9pRNmq1bizfsyCFEH3lK7fSYK2I0/iK145vHASzqyeXT1EbtGv61g7EJ
 Z42oYdmAxhXcBOZRffZYI2t8zOcVBUV5s/aDmim11fftYdXkaX73pAHVJdhg/e0v
 tfgFeJwihG4ynCPa8HrRzBUEXwtKngB8II8mmHyL7E5SsoRsO0ubZBU2MW6P5NA9
 9f27ab9Uxj8YWAKa/1Yn6VKgAird8ao+kUu7hYDjZyZTEOvrXU3HrM+VXptnn1S8
 2UPSRPNlV2MGDn7Uo3AskIFkF4QlZ3DZFGKCn2n/1Qf/OqeD3d39DoCKzg7lTx+9
 gSd7cAtKkrsA1bwfz6uZVPEY9M4eVNqZ5aIo7K28q6zSvSFYy2LI0LCzFVwRgAyK
 q8+XyR0aH9R9BYT1Tj0i6z9uZY/h8KROO/M/bU0egG/JRe4WX7X7mjVEQAapHi5F
 xLvPH0I9wo3jDVuxr7hPaT30Xv67F8V9WSKQ6HlMDN/etXNNLysCyOxDmXSXJ6Z7
 9IWaLrHKJG36vj+rKOpPn6Tm+fGAxlm2lDfXExZkYnyzAI59mmf6XEHQBdPly/Q6
 mXZVi3APTOn0REUo3tqi6UiaLL56HD0yvzwSmqSAFke3Nv+za+SeerwgjS2JoYWr
 hJPmkc9fLBY=
 =uVD+
 -----END PGP SIGNATURE-----

Merge tag 'perf-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf event fix from Ingo Molnar:
 "Fix race between perf_event_free_task() and perf_event_release_kernel()
  that can result in missed wakeups and hung tasks"

* tag 'perf-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/core: Fix missing wakeup when waiting for context reference
2024-06-08 09:26:59 -07:00
Linus Torvalds
bbc5332b8c Fix typos in the kerneldoc of some of the atomic APIs.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmZkCU0RHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1iRYg/+JW80HkMgv4nbbfq8Iy4j2DhVPPG/FHTt
 p9c60/aJvVPK2jIBEhORECSgHZXsg4jREpSmI4Nbkw37F25tjNf1fblxA7mEfmiT
 IEPBrNhP98cYTq53h/JD+EwIJIANhg1XQ+J6O3z+M8sVQ3ENUzKM28FQuJ+77zZ3
 ghfzd2+MHLgfIhuGlA2wvYymg7urNfEABODnTmmrkYSKasQFpIC5fTsAzmLpHzT7
 9TjOybmSNNUmGYnFILBdTqLh72jjWogFC6avx3O00jqMfjzK6AYRlD/GnHgzey36
 ULUHUlrLUq3JzsrTXG1Xrvs9n8YLal6c7iE6QfK7kO/eejSdwZSUn3PM9Q3M6444
 Ud3ZtTYcRXH//KwixaCKvcbJMs6OuJLOD68cDMNAmYQ47YptSvgjWK/HEyLa7KHv
 x7ByG+d7cX8Vmm2QEvLWBfd0ctEibDgx0Rw0b90ZBtYp8BG6x8WtmDYlqB5MnVw6
 N14Rr0xjnVripJ8Af5oXnPQmt1QeoPa+0Ophgit5x4ohkBGn1TlHcGtoCDT6Yq4h
 2L7HJ5TNYBsWKruy4nLIwpbfWZf7rJN69iqu7REAMVaJet+s1AI/LTcaEpLsebdu
 woN43pB7WUYo+l9ooqH942LpYK53reMoCeRzzAxZxCP0ky2JbWtR33AwQ7PvMMVR
 bg8lWsaz0Ig=
 =oiVl
 -----END PGP SIGNATURE-----

Merge tag 'locking-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking doc fix from Ingo Molnar:
 "Fix typos in the kerneldoc of some of the atomic APIs"

* tag 'locking-urgent-2024-06-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/atomic: scripts: fix ${atomic}_sub_and_test() kerneldoc
2024-06-08 09:03:46 -07:00
Linus Torvalds
dc772f8237 14 hotfixes, 6 of which are cc:stable.
All except the nilfs2 fix affect MM and all are singletons - see the
 chagelogs for details.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTTMBEPP41GrTpTJgfdBJ7gKXxAjgUCZmOJLgAKCRDdBJ7gKXxA
 jinQAQC0AjAhN7zuxfCb9ljCsqyyAfsWbeyXAlqdhuRt2xZONgD+Nv2XwSUw0ZUv
 xHGgPodMCrmEvuLo048qRpdJRbYo8gw=
 =sM9B
 -----END PGP SIGNATURE-----

Merge tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "14 hotfixes, 6 of which are cc:stable.

  All except the nilfs2 fix affect MM and all are singletons - see the
  chagelogs for details"

* tag 'mm-hotfixes-stable-2024-06-07-15-24' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors
  mm: fix xyz_noprof functions calling profiled functions
  codetag: avoid race at alloc_slab_obj_exts
  mm/hugetlb: do not call vma_add_reservation upon ENOMEM
  mm/ksm: fix ksm_zero_pages accounting
  mm/ksm: fix ksm_pages_scanned accounting
  kmsan: do not wipe out origin when doing partial unpoisoning
  vmalloc: check CONFIG_EXECMEM in is_vmalloc_or_module_addr()
  mm: page_alloc: fix highatomic typing in multi-block buddies
  nilfs2: fix potential kernel bug due to lack of writeback flag waiting
  memcg: remove the lockdep assert from __mod_objcg_mlstate()
  mm: arm64: fix the out-of-bounds issue in contpte_clear_young_dirty_ptes
  mm: huge_mm: fix undefined reference to `mthp_stats' for CONFIG_SYSFS=n
  mm: drop the 'anon_' prefix for swap-out mTHP counters
2024-06-07 17:01:10 -07:00
Linus Torvalds
e60721bf3c gpio updates for v6.10-rc3
- set of interrupt handling and Kconfig fixes for gpio-tqmx86
 - add a buffer for storing output values in gpio-tqmx86 as reading back the
   registers always returns the input values
 - add missing MODULE_DESCRIPTION()s to several GPIO drivers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmZjVpUACgkQEacuoBRx
 13L8LBAAnq9EQYL4VwONmfwaVejCt27+O/c13IGfohaOPM5FXDqYnutWCDDdOay4
 HsOdqgN+1JLpYw7oAM+EIZB5TV3U+gH1t9AJOEr1Lzdcc/Rte6IZZkwcLUsyrJpR
 3AvGSCS2+Wv8+ovEFZt0FAlZbg234aYfa1YqyNB0dpl0uhMNluIxcw8FmZqdlXxA
 enpQZBHW7FdvzLLQXp9PE+fxd+ljG+GQQaw3Wwbzn5GJMAsZRZQE+zs8EeHZZkZX
 QNLOkq/pYYgIYtSalHUPZb4Ljfh3Ppa+yVgYz3WQTCnaidkl+A2fM9OGZJGFl820
 bRyZWCGxv9mhN6LYxaP4Sjt4N1pQ1wmEISc3ekWBUBO6OOWwJ2cViCNmy8SqCIvV
 s28Wd4YTkaoHo39mwmK0VkhAVWt2Jne6gdtolSCiDhQ21AIQuOoBi9xv7LV4fWd8
 oMiXsAvS/iGDN5T2opdiNQt0CKktMTlPb7/QZlyDLi39/oLtF4glHd+0p5XGcoT5
 AYs5BF+viuxGbbdbljSOhrFHcH6fis5K8S+DeBabOxTwijGKOjrtHirBU3RtT4Bu
 8mozyx6qT1RUeh00iJ4pQYQOXnXlUVbWOgAKGFbpA2gujzH81I4nPnIjUvpwVIqq
 pJZPoIPw+adHMLiQE1OC7iZhuFbVgmdAimSWvyUYa988t0wcDGg=
 =FanA
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - interrupt handling and Kconfig fixes for gpio-tqmx86

 - add a buffer for storing output values in gpio-tqmx86 as reading back
   the registers always returns the input values

 - add missing MODULE_DESCRIPTION()s to several GPIO drivers

* tag 'gpio-fixes-for-v6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: add missing MODULE_DESCRIPTION() macros
  gpio: tqmx86: fix broken IRQ_TYPE_EDGE_BOTH interrupt type
  gpio: tqmx86: store IRQ trigger type and unmask status separately
  gpio: tqmx86: introduce shadow register for GPIO output value
  gpio: tqmx86: fix typo in Kconfig label
2024-06-07 16:54:57 -07:00
Linus Torvalds
602079a0a1 block-6.10-20240607
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmZjEZoQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpjVzEADCWIoHaw+egjkngKteauq4hRhnLzte3CdQ
 A+CTxNa+rhByJzk+XMCDj9ld89tNM1k6Bor0EN6QDG6mznHjrc6OZ0hK5zRx/Ros
 PA3dlwf5KYVvfqDLYwBt+1bvwg8kDhW7Qr4jsVSac+PuMI6GLKxrIUu6k/+fVaYK
 tSaBPEaNHtkGNC+QAbIEFeJxBmoKuZkqjaXia+RRP8/iBCkpdtSzE3LV2Q+dkNmj
 JPfPGgk9s35y357bTCBLQR4qAB3e7pGifBcQ2EzXeSClmd6PecK8WfZyKtlGB19x
 ieDTxbwHzJ6njfjrs31hYRUznIrJqZfRzdHAcpMV3EULiqU09EVtofTh4QcNfL5N
 Wo1BfU2TLZoNoTZaaN9b1qsGG3wOwAj+Eb4oue89elWJb60QoSSxL1T5u7VRL9W8
 Q3t3abavnDVeEq3kuJ1TRPkkD92pFrrAZ0S7suQ0+FXf3Vt9P12sC0gUDOFoveER
 J9quzuaD4nMbP9SBtIffLxKuvtsZB1uvkizrg7VwnLLsc25Lo8ky+UZ3lT2AX/p7
 l2oFjdLMnAloDaKWmcAdVYuOVY8zu4E+BOVYqQR+URQvkpcDSWcfj1Aj4ntoBRhQ
 Ky/0HoCpAUGU9rTSxnSVXKycbda0GUzFSnn1DH5aHdexo9W9bapsD0HbuLyRUoup
 WLU7jPXNEA==
 =aDiO
 -----END PGP SIGNATURE-----

Merge tag 'block-6.10-20240607' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - Fix for null_blk block size validation (Andreas)

 - NVMe pull request via Keith:
      - Use reserved tags for special fabrics operations (Chunguang)
      - Persistent Reservation status masking fix (Weiwen)

* tag 'block-6.10-20240607' of git://git.kernel.dk/linux:
  null_blk: fix validation of block size
  nvme: fix nvme_pr_* status code parsing
  nvme-fabrics: use reserved tag for reg read/write command
2024-06-07 16:45:48 -07:00
Linus Torvalds
e33915892d io_uring-6.10-20240607
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmZjEaoQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpoIiD/kBrju5fZvCHYSbJe9OJURAbRchPkuGJZyL
 D5ibX4NKx/AKrvp++Paqb0cq6HndJQziKiksFO/C9+4itT98oVpFvIBXQVyAUu6Q
 nnVm9aQvvg/fZyUa78J9C0Na7NIlVyHr3v/doHZKlYVhF5inOxmC+SB5ELbXv2G9
 JjqbzcFE9MQRbojZP8g3AfMeopaskGe9ZZwoyoGy1R/Vvvsz2OitydVfBvT+V43A
 y4dxGBu8pH0hR0IAMKd2GTBjxrcWu8gdB9MZfJUq9byidlCTsshpdjFbSUZ4bK5o
 GTzSiK38zeonhrAboz8ZiH1V2ADk9SvimTKtY5OtVhKJOz7TH4AgOcw+UIO7Dmc/
 6xV3WAjfzxez5ln2gulzvbDY+rMBSu7VVHswBBVbJhwcpC0CVuFBV2/wWdwVn5L5
 a+ENiZbTG4Jm//ALnxqioC8qYRNvp8V09HhnhWyG9CBpGDWBAMbCd8wopDwqXmp0
 JOjtSBFJRYNUtckH9lEEmR3LWFIgtfnB1fTY0ykVYktQ27iPUsOH4sdXoU2Ujv2n
 FvXOeXR5dIJDPoptY9dDiDILfwvZCULaZVGIEKBGcNcsaFmlijRi55IezahM5nLH
 96OGlyiCAHRCdtj/TsoAcgzuQuOR4UMEmAROJWRDcdStGV5JIIdfz4Aw/GRZcnt+
 zl0B8e/7UA==
 =GLKM
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-6.10-20240607' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Fix a locking order issue with setting max async thread workers
   (Hagar)

 - Fix for a NULL pointer dereference for failed async flagged requests
   using ring provided buffers. This doesn't affect the current kernel,
   but it does affect older kernels, and is being queued up for 6.10
   just to make the stable process easier (me)

 - Fix for NAPI timeout calculations for how long to busy poll, and
   subsequently how much to sleep post that if a wait timeout is passed
   in (me)

 - Fix for a regression in this release cycle, where we could end up
   using a partially unitialized match value for io-wq (Su)

* tag 'io_uring-6.10-20240607' of git://git.kernel.dk/linux:
  io_uring: fix possible deadlock in io_register_iowq_max_workers()
  io_uring/io-wq: avoid garbage value of 'match' in io_wq_enqueue()
  io_uring/napi: fix timeout calculation
  io_uring: check for non-NULL file pointer in io_file_can_poll()
2024-06-07 16:43:07 -07:00
Linus Torvalds
07978330e6 for-6.10-rc2-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmZjGxEACgkQxWXV+ddt
 WDt/lQ/9G5Ieozi7BoHcBTmE5BpyRXqfQ5dj9VaWFLZEH+rvdOiZlQ5QlcI1gkUg
 jbSp7SB8qhrIbBwv2b58xgnGuuUxE2dd3tPP655bBhe7o4xvAKOK8XBVyVQQxvzq
 eRI1J4daQC08FjlSNnHiY1ozl1OIOTSVllLBqkhkYOaBbIKbMByCVPpj4cwzqAvC
 5iBCmL2RalAQ/ZasYwdBid2L2VD4dWGJ9uHY6pi+i9f/Q7nxGRlXqhHo25J5T2Gl
 YE+75fS1lN9hQIkhZRlpiqOdpjJcxkkGJ0elXtRQ0t856lXUAOacIN+HW6aaLxj/
 qv8tnaZO1M/Aw8t65N/8m/ktnBQEwXeX3rAcTpvaMLKAQRGP1oZdsyN5YzLpEi0h
 0Y+yXyFdOYbTJBrGie+kRyh9RoRY3CLcQgRw/2u7ysRjBqdXPcaGXAH4ydE/67Qy
 hdD9DVwDkjzmxh/V4o8raIM+b3Ql4FuBR0X93f8A0LeanJUlgCrc4lokgdA1tPEf
 i/+epnnlEnBOpS4ht5PFn8FkpzeuKAR63AM5sKL18DYswpP5oCyyh76zMMoBh33k
 JFEwVSUDW8AH6YSMAA5eLp9bGTDOGYyvNHKBRXAv5GHQkBXq4ahjZEUh2b/r1903
 FzivbyRtUsxEh62SCsXCZqKlb1BhXRkhSqdbBFbYsKYmVEkylQo=
 =7rUb
 -----END PGP SIGNATURE-----

Merge tag 'for-6.10-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:

 - fix handling of folio private changes.

   The private value holds pointer to our extent buffer structure
   representing a metadata range. Release and create of the range was
   not properly synchronized when updating the private bit which ended
   up in double folio_put, leading to all sorts of breakage

 - fix a crash, reported as duplicate key in metadata, but caused by a
   race of fsync and size extending write. Requires prealloc target
   range + fsync and other conditions (log tree state, timing)

 - fix leak of qgroup extent records after transaction abort

* tag 'for-6.10-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: protect folio::private when attaching extent buffer folios
  btrfs: fix leak of qgroup extent records after transaction abort
  btrfs: fix crash on racing fsync and size-extending write into prealloc
2024-06-07 15:13:12 -07:00
Linus Torvalds
eecba7c070 nfsd-6.10 fixes:
- Fix an occasional memory overwrite caused by a fix added in 6.10
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEKLLlsBKG3yQ88j7+M2qzM29mf5cFAmZjB6EACgkQM2qzM29m
 f5cPXBAAstE7c7QAYCQtAwK/C/rsbr8xjAxcjivwAEOFl8znKc4ZTJ3u2tVSgAqI
 DSbjXK/JVOW10ahDLawqpnWuqTUHtGlK4CMVRdZkmfEqokulhny+FmelJ4B0ZWMQ
 fUSSdYO4ONuMRcytnFperqI0LL7XuEnSsKnE1cQ4HIybQchJyilj9c/TERIVGWzn
 eHcVke07JF+lMvHWWJoDCcHhHHtl82znDPpmrsyzOLKS+jtiaP41r2ZPtohhoPDm
 9VQmTqpSXWyexXpzgQzyu4TOWz6PPakoa701x7pW/2wZgzabdRaJhkYea64Bc8GK
 RTfr7TpSKkcnttQSb2jbb2+qG15g+f7nDbWtejqWuhEppwdj/EznuyrHi80N5Klf
 pw4+XFU8HoC15jcdltMb2Jecbv6uulQ0AcfCOLUh61E86tiy7YDChmhRLgDhzRsS
 jDvq8HxRe1CNmqoxfqIuWuWiMwyCRSSd06U7u3/eqBZeLXOxQb26bxG8GXitUPgY
 G4SCCSvExs2YqnegsZNQGB0L5YKd/zhhnkoc/Y29CU9ZhoItgHlblKODsix9kVJl
 ckN/qSZS5/rrV7IsvzsB0ywNb5VkfnkspHu7X8tlYBuwgnTHJCp25AuWVt31/6jH
 E+tW4wdvd1oBTLqpWRewclTwUrmvJYVYirS01LiTVehx/mnJdw8=
 =NvAo
 -----END PGP SIGNATURE-----

Merge tag 'nfsd-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fix from Chuck Lever:

 - Fix an occasional memory overwrite caused by a fix added in 6.10

* tag 'nfsd-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  SUNRPC: Fix loop termination condition in gss_free_in_token_pages()
2024-06-07 15:07:57 -07:00
Linus Torvalds
0a02756d91 RISC-V Fixes for 6.10-rc3
* Another fix to avoid allocating pages that overlap with ERR_PTR, which
   manifests on rv32.
 * A revert for the badaccess patch I incorrectly picked up an early
   version of.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmZjGDcTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRAuExnzX7sYiWGoD/9LuIorx3Oxtq8oWq42DpMHQDKIJU/p
 PlopOk0acCucfg13ZfAQDJ0H8PN64SLJ/Zhzh/+Ge+6s1FRD1b5pqsT0ZKUytsrk
 pdWVha8QAQYCm3YekLGvQCHHN1Lh3/dilOvZEJZN1l+ltnRFh+tfurB+E/Cre/mb
 pRMGDtAASXGUAkuEZqKfxEe7zQ4xRnyVx0DtcFl1xVjNP11ywwwbnkf7GyrhmDHT
 SITcjF3NaoqQ4zgEwD8MflL6k0fwhwECw3RBvwT23jfHX56ttPJRw0bn9l8UlY25
 HdvBw45bcIbva0COIMIBnYjpokj5wIOnaOhJSHbHllkVFTpBcaiO+CgDj440sAlJ
 4vvl7ll8Fn/DCEjzQgvePndjzWPyxEGkAU6b8f68wj0dfRU/FW16GE3nO/mYLjjx
 RWob8+/qh6kg51KsaCdDNHaASoeVG6ZYokIOYecc30rDZv2fjQv5ly81k6UpKcCu
 0v9el1vX7KaM6GYQkIhyJbnlCCTGLfKJWcWU/Sup7pw7S2HmAkwV3LnuUQwkVXrG
 Qc6GWTbD7YrfVVQF+yX/PrpmuhQWk6ZUZjoA20jmkoeN4IDUG5l1j6xy6I0dDp6T
 OYSYdQNuGfic2X6wO73iImFJTdleuqFVW5GjiD2LkZXziV5rMGpgaXVGzhwnltk8
 A+B53s9STVmbyQ==
 =tO1B
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:

 - Another fix to avoid allocating pages that overlap with ERR_PTR,
   which manifests on rv32

 - A revert for the badaccess patch I incorrectly picked up an early
   version of

* tag 'riscv-for-linus-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  Revert "riscv: mm: accelerate pagefault when badaccess"
  riscv: fix overlap of allocated page and PTR_ERR
2024-06-07 14:47:38 -07:00
Linus Torvalds
8d6b029e15 s390 updates for 6.10-rc3
- Do not create PT_LOAD program header for the kenel image when
   the virtual memory informaton in OS_INFO data is not available.
   That fixes stand-alone dump failures against kernels that do not
   provide the virtual memory informaton
 
 - Add KVM s390 shared zeropage selftest
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYIADUWIQQrtrZiYVkVzKQcYivNdxKlNrRb8AUCZmMO4xccYWdvcmRlZXZA
 bGludXguaWJtLmNvbQAKCRDNdxKlNrRb8ErcAQDLfDjQsjL3pJOaCuRqK2KyCgnD
 azZSDzjKZ/C03MX/vgEA505txGFI5UthiVRHLR/GEZs6E7q+C5fuHexFPbG1XQg=
 =dIuv
 -----END PGP SIGNATURE-----

Merge tag 's390-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Alexander Gordeev:

 - Do not create PT_LOAD program header for the kenel image when the
   virtual memory informaton in OS_INFO data is not available. That
   fixes stand-alone dump failures against kernels that do not provide
   the virtual memory informaton

 - Add KVM s390 shared zeropage selftest

* tag 's390-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  KVM: s390x: selftests: Add shared zeropage test
  s390/crash: Do not use VM info if os_info does not have it
2024-06-07 14:44:53 -07:00
Linus Torvalds
8d437867ba arm64 fix for -rc3
- Fix spurious CPU hotplug warning message from SETEND emulation code
 
 - Fix the build when GCC wasn't inlining our I/O accessor internals
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAmZi7LoQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNHHCB/9cnPBWjVe8XK3tpZADACBUovrfT/x5cr7e
 TgdELeZ7NT1Eqmh/W1ZyUxphsCVT2Ky87E2idZaXT/NnQVo7joyPKPzePlAk5jmx
 TxRKsgnFHEoISmWjCPkka86UwKtEAo7aN50tsjRIhJlv4sJJnpDhxz0B2TqDX0U4
 u9dtcl5kr+fm9odFUkJb8FcRXnTXF28IuGVSpQArqaB8liib6HqnBBe394j9Ju8S
 7Or0vOZJQidHF+azXIhwiMCjPK5t7ajY+vmCXZTR1irQmbQsSJgBogpGl/A2Ji5c
 XjOZuYiDBlnLBi5bJau+z5ciYeSraug/92D27hZ/tRH5YyoAgzYa
 =IvZ4
 -----END PGP SIGNATURE-----

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:

 - Fix spurious CPU hotplug warning message from SETEND emulation code

 - Fix the build when GCC wasn't inlining our I/O accessor internals

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
  arm64/io: add constant-argument check
  arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process
2024-06-07 14:36:57 -07:00
Linus Torvalds
96e09b8f81 platform-drivers-x86 for v6.10-3
Highlights:
  -  Default silead touchscreen driver to 10 fingers and drop 10 finger setting
     from all DMI quirks. More of a cleanup then a pure fix, but since the DMI
     quirks always get updated through the fixes branch this avoids conflicts.
  -  Kconfig fix for randconfig builds
  -  dell-smbios: Fix wrong token data in sysfs
  -  amd-hsmp: Fix driver poking unsupported hw when loaded manually
 
 The following is an automated git shortlog grouped by driver:
 
 Input:
  -  silead - Always support 10 fingers
 
 dell-smbios:
  -  Simplify error handling
  -  Fix wrong token data in sysfs
 
 platform/x86/amd/hsmp:
  -  Check HSMP support on AMD family of processors
 
 touchscreen_dmi:
  -  Use 2-argument strscpy()
  -  Drop "silead,max-fingers" property
 
 yt2-1380:
  -  add CONFIG_EXTCON dependency
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmZiz/0UHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9xKpwf/YfoXStHjHetAZGlVw818ItNX33Xr
 OJ1e7MFKuBokpFI8A5SNu5zRHG9RLGageMJk/AkJiEGgYUtInygpPL1kgo3EXBV7
 R2ZfW/b93N9pebyX9LAlaCG99xY4nYOKMVGWbqAb+wsu6nMi/G8HdUllkorCvExB
 e3nYisEtWEn01YRlAAd2QNbn3PHeAopNXW+JFbFozKrMQJahnRAGcZjrNyJIeXWc
 Iy229mdhQGDGbhz5IfgHia3EnFduE75oMhsyS6S915qM21GbO55w7h0rAq2uB7Uh
 RQY9SA+11Kc/LfyD3a0XRh8rQut/JS734/MBj6yNOeS8J5FqqO+v6+HWiQ==
 =oc5S
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:

 -  Default silead touchscreen driver to 10 fingers and drop 10 finger
    setting from all DMI quirks. More of a cleanup then a pure fix, but
    since the DMI quirks always get updated through the fixes branch
    this avoids conflicts.

 -  Kconfig fix for randconfig builds

 -  dell-smbios: Fix wrong token data in sysfs

 -  amd-hsmp: Fix driver poking unsupported hw when loaded manually

* tag 'platform-drivers-x86-v6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86/amd/hsmp: Check HSMP support on AMD family of processors
  platform/x86: dell-smbios: Simplify error handling
  platform/x86: dell-smbios: Fix wrong token data in sysfs
  platform/x86: yt2-1380: add CONFIG_EXTCON dependency
  platform/x86: touchscreen_dmi: Use 2-argument strscpy()
  platform/x86: touchscreen_dmi: Drop "silead,max-fingers" property
  Input: silead - Always support 10 fingers
2024-06-07 14:13:46 -07:00
Linus Torvalds
f24b46ea10 IOMMU Fixes for Linux v6.10-rc2
Including:
 
 	- Core:
 	  - Make iommu-dma code recognize 'force_aperture' again
 	  - Fix for potential NULL-ptr dereference from iommu_sva_bind_device()
 	    return value
 
 	- AMD IOMMU fixes:
 	  - Fix lockdep splat for invalid wait context
 	  - Add feature bit check before enabling PPR
 	  - Make workqueue name fit into buffer
 	  - Fix memory leak in sysfs code
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAmZiyXsACgkQK/BELZcB
 GuNHAQ//UtMczjHfRS1XzKuhvXh3Ay2kFp42bMHdaydWdEzRQfrdK9Nj0Zb2VYEV
 WiX38pteFHVs5ZKkf/vEIqQOV3crbMSIq/k/P3jrglG480yt1xj05nf4+r4ZibMJ
 aGv9adhn5t9EiFjrj4yirto9MyZHDHynr2QSHILzOhqtfvQsxNIuSW490zvAA9EO
 gMasRDPx8do1dOi5k3BnB+0URehcM06QP+vTi5KJqBBwXMp11BU1R99iRwgWOGHp
 shPkOhU+N+sQaYVXXi1n92eBuWfJfHaqTThT4DHGGoyFx0eJIIB92dKbhin+0oiv
 gFoSMtysoLo+HCzhJQ0NN9Ayv2at4oHZeRKiE5QTSJOTZ801QVR7d8k7lmQewl62
 qs1WOKR4lE0IwIk2VjLOqpY+rok5YgY1BgFy7BD5cbsIYIhN+5olzq43AH4UtKQN
 RIBedWZ/78FffrjFsE8Ut2fPpu67QVy5AqqqJ06zCbhrMBB75+o7itL8+KJhOisd
 uPXW21aAiPGpOg3BOrFcRKHejn6oqxfhuESbVkcOQttqx5rdPC9lgDnH+xzZsm/P
 fnIBuvgr2l7I9ulqk6+m9qc2N+n1dRjfKS9GdCGQH+y+o9t9gLeob0aTu+rGC4gN
 2mW4cHaet9X1LvJtdACHK04BFzAAboLP2bqclPbsaVkJPD9Ejk8=
 =67iX
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-v6.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:
 "Core:

   - Make iommu-dma code recognize 'force_aperture' again

   - Fix for potential NULL-ptr dereference from iommu_sva_bind_device()
     return value

  AMD IOMMU fixes:

   - Fix lockdep splat for invalid wait context

   - Add feature bit check before enabling PPR

   - Make workqueue name fit into buffer

   - Fix memory leak in sysfs code"

* tag 'iommu-fixes-v6.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Fix Invalid wait context issue
  iommu/amd: Check EFR[EPHSup] bit before enabling PPR
  iommu/amd: Fix workqueue name
  iommu: Return right value in iommu_sva_bind_device()
  iommu/dma: Fix domain init
  iommu/amd: Fix sysfs leak in iommu init
2024-06-07 13:34:53 -07:00
Linus Torvalds
e693c5026c ata fixes for 6.10-rc3
- Fix a regression for the PATA MacIO driver were it would fail to probe
    because of the recent changes of initializing the limits in SCSI core.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRN+ES/c4tHlMch3DzJZDGjmcZNcgUCZmLEvAAKCRDJZDGjmcZN
 ckjbAQCId46fAYeYjWnMkYocWtG1cKWVq+3Oqx0vEGEOjBKKuAEA6NsW54/LO9sx
 X7ReZBH+H9bRls6uXnWqSFXF84ufdg8=
 =ALjT
 -----END PGP SIGNATURE-----

Merge tag 'ata-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux

Pull ata fix from Niklas Cassel:

 - Fix a regression for the PATA MacIO driver were it would fail to
   probe because of the recent changes of initializing the limits in
   SCSI core

* tag 'ata-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K
2024-06-07 12:47:20 -07:00
Linus Torvalds
2e32d58075 drm fixes for 6.10-rc3
xe:
 - Update the LMTT when freeing VF GT config
 
 amdgpu:
 - Fix shutdown issues on some SMU 13.x platforms
 - Silence some UBSAN flexible array warnings
 
 panel:
 - sitronix-st7789v: handle of_drm_get_panel_orientation
   failing error.
 
 vmwgfx:
 - filter modes greater than available graphics memory
 - fix 3D vs STDU enable
 - remove STDU logic from mode valid
 - logging fix
 - memcmp pointers fix
 - remove unused struct
 - screen target lifetime fix
 
 komeda:
 - unused struct removal
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmZiaO8ACgkQDHTzWXnE
 hr4yhA/+LgXtif5TqGp2q//ILQ25xKRZ59bZTc0UUvjX+egNOk/Sp81U9ISBsNO2
 OGNmyCZ7PGC6NfsYTBHDrtXbTyqGsW+xVGH7YXe3fpSy99pNwjCSmAcdVeqycbY6
 X3dPezUoNEbWemno6HUaBpVQQlo/j7SxBchyPVmzfy9zLzp8g2nt3LKrJPciBjCm
 uxqDf+vQLeh7O0jUcEMsFHEHOlq7o6/IZZebrhhph62AyLKtWztJt5CU2C5wobMh
 5eNEc/Sp8ErwdBUZL6DaxM0TiAi2WLI2T6/fNozK358UyGe8En6cT8I87sphRprc
 ylMgfzRagqRqi8zV1Ctfr2VeyyjS6xeXYTVVEPmpjqOv6QZOsIIx2D67qffzT1bx
 2tfRo4Ix0is7ryk3BdEv7K6tTErswqOf72YAg94lLB/4AVDrv+rUOsMjNnSKpz0F
 Dm7MVz7HUi/soKC7tZh5rTtJHLRWFOnIVwpe07crTFpITGdj6PGg/KxtRqwMOkjO
 DT0zXfblzlnCJM23WQmV5YppXP/38vUTSZrchTZF4aEd378fnyb4L/7TLKuZ84R2
 mjtVMO9nGEiwIS1fTVLUg1ySXpm9FsWeMummxjGNXmhh2OBj4D3LTESulTnVLhL6
 43o2a2o3oNS3nUoZqncd4j35NkjmqjwG//Ss5+ps7iMSu69abX8=
 =iAM2
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2024-06-07' of https://gitlab.freedesktop.org/drm/kernel

Pull drm fixes from Dave Airlie:
 "Weekly fixes: vmwgfx leads the way this week, with minor changes in xe
  and amdgpu and a couple of other small fixes.

  Seems quiet enough.

  xe:
   - Update the LMTT when freeing VF GT config

  amdgpu:
   - Fix shutdown issues on some SMU 13.x platforms
   - Silence some UBSAN flexible array warnings

  panel:
   - sitronix-st7789v: handle of_drm_get_panel_orientation failing
     error

  vmwgfx:
   - filter modes greater than available graphics memory
   - fix 3D vs STDU enable
   - remove STDU logic from mode valid
   - logging fix
   - memcmp pointers fix
   - remove unused struct
   - screen target lifetime fix

  komeda:
   - unused struct removal"

* tag 'drm-fixes-2024-06-07' of https://gitlab.freedesktop.org/drm/kernel:
  drm/vmwgfx: Don't memcmp equivalent pointers
  drm/vmwgfx: remove unused struct 'vmw_stdu_dma'
  drm/vmwgfx: Don't destroy Screen Target when CRTC is enabled but inactive
  drm/vmwgfx: Standardize use of kibibytes when logging
  drm/vmwgfx: Remove STDU logic from generic mode_valid function
  drm/vmwgfx: 3D disabled should not effect STDU memory limits
  drm/vmwgfx: Filter modes which exceed graphics memory
  drm/amdgpu/pptable: Fix UBSAN array-index-out-of-bounds
  drm/amd: Fix shutdown (again) on some SMU v13.0.4/11 platforms
  drm/xe/pf: Update the LMTT when freeing VF GT config
  drm/panel: sitronix-st7789v: Add check for of_drm_get_panel_orientation
  drm/komeda: remove unused struct 'gamma_curve_segment'
2024-06-07 12:35:56 -07:00
Jeff Johnson
64054eb716 gpio: add missing MODULE_DESCRIPTION() macros
On x86, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpio/gpio-gw-pld.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpio/gpio-mc33880.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/gpio/gpio-pcf857x.o

Add the missing invocations of the MODULE_DESCRIPTION() macro,
including the one missing in gpio-pl061.c, which is not built for x86.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20240606-md-drivers-gpio-v1-1-cb42d240ca5c@quicinc.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-06-07 10:05:21 +02:00
Masahiro Yamada
9185afeac2 modpost: do not warn about missing MODULE_DESCRIPTION() for vmlinux.o
Building with W=1 incorrectly emits the following warning:

  WARNING: modpost: missing MODULE_DESCRIPTION() in vmlinux.o

This check should apply only to modules.

Fixes: 1fffe7a34c ("script: modpost: emit a warning when the description is missing")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-06-07 08:42:31 +09:00
Richard Acayan
96c965667b kbuild: explicitly run mksysmap as sed script from link-vmlinux.sh
In commit b18b047002 ("kbuild: change scripts/mksysmap into sed
script"), the mksysmap script was transformed into a sed script,
made directly executable with "#!/bin/sed -f". Apparently, the path to
sed is different on NixOS.

The shebang can't use the env command, otherwise the "sed -f" command
would be treated as a single argument. This can be solved with the -S
flag, but that is a GNU extension. Explicitly use sed instead of relying
on the executable shebang to fix NixOS builds without breaking build
environments using Busybox.

Fixes: b18b047002 ("kbuild: change scripts/mksysmap into sed script")
Reported-by: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-06-07 08:42:14 +09:00
Dave Airlie
eb55943aab Merge tag 'drm-misc-next-fixes-2024-06-07' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
drm-misc-next-fixes for v6.10-rc3:
- Single unused struct removal that should have been in -fixes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/0251b6ae-bffa-44b2-b698-955712c25a27@linux.intel.com
2024-06-07 08:40:58 +10:00
Dave Airlie
26033424ed Merge tag 'drm-misc-fixes-2024-06-07' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
drm-misc-fixes for v6.10-rc3:
- Robustness fixes for vmwgfx.
- Error check for of_drm_get_panel_orientation failing in
  sitronix-st7789v.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d5645d00-a8cf-47d9-a2a0-4ff55842fc7d@linux.intel.com
2024-06-07 08:37:25 +10:00
Dave Airlie
2d42183110 amd-drm-fixes-6.10-2024-06-06:
amdgpu:
 - Fix shutdown issues on some SMU 13.x platforms
 - Silence some UBSAN flexible array warnings
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCZmIMJQAKCRC93/aFa7yZ
 2OU3AQCnUpn+zGRiA8/kkKUzvaFCxrRvdMQ7faxi2b8dvorzqgD7B+8j2gNUBnCX
 Zv/wskbp8DqP5eEs7xtMQuqWvUijPwA=
 =3Ncj
 -----END PGP SIGNATURE-----

Merge tag 'amd-drm-fixes-6.10-2024-06-06' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-6.10-2024-06-06:

amdgpu:
- Fix shutdown issues on some SMU 13.x platforms
- Silence some UBSAN flexible array warnings

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240606192348.3620805-1-alexander.deucher@amd.com
2024-06-07 08:22:59 +10:00
Linus Torvalds
8a92980606 SCSI fixes on 20240606
The core change is to detect unusually large number of VPD pages
 (caused by device manufacturers having an endiannes issue) and reject
 them rather than trying to parse a huge non-existent array.  The
 remaining fixes are in drivers the most user visible of which is the
 ALUA state transition recognition (leads to intermittent I/O errors in
 some situations otherwise).
 
 Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
 -----BEGIN PGP SIGNATURE-----
 
 iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCZmIHRiYcamFtZXMuYm90
 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishcwfAQCS1dL9
 j9tLAj5mol+WwsfcValZlpb/h5pKXsYrHZcxOQEA3A5DARsEgVEJMQpGuO4N+hcV
 0lSmRV+iC85h5F08COI=
 =1+e/
 -----END PGP SIGNATURE-----

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fixes from James Bottomley:
 "The core change is to detect unusually large number of VPD pages
  (caused by device manufacturers having an endiannes issue) and reject
  them rather than trying to parse a huge non-existent array.

  The remaining fixes are in drivers the most user visible of which is
  the ALUA state transition recognition (leads to intermittent I/O
  errors in some situations otherwise)"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: ufs: mcq: Fix error output and clean up ufshcd_mcq_abort()
  scsi: core: Handle devices which return an unusually large VPD page count
  scsi: mpt3sas: Add missing kerneldoc parameter descriptions
  scsi: qedf: Set qed_slowpath_params to zero before use
  scsi: qedf: Wait for stag work during unload
  scsi: qedf: Don't process stag work during unload and recovery
  scsi: sr: Fix unintentional arithmetic wraparound
  scsi: core: alua: I/O errors for ALUA state transitions
  scsi: mpi3mr: Use proper format specifier in mpi3mr_sas_port_add()
2024-06-06 14:40:51 -07:00
Linus Torvalds
d91e656262 pci-v6.10-fixes-1
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAmZh/ZIUHGJoZWxnYWFz
 QGdvb2dsZS5jb20ACgkQWYigwDrT+vz5iBAAhTW4ozlsNeprj2lI9dIwKt4WBECj
 qK81ZegCNhCrZXCx9jPt+FAqvpce1lL9KAOIj08PCvBFgt856bGfcnD631K4Bqzp
 qzJtp/kiFh6/qrP9IYs31wGKRbjzxlkwFnDEMApewQAGDiCj4QoWfuHgMqbNCLHR
 63JqnKEFQoQiFaptdHbU11d2gMc5iZVtyHP7OKZPJWE4qu7GH0oPZmDMxLbReWGn
 7iWSQioTWECkoXXCSGSaxLaFkF9s8kG3NVTZ0TDLg2j9DfgfuwAAi02JtlNfbGjB
 xIFIKGNaCLTey7glZ7sNWZcG4mwj0i9cqZsuWs17/8E1XOYWsT8X97R9wAS0NkqA
 gnOIOgyO68A/Q/BKczGyYXJKq2yTFor+F12nXXZEulnRA5jBEQ6I98h+qoHQOoma
 ipjUrIOVUUrDy0LYuhfMxzc3gx+RZvUcsc1pHgJRq/7d/dM+Xpl/T421t3VcyEz8
 pdNDSb5Zz7lxs5TlZuhNYwTeqbR3NAOIViMhcxhQWQCYPRlykI7wERLkEvar5Pjs
 RshO0+v5z5FcnzTksrqyE8x1+Tsf7kOzb/hrP+naj5lZ7M4TIWuSsQIG0UahKYWB
 EZp5gXbEjwrstMctUCx89V9nYjVggtSmW4MWcUDzdwWdxYzEowzDceJekBRYQiss
 u+io8skyHrJgL7w=
 =DQJk
 -----END PGP SIGNATURE-----

Merge tag 'pci-v6.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull pci fix from Bjorn Helgaas:

 - Revert lockdep checking on locking that protects device resets from
   user-space config accesses; it exposed issues for which fixes are in
   the works but are too risky for this cycle (Dan Williams)

* tag 'pci-v6.10-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
  PCI: Revert the cfg_access_lock lockdep mechanism
2024-06-06 14:28:11 -07:00
Qu Wenruo
f3a5367c67 btrfs: protect folio::private when attaching extent buffer folios
[BUG]
Since v6.8 there are rare kernel crashes reported by various people,
the common factor is bad page status error messages like this:

  BUG: Bad page state in process kswapd0  pfn:d6e840
  page: refcount:0 mapcount:0 mapping:000000007512f4f2 index:0x2796c2c7c
  pfn:0xd6e840
  aops:btree_aops ino:1
  flags: 0x17ffffe0000008(uptodate|node=0|zone=2|lastcpupid=0x3fffff)
  page_type: 0xffffffff()
  raw: 0017ffffe0000008 dead000000000100 dead000000000122 ffff88826d0be4c0
  raw: 00000002796c2c7c 0000000000000000 00000000ffffffff 0000000000000000
  page dumped because: non-NULL mapping

[CAUSE]
Commit 09e6cef19c ("btrfs: refactor alloc_extent_buffer() to
allocate-then-attach method") changes the sequence when allocating a new
extent buffer.

Previously we always called grab_extent_buffer() under
mapping->i_private_lock, to ensure the safety on modification on
folio::private (which is a pointer to extent buffer for regular
sectorsize).

This can lead to the following race:

Thread A is trying to allocate an extent buffer at bytenr X, with 4
4K pages, meanwhile thread B is trying to release the page at X + 4K
(the second page of the extent buffer at X).

           Thread A                |                 Thread B
-----------------------------------+-------------------------------------
                                   | btree_release_folio()
				   | | This is for the page at X + 4K,
				   | | Not page X.
				   | |
alloc_extent_buffer()              | |- release_extent_buffer()
|- filemap_add_folio() for the     | |  |- atomic_dec_and_test(eb->refs)
|  page at bytenr X (the first     | |  |
|  page).                          | |  |
|  Which returned -EEXIST.         | |  |
|                                  | |  |
|- filemap_lock_folio()            | |  |
|  Returned the first page locked. | |  |
|                                  | |  |
|- grab_extent_buffer()            | |  |
|  |- atomic_inc_not_zero()        | |  |
|  |  Returned false               | |  |
|  |- folio_detach_private()       | |  |- folio_detach_private() for X
|     |- folio_test_private()      | |     |- folio_test_private()
      |  Returned true             | |     |  Returned true
      |- folio_put()               |       |- folio_put()

Now there are two puts on the same folio at folio X, leading to refcount
underflow of the folio X, and eventually causing the BUG_ON() on the
page->mapping.

The condition is not that easy to hit:

- The release must be triggered for the middle page of an eb
  If the release is on the same first page of an eb, page lock would kick
  in and prevent the race.

- folio_detach_private() has a very small race window
  It's only between folio_test_private() and folio_clear_private().

That's exactly when mapping->i_private_lock is used to prevent such race,
and commit 09e6cef19c ("btrfs: refactor alloc_extent_buffer() to
allocate-then-attach method") screwed that up.

At that time, I thought the page lock would kick in as
filemap_release_folio() also requires the page to be locked, but forgot
the filemap_release_folio() only locks one page, not all pages of an
extent buffer.

[FIX]
Move all the code requiring i_private_lock into
attach_eb_folio_to_filemap(), so that everything is done with proper
lock protection.

Furthermore to prevent future problems, add an extra
lockdep_assert_locked() to ensure we're holding the proper lock.

To reproducer that is able to hit the race (takes a few minutes with
instrumented code inserting delays to alloc_extent_buffer()):

  #!/bin/sh
  drop_caches () {
	  while(true); do
		  echo 3 > /proc/sys/vm/drop_caches
		  echo 1 > /proc/sys/vm/compact_memory
	  done
  }

  run_tar () {
	  while(true); do
		  for x in `seq 1 80` ; do
			  tar cf /dev/zero /mnt > /dev/null &
		  done
		  wait
	  done
  }

  mkfs.btrfs -f -d single -m single /dev/vda
  mount -o noatime /dev/vda /mnt
  # create 200,000 files, 1K each
  ./simoop -n 200000 -E -f 1k /mnt
  drop_caches &
  (run_tar)

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/linux-btrfs/CAHk-=wgt362nGfScVOOii8cgKn2LVVHeOvOA7OBwg1OwbuJQcw@mail.gmail.com/
Reported-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Link: https://lore.kernel.org/lkml/CABXGCsPktcHQOvKTbPaTwegMExije=Gpgci5NW=hqORo-s7diA@mail.gmail.com/
Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Link: https://lore.kernel.org/linux-btrfs/e8b3311c-9a75-4903-907f-fc0f7a3fe423@gmx.de/
Reported-by: syzbot+f80b066392366b4af85e@syzkaller.appspotmail.com
Fixes: 09e6cef19c ("btrfs: refactor alloc_extent_buffer() to allocate-then-attach method")
CC: stable@vger.kernel.org # 6.8+
CC: Chris Mason <clm@fb.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-06-06 21:42:22 +02:00
Linus Torvalds
d30d0e49da Including fixes from BPF and big collection of fixes for WiFi core
and drivers.
 
 Current release - regressions:
 
  - vxlan: fix regression when dropping packets due to invalid src addresses
 
  - bpf: fix a potential use-after-free in bpf_link_free()
 
  - xdp: revert support for redirect to any xsk socket bound to the same
    UMEM as it can result in a corruption
 
  - virtio_net:
    - add missing lock protection when reading return code from control_buf
    - fix false-positive lockdep splat in DIM
    - Revert "wifi: wilc1000: convert list management to RCU"
 
  - wifi: ath11k: fix error path in ath11k_pcic_ext_irq_config
 
 Previous releases - regressions:
 
  - rtnetlink: make the "split" NLM_DONE handling generic, restore the old
    behavior for two cases where we started coalescing those messages with
    normal messages, breaking sloppily-coded userspace
 
  - wifi:
    - cfg80211: validate HE operation element parsing
    - cfg80211: fix 6 GHz scan request building
    - mt76: mt7615: add missing chanctx ops
    - ath11k: move power type check to ASSOC stage, fix connecting
      to 6 GHz AP
    - ath11k: fix WCN6750 firmware crash caused by 17 num_vdevs
    - rtlwifi: ignore IEEE80211_CONF_CHANGE_RETRY_LIMITS
    - iwlwifi: mvm: fix a crash on 7265
 
 Previous releases - always broken:
 
  - ncsi: prevent multi-threaded channel probing, a spec violation
 
  - vmxnet3: disable rx data ring on dma allocation failure
 
  - ethtool: init tsinfo stats if requested, prevent unintentionally
    reporting all-zero stats on devices which don't implement any
 
  - dst_cache: fix possible races in less common IPv6 features
 
  - tcp: auth: don't consider TCP_CLOSE to be in TCP_AO_ESTABLISHED
 
  - ax25: fix two refcounting bugs
 
  - eth: ionic: fix kernel panic in XDP_TX action
 
 Misc:
 
  - tcp: count CLOSE-WAIT sockets for TCP_MIB_CURRESTAB
 
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE6jPA+I1ugmIBA4hXMUZtbf5SIrsFAmZh3mUACgkQMUZtbf5S
 IrvPwRAApv8X0ZIbPD5PuVEkiYuSkSE6QVou5GaVO7DzF4gj07zPNtCe6B/ZZdBu
 RLdlppxjAmVwdCRmUo0plxSydYZcqFpQqV6lRH/rbWmktWIp0pGIOAcOG7ISRPCC
 FAYJ4udSt4+wrq0hXTsE1KO1JZ0p7zE2bXxNC8uR8wgM9yonUjqhYdAUZhrl3yCY
 zOCD/+kvWFLYtehDcmyNK0ANS3yNveTNkRhXDc1UrpOGMtza60lf5u3bWK+sU5VS
 NGPe9cU60WKMQi6QnWFBZKIcp4Vgy2MukOLdNn9e8BRjFLh2dbY86LAmE4HWPA7I
 ONZagOfEjeOcRSCMdFHxui/PUDZLBZNhrnqQ6x8uC2yKwwIMr+CgEt5sCmVFwH6n
 3HTlWSjL38yuiVuYuhxGchmVnZfC4bLi2qAFF1oxhlDGViBDhAwi36MSCnjDpN8k
 Jo0x6crQLS/uvwVXPKWAUcQhy7OE69A3FwwA1PtkxRX5EQPn1if2Z7yq7YfYb9aD
 bChvCarlfuVDm+CBItphXg0ajVZc+im7+JK62Zn50A1cTbEK0lnYCOcmqzqiqrXI
 Vr3XXt6gVVnvwY374JDO1vmB5ft2IYBn7sWnLcIvR2UlggqEfqMdKSSwm7pOprG9
 YJ/LDAXVmG0kLN7rZUYUBLItnpuHAhYDrBOsV5HaFeksWauc1oY=
 =mwEJ
 -----END PGP SIGNATURE-----

Merge tag 'net-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Pull networking fixes from Jakub Kicinski:
 "Including fixes from BPF and big collection of fixes for WiFi core and
  drivers.

  Current release - regressions:

   - vxlan: fix regression when dropping packets due to invalid src
     addresses

   - bpf: fix a potential use-after-free in bpf_link_free()

   - xdp: revert support for redirect to any xsk socket bound to the
     same UMEM as it can result in a corruption

   - virtio_net:
      - add missing lock protection when reading return code from
        control_buf
      - fix false-positive lockdep splat in DIM
      - Revert "wifi: wilc1000: convert list management to RCU"

   - wifi: ath11k: fix error path in ath11k_pcic_ext_irq_config

  Previous releases - regressions:

   - rtnetlink: make the "split" NLM_DONE handling generic, restore the
     old behavior for two cases where we started coalescing those
     messages with normal messages, breaking sloppily-coded userspace

   - wifi:
      - cfg80211: validate HE operation element parsing
      - cfg80211: fix 6 GHz scan request building
      - mt76: mt7615: add missing chanctx ops
      - ath11k: move power type check to ASSOC stage, fix connecting to
        6 GHz AP
      - ath11k: fix WCN6750 firmware crash caused by 17 num_vdevs
      - rtlwifi: ignore IEEE80211_CONF_CHANGE_RETRY_LIMITS
      - iwlwifi: mvm: fix a crash on 7265

  Previous releases - always broken:

   - ncsi: prevent multi-threaded channel probing, a spec violation

   - vmxnet3: disable rx data ring on dma allocation failure

   - ethtool: init tsinfo stats if requested, prevent unintentionally
     reporting all-zero stats on devices which don't implement any

   - dst_cache: fix possible races in less common IPv6 features

   - tcp: auth: don't consider TCP_CLOSE to be in TCP_AO_ESTABLISHED

   - ax25: fix two refcounting bugs

   - eth: ionic: fix kernel panic in XDP_TX action

  Misc:

   - tcp: count CLOSE-WAIT sockets for TCP_MIB_CURRESTAB"

* tag 'net-6.10-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (107 commits)
  selftests: net: lib: set 'i' as local
  selftests: net: lib: avoid error removing empty netns name
  selftests: net: lib: support errexit with busywait
  net: ethtool: fix the error condition in ethtool_get_phy_stats_ethtool()
  ipv6: fix possible race in __fib6_drop_pcpu_from()
  af_unix: Annotate data-race of sk->sk_shutdown in sk_diag_fill().
  af_unix: Use skb_queue_len_lockless() in sk_diag_show_rqlen().
  af_unix: Use skb_queue_empty_lockless() in unix_release_sock().
  af_unix: Use unix_recvq_full_lockless() in unix_stream_connect().
  af_unix: Annotate data-race of net->unx.sysctl_max_dgram_qlen.
  af_unix: Annotate data-races around sk->sk_sndbuf.
  af_unix: Annotate data-races around sk->sk_state in UNIX_DIAG.
  af_unix: Annotate data-race of sk->sk_state in unix_stream_read_skb().
  af_unix: Annotate data-races around sk->sk_state in sendmsg() and recvmsg().
  af_unix: Annotate data-race of sk->sk_state in unix_accept().
  af_unix: Annotate data-race of sk->sk_state in unix_stream_connect().
  af_unix: Annotate data-races around sk->sk_state in unix_write_space() and poll().
  af_unix: Annotate data-race of sk->sk_state in unix_inq_len().
  af_unix: Annodate data-races around sk->sk_state for writers.
  af_unix: Set sk->sk_state under unix_state_lock() for truly disconencted peer.
  ...
2024-06-06 09:55:27 -07:00
Linus Torvalds
2faf6332c5 Single patch, no behavior changes.
Tetsuo Handa (1):
   tomoyo: update project links
 
  Documentation/admin-guide/LSM/tomoyo.rst |   35 +++++++++----------------------
  MAINTAINERS                              |    2 -
  security/tomoyo/Kconfig                  |    2 -
  security/tomoyo/common.c                 |    2 -
  4 files changed, 14 insertions(+), 27 deletions(-)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJmYchgAAoJEEJfEo0MZPUqqXYP/ROdUgeoGCYo4Fv7PKoQtiwm
 cCf53gQD0ozv2pVpYQH6TnF4MUfnqxEjskYgL9sJahwSQ8pdyj8SO08uVACBgwuJ
 1cXAGrSBFJEYTZY9/V3JTSbdTvqQsVTwSii3hj/VABfYTTQtnLdqPFmsslStIstx
 sGNwIZPvwX5xCTG6YkZCXBPtZGxtAhVvUueRF46525qZvmsgV7ziGfqNecNdfHyi
 6wiw9HXZJlaKcj+RNQrcc10JeX0g3we3gpVIa8FJ5+wnpOvVuQOtq9lm9Idzw6xo
 AsKyg3jTjDaJjIv125lv7++DIXyipvDK8TPZJOwiC8WYsChLveb+fZV3YMNLpz2N
 Qepgzejf1O7rLT55zJID4KQGwCkCTg7TJILLA57wFAa+7VGLspkvIXsNzOjpe9P7
 9ufclnrAkM1RbBIUqSOj1OcTm6dSBkNG32MI869NZ6M8UH3gDbmCLTsMNv7JT2Qe
 ax7E8zRqDTJBzH4dcAIKJ1pFF4lIj6H7dhbDJf0TPB89UGJdBdil4b+JIaJyZXEn
 0M/RFdPiiw/vGsaFn1m6RCkV0WuuLhUHCOhq+0ukzsVfs9XqXWs/Yfngt07I3ldH
 ALB+dE7sddFI0dvyrJub/MTd3KRHZfB6TF1mKeHQe7Y4lR1TNctQxUuqClDJVXaT
 a38bb4G+qgIOcVMHeSaL
 =cwIu
 -----END PGP SIGNATURE-----

Merge tag 'tomoyo-pr-20240606' of git://git.code.sf.net/p/tomoyo/tomoyo

Pull tomoyo fixlet from Tetsuo Handa:
 "Single patch to update project links, no behavior changes"

* tag 'tomoyo-pr-20240606' of git://git.code.sf.net/p/tomoyo/tomoyo:
  tomoyo: update project links
2024-06-06 09:48:57 -07:00
Linus Torvalds
a34adf6010 EFI fixes for v6.10 #2
- Ensure that .discard sections are really discarded in the EFI zboot
   image build
 - Return proper error numbers from efi-pstore
 - Add __nocfi annotations to EFI runtime wrappers
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZmAmwwAKCRAwbglWLn0t
 XNbNAQDsnOTRK4Azr0rqHUvOoB2g+0XlIL9yR+r5MwV8lAdL+QD9GJpX7p7pzT4q
 aT4zzzoS1h9FFUNTDtE7by18bDBElgI=
 =RxkM
 -----END PGP SIGNATURE-----

Merge tag 'efi-fixes-for-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:

 - Ensure that .discard sections are really discarded in the EFI zboot
   image build

 - Return proper error numbers from efi-pstore

 - Add __nocfi annotations to EFI runtime wrappers

* tag 'efi-fixes-for-v6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi: Add missing __nocfi annotations to runtime wrappers
  efi: pstore: Return proper errors on UEFI failures
  efi/libstub: zboot.lds: Discard .discard sections
2024-06-06 09:39:36 -07:00
Jakub Kicinski
27bc865408 Merge branch 'selftests-net-lib-small-fixes'
Matthieu Baerts says:

====================
selftests: net: lib: small fixes

While looking at using 'lib.sh' for the MPTCP selftests [1], we found
some small issues with 'lib.sh'. Here they are:

- Patch 1: fix 'errexit' (set -e) support with busywait. 'errexit' is
  supported in some functions, not all. A fix for v6.8+.

- Patch 2: avoid confusing error messages linked to the cleaning part
  when the netns setup fails. A fix for v6.8+.

- Patch 3: set a variable as local to avoid accidentally changing the
  value of a another one with the same name on the caller side. A fix
  for v6.10-rc1+.

Link: https://lore.kernel.org/mptcp/5f4615c3-0621-43c5-ad25-55747a4350ce@kernel.org/T/ [1]
====================

Link: https://lore.kernel.org/r/20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-0-b3afadd368c9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-06 08:29:07 -07:00
Matthieu Baerts (NGI0)
84a8bc3ec2 selftests: net: lib: set 'i' as local
Without this, the 'i' variable declared before could be overridden by
accident, e.g.

  for i in "${@}"; do
      __ksft_status_merge "${i}"  ## 'i' has been modified
      foo "${i}"                  ## using 'i' with an unexpected value
  done

After a quick look, it looks like 'i' is currently not used after having
been modified in __ksft_status_merge(), but still, better be safe than
sorry. I saw this while modifying the same file, not because I suspected
an issue somewhere.

Fixes: 596c8819cb ("selftests: forwarding: Have RET track kselftest framework constants")
Acked-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-3-b3afadd368c9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-06 08:29:07 -07:00
Matthieu Baerts (NGI0)
79322174bc selftests: net: lib: avoid error removing empty netns name
If there is an error to create the first netns with 'setup_ns()',
'cleanup_ns()' will be called with an empty string as first parameter.

The consequences is that 'cleanup_ns()' will try to delete an invalid
netns, and wait 20 seconds if the netns list is empty.

Instead of just checking if the name is not empty, convert the string
separated by spaces to an array. Manipulating the array is cleaner, and
calling 'cleanup_ns()' with an empty array will be a no-op.

Fixes: 25ae948b44 ("selftests/net: add lib.sh")
Cc: stable@vger.kernel.org
Acked-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-2-b3afadd368c9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-06 08:29:07 -07:00
Matthieu Baerts (NGI0)
41b02ea4c0 selftests: net: lib: support errexit with busywait
If errexit is enabled ('set -e'), loopy_wait -- or busywait and others
using it -- will stop after the first failure.

Note that if the returned status of loopy_wait is checked, and even if
errexit is enabled, Bash will not stop at the first error.

Fixes: 25ae948b44 ("selftests/net: add lib.sh")
Cc: stable@vger.kernel.org
Acked-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://lore.kernel.org/r/20240605-upstream-net-20240605-selftests-net-lib-fixes-v1-1-b3afadd368c9@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-06 08:29:07 -07:00
Michael Ellerman
09fe2bfa6b ata: pata_macio: Fix max_segment_size with PAGE_SIZE == 64K
The pata_macio driver advertises a max_segment_size of 0xff00, because
the hardware doesn't cope with requests >= 64K.

However the SCSI core requires max_segment_size to be at least
PAGE_SIZE, which is a problem for pata_macio when the kernel is built
with 64K pages.

In older kernels the SCSI core would just increase the segment size to
be equal to PAGE_SIZE, however since the commit tagged below it causes a
warning and the device fails to probe:

  WARNING: CPU: 0 PID: 26 at block/blk-settings.c:202 .blk_validate_limits+0x2f8/0x35c
  CPU: 0 PID: 26 Comm: kworker/u4:1 Not tainted 6.10.0-rc1 #1
  Hardware name: PowerMac7,2 PPC970 0x390202 PowerMac
  ...
  NIP .blk_validate_limits+0x2f8/0x35c
  LR  .blk_alloc_queue+0xc0/0x2f8
  Call Trace:
    .blk_alloc_queue+0xc0/0x2f8
    .blk_mq_alloc_queue+0x60/0xf8
    .scsi_alloc_sdev+0x208/0x3c0
    .scsi_probe_and_add_lun+0x314/0x52c
    .__scsi_add_device+0x170/0x1a4
    .ata_scsi_scan_host+0x2bc/0x3e4
    .async_port_probe+0x6c/0xa0
    .async_run_entry_fn+0x60/0x1bc
    .process_one_work+0x228/0x510
    .worker_thread+0x360/0x530
    .kthread+0x134/0x13c
    .start_kernel_thread+0x10/0x14
  ...
  scsi_alloc_sdev: Allocation failure during SCSI scanning, some SCSI devices might not be configured

Although the hardware can't cope with a 64K segment, the driver
already deals with that internally by splitting large requests in
pata_macio_qc_prep(). That is how the driver has managed to function
until now on 64K kernels.

So fix the driver to advertise a max_segment_size of 64K, which avoids
the warning and keeps the SCSI core happy.

Fixes: afd53a3d85 ("scsi: core: Initialize scsi midlayer limits before allocating the queue")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/all/ce2bf6af-4382-4fe1-b392-cc6829f5ceb2@roeck-us.net/
Reported-by: Doru Iorgulescu <doru.iorgulescu1@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218858
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
2024-06-06 14:53:34 +02:00
Su Hui
0dcc53abf5 net: ethtool: fix the error condition in ethtool_get_phy_stats_ethtool()
Clang static checker (scan-build) warning:
net/ethtool/ioctl.c:line 2233, column 2
Called function pointer is null (null dereference).

Return '-EOPNOTSUPP' when 'ops->get_ethtool_phy_stats' is NULL to fix
this typo error.

Fixes: 201ed315f9 ("net/ethtool/ioctl: split ethtool_get_phy_stats into multiple helpers")
Signed-off-by: Su Hui <suhui@nfschina.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://lore.kernel.org/r/20240605034742.921751-1-suhui@nfschina.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 13:34:33 +02:00
Masahiro Yamada
77a92660d8 kconfig: remove wrong expr_trans_bool()
expr_trans_bool() performs an incorrect transformation.

[Test Code]

    config MODULES
            def_bool y
            modules

    config A
            def_bool y
            select C if B != n

    config B
            def_tristate m

    config C
            tristate

[Result]

    CONFIG_MODULES=y
    CONFIG_A=y
    CONFIG_B=m
    CONFIG_C=m

This output is incorrect because CONFIG_C=y is expected.

Documentation/kbuild/kconfig-language.rst clearly explains the function
of the '!=' operator:

    If the values of both symbols are equal, it returns 'n',
    otherwise 'y'.

Therefore, the statement:

    select C if B != n

should be equivalent to:

    select C if y

Or, more simply:

    select C

Hence, the symbol C should be selected by the value of A, which is 'y'.

However, expr_trans_bool() wrongly transforms it to:

    select C if B

Therefore, the symbol C is selected by (A && B), which is 'm'.

The comment block of expr_trans_bool() correctly explains its intention:

  * bool FOO!=n => FOO
    ^^^^

If FOO is bool, FOO!=n can be simplified into FOO. This is correct.

However, the actual code performs this transformation when FOO is
tristate:

    if (e->left.sym->type == S_TRISTATE) {
                             ^^^^^^^^^^

While it can be fixed to S_BOOLEAN, there is no point in doing so
because expr_tranform() already transforms FOO!=n to FOO when FOO is
bool. (see the "case E_UNEQUAL" part)

expr_trans_bool() is wrong and unnecessary.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
2024-06-06 20:09:10 +09:00
Eric Dumazet
b01e1c0307 ipv6: fix possible race in __fib6_drop_pcpu_from()
syzbot found a race in __fib6_drop_pcpu_from() [1]

If compiler reads more than once (*ppcpu_rt),
second read could read NULL, if another cpu clears
the value in rt6_get_pcpu_route().

Add a READ_ONCE() to prevent this race.

Also add rcu_read_lock()/rcu_read_unlock() because
we rely on RCU protection while dereferencing pcpu_rt.

[1]

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000012: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000090-0x0000000000000097]
CPU: 0 PID: 7543 Comm: kworker/u8:17 Not tainted 6.10.0-rc1-syzkaller-00013-g2bfcfd584ff5 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Workqueue: netns cleanup_net
 RIP: 0010:__fib6_drop_pcpu_from.part.0+0x10a/0x370 net/ipv6/ip6_fib.c:984
Code: f8 48 c1 e8 03 80 3c 28 00 0f 85 16 02 00 00 4d 8b 3f 4d 85 ff 74 31 e8 74 a7 fa f7 49 8d bf 90 00 00 00 48 89 f8 48 c1 e8 03 <80> 3c 28 00 0f 85 1e 02 00 00 49 8b 87 90 00 00 00 48 8b 0c 24 48
RSP: 0018:ffffc900040df070 EFLAGS: 00010206
RAX: 0000000000000012 RBX: 0000000000000001 RCX: ffffffff89932e16
RDX: ffff888049dd1e00 RSI: ffffffff89932d7c RDI: 0000000000000091
RBP: dffffc0000000000 R08: 0000000000000005 R09: 0000000000000007
R10: 0000000000000001 R11: 0000000000000006 R12: ffff88807fa080b8
R13: fffffbfff1a9a07d R14: ffffed100ff41022 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b32c26000 CR3: 000000005d56e000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
  __fib6_drop_pcpu_from net/ipv6/ip6_fib.c:966 [inline]
  fib6_drop_pcpu_from net/ipv6/ip6_fib.c:1027 [inline]
  fib6_purge_rt+0x7f2/0x9f0 net/ipv6/ip6_fib.c:1038
  fib6_del_route net/ipv6/ip6_fib.c:1998 [inline]
  fib6_del+0xa70/0x17b0 net/ipv6/ip6_fib.c:2043
  fib6_clean_node+0x426/0x5b0 net/ipv6/ip6_fib.c:2205
  fib6_walk_continue+0x44f/0x8d0 net/ipv6/ip6_fib.c:2127
  fib6_walk+0x182/0x370 net/ipv6/ip6_fib.c:2175
  fib6_clean_tree+0xd7/0x120 net/ipv6/ip6_fib.c:2255
  __fib6_clean_all+0x100/0x2d0 net/ipv6/ip6_fib.c:2271
  rt6_sync_down_dev net/ipv6/route.c:4906 [inline]
  rt6_disable_ip+0x7ed/0xa00 net/ipv6/route.c:4911
  addrconf_ifdown.isra.0+0x117/0x1b40 net/ipv6/addrconf.c:3855
  addrconf_notify+0x223/0x19e0 net/ipv6/addrconf.c:3778
  notifier_call_chain+0xb9/0x410 kernel/notifier.c:93
  call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1992
  call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
  call_netdevice_notifiers net/core/dev.c:2044 [inline]
  dev_close_many+0x333/0x6a0 net/core/dev.c:1585
  unregister_netdevice_many_notify+0x46d/0x19f0 net/core/dev.c:11193
  unregister_netdevice_many net/core/dev.c:11276 [inline]
  default_device_exit_batch+0x85b/0xae0 net/core/dev.c:11759
  ops_exit_list+0x128/0x180 net/core/net_namespace.c:178
  cleanup_net+0x5b7/0xbf0 net/core/net_namespace.c:640
  process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
  process_scheduled_works kernel/workqueue.c:3312 [inline]
  worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
  kthread+0x2c1/0x3a0 kernel/kthread.c:389
  ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
  ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Fixes: d52d3997f8 ("ipv6: Create percpu rt6_info")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/r/20240604193549.981839-1-edumazet@google.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 13:05:54 +02:00
Masahiro Yamada
45c7f555bf kconfig: doc: document behavior of 'select' and 'imply' followed by 'if'
Documentation/kbuild/kconfig-language.rst explains the behavior of
'select' as follows:

  reverse dependencies can be used to force a lower limit of
  another symbol. The value of the current menu symbol is used as the
  minimal value <symbol> can be set to.

This is not true when the 'select' property is followed by 'if'.

[Test Code]

    config MODULES
            def_bool y
            modules

    config A
            def_tristate y
            select C if B

    config B
            def_tristate m

    config C
            tristate

[Result]

    CONFIG_MODULES=y
    CONFIG_A=y
    CONFIG_B=m
    CONFIG_C=m

If "the value of A is used as the minimal value C can be set to",
C must be 'y'.

The actual behavior is "C is selected by (A && B)". The lower limit of
C is downgraded due to B being 'm'.

This behavior is kind of weird, and this has arisen several times in
the mailing list.

I do not know whether it is a bug or intended behavior. Anyway, it is
not feasible to change it now because many Kconfig files are written
based on this behavior. The same applies to 'imply'.

Document this (but reserve the possibility for a future change).

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
2024-06-06 20:05:15 +09:00
Masahiro Yamada
bf83266a1e kconfig: doc: fix a typo in the note about 'imply'
This sentence does not make sense due to a typo. Fix it.

Fixes: def2fbffe6 ("kconfig: allow symbols implied by y to become m")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
2024-06-06 20:03:16 +09:00
Masahiro Yamada
46edf4372e kconfig: gconf: give a proper initial state to the Save button
Currently, the initial state of the "Save" button is always active.

If none of the CONFIG options are changed while loading the .config
file, the "Save" button should be greyed out.

This can be fixed by calling conf_read() after widget initialization.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-06-06 20:03:16 +09:00
Masahiro Yamada
c181689bc4 kconfig: remove unneeded code for user-supplied values being out of range
This is a leftover from commit ce1fc9345a ("kconfig: do not clear
SYMBOL_DEF_USER when the value is out of range").

This code is now redundant because if a user-supplied value is out
of range, the value adjusted by sym_validate_range() differs, and
conf_unsaved has already been incremented a few lines above.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-06-06 20:03:14 +09:00
Paolo Abeni
411c0ea696 Merge branch 'af_unix-fix-lockless-access-of-sk-sk_state-and-others-fields'
Kuniyuki Iwashima says:

====================
af_unix: Fix lockless access of sk->sk_state and others fields.

The patch 1 fixes a bug where SOCK_DGRAM's sk->sk_state is changed
to TCP_CLOSE even if the socket is connect()ed to another socket.

The rest of this series annotates lockless accesses to the following
fields.

  * sk->sk_state
  * sk->sk_sndbuf
  * net->unx.sysctl_max_dgram_qlen
  * sk->sk_receive_queue.qlen
  * sk->sk_shutdown

Note that with this series there is skb_queue_empty() left in
unix_dgram_disconnected() that needs to be changed to lockless
version, and unix_peer(other) access there should be protected
by unix_state_lock().

This will require some refactoring, so another series will follow.

Changes:
  v2:
    * Patch 1: Fix wrong double lock

  v1: https://lore.kernel.org/netdev/20240603143231.62085-1-kuniyu@amazon.com/
====================

Link: https://lore.kernel.org/r/20240604165241.44758-1-kuniyu@amazon.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 12:57:18 +02:00
Kuniyuki Iwashima
efaf24e30e af_unix: Annotate data-race of sk->sk_shutdown in sk_diag_fill().
While dumping sockets via UNIX_DIAG, we do not hold unix_state_lock().

Let's use READ_ONCE() to read sk->sk_shutdown.

Fixes: e4e541a848 ("sock-diag: Report shutdown for inet and unix sockets (v2)")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 12:57:15 +02:00
Kuniyuki Iwashima
5d915e584d af_unix: Use skb_queue_len_lockless() in sk_diag_show_rqlen().
We can dump the socket queue length via UNIX_DIAG by specifying
UDIAG_SHOW_RQLEN.

If sk->sk_state is TCP_LISTEN, we return the recv queue length,
but here we do not hold recvq lock.

Let's use skb_queue_len_lockless() in sk_diag_show_rqlen().

Fixes: c9da99e647 ("unix_diag: Fixup RQLEN extension report")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 12:57:15 +02:00
Kuniyuki Iwashima
83690b82d2 af_unix: Use skb_queue_empty_lockless() in unix_release_sock().
If the socket type is SOCK_STREAM or SOCK_SEQPACKET, unix_release_sock()
checks the length of the peer socket's recvq under unix_state_lock().

However, unix_stream_read_generic() calls skb_unlink() after releasing
the lock.  Also, for SOCK_SEQPACKET, __skb_try_recv_datagram() unlinks
skb without unix_state_lock().

Thues, unix_state_lock() does not protect qlen.

Let's use skb_queue_empty_lockless() in unix_release_sock().

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 12:57:15 +02:00
Kuniyuki Iwashima
45d872f0e6 af_unix: Use unix_recvq_full_lockless() in unix_stream_connect().
Once sk->sk_state is changed to TCP_LISTEN, it never changes.

unix_accept() takes advantage of this characteristics; it does not
hold the listener's unix_state_lock() and only acquires recvq lock
to pop one skb.

It means unix_state_lock() does not prevent the queue length from
changing in unix_stream_connect().

Thus, we need to use unix_recvq_full_lockless() to avoid data-race.

Now we remove unix_recvq_full() as no one uses it.

Note that we can remove READ_ONCE() for sk->sk_max_ack_backlog in
unix_recvq_full_lockless() because of the following reasons:

  (1) For SOCK_DGRAM, it is a written-once field in unix_create1()

  (2) For SOCK_STREAM and SOCK_SEQPACKET, it is changed under the
      listener's unix_state_lock() in unix_listen(), and we hold
      the lock in unix_stream_connect()

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 12:57:15 +02:00
Kuniyuki Iwashima
bd9f2d0573 af_unix: Annotate data-race of net->unx.sysctl_max_dgram_qlen.
net->unx.sysctl_max_dgram_qlen is exposed as a sysctl knob and can be
changed concurrently.

Let's use READ_ONCE() in unix_create1().

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 12:57:15 +02:00
Kuniyuki Iwashima
b0632e53e0 af_unix: Annotate data-races around sk->sk_sndbuf.
sk_setsockopt() changes sk->sk_sndbuf under lock_sock(), but it's
not used in af_unix.c.

Let's use READ_ONCE() to read sk->sk_sndbuf in unix_writable(),
unix_dgram_sendmsg(), and unix_stream_sendmsg().

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-06-06 12:57:15 +02:00