Return-Path: Received: from mail-sn1nam01on0132.outbound.protection.outlook.com ([104.47.32.132]:57184 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752689AbeARVG3 (ORCPT ); Thu, 18 Jan 2018 16:06:29 -0500 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Suzuki K Poulose , Will Deacon , Sasha Levin Subject: [added to the 4.1 stable tree] arm-ccn: perf: Prevent module unload while PMU is in use Date: Thu, 18 Jan 2018 21:01:46 +0000 Message-ID: <20180118205908.3220-265-alexander.levin@microsoft.com> References: <20180118205908.3220-1-alexander.levin@microsoft.com> In-Reply-To: <20180118205908.3220-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Suzuki K Poulose This patch has been added to the stable tree. If you have any objections, please let us know. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [ Upstream commit c7f5828bf77dcbd61d51f4736c1d5aa35663fbb4 ] When the PMU driver is built as a module, the perf expects the pmu->module to be valid, so that the driver is prevented from being unloaded while it is in use. Fix the CCN pmu driver to fill in this field. Fixes: a33b0daab73a0 ("bus: ARM CCN PMU driver") Cc: Pawel Moll Cc: Will Deacon Acked-by: Mark Rutland Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- drivers/bus/arm-ccn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/arm-ccn.c b/drivers/bus/arm-ccn.c index 4d523cfe51ce..31342fccd290 100644 --- a/drivers/bus/arm-ccn.c +++ b/drivers/bus/arm-ccn.c @@ -1157,6 +1157,7 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn) =20 /* Perf driver registration */ ccn->dt.pmu =3D (struct pmu) { + .module =3D THIS_MODULE, .attr_groups =3D arm_ccn_pmu_attr_groups, .task_ctx_nr =3D perf_invalid_context, .event_init =3D arm_ccn_pmu_event_init, --=20 2.11.0