2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 01:34:00 +08:00
linux-next/fs/ocfs2/cluster
Benjamin Coddington 98123866fc Treewide: Stop corrupting socket's task_frag
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 <philipp.reisner@linbit.com>
CC: Lars Ellenberg <lars.ellenberg@linbit.com>
CC: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>
CC: Jens Axboe <axboe@kernel.dk>
CC: Josef Bacik <josef@toxicpanda.com>
CC: Keith Busch <kbusch@kernel.org>
CC: Christoph Hellwig <hch@lst.de>
CC: Sagi Grimberg <sagi@grimberg.me>
CC: Lee Duncan <lduncan@suse.com>
CC: Chris Leech <cleech@redhat.com>
CC: Mike Christie <michael.christie@oracle.com>
CC: "James E.J. Bottomley" <jejb@linux.ibm.com>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: Valentina Manea <valentina.manea.m@gmail.com>
CC: Shuah Khan <shuah@kernel.org>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: David Howells <dhowells@redhat.com>
CC: Marc Dionne <marc.dionne@auristor.com>
CC: Steve French <sfrench@samba.org>
CC: Christine Caulfield <ccaulfie@redhat.com>
CC: David Teigland <teigland@redhat.com>
CC: Mark Fasheh <mark@fasheh.com>
CC: Joel Becker <jlbec@evilplan.org>
CC: Joseph Qi <joseph.qi@linux.alibaba.com>
CC: Eric Van Hensbergen <ericvh@gmail.com>
CC: Latchesar Ionkov <lucho@ionkov.net>
CC: Dominique Martinet <asmadeus@codewreck.org>
CC: Ilya Dryomov <idryomov@gmail.com>
CC: Xiubo Li <xiubli@redhat.com>
CC: Chuck Lever <chuck.lever@oracle.com>
CC: Jeff Layton <jlayton@kernel.org>
CC: Trond Myklebust <trond.myklebust@hammerspace.com>
CC: Anna Schumaker <anna@kernel.org>
CC: Steffen Klassert <steffen.klassert@secunet.com>
CC: Herbert Xu <herbert@gondor.apana.org.au>

Suggested-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-12-19 17:28:49 -08:00
..
heartbeat.c ocfs2: use bitmap API in fill_node_map 2022-11-18 13:55:06 -08:00
heartbeat.h ocfs2: use bitmap API in fill_node_map 2022-11-18 13:55:06 -08:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
masklog.c ocfs2: cluster: use default_groups in kobj_type 2022-01-15 16:30:24 +02:00
masklog.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
netdebug.c ocfs2: use bitmap API in fill_node_map 2022-11-18 13:55:06 -08:00
nodemanager.c ocfs2/cluster: use bitmap API instead of hand-writing it 2022-11-18 13:55:06 -08:00
nodemanager.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
ocfs2_heartbeat.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
ocfs2_nodemanager.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
quorum.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
quorum.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
sys.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
sys.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
tcp_internal.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
tcp.c Treewide: Stop corrupting socket's task_frag 2022-12-19 17:28:49 -08:00
tcp.h treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00