[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4ce3d9c2297c4b839ab8c6fac0f8cdb375813e0b.camel@codeconstruct.com.au>
Date: Thu, 15 Dec 2022 13:45:56 +0800
From: Matt Johnston <matt@...econstruct.com.au>
To: Alexander H Duyck <alexander.duyck@...il.com>,
netdev@...r.kernel.org
Cc: pabeni@...hat.com, kuba@...nel.org, edumazet@...gle.com,
davem@...emloft.net, jk@...econstruct.com.au
Subject: Re: [PATCH net] mctp: Remove device type check at unregister
On Wed, 2022-12-14 at 08:42 -0800, Alexander H Duyck wrote:
> > diff --git a/net/mctp/device.c b/net/mctp/device.c
> > index 99a3bda8852f..dec730b5fe7e 100644
> > --- a/net/mctp/device.c
> > +++ b/net/mctp/device.c
> > @@ -429,12 +429,6 @@ static void mctp_unregister(struct net_device *dev)
> > struct mctp_dev *mdev;
> >
> > mdev = mctp_dev_get_rtnl(dev);
> > - if (mdev && !mctp_known(dev)) {
> > - // Sanity check, should match what was set in mctp_register
> > - netdev_warn(dev, "%s: BUG mctp_ptr set for unknown type %d",
> > - __func__, dev->type);
> > - return;
> > - }
> > if (!mdev)
> > return;
> >
>
> It looks like this is incomplete if we are going to allow for these
> type of changes. We might as well also remove the block in
> mctp_register that was doing a similar check for devices that already
> have the mctp_ptr set. Otherwise you will likely need to follow up on
> this later.
I'm not sure it's possible to hit that, I'll remove it in a v2.
Thanks for the review.
Cheers,
Matt
Powered by blists - more mailing lists