Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5854281ybi; Wed, 12 Jun 2019 09:33:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyR51tmaM5b/cgFV7vvg2guHzmorv0gw8Sk1TLoAm7OWQePGoHfX4SAS1d9c1JQE1AT9gHN X-Received: by 2002:a17:90a:a008:: with SMTP id q8mr87665pjp.114.1560357238081; Wed, 12 Jun 2019 09:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560357238; cv=none; d=google.com; s=arc-20160816; b=f9rBU0UbRGAf7OR5w7+ZzjYmGQHHOMi258+05lmHaPawwoo2D45uuUmGqsWT5I6FSt QvYhQVF6TpDo+LsqLFzkcqWouzVNvFmPV49qd9MSP/I/FRSy2qB3tzC3cWCjeC5Zm1H/ O1sFsr4k8pteyvGWDE/zOu8Hr1VDbI3HPIOSTycHjpYK0/EEluVlg0/3F03tJZtOKY8y JubzjwBSOcaCVFXd5yczH/s9/Y8y7CnqmXk1bCr7LAV8FrqBo9lUr0cRsIxsCQYHzomO Eb1QQN5/IEqAkzehd5QX6Opc22Ya/PsJQge0zJl7X866DNxSJe3xQUSzp7OgENmpKGrc DxUw== 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=e1gQZsSmJoS1XrvesbdF6nzQ5f0zcohrkMAH8NTq39Q=; b=TnlhpsA1yDJd5Q/uhxc/xnxK9q/Ynpyqyt04xyffDF9mAvq8m5m7/TSuWWsG40KtZ9 shdKCbrgPfKoVAZns53h2xhSqdvHWFtbUzkQjD08ZdYaIMarsd7olxDKPfHikClZTA+2 5DOOFTO4BzC0NlfrWmGNQWdtLy2XmsRloNmHxeUH5lnEL8O2tOD/YTS5kKlKhSwgukLT opG1WS4s17ZHXZscgdnoOHnbLJjZKppuzqGjCZ1YI0q1FzBLHrLcWWiTE86U/mkF3RgM M2GO/3ncNrfBQvK39e0KLoZlTCTtTsy0bRgthIPUmEtLohqN0mBjd9/NGEnG1WYkWmXh Wa2g== 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 k9si244859pfh.56.2019.06.12.09.33.08; Wed, 12 Jun 2019 09:33:58 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408980AbfFLLMM (ORCPT + 99 others); Wed, 12 Jun 2019 07:12:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:55642 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2408962AbfFLLMM (ORCPT ); Wed, 12 Jun 2019 07:12:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 04579B019; Wed, 12 Jun 2019 11:12:10 +0000 (UTC) Date: Wed, 12 Jun 2019 13:12:10 +0200 (CEST) From: Miroslav Benes To: YueHaibing cc: jeyu@kernel.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4] kernel/module: Fix mem leak in module_add_modinfo_attrs In-Reply-To: <20190611150007.21064-1-yuehaibing@huawei.com> Message-ID: References: <20190603144554.18168-1-yuehaibing@huawei.com> <20190611150007.21064-1-yuehaibing@huawei.com> 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 Tue, 11 Jun 2019, YueHaibing wrote: > In module_add_modinfo_attrs if sysfs_create_file > fails, we forget to free allocated modinfo_attrs > and roll back the sysfs files. > > Fixes: 03e88ae1b13d ("[PATCH] fix module sysfs files reference counting") > Signed-off-by: YueHaibing Reviewed-by: Miroslav Benes Miroslav