Re: lockdep splat from ioctl and mmap fops sharing lock

Stefan Richter
2008-10-25T09:13:45Z

> Stefan Richter <stefanr@s5r6.in-berlin.de> writes:
>
>> Johannes Weiner wrote:
>>> raw1394_ioctl() doing usercopy under fi->state_mutex
>>> raw1394_mmap() taking fi->state_mutex under mmap_sem
...
>> 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.

Thanks for the report and explanation. I logged this as
http://bugzilla.kernel.org/show_bug.cgi?id=11823 (dv1394, won't fix) and
http://bugzilla.kernel.org/show_bug.cgi?id=11824 (raw1394, to be fixed
in the 2.6.28-rc timeframe since it is a post 2.6.27 regression).
--
Stefan Richter
-=====-==--- =-=- ==--=