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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 A26BAC04AAA for ; Mon, 6 May 2019 03:36:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7554A20830 for ; Mon, 6 May 2019 03:36:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725828AbfEFDga (ORCPT ); Sun, 5 May 2019 23:36:30 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:7168 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725813AbfEFDga (ORCPT ); Sun, 5 May 2019 23:36:30 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9EF054C1408C98A0F850; Mon, 6 May 2019 11:36:28 +0800 (CST) Received: from [127.0.0.1] (10.177.33.43) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Mon, 6 May 2019 11:36:21 +0800 To: CC: , , , From: yangerkun Subject: system panic while dentry reference count overflow Message-ID: Date: Mon, 6 May 2019 11:36:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.33.43] X-CFilter-Loop: Reflected Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Hi, Run process parallel which each code show as below(2T memory), reference count of root dentry will overflow since allocation of negative dentry should do count++ for root dentry. Then, another dput of root dentry will free it, which cause crash of system. I wondered is there anyone has found this problem? #include #include #include #include int main() { const char *forname="_dOeSnotExist_.db"; int i; char filename[100]=""; struct timespec time1 = {0, 0}; for(;;) { clock_gettime(CLOCK_REALTIME, &time1); for(i=0; i < 10000; i++) { sprintf(filename,"/%d%d%d%s",time1.tv_sec,time1.tv_nsec,i,forname); access(filename,0); memset(filename,'\0',100); } } return 0; } ~ Thanks, Kun.