]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] sg: use compound pages
authorNick Piggin <npiggin@suse.de>
Wed, 22 Mar 2006 08:08:30 +0000 (00:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 22 Mar 2006 15:54:01 +0000 (07:54 -0800)
commitbf7faa3f7e2b4a7de8cc2f2edc3ba74410e29599
tree0b5cd42f36f08086f0258a753203b840123c9301
parent9fdb816b2584bcce5ba9a3adf8f790e96a8120e7
[PATCH] sg: use compound pages

sg increments the refcount of constituent pages in its higher order memory
allocations when they are about to be mapped by userspace.  This is done so
the subsequent get_page/put_page when doing the mapping and unmapping does not
free the page.

Move over to the preferred way, that is, using compound pages instead.  This
fixes a whole class of possible obscure bugs where a get_user_pages on a
constituent page may outlast the user mappings or even the driver.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Douglas Gilbert <dougg@torque.net>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/scsi/sg.c