[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1aanc3l3e.fsf@fess.ebiederm.org>
Date: Mon, 20 Sep 2010 00:55:33 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Greg Kroah-Hartman <gregkh@...e.de>
Cc: <linux-kernel@...r.kernel.org>, Tejun Heo <tj@...nel.org>,
Hugh Dickins <hughd@...gle.com>
Subject: [PATCH 0/2] Fix mmap bugs with sysfs_remove_bin_file
While reviewing the sysfs mmap code in fs/sysfs/bin.c I found two
rather nasty potential issues.
The first is if one of our wrapped mmap implementations implements
vma->close() we do not call it at sysfs_remove_bin_file time leading
to who knows what carnage.
The second is that we are potentially accessing the wrapped vm_ops
after sysfs_remove_bin_file has completed. Which could be a problem
if it is a modular user.
I don't know of any real world instances of problems. None of the
bin attribute mmaps functions that I know of today implement a close
method. However it seems prudent to fix these now before we have
track down some mysterious weird failure with hotunplug.
Eric W. Biederman (2):
sysfs: Fail bin file mmap if vma close is implemented.
sysfs: only access bin file vm_ops with the active lock
---
fs/sysfs/bin.c | 68 ++++++++++++++++++++++++++++----------------------------
1 files changed, 34 insertions(+), 34 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists