]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
w1: IAD Register is yet readable trough iad sys file. Fix snprintf (%u for unsigned...
authorJulien Folly <julien.folly@gmail.com>
Tue, 9 Oct 2018 17:47:45 +0000 (19:47 +0200)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:20:47 +0000 (14:20 -0300)
commit8e119102116f22e4d3d29241c756e0423c18e792
tree12d556474de7cd9e1988a0dd7ceebe35e78e1c43
parent4946dcc77410566a043ade7c793dc0a3f626874f
w1: IAD Register is yet readable trough iad sys file. Fix snprintf (%u for unsigned, count for max size).

BugLink: https://bugs.launchpad.net/bugs/1854975
[ Upstream commit 6eaafbb6998e999467cf78a76e155ee00e372b14 ]

IAD Register is yet readable trough the "iad" sys file.

A write to the "iad" sys file enables or disables the current
measurement, but it was not possible to get the measured value by
reading it.
Fix: %u in snprintf for unsigned values (vdd and vad)
Fix: Avoid possibles overflows (Usage of the 'count' variables)

Signed-off-by: Julien Folly <julien.folly@gmail.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/w1/slaves/w1_ds2438.c