From: "Yavuz, Tuba" <tuba@ece.ufl.edu>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Greg KH <greg@kroah.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>
Subject: Re: Error in the hso driver
Date: Sun, 27 Jan 2019 20:30:38 +0000 [thread overview]
Message-ID: <1548621038338.92496@ece.ufl.edu> (raw)
In-Reply-To: <20190127201924.GA32046@lunn.ch>
I agree and it would be much easier to track cleanup operations. I think this is happening because probe function calls hso_create_net_device, which performs the cleaning. The driver may need some revision to achieve cleanup inside the probe,
Best,
Tuba Yavuz, Ph.D.
Assistant Professor
Electrical and Computer Engineering Department
University of Florida
Gainesville, FL 32611
Webpage: http://www.tuba.ece.ufl.edu/
Email: tuba@ece.ufl.edu
Phone: (352) 846 0202
________________________________________
From: Andrew Lunn <andrew@lunn.ch>
Sent: Sunday, January 27, 2019 3:19 PM
To: Yavuz, Tuba
Cc: Greg KH; netdev@vger.kernel.org; davem@davemloft.net
Subject: Re: Error in the hso driver
On Sun, Jan 27, 2019 at 07:49:52PM +0000, Yavuz, Tuba wrote:
> Here is a proposed patch:
>
> --- drivers/net/usb/hso.c.orig 2019-01-27 14:45:58.232683119 -0500
> +++ drivers/net/usb/hso.c 2019-01-27 14:47:43.592683629 -0500
> @@ -2377,7 +2377,7 @@ static void hso_free_net_device(struct h
>
> remove_net_device(hso_net->parent);
>
> - if (hso_net->net)
> + if (hso_net->net && hso_net->net->reg_state == NETREG_REGISTERED)
> unregister_netdev(hso_net->net);
>
> /* start freeing */
Hi Tuba
Using the free function from the probe often has problems. It is
better to put the cleanup at the end of the probe, and use a
collection of goto's and labels.
Andrew
prev parent reply other threads:[~2019-01-27 20:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1548614320825.86428@ece.ufl.edu>
2019-01-27 19:35 ` Error in the hso driver Greg KH
2019-01-27 19:49 ` Yavuz, Tuba
2019-01-27 19:53 ` Greg KH
2019-01-27 20:19 ` Andrew Lunn
2019-01-27 20:30 ` Yavuz, Tuba [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1548621038338.92496@ece.ufl.edu \
--to=tuba@ece.ufl.edu \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=greg@kroah.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).