Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5525798ybe; Tue, 17 Sep 2019 09:16:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjfvCMEzrb6wFKOjBwW6GtaZVNOycJHMY2rNaQstOl/ThLvmnek+wOxUbzPw58JZsJuGhM X-Received: by 2002:aa7:dac5:: with SMTP id x5mr5607902eds.290.1568736964575; Tue, 17 Sep 2019 09:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568736964; cv=none; d=google.com; s=arc-20160816; b=q1E0hzO16WZ5NA6l6VQZ39EpCcN7eCUcwPBLA1J5Uwc4kurXIwzcUdC4oobbd/MsI8 Kh5ovDwyy9ZZGZo/s3uD4ulzIz7HUn9qTYbjGfUZbq/KxPzqUO6wg1V6Adclby5pjb79 lt1lNg3IHRVcVueTolIlDU+Njn3B0YTSO4w5staHJnvJyhAD4KCpETpNTt15qlq46U3j pcf2k4mCZ17BwgIYU4XM8ZB49uVGb5T9pFWWio6Nkph6t0AH7UTT1thOvyT/sppjh+iX 4z82A90dzQ7Cw0uQ1Mc0+cLUJaeJTzdtsIm8ynC9XN0poAnFBfYJ4ynG607lQFn5z0SI udGA== 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=GTXpm+oIQ7TFOIOQhhaUzchACjsR4eeFZkpmb8C0oZw=; b=eBQE7Xz6DoiJRMxU/J6snJidpSkrzXXFRPDgKGGJHRuM+fJIYkg9PTGtyAsrLdZ9Nh q4/lnFfYnGVpguEBJ/dk+NfczC5qwDuXL7um2blyzgiQmCxdo8ovKXIiBrupkUbgBsKE nwu34FyjYrRRpL+pjad3JfjBp6xnWtIJEkQq44vTMlCArEPKqWeBrGsTgeohbvZ737oZ MhT9UlkHUPU6EY6hwrfX/S8qVSykLhn9pEuZVHgRxk/HedD7j+WOo7MHJ/V4MD5cpOn4 /4lujYnAZl459M7eDIvYW9IBHWPSp1jr/+Fajdpcd8HylNqjJk7y7wv0ap0m6jR1HTAD L8jA== 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 e47si1694983ede.325.2019.09.17.09.15.40; Tue, 17 Sep 2019 09:16:04 -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 S1726847AbfIQKEa (ORCPT + 99 others); Tue, 17 Sep 2019 06:04:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48272 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726482AbfIQKE3 (ORCPT ); Tue, 17 Sep 2019 06:04:29 -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 87BE910F2E8A; Tue, 17 Sep 2019 10:04:29 +0000 (UTC) Received: from gondolin (dhcp-192-230.str.redhat.com [10.33.192.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id E39B860BEC; Tue, 17 Sep 2019 10:04:24 +0000 (UTC) Date: Tue, 17 Sep 2019 12:04:22 +0200 From: Cornelia Huck To: Parav Pandit Cc: alex.williamson@redhat.com, jiri@mellanox.com, kwankhede@nvidia.com, davem@davemloft.net, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v3 2/5] mdev: Make mdev alias unique among all mdevs Message-ID: <20190917120422.4d71e406.cohuck@redhat.com> In-Reply-To: <20190902042436.23294-3-parav@mellanox.com> References: <20190826204119.54386-1-parav@mellanox.com> <20190902042436.23294-1-parav@mellanox.com> <20190902042436.23294-3-parav@mellanox.com> Organization: Red Hat GmbH 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.6.2 (mx1.redhat.com [10.5.110.66]); Tue, 17 Sep 2019 10:04:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 1 Sep 2019 23:24:33 -0500 Parav Pandit wrote: > Mdev alias should be unique among all the mdevs, so that when such alias > is used by the mdev users to derive other objects, there is no > collision in a given system. > > Signed-off-by: Parav Pandit > > --- > Changelog: > v2->v3: > - Changed strcmp() ==0 to !strcmp() > v1->v2: > - Moved alias NULL check at beginning > v0->v1: > - Fixed inclusiong of alias for NULL check > - Added ratelimited debug print for sha1 hash collision error > --- > drivers/vfio/mdev/mdev_core.c | 7 +++++++ > 1 file changed, 7 insertions(+) Reviewed-by: Cornelia Huck