All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: tj@kernel.org, gregkh@linuxfoundation.org
Subject: Re: sysfs: use a separate locking class for open files depending on mmap
Date: Tue, 3 Dec 2013 13:43:24 -0500	[thread overview]
Message-ID: <20131203184324.GA11320@redhat.com> (raw)
In-Reply-To: <20131128051223.45739660885@gitolite.kernel.org>

On Thu, Nov 28, 2013 at 05:12:23AM +0000, Linux Kernel wrote:
 > Gitweb:     http://git.kernel.org/linus/;a=commit;h=027a485d12e089314360d459b8d847104dd28702
 > Commit:     027a485d12e089314360d459b8d847104dd28702
 > Parent:     54d71145a4548330313ca664a4a009772fe8b7dd
 > Author:     Tejun Heo <tj@kernel.org>
 > AuthorDate: Sun Nov 17 11:17:36 2013 +0900
 > Committer:  Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 > CommitDate: Sat Nov 23 10:52:13 2013 -0800
 > 
 >     sysfs: use a separate locking class for open files depending on mmap
 >     
 >     The following two commits implemented mmap support in the regular file
 >     path and merged bin file support into the regular path.
 > ...
 > -	mutex_init(&of->mutex);
 > +	/*
 > +	 * The following is done to give a different lockdep key to
 > +	 * @of->mutex for files which implement mmap.  This is a rather
 > +	 * crude way to avoid false positive lockdep warning around
 > +	 * mm->mmap_sem - mmap nests @of->mutex under mm->mmap_sem and
 > +	 * reading /sys/block/sda/trace/act_mask grabs sr_mutex, under
 > +	 * which mm->mmap_sem nests, while holding @of->mutex.  As each
 > +	 * open file has a separate mutex, it's okay as long as those don't
 > +	 * happen on the same file.  At this point, we can't easily give
 > +	 * each file a separate locking class.  Let's differentiate on
 > +	 * whether the file has mmap or not for now.
 > +	 */
 > +	if (has_mmap)
 > +		mutex_init(&of->mutex);
 > +	else
 > +		mutex_init(&of->mutex);
 > +
 
Somehow I just triggered this trace again, even with this commit applied.
The trace is pretty much identical to the old one.

	Dave


       reply	other threads:[~2013-12-03 18:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20131128051223.45739660885@gitolite.kernel.org>
2013-12-03 18:43 ` Dave Jones [this message]
2013-12-03 21:10   ` sysfs: use a separate locking class for open files depending on mmap Tejun Heo
2013-12-03 21:15     ` Dave Jones
2013-12-03 21:36       ` Tejun Heo
2013-12-03 22:15         ` Tejun Heo
2013-12-04  4:43           ` Dave Jones
2013-12-04 14:06             ` [PATCH driver-core-linus] sysfs: bail early from sysfs_bin_mmap() to avoid spurious lockdep warning Tejun Heo
2013-12-04 14:13               ` Tejun Heo
2013-12-04 14:20                 ` [PATCH driver-core-linus] sysfs: give different locking key to regular and bin files Tejun Heo
2013-12-05 19:44                   ` Greg KH
2013-12-05 19:52                     ` Dave Jones

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=20131203184324.GA11320@redhat.com \
    --to=davej@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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.