Thread (26 messages) flat view 26 messages, 2 authors, 2012-06-20

Re: [PATCH 12/12] Avoid dereferencing bd_disk during swap_entry_free for network storage

From: Rik van Riel <hidden>
Date: 2012-06-20 17:48:17
Also in: linux-mm, linux-nfs, lkml

On 06/20/2012 05:38 AM, Mel Gorman wrote:
Commit [b3a27d: swap: Add swap slot free callback to
block_device_operations] dereferences p->bdev->bd_disk but this is a
NULL dereference if using swap-over-NFS. This patch checks SWP_BLKDEV
on the swap_info_struct before dereferencing.

With reference to this callback, Christoph Hellwig stated "Please
just remove the callback entirely.  It has no user outside the staging
tree and was added clearly against the rules for that staging tree".
This would also be my preference but there was not an obvious way of
keeping zram in staging/ happy.

Signed-off-by: Xiaotian Feng<redacted>
Signed-off-by: Mel Gorman<mgorman@suse.de>
Acked-by: Rik van Riel<redacted>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help