ACK: [PATCH] lib: fwts_efi_module: fix flags on device open
ivanhu
ivan.hu at canonical.com
Mon Nov 30 06:04:09 UTC 2020
On 11/28/20 2:59 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Currently O_WRONLY | O_RDWR is being incorrectly used to open the efi
> test driver. This works on Linux because O_RDWR is O_RDONLY | O_WRONLY.
> Fix the open to correctly use O_RDWR.
>
> Kudos to Heinrich Schuchardt for spotting the issue and reporting
> a suitable fix.
>
> Fixes: 9158394f1c86 ("efi: enable module loading to load legacy or new efi driver")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_efi_module.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_efi_module.c b/src/lib/src/fwts_efi_module.c
> index 0767787b..d47b4f5c 100644
> --- a/src/lib/src/fwts_efi_module.c
> +++ b/src/lib/src/fwts_efi_module.c
> @@ -172,7 +172,7 @@ int fwts_lib_efi_runtime_open(void)
> if (!efi_dev_name)
> return -1;
>
> - return open(efi_dev_name, O_WRONLY | O_RDWR);
> + return open(efi_dev_name, O_RDWR);
> }
>
> /*
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list