Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5046923ybi; Sat, 20 Jul 2019 11:41:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxd9La/RuIJozWDzrOQyYDHetw0X+KNLA8MuG9JWSgoHJ+uqlfVlOru28956a9aTmgbvLY X-Received: by 2002:a65:640d:: with SMTP id a13mr60657781pgv.256.1563648087966; Sat, 20 Jul 2019 11:41:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563648087; cv=none; d=google.com; s=arc-20160816; b=CLFoVkh0H8mtnRfsvuc8g7y1Lb/knZQoNJeX1bTVoiPvDoylewJl6O29pkimjy8a6S qpyWFSus5HWyFOEcothgEDeeagc96kCJkX67ho1uE5oozBgkUi3+FkwYHUWbA79ukOz/ fIABFeAox1S//QGw9cGqGz9+sZQ3VIcoiL41DPWsat4dL0PT9th1pycaf8p4zO7ynANQ pQVATQdTpgh0ILtgPinKGc1DAZKVFUq1Xqw15L5jpYtwNnTcLShLOOzE+PpouZcUufpF qjgjpBGiYPOcyPgY87iUhOzMh1PIT32tU/Fz4l/QLDpzwNhtZpSUfIE27GN5uKVg2MyD kgQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=DJyPwkRfjr3B4Th51iAH+bMT/Mri1T/r9TKqBLGcwQ8=; b=bM1kgTLNcWBwlYdMrL15STiYtoMRl1Gbu9rkQeuu8RApyMn1SMjUF7nMNsDwesGcag XNvT3y+2P8Ov/F94QGt6szrUTcmzJZv9dno40DqmUUjpjO1x+8pH63sE0awAScN3BxSB m3yvhNAy/ftKgPLZKGyx+EN5xRyN+uxRHUlqYLGh3RGm7zDbSgu/TD+Rc3q8u+7VI/Ef JFt+v4TCLy9OmWVkZe79WoNf7lA9kGcrt2RE8F+bpVibzEaC/39e56tI27eyZI9jf4HY Tn9IsEayTgtDW/2HhlMGGq9+94DvEvZsTy2hVDZgfc93jajuzXz8AXQLQ6IQqa+seUvv T4rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y186si3491038pgd.440.2019.07.20.11.41.12; Sat, 20 Jul 2019 11:41:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727579AbfGTJpn (ORCPT + 99 others); Sat, 20 Jul 2019 05:45:43 -0400 Received: from mx2.suse.de ([195.135.220.15]:43098 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727523AbfGTJpm (ORCPT ); Sat, 20 Jul 2019 05:45:42 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 587A3B11A; Sat, 20 Jul 2019 09:45:41 +0000 (UTC) From: Luis Henriques To: "Linus Torvalds" Cc: "Waiman Long" , "Borislav Petkov" , "Will Deacon" , "huang ying" , "Peter Zijlstra" , "the arch\/x86 maintainers" , "Thomas Gleixner" , "Tim Chen" , "Ingo Molnar" , "Davidlohr Bueso" , "Linux List Kernel Mailing" , "H. Peter Anvin" , "Jeff Layton" Subject: Re: [PATCH v8 13/19] locking/rwsem: Make rwsem->owner an atomic_long_t References: <20190520205918.22251-1-longman@redhat.com> <20190520205918.22251-14-longman@redhat.com> <20190719184538.GA20324@hermes.olymp> <2ed44afa-4528-a785-f188-2daf24343f97@redhat.com> <87h87hksim.fsf@suse.com> <87a7d9kq4a.fsf@suse.com> Date: Sat, 20 Jul 2019 10:45:39 +0100 In-Reply-To: <87a7d9kq4a.fsf@suse.com> (Luis Henriques's message of "Sat, 20 Jul 2019 10:32:53 +0100") Message-ID: <875znxkpj0.fsf@suse.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Luis Henriques writes: > Luis Henriques writes: > >> "Linus Torvalds" writes: >> >>> On Fri, Jul 19, 2019 at 12:32 PM Waiman Long wrote: >>>> >>>> This patch shouldn't change the behavior of the rwsem code. The code >>>> only access data within the rw_semaphore structures. I don't know why it >>>> will cause a KASAN error. I will have to reproduce it and figure out >>>> exactly which statement is doing the invalid access. >>> >>> The stack traces should show line numbers if you run them through >>> scripts/decode_stacktrace.sh. >>> >>> You need to have debug info enabled for that, though. >>> >>> Luis? >>> >>> Linus >> >> Yep, sure. And I should have done this in the initial report. It's a >> different trace, I had to recompile the kernel. >> >> (I'm also adding Jeff to the CC list.) >> > > Ah, and I also managed to reproduce this on btrfs so I guess this rules > out a bug in the filesystem code. Just another detail (before I go completely offline until tomorrow evening): in the btrfs case I'm seeing the bug on the rwsem_down_read_slowpath path, not on rwsem_down_write_slowpath. But it seems to be on the same place (i.e. rwsem_can_spin_on_owner). Cheers, -- Luis