Thread (4 messages) flat view 4 messages, 2 authors, 2021-05-19

Re: [PATCH] ovl: useing ovl_revert_creds() instead of revert_creds(),

From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2021-05-19 04:03:57
Also in: bpf, linux-unionfs, lkml, stable

On Wed, 19 May 2021 at 05:29, Yao Haidong [off-list ref] wrote:
Miklos Szeredi [off-list ref] 于2021年5月18日周二 下午9:41写道:
quoted
On Tue, 18 May 2021 at 14:21, Haidong Yao [off-list ref] wrote:
quoted
From: Haidong Yao <redacted>
[...]
quoted
quoted
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index 4d53d3b7e5fe..d9bc658f22ee 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -60,7 +60,7 @@ static struct file *ovl_open_realfile(const struct file *file,
                realfile = open_with_fake_path(&file->f_path, flags, realinode,
                                               current_cred());
        }
-       revert_creds(old_cred);
+       ovl_revert_creds(inode->i_sb, old_cred);
Upstream kernel doesn't have ovl_revert_creds().
Hi Miklos:

Sorry,
Sometimes,old_cred is NULL.
Do you think this is a problem?
Can I add ovl_revert_creds()? or You have a better way?
old_cred can't be NULL on upstream (Linus) kernel.

From the taint flags I can see that this is some weird setup.  Please
contact the distro that is providing the kerne/modules about this
issue.  It's not anything the upstream kernel maintainers can help
with.

Thanks,
Miklos
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help