Re: help needed with EXPORT_SYMBOL

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Monday, August 23, 2010 - 6:17 am

On Mon, 2010-08-23 at 07:48 -0400, Brian Gerst wrote:

Please don't do any such thing, its impossible to use correctly.

Suppose there are two modular users, A and B.

Both have something like:

extern void (*fptr)(void);

static void (*old_fptr)(void);

static void func(void)
{
	/* foo */
	if (old_fptr)
		old_fptr();
}

module_init()
{
	old_fptr = fptr;
	fptr = A_func;
}

Then you load A, load B and unload A, then guess what happens?
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
help needed with EXPORT_SYMBOL, Aijaz Baig, (Fri Aug 20, 11:57 pm)
Re: help needed with EXPORT_SYMBOL, Jan Engelhardt, (Sat Aug 21, 2:23 am)
Re: help needed with EXPORT_SYMBOL, Aijaz Baig, (Sun Aug 22, 10:14 pm)
Re: help needed with EXPORT_SYMBOL, Brian Gerst, (Mon Aug 23, 4:48 am)
Re: help needed with EXPORT_SYMBOL, Peter Zijlstra, (Mon Aug 23, 6:17 am)
Re: help needed with EXPORT_SYMBOL, Jan Engelhardt, (Mon Aug 23, 6:32 am)
Re: help needed with EXPORT_SYMBOL, Peter Zijlstra, (Mon Aug 23, 6:43 am)
Re: help needed with EXPORT_SYMBOL, Brian Gerst, (Mon Aug 23, 6:44 am)
Re: help needed with EXPORT_SYMBOL, Peter Zijlstra, (Mon Aug 23, 7:05 am)
Re: help needed with EXPORT_SYMBOL, Aijaz Baig, (Mon Aug 23, 9:44 pm)
Re: Fwd: help needed with EXPORT_SYMBOL, Aijaz Baig, (Wed Aug 25, 2:27 am)
Re: Fwd: help needed with EXPORT_SYMBOL, Jan Engelhardt, (Wed Aug 25, 3:06 am)
Re: Fwd: help needed with EXPORT_SYMBOL, Peter Zijlstra, (Wed Aug 25, 3:23 am)
Re: Fwd: help needed with EXPORT_SYMBOL, Randy Dunlap, (Wed Aug 25, 8:37 am)