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:
parent
85a273200a
commit
6947b91466
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user