Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull driver core fix from Greg KH:
"Here's a single sysfs fix for 3.13-rc5 that resolves a lockdep issue
in sysfs that has been reported"

* tag 'driver-core-3.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
sysfs: give different locking key to regular and bin files

+3 -5
+3 -5
fs/sysfs/file.c
··· 609 609 struct sysfs_dirent *attr_sd = file->f_path.dentry->d_fsdata; 610 610 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; 611 611 struct sysfs_open_file *of; 612 - bool has_read, has_write, has_mmap; 612 + bool has_read, has_write; 613 613 int error = -EACCES; 614 614 615 615 /* need attr_sd for attr and ops, its parent for kobj */ ··· 621 621 622 622 has_read = battr->read || battr->mmap; 623 623 has_write = battr->write || battr->mmap; 624 - has_mmap = battr->mmap; 625 624 } else { 626 625 const struct sysfs_ops *ops = sysfs_file_ops(attr_sd); 627 626 ··· 632 633 633 634 has_read = ops->show; 634 635 has_write = ops->store; 635 - has_mmap = false; 636 636 } 637 637 638 638 /* check perms and supported operations */ ··· 659 661 * open file has a separate mutex, it's okay as long as those don't 660 662 * happen on the same file. At this point, we can't easily give 661 663 * each file a separate locking class. Let's differentiate on 662 - * whether the file has mmap or not for now. 664 + * whether the file is bin or not for now. 663 665 */ 664 - if (has_mmap) 666 + if (sysfs_is_bin(attr_sd)) 665 667 mutex_init(&of->mutex); 666 668 else 667 669 mutex_init(&of->mutex);