Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
66cdcdf1
Commit
66cdcdf1
authored
Oct 29, 2003
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPX]: Fix OOPS when ipxcfg_auto_create_interfaces is on.
parent
b1ed3e69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
net/ipx/af_ipx.c
net/ipx/af_ipx.c
+13
-12
No files found.
net/ipx/af_ipx.c
View file @
66cdcdf1
...
...
@@ -326,7 +326,6 @@ void __ipxitf_down(struct ipx_interface *intrfc)
if
(
intrfc
->
if_dev
)
dev_put
(
intrfc
->
if_dev
);
kfree
(
intrfc
);
module_put
(
THIS_MODULE
);
}
void
ipxitf_down
(
struct
ipx_interface
*
intrfc
)
...
...
@@ -358,6 +357,17 @@ static int ipxitf_device_event(struct notifier_block *notifier,
return
NOTIFY_DONE
;
}
static
__exit
void
ipxitf_cleanup
(
void
)
{
struct
ipx_interface
*
i
,
*
tmp
;
spin_lock_bh
(
&
ipx_interfaces_lock
);
list_for_each_entry_safe
(
i
,
tmp
,
&
ipx_interfaces
,
node
)
__ipxitf_put
(
i
);
spin_unlock_bh
(
&
ipx_interfaces_lock
);
}
static
void
ipxitf_def_skb_handler
(
struct
sock
*
sock
,
struct
sk_buff
*
skb
)
{
if
(
sock_queue_rcv_skb
(
sock
,
skb
)
<
0
)
...
...
@@ -888,7 +898,6 @@ static struct ipx_interface *ipxitf_alloc(struct net_device *dev, __u32 netnum,
INIT_HLIST_HEAD
(
&
intrfc
->
if_sklist
);
atomic_set
(
&
intrfc
->
refcnt
,
1
);
spin_lock_init
(
&
intrfc
->
if_sklist_lock
);
__module_get
(
THIS_MODULE
);
}
return
intrfc
;
...
...
@@ -1979,21 +1988,13 @@ static int __init ipx_init(void)
static
void
__exit
ipx_proto_finito
(
void
)
{
/*
* No need to worry about having anything on the ipx_interfaces list,
* when a interface is created we increment the module usage count, so
* the module will only be unloaded when there are no more interfaces
*/
if
(
unlikely
(
!
list_empty
(
&
ipx_interfaces
)))
BUG
();
if
(
unlikely
(
!
list_empty
(
&
ipx_routes
)))
BUG
();
ipx_proc_exit
();
ipx_unregister_sysctl
();
unregister_netdevice_notifier
(
&
ipx_dev_notifier
);
ipxitf_cleanup
();
unregister_snap_client
(
pSNAP_datalink
);
pSNAP_datalink
=
NULL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment