Re: [patch] ps3disk: passing wrong variable to bvec_kunmap_irq()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 11, 2010 at 21:42, Jens Axboe <jaxboe@xxxxxxxxxxxx> wrote:
> On 2010-10-11 21:13, Dan Carpenter wrote:
>> This should pass "buf" to bvec_kunmap_irq() instead of "bv". ÂThe api is
>> like kmap_atomic() instead of kmap().
>>
>> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
>>
>> diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
>> index e9da874..03688c2 100644
>> --- a/drivers/block/ps3disk.c
>> +++ b/drivers/block/ps3disk.c
>> @@ -113,7 +113,7 @@ static void ps3disk_scatter_gather(struct ps3_storage_device *dev,
>> Â Â Â Â Â Â Â Â Â Â Â memcpy(buf, dev->bounce_buf+offset, size);
>> Â Â Â Â Â Â Â offset += size;
>> Â Â Â Â Â Â Â flush_kernel_dcache_page(bvec->bv_page);
>> - Â Â Â Â Â Â bvec_kunmap_irq(bvec, &flags);
>> + Â Â Â Â Â Â bvec_kunmap_irq(buf, &flags);
>> Â Â Â Â Â Â Â i++;
>> Â Â Â }
>> Â}
>
> Thanks applied, that bug is all too common.

Because  bvec_kunmap_irq() is a macro if !CONFIG_HIGHMEM, and thus there's no
argument type checking on e.g. pp64, which doesn't support HIGHMEM?

What about turning it into an inline function?

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux