]> Git Repo - linux.git/commitdiff
Merge tag '9p-for-6.7-rc1' of https://github.com/martinetd/linux
authorLinus Torvalds <[email protected]>
Sat, 4 Nov 2023 19:20:04 +0000 (09:20 -1000)
committerLinus Torvalds <[email protected]>
Sat, 4 Nov 2023 19:20:04 +0000 (09:20 -1000)
Pull 9p updates from Dominique Martinet:
 A bunch of small fixes:

   - three W=1 warning fixes: the NULL -> "" replacement isn't trivial
     but is serialized identically by the protocol layer and has been
     tested

   - one syzbot/KCSAN datarace annotation where we don't care about
     users messing with the fd they passed to mount -t 9p

   - removing a declaration without implementation

   - yet another race fix for trans_fd around connection close: the
     'err' field is also used in potentially racy calls and this isn't
     complete, but it's better than what we had

   - and finally a theorical memory leak fix on serialization failure"

* tag '9p-for-6.7-rc1' of https://github.com/martinetd/linux:
  9p/net: fix possible memory leak in p9_check_errors()
  9p/fs: add MODULE_DESCRIPTION
  9p/net: xen: fix false positive printf format overflow warning
  9p: v9fs_listxattr: fix %s null argument warning
  9p/trans_fd: Annotate data-racy writes to file::f_flags
  fs/9p: Remove unused function declaration v9fs_inode2stat()
  9p/trans_fd: avoid sending req to a cancelled conn

1  2 
fs/9p/xattr.c

diff --combined fs/9p/xattr.c
index 053d1cef6e13179cc3a48ce609352712d12c6d3d,3c4572ef3a488a8ed809bcd31983cc0360cf5c3c..8604e3377ee7abafec9c05e2fb8474664705f097
@@@ -68,7 -68,7 +68,7 @@@ ssize_t v9fs_xattr_get(struct dentry *d
        struct p9_fid *fid;
        int ret;
  
-       p9_debug(P9_DEBUG_VFS, "name = %s value_len = %zu\n",
+       p9_debug(P9_DEBUG_VFS, "name = '%s' value_len = %zu\n",
                 name, buffer_size);
        fid = v9fs_fid_lookup(dentry);
        if (IS_ERR(fid))
@@@ -139,7 -139,8 +139,8 @@@ int v9fs_fid_xattr_set(struct p9_fid *f
  
  ssize_t v9fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
  {
-       return v9fs_xattr_get(dentry, NULL, buffer, buffer_size);
+       /* Txattrwalk with an empty string lists xattrs instead */
+       return v9fs_xattr_get(dentry, "", buffer, buffer_size);
  }
  
  static int v9fs_xattr_handler_get(const struct xattr_handler *handler,
@@@ -162,27 -163,27 +163,27 @@@ static int v9fs_xattr_handler_set(cons
        return v9fs_xattr_set(dentry, full_name, value, size, flags);
  }
  
 -static struct xattr_handler v9fs_xattr_user_handler = {
 +static const struct xattr_handler v9fs_xattr_user_handler = {
        .prefix = XATTR_USER_PREFIX,
        .get    = v9fs_xattr_handler_get,
        .set    = v9fs_xattr_handler_set,
  };
  
 -static struct xattr_handler v9fs_xattr_trusted_handler = {
 +static const struct xattr_handler v9fs_xattr_trusted_handler = {
        .prefix = XATTR_TRUSTED_PREFIX,
        .get    = v9fs_xattr_handler_get,
        .set    = v9fs_xattr_handler_set,
  };
  
  #ifdef CONFIG_9P_FS_SECURITY
 -static struct xattr_handler v9fs_xattr_security_handler = {
 +static const struct xattr_handler v9fs_xattr_security_handler = {
        .prefix = XATTR_SECURITY_PREFIX,
        .get    = v9fs_xattr_handler_get,
        .set    = v9fs_xattr_handler_set,
  };
  #endif
  
 -const struct xattr_handler *v9fs_xattr_handlers[] = {
 +const struct xattr_handler * const v9fs_xattr_handlers[] = {
        &v9fs_xattr_user_handler,
        &v9fs_xattr_trusted_handler,
  #ifdef CONFIG_9P_FS_SECURITY
This page took 0.05624 seconds and 4 git commands to generate.