lkml.org 
[lkml]   [2012]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH 01/13] driver core: firmware loader: simplify pages ownership transfer
From
On Wed, Jul 25, 2012 at 2:10 AM, Borislav Petkov <bp@amd64.org> wrote:
>>
>> +/* transfer the ownership of pages to firmware */
>> +static void fw_set_page_data(struct firmware_priv *fw_priv)
>> +{
>> + struct firmware *fw = fw_priv->fw;
>> +
>> + fw_priv->data = vmap(fw_priv->pages, fw_priv->nr_pages,
>> + 0, PAGE_KERNEL_RO);
>
> We don't need to check the return value of vmap() here like we do above?

Good catch, it should be handled, otherwise may cause oops inside driver.

If that happens, the pages buffer should be dropped and return failure
from request_firmware or the callback of request_firmware_nowait.

I will fix it against this patch set if cache/uncache firmware can be
accepted.

Thanks,
--
Ming Lei


\
 
 \ /
  Last update: 2012-07-25 05:21    [W:0.116 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site