From: Doug Chapman <doug.chapman@hp.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-kernel@vger.kernel.org, hch@infradead.org,
Marc Eshel <eshel@almaden.ibm.com>
Subject: Re: post 2.6.21 regression in F_GETLK
Date: Thu, 10 May 2007 16:24:07 -0400 [thread overview]
Message-ID: <1178828647.7247.16.camel@dchapman.boston.redhat.com> (raw)
In-Reply-To: <20070510193859.GR13719@fieldses.org>
On Thu, 2007-05-10 at 15:38 -0400, J. Bruce Fields wrote:
> On Thu, May 10, 2007 at 03:30:50PM -0400, bfields wrote:
> > On Thu, May 10, 2007 at 02:56:15PM -0400, Doug Chapman wrote:
> > > A recent regression (introduced after 2.6.21) was caught by the LTP test
> > > fcntl11. It appears that F_GETLK is not properly checking for existing
> > > F_RDLCK and allows taking out a write lock.
> >
> > Ouch.
> >
> > > This can be demonstrated by either running fcntl11 from the LTP suite or
> > > I have hacked up a much shorter version which demonstrates the issue and
> > > am attaching it.
> > >
> > > Using git bisect I came up with this commit as the one that introduced
> > > the issue.
> >
> > Thanks for the report--investigating....
>
> Argh. Looks like a cut-n-paste error. Does this fix it?
>
> --b.
>
> diff --git a/fs/locks.c b/fs/locks.c
> index 671a034..909f454 100644
> --- a/fs/locks.c
> +++ b/fs/locks.c
> @@ -1632,6 +1632,7 @@ static int posix_lock_to_flock(struct flock *flock, struct file_lock *fl)
> flock->l_len = fl->fl_end == OFFSET_MAX ? 0 :
> fl->fl_end - fl->fl_start + 1;
> flock->l_whence = 0;
> + flock->l_type = fl->fl_type;
> return 0;
> }
>
Bruce,
This doesn't fix the problem but it does look like it should be there.
I imagine this would have been the next bug we tripped over once the
original one is fixed.
- Doug
next prev parent reply other threads:[~2007-05-10 20:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-10 18:56 Doug Chapman
2007-05-10 19:14 ` Doug Chapman
2007-05-10 19:30 ` J. Bruce Fields
2007-05-10 19:38 ` J. Bruce Fields
2007-05-10 20:23 ` J. Bruce Fields
2007-05-10 21:01 ` Doug Chapman
2007-05-10 21:04 ` J. Bruce Fields
2007-05-10 21:35 ` J. Bruce Fields
2007-05-10 20:24 ` Doug Chapman [this message]
2007-05-10 22:38 ` [PATCH] locks: fix F_GETLK regression (failure to find conflicts) J. Bruce Fields
2007-05-10 23:30 ` Doug Chapman
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=1178828647.7247.16.camel@dchapman.boston.redhat.com \
--to=doug.chapman@hp.com \
--cc=bfields@fieldses.org \
--cc=eshel@almaden.ibm.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®