Merge tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
"Here are some kernfs fixes for 3.15-rc3 that resolve some reported
problems. Nothing huge, but all needed"

* tag 'driver-core-3.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
s390/ccwgroup: Fix memory corruption
kernfs: add back missing error check in kernfs_fop_mmap()
kernfs: fix a subdir count leak

+9 -4
+1 -1
arch/s390/include/asm/ccwgroup.h
··· 22 22 /* public: */ 23 23 unsigned int count; 24 24 struct device dev; 25 - struct ccw_device *cdev[0]; 26 25 struct work_struct ungroup_work; 26 + struct ccw_device *cdev[0]; 27 27 }; 28 28 29 29 /**
+6 -3
fs/kernfs/dir.c
··· 232 232 struct rb_node **node = &kn->parent->dir.children.rb_node; 233 233 struct rb_node *parent = NULL; 234 234 235 - if (kernfs_type(kn) == KERNFS_DIR) 236 - kn->parent->dir.subdirs++; 237 - 238 235 while (*node) { 239 236 struct kernfs_node *pos; 240 237 int result; ··· 246 249 else 247 250 return -EEXIST; 248 251 } 252 + 249 253 /* add new node and rebalance the tree */ 250 254 rb_link_node(&kn->rb, parent, node); 251 255 rb_insert_color(&kn->rb, &kn->parent->dir.children); 256 + 257 + /* successfully added, account subdir number */ 258 + if (kernfs_type(kn) == KERNFS_DIR) 259 + kn->parent->dir.subdirs++; 260 + 252 261 return 0; 253 262 } 254 263
+2
fs/kernfs/file.c
··· 484 484 485 485 ops = kernfs_ops(of->kn); 486 486 rc = ops->mmap(of, vma); 487 + if (rc) 488 + goto out_put; 487 489 488 490 /* 489 491 * PowerPC's pci_mmap of legacy_mem uses shmem_zero_setup()