Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Copyright (C) 2011 Novell Inc. |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify it |
| 6 | * under the terms of the GNU General Public License version 2 as published by |
| 7 | * the Free Software Foundation. |
| 8 | */ |
| 9 | |
David Howells | fb5bb2c3 | 2015-07-07 15:04:44 +0100 | [diff] [blame] | 10 | #include <linux/module.h> |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 11 | #include <linux/fs.h> |
| 12 | #include <linux/slab.h> |
| 13 | #include <linux/file.h> |
| 14 | #include <linux/splice.h> |
| 15 | #include <linux/xattr.h> |
| 16 | #include <linux/security.h> |
| 17 | #include <linux/uaccess.h> |
| 18 | #include <linux/sched.h> |
| 19 | #include <linux/namei.h> |
David Howells | fb5bb2c3 | 2015-07-07 15:04:44 +0100 | [diff] [blame] | 20 | #include <linux/fdtable.h> |
| 21 | #include <linux/ratelimit.h> |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 22 | #include "overlayfs.h" |
| 23 | |
| 24 | #define OVL_COPY_UP_CHUNK_SIZE (1 << 20) |
| 25 | |
David Howells | fb5bb2c3 | 2015-07-07 15:04:44 +0100 | [diff] [blame] | 26 | static bool __read_mostly ovl_check_copy_up; |
| 27 | module_param_named(check_copy_up, ovl_check_copy_up, bool, |
| 28 | S_IWUSR | S_IRUGO); |
| 29 | MODULE_PARM_DESC(ovl_check_copy_up, |
| 30 | "Warn on copy-up when causing process also has a R/O fd open"); |
| 31 | |
| 32 | static int ovl_check_fd(const void *data, struct file *f, unsigned int fd) |
| 33 | { |
| 34 | const struct dentry *dentry = data; |
| 35 | |
| 36 | if (f->f_inode == d_inode(dentry)) |
| 37 | pr_warn_ratelimited("overlayfs: Warning: Copying up %pD, but open R/O on fd %u which will cease to be coherent [pid=%d %s]\n", |
| 38 | f, fd, current->pid, current->comm); |
| 39 | return 0; |
| 40 | } |
| 41 | |
| 42 | /* |
| 43 | * Check the fds open by this process and warn if something like the following |
| 44 | * scenario is about to occur: |
| 45 | * |
| 46 | * fd1 = open("foo", O_RDONLY); |
| 47 | * fd2 = open("foo", O_RDWR); |
| 48 | */ |
| 49 | static void ovl_do_check_copy_up(struct dentry *dentry) |
| 50 | { |
| 51 | if (ovl_check_copy_up) |
| 52 | iterate_fd(current->files, 0, ovl_check_fd, dentry); |
| 53 | } |
| 54 | |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 55 | int ovl_copy_xattr(struct dentry *old, struct dentry *new) |
| 56 | { |
Vito Caputo | e4ad29f | 2015-10-24 07:19:46 -0500 | [diff] [blame] | 57 | ssize_t list_size, size, value_size = 0; |
| 58 | char *buf, *name, *value = NULL; |
| 59 | int uninitialized_var(error); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 60 | |
| 61 | if (!old->d_inode->i_op->getxattr || |
| 62 | !new->d_inode->i_op->getxattr) |
| 63 | return 0; |
| 64 | |
| 65 | list_size = vfs_listxattr(old, NULL, 0); |
| 66 | if (list_size <= 0) { |
| 67 | if (list_size == -EOPNOTSUPP) |
| 68 | return 0; |
| 69 | return list_size; |
| 70 | } |
| 71 | |
| 72 | buf = kzalloc(list_size, GFP_KERNEL); |
| 73 | if (!buf) |
| 74 | return -ENOMEM; |
| 75 | |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 76 | list_size = vfs_listxattr(old, buf, list_size); |
| 77 | if (list_size <= 0) { |
| 78 | error = list_size; |
Vito Caputo | e4ad29f | 2015-10-24 07:19:46 -0500 | [diff] [blame] | 79 | goto out; |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 80 | } |
| 81 | |
| 82 | for (name = buf; name < (buf + list_size); name += strlen(name) + 1) { |
Vito Caputo | e4ad29f | 2015-10-24 07:19:46 -0500 | [diff] [blame] | 83 | retry: |
| 84 | size = vfs_getxattr(old, name, value, value_size); |
| 85 | if (size == -ERANGE) |
| 86 | size = vfs_getxattr(old, name, NULL, 0); |
| 87 | |
Miklos Szeredi | 97daf8b | 2015-11-10 17:08:41 +0100 | [diff] [blame] | 88 | if (size < 0) { |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 89 | error = size; |
Vito Caputo | e4ad29f | 2015-10-24 07:19:46 -0500 | [diff] [blame] | 90 | break; |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 91 | } |
Vito Caputo | e4ad29f | 2015-10-24 07:19:46 -0500 | [diff] [blame] | 92 | |
| 93 | if (size > value_size) { |
| 94 | void *new; |
| 95 | |
| 96 | new = krealloc(value, size, GFP_KERNEL); |
| 97 | if (!new) { |
| 98 | error = -ENOMEM; |
| 99 | break; |
| 100 | } |
| 101 | value = new; |
| 102 | value_size = size; |
| 103 | goto retry; |
| 104 | } |
| 105 | |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 106 | error = vfs_setxattr(new, name, value, size, 0); |
| 107 | if (error) |
Vito Caputo | e4ad29f | 2015-10-24 07:19:46 -0500 | [diff] [blame] | 108 | break; |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 109 | } |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 110 | kfree(value); |
| 111 | out: |
| 112 | kfree(buf); |
| 113 | return error; |
| 114 | } |
| 115 | |
| 116 | static int ovl_copy_up_data(struct path *old, struct path *new, loff_t len) |
| 117 | { |
| 118 | struct file *old_file; |
| 119 | struct file *new_file; |
| 120 | loff_t old_pos = 0; |
| 121 | loff_t new_pos = 0; |
| 122 | int error = 0; |
| 123 | |
| 124 | if (len == 0) |
| 125 | return 0; |
| 126 | |
David Howells | 0480334 | 2015-09-18 11:45:12 +0100 | [diff] [blame] | 127 | old_file = ovl_path_open(old, O_LARGEFILE | O_RDONLY); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 128 | if (IS_ERR(old_file)) |
| 129 | return PTR_ERR(old_file); |
| 130 | |
David Howells | 0480334 | 2015-09-18 11:45:12 +0100 | [diff] [blame] | 131 | new_file = ovl_path_open(new, O_LARGEFILE | O_WRONLY); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 132 | if (IS_ERR(new_file)) { |
| 133 | error = PTR_ERR(new_file); |
| 134 | goto out_fput; |
| 135 | } |
| 136 | |
| 137 | /* FIXME: copy up sparse files efficiently */ |
| 138 | while (len) { |
| 139 | size_t this_len = OVL_COPY_UP_CHUNK_SIZE; |
| 140 | long bytes; |
| 141 | |
| 142 | if (len < this_len) |
| 143 | this_len = len; |
| 144 | |
| 145 | if (signal_pending_state(TASK_KILLABLE, current)) { |
| 146 | error = -EINTR; |
| 147 | break; |
| 148 | } |
| 149 | |
| 150 | bytes = do_splice_direct(old_file, &old_pos, |
| 151 | new_file, &new_pos, |
| 152 | this_len, SPLICE_F_MOVE); |
| 153 | if (bytes <= 0) { |
| 154 | error = bytes; |
| 155 | break; |
| 156 | } |
| 157 | WARN_ON(old_pos != new_pos); |
| 158 | |
| 159 | len -= bytes; |
| 160 | } |
| 161 | |
| 162 | fput(new_file); |
| 163 | out_fput: |
| 164 | fput(old_file); |
| 165 | return error; |
| 166 | } |
| 167 | |
| 168 | static char *ovl_read_symlink(struct dentry *realdentry) |
| 169 | { |
| 170 | int res; |
| 171 | char *buf; |
| 172 | struct inode *inode = realdentry->d_inode; |
| 173 | mm_segment_t old_fs; |
| 174 | |
| 175 | res = -EINVAL; |
| 176 | if (!inode->i_op->readlink) |
| 177 | goto err; |
| 178 | |
| 179 | res = -ENOMEM; |
| 180 | buf = (char *) __get_free_page(GFP_KERNEL); |
| 181 | if (!buf) |
| 182 | goto err; |
| 183 | |
| 184 | old_fs = get_fs(); |
| 185 | set_fs(get_ds()); |
| 186 | /* The cast to a user pointer is valid due to the set_fs() */ |
| 187 | res = inode->i_op->readlink(realdentry, |
| 188 | (char __user *)buf, PAGE_SIZE - 1); |
| 189 | set_fs(old_fs); |
| 190 | if (res < 0) { |
| 191 | free_page((unsigned long) buf); |
| 192 | goto err; |
| 193 | } |
| 194 | buf[res] = '\0'; |
| 195 | |
| 196 | return buf; |
| 197 | |
| 198 | err: |
| 199 | return ERR_PTR(res); |
| 200 | } |
| 201 | |
| 202 | static int ovl_set_timestamps(struct dentry *upperdentry, struct kstat *stat) |
| 203 | { |
| 204 | struct iattr attr = { |
| 205 | .ia_valid = |
| 206 | ATTR_ATIME | ATTR_MTIME | ATTR_ATIME_SET | ATTR_MTIME_SET, |
| 207 | .ia_atime = stat->atime, |
| 208 | .ia_mtime = stat->mtime, |
| 209 | }; |
| 210 | |
| 211 | return notify_change(upperdentry, &attr, NULL); |
| 212 | } |
| 213 | |
| 214 | int ovl_set_attr(struct dentry *upperdentry, struct kstat *stat) |
| 215 | { |
| 216 | int err = 0; |
| 217 | |
| 218 | if (!S_ISLNK(stat->mode)) { |
| 219 | struct iattr attr = { |
| 220 | .ia_valid = ATTR_MODE, |
| 221 | .ia_mode = stat->mode, |
| 222 | }; |
| 223 | err = notify_change(upperdentry, &attr, NULL); |
| 224 | } |
| 225 | if (!err) { |
| 226 | struct iattr attr = { |
| 227 | .ia_valid = ATTR_UID | ATTR_GID, |
| 228 | .ia_uid = stat->uid, |
| 229 | .ia_gid = stat->gid, |
| 230 | }; |
| 231 | err = notify_change(upperdentry, &attr, NULL); |
| 232 | } |
| 233 | if (!err) |
| 234 | ovl_set_timestamps(upperdentry, stat); |
| 235 | |
| 236 | return err; |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir, |
| 240 | struct dentry *dentry, struct path *lowerpath, |
Al Viro | 0f7ff2d | 2015-12-06 12:31:07 -0500 | [diff] [blame] | 241 | struct kstat *stat, const char *link) |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 242 | { |
| 243 | struct inode *wdir = workdir->d_inode; |
| 244 | struct inode *udir = upperdir->d_inode; |
| 245 | struct dentry *newdentry = NULL; |
| 246 | struct dentry *upper = NULL; |
| 247 | umode_t mode = stat->mode; |
| 248 | int err; |
Vivek Goyal | d8ad8b4 | 2016-07-13 11:13:56 -0400 | [diff] [blame^] | 249 | const struct cred *old_creds = NULL; |
| 250 | struct cred *new_creds = NULL; |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 251 | |
| 252 | newdentry = ovl_lookup_temp(workdir, dentry); |
| 253 | err = PTR_ERR(newdentry); |
| 254 | if (IS_ERR(newdentry)) |
| 255 | goto out; |
| 256 | |
| 257 | upper = lookup_one_len(dentry->d_name.name, upperdir, |
| 258 | dentry->d_name.len); |
| 259 | err = PTR_ERR(upper); |
| 260 | if (IS_ERR(upper)) |
| 261 | goto out1; |
| 262 | |
Vivek Goyal | d8ad8b4 | 2016-07-13 11:13:56 -0400 | [diff] [blame^] | 263 | err = security_inode_copy_up(dentry, &new_creds); |
| 264 | if (err < 0) |
| 265 | goto out2; |
| 266 | |
| 267 | if (new_creds) |
| 268 | old_creds = override_creds(new_creds); |
| 269 | |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 270 | /* Can't properly set mode on creation because of the umask */ |
| 271 | stat->mode &= S_IFMT; |
| 272 | err = ovl_create_real(wdir, newdentry, stat, link, NULL, true); |
| 273 | stat->mode = mode; |
Vivek Goyal | d8ad8b4 | 2016-07-13 11:13:56 -0400 | [diff] [blame^] | 274 | |
| 275 | if (new_creds) { |
| 276 | revert_creds(old_creds); |
| 277 | put_cred(new_creds); |
| 278 | } |
| 279 | |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 280 | if (err) |
| 281 | goto out2; |
| 282 | |
| 283 | if (S_ISREG(stat->mode)) { |
| 284 | struct path upperpath; |
Sohom Bhattacharjee | f134f24 | 2016-03-15 20:57:59 +0530 | [diff] [blame] | 285 | |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 286 | ovl_path_upper(dentry, &upperpath); |
| 287 | BUG_ON(upperpath.dentry != NULL); |
| 288 | upperpath.dentry = newdentry; |
| 289 | |
| 290 | err = ovl_copy_up_data(lowerpath, &upperpath, stat->size); |
| 291 | if (err) |
| 292 | goto out_cleanup; |
| 293 | } |
| 294 | |
| 295 | err = ovl_copy_xattr(lowerpath->dentry, newdentry); |
| 296 | if (err) |
| 297 | goto out_cleanup; |
| 298 | |
Al Viro | 5955102 | 2016-01-22 15:40:57 -0500 | [diff] [blame] | 299 | inode_lock(newdentry->d_inode); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 300 | err = ovl_set_attr(newdentry, stat); |
Al Viro | 5955102 | 2016-01-22 15:40:57 -0500 | [diff] [blame] | 301 | inode_unlock(newdentry->d_inode); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 302 | if (err) |
| 303 | goto out_cleanup; |
| 304 | |
| 305 | err = ovl_do_rename(wdir, newdentry, udir, upper, 0); |
| 306 | if (err) |
| 307 | goto out_cleanup; |
| 308 | |
| 309 | ovl_dentry_update(dentry, newdentry); |
Miklos Szeredi | 39b681f | 2016-07-29 12:05:24 +0200 | [diff] [blame] | 310 | ovl_inode_update(d_inode(dentry), d_inode(newdentry)); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 311 | newdentry = NULL; |
| 312 | |
| 313 | /* |
| 314 | * Non-directores become opaque when copied up. |
| 315 | */ |
| 316 | if (!S_ISDIR(stat->mode)) |
| 317 | ovl_dentry_set_opaque(dentry, true); |
| 318 | out2: |
| 319 | dput(upper); |
| 320 | out1: |
| 321 | dput(newdentry); |
| 322 | out: |
| 323 | return err; |
| 324 | |
| 325 | out_cleanup: |
| 326 | ovl_cleanup(wdir, newdentry); |
David Howells | ab79efa | 2015-09-18 11:45:22 +0100 | [diff] [blame] | 327 | goto out2; |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 328 | } |
| 329 | |
| 330 | /* |
| 331 | * Copy up a single dentry |
| 332 | * |
| 333 | * Directory renames only allowed on "pure upper" (already created on |
| 334 | * upper filesystem, never copied up). Directories which are on lower or |
| 335 | * are merged may not be renamed. For these -EXDEV is returned and |
| 336 | * userspace has to deal with it. This means, when copying up a |
| 337 | * directory we can rely on it and ancestors being stable. |
| 338 | * |
| 339 | * Non-directory renames start with copy up of source if necessary. The |
| 340 | * actual rename will only proceed once the copy up was successful. Copy |
| 341 | * up uses upper parent i_mutex for exclusion. Since rename can change |
| 342 | * d_parent it is possible that the copy up will lock the old parent. At |
| 343 | * that point the file will have already been copied up anyway. |
| 344 | */ |
| 345 | int ovl_copy_up_one(struct dentry *parent, struct dentry *dentry, |
Al Viro | 0f7ff2d | 2015-12-06 12:31:07 -0500 | [diff] [blame] | 346 | struct path *lowerpath, struct kstat *stat) |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 347 | { |
| 348 | struct dentry *workdir = ovl_workdir(dentry); |
| 349 | int err; |
| 350 | struct kstat pstat; |
| 351 | struct path parentpath; |
| 352 | struct dentry *upperdir; |
| 353 | struct dentry *upperdentry; |
| 354 | const struct cred *old_cred; |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 355 | char *link = NULL; |
| 356 | |
Miklos Szeredi | cc6f67b | 2015-05-19 14:30:12 +0200 | [diff] [blame] | 357 | if (WARN_ON(!workdir)) |
| 358 | return -EROFS; |
| 359 | |
David Howells | fb5bb2c3 | 2015-07-07 15:04:44 +0100 | [diff] [blame] | 360 | ovl_do_check_copy_up(lowerpath->dentry); |
| 361 | |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 362 | ovl_path_upper(parent, &parentpath); |
| 363 | upperdir = parentpath.dentry; |
| 364 | |
| 365 | err = vfs_getattr(&parentpath, &pstat); |
| 366 | if (err) |
| 367 | return err; |
| 368 | |
| 369 | if (S_ISLNK(stat->mode)) { |
| 370 | link = ovl_read_symlink(lowerpath->dentry); |
| 371 | if (IS_ERR(link)) |
| 372 | return PTR_ERR(link); |
| 373 | } |
| 374 | |
Antonio Murdaca | 3fe6e52 | 2016-04-07 15:48:25 +0200 | [diff] [blame] | 375 | old_cred = ovl_override_creds(dentry->d_sb); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 376 | |
| 377 | err = -EIO; |
| 378 | if (lock_rename(workdir, upperdir) != NULL) { |
| 379 | pr_err("overlayfs: failed to lock workdir+upperdir\n"); |
| 380 | goto out_unlock; |
| 381 | } |
| 382 | upperdentry = ovl_dentry_upper(dentry); |
| 383 | if (upperdentry) { |
Al Viro | 0f7ff2d | 2015-12-06 12:31:07 -0500 | [diff] [blame] | 384 | /* Raced with another copy-up? Nothing to do, then... */ |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 385 | err = 0; |
Al Viro | 0f7ff2d | 2015-12-06 12:31:07 -0500 | [diff] [blame] | 386 | goto out_unlock; |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 387 | } |
| 388 | |
| 389 | err = ovl_copy_up_locked(workdir, upperdir, dentry, lowerpath, |
Al Viro | 0f7ff2d | 2015-12-06 12:31:07 -0500 | [diff] [blame] | 390 | stat, link); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 391 | if (!err) { |
| 392 | /* Restore timestamps on parent (best effort) */ |
| 393 | ovl_set_timestamps(upperdir, &pstat); |
| 394 | } |
| 395 | out_unlock: |
| 396 | unlock_rename(workdir, upperdir); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 397 | revert_creds(old_cred); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 398 | |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 399 | if (link) |
| 400 | free_page((unsigned long) link); |
| 401 | |
| 402 | return err; |
| 403 | } |
| 404 | |
| 405 | int ovl_copy_up(struct dentry *dentry) |
| 406 | { |
| 407 | int err; |
| 408 | |
| 409 | err = 0; |
| 410 | while (!err) { |
| 411 | struct dentry *next; |
| 412 | struct dentry *parent; |
| 413 | struct path lowerpath; |
| 414 | struct kstat stat; |
| 415 | enum ovl_path_type type = ovl_path_type(dentry); |
| 416 | |
Miklos Szeredi | 1afaba1 | 2014-12-13 00:59:42 +0100 | [diff] [blame] | 417 | if (OVL_TYPE_UPPER(type)) |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 418 | break; |
| 419 | |
| 420 | next = dget(dentry); |
| 421 | /* find the topmost dentry not yet copied up */ |
| 422 | for (;;) { |
| 423 | parent = dget_parent(next); |
| 424 | |
| 425 | type = ovl_path_type(parent); |
Miklos Szeredi | 1afaba1 | 2014-12-13 00:59:42 +0100 | [diff] [blame] | 426 | if (OVL_TYPE_UPPER(type)) |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 427 | break; |
| 428 | |
| 429 | dput(next); |
| 430 | next = parent; |
| 431 | } |
| 432 | |
| 433 | ovl_path_lower(next, &lowerpath); |
| 434 | err = vfs_getattr(&lowerpath, &stat); |
| 435 | if (!err) |
Al Viro | 0f7ff2d | 2015-12-06 12:31:07 -0500 | [diff] [blame] | 436 | err = ovl_copy_up_one(parent, next, &lowerpath, &stat); |
Miklos Szeredi | e9be9d5 | 2014-10-24 00:14:38 +0200 | [diff] [blame] | 437 | |
| 438 | dput(parent); |
| 439 | dput(next); |
| 440 | } |
| 441 | |
| 442 | return err; |
| 443 | } |