HomeFreeBSD

sendfile: cover the entire sendfile operation under CURVNET_SET()

Description

sendfile: cover the entire sendfile operation under CURVNET_SET()

There is no reason to set/restore for every single pr_send(), as it never
changes. Also, cover call into pr_sendfile_wait with CURVNET_SET() fixing
recent regression in unix(4).

Now we would enter sendfile_iodone() with curvnet set, when called
synchronously. Although, it is easy to tell a syncronous call from I/O
completion, unfortunately the vnet(9) macros do not support conditional
invocation, so just change CURVNET_SET() to CURVNET_SET_QUIET() and add a
comment that we are aware of the recursion.

Reported-by: syzbot+7b0b20cf2c672c181d98@syzkaller.appspotmail.com

Details

Provenance
glebiusAuthored on May 6 2025, 6:15 PM
Parents
rG2ad32d3a6868: mccomphy: Guard the definition of mcommphy_yt8531_setup_delay()
Branches
Unknown
Tags
Unknown