diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-10-04 14:49:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-10 08:56:05 +0200 |
commit | 51da3fc5cbceab59a4b78f21f8ee799b30739b80 (patch) | |
tree | f2fab9dbe9aacd9d90452863346629c5bed12c5f /fs | |
parent | 1c7949a5f63769c6d3a3b41326b7b0a2a43777af (diff) | |
download | linux-stable-51da3fc5cbceab59a4b78f21f8ee799b30739b80.tar.gz linux-stable-51da3fc5cbceab59a4b78f21f8ee799b30739b80.tar.bz2 linux-stable-51da3fc5cbceab59a4b78f21f8ee799b30739b80.zip |
ovl: fix format of setxattr debug
commit 1a8f8d2a443ef9ad9a3065ba8c8119df714240fa upstream.
Format has a typo: it was meant to be "%.*s", not "%*s". But at some point
callers grew nonprintable values as well, so use "%*pE" instead with a
maximized length.
Reported-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 3a1e819b4e80 ("ovl: store file handle of lower inode on copy up")
Cc: <stable@vger.kernel.org> # v4.12
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/overlayfs/overlayfs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index 7538b9b56237..e789924e9833 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -147,8 +147,8 @@ static inline int ovl_do_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags) { int err = vfs_setxattr(dentry, name, value, size, flags); - pr_debug("setxattr(%pd2, \"%s\", \"%*s\", 0x%x) = %i\n", - dentry, name, (int) size, (char *) value, flags, err); + pr_debug("setxattr(%pd2, \"%s\", \"%*pE\", %zu, 0x%x) = %i\n", + dentry, name, min((int)size, 48), value, size, flags, err); return err; } |