From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rik van Riel Subject: Re: [PATCH 12/12] Avoid dereferencing bd_disk during swap_entry_free for network storage Date: Wed, 20 Jun 2012 13:47:03 -0400 Message-ID: <4FE20C97.2060401@redhat.com> References: <1340185081-22525-1-git-send-email-mgorman@suse.de> <1340185081-22525-13-git-send-email-mgorman@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Andrew Morton , Linux-MM , Linux-Netdev , Linux-NFS , LKML , David Miller , Trond Myklebust , Neil Brown , Christoph Hellwig , Peter Zijlstra , Mike Christie , Eric B Munson To: Mel Gorman Return-path: In-Reply-To: <1340185081-22525-13-git-send-email-mgorman@suse.de> Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org 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 > Signed-off-by: Mel Gorman Acked-by: Rik van Riel -- 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: email@kvack.org