netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dim@openvz.org
Cc: netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru, dev@sw.ru
Subject: Re: [PATCH] fix sk->sk_filter field access
Date: Thu, 31 Aug 2006 15:29:53 -0700 (PDT)	[thread overview]
Message-ID: <20060831.152953.70199567.davem@davemloft.net> (raw)
In-Reply-To: <200608301707.14250.dim@openvz.org>

From: Dmitry Mishin <dim@openvz.org>
Date: Wed, 30 Aug 2006 17:07:14 +0400

> Function sk_filter() is called from tcp_v{4,6}_rcv() functions with argue 
> needlock = 0, while socket is not locked at that moment. In order to avoid 
> this and similar issues in the future, use rcu for sk->sk_filter field read 
> protection.
> 
> Patch is for net-2.6.19
> 
> Signed-off-by: Dmitry Mishin <dim@openvz.org>
> Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
> Signed-off-by: Kirill Korotaev <dev@openvz.org>

Dmitry, your email client chopped up the longer lines in the patch
such as:

> -static inline int sk_filter(struct sock *sk, struct sk_buff *skb, int 
> needlock)
> +static inline int sk_filter(struct sock *sk, struct sk_buff *skb)

Here.

> -static inline unsigned run_filter(struct sk_buff *skb, struct sock *sk, 
> unsigned res)
> +static inline int run_filter(struct sk_buff *skb, struct sock *sk,

And there.

But I fixed these up and applied the patch to net-2.6.19

I think we seriously need to think about fixing this bug,
in so me form, for 2.6.18

      parent reply	other threads:[~2006-08-31 22:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 13:07 [PATCH] fix sk->sk_filter field access Dmitry Mishin
2006-08-30 21:30 ` David Miller
2006-08-30 22:20   ` Alexey Kuznetsov
2006-08-30 22:32     ` David Miller
2006-08-30 23:14       ` Alexey Kuznetsov
2006-08-30 23:16         ` David Miller
2006-08-31 22:29 ` David Miller [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=20060831.152953.70199567.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dev@sw.ru \
    --cc=dim@openvz.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).