Skip to content

Commit b714ca2

Browse files
ea1daviskuba-moo
authored andcommitted
ptp: ptp_read should not release queue
Firstly, queue is not the memory allocated in ptp_read; Secondly, other processes may block at ptp_read and wait for conditions to be met to perform read operations. Acked-by: Richard Cochran <richardcochran@gmail.com> Reported-and-tested-by: syzbot+df3f3ef31f60781fa911@syzkaller.appspotmail.com Fixes: 8f5de6f ("ptp: support multiple timestamp event readers") Signed-off-by: Edward Adam Davis <eadavis@qq.com> Link: https://lore.kernel.org/r/tencent_18747D76F1675A3C633772960237544AAA09@qq.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 9b818a3 commit b714ca2

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/ptp/ptp_chardev.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,5 @@ ssize_t ptp_read(struct posix_clock_context *pccontext, uint rdflags,
585585
free_event:
586586
kfree(event);
587587
exit:
588-
if (result < 0)
589-
ptp_release(pccontext);
590588
return result;
591589
}

0 commit comments

Comments
 (0)