aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-12-14 18:49:28 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-18 00:59:07 -0500
commitc9266b99e2def0a456766220df09713f8e765891 (patch)
tree4685070018632e00437fbb368b28d6cc1ebc467e
parentbd2b334378530f6dbe03f6325b8c885524e298a3 (diff)
[AX.25]: Mark all kmalloc users __must_check
The recent fix 0506d4068bad834aab1141b5dc5e748eb175c6b3 made obvious that error values were not being propagated through the AX.25 stack. To help with that this patch marks all kmalloc users in the AX.25, NETROM and ROSE stacks as __must_check. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/ax25.h11
-rw-r--r--include/net/rose.h4
-rw-r--r--net/ax25/af_ax25.c4
-rw-r--r--net/ax25/ax25_route.c2
-rw-r--r--net/netrom/nr_route.c8
-rw-r--r--net/rose/rose_route.c2
6 files changed, 17 insertions, 14 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 14b72d868f0..ced202f0729 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -277,7 +277,7 @@ struct sock *ax25_get_socket(ax25_address *, ax25_address *, int);
277extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *); 277extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *);
278extern void ax25_send_to_raw(ax25_address *, struct sk_buff *, int); 278extern void ax25_send_to_raw(ax25_address *, struct sk_buff *, int);
279extern void ax25_destroy_socket(ax25_cb *); 279extern void ax25_destroy_socket(ax25_cb *);
280extern ax25_cb *ax25_create_cb(void); 280extern ax25_cb * __must_check ax25_create_cb(void);
281extern void ax25_fillin_cb(ax25_cb *, ax25_dev *); 281extern void ax25_fillin_cb(ax25_cb *, ax25_dev *);
282extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *); 282extern struct sock *ax25_make_new(struct sock *, struct ax25_dev *);
283 283
@@ -333,11 +333,12 @@ 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 ax25_protocol_register(unsigned int, int (*)(struct sk_buff *, ax25_cb *)); 336extern int __must_check ax25_protocol_register(unsigned int, int (*)(struct sk_buff *, ax25_cb *));
337extern void ax25_protocol_release(unsigned int); 337extern void ax25_protocol_release(unsigned int);
338extern int ax25_linkfail_register(void (*)(ax25_cb *, int)); 338extern int __must_check ax25_linkfail_register(void (*)(ax25_cb *, int));
339extern void ax25_linkfail_release(void (*)(ax25_cb *, int)); 339extern void ax25_linkfail_release(void (*)(ax25_cb *, int));
340extern int ax25_listen_register(ax25_address *, struct net_device *); 340extern int __must_check ax25_listen_register(ax25_address *,
341 struct net_device *);
341extern void ax25_listen_release(ax25_address *, struct net_device *); 342extern void ax25_listen_release(ax25_address *, struct net_device *);
342extern int (*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *); 343extern int (*ax25_protocol_function(unsigned int))(struct sk_buff *, ax25_cb *);
343extern int ax25_listen_mine(ax25_address *, struct net_device *); 344extern int ax25_listen_mine(ax25_address *, struct net_device *);
@@ -415,7 +416,7 @@ extern unsigned long ax25_display_timer(struct timer_list *);
415/* ax25_uid.c */ 416/* ax25_uid.c */
416extern int ax25_uid_policy; 417extern int ax25_uid_policy;
417extern ax25_uid_assoc *ax25_findbyuid(uid_t); 418extern ax25_uid_assoc *ax25_findbyuid(uid_t);
418extern int ax25_uid_ioctl(int, struct sockaddr_ax25 *); 419extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *);
419extern struct file_operations ax25_uid_fops; 420extern struct file_operations ax25_uid_fops;
420extern void ax25_uid_free(void); 421extern void ax25_uid_free(void);
421 422
diff --git a/include/net/rose.h b/include/net/rose.h
index 012b09ed240..0143796a3e3 100644
--- a/include/net/rose.h
+++ b/include/net/rose.h
@@ -193,8 +193,8 @@ extern struct file_operations rose_neigh_fops;
193extern struct file_operations rose_nodes_fops; 193extern struct file_operations rose_nodes_fops;
194extern struct file_operations rose_routes_fops; 194extern struct file_operations rose_routes_fops;
195 195
196extern int rose_add_loopback_neigh(void); 196extern int __must_check rose_add_loopback_neigh(void);
197extern int rose_add_loopback_node(rose_address *); 197extern int __must_check rose_add_loopback_node(rose_address *);
198extern void rose_del_loopback_node(rose_address *); 198extern void rose_del_loopback_node(rose_address *);
199extern void rose_rt_device_down(struct net_device *); 199extern void rose_rt_device_down(struct net_device *);
200extern void rose_link_device_down(struct net_device *); 200extern void rose_link_device_down(struct net_device *);
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 6cabf6d8a75..42233df2b09 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1088,8 +1088,8 @@ out:
1088/* 1088/*
1089 * FIXME: nonblock behaviour looks like it may have a bug. 1089 * FIXME: nonblock behaviour looks like it may have a bug.
1090 */ 1090 */
1091static int ax25_connect(struct socket *sock, struct sockaddr *uaddr, 1091static int __must_check ax25_connect(struct socket *sock,
1092 int addr_len, int flags) 1092 struct sockaddr *uaddr, int addr_len, int flags)
1093{ 1093{
1094 struct sock *sk = sock->sk; 1094 struct sock *sk = sock->sk;
1095 ax25_cb *ax25 = ax25_sk(sk), *ax25t; 1095 ax25_cb *ax25 = ax25_sk(sk), *ax25t;
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
index 8580356ace5..0a0381622b1 100644
--- a/net/ax25/ax25_route.c
+++ b/net/ax25/ax25_route.c
@@ -71,7 +71,7 @@ void ax25_rt_device_down(struct net_device *dev)
71 write_unlock(&ax25_route_lock); 71 write_unlock(&ax25_route_lock);
72} 72}
73 73
74static int ax25_rt_add(struct ax25_routes_struct *route) 74static int __must_check ax25_rt_add(struct ax25_routes_struct *route)
75{ 75{
76 ax25_route *ax25_rt; 76 ax25_route *ax25_rt;
77 ax25_dev *ax25_dev; 77 ax25_dev *ax25_dev;
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 0096105bcd4..c6aa7aa0323 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -87,8 +87,9 @@ static void nr_remove_neigh(struct nr_neigh *);
87 * Add a new route to a node, and in the process add the node and the 87 * Add a new route to a node, and in the process add the node and the
88 * neighbour if it is new. 88 * neighbour if it is new.
89 */ 89 */
90static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax25, 90static int __must_check nr_add_node(ax25_address *nr, const char *mnemonic,
91 ax25_digi *ax25_digi, struct net_device *dev, int quality, int obs_count) 91 ax25_address *ax25, ax25_digi *ax25_digi, struct net_device *dev,
92 int quality, int obs_count)
92{ 93{
93 struct nr_node *nr_node; 94 struct nr_node *nr_node;
94 struct nr_neigh *nr_neigh; 95 struct nr_neigh *nr_neigh;
@@ -406,7 +407,8 @@ static int nr_del_node(ax25_address *callsign, ax25_address *neighbour, struct n
406/* 407/*
407 * Lock a neighbour with a quality. 408 * Lock a neighbour with a quality.
408 */ 409 */
409static int nr_add_neigh(ax25_address *callsign, ax25_digi *ax25_digi, struct net_device *dev, unsigned int quality) 410static int __must_check nr_add_neigh(ax25_address *callsign,
411 ax25_digi *ax25_digi, struct net_device *dev, unsigned int quality)
410{ 412{
411 struct nr_neigh *nr_neigh; 413 struct nr_neigh *nr_neigh;
412 414
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c
index 7252344779a..d02985b00a2 100644
--- a/net/rose/rose_route.c
+++ b/net/rose/rose_route.c
@@ -52,7 +52,7 @@ struct rose_neigh *rose_loopback_neigh;
52 * Add a new route to a node, and in the process add the node and the 52 * Add a new route to a node, and in the process add the node and the
53 * neighbour if it is new. 53 * neighbour if it is new.
54 */ 54 */
55static int rose_add_node(struct rose_route_struct *rose_route, 55static int __must_check rose_add_node(struct rose_route_struct *rose_route,
56 struct net_device *dev) 56 struct net_device *dev)
57{ 57{
58 struct rose_node *rose_node, *rose_tmpn, *rose_tmpp; 58 struct rose_node *rose_node, *rose_tmpn, *rose_tmpp;