[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_541B3D2565BACCBBD133319E441B774B6C08@qq.com>
Date: Fri, 27 Oct 2023 08:03:13 +0800
From: Edward Adam davis <eadavis@...com>
To: syzbot+df3f3ef31f60781fa911@...kaller.appspotmail.com
Cc: davem@...emloft.net,
linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
reibax@...il.com,
richardcochran@...il.com,
syzkaller-bugs@...glegroups.com
Subject: [PATCH net-next] ptp: ptp_read should not release queue
From: Edward Adam Davis <eadavis@...com>
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.
Reported-by: syzbot+df3f3ef31f60781fa911@...kaller.appspotmail.com
Fixes: 8f5de6fb2453 ("ptp: support multiple timestamp event readers")
Signed-off-by: Edward Adam Davis <eadavis@...com>
---
drivers/ptp/ptp_chardev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c
index 282cd7d24077..27c1ef493617 100644
--- a/drivers/ptp/ptp_chardev.c
+++ b/drivers/ptp/ptp_chardev.c
@@ -585,7 +585,5 @@ ssize_t ptp_read(struct posix_clock_context *pccontext, uint rdflags,
free_event:
kfree(event);
exit:
- if (result < 0)
- ptp_release(pccontext);
return result;
}
--
2.25.1
Powered by blists - more mailing lists