Commit 5b50be74 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'driver-core-4.11-rc6' of...

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
parents 62e1fd08 27f395b8
...@@ -124,7 +124,7 @@ specified in the following format in the sign-off area: ...@@ -124,7 +124,7 @@ specified in the following format in the sign-off area:
.. code-block:: none .. 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: The tag has the meaning of:
......
...@@ -4117,14 +4117,13 @@ F: drivers/block/drbd/ ...@@ -4117,14 +4117,13 @@ F: drivers/block/drbd/
F: lib/lru_cache.c F: lib/lru_cache.c
F: Documentation/blockdev/drbd/ F: Documentation/blockdev/drbd/
DRIVER CORE, KOBJECTS, DEBUGFS, KERNFS AND SYSFS DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org> M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
S: Supported S: Supported
F: Documentation/kobject.txt F: Documentation/kobject.txt
F: drivers/base/ F: drivers/base/
F: fs/debugfs/ F: fs/debugfs/
F: fs/kernfs/
F: fs/sysfs/ F: fs/sysfs/
F: include/linux/debugfs.h F: include/linux/debugfs.h
F: include/linux/kobj* F: include/linux/kobj*
...@@ -7209,6 +7208,14 @@ F: arch/mips/include/uapi/asm/kvm* ...@@ -7209,6 +7208,14 @@ F: arch/mips/include/uapi/asm/kvm*
F: arch/mips/include/asm/kvm* F: arch/mips/include/asm/kvm*
F: arch/mips/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 KEXEC
M: Eric Biederman <ebiederm@xmission.com> M: Eric Biederman <ebiederm@xmission.com>
W: http://kernel.org/pub/linux/utils/kernel/kexec/ 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, ...@@ -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); const struct sysfs_ops *ops = sysfs_file_ops(of->kn);
struct kobject *kobj = of->kn->parent->priv; struct kobject *kobj = of->kn->parent->priv;
size_t len; ssize_t len;
/* /*
* If buf != of->prealloc_buf, we don't know how * 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, ...@@ -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)) if (WARN_ON_ONCE(buf != of->prealloc_buf))
return 0; return 0;
len = ops->show(kobj, of->kn->priv, buf); len = ops->show(kobj, of->kn->priv, buf);
if (len < 0)
return len;
if (pos) { if (pos) {
if (len <= pos) if (len <= pos)
return 0; return 0;
len -= pos; len -= pos;
memmove(buf, buf + pos, len); memmove(buf, buf + pos, len);
} }
return min(count, len); return min_t(ssize_t, count, len);
} }
/* kernfs write callback for regular sysfs files */ /* kernfs write callback for regular sysfs files */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment