[lkml]   [2012]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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 <> 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

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.



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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-07-26 13:01    [W:0.082 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site