[haiku-bugs] Re: [Haiku] #9806: Opening FAT32 partition yields PANIC: double mutex lock

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Sat, 01 Jun 2013 18:58:37 -0000

#9806: Opening FAT32 partition yields PANIC: double mutex lock
--------------------------------+----------------------------
   Reporter:  ttcoder           |      Owner:  nobody
       Type:  bug               |     Status:  new
   Priority:  normal            |  Milestone:  R1
  Component:  File Systems/FAT  |    Version:  R1/Development
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  0                 |   Platform:  All
--------------------------------+----------------------------

Comment (by bonefish):

 The main issue is not so much the double mutex lock. The reason for that
 is the invocation of `dprintf()` with an invalid string pointer, so a page
 fault happens, and the page fault code tries to print some debug output
 (via `dprintf()`), causing the double lock. The bug is in the fat module's
 [http://cgit.haiku-os.org/haiku/tree/src/add-
 ons/kernel/file_systems/fat/dir.c?id=hrev45732#n92 _next_dirent_()]. At a
 quick glance the `filename` variable that is passed points to a buffer
 that hasn't been initialized yet -- that happens later in the function
 when an entry has been found -- so it doesn't make any sense to print it.
 There's a `dprintf()` a few lines earlier with the same issue. What may
 make some sense to print are the information passed to the `DPRINTF()` in
 line 81.

--
Ticket URL: <http://dev.haiku-os.org/ticket/9806#comment:4>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: