All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] RDMA/hns: Fix an error code in hns_roce_set_user_sq_size()
Date: Thu, 13 Jun 2019 06:33:16 +0000	[thread overview]
Message-ID: <20190613063316.GW6369@mtr-leonro.mtl.com> (raw)
In-Reply-To: <20181217070815.GF12159@kadam>

On Wed, Jun 12, 2019 at 11:05:17PM -0700, Dan Carpenter wrote:
> On Wed, Jun 12, 2019 at 08:23:16PM +0300, Leon Romanovsky wrote:
> > On Sat, Jun 08, 2019 at 12:27:14PM +0300, Dan Carpenter wrote:
> > > This function is supposed to return negative kernel error codes but here
> > > it returns CMD_RST_PRC_EBUSY (2).  The error code eventually gets passed
> > > to IS_ERR() and since it's not an error pointer it leads to an Oops in
> > > hns_roce_v1_rsv_lp_qp()
> > >
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > ---
> > > Static analysis.  Not tested.
> > >
> > >  drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> > > index ac017c24b200..018ff302ab9e 100644
> > > --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> > > +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> > > @@ -1098,7 +1098,7 @@ static int hns_roce_cmq_send(struct hns_roce_dev *hr_dev,
> > >  	if (ret = CMD_RST_PRC_SUCCESS)
> > >  		return 0;
> > >  	if (ret = CMD_RST_PRC_EBUSY)
> >
> > The better fix will be to remove CMD_RST_PRC_* definitions in favor of
> > normal errno.
> >
>
> Yes.
>
> I've looked at that idea and I would almost feel like it's easy enough
> to send a patch like that without testing it at all.  But it would be
> better if the people with the hardware sent it.  I reported this bug
> months ago...

Feel free to send, we will give time to respond.

thanks

>
> regards,
> dan carpenter

  parent reply	other threads:[~2019-06-13  6:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17  7:08 [PATCH] RDMA/hns: Fix an error code in hns_roce_create_srq() Dan Carpenter
2018-12-17 11:18 ` oulijun
2019-06-08  9:27 ` [PATCH] RDMA/hns: Fix an error code in hns_roce_set_user_sq_size() Dan Carpenter
2019-06-12 17:23 ` Leon Romanovsky
2019-06-13  6:05 ` Dan Carpenter
2019-06-13  6:14 ` oulijun
2019-06-13  6:33 ` Leon Romanovsky [this message]
2019-06-13 14:05 ` oulijun
2019-06-25 13:22 ` 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=20190613063316.GW6369@mtr-leonro.mtl.com \
    --to=leon@kernel.org \
    --cc=kernel-janitors@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 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.