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 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 5D5FBC433B4 for ; Sun, 25 Apr 2021 16:50:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29FE56105A for ; Sun, 25 Apr 2021 16:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230462AbhDYQvh (ORCPT ); Sun, 25 Apr 2021 12:51:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230329AbhDYQvg (ORCPT ); Sun, 25 Apr 2021 12:51:36 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B388CC061574; Sun, 25 Apr 2021 09:50:56 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lahyA-008Cja-Rg; Sun, 25 Apr 2021 16:50:54 +0000 Date: Sun, 25 Apr 2021 16:50:54 +0000 From: Al Viro To: haosdent Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, zhengyu.duan@shopee.com, Haosong Huang Subject: Re: NULL pointer dereference when access /proc/net Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sun, Apr 25, 2021 at 11:22:15PM +0800, haosdent wrote: > Hi, Alexander Viro and dear Linux Filesystems maintainers, recently we > encounter a NULL pointer dereference Oops in our production. > > We have attempted to analyze the core dump and compare it with source code > in the past few weeks, currently still could not understand why > `dentry->d_inode` become NULL while other fields look normal. Not really - the crucial part is ->d_count == -128, i.e. it's already past __dentry_kill(). > [19521409.514784] RIP: 0010:__atime_needs_update+0x5/0x190 Which tree is that? __atime_needs_update() had been introduced in 4.8 and disappeared in 4.18; anything of that age straight on mainline would have a plenty of interesting problems. If you have some patches applied on top of that... Depends on what those are, obviously.