All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pavel A. Nekrasov" <pnekras@gmail.com>
To: johnpol@2ka.mipt.ru
Cc: laforge@netfilter.org, netfilter-devel@lists.netfilter.org,
	kaber@trash.net
Subject: Re: [1/3] OSF: code beautification.
Date: Wed, 1 Jun 2005 02:11:32 +0200	[thread overview]
Message-ID: <cede3071050531171179774bd3@mail.gmail.com> (raw)
In-Reply-To: <20050601041111.6c0d9075@zanzibar.2ka.mipt.ru>

On 6/1/05, Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
> On Wed, 1 Jun 2005 02:03:28 +0200
> "Pavel A. Nekrasov" <pnekras@gmail.com> wrote:
> 
> > it seems that I forgot to reply to the mailling list...
> >
> > On 6/1/05, Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
> > > On Wed, 1 Jun 2005 02:57:31 +0400
> > > Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:
> > >
> > > > On Wed, 1 Jun 2005 00:37:05 +0200
> > > > "Pavel A. Nekrasov" <pnekras@gmail.com> wrote:
> > >
> > > ...
> > >
> > > > > BTW, fix a deadlock. match() can be called from both bh and process context.
> > > >
> > > > Neither it suffers rcu lock in nf_hook_slow()?
> > >
> > > Ugh, it is read lock, but OSF match() method can be safely
> > > interrupted and reentered. BH are disabled when broadcasting over netlink,
> > > reading finger table is guarded by read_lock, while modification
> > > can be done only in process context which uses write_lock_bh().
> >
> > not talking about netlink
> >
> > say a program does send() running on you machine, so some packets can
> > hit match() from process context. While holding read lock, match() is
> > interrupted to handle a bh. now say, a packet coming from bh context
> > hits match() and tries to gets read lock but it's already held by the
> > packet coming from process context. deadlock.
> 
> It is read lock, which can be held by several users.
> 
> Modification part, which lives in osf_proc_write(), uses write_lock_bh().

You are right, sorry for the noise.

kind regards,
Pavel

  reply	other threads:[~2005-06-01  0:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-31 22:37 [1/3] OSF: code beautification Pavel A. Nekrasov
2005-05-31 22:57 ` Evgeniy Polyakov
2005-05-31 23:04   ` Evgeniy Polyakov
2005-06-01  0:03     ` Pavel A. Nekrasov
2005-06-01  0:11       ` Evgeniy Polyakov
2005-06-01  0:11         ` Pavel A. Nekrasov [this message]
2005-05-31 23:55 ` [0/3] OSF: resurect skb fragmentation patch Evgeniy Polyakov
  -- strict thread matches above, loose matches on Subject: below --
2005-05-29 20:20 [1/3] OSF: code beautification Evgeniy Polyakov
2005-06-11 16:30 ` Patrick McHardy
2005-06-11 16:44   ` Evgeniy Polyakov
2005-06-11 16:56     ` Patrick McHardy
2005-06-11 17:54       ` Evgeniy Polyakov

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=cede3071050531171179774bd3@mail.gmail.com \
    --to=pnekras@gmail.com \
    --cc=johnpol@2ka.mipt.ru \
    --cc=kaber@trash.net \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.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.