lkml.org 
[lkml]   [2006]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.17-rc6-mm1/pktcdvd - BUG: possible circular locking
On Mon, Jun 12 2006, Arjan van de Ven wrote:
> Laurent Riffard wrote:
> >Hello,
> >
> >This BUG happened while pktcdvd service was starting.
> >Basically, the 2 following commands were issued:
> >- modprobe ptkcdvd
> >- pktsetup dvd /dev/dvd
>
> This appears to be a real bug:
>
> A normal pkt dvd block dev open takes the
> bdev_mutex in the regular block device open path, which takes
> ctl_mutex in the pkt_open function which gets called then from
> the block layer.
>
> HOWEVER the IOCTL path does it the other way around:
>
> mutex_lock(&ctl_mutex);
> ret = pkt_setup_dev(&ctrl_cmd);
> mutex_unlock(&ctl_mutex);
>
> where pkt_setup_dev in term calls pkt_new_dev which
> calls blkdev_get(), which takes the bdev_mutex.
>
> Looks very much like a AB-BA deadlock to me...

I'd say you are right, however I haven't touched that code since 2.5 I
think - CC'ing Peter for a fix!

--
Jens Axboe

-
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/

\
 
 \ /
  Last update: 2006-06-12 18:44    [W:0.090 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site