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: <1217395511.31350.6.camel@obelisk.thedillows.org>
Date:	Wed, 30 Jul 2008 01:25:11 -0400
From:	David Dillow <dave@...dillows.org>
To:	Jaswinder Singh <jaswinder@...radead.org>
Cc:	LKML <linux-kernel@...r.kernel.org>, becker@...ld.com,
	davidpmclean@...oo.com, Jeff Garzik <jeff@...zik.org>,
	netdev <netdev@...r.kernel.org>,
	David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] typhoon: use request_firmware

On Tue, 2008-07-29 at 21:39 +0530, Jaswinder Singh wrote:
> On Mon, 2008-07-28 at 21:38 -0400, David Dillow wrote:
> > This should move to either typhoon_init() or typhoon_init_one(). Putting
> > it in typhoon_init() means we waste memory when the module is loaded if
> > there is no typhoon NIC; putting it in typhoon_init_one() means it needs
> > protection from threaded probing, should that ever be put back in. Given
> > that most modern distros don't do probing by blinding loading modules,
> > typhoon_init() seems a safe bet.
> > 
> 
> Sorry Dave, I need tp->pdev so typhoon_init_one() seems better.
> I hope you do not mind this.

That's fine, and makes sense. However, you need to check if you've
already loaded it (typhoon_fw != NULL), so you don't leak memory if
there is more than one NIC. Part of me feels like there should be a
mutex around loading the firmware, to avoid surprises if PCI probing
gets multi-threaded again, but a comment to that effect may suffice for
now.

Also, if not adding a mutex, then this can be folded into
typhoon_init_one(), rather than living in a separate function. 

All in all, this is getting better, my reservations about the goal
aside.

Dave

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