From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by dpdk.org (Postfix) with ESMTP id 9657F379E for ; Thu, 26 Mar 2015 16:17:31 +0100 (CET) Received: by wixm2 with SMTP id m2so14012527wix.0 for ; Thu, 26 Mar 2015 08:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mirantis.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zKJ1kIs59eXk1BzRIYy6eQUT+4WcJBgm+hE8yBSw5Qs=; b=OikrbCeEom7ami7FdpalxV++lZSI5vP0YL6ngWlS3kPkdZujtxW4LQpM/JPYF9qwLJ 6yQFot2ogCEQPsKArrkrw0yLAS5n4LyMcSSNomXWORiQ1a4xH/ofIq+qc8H03wwp38oT 9EA3ndYYavoETS4ASjYiJkKxnQfKhnHaL6/ds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=zKJ1kIs59eXk1BzRIYy6eQUT+4WcJBgm+hE8yBSw5Qs=; b=k1k4y+FYASUYRlr4o2gQyPXvDEnSvp8KFHwM7PsDyKFZGX7ernVEbhysIN7cUTfJyU 6+nVuv9tz+eVqBwhs0FxGC4A1drOxjXzgCQu/NuXljayeUgvrw6wne/SK8UR7pz8JNnK ZgO7LjiIjBhVeggAl3t5/NApUr4ipaJ86bghRC/wDR+JRiQ8ifR05HeZjSWTWelfI6Q0 U6zNoDiiM8ygnJZPnAPFbDZia/sa/NjaEBtmjC0mkiC0zj0m0kjShSm8V74SzXhCocR/ Dp1V76+Z80gkwUIOEuXZUV5Z5N7dMj9mjPBK/lBoJuIP/SA0qmsV0I4WccHS+qTjAW1h EROQ== X-Gm-Message-State: ALoCoQlQO07RoPki6vpPoUc93HqMsIBkzsm09hkXZXjhvP/ifeejHRisrNpVU8VMGlNYdmVZIw22 MIME-Version: 1.0 X-Received: by 10.180.108.81 with SMTP id hi17mr47671268wib.91.1427383051399; Thu, 26 Mar 2015 08:17:31 -0700 (PDT) Received: by 10.194.76.7 with HTTP; Thu, 26 Mar 2015 08:17:31 -0700 (PDT) In-Reply-To: References: <1427115225-14489-1-git-send-email-pboldin@mirantis.com> Date: Thu, 26 Mar 2015 17:17:31 +0200 Message-ID: From: Pavel Boldin To: "Xie, Huawei" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] vhost: Fix `struct file' leakage in `eventfd_link' X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 15:17:31 -0000 On Thu, Mar 26, 2015 at 9:56 AM, Xie, Huawei wrote: > On 3/23/2015 8:54 PM, Pavel Boldin wrote: > > Due to increased `struct file's reference counter subsequent call > > to `filp_close' does not free the `struct file'. Prepend `fput' call > > to decrease the reference counter. > > > > Signed-off-by: Pavel Boldin > > --- > > lib/librte_vhost/eventfd_link/eventfd_link.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/lib/librte_vhost/eventfd_link/eventfd_link.c > b/lib/librte_vhost/eventfd_link/eventfd_link.c > > index 7755dd6..62c45c8 100644 > > --- a/lib/librte_vhost/eventfd_link/eventfd_link.c > > +++ b/lib/librte_vhost/eventfd_link/eventfd_link.c > > @@ -117,6 +117,7 @@ eventfd_link_ioctl(struct file *f, unsigned int > ioctl, unsigned long arg) > > * Release the existing eventfd in the source process > > */ > > spin_lock(&files->file_lock); > > + fput(file); > > filp_close(file, files); > > fdt = files_fdtable(files); > > fdt->fd[eventfd_copy.source_fd] = NULL; > > Acked-by Huawei Xie > The patch is still in "New" stat in patchwork. I think you forgot a ":" between Acked-by and email. Pavel