bad: scheduling while atomic! (Part Deux)

From: Russell King (rmk@arm.linux.org.uk)
Date: Sun Jun 15 2003 - 10:07:29 EST


Sigh. Another MTD deadlock, and cause of scheduling badness on UP preempt.

David, I think MTD needs an audit to ensure that no further cases exist.

static void cfi_intelext_sync (struct mtd_info *mtd)
{
        for (i=0; !ret && i<cfi->numchips; i++) {
                chip = &cfi->chips[i];

                spin_lock(chip->mutex);
                ret = get_chip(map, chip, chip->start, FL_SYNCING);
...
        }

        /* Unlock the chips again */

        for (i--; i >=0; i--) {
                chip = &cfi->chips[i];

                spin_lock(chip->mutex);
...
                spin_unlock(chip->mutex);
        }
}

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:42 EST