Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2331059imm; Fri, 7 Sep 2018 14:48:31 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbA2lMqxa1lXr57HG5jcUbYRB8urq4IF4gKUIvsNexBhUgog/v1V7EBYjrwdvRAG1vinrll X-Received: by 2002:a62:3306:: with SMTP id z6-v6mr10670421pfz.85.1536356911609; Fri, 07 Sep 2018 14:48:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536356911; cv=none; d=google.com; s=arc-20160816; b=pePEvoFkm8fH+1p+9btChfWYppo7nlFeQ0B5vT1ZJjZ/bcTjKRzEM2tz1Svtpr/l0s OvhjSiNq88Ln3uBVlVuTa2TbhsBOICo9lcE6JxvcBUuBWcwvBupxAqpaCTsDfkpY86CA mAfauNEaqJmwM36kTnqaUiTSdpjzSjw0IEiMySARhD7ngD7cHKA0lh7C6smWvC15chkp BK5aUIJrsayowndCFtRdDAgr0IHZ7pz+Su44Sn0dj6j9p8RaB0GABn3JO0xJVu2Cv8LY 47MzoKdfno+5pKf/3AacIfSkLevqZQ9DDSfnT/tu8Eq9wKlgjfS+3h8upquFY+0KVEJy srww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from; bh=e5isfShTHcRXb5pgI/3cvTtwVcy5633UrBRUB0RtaEE=; b=kOQlq9NW4vq1QuEeLF2qH4eBiwjDM7FP8UpMMQ9cEqUCEpXrvSEGtM63/ManbvcS2B gv/SA+HMOcu5KF9h4IHByJdUX0FnGuw2uahwGHHwykvYJbuf1MT6k1qKRoa8mq8BP44f mBx47vOb9CJ7Vwuocn1JX6FMCMV0V7dNrija+EqibTq/B0NSeXaQWFG8EM/j0sam4uiZ ljLRFwjCVT2pxTm293wT1ezVPPkwsozmZ3r1x6jqxz8QnKl/Ob7iKCXPExDYrkPXYZC6 qbPitUTOCadX40JtfauBl/nZK1wY1Ptr7rB3Jms+AAEzzlJ7YJFQ9sbMnxRMYVG7jw29 2X/A== 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 d8-v6si9932776pgn.382.2018.09.07.14.48.16; Fri, 07 Sep 2018 14:48:31 -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 S1731097AbeIHC2L (ORCPT + 99 others); Fri, 7 Sep 2018 22:28:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58064 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731069AbeIHC2K (ORCPT ); Fri, 7 Sep 2018 22:28:10 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1C3AE1027; Fri, 7 Sep 2018 21:45:13 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tomas Bortoli , syzbot+39749ed7d9ef6dfb23f6@syzkaller.appspotmail.com, Yiwen Jiang , Dominique Martinet Subject: [PATCH 3.18 06/29] net/9p/trans_fd.c: fix race-condition by flushing workqueue before the kfree() Date: Fri, 7 Sep 2018 23:10:27 +0200 Message-Id: <20180907210910.032419049@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180907210909.523240901@linuxfoundation.org> References: <20180907210909.523240901@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tomas Bortoli commit 430ac66eb4c5b5c4eb846b78ebf65747510b30f1 upstream. The patch adds the flush in p9_mux_poll_stop() as it the function used by p9_conn_destroy(), in turn called by p9_fd_close() to stop the async polling associated with the data regarding the connection. Link: http://lkml.kernel.org/r/20180720092730.27104-1-tomasbortoli@gmail.com Signed-off-by: Tomas Bortoli Reported-by: syzbot+39749ed7d9ef6dfb23f6@syzkaller.appspotmail.com To: Eric Van Hensbergen To: Ron Minnich To: Latchesar Ionkov Cc: Yiwen Jiang Cc: stable@vger.kernel.org Signed-off-by: Dominique Martinet Signed-off-by: Greg Kroah-Hartman --- net/9p/trans_fd.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -185,6 +185,8 @@ static void p9_mux_poll_stop(struct p9_c spin_lock_irqsave(&p9_poll_lock, flags); list_del_init(&m->poll_pending_link); spin_unlock_irqrestore(&p9_poll_lock, flags); + + flush_work(&p9_poll_work); } /**