Re: 2.6.25-rc[12] Video4Linux Bttv Regression

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Bongani Hlope
Date: Friday, March 21, 2008 - 7:55 am

On Thursday 20 March 2008 19:22:12 Mauro Carvalho Chehab wrote:
8<

Latest git with or without your patch still causes the oops..

The call trace that seems to be causing this oops is

radio
|-> ioctl(
       |->videodev.c:__video_do_ioctl
          |->v4l1-compat.c:v4l_compat_translate_ioctl
          |  case VIDIOCGTUNER: /*  get tuner information  */
          | {
          |      struct video_tuner      *tun = arg;
          |
          |      memset(&tun2,0,sizeof(tun2));
          |__ err = drv(inode, file, VIDIOC_G_TUNER, &tun2);
               |->videodev.c:__video_do_ioctl
               |   case VIDIOC_G_TUNER:
               |   {
               |      struct v4l2_tuner *p=arg;
               |     __u32 index=p->index;
               |
               |      if (!vfd->vidioc_g_tuner)
               |          break;
               |
               |     memset(p,0,sizeof(*p));
               |     p->index=index;
               |
               |     ret=vfd->vidioc_g_tuner(file, fh, p);
               |_
                  |-> bttv_driver.c:radio_g_tuner
                  |  struct bttv_fh *fh = priv;
                  |  struct bttv *btv = fh->btv;
                  |  
                  |  if (UNSET == bttv_tvcards[btv->c.type].tuner)
                  |      return -EINVAL;
                  |  if (0 != t->index)
                  |    return -EINVAL;
                  |  mutex_lock(&btv->lock); 
                  |__
                       |-> mutex.c:__mutex_lock_common 
                       |  struct task_struct *task = current;
                       |  struct mutex_waiter waiter;
                       |  unsigned int old_val;
                       |  unsigned long flags;
                       |
                       |  spin_lock_mutex(&lock->wait_lock, flags);
                       |
                       |  debug_mutex_lock_common(lock, &waiter);
                       |  mutex_acquire(&lock->dep_map, subclass, 0, ip);
                       |  debug_mutex_add_waiter(lock, &waiter, 
task_thread_info(task));
                       |
                       |        /* add waiting tasks to the end of the 
waitqueue (FIFO): */
                       | list_add_tail(&waiter.list, &lock->wait_list); 
                         ^^^^
This is where it oops because lock->wait_list->next is NULL.

BUT, changing: 
memset(&tun2,0,sizeof(tun2));
to
memset(&tun2,-1,sizeof(tun2));
in
v4l1-compat.c:v4l_compat_translate_ioctl
...
 case VIDIOCGTUNER:

changes
lock->wait_list->next from being NULL to something else, and the oops move to 
the next case statement i.e. VIDIOCGFREQ





--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.25-rc[12] Video4Linux Bttv Regression, Bongani Hlope, (Sun Feb 17, 1:36 am)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Mauro Carvalho Chehab, (Mon Feb 18, 9:11 am)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Bongani Hlope, (Mon Feb 18, 2:20 pm)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Bongani Hlope, (Mon Feb 18, 4:21 pm)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Mauro Carvalho Chehab, (Tue Feb 19, 7:16 am)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Bongani Hlope, (Tue Feb 19, 1:37 pm)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Bongani Hlope, (Thu Feb 21, 2:03 am)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Robert Fitzsimons, (Tue Feb 26, 8:41 am)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Robert Fitzsimons, (Tue Feb 26, 6:42 pm)
[PATCH] bttv: Re-enable radio tuner support for VIDIOCGFRE ..., Robert Fitzsimons, (Tue Feb 26, 6:44 pm)
[PATCH] bttv: Re-enabling radio support requires the use o ..., Robert Fitzsimons, (Tue Feb 26, 6:47 pm)
Re: [PATCH] bttv: Re-enabling radio support requires the u ..., Mauro Carvalho Chehab, (Wed Feb 27, 2:52 am)
Re: [PATCH] bttv: Re-enabling radio support requires the u ..., Robert Fitzsimons, (Thu Feb 28, 2:25 am)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Bongani Hlope, (Mon Mar 17, 2:51 pm)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Mauro Carvalho Chehab, (Thu Mar 20, 10:22 am)
Re: 2.6.25-rc[12] Video4Linux Bttv Regression, Bongani Hlope, (Fri Mar 21, 7:55 am)
[PATCH] bttv: Add a radio compat_ioctl file operation., Robert Fitzsimons, (Fri Mar 21, 5:05 pm)
Re: [PATCH] bttv: Add a radio compat_ioctl file operation., Bongani Hlope, (Sat Mar 22, 11:17 am)
Re: [PATCH] bttv: Add a radio compat_ioctl file operation., Mauro Carvalho Chehab, (Sat Mar 22, 6:01 pm)
Re: [PATCH] bttv: Add a radio compat_ioctl file operation., Mauro Carvalho Chehab, (Sun Mar 23, 6:50 am)
Re: [PATCH] bttv: Add a radio compat_ioctl file operation., Bongani Hlope, (Sun Mar 23, 11:58 pm)