2.3.1: patches and oopses

Carlo E. Prelz (fluido@fluidware.com)
Wed, 12 May 1999 15:12:26 +0300


Hi. Here are the few patches I had to apply to compile 2.3.1pre2:

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

--- ./net/core/firewall.c~ Sat Jan 23 21:51:49 1999
+++ ./net/core/firewall.c Wed May 12 12:38:02 1999
@@ -13,7 +13,7 @@
#include <linux/interrupt.h>
#include <asm/semaphore.h>

-struct semaphore firewall_sem = MUTEX;
+DECLARE_MUTEX(firewall_sem);
static int firewall_policy[NPROTO];
static struct firewall_ops *firewall_chain[NPROTO];

--- ./net/ipv4/ip_masq_mfw.c~ Fri Mar 12 11:43:50 1999
+++ ./net/ipv4/ip_masq_mfw.c Wed May 12 12:46:12 1999
@@ -79,7 +79,7 @@
};


-static struct semaphore mfw_sema = MUTEX;
+static DECLARE_MUTEX(mfw_sema);
#ifdef __SMP__
static rwlock_t mfw_lock = RW_LOCK_UNLOCKED;
#endif
--- ./net/netlink/af_netlink.c~ Sun Apr 18 17:21:49 1999
+++ ./net/netlink/af_netlink.c Wed May 12 13:01:03 1999
@@ -331,8 +331,8 @@
struct sock *sk;
int len = skb->len;
int protocol = ssk->protocol;
- struct wait_queue wait = { current, NULL };
+ DECLARE_WAITQUEUE(wait, current);

retry:
for (sk = nl_table[protocol]; sk; sk = sk->next) {
if (sk->protinfo.af_netlink.pid != pid)
--- ./arch/i386/kernel/apm.c~ Sat Jan 23 22:06:17 1999
+++ ./arch/i386/kernel/apm.c Wed May 12 13:09:02 1999
@@ -1017,7 +1017,7 @@
struct apm_bios_struct * as;
int i;
apm_event_t event;
- struct wait_queue wait = { current, NULL };
+ DECLARE_WAITQUEUE(wait, current);

as = fp->private_data;
if (check_apm_bios_struct(as, "read"))
--- ./drivers/char/msp3400.c~ Fri Mar 12 11:43:43 1999
+++ ./drivers/char/msp3400.c Wed May 12 13:43:08 1999
@@ -748,7 +748,7 @@
{
unsigned long flags;
struct msp3400c *msp = data;
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);
int i, val;

/* lock_kernel(); */
@@ -844,7 +844,7 @@
static struct msp3400c *mspmix = NULL; /* ugly hack, should do something more sensible */
static int mixer_num;
static int mixer_modcnt = 0;
-static struct semaphore mixer_sem = MUTEX;
+static DECLARE_MUTEX(mixer_sem);

static int mix_to_v4l(int i)
{
@@ -1016,7 +1016,7 @@

static int msp3400c_attach(struct i2c_device *device)
{
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);
struct msp3400c *msp;
int rev1,rev2;
LOCK_FLAGS;
@@ -1090,7 +1090,7 @@

static int msp3400c_detach(struct i2c_device *device)
{
- struct semaphore sem = MUTEX_LOCKED;
+ DECLARE_MUTEX_LOCKED(sem);
struct msp3400c *msp = (struct msp3400c*)device->data;
LOCK_FLAGS;

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

And here are the oopses I got at boot:

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

May 12 13:52:11 eccolo kernel: bad magic 00000000 (should be c03820d8, creator 00000000), wq bug, forcing oops.
May 12 13:52:11 eccolo kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000
May 12 13:52:11 eccolo kernel: current->tss.cr3 = 00101000, %cr3 = 00101000
May 12 13:52:11 eccolo kernel: *pde = 00000000
May 12 13:52:11 eccolo kernel: Oops: 0002
May 12 13:52:11 eccolo kernel: CPU: 0
May 12 13:52:11 eccolo kernel: EIP: 0010:[interruptible_sleep_on+138/344]
May 12 13:52:11 eccolo kernel: EFLAGS: 00010096
May 12 13:52:11 eccolo kernel: eax: 00000016 ebx: c03820d0 ecx: c025e3f0 edx: c025e3f0
May 12 13:52:11 eccolo kernel: esi: c1df4000 edi: 00000286 ebp: c1df5f9c esp: c1df5f5c
May 12 13:52:11 eccolo kernel: ds: 0018 es: 0018 ss: 0018
May 12 13:52:11 eccolo kernel: Process msp3400 (pid: 62, process nr: 12, stackpage=c1df5000)
May 12 13:52:11 eccolo kernel: Stack: c03820d8 00000000 c1e99e1c c1df4000 c1df41ce c01185b1 c1df4000 400a23f0
May 12 13:52:11 eccolo kernel: 00000000 c1df4000 c03a59ac 00000080 c1df5f8c c2c41b27 c1df4000 c03a5920
May 12 13:52:11 eccolo kernel: c1e99e3c c2c41c23 00000100 c1e99da4 c03820a0 c1e99e3c 00000000 c028c000
May 12 13:52:11 eccolo kernel: Call Trace: [exit_mm+85/104] [msp3400:d1+-7893/164] [msp3400:d1+-7641/164] [msp3400:d1+-7924/164] [fbcon_cfb32_putc+508/524] [kernel_thread+34/60] [kernel_thread+43/60]
May 12 13:52:11 eccolo kernel: Code: c7 05 00 00 00 00 00 00 00 00 83 c4 10 90 8b 45 f0 8d 75 f0
May 12 13:52:11 eccolo kernel: bad magic 00000000 (should be c03820d8, creator 00000000), wq bug, forcing oops.
May 12 13:52:11 eccolo kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000
May 12 13:52:11 eccolo kernel: current->tss.cr3 = 01edd000, %cr3 = 01edd000
May 12 13:52:11 eccolo kernel: *pde = 00000000
May 12 13:52:11 eccolo kernel: Oops: 0002
May 12 13:52:11 eccolo kernel: CPU: 0
May 12 13:52:11 eccolo kernel: EIP: 0010:[__wake_up+69/404]
May 12 13:52:11 eccolo kernel: EFLAGS: 00010096
May 12 13:52:11 eccolo kernel: eax: 00000016 ebx: c03820d0 ecx: c025e3f0 edx: c025e3f0
May 12 13:52:11 eccolo kernel: esi: 00000006 edi: c03820a0 ebp: c1e99dcc esp: c1e99d9c
May 12 13:52:11 eccolo kernel: ds: 0018 es: 0018 ss: 0018
May 12 13:52:11 eccolo kernel: Process insmod (pid: 61, process nr: 8, stackpage=c1e99000)
May 12 13:52:11 eccolo kernel: Stack: c03820d8 00000000 c1e99e1c 00000006 c03820a0 c2c429f5 c03569c0 c2c4370b
May 12 13:52:11 eccolo kernel: 00000282 c2c42a39 c2c41b08 00000001 c1e99e3c c2c42a9c c03569c0 00000001
May 12 13:52:11 eccolo kernel: 00000000 c2c48287 0000a7bc 00000000 00000286 c2c48287 c03820a0 c1e99e1c
May 12 13:52:11 eccolo kernel: Call Trace: [msp3400:d1+-4103/164] [msp3400:d1+-753/164] [msp3400:d1+-4035/164] [msp3400:d1+-7924/164] [msp3400:d1+-3936/164] [<c2c48287>] [<c2c48287>]
May 12 13:52:11 eccolo kernel: [<c2c4f380>] [msp3400:d1+-26780/164] [msp3400:d1+-25390/164] [msp3400:d1+-23324/164] [<c2c4f380>] [<c2c4f380>] [msp3400:d1+-26163/164] [<c2c4f380>]
May 12 13:52:11 eccolo kernel: [<c2c43aa0>] [<c2c4f274>] [<c2c4f0f4>] [<c2c4f2c8>] [<c2c4f220>] [<c2c4804d>] [<c2c4d0ea>] [<c2c4f380>]
May 12 13:52:11 eccolo kernel: [<c2c4804d>] [<c2c48048>] [<c2c4e680>] [<c2c4f220>] [<c2c48000>] [<c2c4da3d>] [<c2c4804d>] [<c2c4da0e>]
May 12 13:52:11 eccolo kernel: [<c2c48000>] [<c2c48048>] [sys_init_module+1091/1200] [<c2c48000>] [handle_mm_fault+275/328] [<c2c45000>] [<c2c48048>] [error_code+45/52]
May 12 13:52:11 eccolo kernel: [system_call+52/56] [<c2c48000>]
May 12 13:52:11 eccolo kernel: Code: c7 05 00 00 00 00 00 00 00 00 83 c4 10 89 f6 89 5d f4 83 3b
May 12 13:52:11 eccolo kernel: bad magic 00000000 (should be c02b2868, creator 00000000), wq bug, forcing oops.
May 12 13:52:11 eccolo kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000
May 12 13:52:11 eccolo kernel: current->tss.cr3 = 01e70000, %cr3 = 01e70000
May 12 13:52:11 eccolo kernel: *pde = 00000000
May 12 13:52:11 eccolo kernel: Oops: 0002
May 12 13:52:11 eccolo kernel: CPU: 0
May 12 13:52:11 eccolo kernel: EIP: 0010:[__wake_up+69/404]
May 12 13:52:11 eccolo kernel: EFLAGS: 00010096
May 12 13:52:11 eccolo kernel: eax: 00000016 ebx: c02b2860 ecx: c025e3f0 edx: c025e3f0
May 12 13:52:11 eccolo kernel: esi: 00000000 edi: c1ad3040 ebp: c1ec5ddc esp: c1ec5dac
May 12 13:52:11 eccolo kernel: ds: 0018 es: 0018 ss: 0018
May 12 13:52:11 eccolo kernel: Process ifconfig (pid: 93, process nr: 10, stackpage=c1ec5000)
May 12 13:52:11 eccolo kernel: Stack: c02b2868 00000000 00000000 00000000 c1ad3040 c0122adc c1ad3040 c0354a40
May 12 13:52:11 eccolo kernel: 00000286 c0354a40 c1ad3040 00000003 00000000 c01b26d9 c1ad3040 c0356ae0
May 12 13:52:11 eccolo kernel: c1ec5f24 bffffcf8 c1ad3040 c0356ae0 00000000 00000000 c03823c4 c0356ae0
May 12 13:52:11 eccolo kernel: Call Trace: [kmem_cache_alloc+244/332] [netlink_broadcast+505/564] [rtmsg_ifa+136/144] [net_srandom+18/24] [inet_insert_ifa+226/276] [inet_set_ifa+91/100] [inet_alloc_ifa+16/52]
May 12 13:52:11 eccolo kernel: [d_alloc+27/340] [devinet_ioctl+1117/1528] [devinet_ioctl+735/1528] [handle_mm_fault+198/328] [inet_ioctl+334/412] [sys_socket+54/132] [sock_ioctl+35/44] [sys_ioctl+371/400]
May 12 13:52:11 eccolo kernel: [error_code+45/52] [system_call+52/56]
May 12 13:52:11 eccolo kernel: Code: c7 05 00 00 00 00 00 00 00 00 83 c4 10 89 f6 89 5d f4 83 3b

--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--

After this, the machine froze while trying to run ifconfig. I killed
all processes with SysRq and received a couple more oopses that were
lost (syslogd dead). I am safely back to 2.2.7ac4. I hope the above
helps Linus with his cleanup operation.

Carlo

-- 
  *         Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluidware.com         che bisogno ci sarebbe
  *               di parlare tanto di amore e di rettitudine? (Chuang-Tzu)

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