Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3456264ybl; Tue, 21 Jan 2020 00:50:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwCLY2cXz2Z3sMQZ1x3EGZQvJirK3AyluT93wIOjlsh8rNqVmxpi/jiAIRqzGsPbSo5Q87Y X-Received: by 2002:aca:5e02:: with SMTP id s2mr2150811oib.80.1579596626984; Tue, 21 Jan 2020 00:50:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579596626; cv=none; d=google.com; s=arc-20160816; b=Rt4Kx7Odi3ab2gqnN/VFs7gX67CUAjsA6QkIJBaj9M2TKpzG0eDxFOqD9Wb9uHwrYZ vDGba72hCfUzEpXb1/bmdT++HpRcarWb1qSPWbo/vn+x+WcL+GUi3Hu1UZyWGEU4YAkA gyH9CcFi0VY0731Q+IQ8VFFNe0Fyh9VjpvJQ/3ZBjdiXj/acuEHJYSxorBK5Q5NUkZt5 3xbK6NN8RibQewOHUrGuCIZFitLY61tSbC1aCU0cq0mh6v3PxGf3neIfDZcn5l0PEA66 CYzLtcqLTuWLE1U6ZAeRCGLfb7TBufEmVwLkpQKUG0KtP7P8d3df2wetzd8EyDqQOYn2 FFFg== 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=DJSyOs52eNVSYTjAHyLmd3vu6c3t+wDc4mZcbjSd0C8=; b=SQ7890Vq3m4YtQS9/NHEfzc72xk3NxQx50QBLA0xta04sROXOcCfyNIFAJIh+nKugg gkqxY13pKfPl1mqJjdalWijdoeC0a24gUFQMc1cbgHvTNWBu+SSaVvHnhCdAEzteXo1C YotEGKFzYiaN+3uyDVLngsTKuNLhf2qUmBZPlmI32fJ9e19iBOo1424NrjBRmShi3O8P VtOuPsMSN3sL/NzldIXZlRvTS4k/hRSUMPP/oUWOu3905fqXUS/wAGtCQ1K73lXGCSBT vFlavG1OqUPCy9yO4go6NmtVirJXv7Ey6PPv8H1EqHwPJY+w5OZCcI4lL3/72bfz4M76 ntpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Gs46cBii; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si20905544ote.187.2020.01.21.00.50.14; Tue, 21 Jan 2020 00:50:26 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Gs46cBii; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729044AbgAUItG (ORCPT + 99 others); Tue, 21 Jan 2020 03:49:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:44492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728977AbgAUItF (ORCPT ); Tue, 21 Jan 2020 03:49:05 -0500 Received: from linux-8ccs (x59cc89bf.dyn.telefonica.de [89.204.137.191]) (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 BBA9E22522; Tue, 21 Jan 2020 08:49:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579596544; bh=DJSyOs52eNVSYTjAHyLmd3vu6c3t+wDc4mZcbjSd0C8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gs46cBiiSiLl+w1Vc4ZFQSgHUJr3PvI2NUS8MrrwU3Lf7iea4enV7KRhQAm0NhrE4 CODrEvpXvoEbzDu1empanyCiEYRRLu3IgMW9LXpFYC0LA7tAnX5575lO5JjYKjaC3w CcGuoNjLIj8d8PAsYW7kYxoC4vIjpA0ySipXBlig= Date: Tue, 21 Jan 2020 09:48:58 +0100 From: Jessica Yu To: Miroslav Benes 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 Message-ID: <20200121084858.GA17071@linux-8ccs> References: <20200117145306.15509-1-jeyu@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-OS: Linux linux-8ccs 4.12.14-lp150.12.61-default x86_64 User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Miroslav Benes [20/01/20 16:57 +0100]: >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 Applied, thanks! Jessica