Re: [cifs] semantics of IPC$ shares (was Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir())

2019-10-04 Thread Steve French
Your questions are interesting and rarely asked. On Fri, Oct 4, 2019 at 11:57 AM Al Viro wrote: > > On Fri, Oct 04, 2019 at 05:02:20PM +0100, Al Viro wrote: > > > * (possibly) cifs hitting the same on eviction by memory pressure > > alone > > (no locked inodes anywhere in sight). Possibly

Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir()

2019-10-04 Thread Linus Torvalds
On Fri, Oct 4, 2019 at 9:52 AM Linus Torvalds wrote: > > Dang, I thought this already got merged. But we only discussed it > extensively and I guess it got delayed by all the discussions about > possible fixes for the d_lock contention. Side note: I'm not all _that_ worried about the d_lock conte

[cifs] semantics of IPC$ shares (was Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir())

2019-10-04 Thread Al Viro
On Fri, Oct 04, 2019 at 05:02:20PM +0100, Al Viro wrote: > * (possibly) cifs hitting the same on eviction by memory pressure alone > (no locked inodes anywhere in sight). Possibly == if cifs IPC$ share happens > to > show up non-empty (e.g. due to server playing silly buggers). > * (

Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir()

2019-10-04 Thread Linus Torvalds
On Fri, Oct 4, 2019 at 7:27 AM Al Viro wrote: > > FWIW, vfs.git#fixes (or #next.dcache) ought to deal with that one. Dang, I thought this already got merged. But we only discussed it extensively and I guess it got delayed by all the discussions about possible fixes for the d_lock contention. Al,

Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir()

2019-10-04 Thread Al Viro
On Fri, Oct 04, 2019 at 05:25:28PM +0200, Christian Brauner wrote: > On Fri, Oct 04, 2019 at 04:10:58PM +0100, Al Viro wrote: > > On Fri, Oct 04, 2019 at 04:33:02PM +0200, Christian Brauner wrote: > > > On Fri, Oct 04, 2019 at 03:27:48PM +0100, Al Viro wrote: > > > > On Fri, Oct 04, 2019 at 04:05:0

Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir()

2019-10-04 Thread Christian Brauner
On Fri, Oct 04, 2019 at 04:10:58PM +0100, Al Viro wrote: > On Fri, Oct 04, 2019 at 04:33:02PM +0200, Christian Brauner wrote: > > On Fri, Oct 04, 2019 at 03:27:48PM +0100, Al Viro wrote: > > > On Fri, Oct 04, 2019 at 04:05:03PM +0200, Christian Brauner wrote: > > > > From: Will Deacon > > > > > >

Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir()

2019-10-04 Thread Al Viro
On Fri, Oct 04, 2019 at 04:33:02PM +0200, Christian Brauner wrote: > On Fri, Oct 04, 2019 at 03:27:48PM +0100, Al Viro wrote: > > On Fri, Oct 04, 2019 at 04:05:03PM +0200, Christian Brauner wrote: > > > From: Will Deacon > > > > > > Closing /dev/pts/ptmx removes the corresponding pty under /dev/p

Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir()

2019-10-04 Thread Christian Brauner
On Fri, Oct 04, 2019 at 03:27:48PM +0100, Al Viro wrote: > On Fri, Oct 04, 2019 at 04:05:03PM +0200, Christian Brauner wrote: > > From: Will Deacon > > > > Closing /dev/pts/ptmx removes the corresponding pty under /dev/pts/ > > without synchronizing against concurrent path walkers. This can lead

Re: [PATCH] devpts: Fix NULL pointer dereference in dcache_readdir()

2019-10-04 Thread Al Viro
On Fri, Oct 04, 2019 at 04:05:03PM +0200, Christian Brauner wrote: > From: Will Deacon > > Closing /dev/pts/ptmx removes the corresponding pty under /dev/pts/ > without synchronizing against concurrent path walkers. This can lead to > 'dcache_readdir()' tripping over a 'struct dentry' with a NULL

[PATCH] devpts: Fix NULL pointer dereference in dcache_readdir()

2019-10-04 Thread Christian Brauner
From: Will Deacon Closing /dev/pts/ptmx removes the corresponding pty under /dev/pts/ without synchronizing against concurrent path walkers. This can lead to 'dcache_readdir()' tripping over a 'struct dentry' with a NULL 'd_inode' field: | BUG: kernel NULL pointer dereference, address: 000