From patchwork Mon Feb 8 02:11:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 77649 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o182CA3S006405 for ; Mon, 8 Feb 2010 02:12:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755613Ab0BHCMA (ORCPT ); Sun, 7 Feb 2010 21:12:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:4403 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753211Ab0BHCMA (ORCPT ); Sun, 7 Feb 2010 21:12:00 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o182Bsea001960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 7 Feb 2010 21:11:54 -0500 Received: from [10.11.11.200] (vpn-11-200.rdu.redhat.com [10.11.11.200]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o182Bo1l022090 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 7 Feb 2010 21:11:53 -0500 Message-ID: <4B6F72E5.3040905@redhat.com> Date: Mon, 08 Feb 2010 00:11:49 -0200 From: Mauro Carvalho Chehab User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Francesco Lavra CC: linux-media@vger.kernel.org Subject: Re: [PATCH] dvb-core: fix initialization of feeds list in demux filter References: <1265546998.9356.4.camel@localhost> In-Reply-To: <1265546998.9356.4.camel@localhost> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 08 Feb 2010 02:12:10 +0000 (UTC) diff --git a/drivers/media/dvb/dvb-core/dmxdev.c b/drivers/media/dvb/dvb-core/dmxdev.c index c37790a..be9bef1 100644 --- a/drivers/media/dvb/dvb-core/dmxdev.c +++ b/drivers/media/dvb/dvb-core/dmxdev.c @@ -755,13 +755,11 @@ static int dvb_demux_open(struct inode *inode, struct file *file) } dmxdevfilter = &dmxdev->filter[i]; - mutex_init(&dmxdevfilter->mutex); file->private_data = dmxdevfilter; 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++; @@ -1239,6 +1237,8 @@ int dvb_dmxdev_init(struct dmxdev *dmxdev, struct dvb_adapter *dvb_adapter) dmxdev->filter[i].buffer.data = NULL; dvb_dmxdev_filter_state_set(&dmxdev->filter[i], DMXDEV_STATE_FREE); + mutex_init(&dmxdev->filter[i].mutex); + INIT_LIST_HEAD(&dmxdev->filter[i].feed.ts); } dvb_register_device(dvb_adapter, &dmxdev->dvbdev, &dvbdev_demux, dmxdev,