Re: [PATCH] scm: fold __scm_send() into scm_send()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ingo Oeser <[email protected]> wrote:
>
>  -int scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)
>  -{
>  -	struct task_struct *p = current;
>  -	scm->creds = (struct ucred) {
>  -		.uid = p->uid,
>  -		.gid = p->gid,
>  -		.pid = p->tgid
>  -	};
>  -	scm->fp = NULL;
>  -	scm->sid = security_sk_sid(sock->sk, NULL, 0);
>  -	scm->seq = 0;
>  -	if (msg->msg_controllen <= 0)
>  -		return 0;
>  -	return __scm_send(sock, msg, scm);
>  -}

It's worth noting that scm_send() will call security_sk_sid() even if
(msg->msg_controllen <= 0).

If that test is likely to be true with any frequency then perhaps we can
optimise things...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux