[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8763njjmqt.fsf@saeurebad.de>
Date: Thu, 23 Oct 2008 18:32:26 +0200
From: Johannes Weiner <hannes@...urebad.de>
To: Stefan Richter <stefanr@...6.in-berlin.de>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrea Righi <righi.andrea@...il.com>,
Dave Jones <davej@...hat.com>, Dave Airlie <airlied@...hat.com>
Subject: Re: lockdep splat from ioctl and mmap fops sharing lock
Stefan Richter <stefanr@...6.in-berlin.de> writes:
> Johannes Weiner wrote:
>> raw1394_ioctl() doing usercopy under fi->state_mutex
>> raw1394_mmap() taking fi->state_mutex under mmap_sem
>
> The state_mutex in raw1394 however was introduced by me in patches
> written against 2.6.26 and 2.6.27-rcs. And I tested the ioctls and I'd
> like to think that I also tested mmaps. But maybe I didn't. Of course
> I ahve all sorts of lockdep options enabled.
>
> So, was the usage of mmap_sem changed after 2.6.27 or were my tests
> insufficient?
In linux-next/-mm, copy_to/from_user have lockdep annotations telling
that they might fault and therefor acquire the mmap_sem in #PF.
But since faults on ioctl parameters are so rare, without these
annotations you would probably never see a warning.
Hannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists