From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from residential.serv1.aus.datafoundry.com ([209.99.125.29]) by bombadil.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id 1IyCwJ-0001B5-P2 for linux-mtd@lists.infradead.org; Fri, 30 Nov 2007 20:58:30 +0000 Message-ID: <1196456294.47507966462cb@webmail.texas.net> Date: Fri, 30 Nov 2007 14:58:14 -0600 From: catboat@texas.net To: linux-mtd@lists.infradead.org Subject: dynamic mtd_blktrans_dev not fully init'd under UBI? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi all, I have a UBI system, and I notice this causes a kernel panic. Make a volume that does not previously exist, eg 50: ubimkvol -d0 -n50 -N vol50 -s 640000 cat /dev/mtdblock/vol50 >/dev/null I get a panic in mtdblockd as it handles the block requests generated by cat. In older versions, the struct semaphore of mtd_blktrans_dev is not initialized, so the kernel panics in __down. In the newest git, I see a mutex named "lock" instead, but I don't think it's initialized either. See the function mtdblock_add_mtd() in drivers/mtd/mtdblock.c. The struct mtd_blktrans_dev is just kzalloc'd leaving the mutex lock all zeroes. Can anybody recreate this? Monte Copeland IBM Austin