From 89bb53cf38e7db693ef1b21e071425cbc2e8b999 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 28 Nov 2013 13:12:14 -0600 Subject: Inode semaphore must be entrant or a deadlock can occur in certain scenarios --- nuttx/ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'nuttx/ChangeLog') diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index e8c812bca..6b8bf1cb9 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -6123,3 +6123,12 @@ src/stm32f429i-disco-internal.h, up_nsh.c, and up_spi.h: Add a configuration and board support for an external SST25 FLASH. From Ken Pettit (2013-11-28). + * fs/fs_inode.c: The inode semaphore must be re-entrant. Here is the + re-entering path that I found: (1) USB host connects to FLASH drive + and creates /dev/sda, (2) /dev/sda is mounted, (3) FLASH drive is + removed but /dev/sda is not destroyed because there is still a\ + reference on the device because of the mount, (4) umount() is called, + taking the inode semaphore, now the driver tries to destroy the block + driver by calling unregister_blockdriver(). But (5) + unregister_blockdriver() also takes the inode semaphore causing a + deadlock if the inode semaphore is not re-entry. (2013-11-28). -- cgit v1.2.3