mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
net: Pass kern from net_proto_family.create to sk_alloc
In preparation for changing how struct net is refcounted on kernel sockets pass the knowledge that we are creating a kernel socket from sock_create_kern through to sk_alloc. Signed-off-by: "Eric W. Biederman" <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
eeb1bd5c40
commit
11aa9c28b4
59 changed files with 109 additions and 108 deletions
|
|
@ -515,10 +515,10 @@ static struct proto x25_proto = {
|
|||
.obj_size = sizeof(struct x25_sock),
|
||||
};
|
||||
|
||||
static struct sock *x25_alloc_socket(struct net *net)
|
||||
static struct sock *x25_alloc_socket(struct net *net, int kern)
|
||||
{
|
||||
struct x25_sock *x25;
|
||||
struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto);
|
||||
struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto, kern);
|
||||
|
||||
if (!sk)
|
||||
goto out;
|
||||
|
|
@ -553,7 +553,7 @@ static int x25_create(struct net *net, struct socket *sock, int protocol,
|
|||
goto out;
|
||||
|
||||
rc = -ENOBUFS;
|
||||
if ((sk = x25_alloc_socket(net)) == NULL)
|
||||
if ((sk = x25_alloc_socket(net, kern)) == NULL)
|
||||
goto out;
|
||||
|
||||
x25 = x25_sk(sk);
|
||||
|
|
@ -602,7 +602,7 @@ static struct sock *x25_make_new(struct sock *osk)
|
|||
if (osk->sk_type != SOCK_SEQPACKET)
|
||||
goto out;
|
||||
|
||||
if ((sk = x25_alloc_socket(sock_net(osk))) == NULL)
|
||||
if ((sk = x25_alloc_socket(sock_net(osk), 0)) == NULL)
|
||||
goto out;
|
||||
|
||||
x25 = x25_sk(sk);
|
||||
|
|
|
|||
Loading…
Reference in a new issue