Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2651036rwb; Fri, 9 Dec 2022 04:56:36 -0800 (PST) X-Google-Smtp-Source: AA0mqf4c+zClgm8Njz7BiYUdY2mb32LIf0Ehf8iYG93EVWbiqu4gLXtSKu/CsdRlJ2qyenTvKfTb X-Received: by 2002:a05:6402:5162:b0:46a:8d6:fefb with SMTP id d2-20020a056402516200b0046a08d6fefbmr5227165ede.42.1670590596262; Fri, 09 Dec 2022 04:56:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670590596; cv=none; d=google.com; s=arc-20160816; b=mnMXMVL+Ahs9lTgYXUWgb0i6FheZwl74j2IWqhBIYgIRghPRSr1z/LUtgeaKq/SH9f 9x1fPZ5+YcpZtPyx4PjDiC/dkt+ffdQ0NWfivi7sZfAKeREB/SFjlWiPpvXCb/vzzNgu UZRLpafRkTov8g+CBgot6RXQTZ4O/vruadqK7Kv2Xv6z3A489O+sD8FFaT+VoyJUtAkk gkCCm4Bd392ZZGxZWs/mZ6b0VhjqqMOn9W5xtwDsbchc5SD/pgmKl0DjvTEQaLMfmv8U 74zQfNqtH38isEazXMfXxayOOCXVSaaoZUdk9HH5UDoVVyvqEh5rsuMf9+D1Sz/A6rKo //Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=kKcc7XQPg0UZn1AHNfQ4N2d5zF9JzBW3g3hPGFAB4Kc=; b=TV/uGfPaFMQ+3xpx8dPVhB1OVasfDu9voPd9+X8vamKrWxAiJetLU0HRZCxBrS2k7R kVMLyW+W87f2fg726RqlL0vlLNBqeJkfflNIf7OkRin7219C9tXilIx4YkghC5AHLijk 6GwNSKDixnzHruk/N8VYCEBM4NbL+8DLW4nOPGLne/SFSMHX/YMtUtsJA/Tt5eIxM/ey q7XN3xVFy8/XxCeks/k0Lfv3ffBK/iFFSnTuyLWqFovlgRBLPUyak9qVxz/noAXqlJBR +chc70CtvBanbgA/Amtmn1oOc0+WczXsJCHYH+kf844tQaHcAAqpoQKE9REmzbPQcF2Z cN+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZG3qqAat; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a05640226c200b0045bdff8a884si1508344edd.268.2022.12.09.04.56.07; Fri, 09 Dec 2022 04:56:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZG3qqAat; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229815AbiLIMjL (ORCPT + 99 others); Fri, 9 Dec 2022 07:39:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbiLIMjH (ORCPT ); Fri, 9 Dec 2022 07:39:07 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1659A6722E for ; Fri, 9 Dec 2022 04:37:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670589435; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kKcc7XQPg0UZn1AHNfQ4N2d5zF9JzBW3g3hPGFAB4Kc=; b=ZG3qqAatQhAgpOboJAhhAnXOsAls6GT3djKhXpAx8qhAmpWP+j5Ewoo4/diUxYxZxAhmAx IsB4N7gRUZDNj5yOs+yBwaGHPcGpIAQwcjkCOeZuP6frx+KIOVT+ppWBotynfu9bGbnIWY PFnFWXmmPhUxIB2B9Yq/ZGaPsueGibY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-54-Lth_gUOLODiFWgBOuQXhmw-1; Fri, 09 Dec 2022 07:37:14 -0500 X-MC-Unique: Lth_gUOLODiFWgBOuQXhmw-1 Received: by mail-wm1-f69.google.com with SMTP id j2-20020a05600c1c0200b003cf7397fc9bso2341434wms.5 for ; Fri, 09 Dec 2022 04:37:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kKcc7XQPg0UZn1AHNfQ4N2d5zF9JzBW3g3hPGFAB4Kc=; b=KgyqFMoTII5OouSnm9TjmX7uVKphaOGGoLLcunhNqj751+HV08hbD59cEzWA73z8y8 BBYMlWmNx8iDL2hxJW8bEDiXar6XacyqZdGfHztwNm7vpYG3zgpQdur1e504iB7swQNP WpxnuVJjSDSQ5sTzozGz5MjcLiw5eFkFNe70Wfj4EggjsKTQGjWJ1ai1yu60Dc8r0Vca Kl038sdEGtCG5ZlvWh7eorfk4wQhSh7STILKxXgv1ShEisuJnLR/5+AZ7QPD3WTMiZe4 dQ5novzJEY8ZQz/sHkMLa9hTQh3/9vJXL39rKbKM99BGB85q5r2Dy+ARrWEDbU/xwE8/ pcww== X-Gm-Message-State: ANoB5pmdDj3uOGOZU1E/vYoJODDNSOHAyhd21vzzhVVV40sA1Q5lLzNq sKAAMU5OKGUN/SbImOqlWKp/81jomn7eYNq0oNrbj+uHHPCz/K0WN7T9YhajjleA/R8WU5yRd2D aoRWqmRSikk4cGJ5vN4b9 X-Received: by 2002:a05:600c:4fd0:b0:3d1:c0a1:4804 with SMTP id o16-20020a05600c4fd000b003d1c0a14804mr4752749wmq.17.1670589432841; Fri, 09 Dec 2022 04:37:12 -0800 (PST) X-Received: by 2002:a05:600c:4fd0:b0:3d1:c0a1:4804 with SMTP id o16-20020a05600c4fd000b003d1c0a14804mr4752714wmq.17.1670589432518; Fri, 09 Dec 2022 04:37:12 -0800 (PST) Received: from gerbillo.redhat.com (146-241-106-22.dyn.eolo.it. [146.241.106.22]) by smtp.gmail.com with ESMTPSA id j10-20020a05600c1c0a00b003b49bd61b19sm9284355wms.15.2022.12.09.04.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 04:37:11 -0800 (PST) Message-ID: Subject: Re: [PATCH v1 2/3] Treewide: Stop corrupting socket's task_frag From: Paolo Abeni To: Benjamin Coddington , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Philipp Reisner , Lars Ellenberg , Christoph =?ISO-8859-1?Q?B=F6hmwalder?= , Jens Axboe , Josef Bacik , Keith Busch , Christoph Hellwig , Sagi Grimberg , Lee Duncan , Chris Leech , Mike Christie , "James E.J. Bottomley" , "Martin K. Petersen" , Valentina Manea , Shuah Khan , Greg Kroah-Hartman , David Howells , Marc Dionne , Steve French , Christine Caulfield , David Teigland , Mark Fasheh , Joel Becker , Joseph Qi , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Ilya Dryomov , Xiubo Li , Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, nbd@other.debian.org, linux-nvme@lists.infradead.org, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, v9fs-developer@lists.sourceforge.net, ceph-devel@vger.kernel.org, linux-nfs@vger.kernel.org Date: Fri, 09 Dec 2022 13:37:08 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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@lists.linbit.com > CC: linux-block@vger.kernel.org > CC: linux-kernel@vger.kernel.org > CC: nbd@other.debian.org > CC: linux-nvme@lists.infradead.org > CC: open-iscsi@googlegroups.com > CC: linux-scsi@vger.kernel.org > CC: linux-usb@vger.kernel.org > CC: linux-afs@lists.infradead.org > CC: linux-cifs@vger.kernel.org > CC: samba-technical@lists.samba.org > CC: cluster-devel@redhat.com > CC: ocfs2-devel@oss.oracle.com > CC: v9fs-developer@lists.sourceforge.net > CC: netdev@vger.kernel.org > CC: ceph-devel@vger.kernel.org > CC: linux-nfs@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