• Kevin Brodsky's avatar
    net: Ensure ->msg_control_user is used for user buffers · c39ef213
    Kevin Brodsky authored
    Since commit 1f466e1f ("net: cleanly handle kernel vs user
    buffers for ->msg_control"), pointers to user buffers should be
    stored in struct msghdr::msg_control_user, instead of the
    msg_control field.  Most users of msg_control have already been
    converted (where user buffers are involved), but not all of them.
    
    This patch attempts to address the remaining cases. An exception is
    made for null checks, as it should be safe to use msg_control
    unconditionally for that purpose.
    
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: default avatarKevin Brodsky <kevin.brodsky@arm.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c39ef213
scm.c 8.61 KB