Re: global mutex in dvb_usercopy (dvbdev.c)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 08, 2013 at 12:05:47PM +0530, Soby Mathew wrote:
> Hi Everyone,
>     I have a doubt regarding about the global mutex lock in
> dvb_usercopy(drivers/media/dvb-core/dvbdev.c, line 382) .
> 
> 
> /* call driver */
> mutex_lock(&dvbdev_mutex);
> if ((err = func(file, cmd, parg)) == -ENOIOCTLCMD)
> err = -EINVAL;
> mutex_unlock(&dvbdev_mutex);
> 
> 
> Why is this mutex needed? When I check similar functions like
> video_usercopy, this kind of global locking is not present when func()
> is called.

I cannot say anything about video_usercopy(), but as it happens, there's
a patch[1] queued for Linux 3.9 that will hopefully replace the mutex in
dvb_usercopy() with more fine-grained locking.

Nikolaus

[1] http://git.linuxtv.org/media_tree.git/commit/30ad64b8ac539459f8975aa186421ef3db0bb5cb
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux