Re: Bug#244207: kernel-source-2.6.5: mwave gives warning on suspend

From: Russell King
Date: Sat Apr 17 2004 - 06:50:27 EST


On Sat, Apr 17, 2004 at 09:39:18PM +1000, Herbert Xu wrote:
> On Sat, Apr 17, 2004 at 12:43:11PM +0200, Rolf Kutz wrote:
> > Package: kernel-source-2.6.5
> > Version: 2.6.5-1
> > Severity: normal
> >
> > The mwave module gives the following warning on suspend:
> >
> > Apr 16 09:55:13 localhost kernel: Device 'mwave' does not have a release() funct
> > ion, it is broken and must be fixed.
> > Apr 16 09:55:13 localhost kernel: Badness in device_release at drivers/base/core
> > .c:85
>
> Thanks for the report.
>
> This patch should shut the warning up.

And that's all it does. It doesn't stop the oops which potentically can
happen when the struct device is freed (by the module being unloaded)
while there is still a reference to the struct device.

This is the whole point of the warning - to warn that the necessary
release functionality is not present, and that the way the device
is being used is buggy.

Providing an empty release function is not a solution - it merely papers
over the warning leaving the real bug behind.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/