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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101027144642.GP10869@flamenco.cs.columbia.edu>
Date:	Wed, 27 Oct 2010 10:46:42 -0400
From:	"Emilio G. Cota" <cota@...ap.org>
To:	Martyn Welch <martyn.welch@...com>
Cc:	Greg KH <greg@...ah.com>, LKML <linux-kernel@...r.kernel.org>,
	devel@...verdev.osuosl.org,
	Juan David Gonzalez Cobas <david.cobas@...il.com>,
	Bill Pemberton <wfp5p@...ginia.edu>
Subject: Re: [PATCH 09/30] staging/vme: fill in struct device's .release,
 even if it's a NOOP

On Wed, Oct 27, 2010 at 11:54:55 +0100, Martyn Welch wrote:
> On 26/10/10 02:10, Emilio G. Cota wrote:
> > From: Emilio G. Cota <cota@...ap.org>
> > 
> > Without it we get 32 warnings, one per device being released, when
> > removing a bridge module.
> > 
> > After applying this patch, bridge modules can at last be removed
> > without any apparent hiccup.
> > 
> > [Note: tested only on the tsi148, it's the only bridge I've got]
> > 
> 
> I guess this is an artifact of the current lack of refcounting?

No, that's orthogonal to this. This has to do with the way the
devices are allocated.

> This is definitely an issue, however I don't think masking it by adding
> an empty function is the correct way to go.

We're not masking anything. The release method is there to free the
struct it protects when its refcount goes to zero; however, in this
case the struct wasn't allocated dynamically--the 32 devices are
stored in struct vme_bridge in an array--and therefore there's
nothing to do in .release, since struct vme_bridge is freed
elsewhere.

While it's true that empty .release methods are usually frowned
upon (as stated in Documentation/kobject.txt), due to the way
things are done here it actually makes sense to have an
empty .release.

Hope this helps

		Emilio


--
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