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: <20071027154947.6836a3d9@siona>
Date:	Sat, 27 Oct 2007 15:49:47 +0200
From:	Haavard Skinnemoen <hskinnemoen@...el.com>
To:	Dan Williams <dan.j.williams@...el.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Shannon Nelson <shannon.nelson@...el.com>
Subject: Re: [PATCH] DMA: Fix broken device refcounting

On Fri, 26 Oct 2007 09:36:17 -0700
Dan Williams <dan.j.williams@...el.com> wrote:

> @@ -221,7 +220,6 @@ void dma_chan_cleanup(struct kref *kref)
>  {
>  	struct dma_chan *chan = container_of(kref, struct dma_chan, refcount);
>	chan->device->device_free_chan_resources(chan);
> -	kref_put(&chan->device->refcount, dma_async_device_cleanup);
>  }
>  EXPORT_SYMBOL(dma_chan_cleanup);

While I can't see any problems with the rest of the patch, I think this
part is wrong for the same reasons removing the kref_put() from the
class device cleanup function is. I don't see any constraint that
guarantees that dma_chan_cleanup() will always be called before
dma_dev_release(), which means that "chan" may have been freed before
this function gets a chance to run. Please correct me if I'm wrong.

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