From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:46663 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752952AbcKGPCu (ORCPT ); Mon, 7 Nov 2016 10:02:50 -0500 Date: Mon, 7 Nov 2016 07:01:47 -0800 From: Christoph Hellwig To: Miklos Szeredi Cc: Al Viro , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] bad_inode: add missing i_op initializers Message-ID: <20161107150147.GB17451@infradead.org> References: <1478510181-4242-1-git-send-email-mszeredi@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478510181-4242-1-git-send-email-mszeredi@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Nov 07, 2016 at 10:16:21AM +0100, Miklos Szeredi wrote: > New inode operations were forgotten to be added to bad_inode. Most of the > time the op is checked for NULL before being called but marking the inode > bad and the check can race (very unlikely). > > However in case of ->get_link() only DCACHE_SYMLINK_TYPE is checked before > calling the op, so there's no race and will definitely oops when trying to > follow links on such a beast. > > Also remove comments about extinct ops. Can someone come up with some BUILD_BUG_ON magic to catch issues like this?