From: hermann pitton <hermann-pitton@arcor.de>
To: Andy Walls <awalls@radix.net>
Cc: Francesco Lavra <francescolavra@interfree.it>,
Uwe Bugla <uwe.bugla@gmx.de>,
Chicken Shack <chicken.shack@gmx.de>,
obi@linuxtv.org, linux-media@vger.kernel.org
Subject: Re: [PATCH] dvb-core: fix initialization of feeds list in demux filter
Date: Sun, 07 Feb 2010 22:21:57 +0100 [thread overview]
Message-ID: <1265577717.12843.47.camel@localhost> (raw)
In-Reply-To: <1265555632.3063.42.camel@palomino.walls.org>
Hi!
Am Sonntag, den 07.02.2010, 10:13 -0500 schrieb Andy Walls:
> On Sun, 2010-02-07 at 13:49 +0100, Francesco Lavra wrote:
> > A DVB demultiplexer device can be used to set up either a PES filter or
> > a section filter. In the former case, the ts field of the feed union of
> > struct dmxdev_filter is used, in the latter case the sec field of the
> > same union is used.
> > The ts field is a struct list_head, and is currently initialized in the
> > open() method of the demux device. When for a given demuxer a section
> > filter is set up, the sec field is played with, thus if a PES filter
> > needs to be set up after that the ts field will be corrupted, causing a
> > kernel oops.
> > This fix moves the list head initialization to
> > dvb_dmxdev_pes_filter_set(), so that the ts field is properly
> > initialized every time a PES filter is set up.
> >
> > Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
> > Cc: stable <stable@kernel.org>
>
>
> Reviewed-by: Andy Walls <awalls@radix.net>
Tested-by: hermann pitton <hermann-pitton@arcor.de>
>
> This certainly helps.
Yes, as already confirmed by Uwe.
> It catches the case of setting a Section filter with DMX_SET_FILTER and
> then a PES filter with DMX_SET_PES_FILTER on the same file descriptor.
> This is exactly what alevt does. See vbi.c:vbi_dvb_open() and
> vbi.c:dvb_get_table() in the alevt source code.
>
>
> Regards,
> Andy
>
> > ---
> >
> > --- a/drivers/media/dvb/dvb-core/dmxdev.c 2010-02-07 13:19:18.000000000 +0100
> > +++ b/drivers/media/dvb/dvb-core/dmxdev.c 2010-02-07 13:23:39.000000000 +0100
> > @@ -761,7 +761,6 @@ static int dvb_demux_open(struct inode *
> > dvb_ringbuffer_init(&dmxdevfilter->buffer, NULL, 8192);
> > dmxdevfilter->type = DMXDEV_TYPE_NONE;
> > dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_ALLOCATED);
> > - INIT_LIST_HEAD(&dmxdevfilter->feed.ts);
> > init_timer(&dmxdevfilter->timer);
> >
> > dvbdev->users++;
> > @@ -887,6 +886,7 @@ static int dvb_dmxdev_pes_filter_set(str
> > dmxdevfilter->type = DMXDEV_TYPE_PES;
> > memcpy(&dmxdevfilter->params, params,
> > sizeof(struct dmx_pes_filter_params));
> > + INIT_LIST_HEAD(&dmxdevfilter->feed.ts);
> >
> > dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_SET);
> >
> >
Many thanks to Francesco and all taking it up with this one.
Cheers,
Hermann
next prev parent reply other threads:[~2010-02-07 21:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 12:49 [PATCH] dvb-core: fix initialization of feeds list in demux filter Francesco Lavra
2010-02-07 15:13 ` Andy Walls
2010-02-07 21:21 ` hermann pitton [this message]
2010-02-08 2:11 ` Mauro Carvalho Chehab
2010-02-08 12:24 ` Andreas Oberritter
2010-02-08 13:43 ` [PATCH] dvb-core: fix initialization of feeds list in demux filter (Was: Videotext application crashes the kernel due to DVB-demux patch) Chicken Shack
2010-02-08 16:14 ` Linus Torvalds
2010-02-08 17:22 ` Mauro Carvalho Chehab
2010-02-08 18:25 ` Chicken Shack
2010-02-08 19:09 ` Linus Torvalds
2010-02-08 19:20 ` Chicken Shack
2010-02-08 23:30 ` Rudy Zijlstra
[not found] ` <E1NeyGg-0000ze-FG@fencepost.gnu.org>
2010-02-09 22:34 ` Chicken Shack
2010-02-09 0:53 ` hermann pitton
2010-02-09 8:38 ` Chicken Shack
2010-02-11 0:50 ` hermann pitton
2010-02-08 16:15 ` Devin Heitmueller
2010-02-08 18:01 ` Alain Kalker
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=1265577717.12843.47.camel@localhost \
--to=hermann-pitton@arcor.de \
--cc=awalls@radix.net \
--cc=chicken.shack@gmx.de \
--cc=francescolavra@interfree.it \
--cc=linux-media@vger.kernel.org \
--cc=obi@linuxtv.org \
--cc=uwe.bugla@gmx.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