aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ax25.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-12-14 18:50:01 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-18 00:59:08 -0500
commit8d5cf596d10d740b69b5f4bbdb54b85abf75810d (patch)
treef0fd6a296f1b90d5fb1898ce1932c6ec5d245465 /include/net/ax25.h
parentc9266b99e2def0a456766220df09713f8e765891 (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.h9
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 *);
333extern void ax25_ds_idletimer_expiry(ax25_cb *); 333extern void ax25_ds_idletimer_expiry(ax25_cb *);
334 334
335/* ax25_iface.c */ 335/* ax25_iface.c */
336extern int __must_check ax25_protocol_register(unsigned int, int (*)(struct sk_buff *, ax25_cb *)); 336
337struct ax25_protocol {
338 struct ax25_protocol *next;
339 unsigned int pid;
340 int (*func)(struct sk_buff *, ax25_cb *);
341};
342
343extern void ax25_register_pid(struct ax25_protocol *ap);
337extern void ax25_protocol_release(unsigned int); 344extern void ax25_protocol_release(unsigned int);
338extern int __must_check ax25_linkfail_register(void (*)(ax25_cb *, int)); 345extern int __must_check ax25_linkfail_register(void (*)(ax25_cb *, int));
339extern void ax25_linkfail_release(void (*)(ax25_cb *, int)); 346extern void ax25_linkfail_release(void (*)(ax25_cb *, int));