[LTP] [RFC PATCH 1/9] tst_safe_sysv_ipc: Make safe_shmctl() and safe_msgctl() safer

Petr Vorel pvorel@suse.cz
Wed Jun 13 12:32:12 CEST 2018


Hi Cyril,

> We recently had a regression in Sys V IPC when IPC_STAT returned
> non-zero integer on success wrongly, which wasn't caught by LTP test but
> breaks software in the wild.

> This commit changes safe_shmctl() and safe_msgctl() to check the return
> value with != 0 for IPC_STAT, IPC_SET and IPC_RMID and with == -1
> otherwise.
LGTM. I'm surprised this is the first time, I'd expect it for more syscalls.

> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
> ---


Kind regards,
Petr


More information about the ltp mailing list