From: dingtianhong <dingtianhong@huawei.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>, <netdev@vger.kernel.org>,
Li Zefan <lizefan@huawei.com>, Xinwei Hu <huxinwei@huawei.com>
Subject: [PATCH] af_unix: dont send SCM_CREDENTIAL when dest socket is NULL
Date: Wed, 27 Mar 2013 15:35:52 +0800 [thread overview]
Message-ID: <5152A158.3030401@huawei.com> (raw)
In-Reply-To: <1364305597.1716.13.camel@edumazet-glaptop>
On 2013/3/26 21:46, Eric Dumazet wrote:
> On Tue, 2013-03-26 at 19:35 +0800, dingtianhong wrote:
>
>> I think if not call scm_set_creds(), the credential would useles in recvmsg().
>> we could remove code:
>> if (check_creds) {
>> /* Never glue messages from different writers */
>> if ((UNIXCB(skb).pid != siocb->scm->pid) ||
>> (UNIXCB(skb).cred != siocb->scm->cred))
>> break;
>> } else {
>> /* Copy credentials */
>> scm_set_cred(siocb->scm, UNIXCB(skb).pid, UNIXCB(skb).cred);
>> check_creds = 1;
>> }
>
> Are you paraphrasing me or saying something different ?
>
if not call scm_set_creds(), how get credentials for receiver and distinguish different writes,
so I think scm_set_creds() is necessary here.
>
>
>
prev parent reply other threads:[~2013-03-27 7:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-25 10:28 [Eulerkernel] [PATCH] af_unix: dont send SCM_CREDENTIAL when dest socket is NULL dingtianhong
2013-03-25 14:04 ` Eric Dumazet
2013-03-25 17:12 ` David Miller
2013-03-26 3:08 ` dingtianhong
2013-03-26 4:32 ` Eric Dumazet
2013-03-26 11:35 ` dingtianhong
2013-03-26 13:46 ` Eric Dumazet
2013-03-27 7:35 ` dingtianhong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5152A158.3030401@huawei.com \
--to=dingtianhong@huawei.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=huxinwei@huawei.com \
--cc=lizefan@huawei.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.