From: "Frédéric Moulins" <frederic.moulins@alsatis.com>
To: jchapman@katalix.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] [PPPOL2TP] Add missing sock_put() in pppol2tp_release()
Date: Thu, 27 Nov 2008 17:18:51 +0100 [thread overview]
Message-ID: <20081127171851.3fe7db5a@iter> (raw)
pppol2tp_sock_to_session() do sock_hold() if the session to release is
not NULL.
Signed-off-by: Frédéric Moulins <frederic.moulins@alsatis.com>
---
Patch is applicable to kernels 2.6.26 and following.
Tested with a 2.6.26 stable kernel:
without this patch, a session in a persistent tunnel cannot be
established again (connect failed: -17), and the pppol2tp kernel module
cannot be removed because still considered in use after stopping all
userspace daemons.
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index ff175e8..de80ba4 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -1353,6 +1353,7 @@ static int pppol2tp_release(struct socket *sock)
kfree_skb(skb);
sock_put(sk);
}
+ sock_put(sk);
}
release_sock(sk);
next reply other threads:[~2008-11-27 16:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 16:18 Frédéric Moulins [this message]
2008-11-29 6:13 ` [PATCH] [PPPOL2TP] Add missing sock_put() in pppol2tp_release() David Miller
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=20081127171851.3fe7db5a@iter \
--to=frederic.moulins@alsatis.com \
--cc=jchapman@katalix.com \
--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 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.