From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jia-Ju Bai Subject: [BUG] drivers/spi: a possible sleep-in-atomic bug in atmel_spi_remove Date: Tue, 12 Dec 2017 15:30:01 +0800 Message-ID: <229fd3a0-b88e-5b86-e26e-ec6b79d37a2c@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Linux Kernel Mailing List To: nicolas.ferre-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org, broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Return-path: Content-Language: en-US Sender: linux-spi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: According to drivers/spi/spi-atmel.c, the kernel module may sleep under a spinlock. The function call path is: atmel_spi_remove (acquire the spinlock) atmel_spi_release_dma dma_release_channel 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 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html