Commit Graph

1090322 Commits

Author SHA1 Message Date
Matthew Wilcox (Oracle)
2ca456c248 filemap: Update the folio_mark_dirty documentation
The previous comment was not terribly helpful.  Be a bit more explicit
about the necessary locking environment.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
2022-05-08 14:45:56 -04:00
Matthew Wilcox (Oracle)
cd125eeab2 filemap: Update the folio_lock documentation
Add kernel-doc for several functions relating to take the folio lock.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
2022-05-08 14:45:56 -04:00
Miaohe Lin
65aa6b5a18 filemap: Remove obsolete comment in lock_page
We no longer need the page's inode pinned.  This comment dates back to
commit db37648cd6 ("[PATCH] mm: non syncing lock_page()") which added
lock_page_nosync().  That was removed by commit 7eaceaccab ("block:
remove per-queue plugging") which also made this comment obsolete.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:45:56 -04:00
Matthew Wilcox (Oracle)
84a1041c60 fs: Remove pagecache_write_begin() and pagecache_write_end()
These wrappers have no more users; remove them.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:45:56 -04:00
Matthew Wilcox (Oracle)
c5edd542aa i915: Call aops write_begin() and write_end() directly
pagecache_write_begin() and pagecache_write_end() are now trivial
wrappers, so call the aops directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:45:56 -04:00
Matthew Wilcox (Oracle)
6e0ee04465 f2fs: Call aops write_begin() and write_end() directly
pagecache_write_begin() and pagecache_write_end() are now trivial
wrappers, so call the aops directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:45:56 -04:00
Matthew Wilcox (Oracle)
1b0aa4449c ext4: Call aops write_begin() and write_end() directly
pagecache_write_begin() and pagecache_write_end() are now trivial
wrappers, so call the aops directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:45:56 -04:00
Matthew Wilcox (Oracle)
07a31f728d hfsplus: Call hfsplus_write_begin() and generic_write_end() directly
There is only one kind of write_begin/write_end aops, so we don't need
to look up which aop it is, just make hfsplus_write_begin() available to
this file and call it directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:45:56 -04:00
Matthew Wilcox (Oracle)
cfef1f7b39 hfs: Call hfs_write_begin() and generic_write_end() directly
There is only one kind of write_begin/write_end aops, so we don't need
to look up which aop it is, just make hfs_write_begin() available to
this file and call it directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:45:56 -04:00
Matthew Wilcox (Oracle)
652118b8c9 ntfs3: Remove fsdata parameter from ntfs_extend_initialized_size()
After the last patch, Smatch reports:

        fs/ntfs3/file.c:168 ntfs_extend_initialized_size()
        error: uninitialized symbol 'fsdata'.

fsdata is indeed unused.  This is not new, but Smatch couldn't see it
before because calls through pagecache_write_begin()/pagecache_write_end()
could theoretically call any implemention of ->write_begin/write_end,
some of which do use fsdata.  Now that the calls are direct, Smatch can
see they're never used.

Fix this by simply passing NULL.  While ntfs3 does pass this parameter
on to generic functions, those generic functions also never dereference
the fsdata parameter, so it's unnecessary to pass the address of a real
pointer.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
2022-05-08 14:40:32 -04:00
Matthew Wilcox (Oracle)
44ab23b9b3 ntfs3: Call ntfs_write_begin() and ntfs_write_end() directly
There is only one kind of write_begin/write_end aops, so we don't need to
look up which aop it is, just make ntfs_write_begin() and ntfs_write_end()
available to this file and call them directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:56 -04:00
Matthew Wilcox (Oracle)
27a7791344 namei: Call aops write_begin() and write_end() directly
pagecache_write_begin() and pagecache_write_end() are now trivial
wrappers, so call the aops directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:45 -04:00
Matthew Wilcox (Oracle)
53b524b83d buffer: Call aops write_begin() and write_end() directly
pagecache_write_begin() and pagecache_write_end() are now trivial
wrappers, so call the aops directly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
9d6b0cd757 fs: Remove flags parameter from aops->write_begin
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
8371f30cf7 fs: Remove aop flags parameter from nobh_write_begin()
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
b7446e7cf1 fs: Remove aop flags parameter from grab_cache_page_write_begin()
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
be3bbbc588 fs: Remove aop flags parameter from cont_write_begin()
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
b3992d1e2e fs: Remove aop flags parameter from block_write_begin()
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
de2a931150 fs: Remove aop_flags parameter from netfs_write_begin()
There are no more aop flags left, so remove the parameter.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
236d93c4bf fs: Remove AOP_FLAG_NOFS
With all users of this flag gone, we can stop testing whether it's set.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
832ee62d99 ext4: Use scoped memory APIs in ext4_write_begin()
Instead of setting AOP_FLAG_NOFS, use memalloc_nofs_save() and
memalloc_nofs_restore() to prevent GFP_FS allocations recursing
into the filesystem with a journal already started.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Theodore Ts'o <tytso@mit.edu>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
36d116e99d ext4: Use scoped memory APIs in ext4_da_write_begin()
Instead of setting AOP_FLAG_NOFS, use memalloc_nofs_save() and
memalloc_nofs_restore() to prevent GFP_FS allocations recursing
into the filesystem with a journal already started.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Theodore Ts'o <tytso@mit.edu>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
8f50c8b7ff ext4: Use scoped memory API in mext_page_double_lock()
Replace use of AOP_FLAG_NOFS with calls to memalloc_nofs_save()
and memalloc_nofs_restore().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Theodore Ts'o <tytso@mit.edu>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
7333ed3587 ext4: Allow GFP_FS allocations in ext4_da_convert_inline_data_to_extent()
Since commit 8bc1379b82, the transaction is stopped before calling
ext4_da_convert_inline_data_to_extent(), which means we can do GFP_FS
allocations and recurse into the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Acked-by: Theodore Ts'o <tytso@mit.edu>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
df8081801d f2fs: Convert f2fs_grab_cache_page() to use scoped memory APIs
Prevent GFP_FS allocations by using memalloc_nofs_save() instead
of AOP_FLAG_NOFS.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:19 -04:00
Matthew Wilcox (Oracle)
2d878178ba namei: Convert page_symlink() to use memalloc_nofs_save()
Stop using AOP_FLAG_NOFS in favour of the scoped memory API.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:18 -04:00
Matthew Wilcox (Oracle)
56f5746c41 namei: Merge page_symlink() and __page_symlink()
There are no callers of __page_symlink() left, so we can remove that
entry point.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christian Brauner <brauner@kernel.org>
2022-05-08 14:28:18 -04:00
Matthew Wilcox (Oracle)
a125d2aec3 ext4: Use page_symlink() instead of __page_symlink()
By using the memalloc_nofs_save() functionality, we can call
page_symlink(), safe in the knowledge that it won't recurse into the
filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2022-05-08 14:28:18 -04:00
Matthew Wilcox (Oracle)
5fb9bfe01c scsicam: Fix use of page cache
Convert scsicam to use a folio instead of a page.  There is no need to
check the error flag here; read_cache_folio() will return -EIO if the
folio cannot be read correctly.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
2022-05-08 14:28:18 -04:00
Linus Torvalds
379c726545 sound fixes for 5.18-rc6
It became slightly larger as I've been off in the last weeks.
 The majority of changes at this PR is about ASoC, the fixes for
 dmaengine and for for addressing issues reported by CI, as well as
 other device-specific small fixes.  Also, the fixes for FireWire
 core stack and the usual HD-audio quirks are included.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmJ3hcEOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE8CdQ//ag8hlpmBFBkvW++lUet3F3ynhPJ0CZo+v/0V
 roCVvvJleNn7XbWlniBfSWu2M47/kSvSslBfN2TjBHqsyJdAn4pKFGkiB0+uePTd
 NX8FKoxlxLZ5ItdbSfCXRzhJwNwxn9Xi/4SLprAL6ur3d/1NbRdhBV8i86M5lX3P
 4qYJFdxArD8gXMQEJFQvhtL+/D8RQdfYXoBY8TgP/0z6TVu/2sePH/F8AGPneVN3
 qZG/3tUzP3wYi8fWeBt0hVnFrw7T+hWXlChQSHv+tw7swenqWvGkmTQkSLqBwBI6
 cpkZAgiVbt6UNv6k83l5xPs9ohiF/0x2F1sJn0YWca0fnvwPIG9QcMBpaA27xlL1
 TiGTsZiN9/L8lykcBiFERjs4Z7KwSsRaI87ZMl4DLPji3Udk6u1pC7wW5zfUyteQ
 cMM6vB++ZNiqKwm3YezK2zd1IZMUBnHNUVPHsVTFIdN5bAL3C3e1Zihp8Sqe1Q8p
 2cgICDqILxmAMGQ1nMRnFaCCK7UL32E0t+ZD2Q+L16+yigejNxZjtqv+IePAGZ5e
 m0WaWYDS1EG9zodYrml12d6M6sdlPxd/FBRSpJAyQsBBa9ydp+7VbiSvX5yCWbQg
 4WX6fZH82RcxuavKEBr1GEcq4/3wQc7C6Bhqkr4HCzLQpS4HJGNlLnyB3sHiFpwX
 Rcatl1g=
 =p7DB
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This became slightly larger as I've been off in the last weeks.

  The majority of changes here is about ASoC, fixes for dmaengine
  and for addressing issues reported by CI, as well as other
  device-specific small fixes.

  Also, fixes for FireWire core stack and the usual HD-audio quirks
  are included"

* tag 'sound-5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits)
  ASoC: SOF: Fix NULL pointer exception in sof_pci_probe callback
  ASoC: ops: Validate input values in snd_soc_put_volsw_range()
  ASoC: dmaengine: Restore NULL prepare_slave_config() callback
  ASoC: atmel: mchp-pdmc: set prepare_slave_config
  ASoC: max98090: Generate notifications on changes for custom control
  ASoC: max98090: Reject invalid values in custom control put()
  ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
  ALSA: hda/realtek: Add quirk for Yoga Duet 7 13ITL6 speakers
  firewire: core: extend card->lock in fw_core_handle_bus_reset
  firewire: remove check of list iterator against head past the loop body
  firewire: fix potential uaf in outbound_phy_packet_callback()
  ASoC: rt9120: Correct the reg 0x09 size to one byte
  ALSA: hda/realtek: Enable mute/micmute LEDs support for HP Laptops
  ALSA: hda/realtek: Fix mute led issue on thinkpad with cs35l41 s-codec
  ASoC: meson: axg-card: Fix nonatomic links
  ASoC: meson: axg-tdm-interface: Fix formatters in trigger"
  ASoC: soc-ops: fix error handling
  ASoC: meson: Fix event generation for G12A tohdmi mux
  ASoC: meson: Fix event generation for AUI CODEC mux
  ASoC: meson: Fix event generation for AUI ACODEC mux
  ...
2022-05-08 10:10:51 -07:00
Willy Tarreau
2e3afb42dd blk-mq: remove the error_count from struct request
The last two users were floppy.c and ataflop.c respectively, it was
verified that no other drivers makes use of this, so let's remove it.

Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Cc: Minh Yuan <yuanmingbuaa@gmail.com>
Cc: Denis Efremov <efremov@linux.com>,
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-05-08 10:01:48 -07:00
Willy Tarreau
f3b10a3c22 ataflop: use a statically allocated error counters
This is the last driver making use of fd_request->error_count, which is
easy to get wrong as was shown in floppy.c.  We don't need to keep it
there, it can be moved to the atari_floppy_struct instead, so let's do
this.

Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Cc: Minh Yuan <yuanmingbuaa@gmail.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-05-08 10:01:48 -07:00
Willy Tarreau
f71f01394f floppy: use a statically allocated error counter
Interrupt handler bad_flp_intr() may cause a UAF on the recently freed
request just to increment the error count.  There's no point keeping
that one in the request anyway, and since the interrupt handler uses a
static pointer to the error which cannot be kept in sync with the
pending request, better make it use a static error counter that's reset
for each new request.  This reset now happens when entering
redo_fd_request() for a new request via set_next_request().

One initial concern about a single error counter was that errors on one
floppy drive could be reported on another one, but this problem is not
real given that the driver uses a single drive at a time, as that
PC-compatible controllers also have this limitation by using shared
signals.  As such the error count is always for the "current" drive.

Reported-by: Minh Yuan <yuanmingbuaa@gmail.com>
Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Tested-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2022-05-08 10:01:48 -07:00
Takashi Iwai
ac02e3cd5a ASoC: Fixes for v5.18
A larger collection of fixes than I'd like, mainly because mixer-test
 is making it's way into the CI systems and turning up issues on a wider
 range of systems.  The most substantial thing though is a revert and an
 alternative fix for a dmaengine issue where the fix caused disruption
 for some other configurations, the core fix is backed out an a driver
 specific thing done instead.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmJqduYACgkQJNaLcl1U
 h9BpLQf+Il8MGBeIsS5j4WVqOeoQLaptRQKWSTtLm7HJIs0Npbc8eulArMea7OrH
 gYB0EGhIPowkVWy2SdPv6QVH8U9DlokF22Y3W/DVjaZzYqAN4mWHcWEeGdGVDH4i
 gvjny3lXaoSKHyDUGNyomo1JbF1g7hBCT9Ph30Kcq6h62BVjcZzOmcu2xSN4RCEi
 OmA0XF7jfubXqCZqoXuxrCcltSpFhz2zmqq7ieR1Kog5YWgNWWGUjns+U4dpkdVI
 iGtmOO5v/umGWTc/zXsNBLBiG3mQV8G7+OI7SkgaylFhuNcUoiu6bAt0m+meFroM
 d8Wj9wwizxHuzuF16hwJYPacR4KTvg==
 =FTRS
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v5.18-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.18

A larger collection of fixes than I'd like, mainly because mixer-test
is making it's way into the CI systems and turning up issues on a wider
range of systems.  The most substantial thing though is a revert and an
alternative fix for a dmaengine issue where the fix caused disruption
for some other configurations, the core fix is backed out an a driver
specific thing done instead.
2022-05-08 10:49:25 +02:00
Linus Torvalds
30c8e80f79 gpio fixes for v5.18-rc6
- fix the bounds check for the 'gpio-reserved-ranges' device property in
   gpiolib-of
 - drop the assignment of the pwm base number in gpio-mvebu (this was missed
   by the patch doing it globally for all pwm drivers)
 - fix the fwnode assignment (use own fwnode, not the parent's one) for the
   GPIO irqchip in gpio-visconti
 - update the irq_stat field before checking the trigger field in gpio-pca953x
 - update GPIO entry in MAINTAINERS
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmJ2eScACgkQEacuoBRx
 13IH+BAAw/BO7UPhXEt3nopcOxkE5C/svpDfPDmVTm/Oh0TmdcIx0YMQAl86eLAY
 C1jXER45ZTJ9MfyL+TtRcad+wGMIeNE74Z6vOvBXX4nMzVRtoFMPhN9hXdHXReU/
 Zw6u5VLmm35oVw3GR8WbZLS+hmpXjmzgQAIfFhf7MoshDg4TP7SnX+56SboGoLVz
 EAJ61OrxRkhOkNYX/1XV/YU23FGfKQfoQre7uL/YhLQlaScLe3Tn4l9EVATMIC0j
 2PMZN8jsVmOuK4TQx1mYRP3XBARWx78ucwqplzG10xz3PHVhlzO42s6UKyDDm3B9
 2dL1xmUSKK38oh1UIvWd+qTB5rBlc3DN0e2yP8v9FQIgBOb3SvaZOXpyXtnFal9G
 TyTfBplT1KYrW3q9++xDIacnaXwZVFOCqDJ3w73w1V9G9Nx4mIm4iW9ft70WDxhc
 mtXBsFYpZV+FiAEFaZdxXhmz8JSxbg1tLsAdjA1lwBWvD29cUdgwM2KWn3eQdQeN
 k7UCBL1xVxliHijVD699id+yONmv3ASQ9j4VeTzriL9YyiRyZTpwtepvvvlbchQd
 wS5ntAd1Kr/4PkSAe90XX/ZmpsADa/8wjMiYymggGu1okoEVaRNW4/cx1zESkOIo
 Zdo27nry+8VwFiQUWc55glzKuvpJTHIfiLB/Sm0nQ4U9qkxW7sA=
 =zA/m
 -----END PGP SIGNATURE-----

Merge tag 'gpio-fixes-for-v5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio fixes from Bartosz Golaszewski:

 - fix the bounds check for the 'gpio-reserved-ranges' device property
   in gpiolib-of

 - drop the assignment of the pwm base number in gpio-mvebu (this was
   missed by the patch doing it globally for all pwm drivers)

 - fix the fwnode assignment (use own fwnode, not the parent's one) for
   the GPIO irqchip in gpio-visconti

 - update the irq_stat field before checking the trigger field in
   gpio-pca953x

 - update GPIO entry in MAINTAINERS

* tag 'gpio-fixes-for-v5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
  gpio: pca953x: fix irq_stat not updated when irq is disabled (irq_mask not set)
  gpio: visconti: Fix fwnode of GPIO IRQ
  MAINTAINERS: update the GPIO git tree entry
  gpio: mvebu: drop pwm base assignment
  gpiolib: of: fix bounds check for 'gpio-reserved-ranges'
2022-05-07 11:02:02 -07:00
Linus Torvalds
8967605e7d block-5.18-2022-05-06
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmJ10nMQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpmkYD/9vfbQhyxrDH/GfKua18QmfQARphw6Ihegc
 NSVjJ38dohNiLekNKgTmquWtVl/s6g/roa0+zzUF66eML/6SnKRoVZHh6cJ5Vopk
 lpj6Pzb6COu+Vo7lWysDHCT4g2iYr6MaAgKKFrsVG6PkQ1vSxx2w6nQwInDHY2hG
 4YL+NM8ID5SHzmfr9XYpAkDu6XoU1rVpq+JnZPzejWHUUwxMYMcNmLjZio/ysE6G
 0NrW4LXmu1gJxv4+9betVjNin5CU7LLhxdigSTs/nGlqi9I9lq02tWLhUw7swTD3
 xWReoxsKWzRzLB2Nb5lsERrv37XKSghkLuQkoa+gtr7wTfvUCZKePBrZ/BE0VzYf
 bnXaFA0gOa/H4P2AB68ZB8WaNhxtYZsW2PXDei4ramUFlPkyKstwAKxF2ViiBHKC
 VrR2aQ82VUm2b3iY1QnbxVAuiPLGT/t4RFJyaiFbA5dzEyd3ofMUTTz7m62K4khQ
 HlQLwl4jN+vVmDsvNr5zb1N1xZaChiyDJPGqofGAWbAWjdBsEuTt644mnn341/3r
 VluH+Eswkvi6SMn990QbI3TmqWWmyzUc7DafrK2V3mKlUu9swch34fFV5arU0xSJ
 7bJ+vL75U5A8NWCOOLML2BPX9L4gVIpaKg0PHQ+Rhlc0/STQdaXa0TgrUVNB8YMS
 O4ubYf/raA==
 =zQyX
 -----END PGP SIGNATURE-----

Merge tag 'block-5.18-2022-05-06' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "A single revert for a change that isn't needed in 5.18, and a small
  series for s390/dasd"

* tag 'block-5.18-2022-05-06' of git://git.kernel.dk/linux-block:
  s390/dasd: Use kzalloc instead of kmalloc/memset
  s390/dasd: Fix read inconsistency for ESE DASD devices
  s390/dasd: Fix read for ESE with blksize < 4k
  s390/dasd: prevent double format of tracks for ESE devices
  s390/dasd: fix data corruption for ESE devices
  Revert "block: release rq qos structures for queue without disk"
2022-05-07 10:47:51 -07:00
Linus Torvalds
b366bd7d96 io_uring-5.18-2022-05-06
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmJ10okQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgprhNEADcc6I72dvyd5RVh0bAfWIVlk4QUStGG5rf
 AP+DdefmQBZaipjdkZ3MRUJ5brr7BD2Ioizo6vShDq5uymfWVS5EP3vKYkLSrBO1
 7cmPtNG1qEwnwNEVtDDKKrZwFe5qM/3ayrlBcGQG3SNSLhYe44+Plc3TmrFNzCSi
 bTHphi06+iBujBG/o3G1mlo307Y9GJboxGEEVUkzyvUZ2wB+NLMAJ04fpSrMPGIa
 be/Y2PLcM4FOlM8HnUEcjfjQUuygBW7iarcGZyckkfKJOMkRcHwMvl9Z3Dyi4byH
 srBn2KQINlsLOVbn4q0U76dgqHlJ1lpARNHuDOEBp5DbcF2XX/ZrEaBmLFD1LNpb
 0U+uZ9H82lBj2bH5iaz4se2/oGbhAlo77eGGshSMzlLE9BVd62JBmdIqYJhNlgxi
 CKM2WZZJAJSS4ftiSyJIkZ0ty1iM3vgvj0sbLe7gIZYpu9MhIUVICESXTim2VCd4
 lAJtKJTIL2ad//WLgfTRWzSUOVCzQIpOMezIkz4lJWFZ+xOh8WBl5l7wXvVb21Ld
 JHOXcq/OFZJfEIRE2k0qWzQPjqOohwASDi5hI3ceNM2ZjjgmDtZmcdgajT9u4KFl
 q9dLW6e5DdMAIjAOne/1mVnq38xj4jhrV3rtIAcjU4ESXUACTThThbLUcRNzEz+4
 Hpo1FNnltQ==
 =1wM2
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-5.18-2022-05-06' of git://git.kernel.dk/linux-block

Pull io_uring fix from Jens Axboe:
 "Just a single file assignment fix this week"

* tag 'io_uring-5.18-2022-05-06' of git://git.kernel.dk/linux-block:
  io_uring: assign non-fixed early for async work
2022-05-07 10:41:41 -07:00
Linus Torvalds
4b97bac075 for-5.18-rc5-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmJ1X+YACgkQxWXV+ddt
 WDs75g/8DsrDBe/Sbn/bDLRw30D0StC5xRhaVJLNcAhSfIyyoBo0EKifd2nXdNSn
 rdc3pvRToPh2X1YQ/5FmtxuYW12N4pVOfWtXKdoFFXabMVJetDBSnS8KNzxBd9Ys
 OkiKj2qb8H+1uNwWVLxfbFBNWWPyCQLe/2DDmePxOAszs4YUPvwxffyA8oclyHb5
 wW0qOJAC76Lz6y5Wo/GJrtAdlvWwb3t8+IDUKgGPT1BEIOE/fna+MhvEwqvCdY9F
 PPU5sWIXkAv3addgrcBHVX5HdAzRC0jAv2lHsttfu4dEOmTzw8dCTUh/IzSRa3fj
 IVy7AIGR+ZR++d4tOhAEZBe1KAqntY3UVmXY19cKTHOLLWFjv4XkKw8KJzsDiHUt
 rczedAFdgRRo9QIgwSsAU9Zi8DSG56BSenxsqFzqiL5BDDX1bUFXCegNYR42GfB/
 8E89eYkBCXxP6XeA1+44EOalCdqLKuQOyEijTUxn0UDGdqHHB1Gd/IUQDU5fpCqo
 kX6gdgMhNmjGJ/zETfOdFrYZaHYJUiiIRc6z8SCgM3JIPBgVw0FAa99Hs8Pl+eJn
 idmpfnHn6Xvmq46FISVRWgolkuj7VzTEOM65rNgOY3889Vk9Qt2qjI/DvYPGDs9Y
 9PQI1FY+2E+ZqbNY8dZpXDii+6y36aAmGR1B10x3545+C36CA/0=
 =S4KK
 -----END PGP SIGNATURE-----

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

Pull btrfs fixes from David Sterba:
 "Regression fixes in zone activation:

   - move a loop invariant out of the loop to avoid checking space
     status

   - properly handle unlimited activation

  Other fixes:

   - for subpage, force the free space v2 mount to avoid a warning and
     make it easy to switch a filesystem on different page size systems

   - export sysfs status of exclusive operation 'balance paused', so the
     user space tools can recognize it and allow adding a device with
     paused balance

   - fix assertion failure when logging directory key range item"

* tag 'for-5.18-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: sysfs: export the balance paused state of exclusive operation
  btrfs: fix assertion failure when logging directory key range item
  btrfs: zoned: activate block group properly on unlimited active zone device
  btrfs: zoned: move non-changing condition check out of the loop
  btrfs: force v2 space cache usage for subpage mount
2022-05-06 14:32:16 -07:00
Linus Torvalds
adcffc1716 NFS client bugfixes for Linux 5.18
Highlights include:
 
 Stable fixes:
 - Fix a socket leak when setting up an AF_LOCAL RPC client
 - Ensure that knfsd connects to the gss-proxy daemon on setup
 
 Bugfixes:
 - Fix a refcount leak when migrating a task off an offlined transport
 - Don't gratuitously invalidate inode attributes on delegation return
 - Don't leak sockets in xs_local_connect()
 - Ensure timely close of disconnected AF_LOCAL sockets
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEESQctxSBg8JpV8KqEZwvnipYKAPIFAmJ1f3wACgkQZwvnipYK
 APKKIRAAmVUswcfRQ9wSz5wW6DCFU9hdsN9JD4pAcPvWAYGo8fqmn3I3qe/iaBCf
 rrJF38SfQVygtthmAY4CBBwOiVxm2fvqanML2lta+ZUU15MqoH2px3kMYemRyulJ
 9/2yP25AUSgkmwdEmm69hIXJkEJa3dsjg+LajQZ5X01DgKSfpObS5s9t/upM9kve
 Wqz5QRr+aJnZuuYYJWxNmXZ4XQEkzHccg3aSswB6bEsEGNXKo8NnWryrSMnWTW1y
 rQCb0e+gxpoVFgV3ngP1r9xT2l2ISbJIIhTPoj5hSjSVlFvQlIEyHtGA2vuIEZH9
 hPJAnaSc7Xb+QER6XfZkTxjW+jtMl5OmMKkWUcUmHiYv2KIM8dUAd3ANnbDBCUvw
 C5bGF907Qjqs5d2VdfsbisT9ikyn+xw6SFxcr9HYyH2T3dIsC1A8P9uUvn/afwUQ
 EPfQIsIEDeufo6O8KLfF+gCO9kbk9rdaP8Bv3B2H94aRs1yYde9bJpa7QABncGbA
 otWehkX/AbrIa4Zjp1ELzcVJxlIl+/AtxzCdGY2me1Ds388U/RKsyDWwXuGynLP6
 98ycdtHWVyoJ48L5kZowuj8/3tEB998En5hh0HSuAd0DYkAuGxaSGb+iuwKi/M0H
 +D1wZxef49r2ggQkEOsllTEjJKSHcq1+vCVASZ8ITEbcVUSiO90=
 =LSoH
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-5.18-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client fixes from Trond Myklebust:
 "Highlights include:

  Stable fixes:

   - Fix a socket leak when setting up an AF_LOCAL RPC client

   - Ensure that knfsd connects to the gss-proxy daemon on setup

  Bugfixes:

   - Fix a refcount leak when migrating a task off an offlined transport

   - Don't gratuitously invalidate inode attributes on delegation return

   - Don't leak sockets in xs_local_connect()

   - Ensure timely close of disconnected AF_LOCAL sockets"

* tag 'nfs-for-5.18-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  Revert "SUNRPC: attempt AF_LOCAL connect on setup"
  SUNRPC: Ensure gss-proxy connects on setup
  SUNRPC: Ensure timely close of disconnected AF_LOCAL sockets
  SUNRPC: Don't leak sockets in xs_local_connect()
  NFSv4: Don't invalidate inode attributes on delegation return
  SUNRPC release the transport of a relocated task with an assigned transport
2022-05-06 13:19:11 -07:00
Linus Torvalds
bce58da1f3 x86:
* Account for family 17h event renumberings in AMD PMU emulation
 
 * Remove CPUID leaf 0xA on AMD processors
 
 * Fix lockdep issue with locking all vCPUs
 
 * Fix loss of A/D bits in SPTEs
 
 * Fix syzkaller issue with invalid guest state
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmJ1Vf4UHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroNaUQgAgygZ2KsejlJCYGtEkAsjcpdzmPVL
 8j42nWB673/PLZ6GrDXcFnRwQaBIT+0YrES5VHTkTI996d2T/yHII2L4G3DQtUGm
 6L3qYqrjJlX2WjbYGvYzkJ6m4EzcstUfPYNO2Qzfvbl2y/wz64HlAhNdymwMX2UU
 GPUVoo3EHeobJdZVKFMe7eI6r/uY1/uPdsKqNjnlWI73op+tc7mMRN5+SlQDgQvR
 kmzw+Nk0J+PERQO+D+fm1vUdXDQ8hiI7LtTBIUX7rf47IqVlHNHC8frC94PX3W3E
 l2sVS+LzRQRqCgFgQ2ay2gYkl078VL8z4A6vWpcWSmaToEYE7VcAnHqb0Q==
 =6gt2
 -----END PGP SIGNATURE-----

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

Pull kvm fixes from Paolo Bonzini:
 "x86:

   - Account for family 17h event renumberings in AMD PMU emulation

   - Remove CPUID leaf 0xA on AMD processors

   - Fix lockdep issue with locking all vCPUs

   - Fix loss of A/D bits in SPTEs

   - Fix syzkaller issue with invalid guest state"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: VMX: Exit to userspace if vCPU has injected exception and invalid state
  KVM: SEV: Mark nested locking of vcpu->lock
  kvm: x86/cpuid: Only provide CPUID leaf 0xA if host has architectural PMU
  KVM: x86/svm: Account for family 17h event renumberings in amd_pmc_perf_hw_id
  KVM: x86/mmu: Use atomic XCHG to write TDP MMU SPTEs with volatile bits
  KVM: x86/mmu: Move shadow-present check out of spte_has_volatile_bits()
  KVM: x86/mmu: Don't treat fully writable SPTEs as volatile (modulo A/D)
2022-05-06 11:42:58 -07:00
Linus Torvalds
497fe3bb19 RISC-V Fix for 5.18-rc6
* A fix to relocate the DTB early in boot, in cases where the bootloader
   doesn't put the DTB in a region that will end up mapped by the kernel.
   This manifests as a crash early in boot on a handful of
   configurations.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEAM520YNJYN/OiG3470yhUCzLq0EFAmJ1TjQTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRDvTKFQLMurQQLmD/4477/Ax+QlHXJ4stM1m4VaXybzJ1qb
 gvjsV/xnOwwLcQU6683B6mm0LQ+LGXfJHwveYwMQs1dsoWEeOjmwpadO5qjfNv55
 dbJh/9QtS4BYWHBySvumU2hv3Wyn4kO+7f/bLoxgIR0CupMBslTdP1oo8jFQeHBt
 bL/wWUU/MVEg9FAB0t2cSkaJVcxvCkyRk5MYJUok2eHedTpwOwtIGTnSpv00EA8z
 V1aDN3Y8MJuqRVSsbN/hGCKB1WrKkP5K7qxnvp5tH+68G3t30zc5NvVtrH+VZNiT
 YTod4kf5Y3JlekboNz17O/WDP3BjpP5QBga9K7m64de9vSZjiEtM4Ze4i3A/C1xe
 Z/LaizIy1H+1ehA3tWPQH6MwLFVUx4XNVWPQfDhAGtAyXTA5Epl028V9mvvUClfg
 l63f9cWEEGsy2DVg9kU9MfzNdro5iJARL/pYUFQCyoEiUQIkl7E1Eh9XXqQwIozK
 3rhvRL9DbELYTK65xKUXwBZcnuCBgUPNQvf7/AZ02qPMQzmy+NlWQLKYQvEYCH5U
 IbYV0LCwpYAi2tdxgkzv7wkI86m5NLtRRKeD/eZLMEozlkkxVtq1fPeVXTDA2d8N
 RdsF16H9CW9Bdf+COyhR4xn2IpxqSV/aVOsjYA0F87D5GUJk+AQp4w7Pm2NdH2fb
 yw8HwqrnD8+66A==
 =JBfr
 -----END PGP SIGNATURE-----

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

Pull RISC-V fix from Palmer Dabbelt:

 - A fix to relocate the DTB early in boot, in cases where the
   bootloader doesn't put the DTB in a region that will end up
   mapped by the kernel.

   This manifests as a crash early in boot on a handful of
   configurations.

* tag 'riscv-for-linus-5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  RISC-V: relocate DTB if it's outside memory region
2022-05-06 11:30:59 -07:00
Sean Christopherson
053d2290c0 KVM: VMX: Exit to userspace if vCPU has injected exception and invalid state
Exit to userspace with an emulation error if KVM encounters an injected
exception with invalid guest state, in addition to the existing check of
bailing if there's a pending exception (KVM doesn't support emulating
exceptions except when emulating real mode via vm86).

In theory, KVM should never get to such a situation as KVM is supposed to
exit to userspace before injecting an exception with invalid guest state.
But in practice, userspace can intervene and manually inject an exception
and/or stuff registers to force invalid guest state while a previously
injected exception is awaiting reinjection.

Fixes: fc4fad79fc ("KVM: VMX: Reject KVM_RUN if emulation is required with pending exception")
Reported-by: syzbot+cfafed3bb76d3e37581b@syzkaller.appspotmail.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220502221850.131873-1-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-06 13:08:06 -04:00
Peter Gonda
0c2c7c0692 KVM: SEV: Mark nested locking of vcpu->lock
svm_vm_migrate_from() uses sev_lock_vcpus_for_migration() to lock all
source and target vcpu->locks. Unfortunately there is an 8 subclass
limit, so a new subclass cannot be used for each vCPU. Instead maintain
ownership of the first vcpu's mutex.dep_map using a role specific
subclass: source vs target. Release the other vcpu's mutex.dep_maps.

Fixes: b56639318b ("KVM: SEV: Add support for SEV intra host migration")
Reported-by: John Sperbeck<jsperbeck@google.com>
Suggested-by: David Rientjes <rientjes@google.com>
Suggested-by: Sean Christopherson <seanjc@google.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Hillf Danton <hdanton@sina.com>
Cc: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Peter Gonda <pgonda@google.com>

Message-Id: <20220502165807.529624-1-pgonda@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2022-05-06 13:08:04 -04:00
Linus Torvalds
4df22ca85d v5.18 second rc pull request
A few recent regressions in rxe's multicast code, and some old driver
 bugs:
 
 - Error case unwind bug in rxe for rkeys
 
 - Dot not call netdev functions under a spinlock in rxe multicast code
 
 - Use the proper BH lock type in rxe multicast code
 
 - Fix idrma deadlock and crash
 
 - Add a missing flush to drain irdma QPs when in error
 
 - Fix high userspace latency in irdma during destroy due to
   synchronize_rcu()
 
 - Rare race in siw MPA processing
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRRRCHOFoQz/8F5bUaFwuHvBreFYQUCYnUqeQAKCRCFwuHvBreF
 Yf58AQCNUQZlmEiuBid6WxggXPW/MM5sxJdOqZeX+Ddbmm7swAEAidtoVBILozLC
 ltd8+P8qNdccqOZDatgqYYSpXUfHIA4=
 =Idcg
 -----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:
 "A few recent regressions in rxe's multicast code, and some old driver
  bugs:

   - Error case unwind bug in rxe for rkeys

   - Dot not call netdev functions under a spinlock in rxe multicast
     code

   - Use the proper BH lock type in rxe multicast code

   - Fix idrma deadlock and crash

   - Add a missing flush to drain irdma QPs when in error

   - Fix high userspace latency in irdma during destroy due to
     synchronize_rcu()

   - Rare race in siw MPA processing"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
  RDMA/rxe: Change mcg_lock to a _bh lock
  RDMA/rxe: Do not call  dev_mc_add/del() under a spinlock
  RDMA/siw: Fix a condition race issue in MPA request processing
  RDMA/irdma: Fix possible crash due to NULL netdev in notifier
  RDMA/irdma: Reduce iWARP QP destroy time
  RDMA/irdma: Flush iWARP QP if modified to ERR from RTR state
  RDMA/rxe: Recheck the MR in when generating a READ reply
  RDMA/irdma: Fix deadlock in irdma_cleanup_cm_core()
  RDMA/rxe: Fix "Replace mr by rkey in responder resources"
2022-05-06 09:50:25 -07:00
Linus Torvalds
64267926e0 MMC core:
- Fix initialization for eMMC's HS200/HS400 mode
 
 MMC host:
  - sdhci-msm: Reset GCC_SDCC_BCR register to prevent timeout issues
  - sunxi-mmc: Fix DMA descriptors allocated above 32 bits
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmJ03rAXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjClX4g/+Ns6zYVW+5SIXGyNlN/vItwUo
 QaRdCJwUWuDsvXUpEczzpUMsLuzVuFnyaThnxqBwN6aSCtp79rMcyNH6Rjorq1d/
 HVnL36kw4n5LLIC4yD/q8KraTX1xS64qUEf4hy9XhjzMl61pGAmtYID7Z20UJBAs
 N6CNRrILgu6A+Hzp7Ezj01CEGYQnHFKvcXMz1NHZX/KpsdiSQBXdcg9uFgNK3Z1A
 pxAnoiJVPa67Ksa2pqTh8UHqWTfoMRo2MoF+JomUtbvyxJpUCfB7+wAa895VEqAP
 +QAvwfBm4K90WLIp7rh2QBDwYav2pugc/dvE0kfO7AiWCczTS/PjH1OTThDH9WR9
 HzSdbLeW49NcdAuP6X8YvrqTTA0NP3xzw5T+531gbutlGZIkuimnlUGhaHghk5/p
 tQfizA1QwBBAKLM7kXlkM9Nm512zgnBtdG3yApgJVyLvTO39eU/n4rpNkSJ8dlOM
 36WaQbC8DzwPo8bEoQNHfD7R76JjcdxwVPGcpWgTkYWSMkBQ+mAU/u9N9vmKM3+q
 XtDpsVa6DMqaLn1QgFSjxadgwl7dkQ3XJkLfjHk3O8u+UOs5zPh7rbMfv6onO8C6
 bo0YvDZSrYeqwUNPnaoZXiKj1vzPGVRszbvSmpyBYR6XyoVDGue4HL883Ewn/d3w
 c9anAC4yp1I7AXPQJTE=
 =G+HD
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull mmc fixes from Ulf Hansson:
 "MMC core:

   - Fix initialization for eMMC's HS200/HS400 mode

  MMC host:

   - sdhci-msm: Reset GCC_SDCC_BCR register to prevent timeout issues

   - sunxi-mmc: Fix DMA descriptors allocated above 32 bits"

* tag 'mmc-v5.18-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
  mmc: sdhci-msm: Reset GCC_SDCC_BCR register for SDHC
  mmc: sunxi-mmc: Fix DMA descriptors allocated above 32 bits
  mmc: core: Set HS clock speed before sending HS CMD13
2022-05-06 09:45:44 -07:00
Linus Torvalds
5fa576d7f0 drm fixes for 5.18-rc6
fbdev:
 - hotunplugging fix
 
 amdgpu:
 - Fix a xen dom0 regression on APUs
 - Fix a potential array overflow if a receiver were to
   send an erroneous audio channel count
 
 msm:
 - lockdep fix.
 
 it6505:
 - kconfig fix
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmJ0nIoACgkQDHTzWXnE
 hr5BVxAAlTPqazcayV1T2cTEWeTjPD39D3t+WMP+hNy7aEgRa0LBHYdciRWx4gLx
 4ddu0VutlCtlUC2bnhQNPfJ7hbcStCvcsu5tRaIk9JwhcngwjAWFCc0sWDQwU2OK
 7OILBAFMd5t4fA+YxfySykI1pIQUGFB9QMGWakPV1xPKo2oyyJbPxpGcQcZXjp5Z
 myKnfM2LaG+7gyCrgizh9218vei7XSVbwcKHW2rHA5002kthb0K1rH+Q7sSuRbiW
 ozZgC7RrdGwpu/iz3oGDef8b9AJv3JQgL87FE9LqetAV9F7t3tc9y8WzM50PJh4u
 Q/AKj9xRo/NxDwBKvn/YeL/7UgQyA+Ob0sQr/ObqMXcowvDWP0gCTxySkLEzS9tv
 WuE6w3qLJ9GHHiMI8BUYtKGuFC5/E4sLqXhL2hUiFq7yQXWokL/ocAp7RYBh6ls9
 2uBWWCEIv9MJ/vV23kMAg8sdqk4nvAVUtucp0z3Ee7w0Vt3v0YMtOhxXoD42Qg/w
 eg/gMo39BgEKJsvFv5OQcRzGi5Sm9VKm9uAQN97dMEoe3tJPs7udCMehKwVebGBa
 z6M1ch+qoIydFdVU1mPBqsmtHSPPlpfmRYVx6TY656RE/eanlVB76qUDBr5J2Ulw
 yMjLPdyqRfTUwXatAqF9eBv9RRmb3xdX9iKkhEsAFf8jXKgJFbs=
 =Ak9r
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2022-05-06' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "A pretty quiet week, one fbdev, msm, kconfig, and two amdgpu fixes,
  about what I'd expect for rc6.

  fbdev:

   - hotunplugging fix

  amdgpu:

   - Fix a xen dom0 regression on APUs

   - Fix a potential array overflow if a receiver were to send an
     erroneous audio channel count

  msm:

   - lockdep fix.

  it6505:

   - kconfig fix"

* tag 'drm-fixes-2022-05-06' of git://anongit.freedesktop.org/drm/drm:
  drm/amd/display: Avoid reading audio pattern past AUDIO_CHANNELS_COUNT
  drm/amdgpu: do not use passthrough mode in Xen dom0
  drm/bridge: ite-it6505: add missing Kconfig option select
  fbdev: Make fb_release() return -ENODEV if fbdev was unregistered
  drm/msm/dp: remove fail safe mode related code
2022-05-06 09:33:28 -07:00
Puyou Lu
dba7857985 gpio: pca953x: fix irq_stat not updated when irq is disabled (irq_mask not set)
When one port's input state get inverted (eg. from low to hight) after
pca953x_irq_setup but before setting irq_mask (by some other driver such as
"gpio-keys"), the next inversion of this port (eg. from hight to low) will not
be triggered any more (because irq_stat is not updated at the first time). Issue
should be fixed after this commit.

Fixes: 89ea8bbe9c ("gpio: pca953x.c: add interrupt handling capability")
Signed-off-by: Puyou Lu <puyou.lu@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-05-06 16:59:29 +02:00
Haowen Bai
f1c8781ac9 s390/dasd: Use kzalloc instead of kmalloc/memset
Use kzalloc rather than duplicating its implementation, which
makes code simple and easy to understand.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20220505141733.1989450-6-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-05-05 20:08:27 -06:00
Jan Höppner
b9c10f68e2 s390/dasd: Fix read inconsistency for ESE DASD devices
Read requests that return with NRF error are partially completed in
dasd_eckd_ese_read(). The function keeps track of the amount of
processed bytes and the driver will eventually return this information
back to the block layer for further processing via __dasd_cleanup_cqr()
when the request is in the final stage of processing (from the driver's
perspective).

For this, blk_update_request() is used which requires the number of
bytes to complete the request. As per documentation the nr_bytes
parameter is described as follows:
   "number of bytes to complete for @req".

This was mistakenly interpreted as "number of bytes _left_ for @req"
leading to new requests with incorrect data length. The consequence are
inconsistent and completely wrong read requests as data from random
memory areas are read back.

Fix this by correctly specifying the amount of bytes that should be used
to complete the request.

Fixes: 5e6bdd37c5 ("s390/dasd: fix data corruption for thin provisioned devices")
Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20220505141733.1989450-5-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-05-05 20:08:27 -06:00
Jan Höppner
cd68c48ea1 s390/dasd: Fix read for ESE with blksize < 4k
When reading unformatted tracks on ESE devices, the corresponding memory
areas are simply set to zero for each segment. This is done incorrectly
for blocksizes < 4096.

There are two problems. First, the increment of dst is done using the
counter of the loop (off), which is increased by blksize every
iteration. This leads to a much bigger increment for dst as actually
intended. Second, the increment of dst is done before the memory area
is set to 0, skipping a significant amount of bytes of memory.

This leads to illegal overwriting of memory and ultimately to a kernel
panic.

This is not a problem with 4k blocksize because
blk_queue_max_segment_size is set to PAGE_SIZE, always resulting in a
single iteration for the inner segment loop (bv.bv_len == blksize). The
incorrectly used 'off' value to increment dst is 0 and the correct
memory area is used.

In order to fix this for blksize < 4k, increment dst correctly using the
blksize and only do it at the end of the loop.

Fixes: 5e2b17e712 ("s390/dasd: Add dynamic formatting support for ESE volumes")
Cc: stable@vger.kernel.org # v5.3+
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
Reviewed-by: Stefan Haberland <sth@linux.ibm.com>
Link: https://lore.kernel.org/r/20220505141733.1989450-4-sth@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-05-05 20:08:27 -06:00