Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753063AbdLMODe (ORCPT ); Wed, 13 Dec 2017 09:03:34 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35813 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752175AbdLMODa (ORCPT ); Wed, 13 Dec 2017 09:03:30 -0500 X-Google-Smtp-Source: ACJfBotfOsFpka3HyWwroq3jfcsRoDl7g7WXqS5mu5vbRCFYLrlc1Ywe84P75G1oWFwWtTJPAjWVsw== To: mchehab@kernel.org, bhumirks@gmail.com, hans.verkuil@cisco.com, xyzzy@speakeasy.org Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org From: Jia-Ju Bai Subject: [BUG] cx88: a possible sleep-in-atomic bug in snd_cx88_switch_put Message-ID: <110cb3d4-656b-c5c7-53f7-c3851c56f22f@gmail.com> Date: Wed, 13 Dec 2017 22:03:18 +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: 326 Lines: 13 The driver may sleep under a spinlock. The function call path is: snd_cx88_switch_put (acquire the spinlock) v4l2_ctrl_find 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