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: <20250415185113.GG395307@horms.kernel.org>
Date: Tue, 15 Apr 2025 19:51:13 +0100
From: Simon Horman <horms@...nel.org>
To: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
Cc: Chenyuan Yang <chenyuan0y@...il.com>, sgoutham@...vell.com,
	gakula@...vell.com, sbhatta@...vell.com, hkelam@...vell.com,
	bbhushan2@...vell.com, andrew+netdev@...n.ch, davem@...emloft.net,
	edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] octeontx2-pf: handle otx2_mbox_get_rsp errors

On Mon, Apr 14, 2025 at 01:04:32PM +0200, Michal Swiatkowski wrote:
> On Sat, Apr 12, 2025 at 01:33:27PM -0500, Chenyuan Yang wrote:
> > Adding error pointer check after calling otx2_mbox_get_rsp().
> > 
> > This is similar to the commit bd3110bc102a
> > ("octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_flows.c").
> > 
> > Signed-off-by: Chenyuan Yang <chenyuan0y@...il.com>
> > Fixes: 6c40ca957fe5 ("octeontx2-pf: Adds TC offload support")
> > ---
> >  drivers/net/ethernet/marvell/octeontx2/nic/rep.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
> > index 04e08e06f30f..7153a71dfc86 100644
> > --- a/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
> > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/rep.c
> > @@ -67,6 +67,8 @@ static int rvu_rep_mcam_flow_init(struct rep_dev *rep)
> >  
> >  		rsp = (struct npc_mcam_alloc_entry_rsp *)otx2_mbox_get_rsp
> >  			(&priv->mbox.mbox, 0, &req->hdr);
> > +		if (IS_ERR(rsp))
> > +			goto exit;
> 
> Changes looks fine:
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> 
> BTW, looks like now you can use break instead of goto exit, as exit
> label is just after the while loop.

True. My suggestion would be to keep this patch as-is. And, once it has
hit net-next, send a follow-up to remove the exit label.

> 
> >  
> >  		for (ent = 0; ent < rsp->count; ent++)
> >  			rep->flow_cfg->flow_ent[ent + allocated] = rsp->entry_list[ent];
> > -- 
> > 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ