Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753439AbdCHNqU (ORCPT ); Wed, 8 Mar 2017 08:46:20 -0500 Received: from mx2.mpynet.fi ([82.197.21.85]:14870 "EHLO mx2.mpynet.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753326AbdCHNqP (ORCPT ); Wed, 8 Mar 2017 08:46:15 -0500 Date: Wed, 8 Mar 2017 15:46:10 +0200 From: Tuomas Tynkkynen To: Alexander Viro CC: , Eric Van Hensbergen , , , "Aneesh Kumar K . V" , Subject: Re: [PATCH] fs/9p: Compare qid.path in v9fs_test_inode Message-ID: <20170308154610.59a563a3@duuni> In-Reply-To: <20170222000629.7995-1-tuomas@tuxera.com> References: <20170222000629.7995-1-tuomas@tuxera.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: tuxera-exch.ad.tuxera.com (10.20.48.11) To tuxera-exch.ad.tuxera.com (10.20.48.11) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 629 Lines: 17 On Wed, 22 Feb 2017 02:06:29 +0200 Tuomas Tynkkynen wrote: > Commit fd2421f54423 ("fs/9p: When doing inode lookup compare qid details > and inode mode bits.") transformed v9fs_qid_iget() to use iget5_locked() > instead of iget_locked(). However, the test() callback is not checking > fid.path at all, which means that a lookup in the inode cache can now > accidentally locate a completely wrong inode from the same inode hash > bucket if the other fields (qid.type and qid.version) match. > Al, does this sound sensible? (or if there is someone else picking up 9p patches, let me know). Thanks! - Tuomas