diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-07-29 20:49:58 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-07-29 20:49:58 -0700 |
| commit | a26321ee4c935a63c29ed6518f27e38826b36e68 (patch) | |
| tree | f01a967746d2d158020d1afcbb891b082a772481 /drivers/staging | |
| parent | beb6c8326eb4e7006c4aa16b0fee3e303d42e685 (diff) | |
| parent | f627b51aaa041cba715b59026cf2d9cb1476c7ed (diff) | |
| download | linux-a26321ee4c935a63c29ed6518f27e38826b36e68.tar.gz linux-a26321ee4c935a63c29ed6518f27e38826b36e68.tar.bz2 linux-a26321ee4c935a63c29ed6518f27e38826b36e68.zip | |
Merge tag 'hardening-v6.17-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull hardening fixes from Kees Cook:
"Notably, this contains the fix for for the GCC __init mess I created
with the kstack_erase annotations.
- staging: media: atomisp: Fix stack buffer overflow in
gmin_get_var_int().
I was asked to carry this fix, so here it is. :)
- fortify: Fix incorrect reporting of read buffer size
- kstack_erase: Fix missed export of renamed KSTACK_ERASE_CFLAGS
- compiler_types: Provide __no_kstack_erase to disable coverage only
on Clang"
* tag 'hardening-v6.17-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
compiler_types: Provide __no_kstack_erase to disable coverage only on Clang
fortify: Fix incorrect reporting of read buffer size
kstack_erase: Fix missed export of renamed KSTACK_ERASE_CFLAGS
staging: media: atomisp: Fix stack buffer overflow in gmin_get_var_int()
Diffstat (limited to 'drivers/staging')
| -rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c index 5f59519ac8e2..964cc3bcc0ac 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c +++ b/drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c @@ -1272,14 +1272,15 @@ static int gmin_get_config_var(struct device *maindev, if (efi_rt_services_supported(EFI_RT_SUPPORTED_GET_VARIABLE)) status = efi.get_variable(var16, &GMIN_CFG_VAR_EFI_GUID, NULL, (unsigned long *)out_len, out); - if (status == EFI_SUCCESS) + if (status == EFI_SUCCESS) { dev_info(maindev, "found EFI entry for '%s'\n", var8); - else if (is_gmin) + return 0; + } + if (is_gmin) dev_info(maindev, "Failed to find EFI gmin variable %s\n", var8); else dev_info(maindev, "Failed to find EFI variable %s\n", var8); - - return ret; + return -ENOENT; } int gmin_get_var_int(struct device *dev, bool is_gmin, const char *var, int def) |
