]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: consistent reference counting in procfs and debufs
authorGuillaume Nault <g.nault@alphalink.fr>
Wed, 25 Apr 2018 17:54:14 +0000 (19:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Apr 2018 15:06:35 +0000 (11:06 -0400)
commitde9b49a906f46f73a6a2f438cf4b3c583635e410
treedeb655628c17910683936af73a8b510992404ff2
parent1471aa282100ee34b79ddf3ee5a8ecf0aeccdc35
l2tp: consistent reference counting in procfs and debufs

The 'pppol2tp' procfs and 'l2tp/tunnels' debugfs files handle reference
counting of sessions differently than for tunnels.

For consistency, use the same mechanism for handling both sessions and
tunnels. That is, drop the reference on the previous session just
before looking up the next one (rather than in .show()). If necessary
(if dump stops before *_next_session() returns NULL), drop the last
reference in .stop().

Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_debugfs.c
net/l2tp/l2tp_ppp.c