Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1976344ybc; Sun, 17 Nov 2019 11:13:32 -0800 (PST) X-Google-Smtp-Source: APXvYqwTJLPz/b46hxIvY2NIhszTBLxNRRp3Xo8wna54JglePX4fTrJIiEQPj095hb6vQf3sBGR3 X-Received: by 2002:a17:906:958b:: with SMTP id r11mr20415272ejx.332.1574018012269; Sun, 17 Nov 2019 11:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574018012; cv=none; d=google.com; s=arc-20160816; b=PYzqt0qhVh5YNY3Hs18f+E3WR57Hvlb7iCF0nG9/980gNPKMrmvSFiBOowMpdHxKED tid4B+u42w5wAjgaYZ0JmNP069HYpaKbNrpdleXXcJfBmUMUvVbttQk7UTevAIcyy4V4 rkIaGcpjKC3W4GCa72fP9M/0HEk0594JNm7xttWEAe0G0MWSbRHyPvdv4lf/6FIuOdSZ u6+71gbnLpI+AHuB/cIdiijUXR89DCw1+29fy4faekgrIZDf6eNJveDwZIANYN07nbpX F4ytX8ouaWAVGQG8tn9/MEJeZzZPLzuNY+PJ0ciN4lmgpayUk5wznoPXkSk0/hHbKozP wzBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:in-reply-to:references:message-id:cc:to:subject:from :dkim-signature:dkim-signature; bh=IhQsKuWDqlUOni5MXX37x6JtBfi/hPnDeOj2BecfOLM=; b=cybbuFsXECHHGNPPH7NXwxx6DC/E7q3gXqz7RRGPMlHfEFZADo8CUCao+FZsL/ijDJ O15cpZHsDQlghQAVoEgaQb9nmo+LK1KyMjfxUfRQmHi6xyUtkD1ILP5gUgnv1HNMYVlJ W/wMQu/7bVOHL9K7G1kOs8MPslv6eKB46OaxTPQEo3AleiKdaRIci1C7CqthDT7RDZij Z9AkQ/00249c2Xx+rxWU6OmVb3xWGYWQWxNwdoCZhlf0iO419+Kw5UAFk2LOe5ZEeIoo oGxSpPxwG4S5i0MJUCG5zsrvMSjFMIJ1Je6ST+5bOnX14U9x0Nc4yhN5U3AdLv6Cb+ko WLBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nexedi.com header.s=mandrill header.b="ThMlz/6p"; dkim=pass header.i=@mandrillapp.com header.s=mandrill header.b=G1fJeWjp; 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 jt21si9803642ejb.390.2019.11.17.11.13.05; Sun, 17 Nov 2019 11:13:32 -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=@nexedi.com header.s=mandrill header.b="ThMlz/6p"; dkim=pass header.i=@mandrillapp.com header.s=mandrill header.b=G1fJeWjp; 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 S1726096AbfKQTLb (ORCPT + 99 others); Sun, 17 Nov 2019 14:11:31 -0500 Received: from mail135-17.atl141.mandrillapp.com ([198.2.135.17]:36150 "EHLO mail135-17.atl141.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbfKQTLb (ORCPT ); Sun, 17 Nov 2019 14:11:31 -0500 X-Greylist: delayed 900 seconds by postgrey-1.27 at vger.kernel.org; Sun, 17 Nov 2019 14:11:30 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=mandrill; d=nexedi.com; h=From:Subject:To:Cc:Message-Id:References:In-Reply-To:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; i=kirr@nexedi.com; bh=IhQsKuWDqlUOni5MXX37x6JtBfi/hPnDeOj2BecfOLM=; b=ThMlz/6pPoicY1BMPBixOTbpzA3pxU7qhEhv4eU55RWUUTfrgDgXr3vBxJCFm0VIUyOQXWDGczte PD0rpOey/CquuPjiiB84+hzCcdt7atiRJuy6ZC4JL68vtodzdyzuP431plAVaF8ImNMf9Sa/PFNL rff0lg5kOC8hacWSdLU= Received: from pmta03.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail135-17.atl141.mandrillapp.com id hq6dm41sau8j for ; Sun, 17 Nov 2019 18:56:29 +0000 (envelope-from ) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; i=@mandrillapp.com; q=dns/txt; s=mandrill; t=1574016989; h=From : Subject : To : Cc : Message-Id : References : In-Reply-To : Date : MIME-Version : Content-Type : Content-Transfer-Encoding : From : Subject : Date : X-Mandrill-User : List-Unsubscribe; bh=IhQsKuWDqlUOni5MXX37x6JtBfi/hPnDeOj2BecfOLM=; b=G1fJeWjpDXsJBgFY/aEMfUq7QKaLs4YPUZ6cbITNIxAB686gDzPfPUKl30gNYpl0ymQQr6 u4o7WpdSkjk54Gyc3kideis7KUcYmEMvd/KhsSifXPoTxjP1kw71A0DVnFdVca8k42Mvop7k A0HZWn8uGhbGDyYM3+yAAEKu+Xjbg= From: Kirill Smelkov Subject: Re: KCSAN: data-race in __alloc_file / __alloc_file Received: from [87.98.221.171] by mandrillapp.com id 25adc03905bd44ca897fe473ed9a3d1d; Sun, 17 Nov 2019 18:56:29 +0000 To: Linus Torvalds 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 Message-Id: <20191117185623.GA22280@deco.navytux.spb.ru> References: <20191112165033.GA7905@deco.navytux.spb.ru> In-Reply-To: X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=31050260.25adc03905bd44ca897fe473ed9a3d1d X-Mandrill-User: md_31050260 Date: Sun, 17 Nov 2019 18:56:29 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 09:36:41AM -0800, Linus Torvalds wrote: > 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'? ( just a quick update that I'm still pending on this. I've tried to quickly check the above this evening but offhand it does not give good results until stream_open.cocci is extended to understand read_iter/writer_iter and properly worked some more on it. Or maybe I'm just too sleepy... I'd like to take a time break for now. I will try to return to this topic after finishing my main work first. I apologize for the inconvenience. )