Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752566AbdLLQN6 (ORCPT ); Tue, 12 Dec 2017 11:13:58 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:19958 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752258AbdLLQN5 (ORCPT ); Tue, 12 Dec 2017 11:13:57 -0500 Subject: Re: [BUG] soc/sti: a possible sleep-in-atomic bug in uni_player_ctl_iec958_put To: Jia-Ju Bai , , , , , CC: , Linux Kernel Mailing List References: <425ee21c-b6c2-640b-15fd-6ff84b79a986@gmail.com> From: Arnaud Pouliquen Message-ID: <26c49bcf-65d9-f7d7-d281-a1cb0f978ebb@st.com> Date: Tue, 12 Dec 2017 17:11:56 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <425ee21c-b6c2-640b-15fd-6ff84b79a986@gmail.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG3NODE1.st.com (10.75.127.7) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-12-12_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 579 Lines: 24 Hello Jia-Ju, On 12/12/2017 03:27 PM, Jia-Ju Bai wrote: > 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. you right, mutex under spin lock is not recommended... I will have a look Thanks! Regards Arnaud > > > Thanks, > Jia-Ju Bai