David Laight
af4e9ef3d7
uaccess: Fix scoped_user_read_access() for 'pointer to const'
...
If a 'const struct foo __user *ptr' is used for the address passed to
scoped_user_read_access() then you get a warning/error
uaccess.h:691:1: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
for the
void __user *_tmpptr = __scoped_user_access_begin(mode, uptr, size, elbl)
assignment.
Fix by using 'auto' for both _tmpptr and the redeclaration of uptr.
Replace the CLASS() with explicit __cleanup() functions on uptr.
Fixes: e497310b4f ("uaccess: Provide scoped user access regions")
Signed-off-by: David Laight <david.laight.linux@gmail.com >
Reviewed-and-tested-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2026-03-02 09:24:32 -08:00
..
2026-02-11 13:44:47 +01:00
2026-02-05 11:58:40 +01:00
2026-02-09 12:29:22 +01:00
2026-02-11 11:43:00 -08:00
2026-02-09 14:43:47 -08:00
2026-01-31 00:02:24 +01:00
2026-02-02 17:08:30 +01:00
2026-02-19 07:26:26 -07:00
2026-02-17 11:00:43 +01:00
2026-02-08 00:13:33 -08:00
2026-02-16 11:05:44 -08:00
2026-02-19 09:30:05 -08:00
2026-02-23 13:45:50 +01:00
2026-01-29 20:21:41 +01:00
2026-02-17 15:04:20 +01:00
2026-02-06 12:07:14 +01:00
2026-02-17 09:11:04 -08:00
2026-02-05 00:07:58 +00:00
2026-02-10 19:01:45 -08:00
2026-02-17 11:40:04 -08:00
2026-02-21 01:02:28 -08:00
2026-02-12 17:49:33 -08:00
2026-02-17 09:36:43 -08:00
2026-02-21 17:09:51 -08:00
2019-12-04 13:32:45 +10:00
2022-01-22 08:33:34 +02:00
2019-05-24 17:27:11 +02:00
2026-01-09 16:37:59 -05:00
2026-02-11 19:31:52 -08:00
2026-01-31 14:22:36 -08:00
2026-02-09 18:14:52 -08:00
2026-02-16 10:21:01 -07:00
2026-02-12 04:23:53 -07:00
2026-02-27 15:39:00 -08:00
2026-02-27 15:39:00 -08:00
2026-02-04 13:35:28 -08:00
2026-02-27 15:39:00 -08:00
2025-07-16 14:48:18 +02:00
2026-02-05 14:10:00 -08:00
2026-02-14 07:43:27 -07:00
2025-03-08 14:37:39 +01:00
2023-08-24 16:20:25 -07:00
2026-01-31 16:16:07 -08:00
2025-11-25 09:17:13 +01:00
2026-02-11 13:20:50 -08:00
2026-02-15 08:18:57 -08:00
2026-02-12 11:32:37 -08:00
2026-02-21 01:01:14 -08:00
2026-01-31 16:16:04 -08:00
2026-02-10 17:02:23 -08:00
2023-12-19 15:31:40 +01:00
2026-02-14 11:09:47 +01:00
2026-02-03 15:23:33 +01:00
2026-02-18 20:50:32 -08:00
2026-02-21 17:09:51 -08:00
2017-11-02 11:10:55 +01:00
2025-05-13 20:37:16 -07:00
2025-06-11 11:06:06 +08:00
2026-01-31 14:22:47 -08:00
2026-02-12 15:42:58 -08:00
2026-01-31 16:16:06 -08:00
2020-12-11 14:10:44 +01:00
2026-02-12 15:52:39 -08:00
2026-02-21 17:09:51 -08:00
2026-02-13 14:51:39 -08:00
2026-02-05 15:57:46 +01:00
2026-01-30 15:40:05 +01:00
2025-08-02 12:06:12 -07:00
2026-02-14 11:09:47 +01:00
2026-02-09 15:13:05 -08:00
2026-02-12 12:13:01 -08:00
2022-11-16 15:53:33 -08:00
2025-11-05 22:51:23 +01:00
2026-02-18 10:45:36 -08:00
2025-05-21 14:35:34 +02:00
2026-01-23 13:26:20 +01:00
2026-02-19 09:12:05 +01:00
2026-02-17 23:11:40 -08:00
2026-02-19 15:21:22 -05:00
2026-02-21 17:09:51 -08:00
2026-02-26 17:30:32 +01:00
2026-02-26 15:27:41 -08:00
2025-11-25 15:16:03 -08:00
2019-05-30 11:26:35 -07:00
2024-08-29 10:39:37 +02:00
2026-01-31 10:52:31 +08:00
2026-02-10 16:41:59 -08:00
2026-02-12 15:42:57 -08:00
2026-02-18 20:50:32 -08:00
2026-02-06 18:52:22 +08:00
2026-02-02 10:11:18 +01:00
2026-02-02 10:01:44 +01:00
2026-02-02 10:11:07 +01:00
2026-02-02 10:11:18 +01:00
2026-02-05 16:33:52 +01:00
2026-01-12 16:52:09 +01:00
2025-10-14 14:45:22 -07:00
2026-02-11 21:03:39 +01:00
2026-02-10 13:39:37 -08:00
2026-02-09 17:31:17 -08:00
2026-02-06 07:29:14 -07:00
2026-02-21 17:09:51 -08:00
2026-02-09 18:14:52 -08:00
2026-02-12 16:33:05 -08:00
2025-10-22 07:53:15 +02:00
2019-05-30 11:26:32 -07:00
2026-02-10 20:57:49 -08:00
2026-02-10 16:30:29 -08:00
2026-02-11 08:55:52 +01:00
2017-11-02 11:10:55 +01:00
2025-11-19 09:19:42 -05:00
2026-01-31 16:16:06 -08:00
2026-01-31 16:16:04 -08:00
2026-01-31 14:22:30 -08:00
2017-11-02 11:10:55 +01:00
2022-02-23 10:58:28 +01:00
2026-02-03 15:23:35 +01:00
2026-02-28 15:31:35 +01:00
2017-11-02 11:10:55 +01:00
2025-06-19 10:37:06 +01:00
2026-02-04 09:20:27 +00:00
2026-02-12 17:12:43 -08:00
2022-09-16 22:27:19 +02:00
2024-08-02 16:32:29 -07:00
2026-02-14 11:09:46 +01:00
2026-02-08 00:13:32 -08:00
2021-06-11 04:35:40 +09:00
2026-02-05 08:00:44 -08:00
2026-02-24 11:13:26 -08:00
2022-12-08 21:49:25 -05:00
2026-02-11 11:27:58 +01:00
2026-02-18 20:50:32 -08:00
2026-02-12 15:42:53 -08:00
2025-08-21 10:42:31 +02:00
2026-02-12 15:42:59 -08:00
2026-02-18 20:50:32 -08:00
2026-01-31 14:22:51 -08:00
2026-02-03 15:23:35 +01:00
2026-02-12 15:43:00 -08:00
2026-01-31 14:22:38 -08:00
2026-02-03 12:46:55 +01:00
2026-02-12 12:13:01 -08:00
2026-02-12 12:13:01 -08:00
2025-05-16 17:53:48 -07:00
2026-02-10 16:30:29 -08:00
2019-10-23 17:23:44 +02:00
2025-10-21 18:08:23 -07:00
2026-01-30 16:49:15 -05:00
2026-01-30 16:49:15 -05:00
2023-02-21 14:45:22 -08:00
2026-02-20 17:31:55 -05:00
2026-02-03 20:58:12 -06:00
2026-01-30 11:34:34 +00:00
2026-02-24 15:46:31 -08:00
2025-11-13 11:01:08 +01:00
2026-01-31 14:22:42 -08:00
2025-09-13 16:55:21 -07:00
2026-02-03 08:21:26 -08:00
2025-10-02 15:28:42 -06:00
2026-02-11 19:31:52 -08:00
2024-11-16 10:09:30 -06:00
2026-02-12 16:33:05 -08:00
2026-02-03 15:23:33 +01:00
2026-02-11 12:45:40 -05:00
2025-08-27 22:45:44 -07:00
2026-02-12 15:43:00 -08:00
2026-02-10 11:39:30 +01:00
2026-02-10 11:39:31 +01:00
2026-02-10 11:39:30 +01:00
2026-02-23 14:08:17 +01:00
2026-02-04 13:25:09 +01:00
2025-03-12 20:41:14 +01:00
2025-02-21 10:46:49 +01:00
2025-12-22 13:32:22 +01:00
2026-02-16 13:41:38 -08:00
2025-02-05 10:45:12 +01:00
2022-02-23 10:58:28 +01:00
2026-01-10 11:20:14 +01:00
2020-10-04 19:51:43 -07:00
2026-02-23 11:19:19 +01:00
2026-02-10 12:50:10 -08:00
2026-02-23 11:19:19 +01:00
2026-02-05 09:43:48 +01:00
2026-01-28 20:45:25 +01:00
2026-02-23 11:19:18 +01:00
2026-02-06 10:07:22 +01:00
2022-02-23 10:58:28 +01:00
2026-01-28 20:45:25 +01:00
2024-10-04 00:58:14 -07:00
2026-02-12 15:42:58 -08:00
2026-02-05 09:54:08 -08:00
2026-02-21 01:02:52 -08:00
2026-02-26 17:30:32 +01:00
2026-02-03 08:21:26 -08:00
2017-11-02 11:10:55 +01:00
2024-11-11 17:17:04 -08:00
2022-06-10 14:51:35 +02:00
2026-02-04 20:55:48 -08:00
2026-02-11 10:14:35 +01:00
2022-02-23 10:58:28 +01:00
2026-01-31 14:22:57 -08:00
2023-08-21 13:37:26 -07:00
2020-01-06 13:33:14 -08:00
2023-12-20 19:26:31 -05:00
2026-02-10 17:02:23 -08:00
2026-01-06 11:27:10 +01:00
2026-01-31 16:16:05 -08:00
2026-02-03 15:13:25 +01:00
2024-11-07 14:25:15 -08:00
2025-09-03 11:55:11 +02:00
2025-11-20 20:17:32 +01:00
2026-02-27 16:11:50 -08:00
2025-12-05 06:42:51 +02:00
2026-02-19 15:25:11 -05:00
2026-01-31 16:16:06 -08:00
2026-01-26 17:00:50 -05:00
2026-01-30 10:44:11 -05:00
2026-02-12 15:43:02 -08:00
2026-02-15 10:20:37 -08:00
2026-02-12 12:13:01 -08:00
2026-02-06 13:34:55 +01:00
2026-03-02 09:24:32 -08:00
2024-10-28 13:36:54 +01:00
2026-02-17 09:11:04 -08:00
2025-09-29 11:20:29 -07:00
2017-11-02 11:10:55 +01:00
2024-11-13 15:25:41 -07:00
2026-01-31 14:22:36 -08:00
2026-02-12 11:32:37 -08:00
2023-10-19 11:02:48 +02:00
2026-01-20 15:47:51 +02:00
2026-02-03 15:23:34 +01:00
2026-01-20 19:24:47 -08:00
2026-02-12 12:13:01 -08:00
2026-01-30 18:26:59 -08:00