Re: [PATCH v3 2/2] selftests: Add a test mangling with uc_sigmask
From: Dev Jain
Date: Wed Jun 26 2024 - 09:37:19 EST
On 6/26/24 17:24, Oleg Nesterov wrote:
On 06/26, Dev Jain wrote:
+int main(int argc, char *argv[])
+{
+ struct sigaction act, act2;
+ sigset_t *set, *oldset;
...
+ set = malloc(sizeof(sigset_t *));
+ if (!set)
+ ksft_exit_fail_perror("malloc");
+
+ oldset = malloc(sizeof(sigset_t *));
Why malloc() ?
Can't you simply do
sigset_t set, oldset;
and then use sigemptyset(&set) / etc ?
Oleg.
Ah yes, let us allocate it on the stack. I shall change it.