<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs, branch v6.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-01-05T21:12:29Z</updated>
<entry>
<title>Merge tag 'nfsd-6.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux</title>
<updated>2024-01-05T21:12:29Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-01-05T21:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d3ac66ed81cb7c0aa78fceec9fb0dbe384992ed'/>
<id>urn:sha1:0d3ac66ed81cb7c0aa78fceec9fb0dbe384992ed</id>
<content type='text'>
Pull nfsd fix from Chuck Lever:

 - Fix another regression in the NFSD administrative API

* tag 'nfsd-6.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  nfsd: drop the nfsd_put helper
</content>
</entry>
<entry>
<title>Merge tag '6.7-rc8-smb3-mchan-fixes' of git://git.samba.org/sfrench/cifs-2.6</title>
<updated>2024-01-05T16:52:25Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-01-05T16:52:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3eca89454aec4278c0debc918b4978a3f4a0581e'/>
<id>urn:sha1:3eca89454aec4278c0debc918b4978a3f4a0581e</id>
<content type='text'>
Pull smb client fixes from Steve French:
 "Three important multichannel smb3 client fixes found in recent
  testing:

   - fix oops due to incorrect refcounting of interfaces after
     disabling multichannel

   - fix possible unrecoverable session state after disabling
     multichannel with active sessions

   - fix two places that were missing use of chan_lock"

* tag '6.7-rc8-smb3-mchan-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: do not depend on release_iface for maintaining iface_list
  cifs: cifs_chan_is_iface_active should be called with chan_lock held
  cifs: after disabling multichannel, mark tcon for reconnect
</content>
</entry>
<entry>
<title>nfsd: drop the nfsd_put helper</title>
<updated>2024-01-05T03:52:27Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@kernel.org</email>
</author>
<published>2024-01-03T13:36:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64e6304169f1e1f078e7f0798033f80a7fb0ea46'/>
<id>urn:sha1:64e6304169f1e1f078e7f0798033f80a7fb0ea46</id>
<content type='text'>
It's not safe to call nfsd_put once nfsd_last_thread has been called, as
that function will zero out the nn-&gt;nfsd_serv pointer.

Drop the nfsd_put helper altogether and open-code the svc_put in its
callers instead. That allows us to not be reliant on the value of that
pointer when handling an error.

Fixes: 2a501f55cd64 ("nfsd: call nfsd_last_thread() before final nfsd_put()")
Reported-by: Zhi Li &lt;yieli@redhat.com&gt;
Cc: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Jeffrey Layton &lt;jlayton@redhat.com&gt;
Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'trace-v6.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace</title>
<updated>2024-01-03T19:45:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-01-03T19:45:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=360f0342b2e9374298e2222c846f3fe9d0295f0d'/>
<id>urn:sha1:360f0342b2e9374298e2222c846f3fe9d0295f0d</id>
<content type='text'>
Pull tracing fixes from Steven Rostedt:

 - Fix a NULL kernel dereference in set_gid() on tracefs mounting.

   When tracefs is mounted with "gid=1000", it will update the existing
   dentries to have the new gid. The tracefs_inode which is retrieved by
   a container_of(dentry-&gt;d_inode) has flags to see if the inode belongs
   to the eventfs system.

   The issue that was fixed was if getdents() was called on tracefs that
   was previously mounted, and was not closed. It will leave a "cursor
   dentry" in the subdirs list of the current dentries that set_gid()
   walks. On a remount of tracefs, the container_of(dentry-&gt;d_inode)
   will dereference a NULL pointer and cause a crash when referenced.

   Simply have a check for dentry-&gt;d_inode to see if it is NULL and if
   so, skip that entry.

 - Fix the bits of the eventfs_inode structure.

   The "is_events" bit was taken from the nr_entries field, but the
   nr_entries field wasn't updated to be 30 bits and was still 31.
   Including the "is_freed" bit this would use 33 bits which would make
   the structure use another integer for just one bit.

* tag 'trace-v6.7-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  eventfs: Fix bitwise fields for "is_events"
  tracefs: Check for dentry-&gt;d_inode exists in set_gid()
</content>
</entry>
<entry>
<title>eventfs: Fix bitwise fields for "is_events"</title>
<updated>2024-01-02T20:20:44Z</updated>
<author>
<name>Steven Rostedt (Google)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2024-01-02T20:18:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd56cd5f6d76e93356d9520cf9dabffe1e3d1aa0'/>
<id>urn:sha1:fd56cd5f6d76e93356d9520cf9dabffe1e3d1aa0</id>
<content type='text'>
A flag was needed to denote which eventfs_inode was the "events"
directory, so a bit was taken from the "nr_entries" field, as there's not
that many entries, and 2^30 is plenty. But the bit number for nr_entries
was not updated to reflect the bit taken from it, which would add an
unnecessary integer to the structure.

Link: https://lore.kernel.org/linux-trace-kernel/20240102151832.7ca87275@gandalf.local.home

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Fixes: 7e8358edf503e ("eventfs: Fix file and directory uid and gid ownership")
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tracefs: Check for dentry-&gt;d_inode exists in set_gid()</title>
<updated>2024-01-02T20:20:22Z</updated>
<author>
<name>Steven Rostedt (Google)</name>
<email>rostedt@goodmis.org</email>
</author>
<published>2024-01-02T20:12:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad579864637af46447208254719943179b69d41a'/>
<id>urn:sha1:ad579864637af46447208254719943179b69d41a</id>
<content type='text'>
If a getdents() is called on the tracefs directory but does not get all
the files, it can leave a "cursor" dentry in the d_subdirs list of tracefs
dentry. This cursor dentry does not have a d_inode for it. Before
referencing tracefs_inode from the dentry, the d_inode must first be
checked if it has content. If not, then it's not a tracefs_inode and can
be ignored.

The following caused a crash:

 #define getdents64(fd, dirp, count) syscall(SYS_getdents64, fd, dirp, count)
 #define BUF_SIZE 256
 #define TDIR "/tmp/file0"

 int main(void)
 {
	char buf[BUF_SIZE];
	int fd;
       	int n;

       	mkdir(TDIR, 0777);
	mount(NULL, TDIR, "tracefs", 0, NULL);
       	fd = openat(AT_FDCWD, TDIR, O_RDONLY);
       	n = getdents64(fd, buf, BUF_SIZE);
       	ret = mount(NULL, TDIR, NULL, MS_NOSUID|MS_REMOUNT|MS_RELATIME|MS_LAZYTIME,
		    "gid=1000");
	return 0;
 }

That's because the 256 BUF_SIZE was not big enough to read all the
dentries of the tracefs file system and it left a "cursor" dentry in the
subdirs of the tracefs root inode. Then on remounting with "gid=1000",
it would cause an iteration of all dentries which hit:

	ti = get_tracefs(dentry-&gt;d_inode);
	if (ti &amp;&amp; (ti-&gt;flags &amp; TRACEFS_EVENT_INODE))
		eventfs_update_gid(dentry, gid);

Which crashed because of the dereference of the cursor dentry which had a NULL
d_inode.

In the subdir loop of the dentry lookup of set_gid(), if a child has a
NULL d_inode, simply skip it.

Link: https://lore.kernel.org/all/20240102135637.3a21fb10@gandalf.local.home/
Link: https://lore.kernel.org/linux-trace-kernel/20240102151249.05da244d@gandalf.local.home

Cc: stable@vger.kernel.org
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Fixes: 7e8358edf503e ("eventfs: Fix file and directory uid and gid ownership")
Reported-by: "Ubisectech Sirius" &lt;bugreport@ubisectech.com&gt;
Signed-off-by: Steven Rostedt (Google) &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>bcachefs: make RO snapshots actually RO</title>
<updated>2024-01-01T16:47:07Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-12-30T02:16:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d72ab35a925d66b044cb62b709e53141c3f0143'/>
<id>urn:sha1:0d72ab35a925d66b044cb62b709e53141c3f0143</id>
<content type='text'>
Add checks to all the VFS paths for "are we in a RO snapshot?".

Note - we don't check this when setting inode options via our xattr
interface, since those generally only affect data placement, not
contents of data.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
Reported-by: "Carl E. Thompson" &lt;list-bcachefs@carlthompson.net&gt;
</content>
</entry>
<entry>
<title>bcachefs: bch_sb_field_downgrade</title>
<updated>2024-01-01T16:47:07Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-12-29T20:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84f1638795da1ff2084597de4251e9054f1ad728'/>
<id>urn:sha1:84f1638795da1ff2084597de4251e9054f1ad728</id>
<content type='text'>
Add a new superblock section that contains a list of
  { minor version, recovery passes, errors_to_fix }

that is - a list of recovery passes that must be run when downgrading
past a given version, and a list of errors to silently fix.

The upcoming disk accounting rewrite is not going to be fully
compatible: we're going to have to regenerate accounting both when
upgrading to the new version, and also from downgrading from the new
version, since the new method of doing disk space accounting is a
completely different architecture based on deltas, and synchronizing
them for every jounal entry write to maintain compatibility is going to
be too expensive and impractical.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: bch_sb.recovery_passes_required</title>
<updated>2024-01-01T16:47:07Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-12-29T20:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8b16413cda7c46d47f8071165b3071f8a9369199'/>
<id>urn:sha1:8b16413cda7c46d47f8071165b3071f8a9369199</id>
<content type='text'>
Add two new superblock fields. Since the main section of the superblock
is now fully, we have to add a new variable length section for them -
bch_sb_field_ext.

 - recovery_passes_requried: recovery passes that must be run on the
   next mount
 - errors_silent: errors that will be silently fixed

These are to improve upgrading and dwongrading: these fields won't be
cleared until after recovery successfully completes, so there won't be
any issues with crashing partway through an upgrade or a downgrade.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
<entry>
<title>bcachefs: Add persistent identifiers for recovery passes</title>
<updated>2024-01-01T16:47:07Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kent.overstreet@linux.dev</email>
</author>
<published>2023-12-29T19:40:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=808c680f2a256188951805f05c907d40919db37a'/>
<id>urn:sha1:808c680f2a256188951805f05c907d40919db37a</id>
<content type='text'>
The next patch will start to refer to recovery passes from the
superblock; naturally, we now need identifiers that don't change, since
the existing enum is in the order in which they are run and is not
fixed.

Signed-off-by: Kent Overstreet &lt;kent.overstreet@linux.dev&gt;
</content>
</entry>
</feed>
