From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Abeni Date: Fri, 09 Dec 2022 13:37:08 +0100 Subject: [Cluster-devel] [PATCH v1 2/3] Treewide: Stop corrupting socket's task_frag In-Reply-To: References: Message-ID: List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, 2022-11-21 at 08:35 -0500, Benjamin Coddington wrote: > Since moving to memalloc_nofs_save/restore, SUNRPC has stopped setting the > GFP_NOIO flag on sk_allocation which the networking system uses to decide > when it is safe to use current->task_frag. The results of this are > unexpected corruption in task_frag when SUNRPC is involved in memory > reclaim. > > The corruption can be seen in crashes, but the root cause is often > difficult to ascertain as a crashing machine's stack trace will have no > evidence of being near NFS or SUNRPC code. I believe this problem to > be much more pervasive than reports to the community may indicate. > > Fix this by having kernel users of sockets that may corrupt task_frag due > to reclaim set sk_use_task_frag = false. Preemptively correcting this > situation for users that still set sk_allocation allows them to convert to > memalloc_nofs_save/restore without the same unexpected corruptions that are > sure to follow, unlikely to show up in testing, and difficult to bisect. > > CC: Philipp Reisner > CC: Lars Ellenberg > CC: "Christoph B?hmwalder" > CC: Jens Axboe > CC: Josef Bacik > CC: Keith Busch > CC: Christoph Hellwig > CC: Sagi Grimberg > CC: Lee Duncan > CC: Chris Leech > CC: Mike Christie > CC: "James E.J. Bottomley" > CC: "Martin K. Petersen" > CC: Valentina Manea > CC: Shuah Khan > CC: Greg Kroah-Hartman > CC: David Howells > CC: Marc Dionne > CC: Steve French > CC: Christine Caulfield > CC: David Teigland > CC: Mark Fasheh > CC: Joel Becker > CC: Joseph Qi > CC: Eric Van Hensbergen > CC: Latchesar Ionkov > CC: Dominique Martinet > CC: "David S. Miller" > CC: Eric Dumazet > CC: Jakub Kicinski > CC: Paolo Abeni > CC: Ilya Dryomov > CC: Xiubo Li > CC: Chuck Lever > CC: Jeff Layton > CC: Trond Myklebust > CC: Anna Schumaker > CC: drbd-dev at lists.linbit.com > CC: linux-block at vger.kernel.org > CC: linux-kernel at vger.kernel.org > CC: nbd at other.debian.org > CC: linux-nvme at lists.infradead.org > CC: open-iscsi at googlegroups.com > CC: linux-scsi at vger.kernel.org > CC: linux-usb at vger.kernel.org > CC: linux-afs at lists.infradead.org > CC: linux-cifs at vger.kernel.org > CC: samba-technical at lists.samba.org > CC: cluster-devel at redhat.com > CC: ocfs2-devel at oss.oracle.com > CC: v9fs-developer at lists.sourceforge.net > CC: netdev at vger.kernel.org > CC: ceph-devel at vger.kernel.org > CC: linux-nfs at vger.kernel.org > > Suggested-by: Guillaume Nault > Signed-off-by: Benjamin Coddington I think this is the most feasible way out of the existing issue, and I think this patchset should go via the networking tree, targeting the Linux 6.2. If someone has disagreement with the above, please speak! Thanks, Paolo