Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp316374ybg; Fri, 12 Jun 2020 02:15:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0B4jMPoXPr8oc2hl8b+mitw9rF3gBm7RQLjB78xBhBhWXwa2tH/s2pSos8DbxORauOGZ9 X-Received: by 2002:a17:907:10d3:: with SMTP id rv19mr12098708ejb.327.1591953328888; Fri, 12 Jun 2020 02:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591953328; cv=none; d=google.com; s=arc-20160816; b=FOr8+gVpiTC9awgcoCT/14X7exKL6t2khavEX94lYAGRaKe76ip6ecq4j7SpXy2mN5 RXMpxW40aanP/DtqC5GVjujnWhUAGktheBL+nGLmoM1YnGMOvrHtyOBqYTzuQn6FVyJ7 QcDq+qafBMLxUUy5APIcZYgeoEgKOgx7F9/SzhwX1c8jPh+xpxcrafKUxR1tb+N1L7iA 6qbdLFDmuFMBSWzTAd4KKvsaLpI6dTRjLdMLT2WYlmzjnWcI2WCwWZ3ShzZ7EzuioQBz hBkxwUh4KQuKkVszyZLr8NT+JJJbn041s8y2nMOhoNYMY7bp2x30f+y4bmW2ata0pLld GKQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4Ph+SxNY14V5yNRBpAgTRF2084Z5ccr+akexWhrclgk=; b=Y6nfBQmC1ORPNkMHrVJZaIK+hjWC4X9JrIarKnn15u5WcgEwXXX8zTCTqO2NI9uqC9 nNUoxyar5OEVIHfWKanC1a6S/c2o1voO5AiRBTW9rw5STgbaoOSLR0Kbe7Yu/rpwyGsG BvosV6JQmvgIKZJuq+1y/htMUq/m4BrD708wfhiTEgwgKv5xq3ht1WhdCfn4fFYGXz1L md8kIXKBB+i9XBZfsSMUYaRKmyzuvE0DApyppeWlKXifgzGAaidJAWpMHObnM0iS6ew5 +j9zJMBxctCeBJoGU6IDrITDarMcziwTcR3GwaNHz3KdUcu0Kzx3zwjbEPrqHQKrOmdH F1PA== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do10si4796816ejc.671.2020.06.12.02.15.05; Fri, 12 Jun 2020 02:15:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726490AbgFLJLB (ORCPT + 99 others); Fri, 12 Jun 2020 05:11:01 -0400 Received: from nautica.notk.org ([91.121.71.147]:36412 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgFLJLB (ORCPT ); Fri, 12 Jun 2020 05:11:01 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id BC650C009; Fri, 12 Jun 2020 11:10:59 +0200 (CEST) Date: Fri, 12 Jun 2020 11:10:44 +0200 From: Dominique Martinet To: Wang Hai Cc: ericvh@gmail.com, lucho@ionkov.net, davem@davemloft.net, v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] 9p/trans_fd: Fix concurrency del of req_list in p9_fd_cancelled/p9_read_work Message-ID: <20200612091044.GA11129@nautica> References: <20200612090833.36149-1-wanghai38@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200612090833.36149-1-wanghai38@huawei.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wang Hai wrote on Fri, Jun 12, 2020: > p9_read_work and p9_fd_cancelled may be called concurrently. > In some cases, req->req_list may be deleted by both p9_read_work > and p9_fd_cancelled. > > We can fix it by ignoring replies associated with a cancelled > request and ignoring cancelled request if message has been received > before lock. > > Fixes: 60ff779c4abb ("9p: client: remove unused code and any reference to "cancelled" function") > Reported-by: syzbot+77a25acfa0382e06ab23@syzkaller.appspotmail.com > Signed-off-by: Wang Hai Thanks! looks good to me, I'll queue for 5.9 as well unless you're in a hurry. -- Dominique