Commit Graph

1014704 Commits

Author SHA1 Message Date
Mark Rutland
0711f0d705 pid: take a reference when initializing cad_pid
During boot, kernel_init_freeable() initializes `cad_pid` to the init
task's struct pid.  Later on, we may change `cad_pid` via a sysctl, and
when this happens proc_do_cad_pid() will increment the refcount on the
new pid via get_pid(), and will decrement the refcount on the old pid
via put_pid().  As we never called get_pid() when we initialized
`cad_pid`, we decrement a reference we never incremented, can therefore
free the init task's struct pid early.  As there can be dangling
references to the struct pid, we can later encounter a use-after-free
(e.g.  when delivering signals).

This was spotted when fuzzing v5.13-rc3 with Syzkaller, but seems to
have been around since the conversion of `cad_pid` to struct pid in
commit 9ec52099e4 ("[PATCH] replace cad_pid by a struct pid") from the
pre-KASAN stone age of v2.6.19.

Fix this by getting a reference to the init task's struct pid when we
assign it to `cad_pid`.

Full KASAN splat below.

   ==================================================================
   BUG: KASAN: use-after-free in ns_of_pid include/linux/pid.h:153 [inline]
   BUG: KASAN: use-after-free in task_active_pid_ns+0xc0/0xc8 kernel/pid.c:509
   Read of size 4 at addr ffff23794dda0004 by task syz-executor.0/273

   CPU: 1 PID: 273 Comm: syz-executor.0 Not tainted 5.12.0-00001-g9aef892b2d15 #1
   Hardware name: linux,dummy-virt (DT)
   Call trace:
    ns_of_pid include/linux/pid.h:153 [inline]
    task_active_pid_ns+0xc0/0xc8 kernel/pid.c:509
    do_notify_parent+0x308/0xe60 kernel/signal.c:1950
    exit_notify kernel/exit.c:682 [inline]
    do_exit+0x2334/0x2bd0 kernel/exit.c:845
    do_group_exit+0x108/0x2c8 kernel/exit.c:922
    get_signal+0x4e4/0x2a88 kernel/signal.c:2781
    do_signal arch/arm64/kernel/signal.c:882 [inline]
    do_notify_resume+0x300/0x970 arch/arm64/kernel/signal.c:936
    work_pending+0xc/0x2dc

   Allocated by task 0:
    slab_post_alloc_hook+0x50/0x5c0 mm/slab.h:516
    slab_alloc_node mm/slub.c:2907 [inline]
    slab_alloc mm/slub.c:2915 [inline]
    kmem_cache_alloc+0x1f4/0x4c0 mm/slub.c:2920
    alloc_pid+0xdc/0xc00 kernel/pid.c:180
    copy_process+0x2794/0x5e18 kernel/fork.c:2129
    kernel_clone+0x194/0x13c8 kernel/fork.c:2500
    kernel_thread+0xd4/0x110 kernel/fork.c:2552
    rest_init+0x44/0x4a0 init/main.c:687
    arch_call_rest_init+0x1c/0x28
    start_kernel+0x520/0x554 init/main.c:1064
    0x0

   Freed by task 270:
    slab_free_hook mm/slub.c:1562 [inline]
    slab_free_freelist_hook+0x98/0x260 mm/slub.c:1600
    slab_free mm/slub.c:3161 [inline]
    kmem_cache_free+0x224/0x8e0 mm/slub.c:3177
    put_pid.part.4+0xe0/0x1a8 kernel/pid.c:114
    put_pid+0x30/0x48 kernel/pid.c:109
    proc_do_cad_pid+0x190/0x1b0 kernel/sysctl.c:1401
    proc_sys_call_handler+0x338/0x4b0 fs/proc/proc_sysctl.c:591
    proc_sys_write+0x34/0x48 fs/proc/proc_sysctl.c:617
    call_write_iter include/linux/fs.h:1977 [inline]
    new_sync_write+0x3ac/0x510 fs/read_write.c:518
    vfs_write fs/read_write.c:605 [inline]
    vfs_write+0x9c4/0x1018 fs/read_write.c:585
    ksys_write+0x124/0x240 fs/read_write.c:658
    __do_sys_write fs/read_write.c:670 [inline]
    __se_sys_write fs/read_write.c:667 [inline]
    __arm64_sys_write+0x78/0xb0 fs/read_write.c:667
    __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
    invoke_syscall arch/arm64/kernel/syscall.c:49 [inline]
    el0_svc_common.constprop.1+0x16c/0x388 arch/arm64/kernel/syscall.c:129
    do_el0_svc+0xf8/0x150 arch/arm64/kernel/syscall.c:168
    el0_svc+0x28/0x38 arch/arm64/kernel/entry-common.c:416
    el0_sync_handler+0x134/0x180 arch/arm64/kernel/entry-common.c:432
    el0_sync+0x154/0x180 arch/arm64/kernel/entry.S:701

   The buggy address belongs to the object at ffff23794dda0000
    which belongs to the cache pid of size 224
   The buggy address is located 4 bytes inside of
    224-byte region [ffff23794dda0000, ffff23794dda00e0)
   The buggy address belongs to the page:
   page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4dda0
   head:(____ptrval____) order:1 compound_mapcount:0
   flags: 0x3fffc0000010200(slab|head)
   raw: 03fffc0000010200 dead000000000100 dead000000000122 ffff23794d40d080
   raw: 0000000000000000 0000000000190019 00000001ffffffff 0000000000000000
   page dumped because: kasan: bad access detected

   Memory state around the buggy address:
    ffff23794dd9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    ffff23794dd9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
   >ffff23794dda0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
    ffff23794dda0080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
    ffff23794dda0100: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
   ==================================================================

Link: https://lkml.kernel.org/r/20210524172230.38715-1-mark.rutland@arm.com
Fixes: 9ec52099e4 ("[PATCH] replace cad_pid by a struct pid")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: Christian Brauner <christian@brauner.io>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Kees Cook <keescook@chromium.org
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-05 08:58:11 -07:00
Marco Elver
8fd0e995cc kfence: use TASK_IDLE when awaiting allocation
Since wait_event() uses TASK_UNINTERRUPTIBLE by default, waiting for an
allocation counts towards load.  However, for KFENCE, this does not make
any sense, since there is no busy work we're awaiting.

Instead, use TASK_IDLE via wait_event_idle() to not count towards load.

BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1185565
Link: https://lkml.kernel.org/r/20210521083209.3740269-1-elver@google.com
Fixes: 407f1d8c1b ("kfence: await for allocation using wait_event")
Signed-off-by: Marco Elver <elver@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Hillf Danton <hdanton@sina.com>
Cc: <stable@vger.kernel.org>	[5.12+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-05 08:58:11 -07:00
Thomas Bogendoerfer
50c25ee97c Revert "MIPS: make userspace mapping young by default"
This reverts commit f685a533a7.

The MIPS cache flush logic needs to know whether the mapping was already
established to decide how to flush caches.  This is done by checking the
valid bit in the PTE.  The commit above breaks this logic by setting the
valid in the PTE in new mappings, which causes kernel crashes.

Link: https://lkml.kernel.org/r/20210526094335.92948-1-tsbogend@alpha.franken.de
Fixes: f685a533a7 ("MIPS: make userspace mapping young by default")
Reported-by: Zhou Yanjie <zhouyanjie@wanyeetech.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Huang Pei <huangpei@loongson.cn>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-05 08:58:11 -07:00
Linus Torvalds
16f0596fc1 sound fixes for 5.13-rc5
A couple of small fixes are found in the ALSA core side at this time;
 a fix in the new LED handling code and a long-standing (and likely no
 one would notice) ioctl bug.
 
 The rest are usual HD-audio fixes, mostly device-specific quirks
 but also one major regression fix that was introduced in 5.13.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmC5zlMOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE+zTBAAhc5pzi8wBoiDAo/b9SZ+SCy3HUBYHzooWqvL
 qTxahNTDb7x+SkeCsiYUIUdO4hmDxR7TVLpu4kHyfVdotHr0aWADp7/KuTDCMb5c
 dRdHz4iyutoI9aISX+xmhX1IRafQrVgBwUveN1J1ihPAHbrYtoG+A9Z7Xn3ygpPt
 zZ+ebZmbDZWmmNKVuhwZkRlbZZQ2jZi2tlLHY/Zh0CJSF7W0E96HvhYY5h4C3sSw
 Sgk9ZegpR0mYrSgEHU6bP1QZUbnjWKn6W/oimq/N9vtJ9EjLc2O0gm9Ry3FKdg3f
 3JvuisGN9HPUQ8c6EnGk5E21y8kLW3XfkCa5htKjmx83c4vLt/K3cvkS5sb99a+R
 7H27QafW9Qwf24ZIlGxAkxbPFh9AgxgWXt8SysDPl8S9HDjz1aqSy1L2kXLuHrad
 rPyPJbhAzDm1Kn/LmTcav40P2B8a+0/Cp+nYWfAbFWHRf4zttguZNukE+9YEaxDq
 HWP3sQXzsh6mh6wQCLgojWJ74E5H2ePlDSHlDVjOgiontPg+9+wQJd5T2Q2Sc7q6
 ReUN/+RTvq7MbRYaW7j6tqnBYw05YsH2xpZPoLVjdzJLby3kQFhyQbXZRGBNF91n
 TRMb0+FdbjZEnJnzjhMTPyjU1Os3VtVeGwj8UY5LDcIzyu6hwzQecju6YqG20T3i
 GJN6Ks8=
 =uEgi
 -----END PGP SIGNATURE-----

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

Pull sound fixes from Takashi Iwai:
 "A couple of small fixes are found in the ALSA core side at this time;
  a fix in the new LED handling code and a long-standing (and likely no
  one would notice) ioctl bug.

  The rest are usual HD-audio fixes, mostly device-specific quirks but
  also one major regression fix that was introduced in 5.13"

* tag 'sound-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda: update the power_state during the direct-complete
  ALSA: timer: Fix master timer notification
  ALSA: control led: fix memory leak in snd_ctl_led_register
  ALSA: hda: Fix for mute key LED for HP Pavilion 15-CK0xx
  ALSA: hda/cirrus: Set Initial DMIC volume to -26 dB
  ALSA: hda: Fix a regression in Capture Switch mixer read
  ALSA: hda: Add AlderLake-M PCI ID
2021-06-04 10:13:20 -07:00
Linus Torvalds
3a3c5ab3d6 drm fixes for 5.13-rc5
fb:
 - revert broken fb_defio patch
 
 amdgpu:
 - Display fixes
 - FRU EEPROM error handling fix
 - RAS fix
 - PSP fix
 - Releasing pinned BO fix
 
 i915:
 - Revert conversion to io_mapping_map_user() which lead to BUG_ON()
 - Fix check for error valued returns in a selftest
 
 tegra:
 - SOR power domain race condition fix
 - build warning fix
 - runtime pm ref leak fix
 - modifier fix
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmC5hvgACgkQDHTzWXnE
 hr724xAAksC/w2/xAscyhrQ4PulE3985eIo77laf1iN4TAqzXT9EDnxB+T4+Gwu2
 PbLJpMCxCGovCtlGIP09gJtEmpTh5hI1EeKynpWixI3mVrKdrC48/Di6tpsev3tm
 z0CWUPIJYzkiE7AojuhYEqKIfqDqVuLiMUa5JXGsyf2pY8mcWdLQD00QCPVmMsoA
 9S3zIBj+9287o7k3Qq6OQ5FwNCKY3Bh607PtuBEd8ihj4H17SbpLYFPjhKeJoBFp
 ilzkViyXngFn11ZBmQ4LPxgBTZUmm2xwqHwtb0oyDXHDuQNDAjvXfpyT61kvVGQj
 6/dGX0GlmHY+NNn5PcOi/Sog47l1Re7OSeCC/u9E5g2LwOzb146hRac/mxsLQztt
 /nAW1BqkQ/LfA3XxhKoXcljSfRLgxMsNYnX37e0EMfWiiwt1xckYaiWlEUaYyH68
 73JMTtUYSbbLdMTA4AthP6wESEqc8ZDn7zpvbw/24G8T+yqw+EcdpyrGxDMQFdYb
 nNxfu/VN/jd7379NfbW1L39SW9+bUHSiu7cYKbPwTSnhkKIq9xbKQIef4UHkbaKB
 U00Exi+qcAUh38J2Tlkw2UmOyEdJpmpHPJnsNyB5qKe1DED3Rj1hujMDtnwmvIHX
 HYGHoTl1MRMTPkL1HxOhcIIATO1bkV0IyYPgp3b8xxnaKIPKlGM=
 =7xNb
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2021-06-04-1' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Two big regression reverts in here, one for fbdev and one i915.
  Otherwise it's mostly amdgpu display fixes, and tegra fixes.

  fb:
   - revert broken fb_defio patch

  amdgpu:
   - Display fixes
   - FRU EEPROM error handling fix
   - RAS fix
   - PSP fix
   - Releasing pinned BO fix

  i915:
   - Revert conversion to io_mapping_map_user() which lead to BUG_ON()
   - Fix check for error valued returns in a selftest

  tegra:
   - SOR power domain race condition fix
   - build warning fix
   - runtime pm ref leak fix
   - modifier fix"

* tag 'drm-fixes-2021-06-04-1' of git://anongit.freedesktop.org/drm/drm:
  amd/display: convert DRM_DEBUG_ATOMIC to drm_dbg_atomic
  drm/amdgpu: make sure we unpin the UVD BO
  drm/amd/amdgpu:save psp ring wptr to avoid attack
  drm/amd/display: Fix potential memory leak in DMUB hw_init
  drm/amdgpu: Don't query CE and UE errors
  drm/amd/display: Fix overlay validation by considering cursors
  drm/amdgpu: refine amdgpu_fru_get_product_info
  drm/amdgpu: add judgement for dc support
  drm/amd/display: Fix GPU scaling regression by FS video support
  drm/amd/display: Allow bandwidth validation for 0 streams.
  Revert "i915: use io_mapping_map_user"
  drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest()
  Revert "fb_defio: Remove custom address_space_operations"
  drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT
  drm/tegra: sor: Fix AUX device reference leak
  drm/tegra: Get ref for DP AUX channel, not its ddc adapter
  drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update
  drm/tegra: sor: Fully initialize SOR before registration
  gpu: host1x: Split up client initalization and registration
  drm/tegra: sor: Do not leak runtime PM reference
2021-06-04 09:30:23 -07:00
Dave Airlie
37e2f2e800 drm/tegra: Fixes for v5.13-rc5
The most important change here fixes a race condition that causes either
 HDA or (more frequently) display to malfunction because they race for
 enabling the SOR power domain at probe time.
 
 Other than that, there's a couple of build warnings for issues
 introduced in v5.13 as well as some minor fixes, such as reference leak
 plugs.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmC46msTHHRyZWRpbmdA
 bnZpZGlhLmNvbQAKCRDdI6zXfz6zocHxEACTS0lR63rULGmYV/+spAC9yOBeLkBQ
 ElHHt2L9QL3yMLVAsozoPZLQDBszuAepeMYXNtP7H+XjBjxloHi1kn1yS8TNfhRD
 HZhyTdyUWAuSGvcm/wyk9QWimoQ75/Q+JTooxedtOjFZBTjx18sRjCV9DQwrr6sN
 iq/RbAVWcrJ5fL80Yh/wY1DegEA+aRrb+Owm3lmXQ1oPJJFL7VpALWrXcb5yGMIL
 2utnKFGML3llRYlUAESWd03By64ZvsGxFDQiHHpjEKlG0SpZbosGqYmMjBXKloE3
 zXzeJ4dnhkbFdEGLip5qdoLRf4p0Dbm70njBfXXEUu9629FgChGCAbz7rOogLxts
 OADDtq/n3xaLnhAoSdtQvDgPtPob21+vgKGp8JbdAjdoqvCA+5u+TDfUxPU54/oe
 FCOPoayHCE3qSY5UMzPrzdkuBpXi+a5VF9HRwsYn09wE0TOncPo4fwyJJqKmUn9r
 lTwFKrAfrIEk6EXgZUgxPGfROnUrYDrfYZNlyODIj3I/G3LT0wTe4ynNmEi6aQp9
 YxEqOkoVrljzBKuQCDjjSg3BEWZmmkP2Zn1IcKreuaK37qcQFgoXAd6PzcQBPsus
 f8Y1gOXRC6TL+3ZFyoInb7kkceU2VRdQpXpsd+OfcCDUIo2yN+VceVE2pNqiNCzD
 wWt0TjIPnrw9sA==
 =K0PC
 -----END PGP SIGNATURE-----

Merge tag 'drm/tegra/for-5.13-rc5' of ssh://git.freedesktop.org/git/tegra/linux into drm-fixes

drm/tegra: Fixes for v5.13-rc5

The most important change here fixes a race condition that causes either
HDA or (more frequently) display to malfunction because they race for
enabling the SOR power domain at probe time.

Other than that, there's a couple of build warnings for issues
introduced in v5.13 as well as some minor fixes, such as reference leak
plugs.

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

From: Thierry Reding <thierry.reding@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210603144624.788861-1-thierry.reding@gmail.com
2021-06-04 10:23:57 +10:00
Dave Airlie
d6273d8f31 Merge tag 'amd-drm-fixes-5.13-2021-06-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-5.13-2021-06-02:

amdgpu:
- Display fixes
- FRU EEPROM error handling fix
- RAS fix
- PSP fix
- Releasing pinned BO fix

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210603040410.4080-1-alexander.deucher@amd.com
2021-06-04 09:45:15 +10:00
Dave Airlie
ff7a24a8fc Merge tag 'drm-intel-fixes-2021-06-03' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
drm/i915 fixes for v5.13-rc5:
- Revert conversion to io_mapping_map_user() which lead to BUG_ON()
- Fix check for error valued returns in a selftest

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/87lf7rpcmp.fsf@intel.com
2021-06-04 07:29:26 +10:00
Dave Airlie
59dda702c9 One fix for a fb_defio breakage
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYLiYWwAKCRDj7w1vZxhR
 xWiQAQD19yQxZuBJBRSMoj+jkLootfOSPzgTlbONh5q6XOdtVQEA3ykks8agukvi
 tfBdPcnv95/yeCQgnxXKMrHa5U9HLQw=
 =KQzQ
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2021-06-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes

One fix for a fb_defio breakage

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

From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210603085321.l5l6flslj632yqse@gilmour
2021-06-04 07:29:08 +10:00
Linus Torvalds
f88cd3fb9d VFIO fixes for v5.13-rc5
- Fix error path return value (Zhen Lei)
 
  - Add vfio-pci CONFIG_MMU dependency (Randy Dunlap)
 
  - Replace open coding with struct_size() (Gustavo A. R. Silva)
 
  - Fix sample driver error path (Wei Yongjun)
 
  - Fix vfio-platform error path module_put() (Max Gurtovoy)
 -----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEEQvbATlQL0amee4qQI5ubbjuwiyIFAmC5DlgbHGFsZXgud2ls
 bGlhbXNvbkByZWRoYXQuY29tAAoJECObm247sIsiDwAP/A8Q8zvrwDOuCBr5hkrc
 kVikIhacn1JaSBktaAgvrhAguaGAl9vJRLaEyB5DKU8FIU9C/qURkdmxldsjSDqd
 F5h8DEg878J2sJoz2zg0vJ8mOBnyl+sP//9+I9NOuLo4+mhpfE9uKSt5f1x9sF0g
 iaAWzV8ssrW1umdNy0v6kMrc2AhyxBo7hoEHZ0+eZcFjiMF6RgtUBVnXWtLcvMqi
 6sBKMl/2PMtfMEQn1Mn2iQ1Liq1dZCmH4mGZJ30bEvJLGH0Z1wb2jnx1llA10ryb
 GS0gVfB7HyhNxHP1Xs4SFYwiu/CHNHXtbfwmBcsfRHFIuE6YS3hF4gwnr7dk2iTD
 YyjkC7miKNzlfR/f4iYURK9p3AWQBXxNr1BuJjTN7NbFiRYtrDGjMaU4JDAjqh7G
 otWb7oHt2uAmTCT/1fN+1+0kBxVfW+NIe0KGBgeW2LMuAOnLvc8MSWz6jj/UOtXb
 vDRTzWdAPATsn4AKzIDfSZ7tscT1mzqPY67osvktlrbl23Mpa2JFcTmAhuCsW4WV
 jMQhueKHa0JiOrspQhmzcKy8EtGvMeCRQ0mgGMzFES+MSvXTwbvECcGoz//0W6Zq
 C4X5xTYjxucaHYYvI3w6eoIEfHPkbWogwQ1IHEHYv1JPTNhxn8Zfpb2Q5OFhGhYI
 sDFZbOh6qeNZSOTsVjm3FA0J
 =yoFF
 -----END PGP SIGNATURE-----

Merge tag 'vfio-v5.13-rc5' of git://github.com/awilliam/linux-vfio

Pull VFIO fixes from Alex Williamson:

 - Fix error path return value (Zhen Lei)

 - Add vfio-pci CONFIG_MMU dependency (Randy Dunlap)

 - Replace open coding with struct_size() (Gustavo A. R. Silva)

 - Fix sample driver error path (Wei Yongjun)

 - Fix vfio-platform error path module_put() (Max Gurtovoy)

* tag 'vfio-v5.13-rc5' of git://github.com/awilliam/linux-vfio:
  vfio/platform: fix module_put call in error flow
  samples: vfio-mdev: fix error handing in mdpy_fb_probe()
  vfio/iommu_type1: Use struct_size() for kzalloc()
  vfio/pci: zap_vma_ptes() needs MMU
  vfio/pci: Fix error return code in vfio_ecap_init()
2021-06-03 11:52:24 -07:00
Linus Torvalds
143d28dcf2 block-5.13-2021-06-03
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmC5BtAQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpnfzEAC7ntPpLW/8Qqtpmp5P8XiBibF5EiYWxbAA
 rD6ecy6hstiRd4wu+RenFrf70WBGO0yqEPdXqEK8r02Uvq/0MmGB+B9hhUvK1/Ht
 XO0wk7YOM0pihWrzvkR3WSMxPF0zcvZTaP/C/csbQfVOvJ7lu2rZUqlVJv7ucWKm
 U+Zs5T/6fSMsGPZGUrTVYAujzuUY6fhcWYAq/i8sYeZSEDGfA2/SZGgmIc9zMRWn
 9nVnA+jZp3I3CJ5xspghOo9dZ367GQeuXFMfYHOl0e/rg+r1IyiFIY2DjMXc3Rd+
 6q9BO4nXx4oV6ufZtKk8h5h0PPj94jIt1rtwcrnaw4J6YfaPdGG7COF1mTxcVJPh
 g5SzJhCHIuTE2eMw9abhzj6gcdMrI3w8c4+te7jDmxM5yZOuYPMZnWc45J8/qEo1
 5tLSiYNGH2AUij1siql4/EaHz9COsm5UFvbedQIRKLS1wMe3Pkwj2nURf3sEhVcc
 nheuUVenho1HOSa5B6r5ZpW92pyf1UfUub8gOQkdvP9fm5bW0Cd42CCg/b2IxIGY
 dBdJwARNSiD+LI1+TL1vKPL+/gNN7afwFGMwXpIux1BM3J2vCJYVotel5VaEV5SQ
 tw6qqpCuTaFLQ5opmWdoCa4WBF4/oZAkZz0672+iEg0VJxydF8L0Sh8IRXl6oiZ8
 dT5oB0DZTw==
 =ZSDk
 -----END PGP SIGNATURE-----

Merge tag 'block-5.13-2021-06-03' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "NVMe fixes from Christoph:

   - Fix corruption in RDMA in-capsule SGLs (Sagi Grimberg)

   - nvme-loop reset fixes (Hannes Reinecke)

   - nvmet fix for freeing unallocated p2pmem (Max Gurtovoy)"

* tag 'block-5.13-2021-06-03' of git://git.kernel.dk/linux-block:
  nvmet: fix freeing unallocated p2pmem
  nvme-loop: do not warn for deleted controllers during reset
  nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()
  nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails
  nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues()
  nvme-rdma: fix in-casule data send for chained sgls
2021-06-03 11:47:08 -07:00
Linus Torvalds
ec95502396 io_uring-5.13-2021-06-03
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmC5BrwQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpq3tD/9FGANoxDDpLbQg/FCiK1pNoSf0EyoEWSdg
 ysTF5KPAPC3msQOmuPYwRZfRFCkvtOHmrexPAZAaorCxEYPjiVAZ9b/a0hBC4Zc1
 vVW8RcTp6hSonAp1kk6VgLEHulJMcLANjAx3Me3NDRB/g0KGW5gevqkUXIJ+nXiR
 nqZcxaK7MD90v74IomO7y4P1GgwCbRhKYUL0JGQ4tXndYLxBYJnXBSnIKS2WdLZD
 PCBf+TDDFAZeioueZ/GrXRhWBmy97j8sEKUJLRqjI5YG8VVZSofgPlwNBi1e42C8
 l3ZEmXldyk18O8KDsZCI2E8axt62gLjuD7Tu6+gv0GBJTcdyXP/FaZYbkBMWjMBH
 yq4Dk4QyJWfMFHJ886ukbGpwj1HJT1cJqzg4UUdkV3BlMNKtmZD8XrKTBw4HcPww
 EmB+yywRiuH+XqamxPglFXUEOa4bJH/EAsQ0R5NNxAT/X/9iIOLUDBDAGvtWtBr0
 7cz+7jTQchqmV11gN+JcgN2LvG14m6Xq4Xtv5oHhIy/FHbRCNPPrC7KJ22TOBSaD
 d9mS5VM12+O9r9plYW7Cqdhdhnho/7/VfB+puiHg/lVcsXrMlrr0sc/WyrUixZeL
 AUlhDtmoROcyFpdcA49LCBEFvacu13ivEstkxIonx997Ct4MW7joYds2YfHCfuoO
 YlPVGdqeag==
 =3m3m
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-5.13-2021-06-03' of git://git.kernel.dk/linux-block

Pull io_uring fix from Jens Axboe:
 "Just a single one-liner fix for an accounting regression in this
  release"

* tag 'io_uring-5.13-2021-06-03' of git://git.kernel.dk/linux-block:
  io_uring: fix misaccounting fix buf pinned pages
2021-06-03 11:41:00 -07:00
Linus Torvalds
fd2ff2774e for-5.13-rc4-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmC435cACgkQxWXV+ddt
 WDuh5w/+IGfsUFfKikJZpZUP7q/2gC0t0dzZemxeZMutJbT/KCZCDd4CjLf6YH6r
 oV9uYIgOWGd3aem9fe0R60ErJ4htgszIgeydCw3s2EuTms6WvAVA6Wp+wK/3UNx3
 vQgYsqYkhMzIYKm/D4q8G+bqA2nPbBTDRNsXDIDrZYONxwSb+dNbQCGVknBRzRPa
 hiCqYhUSyXA7E6UZdlma7MvpDOquZN+iW3RRVx1AULLqVs01PCnG/CEN+0oQm2JE
 r9IyRxOZUvSeW6opT80yzZFCoboNSduMjPENTfzLY6Q1xzS/EtP4kM86fB/7AoJv
 UI0c3Sr84SC9vOsBsbGJaBHpxP3OpzxohKU///jVQgEDpGv4STPlkVfxk23BHcux
 Fdfg7wodkXeLU1Ff4dlJhvCqNYqc5V8lT5Kl52ai9Scct6D4yZBAq4KJp2LmYFC0
 cHv6xFxBUv5zFZP1j6NMOmiLlCdDEkOruku2mMweQOBWYW/lHYNU469V5RCvfbLl
 HlbDrtZdnQ3m2IhpQrXiTnT47Ib4DPYWkhRVfWbyVJHA+CbcOV62RQfl+r95Bc7j
 FB1gM5vwUTJV7wgzErrq7+BD8quxG6/NuLDFjHYRcIj1kSIMK4/I1fOWruzuK+CL
 6n7LLvBOojYfFo+ruQMSp2imDn3JJucBuh0/ssOlUWl2zsy6lDA=
 =8066
 -----END PGP SIGNATURE-----

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

Pull btrfs fixes from David Sterba:
 "Error handling improvements, caught by error injection:

   - handle errors during checksum deletion

   - set error on mapping when ordered extent io cannot be finished

   - inode link count fixup in tree-log

   - missing return value checks for inode updates in tree-log

   - abort transaction in rename exchange if adding second reference
     fails

  Fixes:

   - fix fsync failure after writes to prealloc extents

   - fix deadlock when cloning inline extents and low on available space

   - fix compressed writes that cross stripe boundary"

* tag 'for-5.13-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  MAINTAINERS: add btrfs IRC link
  btrfs: fix deadlock when cloning inline extents and low on available space
  btrfs: fix fsync failure and transaction abort after writes to prealloc extents
  btrfs: abort in rename_exchange if we fail to insert the second ref
  btrfs: check error value from btrfs_update_inode in tree log
  btrfs: fixup error handling in fixup_inode_link_counts
  btrfs: mark ordered extent and inode with error if we fail to finish
  btrfs: return errors from btrfs_del_csums in cleanup_ref_head
  btrfs: fix error handling in btrfs_del_csums
  btrfs: fix compressed writes that cross stripe boundary
2021-06-03 11:37:14 -07:00
Jens Axboe
e369edbb0d nvme fixes for Linux 5.13:
- fix corruption in RDMA in-capsule SGLs (Sagi Grimberg)
  - nvme-loop reset fixes (Hannes Reinecke)
  - nvmet fix for freeing unallocated p2pmem (Max Gurtovoy)
 -----BEGIN PGP SIGNATURE-----
 
 iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAmC4fkoLHGhjaEBsc3Qu
 ZGUACgkQD55TZVIEUYPmthAAnNJRbt0uyPCtrbYk69bBoRr+zHg6SbcUxb7/kZEi
 54qotY6Db/mZlRS9Gz7L0MGEdJvPC8+kexbF6guoEV+7rB37A4UCf6hAy5a/rbot
 1BWeFtFx5KE9BGZJ9UMgoEv3nW0iLj7MKI6tF2PIkZ8u7a8iU8LnTX/Em07fqdmp
 ATtGaOysKQp6ErvLhYYn/eBT+uQJ3M1ihcEy7ag4+4YW/g3oX4Y3zHXV6f28MRsH
 TDa0lZOc8LL3HlmBNq59maj78+K2Pc6wl/5qxDjpNXufxSXk4hm4V0wd3j71WoIm
 3zsMX3AuJ/ULflrI+20vghXxhncA6l8sESU4hA3UNxQSFu1IGIVNhRC1E6oa9IpB
 14eQ7hbxAhf4ygDCTTmHNRKcYkVkzZoW8fMdsDuX48EW3STODzOu/Wgg3lF/T4vP
 xBdGGi47WryxWFbdjQJxD9i2Mu0KSo4nhyJ8MBe8Q8nZI1H8LLerA8Gl9pvIYMch
 PXJpEOD8uHnjVvon8UbKLjVyd8ef/HvVnf98OApG/m+dBrQyhalCr+T4foSE5T5N
 e72Bzia55h1YjTnI79yncLHD1Vdbxxy7683aeBokLmxsp8DALD8VlSH0pIsYryWO
 r0is/TwMqEdStBVhSIoww1XZqMgm9I2c2INTpUIA6g7VQVe+SLaPMJkK4XY/UM/k
 HR4=
 =lxkK
 -----END PGP SIGNATURE-----

Merge tag 'nvme-5.13-2021-06-03' of git://git.infradead.org/nvme into block-5.13

Pull NVMe fixes from Christoph:

"nvme fixes for Linux 5.13:

 - fix corruption in RDMA in-capsule SGLs (Sagi Grimberg)
 - nvme-loop reset fixes (Hannes Reinecke)
 - nvmet fix for freeing unallocated p2pmem (Max Gurtovoy)"

* tag 'nvme-5.13-2021-06-03' of git://git.infradead.org/nvme:
  nvmet: fix freeing unallocated p2pmem
  nvme-loop: do not warn for deleted controllers during reset
  nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()
  nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails
  nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues()
  nvme-rdma: fix in-casule data send for chained sgls
2021-06-03 07:42:27 -06:00
David Sterba
503d1acb01 MAINTAINERS: add btrfs IRC link
We haven't had an IRC link before but now it's a good time to announce
where to reach the community.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-06-03 15:40:38 +02:00
Hui Wang
b8b90c1760 ALSA: hda: update the power_state during the direct-complete
The patch_realtek.c needs to check if the power_state.event equals
PM_EVENT_SUSPEND, after using the direct-complete, the suspend() and
resume() will be skipped if the codec is already rt_suspended, in this
case, the patch_realtek.c will always get PM_EVENT_ON even the system
is really resumed from S3.

We could set power_state to PMSG_SUSPEND in the prepare(), if other
PM functions are called before complete(), those functions will
override power_state; if no other PM functions are called before
complete(), we could know the suspend() and resume() are skipped since
only S3 pm functions could be skipped by direct-complete, in this case
set power_state to PMSG_RESUME in the complete(). This could guarantee
the first time of calling hda_codec_runtime_resume() after complete()
has the correct power_state.

Fixes: 215a22ed31 ("ALSA: hda: Refactor codec PM to use direct-complete optimization")
Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Link: https://lore.kernel.org/r/20210602145424.3132-1-hui.wang@canonical.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-03 09:40:28 +02:00
Takashi Iwai
9c1fe96bde ALSA: timer: Fix master timer notification
snd_timer_notify1() calls the notification to each slave for a master
event, but it passes a wrong event number.  It should be +10 offset,
corresponding to SNDRV_TIMER_EVENT_MXXX, but it's incorrectly with
+100 offset.  Casually this was spotted by UBSAN check via syzkaller.

Reported-by: syzbot+d102fa5b35335a7e544e@syzkaller.appspotmail.com
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/000000000000e5560e05c3bd1d63@google.com
Link: https://lore.kernel.org/r/20210602113823.23777-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-03 09:39:58 +02:00
Simon Ser
e7591a8d56 amd/display: convert DRM_DEBUG_ATOMIC to drm_dbg_atomic
This allows to tie the log message to a specific DRM device.

Signed-off-by: Simon Ser <contact@emersion.fr>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <hwentlan@amd.com>
Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:58:11 -04:00
Nirmoy Das
07438603a0 drm/amdgpu: make sure we unpin the UVD BO
Releasing pinned BOs is illegal now. UVD 6 was missing from:
commit 2f40801dc5 ("drm/amdgpu: make sure we unpin the UVD BO")

Fixes: 2f40801dc5 ("drm/amdgpu: make sure we unpin the UVD BO")
Cc: stable@vger.kernel.org
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:57:07 -04:00
Victor Zhao
2370eba9f5 drm/amd/amdgpu:save psp ring wptr to avoid attack
[Why]
When some tools performing psp mailbox attack, the readback value
of register can be a random value which may break psp.

[How]
Use a psp wptr cache machanism to aovid the change made by attack.

v2: unify change and add detailed reason

Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
Signed-off-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:56:03 -04:00
Roman Li
c5699e2d86 drm/amd/display: Fix potential memory leak in DMUB hw_init
[Why]
On resume we perform DMUB hw_init which allocates memory:
dm_resume->dm_dmub_hw_init->dc_dmub_srv_create->kzalloc
That results in memory leak in suspend/resume scenarios.

[How]
Allocate memory for the DC wrapper to DMUB only if it was not
allocated before.
No need to reallocate it on suspend/resume.

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:55:10 -04:00
Luben Tuikov
dce3d8e1d0 drm/amdgpu: Don't query CE and UE errors
On QUERY2 IOCTL don't query counts of correctable
and uncorrectable errors, since when RAS is
enabled and supported on Vega20 server boards,
this takes insurmountably long time, in O(n^3),
which slows the system down to the point of it
being unusable when we have GUI up.

Fixes: ae363a212b ("drm/amdgpu: Add a new flag to AMDGPU_CTX_OP_QUERY_STATE2")
Cc: Alexander Deucher <Alexander.Deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alexander Deucher <Alexander.Deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:52:38 -04:00
Rodrigo Siqueira
33f409e60e drm/amd/display: Fix overlay validation by considering cursors
A few weeks ago, we saw a two cursor issue in a ChromeOS system. We
fixed it in the commit:

 drm/amd/display: Fix two cursor duplication when using overlay
 (read the commit message for more details)

After this change, we noticed that some IGT subtests related to
kms_plane and kms_plane_scaling started to fail. After investigating
this issue, we noticed that all subtests that fail have a primary plane
covering the overlay plane, which is currently rejected by amdgpu dm.
Fail those IGT tests highlight that our verification was too broad and
compromises the overlay usage in our drive. This patch fixes this issue
by ensuring that we only reject commits where the primary plane is not
fully covered by the overlay when the cursor hardware is enabled. With
this fix, all IGT tests start to pass again, which means our overlay
support works as expected.

Cc: Tianci.Yin <tianci.yin@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Nicholas Choi <nicholas.choi@amd.com>
Cc: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com>
Cc: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Cc: Mark Yacoub <markyacoub@google.com>
Cc: Daniel Wheeler <daniel.wheeler@amd.com>

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:51:53 -04:00
Jiansong Chen
5cfc912582 drm/amdgpu: refine amdgpu_fru_get_product_info
1. eliminate potential array index out of bounds.
2. return meaningful value for failure.

Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com>
Reviewed-by: Jack Gui <Jack.Gui@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:51:12 -04:00
Asher Song
147feb0076 drm/amdgpu: add judgement for dc support
Drop DC initialization when DCN is harvested in VBIOS. The way
doesn't affect virtual display ip initialization.

Signed-off-by: Likun Gao  <Likun.Gao@amd.com>
Signed-off-by: Asher Song <Asher.Song@amd.com>
Reviewed-by: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:49:15 -04:00
Nicholas Kazlauskas
a53085c1d2 drm/amd/display: Fix GPU scaling regression by FS video support
[Why]
FS video support regressed GPU scaling and the scaled buffer ends up
stuck in the top left of the screen at native size - full, aspect,
center scaling modes do not function.

This is because decide_crtc_timing_for_drm_display_mode() does not
get called when scaling is enabled.

[How]
Split recalculate timing and scaling into two different flags.

We don't want to call drm_mode_set_crtcinfo() for scaling, but we
do want to call it for FS video.

Optimize and move preferred_refresh calculation next to
decide_crtc_timing_for_drm_display_mode() like it used to be since
that's not used for FS video.

We don't need to copy over the VIC or polarity in the case of FS video
modes because those don't change.

Fixes: 6f59f229f8 ("drm/amd/display: Skip modeset for front porch change")

Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:48:32 -04:00
Bindu Ramamurthy
ba8e59773a drm/amd/display: Allow bandwidth validation for 0 streams.
[Why]
Bandwidth calculations are triggered for non zero streams, and
in case of 0 streams, these calculations were skipped with
pstate status not being updated.

[How]
As the pstate status is applicable for non zero streams, check
added for allowing 0 streams inline with dcn internal bandwidth
validations.

Signed-off-by: Bindu Ramamurthy <bindu.r@amd.com>
Reviewed-by: Roman Li <Roman.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-06-02 17:48:20 -04:00
Linus Torvalds
324c92e5e0 A handful of EFI fixes:
- Fix/robustify a diagnostic printk
  - Fix a (normally not triggered) parser bug in the libstub code
  - Allow !EFI_MEMORY_XP && !EFI_MEMORY_RO entries in the memory map
  - Stop Risc-V from crashing on boot if there's no FDT table
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmC3wp0RHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1i0dw/+JeWRoU+AjauJyBf1mgB4EYh5sMfOmsox
 8+VrROQWPD41QMEZ7SeJ4sdLD4fRHpdhv6UfG6di7zC/Z9qe2kSLbXeRkLWl2okS
 bTq3/KARctZ9c1NYWcWwxt250n7VAHsSxhoYzKcUAOLaQb0+YktX2BCCMwJpz6LO
 2IFLUBoStiVNXtUBdZO55XIj9tDqKQgeiStKi1DYQqwuvKXxZFcKo9VgSnr9YngU
 MB+KMmWKJKiKIf41ZewBkqVn8P8nSWQ1egD3GHd4W9EcTesS56Xaf66GXCuWY2HJ
 XxzmzRGXjcfwAwDQGzm5ST6MwuMRqijdmU9b4QBge2VMpUe4HGbaGyjrxn7/N7Lo
 mTxrB3I1NdgyqvN8XvgmOiUm1DRxImGC2j4XQMhKx+KshGq4TBmMpCcCz8D7XETS
 Zn/ThvzPe/MFIqaYXT9zr/LB0HZXZyiK0eRyUpJfZ/u5XIDAmmsK2eKMT9vNeMma
 QJrwHuPErMkRG2ZSWkOXbdE1ZkRw6pTI1/QfJfL2arD6ZZalkkznz/MUoTs8PDzz
 QYOiQFDDPaBsaFCVVGdmuYja1jiR3PqonIB36hQZ0+Y9QIaEDF9yw7jLRzmhORfU
 e7IZf/9S6HyEtiep0nVlQNUvpDGoiMouEnU6BC7dDfdAdv05HwIQIhNq9Zhg/oZZ
 pb4FH64QHqc=
 =YpFd
 -----END PGP SIGNATURE-----

Merge tag 'efi-urgent-2021-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI fixes from Ingo Molnar:
 "A handful of EFI fixes:

   - Fix/robustify a diagnostic printk

   - Fix a (normally not triggered) parser bug in the libstub code

   - Allow !EFI_MEMORY_XP && !EFI_MEMORY_RO entries in the memory map

   - Stop RISC-V from crashing on boot if there's no FDT table"

* tag 'efi-urgent-2021-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi: cper: fix snprintf() use in cper_dimm_err_location()
  efi/libstub: prevent read overflow in find_file_option()
  efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared
  efi/fdt: fix panic when no valid fdt found
2021-06-02 08:53:37 -10:00
Linus Torvalds
0372b6dd6c ACPI fix for 5.13-rc5.
Fix a mutex object memory leak in ACPICA occurring during object
 deletion that was introduced in 5.12-rc1 (Erik Kaneda).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmC3v7wSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxxSkP/2RAWbc1wXGwKblqQwXtMUnfo5YKCOd3
 5YqZzA/7KJqQEV30HSB0Rrhwnd/4XFPrnOKH/zRp0joaHrkSTSlPsl/A3xjVAgiz
 G5f732JHfr60s1EkYGvFtRK0wp+zemP95aszb3PnSH5q7MsP4SGemOQadk/zSyGy
 9kjr09sGEwD+zEQGMTecuOOORcQul14ythGgNwIBznl6nHxTq3oJUmm9gDSUiVBB
 v6BAKmkYdOk2+dk/yHKc53c5mJS92G39RJvqycgukG87VvJhZSy5EXeACmuvIPvy
 Wgbni2NCWy2hFyrJtvewe9q07FMuC7o0u3bEbQPpUDMMk24vWx84vKbiWnaqZQXG
 kHlHMfATEiy9GwRqjd1RoQH/Tsin9x2fuuyULk5waPAhlD9u7SlZ02bAoiY7PGo4
 kA3nvCnVqDsiwgEU5G3mWDKtLfdZf6O8Mh6qH2Uxid43Rgyqq+YiaKWBV3ifsppD
 IaIpWkTSjfAGPmYxtzUfEml98myvdN4QUsO2Io9XvvTYDFWnuVNdJlcf1B4aED8P
 8CTtkOhDCCj1/gS0mW21LHbFwwsoIjdTaDuvsM+iWyii7Xy2GuqnvHhvA5pHVjRh
 nSenyIAy9gm/ajbkl3dUJRwdRRApGHA8sS/Tot36s97TIAtdawudIkwna8TMcBF2
 iVxk3kXrAJW2
 =/YP9
 -----END PGP SIGNATURE-----

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

Pull ACPI fix from Rafael Wysocki:
 "Fix a mutex object memory leak in ACPICA occurring during object
  deletion that was introduced in 5.12-rc1 (Erik Kaneda)"

* tag 'acpi-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPICA: Clean up context mutex during object deletion
2021-06-02 08:46:57 -10:00
Linus Torvalds
3bfc6ffb61 hwmon fixes for v5.13-rc4
The most notable fix is for the q54sj108a2 driver to let it actually
 instantiate. Also attribute fixes for pmbus/isl68137, pmbus/fsp-3y,
 and dell-smm-hwmon drivers.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiHPvMQj9QTOCiqgVyx8mb86fmYEFAmCudMsACgkQyx8mb86f
 mYGILQ//bmffBsY1y+D7h/a6l0cIq04fbQ1unfJ0prlb7hJw/jibZuB+lsOGNRd1
 B9KyKDzF9oV+cLY5VuvP4RZ9jHKjVyqdrjJAcbAeYBVI/lKqG8JXHKP1GBlmMQyD
 FmWOLCqUhQjvaEtztqjvmloGxs0Zmg49+3O4WOmgDFM/dRLVlLMGxXw2gGJBgsiK
 fA1AqClCzF9UR9vRVk+BS1I6LwXr7ft9VIZh1NaKLpBGuVLV1rF/CCDfodPlCzls
 ceKyFcHUwuZlR93L2L4umMgQVDi4RbRTI7RBJ76kUA16JCd/ph9ANuCKQeeAxuWa
 hPTpLFO+aCbRI79RlT8mZvw1lZaXbXRiGowHYx2o8ii+w1Jl+C/8LCsaXSm5oHVR
 O2P5zzSwYvRHhEKz7xjzwszyPOa+34yLfKSMRxyKnww2xAA2yWtUfAXQVqTDn+Co
 Sg9uGtchkhFGOiZ1Vq7OGRcjRDtm8wwWPMWHyIohcBlCeomAUaxCJfRQFB9mJO38
 8Jmdx6E9RmW49gr3yxYBohSUC7UN/RcOvu9we5yd6vO0OMJYiauZ2o8vFrX/h50+
 sQLOGKkXSQqIaDxoLMaJ3TC5XMyMxYTNwhUP+N3YNpPnVTor4Wcs+4zjYsGzzF58
 ucXOW+2Ho40wz8uOfLhPs7H6G5TC6h9bInaBDjySGVwcKZ7ZQmI=
 =78YS
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "The most notable fix is for the q54sj108a2 driver to let it actually
  instantiate.

  Also attribute fixes for pmbus/isl68137, pmbus/fsp-3y, and
  dell-smm-hwmon drivers"

* tag 'hwmon-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon/pmbus: (q54sj108a2) The PMBUS_MFR_ID is actually 6 chars instead of 5
  hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_3 for RAA228228
  hwmon: (pmbus/fsp-3y) Fix FSP-3Y YH-5151E VOUT
  hwmon: (dell-smm-hwmon) Fix index values
2021-06-02 08:41:45 -10:00
Matthew Auld
b87482dfe8 Revert "i915: use io_mapping_map_user"
This reverts commit b739f125e4.

We are unfortunately seeing more issues like we did in 293837b9ac
("Revert "i915: fix remap_io_sg to verify the pgprot""), except this is
now for the vm_fault_gtt path, where we are now hitting the same
BUG_ON(!pte_none(*pte)):

[10887.466150] kernel BUG at mm/memory.c:2183!
[10887.466162] invalid opcode: 0000 [#1] PREEMPT SMP PTI
[10887.466168] CPU: 0 PID: 7775 Comm: ffmpeg Tainted: G     U            5.13.0-rc3-CI-Nightly #1
[10887.466174] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.40 07/14/2017
[10887.466177] RIP: 0010:remap_pfn_range_notrack+0x30f/0x440
[10887.466188] Code: e8 96 d7 e0 ff 84 c0 0f 84 27 01 00 00 48 ba 00 f0 ff ff ff ff 0f 00 4c 89 e0 48 c1 e0 0c 4d 85 ed 75 96 48 21 d0 31 f6 eb a9 <0f> 0b 48 39 37 0f 85 0e 01 00 00 48 8b 0c 24 48 39 4f 08 0f 85 00
[10887.466193] RSP: 0018:ffffc90006e33c50 EFLAGS: 00010286
[10887.466198] RAX: 800000000000002f RBX: 00007f5e01800000 RCX: 0000000000000028
[10887.466201] RDX: 0000000000000001 RSI: ffffea0000000000 RDI: 0000000000000000
[10887.466204] RBP: ffffea000033fea8 R08: 800000000000002f R09: ffff8881072256e0
[10887.466207] R10: ffffc9000b84fff8 R11: 0000000017dab000 R12: 0000000000089f9f
[10887.466210] R13: 800000000000002f R14: 00007f5e017e4000 R15: ffff88800cffaf20
[10887.466213] FS:  00007f5e04849640(0000) GS:ffff888278000000(0000) knlGS:0000000000000000
[10887.466216] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[10887.466220] CR2: 00007fd9b191a2ac CR3: 00000001829ac000 CR4: 00000000003506f0
[10887.466223] Call Trace:
[10887.466233]  vm_fault_gtt+0x1ca/0x5d0 [i915]
[10887.466381]  ? ktime_get+0x38/0x90
[10887.466389]  __do_fault+0x37/0x90
[10887.466395]  __handle_mm_fault+0xc46/0x1200
[10887.466402]  handle_mm_fault+0xce/0x2a0
[10887.466407]  do_user_addr_fault+0x1c5/0x660

Reverting this commit is reported to fix the issue.

Reported-by: Eero Tamminen <eero.t.tamminen@intel.com>
References: https://gitlab.freedesktop.org/drm/intel/-/issues/3519
Fixes: b739f125e4 ("i915: use io_mapping_map_user")
Cc: Christoph Hellwig <hch@lst.de>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210527185145.458021-1-matthew.auld@intel.com
(cherry picked from commit 0e4fe0c9f2)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2021-06-02 15:06:10 +03:00
Zhihao Cheng
10c1f0cbce drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest()
In case of error, the function live_context() returns ERR_PTR() and never
returns NULL. The NULL test in the return value check should be replaced
with IS_ERR().

Fixes: 52c0fdb25c ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/33c46ef24cd547d0ad21dc106441491a@intel.com
[tursulin: Wrap commit text, fix Fixes: tag.]
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
(cherry picked from commit 8f4caef8d5)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2021-06-02 15:06:10 +03:00
Dongliang Mu
3ae72f6ab9 ALSA: control led: fix memory leak in snd_ctl_led_register
The snd_ctl_led_sysfs_add and snd_ctl_led_sysfs_remove should contain
the refcount operations in pair. However, snd_ctl_led_sysfs_remove fails
to decrease the refcount to zero, which causes device_release never to
be invoked. This leads to memory leak to some resources, like struct
device_private. In addition, we also free some other similar memory
leaks in snd_ctl_led_init/snd_ctl_led_exit.

Fix this by replacing device_del to device_unregister
in snd_ctl_led_sysfs_remove/snd_ctl_led_init/snd_ctl_led_exit.

Note that, when CONFIG_DEBUG_KOBJECT_RELEASE is enabled, put_device will
call kobject_release and delay the release of kobject, which will cause
use-after-free when the memory backing the kobject is freed at once.

Reported-by: syzbot+08a7d8b51ea048a74ffb@syzkaller.appspotmail.com
Fixes: a135dfb5de ("ALSA: led control - add sysfs kcontrol LED marking layer")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20210602034136.2762497-1-mudongliangabcd@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-02 09:37:40 +02:00
Max Gurtovoy
bcd9a0797d nvmet: fix freeing unallocated p2pmem
In case p2p device was found but the p2p pool is empty, the nvme target
is still trying to free the sgl from the p2p pool instead of the
regular sgl pool and causing a crash (BUG() is called). Instead, assign
the p2p_dev for the request only if it was allocated from p2p pool.

This is the crash that was caused:

[Sun May 30 19:13:53 2021] ------------[ cut here ]------------
[Sun May 30 19:13:53 2021] kernel BUG at lib/genalloc.c:518!
[Sun May 30 19:13:53 2021] invalid opcode: 0000 [#1] SMP PTI
...
[Sun May 30 19:13:53 2021] kernel BUG at lib/genalloc.c:518!
...
[Sun May 30 19:13:53 2021] RIP: 0010:gen_pool_free_owner+0xa8/0xb0
...
[Sun May 30 19:13:53 2021] Call Trace:
[Sun May 30 19:13:53 2021] ------------[ cut here ]------------
[Sun May 30 19:13:53 2021]  pci_free_p2pmem+0x2b/0x70
[Sun May 30 19:13:53 2021]  pci_p2pmem_free_sgl+0x4f/0x80
[Sun May 30 19:13:53 2021]  nvmet_req_free_sgls+0x1e/0x80 [nvmet]
[Sun May 30 19:13:53 2021] kernel BUG at lib/genalloc.c:518!
[Sun May 30 19:13:53 2021]  nvmet_rdma_release_rsp+0x4e/0x1f0 [nvmet_rdma]
[Sun May 30 19:13:53 2021]  nvmet_rdma_send_done+0x1c/0x60 [nvmet_rdma]

Fixes: c6e3f13398 ("nvmet: add metadata support for block devices")
Reviewed-by: Israel Rukshin <israelr@nvidia.com>
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2021-06-02 10:10:38 +03:00
Hannes Reinecke
6622f9acd2 nvme-loop: do not warn for deleted controllers during reset
During concurrent reset and delete calls the reset workqueue is
flushed, causing nvme_loop_reset_ctrl_work() to be executed when
the controller is in state DELETING or DELETING_NOIO.
But this is expected, so we shouldn't issue a WARN_ON here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2021-06-02 10:06:53 +03:00
Hannes Reinecke
4237de2f73 nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue()
We need to check the NVME_LOOP_Q_LIVE flag in
nvme_loop_destroy_admin_queue() to protect against duplicate
invocations eg during concurrent reset and remove calls.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2021-06-02 10:06:53 +03:00
Hannes Reinecke
1c5f8e882a nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails
When the call to nvme_enable_ctrl() in nvme_loop_configure_admin_queue()
fails the NVME_LOOP_Q_LIVE flag is not cleared.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2021-06-02 10:06:53 +03:00
Hannes Reinecke
a6c144f3d2 nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues()
The queue count is increased in nvme_loop_init_io_queues(), so we
need to reset it to 1 at the end of nvme_loop_destroy_io_queues().
Otherwise the function is not re-entrant safe, and crash will happen
during concurrent reset and remove calls.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2021-06-02 10:06:53 +03:00
Linus Torvalds
231bc53906 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID fixes from Jiri Kosina:

 - memory leak fix in usbhid from Anirudh Rayabharam

 - additions for a few new recognized generic key IDs from Dmitry
   Torokhov

 - Asus T101HA and Dell K15A quirks from Hans de Goede

 - memory leak fix in amd_sfh from Basavaraj Natikar

 - Win8 compatibility and Stylus fixes in multitouch driver from
   Ahelenia Ziemiańska

 - NULL pointer dereference fix in hid-magicmouse from Johan Hovold

 - assorted other small fixes and device ID additions

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (33 commits)
  HID: asus: Cleanup Asus T101HA keyboard-dock handling
  HID: magicmouse: fix NULL-deref on disconnect
  HID: intel-ish-hid: ipc: Add Alder Lake device IDs
  HID: i2c-hid: fix format string mismatch
  HID: amd_sfh: Fix memory leak in amd_sfh_work
  HID: amd_sfh: Use devm_kzalloc() instead of kzalloc()
  HID: ft260: improve error handling of ft260_hid_feature_report_get()
  HID: magicmouse: fix crash when disconnecting Magic Trackpad 2
  HID: gt683r: add missing MODULE_DEVICE_TABLE
  HID: pidff: fix error return code in hid_pidff_init()
  HID: logitech-hidpp: initialize level variable
  HID: multitouch: Disable event reporting on suspend on the Asus T101HA touchpad
  HID: core: Remove extraneous empty line before EXPORT_SYMBOL_GPL(hid_check_keys_pressed)
  HID: hid-sensor-custom: Process failure of sensor_hub_set_feature()
  HID: i2c-hid: Skip ELAN power-on command after reset
  HID: usbhid: fix info leak in hid_submit_ctrl
  HID: Add BUS_VIRTUAL to hid_connect logging
  HID: multitouch: set Stylus suffix for Stylus-application devices, too
  HID: multitouch: require Finger field to mark Win8 reports as MT
  HID: remove the unnecessary redefinition of a macro
  ...
2021-06-01 17:26:06 -10:00
Linus Torvalds
00151f515a Revert broken commit
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEEJZs3krPW0xkhLMTc1b+f6wMTZToFAmC2o+MUHGFncnVlbmJh
 QHJlZGhhdC5jb20ACgkQ1b+f6wMTZTqTKQ/9FQ3I5Q32cwyb1oFJbZ2avBsN948Z
 kjeBbCEg0W4j0Bsp9uxAm/qzgW6rAurMsoNK5G1DK4GbsTfdZbCkscX3kMVGbHzA
 PngT3CuoHDzghoGLc5kh9COnbyCN1EfSdbjkRRp6SYSkkY93YMcQruK7DV9cY2Kb
 2jDySAsAACooxRUNNk8eE04lNydJ4d6yTkcxhMliI/LQ8mLDyuY2fZWP+X7HGUIy
 nWOoz51sNJKK738+Fo/Wj6ppmqnvEgBNBVmGbeOwpwrFZiCaah2eBmh8FwvUe2Hg
 EtgU//TJBxaf8b/VIJg/ZDKpWCLy+7HQjSuSHM6XSTwuThJXalo1DGiZV+v8RF0q
 +Og4kF+s6k2U6A2RCiT/jgjg1tPwf52cPG2dJGKnvy4/yyDihcP96bDvenjEFBhx
 dUcWNBtuxcbACGlFoky6Y1er2tvWF5PrzB4zHZSVfoFAvXA607MJW4OMta0kfM5O
 COuD159j7Otc83+3PjiHZn5gB+NwHMuoJTwe4PWKKCYBdKT48yLmJ4Ud69uTVHSy
 F+SOhAuvchEtW4FH95pdzlbCdYgUGzpTdAveVq26Y4pp5fbZZoOY94Etwismri7j
 Q4sS7gLr6BsL09nbj1Snsu6MC1z5KoDJVtS8a8BSIaHnlF4GHDryxukS40p3Un70
 VzAmlGnTbWgrW8g=
 =DUZI
 -----END PGP SIGNATURE-----

Merge tag 'gfs2-v5.13-rc2-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2

Pull gfs2 fix from Andreas Gruenbacher:
 "Revert broken commit"

* tag 'gfs2-v5.13-rc2-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  Revert "gfs2: Fix mmap locking for write faults"
2021-06-01 17:20:40 -10:00
Larry Finger
4d96d3b0ef Bluetooth: Add a new USB ID for RTL8822CE
Some models of the RTL8822ce utilize a different USB ID. Add this
new one to the Bluetooth driver.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-01 17:11:48 -10:00
Andreas Gruenbacher
d5b8145455 Revert "gfs2: Fix mmap locking for write faults"
This reverts commit b7f55d928e.

As explained by Linus in [*], write faults on a mmap region are reads
from a filesysten point of view, so taking the inode glock exclusively
on write faults is incorrect.

Instead, when a page is marked writable, the .page_mkwrite vm operation
will be called, which is where the exclusive lock taking needs to
happen.  I got this wrong because of a broken test case that made me
believe .page_mkwrite isn't getting called when it actually is.

[*] https://lore.kernel.org/lkml/CAHk-=wj8EWr_D65i4oRSj2FTbrc6RdNydNNCGxeabRnwtoU=3Q@mail.gmail.com/

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
2021-06-01 23:16:42 +02:00
Matthew Wilcox
0b78f8bcf4 Revert "fb_defio: Remove custom address_space_operations"
Commit ccf953d8f3 makes framebuffers which use deferred I/O stop
displaying updates after the first one.  This is because the pages
handled by fb_defio no longer have a page_mapping().  That prevents
page_mkclean() from marking the PTEs as clean, and so writes are only
noticed the first time.

Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/YLZEhv0cpZp8uVE3@casper.infradead.org
2021-06-01 17:38:40 +02:00
Carlos M
901be145a4 ALSA: hda: Fix for mute key LED for HP Pavilion 15-CK0xx
For the HP Pavilion 15-CK0xx, with audio subsystem ID 0x103c:0x841c,
adding a line in patch_realtek.c to apply the ALC269_FIXUP_HP_MUTE_LED_MIC3
fix activates the mute key LED.

Signed-off-by: Carlos M <carlos.marr.pz@gmail.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210531202026.35427-1-carlos.marr.pz@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-01 08:22:36 +02:00
Stefan Binding
527ff95506 ALSA: hda/cirrus: Set Initial DMIC volume to -26 dB
Previously this fix was applied only to Bullseye variant laptops,
and should be applied to Cyborg and Warlock variants.

Fixes: 45b14fe200 ("ALSA: hda/cirrus: Use CS8409 filter to fix abnormal sounds on Bullseye")
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210531163754.136736-1-vitalyr@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-06-01 08:21:10 +02:00
Takashi Iwai
08a4b904a2 ALSA: hda: Fix a regression in Capture Switch mixer read
The recent commit to drop the HDA-specific mute-LED control,
e65bf99718 ("ALSA: HDA - remove the custom implementation for the
audio LED trigger"), caused a regression on the mixer element read for
"Capture Switch" when it's built from bind controls.  The function
create_bind_cap_vol_ctl() creates the snd_kcontrol_new object directly
via snd_hda_gen_add_kctl() instead of add_control().  Although the
commit above added a workaround for the SNDRV_CTL_ACCESS_READWRITE in
add_control() as default, this code path fell out from the radar.  As
a result, now the driver gives -EPERM error because of the lack of the
proper access bit at reading "Capture Switch" element value.

Fix the regression by setting the access bit properly.

Fixes: e65bf99718 ("ALSA: HDA - remove the custom implementation for the audio LED trigger")
BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1186634
Link: https://lore.kernel.org/r/20210531180633.27831-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-05-31 20:07:47 +02:00
Linus Torvalds
c2131f7e73 Various gfs2 fixes
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCAAyFiEEJZs3krPW0xkhLMTc1b+f6wMTZToFAmC0vkAUHGFncnVlbmJh
 QHJlZGhhdC5jb20ACgkQ1b+f6wMTZTqCGQ/+JiCdfHQao3/W9KsIeA5YO5fbsQXi
 tElY61L4eM7F+gEe1mbMzr8sefbejv73aAMGWJJD06gLPz/wIPeW/fYnC4/gcQEn
 +jLjVb7taGaxOn0fioCqjU+esGW4wstYrAXLp6XZmLnMETmr7PCbOhohRG7sK1TX
 m8si6riMOiNw20MOHhUK9DFZ3rF4Q5Rp/vYaTDwoGpcORIv5bpPoQKYT1FMCTD9h
 5qI6ldOO2E4d9qXQXiCv2RqXElYqQxwxqvGP0Hj+HQLZQBCmJJYZNDqRwDunJTaN
 K9++1/XbTCFKEQz0UWz1x1k5fCDIewbzxX348aQjiLMkkpXr885AGhasAX8gRS3p
 D7Y4q6VCY3J5JzlCDfNWrTBd0abLJAjeJ70R71/kN/hgIY2PbU/CaPcyhUrp7rwH
 B6spZDXb2fBNdfYA5wmuUdSA9BRmw/MDpiGd9aQc5nv25YvZ5Apl9X4QSH2250vo
 MKTrlt90EyTmOgF6vRf28apVr41JO3PIXgMu+svZq769Ox2jSZJQT0UI4vzVThoP
 RGBsTDPtDL67OvNoC6H7Poc7ad+BRqtFxkwNCz7kkcwQlYkmVPUf49UC/pBnBV3M
 HtlkJdlhD7VEWqUPl3T02rTdLRXLuPIGw9Kk6gKiDCikONoD+icJ3fV7rWShMjhD
 O/KT/r3XM1V1sP8=
 =vV+Y
 -----END PGP SIGNATURE-----

Merge tag 'gfs2-v5.13-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2

Pull gfs2 fixes from Andreas Gruenbacher:
 "Various gfs2 fixes"

* tag 'gfs2-v5.13-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
  gfs2: Fix use-after-free in gfs2_glock_shrink_scan
  gfs2: Fix mmap locking for write faults
  gfs2: Clean up revokes on normal withdraws
  gfs2: fix a deadlock on withdraw-during-mount
  gfs2: fix scheduling while atomic bug in glocks
  gfs2: Fix I_NEW check in gfs2_dinode_in
  gfs2: Prevent direct-I/O write fallback errors from getting lost
2021-05-31 05:57:22 -10:00
Linus Torvalds
36c795513a \n
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEq1nRK9aeMoq1VSgcnJ2qBz9kQNkFAmC0vhsACgkQnJ2qBz9k
 QNlI9ggAjZSqIvNNs1w6VafSRY7XP5vItKAe0jhguD0o1ZtUI1gM1JlOJzbgt2z5
 gpm/4v4485h5JUXNrB5TeQ1woOOvFKzlUcIr+ZgUiyq2UgZj6PzvK599u2TFf1vc
 gLMAUx5YgWafr048orhcSBqaYic04LESQ17op+9UjgBB7ATbNjJmEBb/+WvGh9os
 8c4V9JrCTMdNJ5Rpc5+JsWAksgZKrW9VjTw8mHisWB0NIIPQWGCML8Z4ACzNObCW
 CrXL9xWgaQDov1okJSA0ZNkdatGhh4h/NxIZ2sLGg2F3bDfZwN+kFu6gqpxhTEVV
 v83aTAP3UxbK8bwRj0+lm/LImxULjA==
 =t4P5
 -----END PGP SIGNATURE-----

Merge tag 'fsnotify_for_v5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull fsnotify fixes from Jan Kara:
 "A fix for permission checking with fanotify unpriviledged groups.

  Also there's a small update in MAINTAINERS file for fanotify"

* tag 'fsnotify_for_v5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
  fanotify: fix permission model of unprivileged group
  MAINTAINERS: Add Matthew Bobrowski as a reviewer
2021-05-31 05:52:22 -10:00
Dmitry Osipenko
671cc352ac drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT
The format modifier is 64bit, while DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT
uses BIT() macro that is 32bit on ARM32.

The (modifier &= ~DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) doesn't work as
expected on ARM32 and tegra_fb_get_tiling() fails for the tiled formats
on 32bit Tegra because modifier mask isn't applied properly. Use the
BIT_ULL() macro to fix this trouble.

Fixes: 7b6f846785 ("drm/tegra: Support sector layout on Tegra194")
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2021-05-31 14:29:44 +02:00
Erik Kaneda
e4dfe10837 ACPICA: Clean up context mutex during object deletion
ACPICA commit bc43c878fd4ff27ba75b1d111b97ee90d4a82707

Fixes: c27f3d011b ("Fix race in GenericSerialBus (I2C) and GPIO OpRegion parameter handling")
Link: https://github.com/acpica/acpica/commit/bc43c878
Reported-by: John Garry <john.garry@huawei.com>
Reported-by: Xiang Chen <chenxiang66@hisilicon.com>
Tested-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-05-31 13:56:33 +02:00