linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* global mutex in dvb_usercopy (dvbdev.c)
@ 2013-01-08  6:35 Soby Mathew
  2013-01-09 21:30 ` Nikolaus Schulz
  0 siblings, 1 reply; 5+ messages in thread
From: Soby Mathew @ 2013-01-08  6:35 UTC (permalink / raw)
  To: linux-media

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.

This global lock will prevent any other ioctl call from being executed
unless the previous blocking ioctl call has returned. If we need to
have a lock why not make it file handle specific ?


Thanks for your help.

Best Regards
Soby Mathew

Best Regards

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-11  1:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08  6:35 global mutex in dvb_usercopy (dvbdev.c) Soby Mathew
2013-01-09 21:30 ` Nikolaus Schulz
2013-01-10  2:06   ` thomas schorpp
2013-01-10 14:25     ` Mauro Carvalho Chehab
2013-01-11  1:26       ` thomas schorpp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).