snd_timer01: Add missing tst_fzsync_start_race_*() calls
PATCH 1/1 snd_timer01: Add missing tst_fzsync_start_race_*() calls
Signed-off-by Martin Doucha <[email protected]>
---
The missing start_race() calls made the test essentially useless. Now it works correctly, tested on SLE-12SP2 GM kernel which was vulnerable.
testcases/kernel/sound/snd_timer01.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
testcases/kernel/sound/snd_timer01.c +3 -6
@@ -50,15 +50,11 @@ static void *ioctl_thread(void *unused) tp.filter =0xf ;while (tst_fzsync_run_b (&fzsync_pair)) { - +tst_fzsync_start_race_b (&fzsync_pair);ioctl (snd_fd,SNDRV_TIMER_IOCTL_TREAD , &tread_arg); -ioctl (snd_fd,SNDRV_TIMER_IOCTL_SELECT , &ts); -ioctl (snd_fd,SNDRV_TIMER_IOCTL_PARAMS , &tp); -ioctl (snd_fd,SNDRV_TIMER_IOCTL_START ,0 ); -tst_fzsync_end_race_b (&fzsync_pair); }return unused;
@@ -101,8 +97,9 @@ static void run(void)while (tst_fzsync_run_a (&fzsync_pair)) { nz =0 ;memset (read_buf,0 ,sizeof (read_buf)); - size =readv (snd_fd, &iov,1 ); +tst_fzsync_start_race_a (&fzsync_pair); + size =readv (snd_fd, &iov,1 );tst_fzsync_end_race_a (&fzsync_pair);/* check if it could be a valid ioctl result */
Signature · 5 lines
2.37.2 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Martin,
Quoted 2 lines
The missing
start_race()calls made the test essentially useless. Now it works correctly, tested on SLE-12SP2 GM kernel which was vulnerable.
I was able to reproduce the problem on some old SLE-12SP2 even without tst_fzsync_start_race_[ab], but it's obviously correct => going to merge it.
Reviewed-by Petr Vorel <[email protected]>
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Petr Vorel
AppliedHi Martin,
merged, thanks!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp