From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934275AbZIDUzV (ORCPT ); Fri, 4 Sep 2009 16:55:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934025AbZIDUzU (ORCPT ); Fri, 4 Sep 2009 16:55:20 -0400 Received: from out01.mta.xmission.com ([166.70.13.231]:39558 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933855AbZIDUzT (ORCPT ); Fri, 4 Sep 2009 16:55:19 -0400 To: Andrew Morton CC: , , , Alexey Dobriyan , Greg Kroah-Hartman , Tejun Heo Subject: [PATCH 0/4] Safely removing mmaped files From: ebiederm@xmission.com (Eric W. Biederman) Date: Fri, 04 Sep 2009 12:24:44 -0700 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-XM-SPF: eid=;;;mid=;;;hst=in02.mta.xmission.com;;;ip=76.21.114.89;;;frm=ebiederm@xmission.com;;;spf=neutral X-SA-Exim-Connect-IP: 76.21.114.89 X-SA-Exim-Rcpt-To: akpm@linux-foundation.org, tj@kernel.org, gregkh@suse.de, adobriyan@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org X-SA-Exim-Mail-From: ebiederm@xmission.com X-SA-Exim-Version: 4.2.1 (built Thu, 25 Oct 2007 00:26:12 +0000) X-SA-Exim-Scanned: No (on in02.mta.xmission.com); Unknown failure Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently when mmaped files are removed I have not found a single instance in the kernel where we handle it correctly. Frequently after a hot remove we will either leak a file (with weird ensuing consequences) or we will goof and not call vm_ops->close() which can cause leaks. It turns out this problem isn't too bad to actually fix and this patchset is my generic solution. Tested against 2.6.31-rc8 with a process that mmaped /sys/*/*/resource0 and /proc/bus/pci/*/*. I'm not certain what the best way to carry these patches is to get them merged. Andrew can you carry this patchset? Eric From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: [PATCH 0/4] Safely removing mmaped files Date: Fri, 04 Sep 2009 12:24:44 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: , , , Alexey Dobriyan , Greg Kroah-Hartman , Tejun Heo To: Andrew Morton Return-path: Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org Currently when mmaped files are removed I have not found a single instance in the kernel where we handle it correctly. Frequently after a hot remove we will either leak a file (with weird ensuing consequences) or we will goof and not call vm_ops->close() which can cause leaks. It turns out this problem isn't too bad to actually fix and this patchset is my generic solution. Tested against 2.6.31-rc8 with a process that mmaped /sys/*/*/resource0 and /proc/bus/pci/*/*. I'm not certain what the best way to carry these patches is to get them merged. Andrew can you carry this patchset? Eric -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with SMTP id 073896B0083 for ; Fri, 4 Sep 2009 16:55:13 -0400 (EDT) Subject: [PATCH 0/4] Safely removing mmaped files From: ebiederm@xmission.com (Eric W. Biederman) Date: Fri, 04 Sep 2009 12:24:44 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-linux-mm@kvack.org To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Alexey Dobriyan , Greg Kroah-Hartman , Tejun Heo List-ID: Currently when mmaped files are removed I have not found a single instance in the kernel where we handle it correctly. Frequently after a hot remove we will either leak a file (with weird ensuing consequences) or we will goof and not call vm_ops->close() which can cause leaks. It turns out this problem isn't too bad to actually fix and this patchset is my generic solution. Tested against 2.6.31-rc8 with a process that mmaped /sys/*/*/resource0 and /proc/bus/pci/*/*. I'm not certain what the best way to carry these patches is to get them merged. Andrew can you carry this patchset? Eric -- 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