mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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
5f3c7d6580
commit
b4f55763ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327596
|
@ -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…
Reference in a new issue