diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-12-14 18:50:01 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-18 00:59:08 -0500 |
commit | 8d5cf596d10d740b69b5f4bbdb54b85abf75810d (patch) | |
tree | f0fd6a296f1b90d5fb1898ce1932c6ec5d245465 /include/net/ax25.h | |
parent | c9266b99e2def0a456766220df09713f8e765891 (diff) |
[AX.25]: Fix unchecked ax25_protocol_register uses.
Replace ax25_protocol_register by ax25_register_pid which assumes the
caller has done the memory allocation. This allows replacing the
kmalloc allocations entirely by static allocations.
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 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h index ced202f0729b..51060ef74590 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -333,7 +333,14 @@ extern void ax25_ds_t3timer_expiry(ax25_cb *); | |||
333 | extern void ax25_ds_idletimer_expiry(ax25_cb *); | 333 | extern void ax25_ds_idletimer_expiry(ax25_cb *); |
334 | 334 | ||
335 | /* ax25_iface.c */ | 335 | /* ax25_iface.c */ |
336 | extern int __must_check ax25_protocol_register(unsigned int, int (*)(struct sk_buff *, ax25_cb *)); | 336 | |
337 | struct ax25_protocol { | ||
338 | struct ax25_protocol *next; | ||
339 | unsigned int pid; | ||
340 | int (*func)(struct sk_buff *, ax25_cb *); | ||
341 | }; | ||
342 | |||
343 | extern void ax25_register_pid(struct ax25_protocol *ap); | ||
337 | extern void ax25_protocol_release(unsigned int); | 344 | extern void ax25_protocol_release(unsigned int); |
338 | extern int __must_check ax25_linkfail_register(void (*)(ax25_cb *, int)); | 345 | extern int __must_check ax25_linkfail_register(void (*)(ax25_cb *, int)); |
339 | extern void ax25_linkfail_release(void (*)(ax25_cb *, int)); | 346 | extern void ax25_linkfail_release(void (*)(ax25_cb *, int)); |