Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp826869ybc; Tue, 12 Nov 2019 09:46:35 -0800 (PST) X-Google-Smtp-Source: APXvYqwdqI4MnP+LlIWrYa3iW8SisapaQe3yy/qrEG0mcRzDOYO3vhXJJ2JJmbFqB/5LgY4BUUnH X-Received: by 2002:a17:906:5015:: with SMTP id s21mr28735333ejj.226.1573580795274; Tue, 12 Nov 2019 09:46:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573580795; cv=none; d=google.com; s=arc-20160816; b=dJCbLmDMUCECe03rV9fMmcgRSRU2O0u+5sN1T7LrkVLJdVH8kAJxE+/4/9k1Hw8Vtj dm29yAMZjEMaXAh/hisZa7pQFsqxYSQR15NoUQkrqaO9W2iNZq1o/2d/WBaFYQ19rQz/ M4oNR7sbcnHJms9kvaFonrmOoDPBX1V9FWZbGSkjGvM+kOd0mq7bEjuQSTdxPHmB0fPC RqvqayJUh2MkIBkd2fNpE+gIBAaAxN0E5e3joEDUHOwjuhJVE+IomxT1mXCjYmADCl+2 PVgdqWwFaNQUI9loOvLuCN0kZMGI8O/ZqC5HgO8GOcdgc3Qsyb9fdcIVrJkKYx8CgE4B sAfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=IBqefimeVs+AYlMba+nG3Ifymts3na+gdpNY2rCXiUk=; b=zNJ86165KF2wYTJ+Iq95aWY7wDcHIFjSNxGzMxRowB1B7ujd52ZMihrMx1Kk8Rpdnk HhLFY6/vo08ONvNaqdlaJtswlnVk228wfKl0WuEBjxsNZ9MWI7vbVjONqr0baURpdceu FQaHE0qG203T6MfbfuJcdgLEwyWBMZrGWIVJPLdu2wxQeSG2wiza2SE/fdZms7mTlmK2 TMX8i9qNcs9lWBpOw4bTEjgTOcZoJ7DgiAQLU6dOtMEwHsxdVmjetnOmOBXfD+yRCZbV zFrRd0B9mq5RT2ICfZvrNbaOQm/ckyTGLLsk5uMMfVq6i7tf4wT5N2aaYm8nn+hguBm+ vgMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=diHQe+yB; 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 o24si14369199edc.342.2019.11.12.09.46.11; Tue, 12 Nov 2019 09:46:35 -0800 (PST) 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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=diHQe+yB; 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 S1727093AbfKLRnO (ORCPT + 99 others); Tue, 12 Nov 2019 12:43:14 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:33090 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726960AbfKLRnN (ORCPT ); Tue, 12 Nov 2019 12:43:13 -0500 Received: by mail-lj1-f196.google.com with SMTP id t5so18805294ljk.0 for ; Tue, 12 Nov 2019 09:43:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IBqefimeVs+AYlMba+nG3Ifymts3na+gdpNY2rCXiUk=; b=diHQe+yBS1ptQml1pfafp+kWY2eFlTIw5aehrJHkBhZ8198TLnziuPuv+aWPbMESa4 ZLgW0hXjhFPDrgdFG9RXdXxqYD1Ejn46fc1vZ1auR9hlb58u47fldPax7D6iEk6grtjo EpEWHP7zBGk+CKduo6ZBne9+0TPwuTpetW/Ec= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IBqefimeVs+AYlMba+nG3Ifymts3na+gdpNY2rCXiUk=; b=bkCOh7q5tBEv1arraX2jR323zticS6zAE7tV7ErJ8xO1nG5do44zTFGiAQkWskUlFC +hC1y8E/wRYsuHwco1Cx2OEU7mE/pujX3U1WOATGZ2w7Y7Vom1vqjmBADSMeVKzuuIHf z2/yYNUmXcAszMJMIE3b0SREhxbkb8VUEVelalXjlCAWDBjzgChR79qKODegRiw19ncq +enfGwe6WI2Xom1FNAxoNvIgmL5Ap3eOUD9Y9ZCeAZLAJ97lt0EMBjMZr62CtVnvJpBs h1VvlZAiGW5uyKzbxD8053NP/24uaG2gtQ8gAzb7Lyx7gRN4igYh975IHjMssFWnxOtT G73w== X-Gm-Message-State: APjAAAVBdtw70fjFPCIWMyz2iDCaVBKobcQlO9TS1IGw7wZ9GGykECtx /1ubuSD4gJXwZkfEu/75Gw9WRRxt/i0= X-Received: by 2002:a2e:898d:: with SMTP id c13mr21538374lji.54.1573580591500; Tue, 12 Nov 2019 09:43:11 -0800 (PST) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com. [209.85.167.43]) by smtp.gmail.com with ESMTPSA id v6sm10300484ljd.15.2019.11.12.09.43.10 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Nov 2019 09:43:11 -0800 (PST) Received: by mail-lf1-f43.google.com with SMTP id y186so7758253lfa.1 for ; Tue, 12 Nov 2019 09:43:10 -0800 (PST) X-Received: by 2002:ac2:4c86:: with SMTP id d6mr20463115lfl.106.1573580217235; Tue, 12 Nov 2019 09:36:57 -0800 (PST) MIME-Version: 1.0 References: <20191112165033.GA7905@deco.navytux.spb.ru> In-Reply-To: From: Linus Torvalds Date: Tue, 12 Nov 2019 09:36:41 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: KCSAN: data-race in __alloc_file / __alloc_file To: Kirill Smelkov Cc: Eric Dumazet , Al Viro , Alan Stern , Marco Elver , Eric Dumazet , syzbot , linux-fsdevel , Linux Kernel Mailing List , syzkaller-bugs , Andrea Parri , "Paul E. McKenney" , LKMM Maintainers -- Akira Yokosawa Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 12, 2019 at 9:23 AM Linus Torvalds wrote: > > Hmm. I thought we already then applied all the patches that marked > things that didn't use f_pos as FMODE_STREAM. Including pipes and > sockets etc. > > But if we didn't - and no, I didn't double-check now either - then > obviously that part of the patch can't be applied now. Ok, looking at it now. Yeah, commit c5bf68fe0c86 ("*: convert stream-like files from nonseekable_open -> stream_open") did the scripted thing, but it only did it for nonseekable_open, not for the more complicated cases. So yup, you're right - we'd need to at least do the pipe/socket case too. What happens if the actual conversion part (nonseekable_open -> stream_open) is removed from the cocci script, and it's used to only find "read/write doesn't use f_pos" cases? Or maybe trigger on '.llseek = no_llseek'? Linus