public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Thomas Voegtle <tv@lio96.de>
Cc: obi@linuxtv.org, linux-media@vger.kernel.org
Subject: Re: Kernel Oops, dvb_dmxdev_filter_reset, bisected
Date: Mon, 01 Feb 2010 17:46:29 -0200	[thread overview]
Message-ID: <4B672F95.5070009@redhat.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1002011855590.30919@er-systems.de>

Thomas Voegtle wrote:
> 
> Hello,
> 
> yesterday I moved from 2.6.31.y to 2.6.32 and found a reproducable
> kernel oops.
> Bug is in Linus' tree, too.

Please try the two patches I sent to the ML today that fixes two potential
situations where the OOPS bug may hit.

I suspect that alevt-dvb is doing something wrong with the memory of the machine.

The more likely case happens when there's no more available memory for vmalloc(). 
In this case, this code fails:

        dvbdemux->feed = vmalloc(dvbdemux->feednum * sizeof(struct dvb_demux_feed));
        if (!dvbdemux->feed) {
                vfree(dvbdemux->filter);
                return -ENOMEM;

And the driver frees the memory. However, before the patch, it used to forget
to reset dvbdemux->filter to NULL. Later, dvb_dmx_release() is called, and it
tries to free an already freed memory, causing the OOPS.

After applying those two patches, I can't see any other potential cause
for the problem. Someone with aletv and a DVB-T signal with Teletext
(it is not my case, I am at an ISDB-T area) should now take a look on 
what's the application is doing and why aletv-dvb is exhausting the computer 
memory used by vmalloc.

> I bisected this down to:
> 
> root@scratchy:/data/kernel/linux-2.6# git bisect bad
> 1cb662a3144992259edfd3cf9f54a6b25a913a0f is first bad commit
> commit 1cb662a3144992259edfd3cf9f54a6b25a913a0f
> Author: Andreas Oberritter <obi@linuxtv.org>
> Date:   Tue Jul 14 20:28:50 2009 -0300
> 
>     V4L/DVB (12275): Add two new ioctls: DMX_ADD_PID and DMX_REMOVE_PID
> ...
> 
> 
> Reverting the patch on top of 2.6.33-rc6, I can start mplayer and alevt
> with no problems.

If reverting this patch solves the issue, then I can see 2 possible reasons
for the breakage:
	1) the behavior of the old ioctls changed a little bit for Teletext;
	2) your mplayer version has support to the new ioctls, and is doing
something different. In this case, as aletv-dvb is not prepared for the 
changes, it hits some internal bug, and it is working badly.

In any case, someone needs to dig at aletv and check what's happening there, 
identifying the root cause. So, the better is to contact aletv-dvb maintainer. 

It the error is due to (2), the fix is a patch to aletv-dvb. If it is (1),
then a regression has occurred, and a patch to the kernel is needed. For someone
to write such patch, he needs to know exactly where's the bug: e. g. what's the
difference between the previous driver response and the new broken response.

Cheers,
Mauro


  parent reply	other threads:[~2010-02-01 19:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-01 18:06 Kernel Oops, dvb_dmxdev_filter_reset, bisected Thomas Voegtle
2010-02-01 19:25 ` Chicken Shack
2010-02-01 20:50   ` Thomas Voegtle
2010-02-01 21:35     ` Chicken Shack
2010-02-01 19:46 ` Mauro Carvalho Chehab [this message]
2010-02-01 20:54   ` Thomas Voegtle
2010-02-01 21:09   ` Chicken Shack

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=4B672F95.5070009@redhat.com \
    --to=mchehab@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=obi@linuxtv.org \
    --cc=tv@lio96.de \
    /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