Commit Graph

1281033 Commits

Author SHA1 Message Date
Kent Overstreet
06efa5f30c closures: closure_get_not_zero(), closure_return_sync()
Provide new primitives for solving a lifetime issue with bcachefs
btree_trans objects.

closure_sync_return(): like closure_sync(), wait synchronously for any
outstanding gets. like closure_return, the closure is considered
"finished" and the ref left at 0.

closure_get_not_zero(): get a ref on a closure if it's alive, i.e. the
ref is not zero.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-23 00:57:21 -04:00
Kent Overstreet
18e92841e8 bcachefs: Make btree_deadlock_to_text() clearer
btree_deadlock_to_text() searches the list of btree transactions to find
a deadlock - when it finds one it's done; it's not like other *_read()
functions that's printing each object.

Factor out btree_deadlock_to_text() to make this clearer.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-23 00:57:21 -04:00
Kent Overstreet
f44cc269a1 bcachefs: fix seqmutex_relock()
We were grabbing the sequence number before unlock incremented it - fix
this by moving the increment to seqmutex_lock() (so the seqmutex_relock()
failure path skips the mutex_trylock()), and returning the sequence
number from unlock(), to make the API simpler and safer.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-23 00:57:21 -04:00
Wolfram Sang
2c50f892ca This pull request fixes the paths of the dt-schema to their
complete locations for the ChromeOS EC tunnel driver and the
 Atmel at91sam drivers.
 
 Additionally, the OpenCores driver receives a fix for an issue
 that dates back to version 2.6.18. Specifically, the interrupts
 need to be acknowledged (clearing all pending interrupts) after
 enabling the core.
 -----BEGIN PGP SIGNATURE-----
 
 iIwEABYIADQWIQScDfrjQa34uOld1VLaeAVmJtMtbgUCZnaUpBYcYW5kaS5zaHl0
 aUBrZXJuZWwub3JnAAoJENp4BWYm0y1u6eEA+QHGf5qPM6Vyvma4kuqjMolbaAZ3
 7J35Bk2b6OvbQu/BAQDI4VIpHZiTP3wEuC7tZBraPT3jjh5hba/BeiWkgEPBBg==
 =RueN
 -----END PGP SIGNATURE-----

Merge tag 'i2c-host-fixes-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current

This pull request fixes the paths of the dt-schema to their
complete locations for the ChromeOS EC tunnel driver and the
Atmel at91sam drivers.

Additionally, the OpenCores driver receives a fix for an issue
that dates back to version 2.6.18. Specifically, the interrupts
need to be acknowledged (clearing all pending interrupts) after
enabling the core.
2024-06-23 02:13:27 +02:00
Linus Torvalds
5f583a3162 Rust fixes for v6.10
- Avoid unused import warning in 'rusttest'.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPjU5OPd5QIZ9jqqOGXyLc2htIW0FAmZ3RxsACgkQGXyLc2ht
 IW2YIw//SnUxKP9WvhfqgKeMequG6KRAvXlKVGvQx+Fqm6TgBEjMWVBskxz+5PS8
 DukSA8IW+YYnVrlu8XcygOjcJBtfwKdeHBFLOjvSJNuj+JQ2J7aDdglbumAj1f8S
 m5RqTEIEXKj+qsEzKDSmcD19vGQK0V7/nK7aMeukBt6v2gbWsmQoEiP32AB/CODs
 sN4sn6DM5kMZ0IqvvKZUgkPyG7ZWFCqogKJL9wi1/RHApcZWnLyaHqdMC70oBkOS
 GzWIJfLo4zx64YQBXj1Xd0E2SEZMt+Ri53pK3lH412Fdz+SLM/safsdIRatHxx2c
 z22ROdzFF/nTP/nkfjCJS/9xABmW8fZ6qIlKsgbYO60a/wz2uzxBSSDZDWvzkVm8
 r6NA4JCsgZ/Xew14AK7diGLU/Vx8OHWtaTFrb9//1wnCUxUWV4EDBaBcBeK0EqKL
 0EohxvHwVShzLasbcaYrO1pUmJ2ByJx6wpxbKyuAt+Zuo+aiBZx2zsJaIEScQAc4
 DDuhVXNkPLwX6a0NLVw06NbUpp0s3hfFTlHAmI76Hm1m5YlWqiwf2K2CZv4GkUHq
 IPe+NipOkp/Ew68Ju6igrBrPPth4SAqDvjHJup0qhR8XintziID3Bq2SlmpXdrAg
 blV4rgYkcvGQiCdSp3qNKM9o6Y0Fdr1tJc4iK6L91t+vuRfN/kg=
 =EAce
 -----END PGP SIGNATURE-----

Merge tag 'rust-fixes-6.10' of https://github.com/Rust-for-Linux/linux

Pull rust fix from Miguel Ojeda:

 - Avoid unused import warning in 'rusttest'.

* tag 'rust-fixes-6.10' of https://github.com/Rust-for-Linux/linux:
  rust: avoid unused import warning in `rusttest`
2024-06-22 15:29:49 -07:00
Kent Overstreet
9bd01500e4 bcachefs: Fix freeing of error pointers
This fixes incorrect/missign checking of strndup_user() returns.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-22 17:22:24 -04:00
Linus Torvalds
2765de94dd regulator: Fixes for v6.10
A few driver specific fixes for incorrect device descriptions, plus a
 fix for a missing symbol export which causes build failures for some
 newly added drivers in other trees.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZ2+14ACgkQJNaLcl1U
 h9AliQf9EXOZ1mUnCRP5MrWC6hBkgKnL16wQhwJYhk7GreKlehKLNi389qbDrYii
 aUbb5fIxE39PEQvDuBG5cJtIW8P5bPO5TqJD/9LcW5lDqoFGIyFLfOlYui8bgDLH
 OW0FRa3imDiLKyKaGeu70Dr06VzikndInMQ7MitutXxS6/u4jGE8AQ3fh1YXl6fB
 iV7uj8DFTpIg/fHsFYS2elVhvd6NRR3EkFnXvYrGvrLwnv4o+vd21G29L0lVxEUW
 VMDfxKRok59xSNHzMEkrbS5BcGWyDMXkMXEpS9jjS8gazHv/wcJ5JWPMQx40g4FQ
 y6zoIjfJgYYRK3FEPbKV/hidLC8ZBA==
 =5kHA
 -----END PGP SIGNATURE-----

Merge tag 'regulator-fix-v6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A few driver specific fixes for incorrect device descriptions, plus a
  fix for a missing symbol export which causes build failures for some
  newly added drivers in other trees"

* tag 'regulator-fix-v6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: axp20x: AXP717: fix LDO supply rails and off-by-ones
  regulator: bd71815: fix ramp values
  regulator: core: Fix modpost error "regulator_get_regmap" undefined
  regulator: tps6594-regulator: Fix the number of irqs for TPS65224 and TPS6594
2024-06-22 14:02:16 -07:00
Linus Torvalds
e24638afe2 spi: Fixes for v6.10
A number of fixes that have built up for SPI, a bunch of driver specific
 ones including an unfortunate revert of an optimisation for the i.MX
 driver which was causing issues with some configurations, plus a couple
 of core fixes for the rarely used octal mode and for a bad interaction
 between multi-CS support and target mode.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmZ2+ekACgkQJNaLcl1U
 h9DD8Af/fGg7Sf7Ajt8IVI4D33+4SujFWHmu0ELgZVS4k7i+BpiZFJwHpKsfX0eN
 I1/gVq5K6SJc1n1kiR2z2xCGD4JL0uqwk8y6QhARGnwQUVNrcsrM6TvT9N8uRelB
 tEoCfDu8Wj2KNLHn5v4LL4uNnIEBamOHbRVTVq62JcXawgVZiiLQT436APXaS7uq
 JstmiaiRzFVSQfoU2SBpbvXwp8QjqeV3l02DKwaafpoiMpccaUz2TNAXytXysHkE
 h3je8uFMU+yYqK3G8t9HQQQema3GHFi1NtK472TDQe3FxZr8IzW6Gy/iFRArcSZV
 rVEP07Q/X5OlK5LAs/hFbl+sEzkYbw==
 =8xay
 -----END PGP SIGNATURE-----

Merge tag 'spi-fix-v6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A number of fixes that have built up for SPI, a bunch of driver
  specific ones including an unfortunate revert of an optimisation for
  the i.MX driver which was causing issues with some configurations,
  plus a couple of core fixes for the rarely used octal mode and for a
  bad interaction between multi-CS support and target mode"

* tag 'spi-fix-v6.10-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: spi-imx: imx51: revert burst length calculation back to bits_per_word
  spi: Fix SPI slave probe failure
  spi: Fix OCTAL mode support
  spi: stm32: qspi: Clamp stm32_qspi_get_mode() output to CCR_BUSWIDTH_4
  spi: stm32: qspi: Fix dual flash mode sanity test in stm32_qspi_setup()
  spi: cs42l43: Drop cs35l56 SPI speed down to 11MHz
  spi: cs42l43: Correct SPI root clock speed
2024-06-22 13:58:47 -07:00
Linus Torvalds
c2fc946223 nfsd-6.10 fixes:
- Fix crashes triggered by administrative operations on the server
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEKLLlsBKG3yQ88j7+M2qzM29mf5cFAmZ2/VgACgkQM2qzM29m
 f5d+tA/+OoNtrNfaGrrXjmKte0eLLQzX4o1IbvQPcydqEQwHFIpCNXGQXdzrjYzg
 ChICf2/IKH7Dl9dOTp0QMsZbTnGORDHcImjaWBck//ObYopLOk8e+pJs2VypX+uE
 O5gIFnpFapP2IZRFiEolzOx5x73wWE7/tJYMzL5sDsV/bHavIR3abH/hBkF/1E7N
 wSCcZuBfGm0pRWJS+KI8Bwa+dVbpq80Y8ITZ3S+gQEH0nHTEw9VxpmV0oQjQinV5
 aCBegPXSBDuc2SX7KNLoHVqVX9x/htAnV5BcjbViEqhyakoa+ANIJb7LaOx/lZ2J
 9CB1lP1FPmw0AVwu4krvdnJncIGlZJPEK7eLv5cAaxNK6jb48Gv0pul5tvMphEym
 +6qw0bqalXvsvoSQFMeidVUvvkDC2fxqHBI0N8w5LVKzbYiv3JUTy3WLt/f6sd0F
 nXWgUhYGgMT62KBxyEI0f2ip38Qb2JjRrSWcKXi5D/2TfLgL5GqbRloFmX8nx6+p
 9RuYeFFNGzS6qWfYljR41lTgkD0nU0/MF9GiRn+8JvqHrACXi3z9oQ8V5jlye+HW
 PrpBvYDqrDMzBiH22H095jtgo7YK+xib87wy9ql4BxrygHCg55czLiSTZliHC1iA
 z8dGtwusFayuTaD21FytD00DkVDJQAlsahhQPfyaUOR0mcrWVR4=
 =LCB+
 -----END PGP SIGNATURE-----

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

Pull nfsd fixes from Chuck Lever:

 - Fix crashes triggered by administrative operations on the server

* tag 'nfsd-6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  NFSD: grab nfsd_mutex in nfsd_nl_rpc_status_get_dumpit()
  nfsd: fix oops when reading pool_stats before server is started
2024-06-22 13:55:56 -07:00
Linus Torvalds
563a50672d Bug fixes for 6.10-rc5:
* Fix assertion failure due to a race between unlink and cluster buffer
     instantiation.
 
 Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQjMC4mbgVeU7MxEIYH7y4RirJu9AUCZnF9DgAKCRAH7y4RirJu
 9MDAAP4oMBgM45sF7Y579EvUcAxLx01ZIcKy7t8dXmDRTN4C2gD/aECnpkAH2vlF
 jzgH28ULTLZjfOPFP6ighlEnpYcqYAk=
 =dkdo
 -----END PGP SIGNATURE-----

Merge tag 'xfs-6.10-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fix from Chandan Babu:

 - Fix assertion failure due to a race between unlink and cluster buffer
   instantiation.

* tag 'xfs-6.10-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: fix unlink vs cluster buffer instantiation race
2024-06-22 09:07:56 -07:00
Linus Torvalds
c3de9b572f bcachefs fixes for 6.10-rc5
Lots of (mostly boring) fixes for syzbot bugs and rare(r) CI bugs.
 
 The LRU_TIME_BITS fix was slightly more involved; we only have 48 bits
 for the LRU position (we would prefer 64), so wraparound is possible for
 the cached data LRUs on a filesystem that has done sufficient
 (petabytes) reads; this is now handled.
 
 One notable user reported bugfix, where we were forgetting to correctly
 set the bucket data type, which should have been BCH_DATA_need_gc_gens
 instead of BCH_DATA_free; this was causing us to go emergency read-only
 on a filesystem that had seen heavy enough use to see bucket gen
 wraparoud.
 
 We're now starting to fix simple (safe) errors without requiring user
 intervention - i.e. a small incremental step towards full self healing.
 This is currently limited to just certain allocation information
 counters, and the error is still logged in the superblock; see that
 patch for more information. ("bcachefs: Fix safe errors by default").
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEKnAFLkS8Qha+jvQrE6szbY3KbnYFAmZ22GAACgkQE6szbY3K
 bnYJaQ/+Pzep1M9JU9bQRCjmbR1pDkHswqeiVR0DSPTqDSCR0KmoypA+iwAbAmzC
 X0Z3bHgh9X36QdnF5s+JSLSzeAdzD74btLeyCI58iH//QaIg7da6tE2FgJCstMt8
 11i9a172fhiYLH7YjigZczV10nrWApClS/9qHgY+paVEgMeJgx/3zJwysC1UhuT9
 6bsSZKeGMhkGDca3k5hd7mZZKUvFXpE//xe6axK05aTHvd2wDQbDOaMdn07XC+hF
 KIWloxYVu9utqprjIq2XHWLJaxRhguHwlI4xq+n8eljLw8Kt6S9lZp7CA85Hq4RA
 hLmv1qoqJvh8+YZ7twwYAhflm9mcz58GGKrIqPCG/YaftIktJx3DCOkZzn2b7TmD
 iVXBVYkcmlZqLpZzPisKO8omqVkH4YIN/WPIGa1JU/+jkw5Qzpw62K+9AjYowUCp
 q47TVWRNtAuL5sct2KVUdTkC5Dkhx7lu3NDvx4jVXfbPsv0ssNYiTKMNnAUqefz/
 eM37MCVzmy7OwAymdb5d83CzMIHm0JKetc7CgLBAjOcMLMoLDjRdGEcFGxq/iBMB
 2Ty4rUWGFbXlwV1umcYd2cODqIt+iLwmHWCAIXjtTlOw1h5YuwX67wb9zw/tzB1W
 JUEetJQWzQ7P/Q1huntNUbiIHw2GbWzeB2u0wBPaVVEgyHWftyk=
 =ktka
 -----END PGP SIGNATURE-----

Merge tag 'bcachefs-2024-06-22' of https://evilpiepirate.org/git/bcachefs

Pull bcachefs fixes from Kent Overstreet:
 "Lots of (mostly boring) fixes for syzbot bugs and rare(r) CI bugs.

  The LRU_TIME_BITS fix was slightly more involved; we only have 48 bits
  for the LRU position (we would prefer 64), so wraparound is possible
  for the cached data LRUs on a filesystem that has done sufficient
  (petabytes) reads; this is now handled.

  One notable user reported bugfix, where we were forgetting to
  correctly set the bucket data type, which should have been
  BCH_DATA_need_gc_gens instead of BCH_DATA_free; this was causing us to
  go emergency read-only on a filesystem that had seen heavy enough use
  to see bucket gen wraparoud.

  We're now starting to fix simple (safe) errors without requiring user
  intervention - i.e. a small incremental step towards full self
  healing.

  This is currently limited to just certain allocation information
  counters, and the error is still logged in the superblock; see that
  patch for more information. ("bcachefs: Fix safe errors by default")"

* tag 'bcachefs-2024-06-22' of https://evilpiepirate.org/git/bcachefs: (22 commits)
  bcachefs: Move the ei_flags setting to after initialization
  bcachefs: Fix a UAF after write_super()
  bcachefs: Use bch2_print_string_as_lines for long err
  bcachefs: Fix I_NEW warning in race path in bch2_inode_insert()
  bcachefs: Replace bare EEXIST with private error codes
  bcachefs: Fix missing alloc_data_type_set()
  closures: Change BUG_ON() to WARN_ON()
  bcachefs: fix alignment of VMA for memory mapped files on THP
  bcachefs: Fix safe errors by default
  bcachefs: Fix bch2_trans_put()
  bcachefs: set_worker_desc() for delete_dead_snapshots
  bcachefs: Fix bch2_sb_downgrade_update()
  bcachefs: Handle cached data LRU wraparound
  bcachefs: Guard against overflowing LRU_TIME_BITS
  bcachefs: delete_dead_snapshots() doesn't need to go RW
  bcachefs: Fix early init error path in journal code
  bcachefs: Check for invalid btree IDs
  bcachefs: Fix btree ID bitmasks
  bcachefs: Fix shift overflow in read_one_super()
  bcachefs: Fix a locking bug in the do_discard_fast() path
  ...
2024-06-22 09:02:39 -07:00
Linus Torvalds
da3b6ef176 ata fixes for 6.10-rc5
- We currently enable DIPM (device initiated power management) in the
   device (using a SET FEATURES call to the device), regardless if the
   HBA supports any LPM states or not. It seems counter intuitive, and
   potentially dangerous to enable a device side feature, when the HBA
   does not have the corresponding support. Thus, make sure that we do
   not enable DIPM if the HBA does not support any LPM states.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQRN+ES/c4tHlMch3DzJZDGjmcZNcgUCZnbkiAAKCRDJZDGjmcZN
 crNxAP41dBqTGDpMEkNFlXi7L0Xw27mFNm/rHu/wbA7wq2zABAD/fQ9oqT4N6aEI
 z3PQ0zdE7w0whTTcqQo8ruQdVYPQqwc=
 =FPee
 -----END PGP SIGNATURE-----

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

Pull ata fix from Niklas Cassel:

 - We currently enable DIPM (device initiated power management) in the
   device (using a SET FEATURES call to the device), regardless if the
   HBA supports any LPM states or not. It seems counter intuitive, and
   potentially dangerous to enable a device side feature, when the HBA
   does not have the corresponding support. Thus, make sure that we do
   not enable DIPM if the HBA does not support any LPM states.

* tag 'ata-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux:
  ata: ahci: Do not enable LPM if no LPM states are supported by the HBA
2024-06-22 08:16:17 -07:00
Linus Torvalds
1f5c537182 pwm: Three fixes for the pwm-stm32 driver
The first patch prevents an integer wrap-around for small periods. In
 the second patch the calculation of the prescaler is fixed which
 resulted in values for the ARR register that don't fit into the
 corresponding register bit field. The last commit improves an error
 message that was wrongly copied from another error path.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmZ24fcACgkQj4D7WH0S
 /k5qRQf+O/ecsqX8Pd/axIKpdl7JXWlyNbt8AroSLOBUW2BieqtDVMb6sdxJwOyl
 xt2EvQtvBe0bfRJyBCQteRoY2CkWEzPZDtpx3B4dqTzavFv3jNTtss/Pg4m+O3w/
 pXH3SPtly40+cnwliMoq36warNT0Gv3qSNCeS6sGBGVuheTRxklNZKsEnTgNYVpp
 qz2JyiPLTEymQv0fgVvU4bp94oZXhlRMjAcT7T6S6bC1up0dbV1GY1KgdSOEKodI
 Wh2AhugiaA6oorHtuTNUGRZ1A2k8fKnHe88MldZXIxt3dWGNh6l2Ut6JSvwQvBMj
 4Rxx7NzbnhuRXsTqDKfFs2m8TPhTyQ==
 =xmrq
 -----END PGP SIGNATURE-----

Merge tag 'pwm/for-6.10-rc5-fixes-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux

Pull pwm fixes from Uwe Kleine-König:
 "Three fixes for the pwm-stm32 driver.

  The first patch prevents an integer wrap-around for small periods. In
  the second patch the calculation of the prescaler is fixed which
  resulted in values for the ARR register that don't fit into the
  corresponding register bit field. The last commit improves an error
  message that was wrongly copied from another error path"

* tag 'pwm/for-6.10-rc5-fixes-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux:
  pwm: stm32: Fix error message to not describe the previous error path
  pwm: stm32: Fix calculation of prescaler
  pwm: stm32: Refuse too small period requests
2024-06-22 08:03:47 -07:00
Linus Torvalds
56bf733415 SoC fixes for 6.10
There are seven oneline patches that each address a distinct problem
 on the NXP i.MX platform, mostly the popular i.MX8M variant.
 
 The only other two fixes are for error handling on the psci
 firmware driver and SD card support on the milkv duo riscv
 board.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmZ19aIACgkQYKtH/8kJ
 UicODxAAlFFCnNZXMQ7nK0LlfB4SY+dO5fRBAuwaYJhhYGKvKLavf9M2sv4EbgjY
 5oYCoAsz1M8vrJXJ75NOohVL1zmDRxitmyXMKbNzoqzIA8/3ukFDsla542hQ19qo
 ZbjkCG8deIywtMQDAcMkXHFIdYmAu1a8wCo6Ix/RQIpxHOxcyTUNEhYZpU85ugu2
 FjlZknVm6BStFge7b3ZhZhRqoYW09XSEcql0LLVr8IT/yeGIUUBaJNU67Np9pHLT
 ZzdTNgG5wY8kBcFz7MFIxxG/BQUL1El0DYPnOjaUoZzfIbsLZqgLdXWZGrK+BOTE
 MinnA2BXQldZ3ZpTQsHW8MJ0EdXwTjVChm2AUCBcadruYOpfMkfSXN5qlkiCj+4i
 6+hsRBa4UE/uMG8XuzduUCp7VOVQg3BoXOw/4xbKaFMdnw8NFAeCiAEpUIlIHiYp
 JCMLIDeRwZcrGYKZuBbJLDjcKdPDxu92DOs9HtORFKQWQwdhnWlQ3rkX4VZcxw4p
 /jR2o8BzH8CXUzv7d5mvIOo5aC5GP0H0XkmvDo1vuZi4sf+UseopQCQRB970D8j2
 W/DXu7j23OmzRCI7OnZyqU3z8/sTn1arVxA7HVNRQ+mKefphTxxCNYjjn+RgFSnA
 dJvKHQrGaI+xuJjTPTw3xwgGyiF199j5gK/o30c53PgCPjl68M0=
 =0mtC
 -----END PGP SIGNATURE-----

Merge tag 'arm-fixes-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC fixes from Arnd Bergmann:
 "There are seven oneline patches that each address a distinct problem
  on the NXP i.MX platform, mostly the popular i.MX8M variant.

  The only other two fixes are for error handling on the psci firmware
  driver and SD card support on the milkv duo riscv board"

* tag 'arm-fixes-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  firmware: psci: Fix return value from psci_system_suspend()
  riscv: dts: sophgo: disable write-protection for milkv duo
  arm64: dts: imx8qm-mek: fix gpio number for reg_usdhc2_vmmc
  arm64: dts: freescale: imx8mm-verdin: enable hysteresis on slow input pin
  arm64: dts: imx93-11x11-evk: Remove the 'no-sdio' property
  arm64: dts: freescale: imx8mp-venice-gw73xx-2x: fix BT shutdown GPIO
  arm: dts: imx53-qsb-hdmi: Disable panel instead of deleting node
  arm64: dts: imx8mp: Fix TC9595 input clock on DH i.MX8M Plus DHCOM SoM
  arm64: dts: freescale: imx8mm-verdin: Fix GPU speed
2024-06-22 07:58:21 -07:00
Linus Torvalds
d4ba3313e8 LoongArch fixes for v6.10-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCAA0FiEEzOlt8mkP+tbeiYy5AoYrw/LiJnoFAmZ1T2UWHGNoZW5odWFj
 YWlAa2VybmVsLm9yZwAKCRAChivD8uImeq0bD/wOpM8X6Pu6d5XI97aUwZ50EJ3u
 VIaG2YztLmSvFBi2WnFhAka0GXJn0KqoX06is0RemF7e1Ve8xKmRqY0KnytODcTn
 162gH7Bk2MP8X6fxTy5gLRP3c7BQ7zXpiCXcHFI/zvqEIGe0CKEDzXT3K3FtlHV+
 qqGry5VmqS8cjhby/00hTkUMkfkRaC/GLjccLgSUIFyi8k42Bh+RwqCJJEK0CHP/
 38sBNuj1hHQW61nWEWzE9cUxeeCIPtIBlOijxKQXRTqw1+uyb1IlC+qhsbptoe/r
 pWiop2w/DprZ+HBoxe0lPJQgbHxVTOLCQQDwU0N9A8YnSg3nY8jjAbTb8CyWZI6G
 YCuPZD92pgteYpVPLe1DLjlGrB8a7mQUyjDY875Vicyu7IoDQc8YLrZRpltWLZyY
 +ooj4c/N7u2LKVBroU3TQFgoqw2ZaRhkc6J9BF2yXXwCm085OlKSQZqrvXZTXNgg
 G0N2PTRLBGyXmpAvu0HdbPwuzEP0gED/h8dWUHiKXwbHn0KO5FG7503Kh+mk0+Rd
 +agwW0mY2fSp+m/GgUfDMZ6bM5lVvU9GBoa+ed7pnMIUF0yEmS7Jqo+TP/e6Xa0f
 s+kLDSiQMRpQ7AK40DskK8inojo8zTh2DlLZx96wM4CTWgdYSxCDy0M80NfAggho
 PHkfo83IfPcAu5lUrg==
 =4Phm
 -----END PGP SIGNATURE-----

Merge tag 'loongarch-fixes-6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch fixes from Huacai Chen:
 "Some hw breakpoint fixes, an objtool build warnging fix, and a trivial
  cleanup"

* tag 'loongarch-fixes-6.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
  LoongArch: KVM: Remove an unneeded semicolon
  LoongArch: Fix multiple hardware watchpoint issues
  LoongArch: Trigger user-space watchpoints correctly
  LoongArch: Fix watchpoint setting error
  LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub
2024-06-22 07:55:06 -07:00
Linus Torvalds
fe37fe2a5e ARM:
* Fix dangling references to a redistributor region if the vgic was
   prematurely destroyed.
 
 * Properly mark FFA buffers as released, ensuring that both parties
   can make forward progress.
 
 x86:
 
 * Allow getting/setting MSRs for SEV-ES guests, if they're using the pre-6.9
   KVM_SEV_ES_INIT API.
 
 * Always sync pending posted interrupts to the IRR prior to IOAPIC
   route updates, so that EOIs are intercepted properly if the old routing
   table requested that.
 
 Generic:
 
 * Avoid __fls(0)
 
 * Fix reference leak on hwpoisoned page
 
 * Fix a race in kvm_vcpu_on_spin() by ensuring loads and stores are atomic.
 
 * Fix bug in __kvm_handle_hva_range() where KVM calls a function pointer
   that was intended to be a marker only (nothing bad happens but kind of
   a mine and also technically undefined behavior)
 
 * Do not bother accounting allocations that are small and freed before
   getting back to userspace.
 
 Selftests:
 
 * Fix compilation for RISC-V.
 
 * Fix a "shift too big" goof in the KVM_SEV_INIT2 selftest.
 
 * Compute the max mappable gfn for KVM selftests on x86 using GuestMaxPhyAddr
   from KVM's supported CPUID (if it's available).
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmZ1sNwUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroO8Rwf/ZH+zVOkKdrA0XT71nToc9AkqObPO
 mBpV5p+E4boVHSWNQgY7R0yu1ViLc+HotTYf7MoQGeobm60YtDkWHlxcKrQD672C
 cLRdl02iRRDGMTRAhpr9jvT/yMHB5kYDxEYmO44nPJKwodcb4/4RJQpt8wyslT2G
 uUDpnYMFmSZ8/Zt7IznSEcSx1D+4WFqLT2AZPsJ55w45BFiI+5uRQ/kRaM9iM0+r
 yuOQCCK3+pV4CqA+ckbZ6j6+RufcovjEdYCoxLQDOdK6tQTD9aqwJFQ/o2tc+fJT
 Hj1MRRsqmdOePdjguBMsfDrEnjXoBveAt96BVheavbpC1UaWp5n0r8p2sA==
 =Egkk
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "ARM:

   - Fix dangling references to a redistributor region if the vgic was
     prematurely destroyed.

   - Properly mark FFA buffers as released, ensuring that both parties
     can make forward progress.

  x86:

   - Allow getting/setting MSRs for SEV-ES guests, if they're using the
     pre-6.9 KVM_SEV_ES_INIT API.

   - Always sync pending posted interrupts to the IRR prior to IOAPIC
     route updates, so that EOIs are intercepted properly if the old
     routing table requested that.

  Generic:

   - Avoid __fls(0)

   - Fix reference leak on hwpoisoned page

   - Fix a race in kvm_vcpu_on_spin() by ensuring loads and stores are
     atomic.

   - Fix bug in __kvm_handle_hva_range() where KVM calls a function
     pointer that was intended to be a marker only (nothing bad happens
     but kind of a mine and also technically undefined behavior)

   - Do not bother accounting allocations that are small and freed
     before getting back to userspace.

  Selftests:

   - Fix compilation for RISC-V.

   - Fix a "shift too big" goof in the KVM_SEV_INIT2 selftest.

   - Compute the max mappable gfn for KVM selftests on x86 using
     GuestMaxPhyAddr from KVM's supported CPUID (if it's available)"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: SEV-ES: Fix svm_get_msr()/svm_set_msr() for KVM_SEV_ES_INIT guests
  KVM: Discard zero mask with function kvm_dirty_ring_reset
  virt: guest_memfd: fix reference leak on hwpoisoned page
  kvm: do not account temporary allocations to kmem
  MAINTAINERS: Drop Wanpeng Li as a Reviewer for KVM Paravirt support
  KVM: x86: Always sync PIR to IRR prior to scanning I/O APIC routes
  KVM: Stop processing *all* memslots when "null" mmu_notifier handler is found
  KVM: arm64: FFA: Release hyp rx buffer
  KVM: selftests: Fix RISC-V compilation
  KVM: arm64: Disassociate vcpus from redistributor region on teardown
  KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin()
  KVM: selftests: x86: Prioritize getting max_gfn from GuestPhysBits
  KVM: selftests: Fix shift of 32 bit unsigned int more than 32 bits
2024-06-22 07:41:57 -07:00
Uwe Kleine-König
f01af3022d pwm: stm32: Fix error message to not describe the previous error path
"Failed to lock the clock" is an appropriate error message for
clk_rate_exclusive_get() failing, but not for the clock running too
fast for the driver's calculations.

Adapt the error message accordingly.

Fixes: d44d635635 ("pwm: stm32: Fix for settings using period > UINT32_MAX")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/285182163211203fc823a65b180761f46e828dcb.1718979150.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
2024-06-22 16:13:19 +02:00
Uwe Kleine-König
dab8f9f0fe pwm: stm32: Fix calculation of prescaler
A small prescaler is beneficial, as this improves the resolution of the
duty_cycle configuration. However if the prescaler is too small, the
maximal possible period becomes considerably smaller than the requested
value.

One situation where this goes wrong is the following: With a parent
clock rate of 208877930 Hz and max_arr = 0xffff = 65535, a request for
period = 941243 ns currently results in PSC = 1. The value for ARR is
then calculated to

	ARR = 941243 * 208877930 / (1000000000 * 2) - 1 = 98301

This value is bigger than 65535 however and so doesn't fit into the
respective register field. In this particular case the PWM was
configured for a period of 313733.4806027616 ns (with ARR = 98301 &
0xffff). Even if ARR was configured to its maximal value, only period =
627495.6861167669 ns would be achievable.

Fix the calculation accordingly and adapt the comment to match the new
algorithm.

With the calculation fixed the above case results in PSC = 2 and so an
actual period of 941229.1667195285 ns.

Fixes: 8002fbeef1 ("pwm: stm32: Calculate prescaler with a division instead of a loop")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/b4d96b79917617434a540df45f20cb5de4142f88.1718979150.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
2024-06-22 16:13:19 +02:00
Nick Child
49bbeb5719 ibmvnic: Free any outstanding tx skbs during scrq reset
There are 2 types of outstanding tx skb's:
Type 1: Packets that are sitting in the drivers ind_buff that are
waiting to be batch sent to the NIC. During a device reset, these are
freed with a call to ibmvnic_tx_scrq_clean_buffer()
Type 2: Packets that have been sent to the NIC and are awaiting a TX
completion IRQ. These are free'd during a reset with a call to
clean_tx_pools()

During any reset which requires us to free the tx irq, ensure that the
Type 2 skb references are freed. Since the irq is released, it is
impossible for the NIC to inform of any completions.

Furthermore, later in the reset process is a call to init_tx_pools()
which marks every entry in the tx pool as free (ie not outstanding).
So if the driver is to make a call to init_tx_pools(), it must first
be sure that the tx pool is empty of skb references.

This issue was discovered by observing the following in the logs during
EEH testing:
	TX free map points to untracked skb (tso_pool 0 idx=4)
	TX free map points to untracked skb (tso_pool 0 idx=5)
	TX free map points to untracked skb (tso_pool 1 idx=36)

Fixes: 65d6470d13 ("ibmvnic: clean pending indirect buffs during reset")
Signed-off-by: Nick Child <nnac123@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-06-22 11:34:34 +01:00
Wolfram Sang
20738cb9fa docs: i2c: summary: be clearer with 'controller/target' and 'adapter/client' pairs
This not only includes rewording, but also where to put which emphasis
on terms in this document.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2024-06-22 10:11:56 +02:00
Wolfram Sang
1e926ea190 docs: i2c: summary: document 'local' and 'remote' targets
Because Linux can be a target as well, add terminology to differentiate
between Linux being the target and Linux accessing targets.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2024-06-22 10:11:53 +02:00
Wolfram Sang
d77367fff7 docs: i2c: summary: document use of inclusive language
We now have the updated I2C specs and our own Code of Conduct, so we
have all we need to switch over to the inclusive terminology. Define
them here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2024-06-22 10:11:50 +02:00
Wolfram Sang
a5b88cb9fd docs: i2c: summary: update speed mode description
Fastest I2C mode is 5 MHz. Update the docs and reword the paragraph
slightly.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2024-06-22 10:11:47 +02:00
Wolfram Sang
75d148c90a docs: i2c: summary: update I2C specification link
Luckily, the specs are directly downloadable again, so update the link.
Also update its title to the original name "I²C".

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2024-06-22 10:11:45 +02:00
Wolfram Sang
d18b822c8f docs: i2c: summary: start sentences consistently.
Change the first paragraphs to contain only one space after the end of
the previous sentence like in the rest of the document.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Easwar Hariharan <eahariha@linux.microsoft.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
2024-06-22 10:11:42 +02:00
David Lechner
0cf81c73e4 counter: ti-eqep: enable clock at probe
The TI eQEP clock is both a functional and interface clock. Since it is
required for the device to function, we should be enabling it at probe.

Up to now, we've just been lucky that the clock was enabled by something
else on the system already.

Fixes: f213729f67 ("counter: new TI eQEP driver")
Reviewed-by: Judith Mendez <jm@ti.com>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240621-ti-eqep-enable-clock-v2-1-edd3421b54d4@baylibre.com
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
2024-06-22 13:48:11 +09:00
Jakub Kicinski
2ea8a02a35 Here are some batman-adv bugfixes:
- Don't accept TT entries for out-of-spec VIDs, by Sven Eckelmann
 
 - Revert "batman-adv: prefer kfree_rcu() over call_rcu() with free-only
   callbacks", by Linus Lüssing
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAmZ1kA8WHHN3QHNpbW9u
 d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoYuHEACp9CIARf+NyyWYpoH7io4IsvpJ
 foqM4byM4CCTnUiRHKeIxdx5zWL8TDMlDd+ydagjLSgVDjXMnmr5jMNmQTjDc9YR
 0fOQNR0kdK3kPdxdAqb9CIzjHae7YBsbsFqvTBKTSAAaLWiZAJpI3xbQioSsmxSG
 BHGQHy5gx7IJcTnPOqZ05tygF5/bvi8di6hKfV4kYhxicSRHMdPsgqxP1C0dMXmn
 myz8EhPcvBSVfF4bV9lVA/NBNVLEUlbgoPwtjOu9zmdu+ebmIq5fhy5ezMhuDPA2
 KlCYq1FqHsm8sT8XzoC35eS7i+kJBcG1lZwf3vMn/01AiBdUpMIBm8Tl92qkF3Ft
 bvKkdMMzSuGlBMZf7fprNbjvmidi+/Fyl5kdrEOZTLkJJwbp4jR+FsLHTALDqWQB
 6AskpPr41mp9p6bGIE6zK4cWBrjABBv1lJAIql0ApLX19OCRh4WOltWO3CF8PlZ1
 j3JAJ7/jUgqRc637JTfuADKkZSyRlKGJJ15ltcdybrsHOGRUAmIQbcvk49JdJwjL
 tSDxsfdLebVWbfoXpj5tg0C7ZECa0kHQ0dw6x7QdvGbPZxAduc15QrX6/PE7zOMx
 zMI8+ZMxPELu7cpZ+fngy5qoMh6U47rskHSIclcJRZi1GrQhyRthfniBFPfCShww
 vUsmFXflExZUjlaPYg==
 =sCft
 -----END PGP SIGNATURE-----

Merge tag 'batadv-net-pullrequest-20240621' of git://git.open-mesh.org/linux-merge

Simon Wunderlich says:

====================
Here are some batman-adv bugfixes:

- Don't accept TT entries for out-of-spec VIDs, by Sven Eckelmann

- Revert "batman-adv: prefer kfree_rcu() over call_rcu() with free-only
  callbacks", by Linus Lüssing

* tag 'batadv-net-pullrequest-20240621' of git://git.open-mesh.org/linux-merge:
  Revert "batman-adv: prefer kfree_rcu() over call_rcu() with free-only callbacks"
  batman-adv: Don't accept TT entries for out-of-spec VIDs
====================

Link: https://patch.msgid.link/20240621143915.49137-1-sw@simonwunderlich.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-21 18:15:44 -07:00
Jakub Kicinski
a38b800db8 linux-can-fixes-for-6.10-20240621
-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEUEC6huC2BN0pvD5fKDiiPnotvG8FAmZ1TY8THG1rbEBwZW5n
 dXRyb25peC5kZQAKCRAoOKI+ei28b+pXB/9fsvj/6jQtOAyGUHzKlWLGkfqh199P
 ecWVL6/zCrAhS/CtE1VY97+6Khd9Ipmz7wXXE9IpuuIhMrfS0AkGy/9f30Kf59XL
 PcehYmmOzNlpEPdqTVYbJGc9gOl1LNUTtTfAtJMilOY4NtvGGr02YT+frKsEKjYe
 O/qrE6trjeAV3pHThZzqkVDDeTRP68XuMlx6W6NFduQOmCxB6bLluRMd5yqoV5G6
 fLjRV5iwdB1qIU8Ny52NYGYrh0JfRqA97eLpMveTxG06/RCu7/zfAkdVJWfGf5ho
 6PtRd7qqAh5uF2EZ5qXlzPc1FRyqFB8uhmavMetQ6g3F3UY6u0xSTVtF
 =5bED
 -----END PGP SIGNATURE-----

Merge tag 'linux-can-fixes-for-6.10-20240621' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
pull-request: can 2024-06-21

The first patch is by Oleksij Rempel, it enhances the error handling
for tightly received RTS message in the j1939 protocol.

Shigeru Yoshida's patch fixes a kernel information leak in
j1939_send_one() in the j1939 protocol.

Followed by a patch by Oleksij Rempel for the j1939 protocol, to
properly recover from a CAN bus error during BAM transmission.

A patch by Chen Ni properly propagates errors in the kvaser_usb
driver.

The last patch is by Vitor Soares, that fixes an infinite loop in the
mcp251xfd driver is SPI async sending fails during xmit.

* tag 'linux-can-fixes-for-6.10-20240621' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can:
  can: mcp251xfd: fix infinite loop when xmit fails
  can: kvaser_usb: fix return value for hif_usb_send_regout
  net: can: j1939: recover socket queue on CAN bus error during BAM transmission
  net: can: j1939: Initialize unused data in j1939_send_one()
  net: can: j1939: enhanced error handling for tightly received RTS messages in xtp_rx_rts_session_new
====================

Link: https://patch.msgid.link/20240621121739.434355-1-mkl@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-21 18:11:30 -07:00
Guillaume Nault
31392048f5 vxlan: Pull inner IP header in vxlan_xmit_one().
Ensure the inner IP header is part of the skb's linear data before
setting old_iph. Otherwise, on a non-linear skb, old_iph could point
outside of the packet data.

Unlike classical VXLAN, which always encapsulates Ethernet packets,
VXLAN-GPE can transport IP packets directly. In that case, we need to
look at skb->protocol to figure out if an Ethernet header is present.

Fixes: d342894c5d ("vxlan: virtual extensible lan")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Link: https://patch.msgid.link/2aa75f6fa62ac9dbe4f16ad5ba75dd04a51d4b99.1718804000.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-06-21 17:34:15 -07:00
Linus Torvalds
35bb670d65 SCSI fixes on 20240621
Two fixes: one in the ufs driver fixing an obvious memory leak and the
 other (with a core flag based update) trying to prevent USB crashes by
 stopping the core from issuing a request for the I/O Hints mode page.
 
 Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
 -----BEGIN PGP SIGNATURE-----
 
 iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCZnXk0iYcamFtZXMuYm90
 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishXORAQCgNcf9
 vxSCOJNDU+OJlBOZLAzylHJEAYRnK7MPNg7ucgD/b8D4ANGbbHz4gLIdC/1BPFwi
 ZWmQwuClTmBJfCs6jSA=
 =07Uv
 -----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:
 "Two fixes: one in the ufs driver fixing an obvious memory leak and the
  other (with a core flag based update) trying to prevent USB crashes by
  stopping the core from issuing a request for the I/O Hints mode page"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: usb: uas: Do not query the IO Advice Hints Grouping mode page for USB/UAS devices
  scsi: core: Introduce the BLIST_SKIP_IO_HINTS flag
  scsi: ufs: core: Free memory allocated for model before reinit
2024-06-21 14:28:28 -07:00
Chuck Lever
6ddc9deacc SUNRPC: Fix backchannel reply, again
I still see "RPC: Could not send backchannel reply error: -110"
quite often, along with slow-running tests. Debugging shows that the
backchannel is still stumbling when it has to queue a callback reply
on a busy transport.

Note that every one of these timeouts causes a connection loss by
virtue of the xprt_conditional_disconnect() call in that arm of
call_cb_transmit_status().

I found that setting to_maxval is necessary to get the RPC timeout
logic to behave whenever to_exponential is not set.

Fixes: 57331a59ac ("NFSv4.1: Use the nfs_client's rpc timeouts for backchannel")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2024-06-21 17:26:02 -04:00
Linus Torvalds
d6c9415706 drm fixes for 6.10-rc5
xe:
 - Fix for invalid register access
 
 i915:
 - Fix conditions for joiner usage, it's not possible with eDP MSO
 
 amdgpu:
 - Fix display idle optimization race
 - Fix GPUVM TLB flush locking scope
 - IPS fix
 - GFX 9.4.3 harvesting fix
 - Runtime pm fix for shared buffers
 - DCN 3.5.x fixes
 - USB4 fix
 - RISC-V clang fix
 - Silence UBSAN warnings
 - MES11 fix
 - PSP 14.0.x fix
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmZ15NcACgkQDHTzWXnE
 hr7Tig//WDwT2Vy/Qh+LhkzW+7O3s1Z4VZJPBMmUNcdf2E6zb9wCEg1ld718NnpQ
 fo70qcqabh1EA2l6yxrHr76q4a9h2/Z04dpDsQFVo6wZdHAM9CqW+pITbo2PaKau
 AUlIOmiZyIV/vjrEOspj5uMMrP/+CehLhveP0B1ZYpbZTBrO7MQZcab2Z9B9wAsy
 BAus8eF+zdjJchoKX+5n6Sj2eTmeeda+ock2Zj7KFSCyTsd5faiUlyEB0VZC9P5G
 pRmMB/z0dbumk8qs1pinZ9z3eA430e6rU2Ai8MzX8+lo8Flb5qe56fWu7rXJg8Lk
 gFRlSo4oZ5kuUZz+azLgOsnkDz3jK6xgDkwpNkev1vMtHdF42JT6aWTBokRhsr+3
 8w5r8k+MGlYVg4iY5gRdkUBwMdO67Bcp0Ma78PtB7nWTLvdCO04UbOmw+4mDScMC
 ZFFswIX9N7/9UfexNVrpqw8iB2wT3s8g36qZsvjtGY5KHzPgxYrpkAcpoc45Re54
 RJq90W5gzac3QVMgBl3LYQa1FmNlk8tdwfhlV7sr0zuUY27KKLPXsX4WeM3loeU+
 caThPv2AmNKMQGIyxHv5fWUhXr19rpFesry7ExoWlLFTUwSgDLBM6/X4pZ7IA4Yw
 sehYCJOCT4flqdimvJxSpsKT4pK6NEbSa2uDAoBJBKaFM0LrHNo=
 =KpYx
 -----END PGP SIGNATURE-----

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

Pull drm fixes from Dave Airlie:
 "Still pretty quiet, two weeks worth of amdgpu fixes, with one i915 and
  one xe. I didn't get the drm-misc-fixes tree PR this week, but there
  was only one fix queued and I think it can wait another week, so seems
  pretty normal.

  xe:
   - Fix for invalid register access

  i915:
   - Fix conditions for joiner usage, it's not possible with eDP MSO

  amdgpu:
   - Fix display idle optimization race
   - Fix GPUVM TLB flush locking scope
   - IPS fix
   - GFX 9.4.3 harvesting fix
   - Runtime pm fix for shared buffers
   - DCN 3.5.x fixes
   - USB4 fix
   - RISC-V clang fix
   - Silence UBSAN warnings
   - MES11 fix
   - PSP 14.0.x fix"

* tag 'drm-fixes-2024-06-22' of https://gitlab.freedesktop.org/drm/kernel:
  drm/xe/vf: Don't touch GuC irq registers if using memory irqs
  drm/amdgpu: init TA fw for psp v14
  drm/amdgpu: cleanup MES11 command submission
  drm/amdgpu: fix UBSAN warning in kv_dpm.c
  drm/radeon: fix UBSAN warning in kv_dpm.c
  drm/amd/display: Disable CONFIG_DRM_AMD_DC_FP for RISC-V with clang
  drm/amd/display: Attempt to avoid empty TUs when endpoint is DPIA
  drm/amd/display: change dram_clock_latency to 34us for dcn35
  drm/amd/display: Change dram_clock_latency to 34us for dcn351
  drm/amdgpu: revert "take runtime pm reference when we attach a buffer" v2
  drm/amdgpu: Indicate CU havest info to CP
  drm/amd/display: prevent register access while in IPS
  drm/amdgpu: fix locking scope when flushing tlb
  drm/amd/display: Remove redundant idle optimization check
  drm/i915/mso: using joiner is not possible with eDP MSO
2024-06-21 14:11:50 -07:00
Linus Torvalds
264efe488f overlayfs fixes for 6.10-rc5
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQSQHSd0lITzzeNWNm3h3BK/laaZPAUCZnQtKwAKCRDh3BK/laaZ
 PCASAP4nz6GxSWiomyCCETLrMZYKIaMC2yK1ZAv9uN7Vkeqq6QEAlvjqARy2NO8E
 2W6AlYJ5cIPyCDPZvSKgwcOBMpfUXw0=
 =jS20
 -----END PGP SIGNATURE-----

Merge tag 'ovl-fixes-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs

Pull overlayfs fixes from Miklos Szeredi:
 "Fix two bugs, one originating in this cycle and one from 6.6"

* tag 'ovl-fixes-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
  ovl: fix encoding fid for lower only root
  ovl: fix copy-up in tmpfile
2024-06-21 14:06:14 -07:00
Linus Torvalds
a502e72796 io_uring-6.10-20240621
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmZ1pf4QHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgprM8D/9gPCDWBB20pGVhEORbL0Da1qr9WvSkaaAw
 zfdPp3mBMrgfBy0t9dW+RkHdDt4eE9O95jUqKbOxDGDf3yJJ7oo6vPg+RIRdhEP4
 9BGW5ZhYMIbq6uh9wGbZiR/PkZCnJmeL+5sIx1rfd6+nbd7QSptXg/SB6Kb4mGJS
 b1N4mcHfiuTFdgAWGZWQ3lbXu8TsNwIayWCs2rhOyWAyMk0uE/6w5oN1eJkdwZXP
 CfbwGorRPO5c5Ick4cImXjomWqEPaPYyXQiMQJ8nYFx3J/AXPZsR50jfQlvuPu08
 uvv2omTNu1J/93iwM+ZKha2gCjxM3t/vWoY0mWDcHqwXGx75OW3Forx4vMUJY3ON
 GiF28ABerw22onsCYXv8dVie86iZLlIPkQdUbYM2O6aEO3RzlbUQwwGx7Bu0wroG
 Ye3ua2kMsz7hP/0IMyblGH0o6eXjezO/3IHvu3y3kfnC+vngy7TkEfuqYCMnP8Je
 b32QjvQIIcrq4Y+QUWCwTT1+kZmreLJiOEJeavVQyh+zLqOGK/WLQ6HTiZgZdFK2
 Amg2RFXBmRwSbuBUNPgiS8C2ggZrJyeh3BkfZ5hdPrkHMGjT1Fj2rjjRwZTdN2ip
 7xvmXDoWtP1XOYzOgDDWZybvvD89moTPb/Sk+xcwk9hGhOK/f+qtdx7a7j8aBYlB
 orITWajyCg==
 =n+1e
 -----END PGP SIGNATURE-----

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

Pull io_uring fix from Jens Axboe:
 "Just a single cleanup for the fixed buffer iov_iter import.

  More cosmetic than anything else, but let's get it cleaned up as it's
  confusing"

* tag 'io_uring-6.10-20240621' of git://git.kernel.dk/linux:
  io_uring/rsrc: fix incorrect assignment of iter->nr_segs in io_import_fixed
2024-06-21 14:01:03 -07:00
Linus Torvalds
ffdf504cab RDMA v6.10 first rc
Small bug fixes:
 
 - Prevent a crash in bnxt if the en and rdma drivers disagree on the MSI
   vectors
 
 - Have rxe memcpy inline data from the correct address
 
 - Fix rxe's validation of UD packets
 
 - Several mlx5 mr cache issues: bad lock balancing on error, missing
   propagation of the ATS property to the HW, wrong bucketing of freed
   mrs in some cases
 
 - Incorrect goto error unwind in mlx5 driver probe
 
 - Missed userspace input validation in mlx5 SRQ create
 
 - Incorrect uABI in MANA rejecting valid optional MR creation flags
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRRRCHOFoQz/8F5bUaFwuHvBreFYQUCZnV97wAKCRCFwuHvBreF
 YSzqAQDmUCn0Kb6HXzKViHMCRLoKs6n+dGDPR+wcatcbcoihqgD+JjxHSqL8tDeU
 ASHftDmvTY3CY1KHrnw8OQam7fq+3w8=
 =fAbT
 -----END PGP SIGNATURE-----

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

Pull rdma fixes from Jason Gunthorpe:
 "Small bug fixes:

   - Prevent a crash in bnxt if the en and rdma drivers disagree on the
     MSI vectors

   - Have rxe memcpy inline data from the correct address

   - Fix rxe's validation of UD packets

   - Several mlx5 mr cache issues: bad lock balancing on error, missing
     propagation of the ATS property to the HW, wrong bucketing of freed
     mrs in some cases

   - Incorrect goto error unwind in mlx5 driver probe

   - Missed userspace input validation in mlx5 SRQ create

   - Incorrect uABI in MANA rejecting valid optional MR creation flags"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
  RDMA/mana_ib: Ignore optional access flags for MRs
  RDMA/mlx5: Add check for srq max_sge attribute
  RDMA/mlx5: Fix unwind flow as part of mlx5_ib_stage_init_init
  RDMA/mlx5: Ensure created mkeys always have a populated rb_key
  RDMA/mlx5: Follow rb_key.ats when creating new mkeys
  RDMA/mlx5: Remove extra unlock on error path
  RDMA/rxe: Fix responder length checking for UD request packets
  RDMA/rxe: Fix data copy for IB_SEND_INLINE
  RDMA/bnxt_re: Fix the max msix vectors macro
2024-06-21 13:55:38 -07:00
Daniel Borkmann
cfa1a2329a bpf: Fix overrunning reservations in ringbuf
The BPF ring buffer internally is implemented as a power-of-2 sized circular
buffer, with two logical and ever-increasing counters: consumer_pos is the
consumer counter to show which logical position the consumer consumed the
data, and producer_pos which is the producer counter denoting the amount of
data reserved by all producers.

Each time a record is reserved, the producer that "owns" the record will
successfully advance producer counter. In user space each time a record is
read, the consumer of the data advanced the consumer counter once it finished
processing. Both counters are stored in separate pages so that from user
space, the producer counter is read-only and the consumer counter is read-write.

One aspect that simplifies and thus speeds up the implementation of both
producers and consumers is how the data area is mapped twice contiguously
back-to-back in the virtual memory, allowing to not take any special measures
for samples that have to wrap around at the end of the circular buffer data
area, because the next page after the last data page would be first data page
again, and thus the sample will still appear completely contiguous in virtual
memory.

Each record has a struct bpf_ringbuf_hdr { u32 len; u32 pg_off; } header for
book-keeping the length and offset, and is inaccessible to the BPF program.
Helpers like bpf_ringbuf_reserve() return `(void *)hdr + BPF_RINGBUF_HDR_SZ`
for the BPF program to use. Bing-Jhong and Muhammad reported that it is however
possible to make a second allocated memory chunk overlapping with the first
chunk and as a result, the BPF program is now able to edit first chunk's
header.

For example, consider the creation of a BPF_MAP_TYPE_RINGBUF map with size
of 0x4000. Next, the consumer_pos is modified to 0x3000 /before/ a call to
bpf_ringbuf_reserve() is made. This will allocate a chunk A, which is in
[0x0,0x3008], and the BPF program is able to edit [0x8,0x3008]. Now, lets
allocate a chunk B with size 0x3000. This will succeed because consumer_pos
was edited ahead of time to pass the `new_prod_pos - cons_pos > rb->mask`
check. Chunk B will be in range [0x3008,0x6010], and the BPF program is able
to edit [0x3010,0x6010]. Due to the ring buffer memory layout mentioned
earlier, the ranges [0x0,0x4000] and [0x4000,0x8000] point to the same data
pages. This means that chunk B at [0x4000,0x4008] is chunk A's header.
bpf_ringbuf_submit() / bpf_ringbuf_discard() use the header's pg_off to then
locate the bpf_ringbuf itself via bpf_ringbuf_restore_from_rec(). Once chunk
B modified chunk A's header, then bpf_ringbuf_commit() refers to the wrong
page and could cause a crash.

Fix it by calculating the oldest pending_pos and check whether the range
from the oldest outstanding record to the newest would span beyond the ring
buffer size. If that is the case, then reject the request. We've tested with
the ring buffer benchmark in BPF selftests (./benchs/run_bench_ringbufs.sh)
before/after the fix and while it seems a bit slower on some benchmarks, it
is still not significantly enough to matter.

Fixes: 457f44363a ("bpf: Implement BPF ring buffer and verifier support for it")
Reported-by: Bing-Jhong Billy Jheng <billy@starlabs.sg>
Reported-by: Muhammad Ramdhan <ramdhan@starlabs.sg>
Co-developed-by: Bing-Jhong Billy Jheng <billy@starlabs.sg>
Co-developed-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Bing-Jhong Billy Jheng <billy@starlabs.sg>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240621140828.18238-1-daniel@iogearbox.net
2024-06-21 13:04:21 -07:00
Linus Torvalds
4545981f33 sound fixes for 6.10-rc5 #2
A follow-up fix of the previous PR for a random build issue,
 as well as another trivial HD-audio quirk.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmZ1k88OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+Vpw/9Ftw5wQ3ssZL/aLwXjj9LyaAXiw3FjsK443xF
 16CusEtX0/XJ53bR5aqi0anC8TJv7sFiOT+Q/u4IIgMoUJDpI4YE2TplCDlfG5xW
 l9d4RdxF7Wsl4X4md0qTfyl8Kz407M/TNC3RxIaBE4kmzM8gwLdR/85v6qnEy7VX
 Juv3JgQSmOAnOUeL9n54yP0czFHs6iyo554Kz8T5RV/HP4IvUjBLx54wSefuDu4s
 hcgLw+2SMSFna/l1TzqW1JkA456ibeFoHnfcKsmLSneOv1/upQKoDrk4bTkRg7yB
 /QZJ3ky3TgZ++/FAWRoeXD8NCUNnwUqr4GWiOSrtnyPnz915F67aUBy3sNhJdLY2
 az130lAMEWvggnRlfJcFCchZfZaYWOMzcU3VCaVPGp3Fks6K5vMs8ONc58deS25m
 tspW10BQAoixq15UAhhPte+Zuc+GRMLELpwYD163Q65EMSaZPP8HFnvL0zP3m9LT
 is9e5sVrxbuHhv1ocOGFuNxaRm94+J/z4wbXM64v1OpgseeOn0QJCk/M81fyeIST
 apAkrgsOUPLsnir1r9WvJd4SOplDA7hFZcCtcFFQX0t47bXOsOv8lUeKSdZyoQyJ
 psiSl4+YdQKjAxZYDYo4y6KPor1pcdsDB4lDtSA17Oh5dthUidmL1injrmbglSyt
 WEQ10fc=
 =9dgO
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.10-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull  more sound fixes from Takashi Iwai:
 "A follow-up fix for a random build issue, as well as another trivial
  HD-audio quirk"

* tag 'sound-6.10-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda: Use imply for suggesting CONFIG_SERIAL_MULTI_INSTANTIATE
  ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14AHP9
2024-06-21 11:26:43 -07:00
Linus Torvalds
36c0758374 ACPI fixes for 6.10-rc5
- Undo an ACPICA code change that attempted to keep operation regions
    within a page boundary, but allowed accesses to unmapped memory to
    occur (Raju Rangoju).
 
  - Ignore MIPI camera graph port nodes created with the help of the
    information from the ACPI tables on all Dell Tiger, Alder and Raptor
    Lake models as that information is reported to be invalid on the
    platforms in question (Hans de Goede).
 
  - Use new Intel CPU model matching macros in the MIPI DisCo for Imaging
    part of ACPI device enumeration (Hans de Goede).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmZ1cXASHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRx+KQP/10APBYP+F2sjuM8DpIyCLd4pJ9ayXHJ
 DTbLUTHqnzRBPaeI/eGPyqD8qfMhuFhaowHvab6wEz2yK6eT5FN+/aIlo1Pz1IFC
 MWpvwA66TvVCyxxyd9YYLH7NEMJAMfxN5qntk0HY5lpVj09UGde1VBPPpHdixyLm
 i/JcoV1G7r25tYwgc9oM+VkDrKiULZtDmX9XYOylEYXFZfzW0DIoqZ5BqwdM2Nbv
 ZTikrU2gpuduyQCcUkq9hRTCfEVgpu/MOFmAVb4rnjLDjIGrjHv6zojNzfwX0+nM
 tepJpKt6718TGSRwXoNOo1+ImDmy9IG+ZoKj3wt63LAS2a55L0hX6eaMya6voQXE
 xMqbdqcikNuLSKK73Agz9DyONFmJKQVIYR+KcrMVHskCAY+s1JN4U+S3zulYqiQZ
 T1dYN2tro2ZdLjTsITIzosJ+9Pfigku8HhYSHgKTqDqWcngTP+Sih8LhsYA5HxzF
 17/UQJvgEO4oXq8CF+r2UitPEW4U6F6PIOZkRW/jVGnWow8Wp1fUfWD0pmFyj1XX
 rzi/MF0U8B+TdbtRGfjFLDqKZwzyIiSr1xy6Uq/YHgoNgIlhUd4Xb45ycNkU5VtA
 bisGFsKtxeomZtg/BB4EfcBUEt+eueHY6r+QEhQxS7zRFGEWUJw8D/2EnjgXJ5Au
 /4MGPvCZWz1w
 =jmUu
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
 "These address a possible NULL pointer dereference in the ACPICA code
  and quirk camera enumeration on multiple platforms where incorrect
  data are present in the platform firmware.

  Specifics:

   - Undo an ACPICA code change that attempted to keep operation regions
     within a page boundary, but allowed accesses to unmapped memory to
     occur (Raju Rangoju)

   - Ignore MIPI camera graph port nodes created with the help of the
     information from the ACPI tables on all Dell Tiger, Alder and
     Raptor Lake models as that information is reported to be invalid on
     the platforms in question (Hans de Goede)

   - Use new Intel CPU model matching macros in the MIPI DisCo for
     Imaging part of ACPI device enumeration (Hans de Goede)"

* tag 'acpi-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: mipi-disco-img: Switch to new Intel CPU model defines
  ACPI: scan: Ignore camera graph port nodes on all Dell Tiger, Alder and Raptor Lake models
  ACPICA: Revert "ACPICA: avoid Info: mapping multiple BARs. Your kernel is fine."
2024-06-21 11:20:37 -07:00
Alexei Starovoitov
2673315947 selftests/bpf: Tests with may_goto and jumps to the 1st insn
Add few tests with may_goto and jumps to the 1st insn.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/bpf/20240619011859.79334-2-alexei.starovoitov@gmail.com
2024-06-21 20:18:49 +02:00
Alexei Starovoitov
5337ac4c9b bpf: Fix the corner case with may_goto and jump to the 1st insn.
When the following program is processed by the verifier:
L1: may_goto L2
    goto L1
L2: w0 = 0
    exit

the may_goto insn is first converted to:
L1: r11 = *(u64 *)(r10 -8)
    if r11 == 0x0 goto L2
    r11 -= 1
    *(u64 *)(r10 -8) = r11
    goto L1
L2: w0 = 0
    exit

then later as the last step the verifier inserts:
  *(u64 *)(r10 -8) = BPF_MAX_LOOPS
as the first insn of the program to initialize loop count.

When the first insn happens to be a branch target of some jmp the
bpf_patch_insn_data() logic will produce:
L1: *(u64 *)(r10 -8) = BPF_MAX_LOOPS
    r11 = *(u64 *)(r10 -8)
    if r11 == 0x0 goto L2
    r11 -= 1
    *(u64 *)(r10 -8) = r11
    goto L1
L2: w0 = 0
    exit

because instruction patching adjusts all jmps and calls, but for this
particular corner case it's incorrect and the L1 label should be one
instruction down, like:
    *(u64 *)(r10 -8) = BPF_MAX_LOOPS
L1: r11 = *(u64 *)(r10 -8)
    if r11 == 0x0 goto L2
    r11 -= 1
    *(u64 *)(r10 -8) = r11
    goto L1
L2: w0 = 0
    exit

and that's what this patch is fixing.
After bpf_patch_insn_data() call adjust_jmp_off() to adjust all jmps
that point to newly insert BPF_ST insn to point to insn after.

Note that bpf_patch_insn_data() cannot easily be changed to accommodate
this logic, since jumps that point before or after a sequence of patched
instructions have to be adjusted with the full length of the patch.

Conceptually it's somewhat similar to "insert" of instructions between other
instructions with weird semantics. Like "insert" before 1st insn would require
adjustment of CALL insns to point to newly inserted 1st insn, but not an
adjustment JMP insns that point to 1st, yet still adjusting JMP insns that
cross over 1st insn (point to insn before or insn after), hence use simple
adjust_jmp_off() logic to fix this corner case. Ideally bpf_patch_insn_data()
would have an auxiliary info to say where 'the start of newly inserted patch
is', but it would be too complex for backport.

Fixes: 011832b97b ("bpf: Introduce may_goto instruction")
Reported-by: Zac Ecob <zacecob@protonmail.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Closes: https://lore.kernel.org/bpf/CAADnVQJ_WWx8w4b=6Gc2EpzAjgv+6A0ridnMz2TvS2egj4r3Gw@mail.gmail.com/
Link: https://lore.kernel.org/bpf/20240619011859.79334-1-alexei.starovoitov@gmail.com
2024-06-21 20:18:40 +02:00
Linus Torvalds
fbe7ef3f2f Thermal control fixes for 6.10-rc5
- Remove the filtered mode for mt8188 from lvts_thermal as it is not
    supported on this platform and fail the lvts_thermal initialization
    when the golden temperature is zero as that means the efuse data is
    not correctly set (Julien Panis).
 
  - Update the processor_thermal part of the Intel int340x driver to
    support shared interrupts as the processor thermal device interrupt
    may in fact be shared with PCI devices (Srinivas Pandruvada).
 
  - Synchronize the suspend-prepare and post-suspend actions of the
    thermal PM notifier to avoid a destructive race condition and
    change the priority of that notifier to the minimum to avoid
    interference between the work items spawned by it and the other
    PM notifiers during system resume (Rafael Wysocki).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmZ1clgSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxftEQAKE9MJHvo1zTgGq3jU198pYj6/oIf4F8
 GR8wTSIhmSO+YgUINbjcGaUoCbwROeaLzLDyAXsrG0vS1t1/c5TGGujvQnMCnrdz
 rSwGoXtJeRK2yYNUWz/Mt1e/ai04sn/i9/9gZJOagRQaas45SdUIxLqpQs17R5cP
 R/8tFAyjMVyQ1MvI4mP3zK1yvE4fBeC18ZGKXNM57tzGBr0dWcSLrVJH/vS1/3Zx
 947LCzngfw8rPx1v+1LSIaCja62StUHBfmkTHnXDaegCFaWCuyUGgHV7yV3RW5sc
 +jQfMo6WH+O10TWvP28tc9dwamB0kfGr7oZXDH0ucpTwg621tThQZL/urxcAX1BS
 i5HQlATfUD/qWq1c5KUEZMRVje/rU8+SnSbf/xZeQKF4albOoZUWAk6VWqyJiwrr
 VTnMsVVCEZ62Vawyk7tchdMu233GMoMndRPu/Xq+ourKf8cDzzXdzn678cofahpn
 5u+droa/n9O7gkku8Mz4zTmgVyXyJtLi1tMGHYT/M7XM/OrKlwvqmpAnUSuAfaQ8
 C8ywxyrk1GJQoy8LLStaSvUFcAtrdmBpv5hSFPDXkbmy/xHaKw7+vccjL9CybmXo
 P4u2psBQ4opeg0x5I+dS5Tp0WcFXcdo5UGSaw2dRT+7WDxA9ALk3hs/s+vHzv1zO
 Fe7iya1SwbZB
 =qXau
 -----END PGP SIGNATURE-----

Merge tag 'thermal-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
 "These fix the Mediatek lvts_thermal driver, the Intel int340x driver,
  and the thermal core (two issues related to system suspend).

  Specifics:

   - Remove the filtered mode for mt8188 from lvts_thermal as it is not
     supported on this platform and fail the lvts_thermal initialization
     when the golden temperature is zero as that means the efuse data is
     not correctly set (Julien Panis)

   - Update the processor_thermal part of the Intel int340x driver to
     support shared interrupts as the processor thermal device interrupt
     may in fact be shared with PCI devices (Srinivas Pandruvada)

   - Synchronize the suspend-prepare and post-suspend actions of the
     thermal PM notifier to avoid a destructive race condition and
     change the priority of that notifier to the minimum to avoid
     interference between the work items spawned by it and the other
     PM notifiers during system resume (Rafael Wysocki)"

* tag 'thermal-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: int340x: processor_thermal: Support shared interrupts
  thermal: core: Change PM notifier priority to the minimum
  thermal: core: Synchronize suspend-prepare and post-suspend actions
  thermal/drivers/mediatek/lvts_thermal: Return error in case of invalid efuse data
  thermal/drivers/mediatek/lvts_thermal: Remove filtered mode for mt8188
2024-06-21 11:16:56 -07:00
Linus Torvalds
66cc544fd7 dmaengine fixes for v6.10
Driver fixes for:
  - kmemleak, error path handling and missing kmem_cache_destroy() fixes
    for ioatdma driver
  - after use fix for idxd driver
  - data synchronisation fix for xdma isr handling
  - fsl driver channel constraints and linking two fsl module fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmZ1ScEACgkQfBQHDyUj
 g0dFcA/+L4LgTAopfbLR4+mgimkdZdrYCEFHbA4Tu9xqEZwLf+kyQn8qBkLSlLo6
 Q0nQFsSfxxCm+LnEXngBE/uo/ITQhGbmVqgpem8TuqyTRqO7f4upH1XRE5OOqBNO
 vDVhhzT9Q4tcflVhuG3T4yDSCFXL6wbUXHO0PugprUl/xL78aT/lPB+H/blv8e/c
 oXfi5OQb5yiX1tsVYFQJ8SzJPxunPQJ1xspAg3GKNaJcOdwAS2Pr7KvEnPCdtqVD
 yJaloa/lvojLEnmj5zMXp2SWX2lnmOwFovYl9S4Y7xhLCwKZbSVTXMrY6QxM46Gb
 zz5fuI6tjSlYPkNw+Ag3twpDSoBWgYzNsZfUWxhdjnsgpQeyntmJxK5aAJVt5Mk9
 lStnu060sD39akzh9lwg3y6OFcx9VSeP2a45U0vTpOQPdTN8JnyKnC8s2EJHjb36
 PNRG4OQ/oXCn35fIGX+cjy0xNVpVPW29WPsruXbA5Dzd4M9veX0Ow1iuyHvUT7WY
 Z0tK6cIGccs3Wn2yU6Pvs8zy9bNV/qpkiMb26UXNCQ39qVR4MAgPIVS7jPhd5Wdy
 RoLY8U2ncmWIUj6umsImObRltLsYY7qfVo6zN6tiJN3D6BpKr+capIBeDNLcxDEk
 XLtKEx1KWz9OKJnMPuRp2nQdo46sM8gVXfAuV0Meq1wO9O8sc8U=
 =4icr
 -----END PGP SIGNATURE-----

Merge tag 'dmaengine-fix-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:

 - kmemleak, error path handling and missing kmem_cache_destroy() fixes
   for ioatdma driver

 - use after free fix for idxd driver

 - data synchronisation fix for xdma isr handling

 - fsl driver channel constraints and linking two fsl module fixes

* tag 'dmaengine-fix-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine:
  dmaengine: ioatdma: Fix missing kmem_cache_destroy()
  dt-bindings: dma: fsl-edma: fix dma-channels constraints
  dmaengine: fsl-edma: avoid linking both modules
  dmaengine: ioatdma: Fix kmemleak in ioat_pci_probe()
  dmaengine: ioatdma: Fix error path in ioat3_dma_probe()
  dmaengine: ioatdma: Fix leaking on version mismatch
  dmaengine: ti: k3-udma-glue: Fix of_k3_udma_glue_parse_chn_by_id()
  dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list
  dmaengine: xilinx: xdma: Fix data synchronisation in xdma_channel_isr()
2024-06-21 11:07:15 -07:00
Linus Torvalds
a21b52aa6e phy fixes for 6.10
- Qualcomm QMP driver fixes for missing register offsets and correct N4
    offsets for registers
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmZ1SE8ACgkQfBQHDyUj
 g0c7RxAAhY7UGcHJ+6YdOT/J8v9AeOKoE3rG7mwF0yI7rbNShsybdExpZjzFUal4
 jX2Xg3gW8UGd3L4kbhTSpRwU88oPKUlojzMwz4nskvHLKKI3Xk778g1NTZ+2vaBh
 nHBYewOUGXWu+N4IZECcbjULRQoGa7BVZNVz8gLxHOu8TgbyCokUQJwki/9vLyJi
 JpAY6ITiKgZqDVlbkNBfQrcZeDEwvvBgxnk6lhCQJ2T1AU7eMfBE4fhdYC+RPfbA
 irfxZ48nr5pBV9PXfFD5C4Qo+WG7awYyGLnOipOS4hWLHW0/UK90uB4t/tbwy4ov
 NUqCDCs3r30g08o742VLCBEWGiOTeNXazN2hvHBs2hbG3U221TxXScahoYPulAD9
 mAtF1qJBQab0j2nszpx0BE842wqNRK1FZNxpQrMPhFtrsokVQHujfAN+Ob2Dq9Gu
 IRLcVaby3QlM5KaIODUv0GAgAAt6Zz4qvN+XUsFdpvnvQFZVLn+trcG5BrWUkfNS
 5TRzpCwz1cEL03XyxORk+effz9aoVFGI8q9JmWQgMMZGY3FVyYu8d2tCbN94MoxZ
 +vw1brs2c7gLMrQxgFX6e1yUCamSuGk05DQKj6XA0BROdR9dBcrnE1BJhNuKXE47
 M2DQkG6gp8bZeiTwnrBXr9qtLz3SAZp1wqaZ53dJRkvPWgEZSNI=
 =uSf5
 -----END PGP SIGNATURE-----

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

Pull phy fixes from Vinod Koul:

 - Qualcomm QMP driver fixes for missing register offsets and correct N4
   offsets for registers

* tag 'phy-fixes-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: qcom: qmp-combo: Switch from V6 to V6 N4 register offsets
  phy: qcom-qmp: pcs: Add missing v6 N4 register offsets
  phy: qcom-qmp: qserdes-txrx: Add missing registers offsets
2024-06-21 11:03:35 -07:00
Linus Torvalds
d512d025a1 soundwire fixes for 6.10
- Single fix for calling fwnode_handle_put() on the
    returned fwnode pointer
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+vs47OPLdNbVcHzyfBQHDyUjg0cFAmZ1RYwACgkQfBQHDyUj
 g0efFA/9EpV2NsjahG2HgQeIbxPfoxnaFB8Yt6BcdbPKUxIdTeyWFvbRMuTlgHd1
 if3Vh2AFspN6eOzclXE4iKO21KCvSBwv5+y2dckqrMBI+vGkkxl+nSGnD0T37QuA
 5OhtmzEAxThloFo0aDYSnG+I6cDjdqt9yYSd2QC1ITYjkDJbkd6tG2DJjqsfZJMo
 d730bBJyIMVXWdsY/Ute3pqYOgJpTjBcwdQ/cTZlir1AS0/0BoNujiv1AdEmBk0i
 SZblmzeFlh+/MRwivznmSPXnZIyb3Rc1F5x0SQEtLYidF3pcMwh6FPcNwW6gwX+N
 hqCTJNIWDh45bXl9hj2R/5XGptL+Wegrw46URkxu8ztHzKEX343qdfpvt52mPnh5
 xxMQxEeMTxZixfEMKIXz+OljVn1QlNw2U3hu8hfYiTSVKpMzcHnTgeRfPc4HOOV+
 UWxA1/1Rq7ZB51DILxCsZHB4+pgSsACw0GDUhKDvCSteXupFjmFLsr7AIfgrYy5L
 Jk2Oy1ZLOOvm7N6BBA0GVS323m/gXflZUsWYnkq1fNCKqO/FLm1hjQK/EWVX/9E9
 UTvUELcgwv1kbslSgtPYD3gnzTH7WfD6EkVTffTDZdSyXsdBI680ISNi8Tp0RSRz
 YGTMCknhwrcDvklJQU1LWsA5W66LUI4TKfTFuCq2SpBm1EHpgVc=
 =kSO2
 -----END PGP SIGNATURE-----

Merge tag 'soundwire-6.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire

Pull soundwire fix from Vinod Koul:

 - Single fix for calling fwnode_handle_put() on the
   returned fwnode pointer

* tag 'soundwire-6.10-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
  soundwire: fix usages of device_get_named_child_node()
2024-06-21 10:58:57 -07:00
Paolo Bonzini
e159d63e69 KVM/riscv fixes for 6.10, take #2
- Fix compilation for KVM selftests
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEZdn75s5e6LHDQ+f/rUjsVaLHLAcFAmZinVEACgkQrUjsVaLH
 LAegKw//WfhVURsh1jp0ubd4gSavsAaAPnT1jEyZGFe8e8MDMoqU3Yy4oVYsxYct
 C0Rd/r1tzcv/pfzclCai5DF9bddagDVpmGhwlKskWRmdY0lr6b3Bd4f2MYEuSgNn
 ENNpddyqqhxZcwBqRml6DKivAqqOXUto4bZgYX0eKnH7mMLveb0Ktfe2tLKbkPWk
 Ul9M/JP2ERzXiHSS5j88JB+Ka4FQFghSuZIJhJHg2nI+EFINgOCxGX+SqoT1KIRV
 0hbWQ1sa84IzMtOGuPf9+nzeY1XeEw6xGvIjG9I3AZ3rxiwbO8EJgGIxGqIXgJax
 z+DH8B70cEz28Vkz97jTYum6sZJEw5VWjmqaX8mauDoTwq/X3OL2Ur2TbQoFAs1j
 ht+jbxJZ4o876TwBIKhFTFfMe7VG3fvVEtpBClEYYM4Rv34G4ja9HaZt3ic8buMm
 dLIED8U32VunKeDL6Nbva1Suw1KW3OGRYlCRNU2AAPHZn/CXzOnylO9B/U9p7L1V
 d+2+jTtLb8Jm2BT4/RcagnD0uPHIFj3eavuLi2wUdZXneeP7K+TXmThS9dpDJaNV
 VhtJBrce5le2R4IeP6+7Zn07Rk5dcF5y6W7LsuCyyNTUK4tp2M+nKBWwZOPSYadk
 GZMpQTdsundJHlI7BcJJka0oTAw4h+N6ZHhKEfcWbFkXexRxVdI=
 =VDHV
 -----END PGP SIGNATURE-----

Merge tag 'kvm-riscv-fixes-6.10-2' of https://github.com/kvm-riscv/linux into HEAD

KVM/riscv fixes for 6.10, take #2

- Fix compilation for KVM selftests
2024-06-21 12:48:44 -04:00
Hannes Reinecke
0f1f580392 nvmet: make 'tsas' attribute idempotent for RDMA
The RDMA transport defines values for TSAS, but it cannot be changed as
we only support the 'connected' mode.
So to avoid errors during reconfiguration we should allow to write the
current value.

Fixes: 3f123494db ("nvmet: make TCP sectype settable via configfs")
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2024-06-21 08:49:10 -07:00
Hannes Reinecke
f80a55fa90 nvme: fixup comment for nvme RDMA Provider Type
PRTYPE is the provider type, not the QP service type.

Fixes: eb793e2c92 ("nvme.h: add NVMe over Fabrics definitions")
Signed-off-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2024-06-21 08:49:08 -07:00
Uwe Kleine-König
c45fcf46ca pwm: stm32: Refuse too small period requests
If period_ns is small, prd might well become 0. Catch that case because
otherwise with

	regmap_write(priv->regmap, TIM_ARR, prd - 1);

a few lines down quite a big period is configured.

Fixes: 7edf736920 ("pwm: Add driver for STM32 plaftorm")
Cc: stable@vger.kernel.org
Reviewed-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/b86f62f099983646f97eeb6bfc0117bb2d0c340d.1718979150.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
2024-06-21 16:39:34 +02:00
Ian Ray
bfc6444b57 gpio: pca953x: fix pca953x_irq_bus_sync_unlock race
Ensure that `i2c_lock' is held when setting interrupt latch and mask in
pca953x_irq_bus_sync_unlock() in order to avoid races.

The other (non-probe) call site pca953x_gpio_set_multiple() ensures the
lock is held before calling pca953x_write_regs().

The problem occurred when a request raced against irq_bus_sync_unlock()
approximately once per thousand reboots on an i.MX8MP based system.

 * Normal case

   0-0022: write register AI|3a {03,02,00,00,01} Input latch P0
   0-0022: write register AI|49 {fc,fd,ff,ff,fe} Interrupt mask P0
   0-0022: write register AI|08 {ff,00,00,00,00} Output P3
   0-0022: write register AI|12 {fc,00,00,00,00} Config P3

 * Race case

   0-0022: write register AI|08 {ff,00,00,00,00} Output P3
   0-0022: write register AI|08 {03,02,00,00,01} *** Wrong register ***
   0-0022: write register AI|12 {fc,00,00,00,00} Config P3
   0-0022: write register AI|49 {fc,fd,ff,ff,fe} Interrupt mask P0

Signed-off-by: Ian Ray <ian.ray@gehealthcare.com>
Link: https://lore.kernel.org/r/20240620042915.2173-1-ian.ray@gehealthcare.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-06-21 16:20:34 +02:00
Youling Tang
bd4da0462e bcachefs: Move the ei_flags setting to after initialization
`inode->ei_flags` setting and cleaning should be done after initialization,
otherwise the operation is invalid.

Fixes: 9ca4853b98 ("bcachefs: Fix quota support for snapshots")
Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2024-06-21 10:17:07 -04:00