[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070709.002629.28788394.davem@davemloft.net>
Date: Mon, 09 Jul 2007 00:26:29 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: from-netdev@...ove.sakura.ne.jp
Cc: netdev@...r.kernel.org, linux-security-module@...r.kernel.org,
chrisw@...s-sol.org
Subject: Re: [RFC] Allow LSM to use IP address/port number.
From: Tetsuo Handa <from-netdev@...ove.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.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists