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] [day] [month] [year] [list]
Message-ID: <20150717105244.GA5422@mwanda>
Date:	Fri, 17 Jul 2015 13:52:44 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	devel@...verdev.osuosl.org, Lidza Louina <lidza.louina@...il.com>,
	Daeseok Youn <daeseok.youn@...il.com>,
	driverdev-devel@...uxdriverproject.org,
	linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 1/4] staging: dgap: fix error path

On Fri, Jul 17, 2015 at 03:57:21PM +0530, Sudip Mukherjee wrote:
> On Fri, Jul 17, 2015 at 01:05:55PM +0300, Dan Carpenter wrote:
> > On Fri, Jul 17, 2015 at 03:21:28PM +0530, Sudip Mukherjee wrote:
> > > On Fri, Jul 17, 2015 at 12:30:03PM +0300, Dan Carpenter wrote:
> > > > I don't think I like these at all.  remove_one has always been buggy in
> > > > that it removes everything.  We should fix it to only remove one instead
> > > > of formalizing the currect terrible behavior.
> > > Its already applied.
> > > I thought after the full series the code became a little better than the
> > > original one.
> > 
> > It looks nicer but it's wrong.
> > 
> > 
> > > Now dgap_stop() is being called from dgap_remove_one(). How do you suggest
> > > it should be?
> > 
> > dgap_remove_one() should mirror dgap_init_one().  dgap_stop() should
> > only be called from dgap_cleanup_module().  dgap_cleanup_module() should
> > mirror dgap_init_module().
> But if dgap_stop() is only called from dgap_cleanup_module() then what
> will happen if the pci device is suddenly removed?
> Currently if the pci device is removed then the remove callback will be
> executed and it will stop and unregister everything properly.

It shouldn't be unregistering everything when one thing is removed, it
should only unregister the stuff that is removed.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ