>From 69990a516f4b5b48608b0ea283dfac6f1fa110b3 Mon Sep 17 00:00:00 2001 From: Nicolas Dichtel 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 --- 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