From: David Miller <davem@davemloft.net>
To: sds@tycho.nsa.gov
Cc: cxzhang@watson.ibm.com, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, jmorris@namei.org,
catalin.marinas@gmail.com, michal.k.k.piotrowski@gmail.com,
czhang.us@gmail.com
Subject: Re: RFC: kernel memory leak fix for af_unix datagram getpeersec
Date: Wed, 26 Jul 2006 15:49:17 -0700 (PDT) [thread overview]
Message-ID: <20060726.154917.124068980.davem@davemloft.net> (raw)
In-Reply-To: <1153947040.11769.208.camel@moss-spartans.epoch.ncsc.mil>
From: Stephen Smalley <sds@tycho.nsa.gov>
Date: Wed, 26 Jul 2006 16:50:40 -0400
> > diff -puN net/unix/af_unix.c~af_unix-datagram-getpeersec-ml-fix net/unix/af_unix.c
> > --- linux-2.6.18-rc2/net/unix/af_unix.c~af_unix-datagram-getpeersec-ml-fix 2006-07-22 23:01:26.000000000 -0400
> > +++ linux-2.6.18-rc2-cxzhang/net/unix/af_unix.c 2006-07-22 23:14:15.000000000 -0400
> > @@ -1323,8 +1299,9 @@ static int unix_dgram_sendmsg(struct kio
> > memcpy(UNIXCREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
> > if (siocb->scm->fp)
> > unix_attach_fds(siocb->scm, skb);
> > -
> > - unix_get_peersec_dgram(skb);
> > +#ifdef CONFIG_SECURITY_NETWORK
> > + memcpy(UNIXSID(skb), &siocb->scm->sid, sizeof(u32));
> > +#endif /* CONFIG_SECURITY_NETWORK */
>
> You want to retain the static inlines, and just update their contents,
> not replace them with embedded #ifdefs. And this could be a direct
> assignment, right?
This is my feeling too.
next prev parent reply other threads:[~2006-07-26 22:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-26 20:19 Catherine Zhang
2006-07-26 20:50 ` Stephen Smalley
2006-07-26 22:49 ` David Miller [this message]
2006-07-27 9:00 ` Catalin Marinas
2006-07-27 19:22 ` Xiaolan Zhang
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=20060726.154917.124068980.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=catalin.marinas@gmail.com \
--cc=cxzhang@watson.ibm.com \
--cc=czhang.us@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.k.k.piotrowski@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sds@tycho.nsa.gov \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®