Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751999AbdLLO2C (ORCPT ); Tue, 12 Dec 2017 09:28:02 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:46781 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542AbdLLO2B (ORCPT ); Tue, 12 Dec 2017 09:28:01 -0500 X-Google-Smtp-Source: ACJfBotCSuglCMxcW8Ss9xEner4ZWBvj8Is8FXfbXqUOhFXIgjvCG4vFsMI1of/qFtBp6tShUU11wg== To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, arnaud.pouliquen@st.com, dan.carpenter@oracle.com Cc: alsa-devel@alsa-project.org, Linux Kernel Mailing List From: Jia-Ju Bai Subject: [BUG] soc/sti: a possible sleep-in-atomic bug in uni_player_ctl_iec958_put Message-ID: <425ee21c-b6c2-640b-15fd-6ff84b79a986@gmail.com> Date: Tue, 12 Dec 2017 22:27:47 +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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 394 Lines: 14 According to sound/soc/sti/uniperif_player.c, the driver may sleep under a spinlock. The function call path is: uni_player_ctl_iec958_put (acquire the spinlock) uni_player_set_channel_status 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 checked by my code review. Thanks, Jia-Ju Bai