svn commit: r321657 - stable/11/sys/kern

John Baldwin jhb at FreeBSD.org
Fri Jul 28 18:09:42 UTC 2017


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


More information about the svn-src-stable-11 mailing list