Showing error 1762

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: fs/pipe.c
Line in file: 979
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 20:24:52 UTC


Source:

 949        f->f_version = 0;
 950
 951        return f;
 952
 953 err_dentry:
 954        free_pipe_info(inode);
 955        dput(dentry);
 956        return ERR_PTR(err);
 957
 958 err_inode:
 959        free_pipe_info(inode);
 960        iput(inode);
 961 err:
 962        return ERR_PTR(err);
 963}
 964
 965void free_write_pipe(struct file *f)
 966{
 967        free_pipe_info(f->f_dentry->d_inode);
 968        path_put(&f->f_path);
 969        put_filp(f);
 970}
 971
 972struct file *create_read_pipe(struct file *wrf, int flags)
 973{
 974        struct file *f = get_empty_filp();
 975        if (!f)
 976                return ERR_PTR(-ENFILE);
 977
 978        /* Grab pipe from the writer */
 979        f->f_path = wrf->f_path;
 980        path_get(&wrf->f_path);
 981        f->f_mapping = wrf->f_path.dentry->d_inode->i_mapping;
 982
 983        f->f_pos = 0;
 984        f->f_flags = O_RDONLY | (flags & O_NONBLOCK);
 985        f->f_op = &read_pipefifo_fops;
 986        f->f_mode = FMODE_READ;
 987        f->f_version = 0;
 988
 989        return f;
Show full sources