From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx164.postini.com [74.125.245.164]) by kanga.kvack.org (Postfix) with SMTP id E43946B0068 for ; Wed, 20 Jun 2012 13:48:08 -0400 (EDT) Message-ID: <4FE20C97.2060401@redhat.com> Date: Wed, 20 Jun 2012 13:47:03 -0400 From: Rik van Riel MIME-Version: 1.0 Subject: Re: [PATCH 12/12] Avoid dereferencing bd_disk during swap_entry_free for network storage References: <1340185081-22525-1-git-send-email-mgorman@suse.de> <1340185081-22525-13-git-send-email-mgorman@suse.de> In-Reply-To: <1340185081-22525-13-git-send-email-mgorman@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman 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 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