[PATCH] sis900 fix (Was: [CHECKER] Resource leaks in driver shutdown functions)

From: Daniele Venzano
Date: Tue May 04 2004 - 03:44:38 EST


Thank you for the spotting, the sis900 dirver was really missing a call
to netif_device_detach in sis900_suspend.

Attached is a trivial patch that fixes the issue.

The sis900 driver is currently unmaintained (the MAINTAINERS address
bounces), but I'm willing to take the work, since I know somewhat the
code and I wrote the power management functions.

I no one stands up, I'll send a patch to MAINTAINERS later on.

Bye.

On Mon, May 03, 2004 at 11:46:01AM -0700, Ken Ashcraft wrote:
> The resource allocation/freeing functions in question below are:
> netif_start_queue/netif_stop_queue
>
> If you are CC'd on this email, it is because I think you are the
> maintainer for some of the code below. Search for your email address
> below to find it.
>
> 1 | /drivers/net/sis900.c
> ---------------------------------------------------------
...
> [BUG] webvenza@xxxxxxxxx
> /home/kash/linux/2.6.3/linux-2.6.3/drivers/net/sis900.c:2191:sis900_suspend:ERROR:INTERFACE_A_B:
> Not calling netif_device_detach. See sis900_resume:2229
> [COUNTER=netif_device_attach-netif_device_detach] [fit=4] [fit_fn=2]
> [fn_ex=0] [fn_counter=1] [ex=18] [counter=2] [z = 1.11803398874989] [fn-z
> = -2]
> pci_set_drvdata(pci_dev, NULL);
> }
>
> #ifdef CONFIG_PM
>
>
> Error --->
> static int sis900_suspend(struct pci_dev *pci_dev, u32 state)
> {
> struct net_device *net_dev = pci_get_drvdata(pci_dev);
> struct sis900_private *sis_priv = net_dev->priv;

--
-----------------------------
Daniele Venzano
Web: http://teg.homeunix.org

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