From: "Paul Menage" <menage@google.com>
To: "Dhaval Giani" <dhaval@linux.vnet.ibm.com>
Cc: "Srivatsa Vaddagiri" <vatsa@linux.vnet.ibm.com>,
"Balbir Singh" <balbir@in.ibm.com>,
svaidy@linux.vnet.ibm.com, akpm@linux-foundation.org,
linux-kernel@vger.kernel.org, bharata@linux.vnet.ibm.com
Subject: Re: [PATCH] Fix for bad lock balance in Containers
Date: Thu, 28 Jun 2007 19:09:05 -0400 [thread overview]
Message-ID: <6599ad830706281609jebd82sdc1fb3ccc2d2df7b@mail.gmail.com> (raw)
In-Reply-To: <20070626050011.GA12584@linux.vnet.ibm.com>
On 6/26/07, Dhaval Giani <dhaval@linux.vnet.ibm.com> wrote:
>
> There are a few questions I had with respect to the current code,
>
> Why is the increment of s_active dependent on the return value of
> simple_set_mnt?
I think it's because, as you observed, grab_super() is static and
hence not reachable from container.c. But I thought that the only side
effect of it that we needed (since we had a safe pointer to the
superblock not obtained via the superblock list) was the increment of
sb_active. (As it turns out I was wrong and we needed the s_umount
lock too).
Incrementing the sb_active count (if simple_set_mnt() failed) seemed
as though it would be wrong.
>
> What should be the correct approach to get the locking balance? As far
> as I can see, the correct method would be to call sget which would then
> correctly handle everything. But that would require a test function. I
> saw functionality similar to a test function in the beginning of
> container_get_sb(). Should that be seperated and put in a seperate test
> function so that sget can be called?
I don't quite remember why I did it this way originally, now. I've got
no objection to the code being cleaned up to fit the more common
approach if it's practical to do so, but it seems to me that your
current patch fix seems enough at least for now.
Thanks,
Paul
prev parent reply other threads:[~2007-06-28 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-26 5:00 Dhaval Giani
2007-06-27 6:38 ` Bharata B Rao
2007-06-27 7:34 ` Dhaval Giani
2007-06-28 23:09 ` Paul Menage [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=6599ad830706281609jebd82sdc1fb3ccc2d2df7b@mail.gmail.com \
--to=menage@google.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@in.ibm.com \
--cc=bharata@linux.vnet.ibm.com \
--cc=dhaval@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=svaidy@linux.vnet.ibm.com \
--cc=vatsa@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome