Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9e36bbbd authored by Pietro Borrello's avatar Pietro Borrello Committed by Gerrit - the friendly Code Review server
Browse files

net: add sock_init_data_uid()



Add sock_init_data_uid() to explicitly initialize the socket uid.
To initialise the socket uid, sock_init_data() assumes a the struct
socket* sock is always embedded in a struct socket_alloc, used to
access the corresponding inode uid. This may not be true.
Examples are sockets created in tun_chr_open() and tap_open().

Change-Id: I1f6b197165284ca8dd798af73136157a12f44d36
Fixes: 86741ec2 ("net: core: Add a UID field to struct sock.")
Signed-off-by: default avatarPietro Borrello <borrello@diag.uniroma1.it>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Git-commit: 584f3742890e966d2f0a1f3c418c9ead70b2d99e
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git


Signed-off-by: default avatarKaustubh Pandey <quic_kapandey@quicinc.com>
parent 081bc824
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment