Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3587287img; Mon, 25 Mar 2019 13:21:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxL2BHNLBNmhoZ/PSmVXDgdBGuHDIJ3q8ArW5pfqQfenEGREnKxZyRPXtgWW56HxwwfqKgQ X-Received: by 2002:a65:6548:: with SMTP id a8mr25056429pgw.103.1553545304406; Mon, 25 Mar 2019 13:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553545304; cv=none; d=google.com; s=arc-20160816; b=cz/2QlQapQcCKfDLiPVgq0pnt9BW3uK/LEwgfxb98l/9R1VolBACZhpnCNah8xjqvT Ph9ofT8gcuivUdbf50YUxZSPbknETinUpADhHoLHVha4ILfkVgP78fgYiJtDlPS/VfdV GsRYpjFcS1gEjEwCiWVZfIDJpxCAcPPLHMCqynEQLvWxhu3hcyyVUqBtp1qbmuAZqBdu M7/5qhX0oCQZcSb5TIv52La4fBtfzPQc0s917WqZTiytvgppgrENi8UDL2AqesctZZa8 MHkvcN6RAouYgI3uXVIWGKJBRX76+fhFr06KRMuGg+35PG6j61NIk4XKFLWE1sFmFOmt af4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=LljGDyk/kEw4/FPnuZ2blbaEnb9773IaZc2JhFGhnXI=; b=YuuKJ072gvfyAJtLtQzDZq8lGl7jPT0ke3g+iE/rCA/hPBNxy3VjwMONfKw6DQVM+G iDqsk86jCiyTws17TRWHNR+pNs7Cc8GWH6djXITX9EDfJp7z1r/v53X07Jkz3aSwdMxb V6HcXz/yVJxGKPemKfKlPQWGJMZI9pBBSFwlYdBGaDmKpjyesaky7aqHekPJrnps6VBS XkptVQceIXaF7TIpYYQC6lMq+Ok2c+7az9tr6Y0f+uWHU1ZEmhNwPuzuUtLrpbfLMUIh jPPQmQ+Vhd8Nj0WoV3MQRLdj3nQf3tfChQ1hzTsmvVAxLAe0iLy7Wi5UuR6k+ggvU/xX PD+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si1508797pfn.70.2019.03.25.13.21.28; Mon, 25 Mar 2019 13:21:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729749AbfCYUUx (ORCPT + 99 others); Mon, 25 Mar 2019 16:20:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58134 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727003AbfCYUUx (ORCPT ); Mon, 25 Mar 2019 16:20:53 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 017383082A51; Mon, 25 Mar 2019 20:20:53 +0000 (UTC) Received: from x1.home (ovpn-116-33.phx2.redhat.com [10.3.116.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA961619AA; Mon, 25 Mar 2019 20:20:52 +0000 (UTC) Date: Mon, 25 Mar 2019 14:20:52 -0600 From: Alex Williamson To: Parav Pandit Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kwankhede@nvidia.com Subject: Re: [PATCH 6/8] vfio/mdev: Follow correct remove sequence Message-ID: <20190325142052.423badda@x1.home> In-Reply-To: <1553296835-37522-7-git-send-email-parav@mellanox.com> References: <1553296835-37522-1-git-send-email-parav@mellanox.com> <1553296835-37522-7-git-send-email-parav@mellanox.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Mon, 25 Mar 2019 20:20:53 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Mar 2019 18:20:33 -0500 Parav Pandit wrote: > mdev_remove_sysfs_files() should follow exact mirror sequence of a > create, similar to what is followed in error unwinding path of > mdev_create_sysfs_files(). > > Fixes: 7b96953bc640 ("vfio: Mediated device Core driver") > Signed-off-by: Parav Pandit > --- > drivers/vfio/mdev/mdev_sysfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vfio/mdev/mdev_sysfs.c b/drivers/vfio/mdev/mdev_sysfs.c > index ce5dd21..c782fa9 100644 > --- a/drivers/vfio/mdev/mdev_sysfs.c > +++ b/drivers/vfio/mdev/mdev_sysfs.c > @@ -280,7 +280,7 @@ int mdev_create_sysfs_files(struct device *dev, struct mdev_type *type) > > void mdev_remove_sysfs_files(struct device *dev, struct mdev_type *type) > { > + sysfs_remove_files(&dev->kobj, mdev_device_attrs); > sysfs_remove_link(&dev->kobj, "mdev_type"); > sysfs_remove_link(type->devices_kobj, dev_name(dev)); > - sysfs_remove_files(&dev->kobj, mdev_device_attrs); > } Ok, I agree this is good practice, but what qualifies a "Fixes:" tag here? The fixes reference is incorrect in any case, 6a62c1dfb5c7 changed the creation ordering and didn't update the remove ordering to match, but I still don't see an actual problem with the remove ordering that necessitates the tag. Please clarify. Thanks, Alex