mirror of https://gitee.com/openkylin/linux.git
Driver core fixes for 4.11-rc6
Here are 3 small fixes for 4.11-rc6. One resolves a reported issue with sysfs files that NeilBrown found, one is a documenatation fix for the stable kernel rules, and the last is a small MAINTAINERS file update for kernfs. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCWOnrMw8cZ3JlZ0Brcm9h aC5jb20ACgkQMUfUDdst+yk/JQCfQKjOpGDAR9Hs6u4YQ4hJrAHFneYAn1F4MLDW 3b0ZMnlZHkDq834UwKnB =iiei -----END PGP SIGNATURE----- Merge tag 'driver-core-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are 3 small fixes for 4.11-rc6. One resolves a reported issue with sysfs files that NeilBrown found, one is a documenatation fix for the stable kernel rules, and the last is a small MAINTAINERS file update for kernfs" * tag 'driver-core-4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: MAINTAINERS: separate out kernfs maintainership sysfs: be careful of error returns from ops->show() Documentation: stable-kernel-rules: fix stable-tag format
This commit is contained in:
commit
5b50be743f
|
@ -124,7 +124,7 @@ specified in the following format in the sign-off area:
|
|||
|
||||
.. code-block:: none
|
||||
|
||||
Cc: <stable@vger.kernel.org> # 3.3.x-
|
||||
Cc: <stable@vger.kernel.org> # 3.3.x
|
||||
|
||||
The tag has the meaning of:
|
||||
|
||||
|
|
11
MAINTAINERS
11
MAINTAINERS
|
@ -4117,14 +4117,13 @@ F: drivers/block/drbd/
|
|||
F: lib/lru_cache.c
|
||||
F: Documentation/blockdev/drbd/
|
||||
|
||||
DRIVER CORE, KOBJECTS, DEBUGFS, KERNFS AND SYSFS
|
||||
DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
|
||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
|
||||
S: Supported
|
||||
F: Documentation/kobject.txt
|
||||
F: drivers/base/
|
||||
F: fs/debugfs/
|
||||
F: fs/kernfs/
|
||||
F: fs/sysfs/
|
||||
F: include/linux/debugfs.h
|
||||
F: include/linux/kobj*
|
||||
|
@ -7209,6 +7208,14 @@ F: arch/mips/include/uapi/asm/kvm*
|
|||
F: arch/mips/include/asm/kvm*
|
||||
F: arch/mips/kvm/
|
||||
|
||||
KERNFS
|
||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
M: Tejun Heo <tj@kernel.org>
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
|
||||
S: Supported
|
||||
F: include/linux/kernfs.h
|
||||
F: fs/kernfs/
|
||||
|
||||
KEXEC
|
||||
M: Eric Biederman <ebiederm@xmission.com>
|
||||
W: http://kernel.org/pub/linux/utils/kernel/kexec/
|
||||
|
|
|
@ -108,7 +108,7 @@ static ssize_t sysfs_kf_read(struct kernfs_open_file *of, char *buf,
|
|||
{
|
||||
const struct sysfs_ops *ops = sysfs_file_ops(of->kn);
|
||||
struct kobject *kobj = of->kn->parent->priv;
|
||||
size_t len;
|
||||
ssize_t len;
|
||||
|
||||
/*
|
||||
* If buf != of->prealloc_buf, we don't know how
|
||||
|
@ -117,13 +117,15 @@ static ssize_t sysfs_kf_read(struct kernfs_open_file *of, char *buf,
|
|||
if (WARN_ON_ONCE(buf != of->prealloc_buf))
|
||||
return 0;
|
||||
len = ops->show(kobj, of->kn->priv, buf);
|
||||
if (len < 0)
|
||||
return len;
|
||||
if (pos) {
|
||||
if (len <= pos)
|
||||
return 0;
|
||||
len -= pos;
|
||||
memmove(buf, buf + pos, len);
|
||||
}
|
||||
return min(count, len);
|
||||
return min_t(ssize_t, count, len);
|
||||
}
|
||||
|
||||
/* kernfs write callback for regular sysfs files */
|
||||
|
|
Loading…
Reference in New Issue