Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751799AbdLLBZf (ORCPT ); Mon, 11 Dec 2017 20:25:35 -0500 Received: from m12-16.163.com ([220.181.12.16]:32945 "EHLO m12-16.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751434AbdLLBZe (ORCPT ); Mon, 11 Dec 2017 20:25:34 -0500 To: krzk@kernel.org, sbkim73@samsung.com, s.nawrocki@samsung.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, Linux Kernel Mailing List From: Jia-Ju Bai Subject: [BUG] sound/soc/samsung: a possible sleep-in-atomic bugs in s3c_pcm_hw_params Message-ID: Date: Tue, 12 Dec 2017 09:24:34 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-CM-TRANSID: EMCowADnHUvZLy9a5ClIDQ--.33664S2 X-Coremail-Antispam: 1Uf129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UbIYCTnIWIevJa73UjIFyTuYvjxUkO6JUUUUU X-Originating-IP: [166.111.70.3] X-CM-SenderInfo: xedlyx5dmximizq6il2tof0z/1tbiGBqselXlcxJtaAAAsA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 408 Lines: 16 According to sound/soc/samsung/pcm.c, the kernel module may sleep under a spinlock. The function call path is: s3c_pcm_hw_params (acquire the spinlock) clk_get_rate clk_core_get_rate clk_prepare_lock mutex_lock --> may sleep I do not find a good way to fix it, so I only report. This possible bug is found by my static analysis tool (DSAC) and my code review. Thanks, Jia-Ju Bai