From: David Miller <davem@davemloft.net>
To: from-netdev@i-love.sakura.ne.jp
Cc: netdev@vger.kernel.org, linux-security-module@vger.kernel.org,
chrisw@sous-sol.org
Subject: Re: [RFC] Allow LSM to use IP address/port number.
Date: Mon, 09 Jul 2007 00:26:29 -0700 (PDT) [thread overview]
Message-ID: <20070709.002629.28788394.davem@davemloft.net> (raw)
In-Reply-To: <200707090533.l695X1PM059672@www262.sakura.ne.jp>
From: Tetsuo Handa <from-netdev@i-love.sakura.ne.jp>
Date: Mon, 09 Jul 2007 14:33:01 +0900
> @@ -649,8 +660,16 @@ int sock_recvmsg(struct socket *sock, st
> init_sync_kiocb(&iocb, NULL);
> iocb.private = &siocb;
> ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
> - if (-EIOCBQUEUED == ret)
> + if (-EIOCBQUEUED == ret) {
> ret = wait_on_sync_kiocb(&iocb);
> + /* I can now check security_socket_post_recvmsg(). */
> + if (ret >= 0) {
> + int err = security_socket_post_recvmsg(sock, msg, size,
> + flags);
> + if (err)
> + ret = err;
> + }
> + }
> return ret;
> }
I don't think it's such a hot idea to return errors if the
wait_on_sync_kiocb() has returned success.
next prev parent reply other threads:[~2007-07-09 7:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200707032107.CBD30767.PtGMNNTS@I-love.SAKURA.ne.jp>
[not found] ` <200707061114.07419.paul.moore@hp.com>
[not found] ` <200707070225.AFC45609.MNStNTPG@I-love.SAKURA.ne.jp>
[not found] ` <200707061343.03942.paul.moore@hp.com>
2007-07-09 5:33 ` [RFC] Allow LSM to use IP address/port number. (was Re: [PATCH 1/1] Add post accept()/recvmsg() hooks.) Tetsuo Handa
2007-07-09 7:26 ` David Miller [this message]
2007-07-09 13:13 ` [RFC] Allow LSM to use IP address/port number Tetsuo Handa
2007-07-09 22:50 ` James Morris
2007-07-09 23:05 ` Stephen Hemminger
2007-07-09 23:41 ` James Morris
2007-07-10 4:11 ` Tetsuo Handa
2007-07-20 15:11 ` [PATCH 1/1] " Tetsuo Handa
2007-07-20 15:28 ` James Morris
2007-07-20 15:44 ` Patrick McHardy
2007-07-21 1:57 ` Tetsuo Handa
2007-07-21 18:11 ` Casey Schaufler
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=20070709.002629.28788394.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=chrisw@sous-sol.org \
--cc=from-netdev@i-love.sakura.ne.jp \
--cc=linux-security-module@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).