diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-18 17:45:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-18 17:45:30 -0400 |
commit | dba94f2155f581395ef9608418778e3491b3d470 (patch) | |
tree | 71b034aa2f6bafd5bb7ffcefe68c89cef6bbfc6d /net/9p/trans_virtio.c | |
parent | 34a984f7b0cc6355a1e0c184251d0d4cc86f44d2 (diff) | |
parent | f569d3ef8254d4b3b8daa4f131f9397d48bf296c (diff) | |
download | blackbird-op-linux-dba94f2155f581395ef9608418778e3491b3d470.tar.gz blackbird-op-linux-dba94f2155f581395ef9608418778e3491b3d470.zip |
Merge tag 'for-linus-4.1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
Pull 9pfs updates from Eric Van Hensbergen:
"Some accumulated cleanup patches for kerneldoc and unused variables as
well as some lock bug fixes and adding privateport option for RDMA"
* tag 'for-linus-4.1-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
net/9p: add a privport option for RDMA transport.
fs/9p: Initialize status in v9fs_file_do_lock.
net/9p: Initialize opts->privport as it should be.
net/9p: use memcpy() instead of snprintf() in p9_mount_tag_show()
9p: use unsigned integers for nwqid/count
9p: do not crash on unknown lock status code
9p: fix error handling in v9fs_file_do_lock
9p: remove unused variable in p9_fd_create()
9p: kerneldoc warning fixes
Diffstat (limited to 'net/9p/trans_virtio.c')
-rw-r--r-- | net/9p/trans_virtio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index e62bcbbabb5e..9dd49ca67dbc 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -525,7 +525,10 @@ static ssize_t p9_mount_tag_show(struct device *dev, vdev = dev_to_virtio(dev); chan = vdev->priv; - return snprintf(buf, chan->tag_len + 1, "%s", chan->tag); + memcpy(buf, chan->tag, chan->tag_len); + buf[chan->tag_len] = 0; + + return chan->tag_len + 1; } static DEVICE_ATTR(mount_tag, 0444, p9_mount_tag_show, NULL); |