mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Herbert Poetzl <herbert@13thfloor.at>
Cc: linux-kernel@vger.kernel.org
Subject: Re: lock issues
Date: Tue, 12 Oct 2004 02:08:28 +0200	[thread overview]
Message-ID: <1097539708.5432.64.camel@lade.trondhjem.org> (raw)
In-Reply-To: <20041011225700.GD32228@DUMA.13thfloor.at>

På ty , 12/10/2004 klokka 00:57, skreiv Herbert Poetzl:
> Hi Trond!
> 
> experiencing the following panic on a linux-vserver
> kernel (2.6.9-rc4, no modifications to locking)

Which filesystem? Is this NFS or CIFS (which both have an f_op->lock()
routine)?

> it's the locks_free_lock(file_lock); at the end of 
> fcntl_setlk64() and I'm asking myself if something
> like in sys_flock()
> 
>         if (list_empty(&lock->fl_link)) {
>                 locks_free_lock(lock);
>         }
> 
> would help here or just paper over the real issue?

Actually, the sys_flock() thing looks a lot more iffy to me: why should
list_empty(lock->fl_link) mean that you are responsible for freeing that
lock? Couldn't a sibling or child thread have released it from
underneath you?

Anyhow, that would indeed be papering over an issue in the posix lock
case. By the time we get to the end of fcntl_setlk64(), the file_lock
should not be on any lists. If it got added to somebody else's block
list, it should either have been unblocked when the region was freed, or
in case of a signal, we remove it from the block list manually. Unlike
the flock case, file_lock itself never gets added to the active list.

Cheers,
  Trond


  reply	other threads:[~2004-10-12 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-11 22:57 Herbert Poetzl
2004-10-12  0:08 ` Trond Myklebust [this message]
2004-10-12 14:29   ` Herbert Poetzl
2004-10-12 17:58     ` Olivier Poitrey

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=1097539708.5432.64.camel@lade.trondhjem.org \
    --to=trond.myklebust@fys.uio.no \
    --cc=herbert@13thfloor.at \
    --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®