lkml.org 
[lkml]   [1997]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject2.1.21-patch_module.c-2, insmod "QM_SYMBOL: bad address"
Date
Sorry about this, -1 had the wrong diff output :(.

After loading a module with more than 128 exported symbols (say
sound.o), all other insmods fail with "QM_SYMBOL: bad address".
qm_symbols gives a premature -EFAULT if the buffer is too small,
instead of telling the caller how big the buffer should be.

--- linux/kernel/module.c.orig Wed Jan 15 16:20:35 1997
+++ linux/kernel/module.c Fri Jan 17 12:30:29 1997
@@ -528,14 +528,14 @@

space = mod->nsyms * 2*sizeof(void *);

- if (!access_ok(VERIFY_WRITE, buf, space))
- return -EFAULT;
-
i = len = 0;
s = mod->syms;

if (space > bufsize)
goto calc_space_needed;
+
+ if (!access_ok(VERIFY_WRITE, buf, space))
+ return -EFAULT;

bufsize -= space;
vals = (unsigned long *)buf;


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.290 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site