Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4831016img; Tue, 26 Mar 2019 18:27:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjTJN2zKAUh1u2auWG6ZqHHAGD7Y9anEz4RBenmIC2pUzLce3AFslxJ1gqSMl5mHYDpja5 X-Received: by 2002:a17:902:be09:: with SMTP id r9mr34178199pls.189.1553650021619; Tue, 26 Mar 2019 18:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553650021; cv=none; d=google.com; s=arc-20160816; b=y9C/EwdoE/rQm3DClesTt/mS1AwA+PR/a3VGS8mipkchLGk0kxozXyRIfq8TF92Pat I+ruXHGbkHBS3jcqoo1tGY6pMcBo17dWMJ2s/AxgjwwoxsrVbdqK722O/ZMZVbcatvMd rq6Ji/9++bNHK+eKEiRwATf+VUti2V69QPE34tqDc5UZKeIxsYuH9BhM3abrYOovZrD7 xjuWSt8Z6oTcYc8cVn+30BGMSI93bdow1dzgr3b9akHK5NSQNevyNkz5+AgGXdqhKNvO iqE9ofgY7nyAwdieBvSNQvsOWRD+Cmh8aWpFbI/L95dsW8pWM5/5LdobgeK26DLvO1E1 wOIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sBlF2H3A0IRtfESe6vvsqxCdzwnFJhOehohTiGUh650=; b=PpGD0Ds8zDc04q+vf0HJUtYr3r24/VC5A6VI/Y/51mw2Jb/l36WUggI+jdLqEHbAUA ob946KGdKWUGlrg3ETBdMnkhEq8Uh0WOx3gq9/2QJhSyemZiN8yQGxsYfNbxNVIf2+Yh 8oWYVdlfQp9sAUrIrgdDZoyp2jTmumX0dpAQCnJzuIpWeKr5Mcz3bQz7qjjpBPB+Zfgn AUBeMUZxc+vl3fT/2oinu8LyAj5yLjaW3oQlmu9+3QLhZ4J8hpcqYZqHCnUO4ARXZnwo GqfSl0c6K9OveD7+u6qU88x4jkvD0a0d36rioeYwO0AMFvvbO3wIQCYSP4N6EStI4cYu Zvqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fK5DYAxH; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u26si12816273pfh.15.2019.03.26.18.26.43; Tue, 26 Mar 2019 18:27:01 -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; dkim=pass header.i=@kernel.org header.s=default header.b=fK5DYAxH; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732117AbfC0B0G (ORCPT + 99 others); Tue, 26 Mar 2019 21:26:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:34972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbfC0B0G (ORCPT ); Tue, 26 Mar 2019 21:26:06 -0400 Received: from localhost (mobile-166-137-177-030.mycingular.net [166.137.177.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 88DBA2075E; Wed, 27 Mar 2019 01:26:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553649965; bh=RVeyg6DNUR+HpppdhLbupgpC87HzZUd2VQtAD3qicHw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fK5DYAxHynuEk+3IZ4FBoAkLRTUnVZf6iLJXhZfT1mOxKaLkXyzpHHDm1D8Qkab3k SknSo9N88ZdrKi3TFoPmqYQ8RMETsFKS0dNIe1VVlXcwJuxIKiByYJPdPaUYIJFmL0 QKYYkQclgKnlNAOkS00cqvO1AHcVd4nRFY99QzH4= Date: Wed, 27 Mar 2019 10:26:00 +0900 From: Greg Kroah-Hartman To: Laura Abbott Cc: linux-kernel@vger.kernel.org, Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , Kalle Valo , linux-wireless@vger.kernel.org Subject: Re: [PATCH] iwlwifi: mvm: no need to check return value of debugfs_create functions Message-ID: <20190327012600.GA3649@kroah.com> References: <20190122152151.16139-24-gregkh@linuxfoundation.org> <03bb68be-8e42-a463-2d57-3be051dc2016@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <03bb68be-8e42-a463-2d57-3be051dc2016@redhat.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 04:55:54PM -0700, Laura Abbott wrote: > On 1/22/19 7:21 AM, Greg Kroah-Hartman wrote: > > diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c > > index 33b0af24a537..c52cdc538678 100644 > > --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c > > +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c > > @@ -1446,9 +1446,8 @@ static ssize_t iwl_dbgfs_quota_min_read(struct file *file, > > #define MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz) \ > > _MVM_DEBUGFS_READ_WRITE_FILE_OPS(name, bufsz, struct ieee80211_vif) > > #define MVM_DEBUGFS_ADD_FILE_VIF(name, parent, mode) do { \ > > - if (!debugfs_create_file(#name, mode, parent, vif, \ > > - &iwl_dbgfs_##name##_ops)) \ > > - goto err; \ > > + debugfs_create_file(#name, mode, parent, vif, \ > > + &iwl_dbgfs_##name##_ops); \ > > } while (0) > > MVM_DEBUGFS_READ_FILE_OPS(mac_params); > > @@ -1483,12 +1482,6 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) > > mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir); > > - if (!mvmvif->dbgfs_dir) { > > - IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n", > > - dbgfs_dir); > > - return; > > - } > > - > > if (iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM && > > ((vif->type == NL80211_IFTYPE_STATION && !vif->p2p) || > > (vif->type == NL80211_IFTYPE_STATION && vif->p2p))) > > @@ -1537,12 +1530,6 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) > > mvmvif->dbgfs_slink = debugfs_create_symlink(dbgfs_dir->d_name.name, > > mvm->debugfs_dir, buf); > > - if (!mvmvif->dbgfs_slink) > > - IWL_ERR(mvm, "Can't create debugfs symbolic link under %pd\n", > > - dbgfs_dir); > > - return; > > -err: > > - IWL_ERR(mvm, "Can't create debugfs entity\n"); > > } > > Fedora got a bug report https://bugzilla.redhat.com/show_bug.cgi?id=1691034 > of a crash with 5.0 and the user did a bisect which pointed to ff9fb72bc077 > ("debugfs: return error values, not NULL") because the error checking is > no longer correct in this driver. > > Based on https://patchwork.kernel.org/patch/10865839/, it looks like > this is supposed to go in for 5.2 but this needs to go in now as > the error checking is currently broken without it. Can this get queued > for Linus so we can get it in 5.0 stable? That's odd, I can't see how the error checking is wrong here. If the directory is not created, an error will be returned, which should be able to be handled by debugfs_create_file(). So with this patch does the error go away? strange, greg k-h