lkml.org 
[lkml]   [2013]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:20
On Thu, Dec 05, 2013 at 11:10:51AM +0800, Yuanhan Liu wrote:
> Greetings,
>
> I got the below dmesg and the first bad commit is
>
> commit 4b93dc9b1c684d0587fe44d36bbfdf45bd3bea9d
> Author: Tejun Heo <tj@kernel.org>
> AuthorDate: Thu Nov 28 14:54:43 2013 -0500
> Commit: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> CommitDate: Fri Nov 29 18:16:08 2013 -0800
>
> sysfs, kernfs: prepare mount path for kernfs

Oops, can you please try the following patch?

Thanks.

diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c
index e7e3aa8..8d07527 100644
--- a/fs/sysfs/mount.c
+++ b/fs/sysfs/mount.c
@@ -45,8 +45,10 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type,

static void sysfs_kill_sb(struct super_block *sb)
{
+ void *ns = (void *)kernfs_super_ns(sb);
+
kernfs_kill_sb(sb);
- kobj_ns_drop(KOBJ_NS_TYPE_NET, (void *)kernfs_super_ns(sb));
+ kobj_ns_drop(KOBJ_NS_TYPE_NET, ns);
}

static struct file_system_type sysfs_fs_type = {

\
 
 \ /
  Last update: 2013-12-06 00:01    [W:0.051 / U:2.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site