[LTP] [PATCH] flock07: Initialiaze the sigaction structure
Andrea Cervesato
andrea.cervesato@suse.com
Wed Feb 5 12:48:23 CET 2025
Hi!
Pushed, thanks.
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
On 2/5/25 11:53, Avinesh Kumar wrote:
> Hi,
>
> On Wednesday, February 5, 2025 11:19:36 AM CET Martin Doucha wrote:
>> The sigaction structure for child SIGUSR1 handler was uninitialized,
>> which sometimes resulted in SA_RESTART flag being enabled by accident
>> and the child flock() call never returning. Make sure the sigaction
>> structure is properly initialized.
>>
>> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> Reviewed-by: Avinesh Kumar <akumar@suse.de>
>
> Thanks,
> Avinesh
>> ---
>> testcases/kernel/syscalls/flock/flock07.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/testcases/kernel/syscalls/flock/flock07.c b/testcases/kernel/syscalls/flock/flock07.c
>> index 652fe3777..368147370 100644
>> --- a/testcases/kernel/syscalls/flock/flock07.c
>> +++ b/testcases/kernel/syscalls/flock/flock07.c
>> @@ -42,7 +42,7 @@ static void cleanup(void)
>>
>> static void child_do(int fd)
>> {
>> - struct sigaction sa;
>> + struct sigaction sa = {};
>>
>> sa.sa_handler = handler;
>> SAFE_SIGEMPTYSET(&sa.sa_mask);
>>
>
>
>
>
More information about the ltp
mailing list