lkml.org 
[lkml]   [2009]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sysfs: Don't block indefinitely for unmapped files.
Hello, Eric.

Eric W. Biederman wrote:
> This patch modifies sysfs bin files so that we can remove
> the bin file while they are still mapped. When the kobject
> is removed we unmap the bin file and arrange for future
> accesses to the mapping to receive SIGBUS.
>
> Implementing this prevents a nasty DOS when pci devices are
> hot plugged and unplugged. Where if any of their resources
> were mmaped the kernel could not free up their pci resources
> or release their pci data structures.
>
> Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>

Heh... this is so cool. I've never thought about it. I would really
like more comments but other than that

Acked-by: Tejun Heo <tj@kernel.org>

--
tejun


\
 
 \ /
  Last update: 2009-02-25 10:19    [W:0.043 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site