Subject: Re: [PATCH iwl-net v1] ice: fix bug with suspend and rebuild

From: Maciej Fijalkowski <[email-masked]>
Date: Thu, 7 Mar 2024 17:11:58 +0100

On Wed, Mar 06, 2024 at 05:33:50PM -0800, Jesse Brandeburg wrote:
> On 3/6/2024 8:56 AM, Maciej Fijalkowski wrote:
> > > > Fixes: b3e7b3a6ee92 ("ice: prevent NULL pointer deref during reload")
> > > > Reported-by: Robert Elliott <[email-masked]>
> > > > Signed-off-by: Jesse Brandeburg <[email-masked]>
> > > 
> > > Reviewed-by: Maciej Fijalkowski <[email-masked]>
> > > 
> > > Well, that refactor of config path introduced lots of issues. Could
> > > validation folks include a short list of tests they tried out against
> > > tested patch?
> > 
> > Sorry, I got confused and now I saw the same thing Simon pointed out.
> 
> Thanks, NP! this thread is for v1, and v2 is already posted with the
> refactor just moving the CONFIG_FOO in patch 1, and then the real final
> version of the fix in v2 patch two which switches all the intel drivers over
> to the new macros.
> 
> > 
> > > 
> > > > ---
> > > >   drivers/net/ethernet/intel/ice/ice_lib.c | 16 ++++++++--------
> > > >   1 file changed, 8 insertions(+), 8 deletions(-)
> > > > 
> > > > diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
> > > > index 097bf8fd6bf0..0f5a92a6b1e6 100644
> > > > --- a/drivers/net/ethernet/intel/ice/ice_lib.c
> > > > +++ b/drivers/net/ethernet/intel/ice/ice_lib.c
> > > > @@ -3238,7 +3238,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, u32 vsi_flags)
> > > >   {
> > > >   	struct ice_vsi_cfg_params params = {};
> > > >   	struct ice_coalesce_stored *coalesce;
> > 
> > struct ice_coalesce_stored *coalesce __free(kfree);
> 
> Yes, but not in a "fix" patch for -net. I figure this is more of a refactor
> kind of thing, so will not include it in this change.

I suppose that's because older kernels might not have this construct
backported, so yeah your v2 is good as-is.

> 
> > 
> > ?
> > 
> > and drop explicit kfree()s altogether?
> > 
> 
>