Re: build_path_from_dentry_optional_prefix() may schedule from invalid context

2019-09-30 Thread Pavel Shilovsky
сб, 21 сент. 2019 г. в 15:38, Al Viro : > > On Thu, Sep 19, 2019 at 05:11:54PM -0700, Pavel Shilovsky wrote: > > > Good catch. I think we should have another version of > > build_path_from_dentry() which takes pre-allocated (probably on stack) > > full_path as an argument. This would allow us to av

Re: build_path_from_dentry_optional_prefix() may schedule from invalid context

2019-09-21 Thread Al Viro
On Thu, Sep 19, 2019 at 05:11:54PM -0700, Pavel Shilovsky wrote: > Good catch. I think we should have another version of > build_path_from_dentry() which takes pre-allocated (probably on stack) > full_path as an argument. This would allow us to avoid allocations > under the spin lock. On _stack_?

Re: build_path_from_dentry_optional_prefix() may schedule from invalid context

2019-09-19 Thread Pavel Shilovsky
ср, 28 авг. 2019 г. в 22:02, Sergey Senozhatsky : > > Hello, > > Looking at commit "cifs: create a helper to find a writeable handle > by path name": > > ->open_file_lock scope is atomic context, while build_path_from_dentry() > can schedule - kmalloc(GFP_KERNEL) > >spin_lock(&tcon->open_fi

build_path_from_dentry_optional_prefix() may schedule from invalid context

2019-08-28 Thread Sergey Senozhatsky
Hello, Looking at commit "cifs: create a helper to find a writeable handle by path name": ->open_file_lock scope is atomic context, while build_path_from_dentry() can schedule - kmalloc(GFP_KERNEL) spin_lock(&tcon->open_file_lock); list_for_each(tmp, &tcon->openFileList) {