From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: video4linux-list@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video4linux: Push down the BKL
Date: Mon, 26 May 2008 13:59:51 -0300 [thread overview]
Message-ID: <20080526135951.7989516d@gaivota> (raw)
In-Reply-To: <20080522223700.2f103a14@core>
On Thu, 22 May 2008 22:37:00 +0100
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> For most drivers the generic ioctl handler does the work and we update it
> and it becomes the unlocked_ioctl method. Older drivers use the usercopy
> method so we make it do the work. Finally there are a few special cases.
I liked the patch also.
Still, it didn't apply cleanly on my -git tree, probably due to some fixes at
cx18 and ivtv (see the attached log). Also, IMO, it would be better if you
split drivers/net/tun.c into a different changeset.
I think you should add a video_ioctl2_unlocked() function, without BKL (and keeping
BKL explicit locks at video_ioctl2). This would help on migrating the drivers
to the unlocked version, since I suspect that most drivers already have enough
locks for the removal of BKL.
I would just implement video_ioctl2 as:
video_ioctl2_locked (...)
{
lock_kernel();
video_ioctl2_unlocked();
unlock_kernel();
}
The next step can be to add the obvious locks inside video_ioctl2_unlocked(). Like, for
example, locking the VIDIOC_S calls, if someone is calling the corresponding
VIDIOC_G or VIDIOC_TRY ones.
Cheers,
Mauro.
---
patching file drivers/media/video/bt8xx/bttv-driver.c
patching file drivers/media/video/bw-qcam.c
patching file drivers/media/video/c-qcam.c
patching file drivers/media/video/cafe_ccic.c
patching file drivers/media/video/cpia.c
patching file drivers/media/video/cpia2/cpia2_v4l.c
patching file drivers/media/video/cx18/cx18-ioctl.c
patching file drivers/media/video/cx18/cx18-ioctl.h
patching file drivers/media/video/cx18/cx18-streams.c
Hunk #1 FAILED at 39.
1 out of 1 hunk FAILED -- saving rejects to file drivers/media/video/cx18/cx18-streams.c.rej
patching file drivers/media/video/cx23885/cx23885-417.c
patching file drivers/media/video/cx23885/cx23885-video.c
patching file drivers/media/video/cx88/cx88-blackbird.c
patching file drivers/media/video/cx88/cx88-video.c
patching file drivers/media/video/dabusb.c
patching file drivers/media/video/em28xx/em28xx-video.c
patching file drivers/media/video/et61x251/et61x251_core.c
patching file drivers/media/video/ivtv/ivtv-ioctl.c
patching file drivers/media/video/ivtv/ivtv-ioctl.h
Hunk #1 FAILED at 24.
1 out of 1 hunk FAILED -- saving rejects to file drivers/media/video/ivtv/ivtv-ioctl.h.rej
patching file drivers/media/video/ivtv/ivtv-streams.c
Hunk #1 FAILED at 48.
Hunk #2 FAILED at 58.
2 out of 2 hunks FAILED -- saving rejects to file drivers/media/video/ivtv/ivtv-streams.c.rej
patching file drivers/media/video/meye.c
patching file drivers/media/video/ov511.c
patching file drivers/media/video/pms.c
patching file drivers/media/video/pvrusb2/pvrusb2-v4l2.c
Hunk #1 succeeded at 861 (offset -1 lines).
Hunk #2 succeeded at 869 (offset -1 lines).
Hunk #3 succeeded at 1153 (offset -1 lines).
patching file drivers/media/video/pwc/pwc-if.c
patching file drivers/media/video/saa5246a.c
patching file drivers/media/video/saa5249.c
patching file drivers/media/video/saa7134/saa7134-empress.c
patching file drivers/media/video/saa7134/saa7134-video.c
patching file drivers/media/video/se401.c
patching file drivers/media/video/sn9c102/sn9c102_core.c
patching file drivers/media/video/soc_camera.c
patching file drivers/media/video/stk-webcam.c
Hunk #1 succeeded at 1320 (offset 7 lines).
patching file drivers/media/video/stradis.c
patching file drivers/media/video/stv680.c
patching file drivers/media/video/usbvideo/usbvideo.c
patching file drivers/media/video/usbvideo/vicam.c
patching file drivers/media/video/usbvision/usbvision-video.c
patching file drivers/media/video/videodev.c
patching file drivers/media/video/vivi.c
patching file drivers/media/video/w9966.c
patching file drivers/media/video/w9968cf.c
patching file drivers/media/video/zc0301/zc0301_core.c
patching file drivers/media/video/zoran_driver.c
patching file drivers/media/video/zr364xx.c
patching file drivers/net/tun.c
patching file include/media/v4l2-dev.h
Hunk #1 succeeded at 343 (offset -1 lines).
Hunk #2 succeeded at 352 (offset -1 lines).
next prev parent reply other threads:[~2008-05-26 17:00 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 21:37 [PATCH] video4linux: Push down the BKL Alan Cox
2008-05-23 2:08 ` Andy Walls
2008-05-23 6:16 ` Hans Verkuil
2008-05-23 6:28 ` Hans Verkuil
2008-05-26 16:39 ` Mauro Carvalho Chehab
2008-05-23 9:09 ` Alan Cox
2008-05-26 16:34 ` Mauro Carvalho Chehab
2008-05-26 16:46 ` Hans Verkuil
2008-05-26 21:14 ` Mauro Carvalho Chehab
2008-05-23 13:56 ` Jonathan Corbet
2008-05-23 15:39 ` Alan Cox
2008-05-23 16:09 ` Jonathan Corbet
2008-05-23 18:58 ` Alan Cox
2008-05-23 19:05 ` Hans Verkuil
2008-05-25 23:46 ` Mike Isely
2008-05-26 16:59 ` Mauro Carvalho Chehab [this message]
2008-05-26 20:23 ` Alan Cox
2008-05-26 21:10 ` Mauro Carvalho Chehab
2008-05-26 22:01 ` Alan Cox
2008-05-27 13:10 ` Mauro Carvalho Chehab
2008-05-27 15:41 ` Jonathan Corbet
2008-05-27 16:31 ` Mauro Carvalho Chehab
2008-05-27 16:37 ` Jonathan Corbet
2008-05-27 18:59 ` Mauro Carvalho Chehab
2008-05-27 19:26 ` Devin Heitmueller
2008-05-27 21:00 ` Mauro Carvalho Chehab
2008-05-27 21:22 ` Devin Heitmueller
2008-05-27 23:48 ` Andy Walls
2008-05-28 0:46 ` Devin Heitmueller
2008-05-28 2:37 ` Andy Walls
2008-05-28 2:47 ` Devin Heitmueller
2008-05-28 8:34 ` Alan Cox
2008-05-28 6:13 ` Hans Verkuil
2008-05-27 19:50 ` Arjan van de Ven
2008-05-27 20:24 ` Mauro Carvalho Chehab
2008-05-27 18:14 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080526135951.7989516d@gaivota \
--to=mchehab@infradead.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox