From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B13CC433E2 for ; Mon, 14 Sep 2020 01:51:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C6E86208C7 for ; Mon, 14 Sep 2020 01:51:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6E86208C7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 62D118E0001; Sun, 13 Sep 2020 21:51:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5DC5A6B005C; Sun, 13 Sep 2020 21:51:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4CD838E0001; Sun, 13 Sep 2020 21:51:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id 3408E6B005A for ; Sun, 13 Sep 2020 21:51:48 -0400 (EDT) Received: from smtpin10.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E47DE1B404 for ; Mon, 14 Sep 2020 01:51:47 +0000 (UTC) X-FDA: 77259990654.10.pain53_1e078da27104 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin10.hostedemail.com (Postfix) with ESMTP id B72CE16A0DE for ; Mon, 14 Sep 2020 01:51:47 +0000 (UTC) X-HE-Tag: pain53_1e078da27104 X-Filterd-Recvd-Size: 2482 Received: from huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf19.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 01:51:46 +0000 (UTC) Received: from dggeme753-chm.china.huawei.com (unknown [172.30.72.57]) by Forcepoint Email with ESMTP id 7A4B516DFC6B8F213783; Mon, 14 Sep 2020 09:51:41 +0800 (CST) Received: from dggeme753-chm.china.huawei.com (10.3.19.99) by dggeme753-chm.china.huawei.com (10.3.19.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1913.5; Mon, 14 Sep 2020 09:51:41 +0800 Received: from dggeme753-chm.china.huawei.com ([10.7.64.70]) by dggeme753-chm.china.huawei.com ([10.7.64.70]) with mapi id 15.01.1913.007; Mon, 14 Sep 2020 09:51:41 +0800 From: linmiaohe To: Hillf Danton CC: "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "syzkaller-bugs@googlegroups.com" , syzbot Subject: Re: general protection fault in unlink_file_vma Thread-Topic: general protection fault in unlink_file_vma Thread-Index: AdaKOSZzeAioeGR0Qvi/fuCv5/iZ+g== Date: Mon, 14 Sep 2020 01:51:41 +0000 Message-ID: Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.176.109] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: B72CE16A0DE X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.220501, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hillf Danton wrote: > On Sun, 13 Sep 2020 09:17:26 +0000 linmiaohe wrote: >>=20 >> I reviewed the code carefully these days and I found vma_merge() do only= fput() the vm_file of the linked vma in remove_next cases. >> This gpf is much likely because the ->mmap() callback can change=20 >> vma->vm_file and fput the original file. But my previous commit failed t= o catch this case and always fput() the original file, hence add an extra f= put(). >> The below patch would make the things right: >>=20 > >Take another look at the Cc list and the link below. > >https://lore.kernel.org/lkml/20200911120222.GT87483@ziepe.ca/ > Many thanks for your teach. I think I could send the proposed patch to the = syzbot directly. Thanks again.:)