Date: Tue, 14 Sep 2021 20:46:41 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 1ecbc1d8e9d3 - main - cxgbe tom: Don't queue AIO requests on listen sockets. Message-ID: <202109142046.18EKkfEN043871@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1ecbc1d8e9d3fbcd8e68fc68f0a32944a12ddb1e commit 1ecbc1d8e9d3fbcd8e68fc68f0a32944a12ddb1e Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2021-09-14 20:46:14 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2021-09-14 20:46:14 +0000 cxgbe tom: Don't queue AIO requests on listen sockets. This is similar to the fixes in 141fe2dceeae. One difference is that TOE sockets do not change states (listen vs non-listen) once created, so no lock is needed for SOLISTENING(). Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_tom.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index a444f0c9d690..41f55fdbd426 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -1989,6 +1989,13 @@ t4_aio_queue_tom(struct socket *so, struct kaiocb *job) struct toepcb *toep = tp->t_toe; int error; + /* + * No lock is needed as TOE sockets never change between + * active and passive. + */ + if (SOLISTENING(so)) + return (EINVAL); + if (ulp_mode(toep) == ULP_MODE_TCPDDP) { error = t4_aio_queue_ddp(so, job); if (error != EOPNOTSUPP)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109142046.18EKkfEN043871>