Thread (20 messages) 20 messages, 3 authors, 2011-09-12

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

From: Christoph Hellwig <hch@infradead.org>
Date: 2011-09-09 13:03:02
Also in: linux-nfs, lkml, netdev

On Fri, Sep 09, 2011 at 12:00:54PM +0100, 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.
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.

(and it's butt ugly)

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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