From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933799AbcBQJla (ORCPT ); Wed, 17 Feb 2016 04:41:30 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:61703 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933384AbcBQJl1 (ORCPT ); Wed, 17 Feb 2016 04:41:27 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Jaroslav Kysela , Mark Brown , David Henningsson , Han Lu , Libin Yang , Thierry Reding Subject: Re: [PATCH] sound: hdmi: avoid dereferencing uninitialized 'jack' pointer Date: Wed, 17 Feb 2016 10:40:41 +0100 Message-ID: <7110505.tMOluD0MjY@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1455634059-1896914-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:AA3qNqPiEWFcf+zt9u7BgzS8Z8b8hucQ6FMghmJHE2uCPsj4+yE IrQXe+7A5M+yJiTchm8rFTq04fwBbksLxe4hrlHF+gYzYind6YceL0pV67JCs/VrW4tQjYl Ri7ohrKNLu2+JVrdrUS/Ionq/qpJFAlu0VCEaCxwAoP49TcCQkpvwzE6e7mfTtELNNS6uws ieGAUMNbEXKKwttEwF5ZQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:t437F9F6QmM=:c784UtZ0WAdQLmyHNv9tqN Ul8Qi8T94ELUtT3pT5Ll8QsRtXCqMqnYDWurgpPBgPrJ58U4Y3buYlSoLi1yZqWrfyFxVlIWn ymBoSfWGFPtSyjqo/DjiMAv2RMd115FJvsZu5uz7XtXmjMTBg+8Hf5rV5XFmKgnEE9EoAuFVt EKImswGZU9xru7Lx3fcJ9AvA5fU0DMZqhhkiIsYdHdK9AaTc9ZV3y2Vx21HDqhR5H/a8pL1lj LKP1QDhps9QUivfImvdTVPktxeBKmVXEvsSrbE2dmhldGHD8t1ONbJFc/v8pa43xuvJ1dmQ1r G+4lAk2NSdgyKWpsmzeZjiXVBIWxMq4dGNT/+dthIqWh1at6pm32H5kLVCzVigb1VpXMMaK/A 53HNe24pErajkZ3ejuIfVaDGHIGf1k+fnn8XlKEauf4Hsf0qp3BenztFRFXOLZw7Dkj9gWcwD Mrwm8Svet3WOs68UWYUG/RpEa7BoOKlupGe4O3EmKdIP1h9npKLjKJXDxCLQY6EsTQXgxdygv lyXXFbkaeD4tqbQEfW81qxT3D6AQQg8C2NaCgMRBZB0tlhcXUZPO3wU/LfA+y5NVwjekjQo0q SWhncH4u1lzclDxrIdj3+Pmksu/d2Wju/W/VDqoUEYuPVMYsxLRMCljA+44kRfBeGjkRRpPAo uWqGinB2IkkEBkYftKJoyXDmIDR+QdX3XCliZS+gKZNiA6XoHvpIJ1ecJD7esnjiG9bqQ9BUr 890m7i7xcdjajbAh Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 17 February 2016 10:35:40 Takashi Iwai wrote: > From: Takashi Iwai > Subject: [PATCH v2] ALSA: jack: Allow building the jack layer without > input device > > Since the recent integration of kctl jack and input jack layers, we > can basically build the jack layer even without input devices. That > is, the jack layer itself can be built with conditional to enable the > input device support or not, while the users may enable always > CONFIG_SND_JACK unconditionally. > > For achieving it, this patch changes the following: > - A new Kconfig, CONFIG_SND_JACK_INPUT_DEV, was introduced to indicate > whether the jack layer supports the input device, > - A few items in snd_jack struct and relevant codes are conditionally > built upon CONFIG_SND_JACK_INPUT_DEV, > - The users of CONFIG_SND_JACK drop the messy dependency on > CONFIG_INPUT. > > This change also automagically fixes a potential bug in HD-audio > driver Arnd reported, where the NULL or uninitialized jack instance is > dereferenced. > > Reported-by: Arnd Bergmann > Signed-off-by: Takashi Iwai > Looks great, that indeed takes care of the issue I reported and makes the code more useful and more robust overall. Acked-by: Arnd Bergmann