[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150414182633.GD889@ZenIV.linux.org.uk>
Date: Tue, 14 Apr 2015 19:26:33 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Tadeusz Struk <tadeusz.struk@...el.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-crypto@...r.kernel.org
Subject: Re: [PATCH 03/17] fs: don't allow to complete sync iocbs through
aio_complete
On Tue, Apr 14, 2015 at 11:00:49AM -0700, Tadeusz Struk wrote:
> On 04/11/2015 02:18 PM, Al Viro wrote:
> > @@ -766,8 +765,7 @@ int sock_recvmsg(struct socket *sock, struct msghdr *msg,
> >
> > init_sync_kiocb(&iocb, NULL);
> > ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
> > - if (-EIOCBQUEUED == ret)
> > - ret = wait_on_sync_kiocb(&iocb);
> > + BUG_ON(ret == -EIOCBQUEUED);
>
> NACK - PF_ALG type sockets support async operations and return -EIOCBQUEUED
> See skcipher_recvmsg_async() in crypto/algif_skcipher.c in net-next
Its only caller is
static int skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
size_t ignored, int flags)
{
return (msg->msg_iocb && !is_sync_kiocb(msg->msg_iocb)) ?
skcipher_recvmsg_async(sock, msg, flags) :
skcipher_recvmsg_sync(sock, msg, flags);
}
Note that !is_sync_kiocb() in there. Compare with init_sync_kiocb() in
sock_recvmsg()...
--
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