linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jaxboe@fusionio.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "cbe-oss-dev@lists.ozlabs.org" <cbe-oss-dev@lists.ozlabs.org>,
	Dan Carpenter <error27@gmail.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Geoff Levand <geoff@infradead.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [patch] ps3disk: passing wrong variable to bvec_kunmap_irq()
Date: Sun, 17 Oct 2010 08:49:29 +0200	[thread overview]
Message-ID: <4CBA9C79.7050908@fusionio.com> (raw)
In-Reply-To: <AANLkTi=wQDgAHC0Zm+psdP2g+B7JZJ8ot1NPCE+AAqU0@mail.gmail.com>

On 2010-10-16 21:39, Geert Uytterhoeven wrote:
> On Mon, Oct 11, 2010 at 21:42, Jens Axboe <jaxboe@fusionio.com> 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@gmail.com>
>>>
>>> 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?

It's a generic problem, not isolated to this case. The problem is that
the API isn't symmetric, and the unmap parts take a void * pointer.

-- 
Jens Axboe

  reply	other threads:[~2010-10-17  6:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 19:13 [patch] ps3disk: passing wrong variable to bvec_kunmap_irq() Dan Carpenter
2010-10-11 19:42 ` Jens Axboe
2010-10-16 19:39   ` Geert Uytterhoeven
2010-10-17  6:49     ` Jens Axboe [this message]
2010-10-17 11:36       ` Geert Uytterhoeven
2010-10-12 16:01 ` Geoff Levand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CBA9C79.7050908@fusionio.com \
    --to=jaxboe@fusionio.com \
    --cc=cbe-oss-dev@lists.ozlabs.org \
    --cc=error27@gmail.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=geert@linux-m68k.org \
    --cc=geoff@infradead.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).