Commit 5ec97f0e authored by Peter Osterlund's avatar Peter Osterlund Committed by Linus Torvalds

[PATCH] Fix incorrect kunmap_atomic in pktcdvd

The pktcdvd driver uses kunmap_atomic() incorrectly.  The function is
supposed to take an address as the first parameter, but the pktcdvd driver
passed a page pointer.  Thanks to Douglas Gilbert and Jens Axboe for
discovering this.
Signed-off-by: default avatarPeter Osterlund <petero2@telia.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 60f71566
......@@ -621,7 +621,7 @@ static void pkt_copy_bio_data(struct bio *src_bio, int seg, int offs,
BUG_ON(len < 0);
memcpy(vto, vfrom, len);
kunmap_atomic(src_bvl->bv_page, KM_USER0);
kunmap_atomic(vfrom, KM_USER0);
seg++;
offs = 0;
......@@ -649,7 +649,7 @@ static void pkt_make_local_copy(struct packet_data *pkt, struct page **pages, in
void *vfrom = kmap_atomic(pages[f], KM_USER0) + offsets[f];
void *vto = page_address(pkt->pages[p]) + offs;
memcpy(vto, vfrom, CD_FRAMESIZE);
kunmap_atomic(pages[f], KM_USER0);
kunmap_atomic(vfrom, KM_USER0);
pages[f] = pkt->pages[p];
offsets[f] = offs;
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment