All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yanjun Zhu <yanjunz@mellanox.com>
To: Leon Romanovsky <leon@kernel.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Jason Gunthorpe <jgg@ziepe.ca>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
	Doug Ledford <dledford@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Subject: RE: [PATCH] RDMA/rxe: Return -EFAULT if copy_from_user() fails
Date: Tue, 12 May 2020 08:33:57 +0000	[thread overview]
Message-ID: <AM6PR05MB62630AC146F51635E181AA44D8BE0@AM6PR05MB6263.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20200512083107.GI4814@unreal>



-----Original Message-----
From: Leon Romanovsky <leon@kernel.org> 
Sent: Tuesday, May 12, 2020 4:31 PM
To: Dan Carpenter <dan.carpenter@oracle.com>; Jason Gunthorpe <jgg@ziepe.ca>
Cc: Yanjun Zhu <yanjunz@mellanox.com>; Sudip Mukherjee <sudipm.mukherjee@gmail.com>; Doug Ledford <dledford@redhat.com>; linux-rdma@vger.kernel.org; kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] RDMA/rxe: Return -EFAULT if copy_from_user() fails

On Tue, May 12, 2020 at 11:17:06AM +0300, Dan Carpenter wrote:
> On Tue, May 12, 2020 at 10:02:03AM +0300, Leon Romanovsky wrote:
> > On Tue, May 12, 2020 at 09:29:36AM +0300, Leon Romanovsky wrote:
> > > On Mon, May 11, 2020 at 09:37:42PM +0300, Dan Carpenter wrote:
> > > > This function used to always return -EINVAL but we updated it to 
> > > > try preserve the error codes.  Unfortunately the copy_to_user() 
> > > > is returning the number of bytes remaining to be copied instead 
> > > > of a negative error code.
> > > >
> > > > Fixes: a3a974b4654d ("RDMA/rxe: Always return ERR_PTR from 
> > > > rxe_create_mmap_info()")
> > > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > > ---
> > > >  drivers/infiniband/sw/rxe/rxe_queue.c | 5 +++--
> > > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > >
> > > Thanks,
> > > Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
> >
> > Actually Yanjun is right and "err" can be removed.
> >
> > Thanks
>
> I don't know if the code you guys are looking at is older or newer 
> than linux-next...  :P

> We both looked on rdma-next, but the wrong code was added to -rc.

Yes. I agree with you.

Zhu Yanjun

> Jason, that patch was marked as stable@.

Thanks

  reply	other threads:[~2020-05-12  8:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 18:37 [PATCH] RDMA/rxe: Return -EFAULT if copy_from_user() fails Dan Carpenter
2020-05-11 18:37 ` Dan Carpenter
2020-05-12  1:12 ` Yanjun Zhu
2020-05-12  6:22   ` Leon Romanovsky
2020-05-12  6:22     ` Leon Romanovsky
2020-05-12  6:29 ` Leon Romanovsky
2020-05-12  6:29   ` Leon Romanovsky
2020-05-12  7:02   ` Leon Romanovsky
2020-05-12  7:02     ` Leon Romanovsky
2020-05-12  8:17     ` Dan Carpenter
2020-05-12  8:17       ` Dan Carpenter
2020-05-12  8:31       ` Leon Romanovsky
2020-05-12  8:31         ` Leon Romanovsky
2020-05-12  8:33         ` Yanjun Zhu [this message]
2020-05-12 14:51 ` Jason Gunthorpe
2020-05-12 14:51   ` Jason Gunthorpe

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=AM6PR05MB62630AC146F51635E181AA44D8BE0@AM6PR05MB6263.eurprd05.prod.outlook.com \
    --to=yanjunz@mellanox.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sudipm.mukherjee@gmail.com \
    /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.