Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1508567

Re: [PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size

From Lars-Peter Clausen <lars@metafoo.de>
Newsgroups linux.kernel
Subject Re: [PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size
Date 2016-10-25 21:20 +0200
Message-ID <swfqq-1ly-11@gated-at.bofh.it> (permalink)
References <swfgJ-1ib-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10/25/2016 09:04 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> In the case that the read size is not 2 or 4 bytes
> then maxim_thermocouple_read is not initializing ret and
> hence may return early with a bogus error return or
> just through to return with a bogos unread value in *val.
> Fix this by setting ret to -EINVAL for invalid (unhandled)
> read sizes.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Again, Arnd already took the prize, https://lkml.org/lkml/2016/10/25/518

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read size Colin King <colin.king@canonical.com> - 2016-10-25 21:10 +0200
  Re: [PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read  size Lars-Peter Clausen <lars@metafoo.de> - 2016-10-25 21:20 +0200
    Re: [PATCH] iio: maxim_thermocouple: return -EINVAL on invalid read  size Colin Ian King <colin.king@canonical.com> - 2016-10-25 22:10 +0200

csiph-web