From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 62D36C4332F for ; Mon, 12 Dec 2022 06:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Date:Cc:To:From:Subject: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kKcc7XQPg0UZn1AHNfQ4N2d5zF9JzBW3g3hPGFAB4Kc=; b=mdZtvNWtqJ8a5mCkcERQoVoHeD v5Owjo6H0VGSI8ZowDfvpIgoapFvFvIoQh0TxrjsWUBThujQmBacHAEVyBRGUXA4l6m7JeEtNsNGJ yz0LJEj4bC4QSGizsYfCwu/bY+9KKFueqlEtq4oga25EAZtk6T1NIoz6hpBI5tHVGVzsWHMWkCMy7 +j6xBoKeatKzqt14dgMJoa/x1yQ/0XAuE7gXeC0ZEoE1ZcQ9YtR+uO5uGXgkriJ++hG2tf4/x8NcC pXxZBBN8Y66ebNWxJIfWaluvSokIPz2CKsbBY3lN7Mj/HUF0XtcSXWChgcmklA6UITAGyYKCufWMX AI8UXOCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4cEP-008kxn-Oh; Mon, 12 Dec 2022 06:24:05 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3ccv-007Zkl-Ns for linux-nvme@lists.infradead.org; Fri, 09 Dec 2022 12:37:19 +0000 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-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-115-iGjEsqRvMTCbEACw47Equw-1; Fri, 09 Dec 2022 07:37:14 -0500 X-MC-Unique: iGjEsqRvMTCbEACw47Equw-1 Received: by mail-wm1-f71.google.com with SMTP id h81-20020a1c2154000000b003d1c8e519fbso3894891wmh.2 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=qcMApl+9ZdotF4tbld63C2vW3aYWtqlXzcSxOL4T5+H32Zhg0v+UI3Tk1tFhOeMeBn WLCt1eFToCP1N4YwMK2VaV3ef/eIOsbvufXrO4Fcoy6OmB70KjGGPdSaBLHFZCndG7q2 Xpxp0rvorwbExQJhvYCSxRzMLW9wbFSJRhVyoOLyH2Q5p6zTOk45zbQjRuTzP3r1Hr9N 8LfSRfjDVHY6kU+rorva9gnJv/tbiqR83EsvZfqTtzDITehn8b7/ibInUYZqc8MTKNKZ FFK3cxl5rOQE6VOsHsj4+uc7nJ695esyezq4nA0/TEw6ger+Vh9TbXkfEP9NxQikrlT4 6+zQ== X-Gm-Message-State: ANoB5pmxPhMbjBKdjzypygdRbixTtRB2kbUf+bHaV+csAcaNSzNz1dEY UkqytoBysE2nkuCoPSAduZqmMSlfJi1RvJ5AXZivGhN/3DcB3diEnpwxmOEkIPMgKQzAXOSjhEX Peb+piGAlOM8TCQr1CptphK4mp08= X-Received: by 2002:a05:600c:4fd0:b0:3d1:c0a1:4804 with SMTP id o16-20020a05600c4fd000b003d1c0a14804mr4752781wmq.17.1670589432861; Fri, 09 Dec 2022 04:37:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf5DyMiYpWNcqaQueb0cVh7tJ5lH4JY75MZjLcmrbwYgfM+x/au0sr5C4m2hvq8cZrZMVyWo5g== 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: User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_043717_921736_8895B2EB X-CRM114-Status: GOOD ( 20.41 ) X-Mailman-Approved-At: Sun, 11 Dec 2022 22:24:04 -0800 X-BeenThere: linux-nvme@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-nvme" Errors-To: linux-nvme-bounces+linux-nvme=archiver.kernel.org@lists.infradead.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