From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759652AbdEOQFp (ORCPT ); Mon, 15 May 2017 12:05:45 -0400 Received: from mga04.intel.com ([192.55.52.120]:40480 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935096AbdEOQFn (ORCPT ); Mon, 15 May 2017 12:05:43 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,345,1491289200"; d="scan'208";a="86994336" Message-ID: <1494864339.18055.20.camel@gmail.com> Subject: Re: [PATCH] ubifs: Fix inode leak in xattr code From: Artem Bityutskiy Reply-To: dedekind1@gmail.com To: Richard Weinberger , linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org, adrian.hunter@intel.com, stable@vger.kernel.org Date: Mon, 15 May 2017 19:05:39 +0300 In-Reply-To: References: <1494858005-18439-1-git-send-email-richard@nod.at> <1494860034.18055.17.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-2.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-05-15 at 17:22 +0200, Richard Weinberger wrote: > Alternatively we could add a iget_locked/drop_nlink/iput sequence to > ubifs_tnc_remove_ino(). But that will make unlink() much slower for > files > that contain xattrs. At that level we'd need to do it for every xattr, even those that were never be accessed, which would be slow indeed. But we really only need to check the inode cache: hey, icache, I am dying, and if you have any of my guys (xattrs), I want them to die with me. So the question is how to find our guys in the inode cache. I am not sure. Probably be we'd have to have our own list of cached inodes in the host inode, and maintain it. Artem.