From patchwork Tue Feb 20 14:25:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 128904 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4695060ljc; Tue, 20 Feb 2018 06:25:37 -0800 (PST) X-Google-Smtp-Source: AH8x225IwhlvCgCxdZdC2Yj0IBFPe5RMLdATSv7rJZboGUtkSkhqyRA1z/wSloqmfrRj3WDfSMbN X-Received: by 10.223.165.67 with SMTP id j3mr3107721wrb.271.1519136737008; Tue, 20 Feb 2018 06:25:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519136737; cv=none; d=google.com; s=arc-20160816; b=L/ac4pM0wfP4SE65BzZCAet7gJlGqEDhJrsRv5641nN2NbwkNJbgFhn3Jd0lbzy29S SMC/cqHDv5Z1zhmuXWoROXzmDNNqgBKGkO7xshlmn2ePVStU2jeo0HHw+uLKhkwOcyMN A9kLk0fHQH7f865TBBMC5a3RzefRWsWZthILi5ky4/IWl1IjPmz+oXErENZifBkB+VyC jVV8jN10PAyHLrPilruGR1dvghMIHd6jM4qEsFcnZeDNgvkt5Fer3uq2L9QFLspm7Pej F6MHAzYdIEQFJUuMH2VTgtgqt2xPfCS9i4h9rxlgPV44ehR4KkPZ/fXkLYcQp6EiPn6g SH0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=g7DwnC+rTxQmI9E/l39O6+KtIYhUK7uDSgI7awHddlc=; b=Z7DQ6AF/KyCrW497qZSu/Cq/58vJo1c7vsfIFb+clEbbL8hd6REhCUa+GpbkEBiiuQ qHKEdHJ1C2EZVqnrPljTKBAA11x/4Jo0kk+MWCsQtCylIWfIvHK1RD3X2S6p8RnWaPw/ EGHMtSpr/Rp7Ej0Rg05WJCKHzak32GLA5fk8mtZtB/DSQfXni9waTuFePujf+AQF0ZO6 G0dS+6hDDyn+1XVH8qCjcfekjuTjs73oYTSz5k35BsBqIoDF8pB0fCuvCNoDweHVQc0/ RCjWCN63kUIEZMtJ+kDTLIUTZqHt6HbWklOT+sTyLWynowQvlA3ObWBMjBGXaeMH5Cjc 1R9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=B87wpn7x; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id 19si4252345wrv.436.2018.02.20.06.25.36; Tue, 20 Feb 2018 06:25:36 -0800 (PST) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=B87wpn7x; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B3484267505; Tue, 20 Feb 2018 15:25:35 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3F79C267510; Tue, 20 Feb 2018 15:25:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 35088267502 for ; Tue, 20 Feb 2018 15:25:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=0kU6+cdVM2bbOPBoshkjxqKNWtUndUxyhoY0ZXouZEw=; b=B87wpn7xeeHN WWG3llcLqvLRdIOFDeoM8MQD2Y6K+D6DbiGEZ+aUSoKwEhypRhSbP/9NLtd3T+m1bExgdFC9VFrMz e8Xn8vXaIUYYrqHBuzACu3XTsRc536aqqn5uxmL5HVeUndCVQu3uaDUZ7vEeHI6cqCbstHx2ZJyhr LIKaI=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eo8rH-0005NC-ES; Tue, 20 Feb 2018 14:25:27 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1eo8rG-0000Tm-PS; Tue, 20 Feb 2018 14:25:26 +0000 From: Mark Brown To: Peter Ujfalusi In-Reply-To: <20180220141905.20778-1-peter.ujfalusi@ti.com> Message-Id: Date: Tue, 20 Feb 2018 14:25:26 +0000 Cc: alsa-devel@alsa-project.org, kuninori.morimoto.gx@renesas.com, arnaud.pouliquen@st.com, Liam Girdwood , Jyri Sarha , Mark Brown Subject: [alsa-devel] Applied "ASoC: hdmi-codec: Fix module unloading caused kernel crash" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: hdmi-codec: Fix module unloading caused kernel crash has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 5e558f8afaec8957932b1dbe5aeff800f9fc6957 Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Tue, 20 Feb 2018 16:19:05 +0200 Subject: [PATCH] ASoC: hdmi-codec: Fix module unloading caused kernel crash The hcp->chmap_info must not be freed up in the hdmi_codec_remove() function as it leads to kernel crash due ALSA core's pcm_chmap_ctl_private_free() is trying to free it up again when the card destroyed via snd_card_free. Commit cd6111b26280a ("ASoC: hdmi-codec: add channel mapping control") should not have added the kfree(hcp->chmap_info); to the hdmi_codec_remove function. Signed-off-by: Peter Ujfalusi Reviewed-by: Jyri Sarha Tested-by: Jyri Sarha Signed-off-by: Mark Brown --- sound/soc/codecs/hdmi-codec.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.16.1 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 5672e516bec3..c1830ccd3bb8 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -798,12 +798,7 @@ static int hdmi_codec_probe(struct platform_device *pdev) static int hdmi_codec_remove(struct platform_device *pdev) { - struct device *dev = &pdev->dev; - struct hdmi_codec_priv *hcp; - - hcp = dev_get_drvdata(dev); - kfree(hcp->chmap_info); - snd_soc_unregister_codec(dev); + snd_soc_unregister_codec(&pdev->dev); return 0; }