Patch "selftests/resctrl: Fix uninitialized .sa_flags" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/resctrl: Fix uninitialized .sa_flags

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-resctrl-fix-uninitialized-.sa_flags.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From beb7f471847663559bd0fe60af1d70e05a1d7c6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Date: Mon, 2 Oct 2023 12:48:07 +0300
Subject: selftests/resctrl: Fix uninitialized .sa_flags
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>

commit beb7f471847663559bd0fe60af1d70e05a1d7c6c upstream.

signal_handler_unregister() calls sigaction() with uninitializing
sa_flags in the struct sigaction.

Make sure sa_flags is always initialized in signal_handler_unregister()
by initializing the struct sigaction when declaring it. Also add the
initialization to signal_handler_register() even if there are no know
bugs in there because correctness is then obvious from the code itself.

Fixes: 73c55fa5ab55 ("selftests/resctrl: Commonize the signal handler register/unregister for all tests")
Suggested-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 tools/testing/selftests/resctrl/resctrl_val.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/tools/testing/selftests/resctrl/resctrl_val.c
+++ b/tools/testing/selftests/resctrl/resctrl_val.c
@@ -482,7 +482,7 @@ void ctrlc_handler(int signum, siginfo_t
  */
 int signal_handler_register(void)
 {
-	struct sigaction sigact;
+	struct sigaction sigact = {};
 	int ret = 0;
 
 	sigact.sa_sigaction = ctrlc_handler;
@@ -504,7 +504,7 @@ int signal_handler_register(void)
  */
 void signal_handler_unregister(void)
 {
-	struct sigaction sigact;
+	struct sigaction sigact = {};
 
 	sigact.sa_handler = SIG_DFL;
 	sigemptyset(&sigact.sa_mask);


Patches currently in stable-queue which might be from ilpo.jarvinen@xxxxxxxxxxxxxxx are

queue-6.6/pci-mvebu-use-field_prep-with-link-width.patch
queue-6.6/platform-x86-thinkpad_acpi-add-battery-quirk-for-thi.patch
queue-6.6/pci-do-error-check-on-own-line-to-split-long-if-cond.patch
queue-6.6/selftests-resctrl-reduce-failures-due-to-outliers-in-mba-mbm-tests.patch
queue-6.6/media-cobalt-use-field_get-to-extract-link-width.patch
queue-6.6/pci-use-field_get-in-sapphire-rx-5600-xt-pulse-quirk.patch
queue-6.6/pci-tegra194-use-field_get-field_prep-with-link-widt.patch
queue-6.6/atm-iphase-do-pci-error-checks-on-own-line.patch
queue-6.6/selftests-resctrl-fix-uninitialized-.sa_flags.patch
queue-6.6/pci-use-field_get-to-extract-link-width.patch
queue-6.6/selftests-resctrl-fix-feature-checks.patch
queue-6.6/selftests-resctrl-move-_gnu_source-define-into-makefile.patch
queue-6.6/rdma-hfi1-use-field_get-to-extract-link-width.patch
queue-6.6/selftests-resctrl-remove-duplicate-feature-check-from-cmt-test.patch
queue-6.6/selftests-resctrl-refactor-feature-check-to-use-resource-and-feature-name.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux