Sponsored by: The FreeBSD Foundation (cherry picked from commit 60a517b66a69b8c011b04063ef63a938738719bd)