From: David Miller <davem@davemloft.net>
To: g.nault@alphalink.fr
Cc: netdev@vger.kernel.org, jchapman@katalix.com
Subject: Re: [PATCH net] l2tp: take reference on sessions being dumped
Date: Tue, 04 Apr 2017 10:02:52 -0700 (PDT) [thread overview]
Message-ID: <20170404.100252.646823807636951948.davem@davemloft.net> (raw)
In-Reply-To: <806d0d7d9411be40c4910a1fa2e5ea438f3d0e1d.1491213045.git.g.nault@alphalink.fr>
From: Guillaume Nault <g.nault@alphalink.fr>
Date: Mon, 3 Apr 2017 12:03:13 +0200
> Take a reference on the sessions returned by l2tp_session_find_nth()
> (and rename it l2tp_session_get_nth() to reflect this change), so that
> caller is assured that the session isn't going to disappear while
> processing it.
>
> For procfs and debugfs handlers, the session is held in the .start()
> callback and dropped in .show(). Given that pppol2tp_seq_session_show()
> dereferences the associated PPPoL2TP socket and that
> l2tp_dfs_seq_session_show() might call pppol2tp_show(), we also need to
> call the session's .ref() callback to prevent the socket from going
> away from under us.
>
> Fixes: fd558d186df2 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts")
> Fixes: 0ad6614048cf ("l2tp: Add debugfs files for dumping l2tp debug info")
> Fixes: 309795f4bec2 ("l2tp: Add netlink control API for L2TP")
> Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Applied and queued up for -stable, thanks.
prev parent reply other threads:[~2017-04-04 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 10:03 [PATCH net] l2tp: take reference on sessions being dumped Guillaume Nault
2017-04-04 17:02 ` 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=20170404.100252.646823807636951948.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=g.nault@alphalink.fr \
--cc=jchapman@katalix.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 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).