Re: [PATCH] bttv: fix mutex use before init

2010-12-17 Thread Mauro Carvalho Chehab
Em 17-12-2010 14:07, Brandon Philips escreveu: > On 19:45 Wed 15 Dec 2010, Mauro Carvalho Chehab wrote: >> Em 15-12-2010 16:44, Chris Clayton escreveu: >>> On Tuesday 14 December 2010, Brandon Philips wrote: On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: > * change &fh->cap.vb_lock in bt

Re: [PATCH] bttv: fix mutex use before init

2010-12-17 Thread Brandon Philips
On 19:45 Wed 15 Dec 2010, Mauro Carvalho Chehab wrote: > Em 15-12-2010 16:44, Chris Clayton escreveu: > > On Tuesday 14 December 2010, Brandon Philips wrote: > >> On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: > >>> * change &fh->cap.vb_lock in bttv_open() AND radio_open() to > >>> &btv->init.ca

Re: [PATCH] bttv: fix mutex use before init

2010-12-17 Thread Torsten Kaiser
On Wed, Dec 15, 2010 at 10:45 PM, Mauro Carvalho Chehab wrote: > While your patch fixes the issue, it has some other troubles, like to the > presence of > lock code at free_btres_lock(). It is possible to fix, but the better is to > just > use the core-assisted locking schema. This way, V4L2 cor

Re: [PATCH] bttv: fix mutex use before init

2010-12-16 Thread Chris Clayton
On Wednesday 15 December 2010, Mauro Carvalho Chehab wrote: > Em 15-12-2010 16:44, Chris Clayton escreveu: > > On Tuesday 14 December 2010, Brandon Philips wrote: > >> On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: > >>> * change &fh->cap.vb_lock in bttv_open() AND radio_open() to > >>> &btv->ini

Re: [PATCH] bttv: fix mutex use before init

2010-12-15 Thread Mauro Carvalho Chehab
Em 15-12-2010 16:44, Chris Clayton escreveu: > On Tuesday 14 December 2010, Brandon Philips wrote: >> On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: >>> * change &fh->cap.vb_lock in bttv_open() AND radio_open() to >>> &btv->init.cap.vb_lock >>> * add a mutex_init(&btv->init.cap.vb_lock) to the s

Re: [PATCH] bttv: fix mutex use before init

2010-12-15 Thread Chris Clayton
On Tuesday 14 December 2010, Brandon Philips wrote: > On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: > > * change &fh->cap.vb_lock in bttv_open() AND radio_open() to > > &btv->init.cap.vb_lock > > * add a mutex_init(&btv->init.cap.vb_lock) to the setup of init in > > bttv_probe() > > That seems

Re: [PATCH] bttv: fix mutex use before init

2010-12-14 Thread Torsten Kaiser
On Tue, Dec 14, 2010 at 10:43 PM, Brandon Philips wrote: > On 21:56 Tue 14 Dec 2010, Torsten Kaiser wrote: >> On Tue, Dec 14, 2010 at 1:30 AM, Brandon Philips wrote: >> > On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: >> >>  * change &fh->cap.vb_lock in bttv_open() AND radio_open() to >> >> &btv

Re: [PATCH] bttv: fix mutex use before init

2010-12-14 Thread Dave Young
On Wed, Dec 15, 2010 at 5:43 AM, Brandon Philips wrote: > On 21:56 Tue 14 Dec 2010, Torsten Kaiser wrote: >> On Tue, Dec 14, 2010 at 1:30 AM, Brandon Philips wrote: >> > On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: >> >>  * change &fh->cap.vb_lock in bttv_open() AND radio_open() to >> >> &btv-

Re: [PATCH] bttv: fix mutex use before init

2010-12-14 Thread Brandon Philips
On 22:13 Tue 14 Dec 2010, Torsten Kaiser wrote: > On Tue, Dec 14, 2010 at 9:56 PM, Torsten Kaiser > wrote: > > Using the card also still works, but I think I found out what was > > causing sporadic shutdown problems with 37-rc kernels: When I try to > > exit tvtime it gets stuck in an uninterrupti

Re: [PATCH] bttv: fix mutex use before init

2010-12-14 Thread Brandon Philips
On 21:56 Tue 14 Dec 2010, Torsten Kaiser wrote: > On Tue, Dec 14, 2010 at 1:30 AM, Brandon Philips wrote: > > On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: > >>  * change &fh->cap.vb_lock in bttv_open() AND radio_open() to > >> &btv->init.cap.vb_lock > >>  * add a mutex_init(&btv->init.cap.vb_lo

Re: [PATCH] bttv: fix mutex use before init

2010-12-14 Thread Torsten Kaiser
On Tue, Dec 14, 2010 at 9:56 PM, Torsten Kaiser wrote: > Using the card also still works, but I think I found out what was > causing sporadic shutdown problems with 37-rc kernels: When I try to > exit tvtime it gets stuck in an uninterruptible D state and can't be > killed. And that seems to mess

Re: [PATCH] bttv: fix mutex use before init

2010-12-14 Thread Torsten Kaiser
On Tue, Dec 14, 2010 at 1:30 AM, Brandon Philips wrote: > On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: >>  * change &fh->cap.vb_lock in bttv_open() AND radio_open() to >> &btv->init.cap.vb_lock >>  * add a mutex_init(&btv->init.cap.vb_lock) to the setup of init in >> bttv_probe() > > That seem

Re: [PATCH] bttv: fix mutex use before init

2010-12-14 Thread Dave Young
On Mon, Dec 13, 2010 at 04:30:24PM -0800, Brandon Philips wrote: > On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: > > * change &fh->cap.vb_lock in bttv_open() AND radio_open() to > > &btv->init.cap.vb_lock > > * add a mutex_init(&btv->init.cap.vb_lock) to the setup of init in > > bttv_probe() >

Re: [PATCH] bttv: fix mutex use before init

2010-12-13 Thread Brandon Philips
On 17:13 Sun 12 Dec 2010, Torsten Kaiser wrote: > * change &fh->cap.vb_lock in bttv_open() AND radio_open() to > &btv->init.cap.vb_lock > * add a mutex_init(&btv->init.cap.vb_lock) to the setup of init in > bttv_probe() That seems like a reasonable suggestion. An openSUSE user submitted this bu

Re: [PATCH] bttv: fix mutex use before init

2010-12-13 Thread Torsten Kaiser
On Mon, Dec 13, 2010 at 3:04 PM, Dave Young wrote: > On Sun, Dec 12, 2010 at 05:13:47PM +0100, Torsten Kaiser wrote: >> On Sun, Dec 12, 2010 at 2:15 PM, Dave Young >> wrote: >> > oops happen in bttv_open while locking uninitialized mutex fh->cap.vb_lock >> > add mutex_init before usage >> >> I h

Re: [PATCH] bttv: fix mutex use before init

2010-12-13 Thread Dave Young
On Sun, Dec 12, 2010 at 05:13:47PM +0100, Torsten Kaiser wrote: > On Sun, Dec 12, 2010 at 2:15 PM, Dave Young wrote: > > oops happen in bttv_open while locking uninitialized mutex fh->cap.vb_lock > > add mutex_init before usage > > I have seen the same problem twice since I switched of the BKL in

Re: [PATCH] bttv: fix mutex use before init

2010-12-12 Thread Torsten Kaiser
On Sun, Dec 12, 2010 at 2:15 PM, Dave Young wrote: > oops happen in bttv_open while locking uninitialized mutex fh->cap.vb_lock > add mutex_init before usage I have seen the same problem twice since I switched of the BKL in 2.6.37-rc2, but only had the time today to search for the cause. (It only

[PATCH] bttv: fix mutex use before init

2010-12-12 Thread Dave Young
oops happen in bttv_open while locking uninitialized mutex fh->cap.vb_lock add mutex_init before usage Signed-off-by: Dave Young Tested-by: Chris Clayton --- drivers/media/video/bt8xx/bttv-driver.c |2 ++ 1 file changed, 2 insertions(+) --- linux-2.6.orig/drivers/media/video/bt8xx/bttv-dri