Re: [PATCH] ppp: remove the PPPIOCDETACH ioctl

2018-05-23 Thread Eric Biggers
On Wed, May 23, 2018 at 11:56:36AM -0400, David Miller wrote: > From: Guillaume Nault > Date: Wed, 23 May 2018 15:57:08 +0200 > > > I'd rather add > > + if (cmd == PPPIOCDETACH) { > > + err = -EINVAL; > > + goto out; > > + } > > > > Making

Re: [PATCH] ppp: remove the PPPIOCDETACH ioctl

2018-05-23 Thread David Miller
From: Guillaume Nault Date: Wed, 23 May 2018 15:57:08 +0200 > I'd rather add > + if (cmd == PPPIOCDETACH) { > + err = -EINVAL; > + goto out; > + } > > Making PPPIOCDETACH unknown to ppp_generic means that the ioctl would > be handled by the

Re: [PATCH] ppp: remove the PPPIOCDETACH ioctl

2018-05-23 Thread Guillaume Nault
On Tue, May 22, 2018 at 08:59:52PM -0700, Eric Biggers wrote: > From: Eric Biggers > > The PPPIOCDETACH ioctl effectively tries to "close" the given ppp file > before f_count has reached 0, which is fundamentally a bad idea. It > does check 'f_count < 2', which excludes