In sendfile_iodone() both pru_abort and sorele need to be executed

with proper VNET context set.

Reported by:	sbruno
MFC after:	2 weeks
This commit is contained in:
Gleb Smirnoff 2018-01-05 20:21:46 +00:00
parent 5f3c7d6580
commit b4f55763ce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327596

View file

@ -273,6 +273,7 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, int error)
if (!refcount_release(&sfio->nios))
return;
CURVNET_SET(so->so_vnet);
if (sfio->error) {
struct mbuf *m;
@ -293,15 +294,13 @@ sendfile_iodone(void *arg, vm_page_t *pg, int count, int error)
m = sfio->m;
for (int i = 0; i < sfio->npages; i++)
m = m_free(m);
} else {
CURVNET_SET(so->so_vnet);
} else
(void )(so->so_proto->pr_usrreqs->pru_ready)(so, sfio->m,
sfio->npages);
CURVNET_RESTORE();
}
SOCK_LOCK(so);
sorele(so);
CURVNET_RESTORE();
free(sfio, M_TEMP);
}