From patchwork Tue Feb 22 13:27:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 12755086 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C6008C433EF for ; Tue, 22 Feb 2022 13:30:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Jju7PaQAU/qDW+i1hfjTJWkJCIOrHefYf0OIcCQMv3c=; b=xsB6RiD43zC03m uujkPL06BFX20GgcoB08sMjj+o7VDxzD1er1TBcdffw6H0sXFQ+XUSym/O0LDxMMAymFCqJtJOg2d 68BrQGtr07K1M8oIrNra2qIKAxXNTzoFr92ffaOEe2ihKBAwO4u1kTXylTjgpu3ZbHuGF3NyEcKXJ OpFvitOQZNrEA5lw4HTiHpImWgc631FwapbaS8GEiewlVFhiBgb9d0+ZTN57XD0mp9pkFrxB+7ajl 52QJcjCKoDUSPO6YZLGHV61q249H7uCVG6YsZvcPHlRei//kPznCQ5qJcwWqMBfm3RDbTEGoA9ZFz 6u5vW9lWZM8XhdqREZaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMVEA-009hE9-1u; Tue, 22 Feb 2022 13:29:14 +0000 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMVDk-009h60-JE for linux-arm-kernel@lists.infradead.org; Tue, 22 Feb 2022 13:28:51 +0000 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id BBAE93F1CF for ; Tue, 22 Feb 2022 13:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645536520; bh=syQJnDJvIk7oDut501097JANOAQimJJ8XX+nOUPJjUo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YZdE+DolrREevb0zwGrXXvuBiOo+hE83OFfSoWIpUETtURDN5fn9YhtmQYLtx7f0S pzxgGlJheFXYc7mtNiKR7XBCBnBcWaTOqh2ju09EUWuS2uz+zpPvmgYbeSXQfs0J/1 pohdp6JZKR3UTRK72xk7kmaCzJM0bf48HIFq1y/FsVpIh3RSQis5UlvUKMHPlLJXJP AmBQ/UKs2gwdRD6iU3kro6n38TouxgMM1jzJwggqeuWhASnYS8/+WY4RNRJozo7Zvv +/MdxEDyJNd5hS3oXy3AhvQEPbBeJpduY3MshxO0P6NsmoDf/O3PxosxMaA3WgITgu SZUSLEyWTGqgw== Received: by mail-ed1-f69.google.com with SMTP id r11-20020a508d8b000000b00410a4fa4768so11846938edh.9 for ; Tue, 22 Feb 2022 05:28:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=syQJnDJvIk7oDut501097JANOAQimJJ8XX+nOUPJjUo=; b=w4kVKrEINa9LOAJO+dPSg5xncVvpA262b5Z3kErVTx1v8YhSA9HuzzbuI5YXz3/oiO 8JrAE0jwjEjIaGsEhC1uYGiNGezQt2ZcU3k7SPLyg6fuTtFjlfFhOFXwoj3xPuC8E5ZU VidXFjnv9k3IgbKYBLRxF7xF29vvKlBXVr0CfrMLt6tb78qHZmGRYKSM6pa9gRWXNRiI w3MZjSCi3fcHXjvaKXXvm0MCkW/V7Z49zxib4oCV8KAvPtZmYImQZAbniDXfhwZVnREZ Yfj/Zj0vSCjcTFG7XTmqFHaxN/IHiuWasU08Yo87BFqOZbRgAWEfGfWad3dKI8xDxnX1 fwAQ== X-Gm-Message-State: AOAM533TwYHtnSoDD7jO9jl/NF9txV3lFwLk1fNdQPmAjB0Gz8ee+QNL HqUVvUJ4tUkaH4z5QyxeUse7QZzZWliYmjsRwJUrzai6qakhE/tIfkEQH40pQSPcO0Ac06QIu3x sh1C2lYmHv87hDKlfSDk52Tm6UiBFmmTwNelpeTPxrT1MRMa5yKj6 X-Received: by 2002:a17:906:d935:b0:6cc:fcfc:c286 with SMTP id rn21-20020a170906d93500b006ccfcfcc286mr19267952ejb.423.1645536520190; Tue, 22 Feb 2022 05:28:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyrFfwlMx3wyhaWOiWMYUuCZ2Sd0V6lJlo9wHP9II92B5eFvZo3+bHsg4+GgnT5+leTtK+fA== X-Received: by 2002:a17:906:d935:b0:6cc:fcfc:c286 with SMTP id rn21-20020a170906d93500b006ccfcfcc286mr19267945ejb.423.1645536520030; Tue, 22 Feb 2022 05:28:40 -0800 (PST) Received: from localhost.localdomain (xdsl-188-155-181-108.adslplus.ch. [188.155.181.108]) by smtp.gmail.com with ESMTPSA id c5sm10029875edk.43.2022.02.22.05.28.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 05:28:39 -0800 (PST) From: Krzysztof Kozlowski To: Abel Vesa , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Bjorn Andersson , Mathieu Poirier , Andy Gross , Srinivas Kandagatla , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 0/3] Fix kfree() of const memory on setting driver_override Date: Tue, 22 Feb 2022 14:27:04 +0100 Message-Id: <20220222132707.266883-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220222_052848_787367_43F2954E X-CRM114-Status: GOOD ( 10.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Drivers still seem to use driver_override incorrectly. Perhaps my old patch makes sense now? https://lore.kernel.org/all/1550484960-2392-3-git-send-email-krzk@kernel.org/ Not tested - please review and test (e.g. by writing to dirver_override sysfs entry with KASAN enabled). Dependencies ============ Patches are independent. Best regards, Krzysztof Krzysztof Kozlowski (3): clk: imx: scu: fix kfree() of const memory on setting driver_override slimbus: qcom-ngd: fix kfree() of const memory on setting driver_override rpmsg: fix kfree() of const memory on setting driver_override drivers/clk/imx/clk-scu.c | 6 +++++- drivers/rpmsg/rpmsg_internal.h | 12 ++++++++++-- drivers/rpmsg/rpmsg_ns.c | 13 +++++++++++-- drivers/slimbus/qcom-ngd-ctrl.c | 9 ++++++++- 4 files changed, 34 insertions(+), 6 deletions(-)