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-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-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
2026-02-11 19:31:52 -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
2026-02-05 14:10:00 -08:00
2026-02-14 07:43:27 -07: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-02-10 17:02:23 -08: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
2026-02-12 15:42:58 -08: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-02-14 11:09:47 +01:00
2026-02-09 15:13:05 -08:00
2026-02-12 12:13:01 -08:00
2026-02-18 10:45:36 -08: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
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-05 16:33:52 +01: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
2026-02-10 20:57:49 -08:00
2026-02-10 16:30:29 -08:00
2026-02-11 08:55:52 +01:00
2026-02-03 15:23:35 +01:00
2026-02-28 15:31:35 +01:00
2026-02-04 09:20:27 +00:00
2026-02-12 17:12:43 -08:00
2026-02-14 11:09:46 +01:00
2026-02-08 00:13:32 -08:00
2026-02-05 08:00:44 -08:00
2026-02-24 11:13:26 -08: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
2026-02-12 15:42:59 -08:00
2026-02-18 20:50:32 -08:00
2026-02-03 15:23:35 +01:00
2026-02-12 15:43:00 -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
2026-02-10 16:30:29 -08:00
2026-02-20 17:31:55 -05:00
2026-02-03 20:58:12 -06:00
2026-02-24 15:46:31 -08:00
2026-02-03 08:21:26 -08:00
2026-02-11 19:31:52 -08: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
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
2026-02-16 13:41:38 -08: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-02-23 11:19:18 +01:00
2026-02-06 10:07:22 +01: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
2026-02-04 20:55:48 -08:00
2026-02-11 10:14:35 +01:00
2026-02-10 17:02:23 -08:00
2026-02-03 15:13:25 +01:00
2026-02-27 16:11:50 -08:00
2026-02-19 15:25: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
2026-02-17 09:11:04 -08:00
2026-02-12 11:32:37 -08:00
2026-02-03 15:23:34 +01:00
2026-02-12 12:13:01 -08:00