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

2016-03-14 Thread David Miller
From: Guillaume Nault Date: Mon, 14 Mar 2016 18:59:40 +0100 > Testing ->private_data without lock in ppp_ioctl() before calling > ppp_unattached_ioctl() is fine, because either ->private_data is > not NULL and thus is stable, or it is and ppp_unattached_ioctl() > takes care

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 > 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_unattached_ioctl(). > > The test done by

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

2016-03-11 Thread David Miller
From: Guillaume Nault 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_unattached_ioctl(). > The test done by ppp_ioctl() can't be relied upon, because > file->private_data may have been

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

2016-03-08 Thread Guillaume Nault
Lock ppp_mutex and check that file->private_data is NULL before executing any action in ppp_unattached_ioctl(). The test done by ppp_ioctl() can't be relied upon, because file->private_data may have been updated meanwhile. In which case ppp_unattached_ioctl() will override file->private_data and