From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08FC5C4338F for ; Thu, 12 Aug 2021 07:26:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E004760C3F for ; Thu, 12 Aug 2021 07:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234789AbhHLH0r (ORCPT ); Thu, 12 Aug 2021 03:26:47 -0400 Received: from verein.lst.de ([213.95.11.211]:43227 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234586AbhHLH0q (ORCPT ); Thu, 12 Aug 2021 03:26:46 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 754C267373; Thu, 12 Aug 2021 09:26:18 +0200 (CEST) Date: Thu, 12 Aug 2021 09:26:17 +0200 From: Christoph Hellwig To: Alex Williamson Cc: Christoph Hellwig , Diana Craciun , Cornelia Huck , Kirti Wankhede , Eric Auger , Jason Gunthorpe , kvm@vger.kernel.org Subject: Re: [PATCH 05/14] vfio: refactor noiommu group creation Message-ID: <20210812072617.GA28507@lst.de> References: <20210811151500.2744-1-hch@lst.de> <20210811151500.2744-6-hch@lst.de> <20210811160341.573a5b82.alex.williamson@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210811160341.573a5b82.alex.williamson@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Wed, Aug 11, 2021 at 04:03:41PM -0600, Alex Williamson wrote: > > + dev_warn(dev, "Adding kernel taint for vfio-noiommu group on device\n"); > > + return vfio_noiommu_group_alloc(dev); > > Nit, we taint regardless of the success of this function, should we > move the tainting back into the function (using the flags to skip for > mdev in subsequent patches) or swap the order to check the return value > before tainting? Thanks, Does it really matter to have the extra thread if a memory allocation failed when going down this route?