Re: [PATCH rdma-next] bnxt_re: Rely on Kconfig to keep module dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 24, 2021 at 10:00:05PM +0530, Devesh Sharma wrote:

> > > > -static void bnxt_re_dev_unprobe(struct net_device *netdev,
> > > > -                           struct bnxt_en_dev *en_dev)
> > > > -{
> > > > -   dev_put(netdev);
> > > > -   module_put(en_dev->pdev->driver->driver.owner);
> > > > -}
> > >
> > > And you are right to be wondering WTF is this
> 
> Still trying to understand but what's the big idea here may be I can help.

A driver should not have module put things like the above

It should not be accessing ->driver without holding the device_lock()

Basically it is all nonsense coding, Leon suggests to delete it and he
is probably right.

Can you explain what it thinks it is doing?

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux