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: <20120109180444.GD7166@amd.com>
Date:	Mon, 9 Jan 2012 19:04:44 +0100
From:	Joerg Roedel <joerg.roedel@....com>
To:	Alan Stern <stern@...land.harvard.edu>
CC:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Michael Buesch <m@...s.ch>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Incorrect uses of get_driver()/put_driver()

On Mon, Jan 09, 2012 at 12:35:09PM -0500, Alan Stern wrote:
> lib/dma-debug.c:173:  drv = get_driver(dev->driver);
> lib/dma-debug.c:188:  put_driver(drv);
> 
> Joerg, these calls don't seem to do anything, as far as I can tell.  
> Is there any reason to keep them?

No reason to keep them :) It can be replaced with dev->driver, even
reference counting is not needed because only the pointer is kept and
never dereferenced.


	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

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