James Bottomley
ab765320c0
efivarfs: Fix error on non-existent file
...
commit 2ab0837cb91b7de507daa145d17b3b6b2efb3abf upstream.
When looking up a non-existent file, efivarfs returns -EINVAL if the
file does not conform to the NAME-GUID format and -ENOENT if it does.
This is caused by efivars_d_hash() returning -EINVAL if the name is not
formatted correctly. This error is returned before simple_lookup()
returns a negative dentry, and is the error value that the user sees.
Fix by removing this check. If the file does not exist, simple_lookup()
will return a negative dentry leading to -ENOENT and efivarfs_create()
already has a validity check before it creates an entry (and will
correctly return -EINVAL)
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: <stable@vger.kernel.org>
[ardb: make efivarfs_valid_name() static]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-27 13:52:55 +01:00
..
2024-11-22 15:37:34 +01:00
2022-05-09 16:21:44 -04:00
2023-02-01 08:34:08 +01:00
2024-11-08 16:26:43 +01:00
2023-09-23 11:10:59 +02:00
2022-08-02 12:34:03 -04:00
2022-05-09 16:21:44 -04:00
2024-12-14 19:54:50 +01:00
2024-12-14 19:53:15 +01:00
2024-12-14 19:54:14 +01:00
2023-03-10 09:33:52 +01:00
2022-12-31 13:32:22 +01:00
2023-03-10 09:34:09 +01:00
2024-10-17 15:21:17 +02:00
2024-01-20 11:50:04 +01:00
2024-02-16 19:06:29 +01:00
2024-10-17 15:21:17 +02:00
2024-12-27 13:52:55 +01:00
2022-05-09 16:21:45 -04:00
2024-10-17 15:22:09 +02:00
2024-12-19 18:08:51 +01:00
2024-03-06 14:45:15 +00:00
2024-08-03 08:49:32 +02:00
2024-12-14 19:53:58 +01:00
2024-12-14 19:54:47 +01:00
2024-10-22 15:56:43 +02:00
2022-08-02 12:34:03 -04:00
2024-12-14 19:53:15 +01:00
2024-09-12 11:10:30 +02:00
2024-08-29 17:30:56 +02:00
2024-08-03 08:49:32 +02:00
2024-12-14 19:53:16 +01:00
2022-09-19 22:46:25 +02:00
2022-05-09 16:21:45 -04:00
2024-05-17 11:55:51 +02:00
2024-11-08 16:26:42 +01:00
2024-04-13 13:05:06 +02:00
2024-10-17 15:21:56 +02:00
2024-12-14 19:54:52 +01:00
2024-12-14 19:54:43 +01:00
2024-08-29 17:30:35 +02:00
2024-08-19 06:00:04 +02:00
2022-09-24 07:00:00 +02:00
2023-10-06 14:56:32 +02:00
2024-12-14 19:54:09 +01:00
2024-12-14 19:54:16 +01:00
2024-12-14 19:54:34 +01:00
2023-09-13 09:42:22 +02:00
2024-12-14 19:53:59 +01:00
2022-10-12 11:00:22 -07:00
2024-12-14 19:54:55 +01:00
2024-12-14 19:54:52 +01:00
2022-05-09 16:21:44 -04:00
2024-06-12 11:03:03 +02:00
2024-07-11 12:47:08 +02:00
2024-12-14 19:54:16 +01:00
2024-12-14 19:54:15 +01:00
2024-04-13 13:04:57 +02:00
2022-05-09 16:21:44 -04:00
2022-09-11 21:55:07 -07:00
2024-12-14 19:54:10 +01:00
2023-07-19 16:22:11 +02:00
2024-08-29 17:30:20 +02:00
2022-05-09 16:21:46 -04:00
2024-12-19 18:08:51 +01:00
2024-09-12 11:10:25 +02:00
2024-04-27 17:07:16 +02:00
2024-04-13 13:05:05 +02:00
2023-09-23 11:11:12 +02:00
2024-12-14 19:54:08 +01:00
2024-12-14 19:54:51 +01:00
2022-09-11 20:26:07 -07:00
2024-12-14 19:54:50 +01:00
2024-04-10 16:28:25 +02:00
2023-09-13 09:43:03 +02:00
2024-12-19 18:08:50 +01:00
2024-02-23 09:12:45 +01:00
2024-04-03 15:19:42 +02:00
2022-08-20 11:34:04 -04:00
2023-09-23 11:11:10 +02:00
2022-09-24 07:00:00 +02:00
2024-08-29 17:30:35 +02:00
2024-09-12 11:10:19 +02:00
2024-08-19 06:00:07 +02:00
2024-08-29 17:30:30 +02:00
2022-10-12 11:00:22 -07:00
2022-12-31 13:32:41 +01:00
2023-02-22 12:59:50 +01:00
2022-08-20 11:34:33 -04:00
2024-11-08 16:26:42 +01:00
2024-07-25 09:49:18 +02:00
2022-09-20 08:24:38 -06:00
2023-09-13 09:42:27 +02:00
2024-12-14 19:54:37 +01:00
2024-11-01 01:56:02 +01:00
2024-10-17 15:21:23 +02:00
2024-03-26 18:20:27 -04:00
2022-08-16 10:59:54 -04:00
2024-10-17 15:22:03 +02:00
2023-09-13 09:42:28 +02:00
2023-01-07 11:11:59 +01:00
2023-11-20 11:51:50 +01:00
2022-05-19 23:25:10 -04:00
2024-12-14 19:53:13 +01:00
2023-08-30 16:11:10 +02:00
2024-01-31 16:17:00 -08:00
2023-06-28 11:12:40 +02:00
2022-10-10 14:21:11 -07:00
2022-06-16 19:58:21 -07:00
2022-12-31 13:31:58 +01:00
2024-07-27 11:32:19 +02:00
2023-06-28 11:12:40 +02:00
2023-01-07 11:12:02 +01:00
2022-07-05 16:18:21 -04:00
2022-08-03 10:35:43 -07:00
2024-10-17 15:21:17 +02:00
2024-10-17 15:20:37 +02:00
2022-08-20 11:34:04 -04:00
2024-11-01 01:56:06 +01:00
2024-04-10 16:28:30 +02:00
2023-01-04 11:29:01 +01:00
2022-10-10 17:53:04 -07:00
2022-06-28 13:58:05 -04:00
2023-02-09 11:28:04 +01:00
2022-08-17 17:25:04 -04:00
2022-08-05 16:32:45 -07:00
2024-03-26 18:20:28 -04:00
2023-02-09 11:28:04 +01:00
2024-01-10 17:10:31 +01:00
2022-09-11 19:47:12 -05:00
2023-05-24 17:32:51 +01:00
2024-08-03 08:49:53 +02:00
2022-04-26 13:36:25 -07:00
2024-07-18 13:18:41 +02:00
2022-12-31 13:31:55 +01:00