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]
Date:	Sat, 27 Oct 2007 15:28:16 +0200
From:	Haavard Skinnemoen <hskinnemoen@...el.com>
To:	Shannon Nelson <shannon.nelson@...el.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	shannon.nelson@...el.com, greg@...ah.com, dan.j.williams@...el.com
Subject: Re: [PATCH] DMAENGINE: too many kref_put calls

On Fri, 26 Oct 2007 16:56:48 -0700
Shannon Nelson <shannon.nelson@...el.com> wrote:

> @@ -134,8 +134,7 @@ static void dma_async_device_cleanup(struct kref
> *kref); 
>  static void dma_dev_release(struct device *dev)
>  {
> -	struct dma_chan *chan = to_dma_chan(dev);
> -	kref_put(&chan->device->refcount, dma_async_device_cleanup);
> +	return;
>  }

Hmm...what prevents dma_chan_cleanup() from being called while someone
still holds a reference to the "class" device? This will allow the
module removal to proceed, the device to be freed, and things will blow
up...

I think my patch is better. By taking two references, the order in
which the cleanup functions are called doesn't matter -- both have to
complete before the module removal is allowed to proceed.

HÃ¥vard
-
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