Commit 7110f24f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'vfs-6.13-rc7.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:
 "afs:

   - Fix the maximum cell name length

   - Fix merge preference rule failure condition

  fuse:

   - Fix fuse_get_user_pages() so it doesn't risk misleading the caller
     to think pages have been allocated when they actually haven't

   - Fix direct-io folio offset and length calculation

  netfs:

   - Fix async direct-io handling

   - Fix read-retry for filesystems that don't provide a
     ->prepare_read() method

  vfs:

   - Prevent truncating 64-bit offsets to 32-bits in iomap

   - Fix memory barrier interactions when polling

   - Remove MNT_ONRB to fix concurrent modification of @mnt->mnt_flags
     leading to MNT_ONRB to not be raised and invalid access to a list
     member"

* tag 'vfs-6.13-rc7.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  poll: kill poll_does_not_wait()
  sock_poll_wait: kill the no longer necessary barrier after poll_wait()
  io_uring_poll: kill the no longer necessary barrier after poll_wait()
  poll_wait: kill the obsolete wait_address check
  poll_wait: add mb() to fix theoretical race between waitqueue_active() and .poll()
  afs: Fix merge preference rule failure condition
  netfs: Fix read-retry for fs with no ->prepare_read()
  netfs: Fix kernel async DIO
  fs: kill MNT_ONRB
  iomap: avoid avoid truncating 64-bit offset to 32 bits
  afs: Fix the maximum cell name length
  fuse: Set *nbytesp=0 in fuse_get_user_pages on allocation failure
  fuse: fix direct io folio offset and length calculation
parents 36eb2194 1623bc27
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -413,8 +413,10 @@ int afs_proc_addr_prefs_write(struct file *file, char *buf, size_t size)

	do {
		argc = afs_split_string(&buf, argv, ARRAY_SIZE(argv));
		if (argc < 0)
			return argc;
		if (argc < 0) {
			ret = argc;
			goto done;
		}
		if (argc < 2)
			goto inval;

+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@

#include <linux/in.h>

#define AFS_MAXCELLNAME		256  	/* Maximum length of a cell name */
#define AFS_MAXCELLNAME		253  	/* Maximum length of a cell name (DNS limited) */
#define AFS_MAXVOLNAME		64  	/* Maximum length of a volume name */
#define AFS_MAXNSERVERS		8   	/* Maximum servers in a basic volume record */
#define AFS_NMAXNSERVERS	13  	/* Maximum servers in a N/U-class volume record */
+1 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
#define AFS_VL_PORT		7003	/* volume location service port */
#define VL_SERVICE		52	/* RxRPC service ID for the Volume Location service */
#define YFS_VL_SERVICE		2503	/* Service ID for AuriStor upgraded VL service */
#define YFS_VL_MAXCELLNAME	256  	/* Maximum length of a cell name in YFS protocol */

enum AFSVL_Operations {
	VLGETENTRYBYID		= 503,	/* AFS Get VLDB entry by ID */
+6 −2
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ static char *afs_vl_get_cell_name(struct afs_cell *cell, struct key *key)
static int yfs_check_canonical_cell_name(struct afs_cell *cell, struct key *key)
{
	struct afs_cell *master;
	size_t name_len;
	char *cell_name;

	cell_name = afs_vl_get_cell_name(cell, key);
@@ -264,8 +265,11 @@ static int yfs_check_canonical_cell_name(struct afs_cell *cell, struct key *key)
		return 0;
	}

	master = afs_lookup_cell(cell->net, cell_name, strlen(cell_name),
				 NULL, false);
	name_len = strlen(cell_name);
	if (!name_len || name_len > AFS_MAXCELLNAME)
		master = ERR_PTR(-EOPNOTSUPP);
	else
		master = afs_lookup_cell(cell->net, cell_name, name_len, NULL, false);
	kfree(cell_name);
	if (IS_ERR(master))
		return PTR_ERR(master);
+1 −1
Original line number Diff line number Diff line
@@ -697,7 +697,7 @@ static int afs_deliver_yfsvl_get_cell_name(struct afs_call *call)
			return ret;

		namesz = ntohl(call->tmp);
		if (namesz > AFS_MAXCELLNAME)
		if (namesz > YFS_VL_MAXCELLNAME)
			return afs_protocol_error(call, afs_eproto_cellname_len);
		paddedsz = (namesz + 3) & ~3;
		call->count = namesz;
Loading