[PATCH net] ppp: fix device unregistration upon netns deletion

2015-08-13 Thread Guillaume Nault
ppp_exit_net() now starts by unregistering all remaining PPP devices to ensure that none will get unregistered after the call to idr_destroy(). Signed-off-by: Guillaume Nault g.na...@alphalink.fr --- drivers/net/ppp/ppp_generic.c | 79 +++ 1 file changed, 43

[PATCH net-next 2/2] ppp: implement x-netns support

2015-08-13 Thread Guillaume Nault
, L2TP, etc.). PPP devices are automatically unregistered when their netns gets removed. So read() and poll() on the unit file descriptor will respectively receive EOF and POLLHUP. Channels aren't affected. Signed-off-by: Guillaume Nault g.na...@alphalink.fr --- drivers/net/ppp/ppp_generic.c | 17

[PATCH net-next 1/2] ppp: fix device unregistration upon netns deletion

2015-08-13 Thread Guillaume Nault
ppp_exit_net() now starts by unregistering all remaining PPP devices to ensure that none will get unregistered after the call to idr_destroy(). Signed-off-by: Guillaume Nault g.na...@alphalink.fr --- drivers/net/ppp/ppp_generic.c | 79 +++ 1 file changed, 43

[PATCH net-next 0/2] ppp: implement x-netns support

2015-08-13 Thread Guillaume Nault
namespace operations. Channels and lower layer protocols aren't affected. Patch #1 is a bug fix for an existing namespace deletion bug and has been separetly sent to net. Patch #2 is the actual x-netns implementation. Guillaume Nault (2): ppp: fix device unregistration upon netns deletion ppp

[PATCH net-next v2] ppp: implement x-netns support

2015-08-24 Thread Guillaume Nault
, L2TP, etc.). PPP devices are automatically unregistered when their netns gets removed. So read() and poll() on the unit file descriptor will respectively receive EOF and POLLHUP. Channels aren't affected. Signed-off-by: Guillaume Nault g.na...@alphalink.fr --- v2: rebase on top of net-next

[PATCH net v2] ppp: fix device unregistration upon netns deletion

2015-08-14 Thread Guillaume Nault
, ppp_exit_net() now starts by unregistering all remaining PPP devices to ensure that none will get unregistered after the call to idr_destroy(). Signed-off-by: Guillaume Nault g.na...@alphalink.fr --- v2: remove unnecessary curly braces in idr_for_each_entry() drivers/net/ppp/ppp_generic.c | 78

Re: [PATCH net-next 0/2] ppp: implement x-netns support

2015-08-14 Thread Guillaume Nault
On Thu, Aug 13, 2015 at 09:20:04PM -0700, David Miller wrote: From: Guillaume Nault g.na...@alphalink.fr Date: Thu, 13 Aug 2015 15:28:02 +0200 This series allows PPP devices to reside in a different netns from the PPP unit/channels. Packets only cross netns boundaries when they're

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-22 Thread Guillaume Nault
On Thu, Oct 22, 2015 at 03:53:33AM +0300, Denys Fedoryshchenko wrote: > On 2015-10-22 03:14, Matt Bennett wrote: > >On Tue, 2015-10-13 at 05:13 +0300, Denys Fedoryshchenko wrote: > >>On 2015-10-07 15:12, Guillaume Nault wrote: > >>> diff --git a/drivers/net/ppp/ppp

[PATCH net] ppp: fix pppoe_dev deletion condition in pppoe_release()

2015-10-22 Thread Guillaume Nault
want to release the pppoe_dev if it exists and reset sk_state to PPPOX_DEAD, no matter the previous value of sk_state. So we can just check for po->pppoe_dev and avoid any assumption on sk->sk_state. Fixes: 2b018d57ff18 ("pppoe: drop PPPOX_ZOMBIEs in pppoe_release") Sign

Re: Fw: [Bug 107141] New: [1177853.192071] INFO: task accel-pppd:24263 blocked for more than 120 seconds.

2015-11-12 Thread Guillaume Nault
On Wed, Nov 11, 2015 at 08:57:15AM -0800, Stephen Hemminger wrote: > > > Begin forwarded message: > > Date: Wed, 4 Nov 2015 10:46:56 + > From: "bugzilla-dae...@bugzilla.kernel.org" > > To: "shemmin...@linux-foundation.org"

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-07 Thread Guillaume Nault
On Tue, Oct 06, 2015 at 09:12:18PM +, Matt Bennett wrote: > On Tue, 2015-10-06 at 11:46 +0200, Guillaume Nault wrote: > > On Tue, Oct 06, 2015 at 04:46:04AM +, Matt Bennett wrote: > > > I don't know why the code isn't like the following anyway. > > &g

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-07 Thread Guillaume Nault
On Mon, Oct 05, 2015 at 02:08:44PM +0200, Guillaume Nault wrote: > if (po) { > struct sock *sk = sk_pppox(po); > > - bh_lock_sock(sk); > - > - /* If the user has locked the socket, just ignore > - * the packet.

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-13 Thread Guillaume Nault
On Tue, Oct 13, 2015 at 05:13:54AM +0300, Denys Fedoryshchenko wrote: > On 2015-10-07 15:12, Guillaume Nault wrote: > >On Mon, Oct 05, 2015 at 02:08:44PM +0200, Guillaume Nault wrote: > >>if (po) { > >>struct sock *sk = sk_pppox(po); > >

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-06 Thread Guillaume Nault
On Tue, Oct 06, 2015 at 12:26:20AM +, Matt Bennett wrote: > On Mon, 2015-10-05 at 14:24 +0200, Guillaume Nault wrote: > > On Mon, Oct 05, 2015 at 04:08:51AM +, Matt Bennett wrote: > > > Hi, I am seeing this panic occur occasionally however I am unsure how to > >

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-06 Thread Guillaume Nault
On Tue, Oct 06, 2015 at 04:46:04AM +, Matt Bennett wrote: > > > The second one seems to be trickier. It looks like a race wrt. PADT > > > message reception. Reproducing the bug will probably require to > > > generate some PADT flooding to a host that creates and releases PPPoE > > >

Re: 4.1.0, kernel panic, pppoe_release

2015-09-10 Thread Guillaume Nault
On Fri, Jul 17, 2015 at 09:16:14PM +0300, Denys Fedoryshchenko wrote: > Probably my knowledge of kernel is not sufficient, but i will try few > approaches. > One of them to add to pppoe_unbind_sock_work: > > pppox_unbind_sock(sk); > +/* Signal the death of the socket. */ >

Re: kernel panic in pppoe_release

2015-09-15 Thread Guillaume Nault
On Thu, Sep 03, 2015 at 12:14:32PM -0700, Murat Sezgin wrote: > I just wonder , if the > proposed patch by Denys Fedoryshchenko, which is below, fixes this issue > completely. > >     pppox_unbind_sock(sk); >     +/* Signal the death of the socket. */ >     +sk->sk_state = PPPOX_DEAD;

[PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-09-30 Thread Guillaume Nault
s in pppoe_release") Tested-by: Oleksii Berezhniak <c...@irc.lg.ua> Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/pppoe.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index 3837ae3..2ed7506 100644 ---

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-02 Thread Guillaume Nault
On Fri, Oct 02, 2015 at 11:01:45AM +0300, Denys Fedoryshchenko wrote: > Here is similar panic after patch applied (it might be different bug), got > over netconsole: > > [126348.617115] CPU: 0 PID: 5254 Comm: accel-pppd Not tainted > 4.2.2-build-0087 #2 > [126348.617632] Hardware name: Intel

Re: [Linux 4.2-rc8+...v4.3-rc2] REGRESSION: ppp: circular locking dependency detected: [pppd] ppp_dev_uninit() | rtnl_lock()

2015-09-23 Thread Guillaume Nault
On Wed, Sep 23, 2015 at 08:06:16AM +0200, Sedat Dilek wrote: > Without reverting the below culprit ppp patch... > > commit/?id=8cb775bc0a34dc596837e7da03fd22c747be618b > ("ppp: fix device unregistration upon netns deletion") > > ...I have an unstable Internet connection via

[PATCH net] ppp: fix lockdep splat in ppp_dev_uninit()

2015-09-24 Thread Guillaume Nault
EADLOCK *** Fixes: 8cb775bc0a34 ("ppp: fix device unregistration upon netns deletion") Reported-by: Sedat Dilek <sedat.di...@gmail.com> Tested-by: Sedat Dilek <sedat.di...@gmail.com> Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.

Re: [Linux 4.2-rc8+...v4.3-rc2] REGRESSION: ppp: circular locking dependency detected: [pppd] ppp_dev_uninit() | rtnl_lock()

2015-09-24 Thread Guillaume Nault
On Wed, Sep 23, 2015 at 11:21:50PM +0200, Sedat Dilek wrote: > On Wed, Sep 23, 2015 at 10:46 PM, Sedat Dilek <sedat.di...@gmail.com> wrote: > > On Wed, Sep 23, 2015 at 12:38 PM, Guillaume Nault <g.na...@alphalink.fr> > > wrote: > > Do you mind to send a proper p

Re: 4.1.0, kernel panic, pppoe_release

2015-09-25 Thread Guillaume Nault
On Tue, Sep 22, 2015 at 04:47:48AM +0300, Denys Fedoryshchenko wrote: > Hi, > Sorry for late reply, was not able to push new kernel on pppoes without > permissions (it's production servers), just got OK. > > I am testing patch on another pppoe server with 9k users, for ~3 days, seems > fine. I

Re: 4.1.0, kernel panic, pppoe_release

2015-09-25 Thread Guillaume Nault
On Fri, Sep 25, 2015 at 06:02:42PM +0300, Denys Fedoryshchenko wrote: > On 2015-09-25 17:38, Guillaume Nault wrote: > >On Tue, Sep 22, 2015 at 04:47:48AM +0300, Denys Fedoryshchenko wrote: > >>Hi, > >>Sorry for late reply, was not able to push new kernel on pppoes wi

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-05 Thread Guillaume Nault
On Mon, Oct 05, 2015 at 04:08:51AM +, Matt Bennett wrote: > Hi, I am seeing this panic occur occasionally however I am unsure how to > go about reproducing it. Is it enough to simply keep creating and > tearing down the PPP interface? I can also test and/or investigate this > issue if a

Re: [PATCH net] ppp: don't override sk->sk_state in pppoe_flush_dev()

2015-10-05 Thread Guillaume Nault
> I am doing just "dirty" patch like this, i cannot certainly remember if i > was doing git reversal, because > it was a while when i spotted this bug. After that pppoe server is not > rebooting. > > diff -Naur linux-4.2.2-vanilla/drivers/net/ppp/pppoe.c >

[PATCH net] pppox: use standard module auto-loading feature

2015-12-02 Thread Guillaume Nault
. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/pppoe.c | 2 +- drivers/net/ppp/pppox.c | 3 ++- drivers/net/ppp/pptp.c | 1 + net/l2tp/l2tp_ppp.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/p

Re: [PATCH net] pppox: use standard module auto-loading feature

2015-12-02 Thread Guillaume Nault
On Wed, Dec 02, 2015 at 04:27:39PM +0100, Guillaume Nault wrote: > * Register PF_PPPOX with pppox module rather than with pppoe, > so that pppoe doesn't get loaded for any PF_PPPOX socket. > > * Register PX_PROTO_* with standard MODULE_ALIAS_NET_PF_PROTO() > instead o

Re: Kernel 4.1.12 crash

2015-12-02 Thread Guillaume Nault
On Mon, Nov 30, 2015 at 09:42:08PM +0100, Guillaume Nault wrote: > On Mon, Nov 30, 2015 at 04:03:37PM +0100, Guillaume Nault wrote: > > Yes, it most likely was introduced by 287f3a943fef ("pppoe: Use > > workqueue to die properly when a PADT is received"). I still h

Re: Kernel 4.1.12 crash

2015-12-03 Thread Guillaume Nault
On Wed, Dec 02, 2015 at 06:23:35PM +0100, Guillaume Nault wrote: > > You can try the following. It's not yet a proper fix as there are still > a few things that bug me in pppoe_connect(). > > --- > diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c > index 5e

[PATCH net] pppoe: fix memory corruption in padt work structure

2015-12-03 Thread Guillaume Nault
ived") Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/pppoe.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c index 5e0b432..0a37f84 100644 --- a/drivers/net/ppp/pppoe.c +++ b/drive

[PATCH net-next] pppoe: optional deactivation of PADT packet handling

2015-12-15 Thread Guillaume Nault
Kernel space shouldn't handle PADT packets since PADT belongs to PPPoE's control plane. With "handle_padt" module option, user space can now decide to avoid kernel interpretation of PADT packets and be responsible for session disconnection. Signed-off-by: Guillaume Nault <g.na...

Re: Another pppoe-related crash

2015-12-14 Thread Guillaume Nault
On Fri, Dec 11, 2015 at 05:07:54PM +0200, Andrew wrote: > I've got another pppoe-related crash on one PPPoE BRAS. > > Kernel is 4.1.13 with patch "pppoe: fix memory corruption in padt work > structure" > Commit 1acea4f6ce1b ("ppp: fix pppoe_dev deletion condition in pppoe_release()") is missing

Re: [PATCH net-next] pppoe: optional deactivation of PADT packet handling

2015-12-16 Thread Guillaume Nault
On Tue, Dec 15, 2015 at 10:50:05AM -0600, Dan Williams wrote: > On Tue, 2015-12-15 at 17:06 +0100, Guillaume Nault wrote: > > Kernel space shouldn't handle PADT packets since PADT belongs to > > PPPoE's control plane. > > With "handle_padt" module option, use

[PATCH net-next 1/2] ppp: define "ppp" device type

2015-12-11 Thread Guillaume Nault
Let PPP devices be identified as such in /sys/class/net//uevent. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 9a863c6..1

[PATCH net-next 0/2] Minor PPP devices improvements

2015-12-11 Thread Guillaume Nault
Let PPP devices be friendlier to user space by registering their device type and reporting their interface naming scheme. Guillaume Nault (2): ppp: define "ppp" device type ppp: declare ppp devices as enumerated interfaces drivers/net/ppp/ppp_generic.c | 9 +++-- 1 file

[PATCH net-next 2/2] ppp: declare ppp devices as enumerated interfaces

2015-12-11 Thread Guillaume Nault
Let user space be aware of the naming scheme used by ppp interfaces (visible in /sys/class/net//name_assign_type). Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/n

Re: [Linux-v4.4-LTS] ppp: Backport of rtnetlink device handling

2016-01-04 Thread Guillaume Nault
On Mon, Jan 04, 2016 at 08:47:30AM +0100, Sedat Dilek wrote: > Hi Guillaume, > > which patches do I need to backport "ppp: rtnetlink device handling" > to Linux v4.4 which will be a LongTerm-Supported (LTS) Linux-kernel > [0]? > Quite frankly, backporting this series doesn't look like a good

Re: [PATCH 0/2] ppp: add netlink support

2016-01-05 Thread Guillaume Nault
On Tue, Jan 05, 2016 at 02:15:34PM -0500, David Miller wrote: > From: Guillaume Nault <g.na...@alphalink.fr> > Date: Tue, 5 Jan 2016 19:10:20 +0100 > > > On Wed, Dec 23, 2015 at 09:04:46PM +0100, Guillaume Nault wrote: > >> This series adds netlink support for creat

Re: [PATCH 0/2] ppp: add netlink support

2016-01-05 Thread Guillaume Nault
On Wed, Dec 23, 2015 at 09:04:46PM +0100, Guillaume Nault wrote: > This series adds netlink support for creating PPP devices. > Any feedback on this series? I can see that it has been marked "Deferred" in patchwork, so I'm unsure about what to do with this patch set now. Shoul

Re: [net-next] ppp: rtnetlink device handling

2015-12-31 Thread Guillaume Nault
On Thu, Dec 31, 2015 at 12:01:40PM +0100, Sedat Dilek wrote: > On Thu, Dec 31, 2015 at 11:41 AM, Guillaume Nault <g.na...@alphalink.fr> > wrote: > > On Thu, Dec 31, 2015 at 08:46:59AM +0100, Sedat Dilek wrote: > >> Hi Guillaume, > >> > >> can you

Re: [net-next] ppp: rtnetlink device handling

2015-12-31 Thread Guillaume Nault
On Thu, Dec 31, 2015 at 08:46:59AM +0100, Sedat Dilek wrote: > Hi Guillaume, > > can you explain why you moved ppp to rtnetlink device handling? > Benefits, etc.? > The objective is to bring all the flexibility of rtnetlink device creation to ppp interfaces. This is particularly useful for

Re: [PATCH 0/2] ppp: add netlink support

2015-12-23 Thread Guillaume Nault
On Wed, Dec 23, 2015 at 09:04:46PM +0100, Guillaume Nault wrote: > This series adds netlink support for creating PPP devices. > And I forgot to mention that it applies to net-next. Sorry. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a m

[PATCH 2/2] ppp: implement rtnetlink device handling

2015-12-23 Thread Guillaume Nault
created with the rtnetlink API behave like the ones created with ioctl(PPPIOCNEWUNIT). In particular existing ioctls still apply to PPP units created with the rtnetlink API. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c

[PATCH 0/2] ppp: add netlink support

2015-12-23 Thread Guillaume Nault
This series adds netlink support for creating PPP devices. It doesn't implement any PPP specific attribute beyond IFLA_PPP_DEV_FD, which is necessary in the PPP device model for passing control plane packets to user space. Guillaume Nault (2): ppp: define reusable device creation functions

[PATCH 1/2] ppp: define reusable device creation functions

2015-12-23 Thread Guillaume Nault
that caller can retrieve the unit identifier without accessing the new ppp structure. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 216 +- 1 file changed, 127 insertions(+), 89 deletions(-) diff --git a/drivers/n

[PATCH net-next] l2tp: rely on ppp layer for skb scrubbing

2015-12-29 Thread Guillaume Nault
Since 79c441ae505c ("ppp: implement x-netns support"), the PPP layer calls skb_scrub_packet() whenever the skb is received on the PPP device. Manually resetting packet meta-data in the L2TP layer is thus redundant. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- net

Re: Kernel 4.1.12 crash

2015-11-25 Thread Guillaume Nault
On Wed, Nov 25, 2015 at 12:59:52AM +0200, Andrew wrote: > Hi. > > I tried to reproduce errors in virtual environment (some VMs on my > notebook). > > I've tried to create 1000 client PPPoE sessions from this box via script: > for i in `seq 1 1000`; do pppd plugin rp-pppoe.so user test password

Re: Kernel 4.1.12 crash

2015-11-30 Thread Guillaume Nault
On Mon, Nov 30, 2015 at 12:05:13AM +0200, Andrew wrote: > 26.11.2015 18:44, Guillaume Nault пишет: > >On Wed, Nov 25, 2015 at 04:58:54PM +0200, Andrew wrote: > >>25.11.2015 16:10, Guillaume Nault пишет: > >>>On Wed, Nov 25, 2015 at 12:59:52AM +0200, Andrew wrote:

Re: Kernel 4.1.12 crash

2015-11-30 Thread Guillaume Nault
[Adding Simon to the discussion] On Mon, Nov 30, 2015 at 04:03:37PM +0100, Guillaume Nault wrote: > On Mon, Nov 30, 2015 at 12:05:13AM +0200, Andrew wrote: > > 26.11.2015 18:44, Guillaume Nault пишет: > > >On Wed, Nov 25, 2015 at 04:58:54PM +0200, Andrew wrote: > > >&

Re: Kernel 4.1.12 crash

2015-11-26 Thread Guillaume Nault
On Wed, Nov 25, 2015 at 04:58:54PM +0200, Andrew wrote: > 25.11.2015 16:10, Guillaume Nault пишет: > >On Wed, Nov 25, 2015 at 12:59:52AM +0200, Andrew wrote: > >>Hi. > >> > >>I tried to reproduce errors in virtual environment (some VMs on my > >>noteboo

[PATCH net-next 1/2] ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv()

2015-11-19 Thread Guillaume Nault
Since 287f3a943fef ("pppoe: Use workqueue to die properly when a PADT is received"), pppoe_disc_rcv() disconnects the socket by scheduling pppoe_unbind_sock_work(). This is enough to stop socket transmission and makes the PPPOX_ZOMBIE state uncessary. Signed-off-by: Guillaume N

[PATCH net-next 2/2] ppp: remove PPPOX_ZOMBIE socket state

2015-11-19 Thread Guillaume Nault
PPPOX_ZOMBIE is never set anymore. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/pppoe.c | 4 ++-- drivers/net/ppp/pppox.c | 2 +- include/linux/if_pppox.h | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/ppp/pppoe.c b/drive

[PATCH net-next 0/2] ppp: Remove PPPOX_ZOMBIE socket state

2015-11-19 Thread Guillaume Nault
PADT is received"). We can thus simplify pppox socket state handling by getting rid of PPPOX_ZOMBIE entirely. Guillaume Nault (2): ppp: don't set sk_state to PPPOX_ZOMBIE in pppoe_disc_rcv() ppp: remove PPPOX_ZOMBIE socket state drivers/net/ppp/pppoe.c | 26 -- d

[PATCH v2 net] l2tp: fix configuration passed to setup_udp_tunnel_sock()

2016-06-08 Thread Guillaume Nault
72.696530] Kernel Offset: disabled [ 72.696530] ---[ end Kernel panic - not syncing: Fatal exception in interrupt v2: use empty initialiser instead of "{ NULL }" to avoid relying on first field's type. Fixes: 38fd2af24fcf ("udp: Add socket based GRO and config") Sign

Re: [PATCH net] l2tp: fix configuration passed to setup_udp_tunnel_sock()

2016-06-08 Thread Guillaume Nault
On Tue, Jun 07, 2016 at 04:20:17PM -0700, David Miller wrote: > From: Guillaume Nault <g.na...@alphalink.fr> > Date: Mon, 6 Jun 2016 13:48:02 +0200 > > > @@ -1581,7 +1581,7 @@ int l2tp_tunnel_create(struct net *net, int fd, int > > version, u32 tunnel_id,

[PATCH net] l2tp: fix configuration passed to setup_udp_tunnel_sock()

2016-06-06 Thread Guillaume Nault
72.696530] Kernel Offset: disabled [ 72.696530] ---[ end Kernel panic - not syncing: Fatal exception in interrupt Fixes: 38fd2af24fcf ("udp: Add socket based GRO and config") Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- net/l2tp/l2tp_core.c | 2 +- 1 file changed

Re: Fw: [Bug 111771] New: deadlock in ppp/l2tp

2016-02-04 Thread Guillaume Nault
On Thu, Feb 04, 2016 at 02:32:48AM +0100, Sorin Manolache wrote: > On 2016-02-03 18:14, Guillaume Nault wrote: > > > >Sorin, it seems like one of your L2TP tunnels is routed to one of its upper > >PPP > >devices. Most likely, the peer address of the PPP

Re: Fw: [Bug 111771] New: deadlock in ppp/l2tp

2016-02-03 Thread Guillaume Nault
On Wed, Feb 03, 2016 at 11:04:31AM +1100, Stephen Hemminger wrote: > Please excuse URL mangling, my bugzilla address appears to route through > stupid corporate firewall. > > Begin forwarded message: > > Date: Tue, 2 Feb 2016 18:38:41 + > From: "bugzilla-dae...@bugzilla.kernel.org" >

[PATCH net 3/5] ppp: protect ppp->debug in ppp_ioctl()

2016-02-22 Thread Guillaume Nault
ppp->debug is read in the Tx and Rx paths while under protection of ppp_xmit_lock() and ppp_recv_lock() respectively. So ppp_ioctl() must hold both locks before concurrently updating it. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- Locking is not strictly necessary for PPP

[PATCH net 2/5] ppp: fix unprotected accesses to ppp->flags and ppp->n_channels

2016-02-22 Thread Guillaume Nault
ted access to ppp->n_channels in ppp_read() and ppp_poll(), which has the same locking requirements as ppp->flags. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/

[PATCH net 1/5] ppp: lock ppp structure before modifying mru in ppp_ioctl()

2016-02-22 Thread Guillaume Nault
PPP's Tx and Rx paths read ppp->mru under protection of ppp_xmit_lock() and ppp_recv_lock() respectively. Therefore ppp_ioctl() must hold the xmit and recv locks before concurrently updating ppp->mru. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_g

[PATCH net 5/5] ppp: protect ppp->npmode

2016-02-22 Thread Guillaume Nault
v_lock() in ppp_start_xmit() too, but taking the recv lock in the xmit path would look strange. So this patch takes the xmit lock instead and holds both locks before writing in ppp_ioctl(). Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 14 +- 1

[PATCH net 4/5] ppp: protect access to ppp->last_{xmit,recv} in ppp_ioctl()

2016-02-22 Thread Guillaume Nault
ed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 183d89c..24777f4 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic

[PATCH net 0/5] ppp: fix locking issues related to ppp_ioctl()

2016-02-22 Thread Guillaume Nault
, but this is left for another series. Guillaume Nault (5): ppp: lock ppp structure before modifying mru in ppp_ioctl() ppp: fix unprotected accesses to ppp->flags and ppp->n_channels ppp: protect ppp->debug in ppp_ioctl() ppp: protect access to ppp->last{xmit,recv} in ppp_i

[PATCH net-next] ppp: clarify parsing of user supplied data in ppp_set_compress()

2016-02-23 Thread Guillaume Nault
ass the (ccp_option[1] < 2 || ccp_option[1] > data.length) test anyway. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_

Re: [PATCH net 1/5] ppp: lock ppp structure before modifying mru in ppp_ioctl()

2016-02-25 Thread Guillaume Nault
On Wed, Feb 24, 2016 at 03:32:02PM -0500, David Miller wrote: > From: Guillaume Nault <g.na...@alphalink.fr> > Date: Mon, 22 Feb 2016 20:47:13 +0100 > > > PPP's Tx and Rx paths read ppp->mru under protection of ppp_xmit_lock() > > and ppp_recv_lock() respectively.

Re: [PATCH net] ppp: lock ppp->flags in ppp_read() and ppp_poll()

2016-02-29 Thread Guillaume Nault
On Mon, Feb 29, 2016 at 10:18:38AM +, David Laight wrote: > From: Guillaume Nault > > Sent: 26 February 2016 17:46 > > > > ppp_read() and ppp_poll() can be called concurrently with ppp_ioctl(). > > In this case, ppp_ioctl() might call ppp_ccp_closed(), which may

[PATCH net] ppp: lock ppp->flags in ppp_read() and ppp_poll()

2016-02-26 Thread Guillaume Nault
hannels also prevents concurrent writes. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- This was patch #2 of the 'ppp: fix locking issues related to ppp_ioctl()' series. I haven't kept the extra locking of ppp->flags in ppp_ioctl(PPPIOCGFLAGS), which was added in the original seri

Re: [PATCH 2/2] ppp: implement rtnetlink device handling

2016-01-25 Thread Guillaume Nault
On Mon, Jan 25, 2016 at 12:09:34PM +0100, walter harms wrote: > > > Am 23.12.2015 21:04, schrieb Guillaume Nault: > > @@ -1012,7 +1017,24 @@ static int ppp_dev_configure(struct net *src_net, > > struct net_device *dev, > > int indx; > > int err

[PATCH net] pppoe: fix reference counting in PPPoE proxy

2016-02-15 Thread Guillaume Nault
Drop reference on the relay_po socket when __pppoe_xmit() succeeds. This is already handled correctly in the error path. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- No 'Fixes' tag, since this issue seems to predate git's history. drivers/net/ppp/pppoe.c | 2 ++ 1 file chan

Re: [PATCH net] ppp: ensure file->private_data can't be overridden

2016-03-14 Thread Guillaume Nault
On Fri, Mar 11, 2016 at 02:42:16PM -0500, David Miller wrote: > From: Guillaume Nault <g.na...@alphalink.fr> > Date: Tue, 8 Mar 2016 20:14:30 +0100 > > > Lock ppp_mutex and check that file->private_data is NULL before > > executing any action in ppp_unattac

[PATCH net v2] ppp: ensure file->private_data can't be overridden

2016-03-14 Thread Guillaume Nault
ck all ppp_ioctl() instead of just checking private_data in ppp_unattached_ioctl(), to avoid ambiguous behaviour. Fixes: f3ff8a4d80e8 ("ppp: push BKL down into the driver") Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 31 +

Re: [RFC PATCH 0/6] ppp: add rtnetlink support

2016-04-05 Thread Guillaume Nault
.On Tue, Apr 05, 2016 at 08:27:45AM -0700, Stephen Hemminger wrote: > On Tue, 5 Apr 2016 02:56:17 +0200 > Guillaume Nault <g.na...@alphalink.fr> wrote: > > > The rtnetlink handlers implemented in this series are minimal, and can > > only replace the PPPIOCNEWUNIT io

Re: [RFC PATCH 5/6] ppp: define reusable device creation functions

2016-04-05 Thread Guillaume Nault
On Tue, Apr 05, 2016 at 08:28:32AM -0700, Stephen Hemminger wrote: > On Tue, 5 Apr 2016 02:56:29 +0200 > Guillaume Nault <g.na...@alphalink.fr> wrote: > > > Move PPP device initialisation and registration out of > > ppp_create_interface(). > > This prep

Re: [RFC PATCH 6/6] ppp: add rtnetlink device creation support

2016-04-05 Thread Guillaume Nault
On Tue, Apr 05, 2016 at 07:18:14PM +0200, walter harms wrote: > > > Am 05.04.2016 02:56, schrieb Guillaume Nault: > > @@ -1043,12 +1048,39 @@ static int ppp_dev_configure(struct net *src_net, > > struct net_device *dev, > > co

Re: [RFC PATCH 6/6] ppp: add rtnetlink device creation support

2016-04-06 Thread Guillaume Nault
On Wed, Apr 06, 2016 at 10:02:56AM +0200, walter harms wrote: > > > Am 05.04.2016 23:22, schrieb Guillaume Nault: > > On Tue, Apr 05, 2016 at 07:18:14PM +0200, walter harms wrote: > >> > >> > >> Am 05.04.2016 02:56, schrieb Guillaume Nault

Re: net/ppp: use-after-free in ppp_unregister_channel

2016-03-19 Thread Guillaume Nault
On Wed, Mar 16, 2016 at 11:14:42PM +0800, Baozeng Ding wrote: > Dear all, > I've got the following use-after-free report while running syzkaller > fuzzer. Unfortunately no reproducer. It was found in the Linux kernel > version(4.4, on commit 9638685e32af961943b679fcb72d4ddd458eb18f). > >

[PATCH net] ppp: take reference on channels netns

2016-03-23 Thread Guillaume Nault
^ 880064e21800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb 880064e21880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb == Fixes: 273ec51dd7ce ("net: ppp_generic - introduce net-namespace functiona

[PATCH net] ppp: release rtnl mutex when interface creation fails

2016-03-07 Thread Guillaume Nault
Add missing rtnl_unlock() in the error path of ppp_create_interface(). Fixes: 58a89ecaca53 ("ppp: fix lockdep splat in ppp_dev_uninit()") Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH net] ppp: ensure file->private_data can't be overridden

2016-03-08 Thread Guillaume Nault
vate_data and mess up reference counters or loose pointer to previously allocated PPP unit. In case the test fails, -ENOTTY is returned, just like if ppp_ioctl() had rejected the ioctl in the first place. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- This seems to originate

[RFC PATCH 6/6] ppp: add rtnetlink device creation support

2016-04-04 Thread Guillaume Nault
g the "ppp" prefix corresponds to the PPP unit number for ioctl based devices, while it is just an unrelated incrementing index for rtnl ones. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 143 +- in

[RFC PATCH 1/6] ppp: simplify usage of ppp_create_interface()

2016-04-04 Thread Guillaume Nault
caller will allow for pushing ppp_mutex down when handling the PPPIOCNEWUNIT ioctl (as locking ppp_mutex is required before setting ->private_data). Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 47 +-- 1 f

[RFC PATCH 3/6] ppp: don't lock ppp_mutex while handling PPPIOCDETACH

2016-04-04 Thread Guillaume Nault
link context. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 7329c72..c81e257 100644 ---

[RFC PATCH 4/6] ppp: invert lock ordering between ppp_mutex and rtnl_lock

2016-04-04 Thread Guillaume Nault
e removed entirely from this part of the code. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index c81e257.

[RFC PATCH 2/6] ppp: don't hold ppp_mutex before calling ppp_unattached_ioctl()

2016-04-04 Thread Guillaume Nault
ctl() prototype. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 51 +-- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index ec83b83

[RFC PATCH 5/6] ppp: define reusable device creation functions

2016-04-04 Thread Guillaume Nault
Move PPP device initialisation and registration out of ppp_create_interface(). This prepares code for device registration with rtnetlink. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generic.c | 185 -- 1 file change

[RFC PATCH 0/6] ppp: add rtnetlink support

2016-04-04 Thread Guillaume Nault
and rtnl_lock. Patch #4 does the lock inversion. The actual infrastructure is implemented in patches #5 and #6. Changes since v1: - Rebase on net-next. - Invert locking order wrt. ppp_mutex and rtnl_lock and protect file->private_data with ppp_mutex. Guillaume Nault (6): ppp

[RFC PATCH v3 0/2] ppp: add rtnetlink support

2016-04-21 Thread Guillaume Nault
file descriptor lookup directly in ppp_nl_newlink(), to simplify ppp_dev_configure(). Changes since v1: - Rebase on net-next. - Invert locking order wrt. ppp_mutex and rtnl_lock and protect file->private_data with ppp_mutex. Guillaume Nault (2): ppp: define reusable device cre

[RFC PATCH v3 2/2] ppp: add rtnetlink device creation support

2016-04-21 Thread Guillaume Nault
based PPP interfaces: in the device name, the number following the "ppp" prefix corresponds to the PPP unit number for ioctl based devices, while it is just an unrelated incrementing index for rtnl ones. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/n

[RFC PATCH v3 1/2] ppp: define reusable device creation functions

2016-04-21 Thread Guillaume Nault
eed to return a ppp structure to ppp_unattached_ioctl() anymore. * The unit parameter is made read/write so that ppp_create_interface() can tell which unit number has been assigned. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generi

[PATCH v4 net-next 2/2] ppp: add rtnetlink device creation support

2016-04-28 Thread Guillaume Nault
based PPP interfaces: in the device name, the number following the "ppp" prefix corresponds to the PPP unit number for ioctl based devices, while it is just an unrelated incrementing index for rtnl ones. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/n

[PATCH v4 net-next 0/2] ppp: add rtnetlink support

2016-04-28 Thread Guillaume Nault
hen Hemminger). - Do file descriptor lookup directly in ppp_nl_newlink(), to simplify ppp_dev_configure(). Changes since v1: - Rebase on net-next. - Invert locking order wrt. ppp_mutex and rtnl_lock and protect file->private_data with ppp_mutex. Guillaume Nault (2): ppp: define

[PATCH v4 net-next 1/2] ppp: define reusable device creation functions

2016-04-28 Thread Guillaume Nault
eed to return a ppp structure to ppp_unattached_ioctl() anymore. * The unit parameter is made read/write so that ppp_create_interface() can tell which unit number has been assigned. Signed-off-by: Guillaume Nault <g.na...@alphalink.fr> --- drivers/net/ppp/ppp_generi

Re: [Question] Should `CAP_NET_ADMIN` be needed when opening `/dev/ppp`?

2016-05-03 Thread Guillaume Nault
On Sun, May 01, 2016 at 09:38:57PM +0800, Wang Shanker wrote: > static int ppp_open(struct inode *inode, struct file *file) > { > /* >* This could (should?) be enforced by the permissions on /dev/ppp. >*/ > if (!capable(CAP_NET_ADMIN)) > return -EPERM; >

Re: [Question] Should `CAP_NET_ADMIN` be needed when opening `/dev/ppp`?

2016-05-03 Thread Guillaume Nault
On Tue, May 03, 2016 at 01:23:34PM +0200, Hannes Frederic Sowa wrote: > On Tue, May 3, 2016, at 12:35, Richard Weinberger wrote: > > On Tue, May 3, 2016 at 12:12 PM, Guillaume Nault <g.na...@alphalink.fr> > > wrote: > > > On Sun, May 01, 2016 at 09:38:57PM +0800, Wan

Re: [Question] Should `CAP_NET_ADMIN` be needed when opening `/dev/ppp`?

2016-05-03 Thread Guillaume Nault
On Tue, May 03, 2016 at 12:35:12PM +0200, Richard Weinberger wrote: > On Tue, May 3, 2016 at 12:12 PM, Guillaume Nault <g.na...@alphalink.fr> wrote: > > On Sun, May 01, 2016 at 09:38:57PM +0800, Wang Shanker wrote: > >> static int ppp_open(struct inode *

Re: 4.6.3, pppoe + shaper workload, skb_panic / skb_push / ppp_start_xmit

2016-07-28 Thread Guillaume Nault
On Tue, Jul 12, 2016 at 10:31:18AM -0700, Cong Wang wrote: > On Mon, Jul 11, 2016 at 12:45 PM, wrote: > > Hi > > > > On latest kernel i noticed kernel panic happening 1-2 times per day. It is > > also happening on older kernel (at least 4.5.3). > > > ... > >

Re: [Patch net] ppp: defer netns reference release for ppp channel

2016-07-28 Thread Guillaume Nault
n channels netns") > > > Reported-by: Matt Bennett <matt.benn...@alliedtelesis.co.nz> > > > Cc: Paul Mackerras <pau...@samba.org> > > > Cc: linux-...@vger.kernel.org > > > Cc: Guillaume Nault <g.na...@alphalink.fr> > > > Cc: Cyr

Re: 4.6.3, pppoe + shaper workload, skb_panic / skb_push / ppp_start_xmit

2016-08-08 Thread Guillaume Nault
On Mon, Aug 08, 2016 at 02:25:00PM +0300, Denys Fedoryshchenko wrote: > On 2016-08-01 23:59, Guillaume Nault wrote: > > Do you still have the vmlinux file with debug symbols that generated > > this panic? > Sorry for delay, i didn't had same image on all servers and probab

  1   2   3   4   >