Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3998400pxb; Tue, 7 Sep 2021 12:13:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4Uek+9yD3uFvbjH42KOoUuI+zdVHBi8Gg4MLK7MPpErnSyXuC8qLua5KN1JLFfVRit50I X-Received: by 2002:a05:6402:3188:: with SMTP id di8mr1068777edb.300.1631042016852; Tue, 07 Sep 2021 12:13:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1631042016; cv=pass; d=google.com; s=arc-20160816; b=IEbWD7HjnWxnP2msZJLZyJq0D45hx9I2tLS71WFe7p7uDLTj2JavKefLIjWDoYJ+yx XnRdyVQpUc87LTqWt/rpwmuxktT9CAoUpu8q7MYVD1CzPDZuDlcsmMZ4swk/VA7OAbGi BfBQCoIvQSe19iIHhyhTV8OtrDaUBD4aBbSpY3xzj7L1idB+GR6xS2uB/5PMx42VZKgX qsKZ1wLXDFGa4w/iEflQsAm+ALIv6jXtqb3lFfOPCRhbBSAtJ+OGl1suazaXj4lTp3h8 Yso9Jv3+z1sMIEjMCgvaFOapVt8MBAK5IATpIsKX7xR3zvePTK7LxTwQfFLaNRfhQBK9 BCdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=x6HJC1QCzoKrz5SkFD52IL+bveBqEtyFzT9/Xv4M8Ns=; b=gJoOWu+073wSkGbwxaAiexQGjnbSuyHJquzKooyBJ2uEphOy3t1U11z/d5WURjyWa/ Xfm1A0qWWsXl7ucPiB4zr/rUqmWuSHoufUvLL7HHyuiZ/DPIYY+9Hd8k9PjiEZS7DToE 2emwG55xdeb7u3cksBBilRXa6zhPy1GapI0pFvUuKz0fvF25UY2BJ9m/DJlXhHrSN4/3 weyxwMqsiSOjcJjY0LA84y6jYl9Se1ZgHIlAnP5lzjP/qyFW9WSTlMs4qmTyaEmO6CN5 fTOrRwiuNiCGifH/PgVCGJVhjXA1mae/qs9GBVIlko2Sqkj1j1vuY3YkpsN9hYshUi3d g/YQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=DOKixaSZ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd17si9129542ejc.727.2021.09.07.12.13.09; Tue, 07 Sep 2021 12:13:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=DOKixaSZ; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345523AbhIGTMC (ORCPT + 99 others); Tue, 7 Sep 2021 15:12:02 -0400 Received: from mail-bn8nam08on2045.outbound.protection.outlook.com ([40.107.100.45]:1408 "EHLO NAM04-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230203AbhIGTMB (ORCPT ); Tue, 7 Sep 2021 15:12:01 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P5wHfP07r6rHvydtNrSWemrtvtFXreMHJZnYMxSx5aGqMtx7tMZHICtTboZFz+j51cWq+YIU4y5hM8EuX5m9/uQxR5jmES6zDO4pGT8BX1oTD8ovX2u5kWnQ+9brrgxRACnSK1TVXSV+8xMNgbVYmVky7AS/EIxM5d9eCbFJIbadeSAb4FN6DMO6zU6vZM6MX5lTbBs3PK6Kg+3sm6Zy0B9fCbvogRPYwl/cmEzkjAbyBomycJwz9BUu6Sk1qt8vsg9GyZ5uoN1MahKU1b3tSpsuDDofSKsQQBKTMLduxXWqgNfT4JuERaAPGDgz84bLo0OO67zNSHTFjqUDJKJcOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=x6HJC1QCzoKrz5SkFD52IL+bveBqEtyFzT9/Xv4M8Ns=; b=QYtQ1TE0bbDeOvmtlqSh/T3+6tfSUPePrwPKHferqj2w+TUkIGDpEzpRfOFZjL5qIx/pe+nuEv6NN+wyfvcg+zZUuqkHaG0L60WkrfAZIyhFhaK9TMANXDxI3ocrlojW/569iUIRm/n9UX1VHkjyRm5aymvKAho7rzK0zC3QFZADeZsNYUa7CiLfS+p4FYV80SFlnVpTHXEVmAStGWddtWwkOhvFyPXGCQ2pqrUlK2EB6Fh0nlAKYpWdhngxv+3Vp3Z0C4nlLVa7+R7oa73feDiQLbVK+fM604mE1HNMjTr3kOi8vE1JSGHTe6is7d1+Vf1pIdPmkIpMt/kFLHS9mg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x6HJC1QCzoKrz5SkFD52IL+bveBqEtyFzT9/Xv4M8Ns=; b=DOKixaSZBKP7k/dl758rM537Uyl0wmhyuKE7hYoP88/yZNYt8LISDARKnr83xFJfMyxjQktSY5fkxB5HPwPIqNBhqyKpzljN5PUE9lDUXhR6OgOW1JpCx0HFBjLiCMgMQQOHcM09XY1thoYVQ7cOrUsTVT2NkIf4bHeUKPe1HXGjWaDoiq8p3KX4+eeFawdHZ8CtKq3jA3aMgW8cuEWQT5npZR41Am/VD8UnjcClvCz92xagf8kZxmUuyWWbTPLbb55KuQmQWXOG5qWdLZ7p4baS21lqKbZAEev/kNaNVqMbI+CEampTQIPbWTkd3XIZ1H4ee/TiTe2r3/Ds1RfYlw== Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by BY5PR12MB4835.namprd12.prod.outlook.com (2603:10b6:a03:1fd::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4478.22; Tue, 7 Sep 2021 19:10:53 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::18d1:be89:51d3:58c9]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::18d1:be89:51d3:58c9%6]) with mapi id 15.20.4478.026; Tue, 7 Sep 2021 19:10:53 +0000 Subject: Re: [mm/gup] 9857a17f20: kernel_BUG_at_include/linux/pagemap.h To: Linus Torvalds , kernel test robot Cc: Christoph Hellwig , Matthew Wilcox , Christian Borntraeger , Heiko Carstens , Vasily Gorbik , Andrew Morton , LKML , lkp@lists.01.org, kernel test robot References: <20210907153736.GF17617@xsang-OptiPlex-9020> From: John Hubbard Message-ID: <513d8734-7156-f3b6-b149-4d2cd83b5742@nvidia.com> Date: Tue, 7 Sep 2021 12:10:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY3PR05CA0036.namprd05.prod.outlook.com (2603:10b6:a03:39b::11) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) MIME-Version: 1.0 Received: from [10.2.63.205] (216.228.112.22) by BY3PR05CA0036.namprd05.prod.outlook.com (2603:10b6:a03:39b::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.4 via Frontend Transport; Tue, 7 Sep 2021 19:10:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18bc312a-4e10-4119-0a35-08d97233364e X-MS-TrafficTypeDiagnostic: BY5PR12MB4835: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7sAPUbLa0QRkn4NB7IysrKOSScpEY5UbC7+TyBZnYVaV5ufK52zY/fDuOYOthnCNh/7c2eB49V4ZLM2QKTlJIeFN4EkmYbsSShDYHYZg5Xd71xx+d4znhlx/rN3MC8I6oqQw5xRRtHCvyZ7FotqmZdHC3juN6GJ7Ige7URrS0nlbozXGuaRIqdmpi1Ougc7eEQekZxUeLDRP4ewwmILWKH58zxHVE1+lYVm7ML4Vo9c2lWiuyXq1B6IwxFF04W+SGcYj77qb0JN/cPL+sD2hpXq4J9bWzEsrzIg+4MjnYAKWmlQD9K5VkYIjItr+kpOJAPD7DDvkIBYhApUpBpoy0OA10t41OJnCqOzTaBT6f1Pa8WxkEAyq02ZXqdfygJSNM1oYQh+dnXXdaFmWqlm3ze3+ZAWGhNWc4jegsZE+m75WQTJEn9/KucxFm44XkAltIAy/u60LSshHFLVwlvX1LQPNbid/VS6CT7RiMBMifGAOoxDUFoXT6m1JMf8tlkOolC43AJQgpWNKIVYpjbngqU6wQORcPbXwM5s39ixQ0Gj1D6s1Nw+AMh0JzBz/iB5dZzn7JETQmLhm2FPrFRDURjquoQWTzsXmlUgAoqwjCJZi26ueuxkmC0FhTVrsrGe7VVHQGTZ53eAbCnirrpZvQKmQlK4qd5Qv6jJ8wF0VnzSVmtFPXY5JiNTKU8+Zl28Dw37Sxeyzvpz4pXT7KR2L3WuF/MEo1O0sg4WrqouTxXI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB4130.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(36756003)(83380400001)(38100700002)(8676002)(86362001)(7416002)(8936002)(2906002)(54906003)(53546011)(110136005)(66946007)(31686004)(66556008)(66476007)(508600001)(2616005)(956004)(4326008)(186003)(6486002)(316002)(26005)(5660300002)(31696002)(16576012)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ckVOeXdtQi9FS2hSZ0E2VVBQTzZFMDJheVZjMDNyaHRWRkNOTXhONEVWdGhq?= =?utf-8?B?MjU3RXJaaVFQNmQ3L0d6c0xreVhwU1FEV1l3MXVMSjZBQW9BQUY5SmFzNThL?= =?utf-8?B?c24zYXplVmNwMEhwSThyZVprMzJkWTZkQXlDcnJxejVoOVJUUmt0YjBMNjgr?= =?utf-8?B?NS9MUzZ5QmRHaVBpMlpRUW5wMlZobUl3and1MGpyWEM0M1BFWWdTbjJPaXo4?= =?utf-8?B?UURta2NLZW42RUtLTjR0elgwNXZ5OWpJNWRid0M5SWZNZHg2RGQzS1orWFJ1?= =?utf-8?B?UmRHdkl5MGRpNXg4azYrb0UyVFJZOUMycWtnYk5lRGhDTjhSK0hyc0pzelRu?= =?utf-8?B?R2piNWZUWTlic3IyY3h2TDdjaG5BdjJadXQ5bkJhV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lUml0bjFTZTRER01CaW5jR0Z0Vk9uM25DMy82ZWN1bXErV3Fy?= =?utf-8?B?OVUxZDR6ckpyeE43SDFTTndxeUNabnRKVUJXV2pZVjBjeXBIUDFZVEtoZEVB?= =?utf-8?B?RDZTNG1jOEo0bndmNE0xSDBZUjdQeTg4UEpFUllHbUhoOW5uZjZOc3NSNnYx?= =?utf-8?B?bXgvMzVTQVZacGRCL3pvbzB4dnFTSXpUQVpkOUZhSXJPYThBazUvUUtrREla?= =?utf-8?B?eG9waVBsc2pIQzJzWWZKdFRhUVp6a0c0cHRLd1dMQzdiRWxUeEsrNWdxbEJ4?= =?utf-8?B?RnBFQy9BZVNweW82UjdaejlDR2x6ZG1pVmFRb05tSDF2WVpSSnRQODBJUHZy?= =?utf-8?B?elZDL3E5TDRDQnliYzFUL2NhR0JRTHpoUEJaWCtaS3k5Uy9temhxV3F1Wnhz?= =?utf-8?B?VlJ2dXEvSXBIbGVnK202UGFBUTFOcVByMDlBNjFHclNINWMyUG83MVhjUjNo?= =?utf-8?Q?ZDPEu3jlo0civ2Y0LnujbFJmBdVd952W2hWQWlv?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18bc312a-4e10-4119-0a35-08d97233364e X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2021 19:10:53.0564 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 9Dodp7uDwNhJM4yhlXnxYlvCqgeaVpwGCTwzs0qBOoTXsXpJMbmdkxTFq5J1IM0li+G+VfJGhgVEDvj1TIWdjQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4835 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/7/21 11:14 AM, Linus Torvalds wrote: > On Tue, Sep 7, 2021 at 8:20 AM kernel test robot wrote: >> >> FYI, we noticed the following commit (built with clang-14): >> >> commit: 9857a17f206f ("mm/gup: remove try_get_page(), call try_get_compound_head() directly") >> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): >> >> [ 143.908513][ T3260] kernel BUG at include/linux/pagemap.h:223! > > Ahh, well, yes. > > That commit is clearly buggy, in that the try_get_compound_head() code > really doesn't work at all for us. > > __page_cache_add_speculative() is not at all the same as > try_get_page(), and I should have caught on to this as I applied it. I > just read the explanation, and it sounded believable, but it was > entirely wrong. > > try_get_page() is literally about that "page ref overflow" case, but > try_get_compound_head() uses page_cache_add_speculative() which has > different logic and has those extra "this only works in RCU context" > logic. > > So that commit was completely bogus, and the "lack of maintenance" was > not lack of maintenance at all, it was all about entirely different > semantics. > > Reverted. > > Linus Apologies for the bug! There is a lesson in here, somewhere... thanks, -- John Hubbard NVIDIA