Showing error 1586

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: fs/splice.c
Line in file: 1387
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-05-29 20:11:37 UTC


Source:

1357
1358                sd.len = 0;
1359                sd.total_len = len;
1360                sd.flags = flags;
1361                sd.u.userptr = base;
1362                sd.pos = 0;
1363
1364                size = __splice_from_pipe(pipe, &sd, pipe_to_user);
1365                if (size < 0) {
1366                        if (!ret)
1367                                ret = size;
1368
1369                        break;
1370                }
1371
1372                ret += size;
1373
1374                if (size < len)
1375                        break;
1376
1377                nr_segs--;
1378                iov++;
1379        }
1380
1381        if (pipe->inode)
1382                mutex_unlock(&pipe->inode->i_mutex);
1383
1384        if (!ret)
1385                ret = error;
1386
1387        return ret;
1388}
1389
1390/*
1391 * vmsplice splices a user address range into a pipe. It can be thought of
1392 * as splice-from-memory, where the regular splice is splice-from-file (or
1393 * to file). In both cases the output is a pipe, naturally.
1394 */
1395static long vmsplice_to_pipe(struct file *file, const struct iovec __user *iov,
1396                             unsigned long nr_segs, unsigned int flags)
1397{
Show full sources