From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: netdev <netdev@vger.kernel.org>
Subject: [RFC PATCH] dst: check if dst is freed in dst_check()
Date: Tue, 20 Jul 2010 11:49:20 +0200 [thread overview]
Message-ID: <4C457120.9070105@6wind.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]
Hi,
I probably missed something, but I cannot find where obsolete field is checked
when dst_check() is called. If dst->obsolete is > 1, dst cannot be used!
Attached is a proposal to fix this issue.
Regards,
--
Nicolas DICHTEL
6WIND
R&D Engineer
Tel: +33 1 39 30 92 10
Fax: +33 1 39 30 92 11
nicolas.dichtel@6wind.com
www.6wind.com
Join the Multicore Packet Processing Forum: www.multicorepacketprocessing.com
Ce courriel ainsi que toutes les pièces jointes, est uniquement destiné à son ou
ses destinataires. Il contient des informations confidentielles qui sont la
propriété de 6WIND. Toute révélation, distribution ou copie des informations
qu'il contient est strictement interdite. Si vous avez reçu ce message par
erreur, veuillez immédiatement le signaler à l'émetteur et détruire toutes les
données reçues.
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and contains information that is confidential and
proprietary to 6WIND. All unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender
by reply e-mail and destroy all copies of the original message.
[-- Attachment #2: 0001-dst-check-if-dst-is-freed-in-dst_check.patch --]
[-- Type: text/x-diff, Size: 772 bytes --]
>From 69990a516f4b5b48608b0ea283dfac6f1fa110b3 Mon Sep 17 00:00:00 2001
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Tue, 20 Jul 2010 11:35:53 +0200
Subject: [PATCH] dst: check if dst is freed in dst_check()
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
include/net/dst.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/net/dst.h b/include/net/dst.h
index 81d1413..7bf4f9a 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -319,6 +319,8 @@ static inline int dst_input(struct sk_buff *skb)
static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie)
{
+ if (dst->obsolete > 1)
+ return NULL;
if (dst->obsolete)
dst = dst->ops->check(dst, cookie);
return dst;
--
1.5.4.5
next reply other threads:[~2010-07-20 9:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 9:49 Nicolas Dichtel [this message]
2010-07-21 2:28 ` [RFC PATCH] dst: check if dst is freed in dst_check() Eric Dumazet
2010-07-21 6:41 ` David Miller
2010-07-21 7:03 ` Nicolas Dichtel
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=4C457120.9070105@6wind.com \
--to=nicolas.dichtel@6wind.com \
--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 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.