mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
cxgbe tom: Don't queue AIO requests on listen sockets.
This is similar to the fixes in 141fe2dcee. 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
This commit is contained in:
parent
bdf0f24bb1
commit
1ecbc1d8e9
1 changed files with 7 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue