linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trent Piepho <xyzzy@speakeasy.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	robfitz@273k.net,
	Linux and Kernel Video <video4linux-list@redhat.com>,
	76306.1226@compuserve.com, fork0@t-online.de, greg@kroah.com,
	linux-kernel@vger.kernel.org, rdunlap@xenotime.net,
	v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org>,
	shemminger@osdl.org
Subject: Re: [v4l-dvb-maintainer] Re: [PATCH] V4L: struct video_device corruption
Date: Tue, 25 Jul 2006 01:42:19 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0607250054410.18397@shell3.speakeasy.net> (raw)
In-Reply-To: <20060724200855.603be3bb.akpm@osdl.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 2026 bytes --]

On Mon, 24 Jul 2006, Andrew Morton wrote:
> On Sat, 15 Jul 2006 22:31:04 -0300
> Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>
> > Em Sáb, 2006-07-15 às 23:08 +0000, Robert Fitzsimons escreveu:
> > > The layout of struct video_device would change depending on whether
> > > videodev.h (V4L1) was include or not before v4l2-dev.h, which caused
> > > the structure to get corrupted.
> > Hmm... good point! However, I the proper solution would be to trust on
> > CONFIG_VIDEO_V4L1_COMPAT or CONFIG_VIDEO_V4L1 instead. it makes no sense
> > to keep a pointer to an unsupported callback, when V4L1 is not selected.
> >
>
> So I've lost the plot with all of this.  Does the current git-dvb contain
> the desired fixes?

The problem was that the v4l code in general was not using
CONFIG_VIDEO_V4L1* like it should, but was detecting V4L1 support based on
whether on not the V4L1 header file had been included.

Some drivers didn't depend on V4L1 in Kconfig, and would include the V4L1
header when V4L1 was off.  This caused some code to think V4L1 was off and
some code to think it was on.

This caused a serious bug with inconsistent defintions of struct
video_device, as well as other problems.

I posted a patch that fixed the video_device problem, then Mauro made a
comprehensive patch that incorporated this fix and well as all the other
code that was using V4L1 when it shouldn't.  That patch is in the v4l-dvb
Mercurial repository, but not moved on to git yet.

> Do we expect this will fix the various DVB crashes which people (including
> Alex) have reported?

This problem would only appear if VIDEO_V4L1 was turned off.  If it was on,
then all the code would agree it was on, and there would be no problems.
If the crash is still there when VIDEO_V4L1 = y, then it's not related to
this bug.

If VIDEO_V4L1 was turned off, then some drivers (one of which is bttv)
would have a different struct video_device than the video core code.  This
would break things so completely that it could crash just about anywhere.

  parent reply	other threads:[~2006-07-25  8:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-13  4:43 oops in bttv Chuck Ebbert
2006-07-13  5:05 ` Greg KH
2006-07-13  5:24   ` Randy.Dunlap
2006-07-13  5:44     ` Andrew Morton
2006-07-15 23:08       ` [PATCH] V4L: struct video_device corruption Robert Fitzsimons
2006-07-16  1:31         ` Mauro Carvalho Chehab
2006-07-18  0:25           ` [v4l-dvb-maintainer] " Trent Piepho
2006-07-19 11:54             ` Mauro Carvalho Chehab
2006-07-19 15:36               ` Michael Krufky
2006-07-20 21:57               ` Trent Piepho
2006-07-21 12:26                 ` Mauro Carvalho Chehab
2006-07-21 20:06                   ` Trent Piepho
2006-07-21 20:30                     ` Mauro Carvalho Chehab
2006-07-21 22:55                       ` Trent Piepho
2006-07-23  9:35                         ` Mauro Carvalho Chehab
2006-07-24  2:16                           ` Trent Piepho
2006-07-24 12:34                             ` Mauro Carvalho Chehab
2006-07-24 22:06                               ` Trent Piepho
2006-07-25 17:59                                 ` Mauro Carvalho Chehab
2006-07-25  3:08           ` Andrew Morton
2006-07-25  7:57             ` [v4l-dvb-maintainer] " Manu Abraham
2006-07-25  8:42             ` Trent Piepho [this message]
2006-07-25  9:06               ` Andrew Morton
2006-07-25 12:28                 ` Mauro Carvalho Chehab

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=Pine.LNX.4.58.0607250054410.18397@shell3.speakeasy.net \
    --to=xyzzy@speakeasy.org \
    --cc=76306.1226@compuserve.com \
    --cc=akpm@osdl.org \
    --cc=fork0@t-online.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=rdunlap@xenotime.net \
    --cc=robfitz@273k.net \
    --cc=shemminger@osdl.org \
    --cc=v4l-dvb-maintainer@linuxtv.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;
as well as URLs for NNTP newsgroup(s).