Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2709681ybl; Mon, 20 Jan 2020 07:58:36 -0800 (PST) X-Google-Smtp-Source: APXvYqw49lKs4cV7b80qWt1IkGS9gDuC8DjfHajDznm0QcB6QO+7u7r8N69IGAijko2al8MgTsE2 X-Received: by 2002:a05:6830:155a:: with SMTP id l26mr21933otp.339.1579535916648; Mon, 20 Jan 2020 07:58:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579535916; cv=none; d=google.com; s=arc-20160816; b=ufGIETTWVwYOXZDAae0e9XnSY1lFDszSDEUymmTVlwVPHEKbAvNiD0Chek0pkKONd8 XW4hwetjRyK8qZUk80b09H3eZVY7EkCFitCHoj2MFVJco9Vj5vynhSxjOqSUDjqCwmr/ u5kSyYJGCyiNf4afuBNTNmq8MoQovHQzWUUtLnoJL0hL762LYUrYLPziXked0EzhXU7m C+BWE3mp3bsfhAram47dd/mup9Gxgg/ihCKi8dmgPOa8kIQrxvizQHV+k2oXt/2qCRNX FBRBkzrDl2Dj9fQqYx5Df2cQ2EqNa8V/GQv1VwZRgwTdUcF2huuFXrQVb5ZPcK1Xky2m UPog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=NgdKpvEpNKqi1B5qoN2V9PkDyWE2EE/Ye9RlS5NXmgg=; b=aLXrh3Zrei8EGZo8+FBquMdFL/9eaF4fW3z5PCR6gtgSrC+yqlmFJFwF+Q+jOG5F1U vwmOFXc/bLHiZ4gIssufmP1PmnpjBbEe1OmvQaYbNiEjBicUrSj/yQx/R2GMAs05UUQD fUVNZwAej1H0wiJNOx4ho68zu7GW5TZUe8Gif4mJ6sQ3xxYqNl+26eNkTKo6DJ05vnN+ PLXMsvfJxWNU4F0qybUWhO4idWhMo4YPXTDkcDRKlFjcJ/v1BuM2JqyqBy65PeZS/g2K YwvDGt28HmsPp6+0kd0K59YYbn/mZ/cBKX5TVVGc2fU9zY/J68NG3b5zK82frAroXS4c RrOQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c21si21070976oto.176.2020.01.20.07.58.23; Mon, 20 Jan 2020 07:58:36 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729112AbgATP5U (ORCPT + 99 others); Mon, 20 Jan 2020 10:57:20 -0500 Received: from mx2.suse.de ([195.135.220.15]:53440 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726876AbgATP5U (ORCPT ); Mon, 20 Jan 2020 10:57:20 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2B7AFAC22; Mon, 20 Jan 2020 15:57:19 +0000 (UTC) Date: Mon, 20 Jan 2020 16:57:18 +0100 (CET) From: Miroslav Benes To: Jessica Yu cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] module: avoid setting info->name early in case we can fall back to info->mod->name In-Reply-To: <20200117145306.15509-1-jeyu@kernel.org> Message-ID: References: <20200117145306.15509-1-jeyu@kernel.org> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Jan 2020, Jessica Yu wrote: > In setup_load_info(), info->name (which contains the name of the module, > mostly used for early logging purposes before the module gets set up) > gets unconditionally assigned if .modinfo is missing despite the fact > that there is an if (!info->name) check near the end of the function. > Avoid assigning a placeholder string to info->name if .modinfo doesn't > exist, so that we can fall back to info->mod->name later on. > > Fixes: 5fdc7db6448a ("module: setup load info before module_sig_check()") > Signed-off-by: Jessica Yu Reviewed-by: Miroslav Benes M