Re: [Cluster-devel] [REPORT] kernel BUG at fs/ext4/inode.c:2620 - page_buffers()

2022-02-17 Thread Greg Kroah-Hartman
On Thu, Feb 17, 2022 at 11:08:38PM -0500, Theodore Ts'o wrote: > On Thu, Feb 17, 2022 at 05:06:45PM -0800, John Hubbard wrote: > > Yes. And looking at the pair of backtraces below, this looks very much > > like another aspect of the "get_user_pages problem" [1], originally > > described in Jan

Re: [Cluster-devel] [REPORT] kernel BUG at fs/ext4/inode.c:2620 - page_buffers()

2022-02-17 Thread Theodore Ts'o
On Fri, Feb 18, 2022 at 04:24:20AM +, Matthew Wilcox wrote: > On Thu, Feb 17, 2022 at 09:54:30PM -0500, Theodore Ts'o wrote: > > process_vm_writev() uses [un]pin_user_pages_remote() which is the same > > interface uses for RDMA. But it's not clear this is ever supposed to > > work for memory

Re: [Cluster-devel] [REPORT] kernel BUG at fs/ext4/inode.c:2620 - page_buffers()

2022-02-17 Thread Matthew Wilcox
On Thu, Feb 17, 2022 at 09:54:30PM -0500, Theodore Ts'o wrote: > process_vm_writev() uses [un]pin_user_pages_remote() which is the same > interface uses for RDMA. But it's not clear this is ever supposed to > work for memory which is mmap'ed region backed by a file. > pin_user_pages_remote()

Re: [Cluster-devel] [REPORT] kernel BUG at fs/ext4/inode.c:2620 - page_buffers()

2022-02-17 Thread Theodore Ts'o
On Thu, Feb 17, 2022 at 05:06:45PM -0800, John Hubbard wrote: > Yes. And looking at the pair of backtraces below, this looks very much > like another aspect of the "get_user_pages problem" [1], originally > described in Jan Kara's 2018 email [2]. Hmm... I just posted my analysis, which tracks

Re: [Cluster-devel] [REPORT] kernel BUG at fs/ext4/inode.c:2620 - page_buffers()

2022-02-17 Thread Theodore Ts'o
On Wed, Feb 16, 2022 at 04:31:36PM +, Lee Jones wrote: > > After recently receiving a bug report from Syzbot [0] which was raised > specifically against the Android v5.10 kernel, I spent some time > trying to get to the crux. Firstly I reproduced the issue on the > reported kernel, then did

[Cluster-devel] [PATCHv2 dlm/next 4/6] fs: dlm: improve plock logging if interrupted

2022-02-17 Thread Alexander Aring
This patch changes the log level if a plock is removed when interrupted from debug to info. Additional it signals now that the plock entity was removed to let the user know what's happening. If on a dev_write() a pending plock cannot be find it will signal that it might have been removed because

[Cluster-devel] [PATCHv2 dlm/next 3/6] fs: dlm: rearrange async condition return

2022-02-17 Thread Alexander Aring
This patch moves the return of FILE_LOCK_DEFERRED a little bit earlier than checking afterwards again if the request was an asynchronous request. Signed-off-by: Alexander Aring --- fs/dlm/plock.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git

[Cluster-devel] [PATCHv2 dlm/next 6/6] fs: dlm: move global to static inits

2022-02-17 Thread Alexander Aring
Instead of init global module at module loading time we can move the initialization of those global variables at memory initialization of the module loader. Signed-off-by: Alexander Aring --- fs/dlm/plock.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git

[Cluster-devel] [PATCHv2 dlm/next 1/6] fs: dlm: replace sanity checks with WARN_ON

2022-02-17 Thread Alexander Aring
There are several sanity checks and recover handling if they occur in the dlm plock handling. From my understanding those operation can't run in parallel with any list manipulation which involved setting the list holder of plock_op, if so we have a bug which this sanity check will warn about.

[Cluster-devel] [PATCHv2 dlm/next 2/6] fs: dlm: cleanup plock_op vs plock_xop

2022-02-17 Thread Alexander Aring
Lately the different casting between plock_op and plock_xop and list holders which was involved showed some issues which were hard to see. This patch removes the "plock_xop" structure and introduces a "struct plock_async_data". This structure will be set in "struct plock_op" in case of

[Cluster-devel] [PATCHv2 dlm/next 5/6] fs: dlm: remove unnecessary INIT_LIST_HEAD()

2022-02-17 Thread Alexander Aring
There is no need to call INIT_LIST_HEAD() when it's set directly afterwards by list_add_tail(). Reported-by: Andreas Gruenbacher Signed-off-by: Alexander Aring --- fs/dlm/plock.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index ce1af7986e16..ff439d780cb1

[Cluster-devel] [PATCHv2 dlm/next 0/6] fs: dlm: cleanup plock code

2022-02-17 Thread Alexander Aring
Hi, this patch-series cleanups some plock code handling and remove the plock_op vs plock_xop casting which had made trouble in the past. Also I add the logging improvment handling to see when a plock op was not being found, the wait was interrupted before. This followed up cleanup patch series

Re: [Cluster-devel] [PATCH dlm/next 1/4] fs: dlm: replace sanity checks with WARN_ON

2022-02-17 Thread David Teigland
On Thu, Feb 17, 2022 at 01:36:44AM +0100, Andreas Gruenbacher wrote: > On Wed, Feb 16, 2022 at 5:16 PM Alexander Aring wrote: > > > > - spin_lock(_lock); > > > > - if (!list_empty(>list)) { > > > > - log_error(ls, "dlm_posix_lock: op on list %llx", > > > > -

Re: [Cluster-devel] [PATCH dlm/next 1/4] fs: dlm: replace sanity checks with WARN_ON

2022-02-17 Thread Andreas Gruenbacher
On Thu, Feb 17, 2022 at 3:03 PM Alexander Aring wrote: > On Wed, Feb 16, 2022 at 7:41 PM Andreas Gruenbacher > wrote: > > > > There's also an unnecessary INIT_LIST_HEAD() in send_op(). > > > > please send a patch in a form which makes it easy to apply. Also > please explain exactly why an

Re: [Cluster-devel] [PATCH dlm/next 1/4] fs: dlm: replace sanity checks with WARN_ON

2022-02-17 Thread Alexander Aring
Hi, On Wed, Feb 16, 2022 at 7:41 PM Andreas Gruenbacher wrote: > > There's also an unnecessary INIT_LIST_HEAD() in send_op(). > please send a patch in a form which makes it easy to apply. Also please explain exactly why an "INIT_LIST_HEAD()" is not needed here rather than just stating that the

Re: [Cluster-devel] [PATCH dlm/next 1/4] fs: dlm: replace sanity checks with WARN_ON

2022-02-17 Thread Alexander Aring
Hi, On Wed, Feb 16, 2022 at 7:37 PM Andreas Gruenbacher wrote: > > On Wed, Feb 16, 2022 at 5:16 PM Alexander Aring wrote: > > > > Hi, > > > > On Wed, Feb 16, 2022 at 11:08 AM Andreas Gruenbacher > > wrote: > > > > > > On Wed, Feb 16, 2022 at 4:53 PM Alexander Aring > > > wrote: > > > > There