lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEKBCKPw=uwN+MCLenOe6ZkLBYiwSg35eQ_rk_YeNBMOuqvVOw@mail.gmail.com>
Date: Tue, 24 Sep 2024 20:39:47 +0545
From: Dipendra Khadka <kdipendra88@...il.com>
To: Simon Horman <horms@...nel.org>
Cc: sgoutham@...vell.com, gakula@...vell.com, sbhatta@...vell.com, 
	hkelam@...vell.com, davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org, 
	pabeni@...hat.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: ethernet: marvell: octeontx2: nic: Add error
 pointer check in otx2_ethtool.c

Hi Simon,

On Tue, 24 Sept 2024 at 12:55, Simon Horman <horms@...nel.org> wrote:
>
> On Mon, Sep 23, 2024 at 11:31:34AM +0000, Dipendra Khadka wrote:
> > Add error pointer check after calling otx2_mbox_get_rsp().
> >
>
> Hi Dipendra,
>
> Please add a fixes tag here (no blank line between it and your
> Signed-off-by line).
> > Signed-off-by: Dipendra Khadka <kdipendra88@...il.com>
>
> As you have posted more than one patch for this driver, with very similar,
> not overly complex or verbose changes, it might make sense to combine them
> into a single patch. Or, if not, to bundle them up into a patch-set with a
> cover letter.
>
> Regarding the patch subject, looking at git history, I think
> an appropriate prefix would be 'octeontx2-pf:'. I would go for
> something like this:
>
>   Subject: [PATCH net v2] octeontx2-pf: handle otx2_mbox_get_rsp errors
>

If I bundle all the patches for the
drivers/net/ethernet/marvell/octeontx2/ , will this subject without v2
work? Or do I need to change anything? I don't know how to send the
patch-set with the cover letter.

> As for the code changes themselves, module the nits below, I agree the
> error handling is consistent with that elsewhere in the same functions, and
> is correct.
>
> > ---
> >  .../ethernet/marvell/octeontx2/nic/otx2_ethtool.c    | 12 ++++++++++++
> >  1 file changed, 12 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> > index 0db62eb0dab3..36a08303752f 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
> > @@ -343,6 +343,12 @@ static void otx2_get_pauseparam(struct net_device *netdev,
> >       if (!otx2_sync_mbox_msg(&pfvf->mbox)) {
> >               rsp = (struct cgx_pause_frm_cfg *)
> >                      otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
> > +
>
> nit: No blank line here.
>
> > +             if (IS_ERR(rsp)) {
> > +                     mutex_unlock(&pfvf->mbox.lock);
> > +                     return;
> > +             }
> > +

If the above blank line after the check is ok or do I have to remove
this as well?

> >               pause->rx_pause = rsp->rx_pause;
> >               pause->tx_pause = rsp->tx_pause;
> >       }
> > @@ -1074,6 +1080,12 @@ static int otx2_set_fecparam(struct net_device *netdev,
> >
> >       rsp = (struct fec_mode *)otx2_mbox_get_rsp(&pfvf->mbox.mbox,
> >                                                  0, &req->hdr);
> > +
>
> Ditto.
>
> > +     if (IS_ERR(rsp)) {
> > +             err = PTR_ERR(rsp);
> > +             goto end;
> > +     }
> > +
> >       if (rsp->fec >= 0)
> >               pfvf->linfo.fec = rsp->fec;
> >       else
>
> --
> pw-bot: changes-requested

Best regards,
Dipendra Khadka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ