diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-12-14 18:51:23 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-18 00:59:11 -0500 |
commit | a4282717c102aef2bfab1d947c392de4d8abc0ec (patch) | |
tree | ef178b6eea8cd9a8790ae58a6c19ff2aa877bcc1 /include/net/ax25.h | |
parent | 58bc57471514be9206ebcda90b1076f6be41d1c7 (diff) |
[AX.25]: Fix unchecked ax25_linkfail_register uses
ax25_linkfail_register uses kmalloc and the callers were ignoring the
error value. Rewrite to let the caller deal with the allocation. This
allows the use of static allocation of kmalloc use entirely.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ax25.h')
-rw-r--r-- | include/net/ax25.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h index 51060ef74590..5ae10dd2e32e 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -342,8 +342,14 @@ struct ax25_protocol { | |||
342 | 342 | ||
343 | extern void ax25_register_pid(struct ax25_protocol *ap); | 343 | extern void ax25_register_pid(struct ax25_protocol *ap); |
344 | extern void ax25_protocol_release(unsigned int); | 344 | extern void ax25_protocol_release(unsigned int); |
345 | extern int __must_check ax25_linkfail_register(void (*)(ax25_cb *, int)); | 345 | |
346 | extern void ax25_linkfail_release(void (*)(ax25_cb *, int)); | 346 | struct ax25_linkfail { |
347 | struct hlist_node lf_node; | ||
348 | void (*func)(ax25_cb *, int); | ||
349 | }; | ||
350 | |||
351 | extern void ax25_linkfail_register(struct ax25_linkfail *lf); | ||
352 | extern void ax25_linkfail_release(struct ax25_linkfail *lf); | ||
347 | extern int __must_check ax25_listen_register(ax25_address *, | 353 | extern int __must_check ax25_listen_register(ax25_address *, |
348 | struct net_device *); | 354 | struct net_device *); |
349 | extern void ax25_listen_release(ax25_address *, struct net_device *); | 355 | extern void ax25_listen_release(ax25_address *, struct net_device *); |