Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2538179rwd; Fri, 9 Jun 2023 12:49:10 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ42Uyiabz+SS8PjYVHXC0c0Ms3pFYOB2l/8mC1ET4eAR+KOEn7fnI5wLp7N8Wi3sYYQ6bTE X-Received: by 2002:a05:6a20:428e:b0:110:9b0b:71b6 with SMTP id o14-20020a056a20428e00b001109b0b71b6mr2543215pzj.37.1686340149845; Fri, 09 Jun 2023 12:49:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686340149; cv=none; d=google.com; s=arc-20160816; b=Fry5Z/Lk2hVSXbqAYfj7SRY4gnof0ciLW0WsJ8N+31magI2gOWb1FiMd9xMF/TJ2CZ F6cZ/DfsuGtbRLhSt0dsa0e6a1RejhCCOKWOrjlVg8CeMwcW/xhejt8NdaMhnJv1giaz SfcSiPitJnh6AhsPGmYWilhvMNrvCA9yrGDEKMk1qTdt+GsgL8aRFUoak28YZYbnZXaK Lw+ZaelOAhBeLP6iOQ7UpM4hkVzaSYDeq+KCcGn5y46RYvyT2v6BA8x4PMqlc7IGixdz eVmXfUw7SDwGh5vGBzmSlKCag6q7l5uZQOV96TMZXNEJqQROX5uRWK+6cfWt5zFlEa0v d27A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=i5jvtYj4ss3gRxhJMAUhGD1nCKZcTExe3MbvBgI5pR8=; b=hSvTTX1X8e9TYxP5VfjXdnIGx8HFsq2mAcOBijQlKu5BN5S1IKmy5qUSTcAT+AGy63 1pRHaEJLV/vKZEMT2XTcwxpFoozKl924VIeSigHyt4wvecrG24tBRyPw+w8yfrUCaTOs ef2RSyalNicVBu6QyB7vaIYxw11IEu46yxposXCpZxyNAro87huAeL+guy5IwyodBx/b DOXwX9vQBsbvCIK4zy7ix9tKVsEyNzM8pLXpqiXRf17GOttSUl0a34DSADrMHu4Xh2q5 CUz/1S5wshc4CGGGe9dYKGLotZ1TmbfUAAaQ0rPQBIWcmtlSvaskrPSus89Lz3crTZU3 8Npg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Emyl6B7q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 s15-20020a63924f000000b0054507258ce0si3113689pgn.234.2023.06.09.12.48.46; Fri, 09 Jun 2023 12:49:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=Emyl6B7q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S230174AbjFITIy (ORCPT + 99 others); Fri, 9 Jun 2023 15:08:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbjFITIv (ORCPT ); Fri, 9 Jun 2023 15:08:51 -0400 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 C687383 for ; Fri, 9 Jun 2023 12:08:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686337689; 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=i5jvtYj4ss3gRxhJMAUhGD1nCKZcTExe3MbvBgI5pR8=; b=Emyl6B7qyTyOgTC0m0+4AbWz93k8Mi7XfbWVZrRbLyjUN050/OJQ8zQEP9sBCa9vbIkLwp 33GgVXz9IxqgqQiT0Qu+bXp2F237hI+cMtGpcaUsNYmsPtGM9jwC54GTZlD2QhubefH/Bt H9bTtKNb9HdI1l219jwUCnka5FXhCC0= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-192-XWIZrI_HMxKJqDWRxSn8LQ-1; Fri, 09 Jun 2023 15:08:07 -0400 X-MC-Unique: XWIZrI_HMxKJqDWRxSn8LQ-1 Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-256719f2381so946985a91.0 for ; Fri, 09 Jun 2023 12:08:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686337686; x=1688929686; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i5jvtYj4ss3gRxhJMAUhGD1nCKZcTExe3MbvBgI5pR8=; b=Ige22cw7vHZ2UTtpPepYR7Pr3d2dI3M2gnAj3z/vrbclqwYLrXRW6S7MJaXwEDGMSb wvz0i0SeENAr23gxltQft//ILVECf4pqEiHEdr0ovEZhYU+PWaIJBgzAUwg1T6Sz8NOm BzvR+96/d165WItOJkFrh0xXxuJyA7xhbjPAT9qwqQ099316qNbQJMhjsx2d5kLVII8/ gW59w4z3vZ2unhh8TYz0svyYpIG1Z36ryDECks4KhwFEc4bEgW8YAVYMZ3jg+bYtDmKD 4E9lgxQoCEO7tEyeYD+sqA++q8S99sil7JxxULJjTEdPB1FEkMDkOnG/mmd3wRGXzlP8 9DTg== X-Gm-Message-State: AC+VfDxfzR9fJklzJK4MWs5ShfpnDmYNjBFuz3AoM0fghv43Wb2iFxJ/ rx73WheUAwQVPe+0MbFPyOaJtCDwSM3ztIJFcIVD8AIIjbl+qpZOjPlfn9ac2kZU4Fj8FBLwO7T FE2MYGrQimFdUJCu+t3nf9VOin9IO5LotzwoyIz7h X-Received: by 2002:a17:90a:10c9:b0:258:fdd9:585a with SMTP id b9-20020a17090a10c900b00258fdd9585amr2037495pje.3.1686337686126; Fri, 09 Jun 2023 12:08:06 -0700 (PDT) X-Received: by 2002:a17:90a:10c9:b0:258:fdd9:585a with SMTP id b9-20020a17090a10c900b00258fdd9585amr2037465pje.3.1686337685870; Fri, 09 Jun 2023 12:08:05 -0700 (PDT) MIME-Version: 1.0 References: <20230516191441.34377-1-wander@redhat.com> <20230517152632.GC1286@redhat.com> <20230529122256.GA588@redhat.com> <20230601181359.GA23852@redhat.com> <20230602173302.GA32644@redhat.com> <20230606203958.GC18866@redhat.com> In-Reply-To: <20230606203958.GC18866@redhat.com> From: Wander Lairson Costa Date: Fri, 9 Jun 2023 16:07:54 -0300 Message-ID: Subject: Re: [PATCH v9] kernel/fork: beware of __put_task_struct calling context To: Oleg Nesterov Cc: "Russell King (Oracle)" , Brian Cain , Michael Ellerman , Stafford Horne , Kefeng Wang , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , "Matthew Wilcox (Oracle)" , "Eric W. Biederman" , Andrei Vagin , Peter Zijlstra , "Paul E. McKenney" , Daniel Bristot de Oliveira , Yu Zhao , Alexey Gladkov , Mike Kravetz , Yang Shi , open list , Hu Chunyu , Valentin Schneider , Sebastian Andrzej Siewior , Steven Rostedt , Luis Goncalves Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@vger.kernel.org On Tue, Jun 6, 2023 at 5:40=E2=80=AFPM Oleg Nesterov wrot= e: > > On 06/05, Wander Lairson Costa wrote: > > > > Thanks. I found an unrelated earlier splat in the console code. That's > > why I couldn't reproduce it in the stock kernel. > > As expected... > > So... Not sure what can I say ;) can you verify that this patch doesn't s= olve > the issues with CONFIG_PROVE_RAW_LOCK_NESTING pointed out by Sebastian? U= sing > stress-ng or anything else. > I managed to test it without a console. No issues happened in the stock ker= nel. > This is not that bad, unless I am totally confused the current code (with= out > your patch) has the same problem (otherwise we wouldn't need this fix). > That's my understanding as well. > But perhaps you can make 2/2 which adds the DEFINE_WAIT_OVERRIDE_MAP() ha= ck > as Peter suggested? > Yes, sure. I would like to get the issue reproduced in practice to make sure I am really fixing the problem. But I can live with that. > Oleg. >