Date: Fri, 28 Jul 2017 18:09:41 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r321657 - stable/11/sys/kern Message-ID: <201707281809.v6SI9fYo097174@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Jul 28 18:09:41 2017 New Revision: 321657 URL: https://svnweb.freebsd.org/changeset/base/321657 Log: MFC 321075: Set the current vnet pointer in the socket buffer AIO handler. This fixes panics when using AIO under VIMAGE. Sponsored by: Chelsio Communications Modified: stable/11/sys/kern/sys_socket.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sys_socket.c ============================================================================== --- stable/11/sys/kern/sys_socket.c Fri Jul 28 17:45:20 2017 (r321656) +++ stable/11/sys/kern/sys_socket.c Fri Jul 28 18:09:41 2017 (r321657) @@ -675,6 +675,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); @@ -698,6 +699,7 @@ soaio_process_sb(struct socket *so, struct sockbuf *sb ACCEPT_LOCK(); SOCK_LOCK(so); sorele(so); + CURVNET_RESTORE(); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707281809.v6SI9fYo097174>