Showing error 1763

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


Source:

225 * @tree_list : list of heads of trees to be attached.
226 */
227int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry,
228                    struct vfsmount *source_mnt, struct list_head *tree_list)
229{
230        struct vfsmount *m, *child;
231        int ret = 0;
232        struct vfsmount *prev_dest_mnt = dest_mnt;
233        struct vfsmount *prev_src_mnt  = source_mnt;
234        LIST_HEAD(tmp_list);
235        LIST_HEAD(umount_list);
236
237        for (m = propagation_next(dest_mnt, dest_mnt); m;
238                        m = propagation_next(m, dest_mnt)) {
239                int type;
240                struct vfsmount *source;
241
242                if (IS_MNT_NEW(m))
243                        continue;
244
245                source =  get_source(m, prev_dest_mnt, prev_src_mnt, &type);
246
247                if (!(child = copy_tree(source, source->mnt_root, type))) {
248                        ret = -ENOMEM;
249                        list_splice(tree_list, tmp_list.prev);
250                        goto out;
251                }
252
253                if (is_subdir(dest_dentry, m->mnt_root)) {
254                        mnt_set_mountpoint(m, dest_dentry, child);
255                        list_add_tail(&child->mnt_hash, tree_list);
256                } else {
257                        /*
258                         * This can happen if the parent mount was bind mounted
259                         * on some subdirectory of a shared/slave mount.
260                         */
261                        list_add_tail(&child->mnt_hash, &tmp_list);
262                }
263                prev_dest_mnt = m;
264                prev_src_mnt  = child;
265        }
Show full sources