Showing error 1462

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: net/ax25/ax25_route.c
Line in file: 259
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-21 20:30:05 UTC


Source:

229        case SIOCADDRT:
230                if (copy_from_user(&route, arg, sizeof(route)))
231                        return -EFAULT;
232                return ax25_rt_add(&route);
233
234        case SIOCDELRT:
235                if (copy_from_user(&route, arg, sizeof(route)))
236                        return -EFAULT;
237                return ax25_rt_del(&route);
238
239        case SIOCAX25OPTRT:
240                if (copy_from_user(&rt_option, arg, sizeof(rt_option)))
241                        return -EFAULT;
242                return ax25_rt_opt(&rt_option);
243
244        default:
245                return -EINVAL;
246        }
247}
248
249#ifdef CONFIG_PROC_FS
250
251static void *ax25_rt_seq_start(struct seq_file *seq, loff_t *pos)
252        __acquires(ax25_route_lock)
253{
254        struct ax25_route *ax25_rt;
255        int i = 1;
256
257        read_lock(&ax25_route_lock);
258        if (*pos == 0)
259                return SEQ_START_TOKEN;
260
261        for (ax25_rt = ax25_route_list; ax25_rt != NULL; ax25_rt = ax25_rt->next) {
262                if (i == *pos)
263                        return ax25_rt;
264                ++i;
265        }
266
267        return NULL;
268}
269
Show full sources