linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Drokin <green@ixcelerator.com>
To: linux-kernel@vger.kernel.org
Subject: Race/problem with hotplug & network interfaces
Date: Mon, 4 Dec 2000 15:57:51 +0300	[thread overview]
Message-ID: <20001204155751.B11731@iXcelerator.com> (raw)

Hello!

   It seems I have found some kind of race, if hotplug is enabled,
   and one have changing number of network interfaces (observed on ppp).
   I use 2.4.0-test11. Problem is 100% repeatable.

   My test case is this: I start ppp over ssh session, then do ifconfig
   and then kill pppd (by kill -9 pid).
   Immediatelly I getting: 1. waitpid(<somepid>) failed, -512 2. oops.
   Inspecting oops, I have found that
   current->files == NULL in kmod.c::exec_usermodehelper.
   After some investigations, it appears, that when pppd exits,
   ppp interface gets destroyed, and /sbin/hotplug net is called,
   using now dead pppd as parent.
   Simple (and probably not that good) solution is attached as patch, below.
   It get gid of oops, but waitpid failed thing is still there.

   Also I post oops here, too. (sorry, no Code decoding)
 
--- kmod.c.orig	Mon Dec  4 15:31:38 2000
+++ kmod.c	Mon Dec  4 15:32:25 2000
@@ -99,8 +99,10 @@
 	flush_signal_handlers(current);
 	spin_unlock_irq(&current->sigmask_lock);
 
-	for (i = 0; i < current->files->max_fds; i++ ) {
-		if (current->files->fd[i]) close(i);
+	if ( current->files ) {
+		for (i = 0; i < current->files->max_fds; i++ ) {
+			if (current->files->fd[i]) close(i);
+		}
 	}
 
 	/* Drop the "current user" thing */

Unable to handle kernel NULL pointer dereference at virtual address 00000008
c01122a4
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c01122a4>]
Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00010246
eax: c7acea64   ebx: c7a20000   ecx: c1292000   edx: 00000000
esi: 00000006   edi: 00000000   ebp: c1228320   esp: c7a21fb8
ds: 0018   es: 0018   ss: 0018
Process pppd (pid: 181, stackpage=c7a21000)
Stack: 00000100 c7c43d84 c7c43db4 c7a76b20 c7b8c0c0 c1228320 c7f87a60 c7f87a60 
       c7f87a60 c7f87a60 c011259c c01d7ba0 c7c43e44 c7c43e30 c01073f8 c7c43db4 
       00000078 c7c43e44 
Call Trace: [<c011259c>] [<c01073f8>] 
Code: 8b 4f 08 39 ca 7d 22 90 8b 47 14 83 3c 90 00 74 13 89 f0 89 

>>EIP; c01122a4 <exec_usermodehelper+298/3d8>   <=====
Trace; c011259c <request_module+1b8/1bc>
Trace; c01073f8 <kernel_thread+28/1b8>

Bye,
    Oleg
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

             reply	other threads:[~2000-12-04 13:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-04 12:57 Oleg Drokin [this message]
2000-12-04 13:42 ` Race/problem with hotplug & network interfaces Andrew Morton
2000-12-04 14:01   ` Oleg Drokin

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=20001204155751.B11731@iXcelerator.com \
    --to=green@ixcelerator.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).