git: kernel - Fix improper use of CMSG_ALIGN() in unp_internalize()

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Sep 14 20:15:51 PDT 2019


commit 5092d1d6887a8c709f0df3daa3da1fa792dbd2d2
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Sep 14 20:14:18 2019 -0700

    kernel - Fix improper use of CMSG_ALIGN() in unp_internalize()
    
    * The data portion of a control message must be aligned, but the
      data length does not have to be (and in fact, should not be since
      it might represent an array of smaller elements and we do not
      want to calculate the wrong number of elements).
    
    * Fixes chrome, xpdf, etc (sendmsg() calls were failing).
    
    * Problem revealed after the CMSG alignment was upped from 4 to 8
      bytes.

Summary of changes:
 sys/kern/uipc_usrreq.c | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5092d1d6887a8c709f0df3daa3da1fa792dbd2d2


-- 
DragonFly BSD source repository


More information about the Commits mailing list