From: Vlastimil Babka <vbabka@suse.cz>
To: Tejun Heo <tj@kernel.org>, Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:20
Date: Tue, 10 Dec 2013 14:32:18 +0100 [thread overview]
Message-ID: <52A717E2.6040907@suse.cz> (raw)
In-Reply-To: <20131205225019.GA32005@mtj.dyndns.org>
On 12/05/2013 11:50 PM, Tejun Heo wrote:
> 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 = {
I've had the same problem with linux-next-20131209 and this patch fixed
it. Feel free to add if appropriate:
Tested-by: Vlastimil Babka <vbabka@suse.cz>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
prev parent reply other threads:[~2013-12-10 13:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-05 3:10 BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:20 Yuanhan Liu
2013-12-05 22:50 ` Tejun Heo
2013-12-09 14:56 ` Yuanhan Liu
2013-12-10 15:22 ` [PATCH driver-core-next] sysfs: fix use-after-free in sysfs_kill_sb() Tejun Heo
2013-12-10 13:32 ` Vlastimil Babka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52A717E2.6040907@suse.cz \
--to=vbabka@suse.cz \
--cc=fengguang.wu@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=yuanhan.liu@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.