lkml.org 
[lkml]   [1999]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Doubt on Linux



I agree with you.
Do you mean to say that I have to issue MOD_INC_USE_COUNT
in the hard_start_xmit function also.

If Yes then I have a problem here also.

Consider that the hard_start_xmit function of my module is invoked, but the
MOD_INC_USE_COUNT is still not executed and at this point of time, rmmod
command is issued to this driver. The cleanupmodule() will be invoked as
the module is not in use.

After unloading, if the context switches back to the hard_start_xmit(),
it will crash, as the function does not exist.

Please do give me a solution for this.

Thanks



On Mon, 22 Mar 1999, David Miller wrote:

>
> On each open of your device do:
>
> MOD_INC_USE_COUNT
>
> On each close of your device do:
>
> MOD_DEC_USE_COUNT
>
> Crashes will disappear, because rmmod will fail while the device is in
> use.
>
> Later,
> David S. Miller
> davem@redhat.com
>


-
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/

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