mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-23 16:01:42 +00:00
Set the current vnet pointer in the socket buffer AIO handler.
This fixes panics when using AIO under VIMAGE. Reported by: kp MFC after: 3 days Sponsored by: Chelsio Communications
This commit is contained in:
parent
fd75b64d7e
commit
c7af789360
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321075
@ -693,6 +693,7 @@ soaio_process_sb(struct socket *so, struct sockbuf *sb)
|
||||
{
|
||||
struct kaiocb *job;
|
||||
|
||||
CURVNET_SET(so->so_vnet);
|
||||
SOCKBUF_LOCK(sb);
|
||||
while (!TAILQ_EMPTY(&sb->sb_aiojobq) && soaio_ready(so, sb)) {
|
||||
job = TAILQ_FIRST(&sb->sb_aiojobq);
|
||||
@ -715,6 +716,7 @@ soaio_process_sb(struct socket *so, struct sockbuf *sb)
|
||||
|
||||
SOCK_LOCK(so);
|
||||
sorele(so);
|
||||
CURVNET_RESTORE();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user