[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120726100806.GC30717@aftab.osrc.amd.com>
Date: Thu, 26 Jul 2012 12:08:06 +0200
From: Borislav Petkov <bp@...64.org>
To: Ming Lei <ming.lei@...onical.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rjw@...k.pl>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 05/13] driver core: firmware loader: introduce
firmware_buf
On Thu, Jul 26, 2012 at 10:51:55AM +0800, Ming Lei wrote:
> On Wed, Jul 25, 2012 at 9:59 PM, Borislav Petkov <bp@...64.org> wrote:
>
> > This is subtle: the caller of fw_free_buf might forget to assign NULL to
> > the buf ptr.
>
> Who is the caller? Since it is always called inside firmware loader, we should
> make sure that.
>
> > Why not pass struct firmware_priv *fw_priv to the function instead and ...
>
> No, it shouldn't. The lifetime of fw_priv is just same with request_firmware or
> its work_func pair, but firmware_buf may live much longer than fw_priv. You
> will see that fw_free_buf is the release function of kref in firmware_buf.
Actually, this is all moot since you're changing all this in later
patches. I'm staring at the code after patch 10/13 and the check is
gone.
So nevermind.
[ … ]
> Suppose you are right, it shouldn't be done in this patch since this
> patch just converts to firmware_buf.
Wherever you find its suitable.
Thanks.
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
--
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