netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Bugme-new] [Bug 10737] New: pktgen procfs problem
@ 2008-05-19 15:19 Alexey Dobriyan
  0 siblings, 0 replies; 19+ messages in thread
From: Alexey Dobriyan @ 2008-05-19 15:19 UTC (permalink / raw)
  To: bugme-daemon; +Cc: akpm, kaber, den, netdev, devzero

> remove_proc_entry: removing non-empty directory 'net/pktgen', leaking at least 'kpktgend_1'

> --- a/fs/proc/inode.c
> +++ b/fs/proc/inode.c
> @@ -425,7 +425,8 @@ struct inode *proc_get_inode(struct super_block *sb, unsigned int ino,
>                         }
>                 }
>                 unlock_new_inode(inode);
> -       }
> +       } else
> +              module_put(de->owner);
>         return inode;
>  
>  out_ino:

For the record, I fail to see how this can fix original bugreport:
If rmmod started and proc warnings were spewed, module's refcount was 0,
so positive refcount leak can't do that.

Roland, was it just modprobe/rmmod or something else?

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [Bugme-new] [Bug 10737] New: pktgen procfs problem
@ 2008-05-19 16:03 Alexey Dobriyan
  0 siblings, 0 replies; 19+ messages in thread
From: Alexey Dobriyan @ 2008-05-19 16:03 UTC (permalink / raw)
  To: bugme-daemon; +Cc: akpm, kaber, den, netdev, devzero

> remove_proc_entry: removing non-empty directory 'net/pktgen', leaking at least 'kpktgend_1'

reproduced, and BTW, proc stuff is least of worries. It can also oops via

list_del corruption. prev->next should be ffff81007e8a5e70, but was 6b6b6b6b6b6b6b6b
kernel BUG at lib/list_debug.c:67!
 :pktgen:pktgen_thread_worker+0x374/0x10b0
 ? autoremove_wake_function+0x0/0x40
 ? _spin_unlock_irqrestore+0x42/0x80
 ? :pktgen:pktgen_thread_worker+0x0/0x10b0
 kthread+0x4d/0x80
 child_rip+0xa/0x12
 ? restore_args+0x0/0x30
 ? kthread+0x0/0x80
 ? child_rip+0x0/0x12
RIP  list_del+0x48/0x70

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [Bugme-new] [Bug 10737] New: pktgen procfs problem
@ 2008-05-19 22:21 Alexey Dobriyan
  2008-05-19 22:45 ` Robert Olsson
  0 siblings, 1 reply; 19+ messages in thread
From: Alexey Dobriyan @ 2008-05-19 22:21 UTC (permalink / raw)
  To: bugme-daemon; +Cc: devzero, akpm, kaber, den, adobriyan, netdev

> list_del corruption. prev->next should be ffff81007e8a5e70, but was 6b6b6b6b6b6b6b6b
> kernel BUG at lib/list_debug.c:67!
>	:pktgen:pktgen_thread_worker+0x374/0x10b0
>	? autoremove_wake_function+0x0/0x40
>	? _spin_unlock_irqrestore+0x42/0x80
>	? :pktgen:pktgen_thread_worker+0x0/0x10b0
>	kthread+0x4d/0x80
>	child_rip+0xa/0x12
>	? restore_args+0x0/0x30
>	? kthread+0x0/0x80
>	? child_rip+0x0/0x12
> RIP  list_del+0x48/0x70

OK, trivial debugging and we know that worker thread function
(pktgen_thread_worker) never ran between kthread creation and rmmod.

Consequently, addition to "pktgen_threads" list happened, list_del of
thread 0 never happened, list_del of thread 1 barfs.


^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: [Bugme-new] [Bug 10737] New: pktgen procfs problem
@ 2008-05-20 21:57 Alexey Dobriyan
  2008-05-20 21:17 ` Robert Olsson
  0 siblings, 1 reply; 19+ messages in thread
From: Alexey Dobriyan @ 2008-05-20 21:57 UTC (permalink / raw)
  To: robert.olsson; +Cc: netdev

> > >> +	} else
> > >> +	       module_put(de->owner);
> > >>  	return inode;
> > >>   out_ino:

> Yes it fixes the oops I got as well.
>
> Acked-by: Robert Olsson <robert.olsson@its.uu.se>

Robert, which oops do you see?

Patch you cited hardly can fix an oops (as in real oops, not warning).


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2008-05-20 21:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <bug-10737-10286@http.bugzilla.kernel.org/>
2008-05-17 21:10 ` [Bugme-new] [Bug 10737] New: pktgen procfs problem Andrew Morton
2008-05-18  1:39   ` Patrick McHardy
2008-05-18  4:56     ` Andrew Morton
2008-05-18 12:06       ` Patrick McHardy
2008-05-18 13:24         ` Patrick McHardy
2008-05-18 15:31           ` Patrick McHardy
2008-05-19  7:54             ` Denis V. Lunev
2008-05-19 10:34               ` Patrick McHardy
2008-05-20  0:26               ` Ben Greear
2008-05-20  1:14                 ` Eric W. Biederman
2008-05-20  8:25                   ` Robert Olsson
2008-05-19 21:34             ` Eric W. Biederman
2008-05-19 22:19               ` Ben Greear
2008-05-19 15:19 Alexey Dobriyan
  -- strict thread matches above, loose matches on Subject: below --
2008-05-19 16:03 Alexey Dobriyan
2008-05-19 22:21 Alexey Dobriyan
2008-05-19 22:45 ` Robert Olsson
2008-05-20 21:57 Alexey Dobriyan
2008-05-20 21:17 ` Robert Olsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).