Re: [PATCH v3 2/2] selftests: Add a test mangling with uc_sigmask

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

 




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.






[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux