Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1609814 > unrolled thread
| Started by | Johan Hovold <johan@kernel.org> |
|---|---|
| First post | 2017-03-27 15:10 +0200 |
| Last post | 2017-03-27 16:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v11 11/12] iio: multiplexer: fix unsigned check with less than zero Johan Hovold <johan@kernel.org> - 2017-03-27 15:10 +0200
Re: [PATCH v11 11/12] iio: multiplexer: fix unsigned check with less than zero Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-03-27 16:10 +0200
Re: [PATCH v11 11/12] iio: multiplexer: fix unsigned check with less than zero Johan Hovold <johan@kernel.org> - 2017-03-27 16:40 +0200
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Date | 2017-03-27 15:10 +0200 |
| Subject | Re: [PATCH v11 11/12] iio: multiplexer: fix unsigned check with less than zero |
| Message-ID | <tpCzg-8vt-39@gated-at.bofh.it> |
On Mon, Mar 27, 2017 at 02:17:48PM +0200, Peter Rosin wrote:
> Comparing a size_t with less than zero is always false as size_t
> is unsigned. So, change the type of the variable to ssize_t and
> replicate the size check from mux_configure_channel() into
> mux_write_ext_info() thus ensuring that the size will fit in the
> ssize_t variable.
>
> Detected by CoverityScan, CID#1415278 ("Unsigned compared against 0")
>
> Fixes: 1da8e16d2812 ("iio: multiplexer: new iio category and iio-mux driver")
You should fold this one and the next patch into the patches that they
fix up instead fixing stuff that's not yet merged incrementally like you
do here (specifically, the SHA id above will have no matching commit).
Johan
[toc] | [next] | [standalone]
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-03-27 16:10 +0200 |
| Message-ID | <tpDvk-Li-21@gated-at.bofh.it> |
| In reply to | #1609814 |
On Mon, Mar 27, 2017 at 03:46:47PM +0200, Peter Rosin wrote:
> On 2017-03-27 15:06, Johan Hovold wrote:
> > On Mon, Mar 27, 2017 at 02:17:48PM +0200, Peter Rosin wrote:
> >> Comparing a size_t with less than zero is always false as size_t
> >> is unsigned. So, change the type of the variable to ssize_t and
> >> replicate the size check from mux_configure_channel() into
> >> mux_write_ext_info() thus ensuring that the size will fit in the
> >> ssize_t variable.
> >>
> >> Detected by CoverityScan, CID#1415278 ("Unsigned compared against 0")
> >>
> >> Fixes: 1da8e16d2812 ("iio: multiplexer: new iio category and iio-mux driver")
> >
> > You should fold this one and the next patch into the patches that they
> > fix up instead fixing stuff that's not yet merged incrementally like you
> > do here (specifically, the SHA id above will have no matching commit).
> >
> > Johan
>
> I forgot about that. And similar for the next patch. But how do you
> propose that I attribute the reporters and CoverityScan? Crap, it
> would have been so much easier if the series was just pulled they
> way I expected it...
>
> Greg, how do you want to play this? Can you perhaps update the fixes
> tag here and in 12/12 if/when you apply the series?
Please fix this up and resend the patches properly.
thanks,
greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Johan Hovold <johan@kernel.org> |
|---|---|
| Date | 2017-03-27 16:40 +0200 |
| Message-ID | <tpDYl-XG-13@gated-at.bofh.it> |
| In reply to | #1609814 |
On Mon, Mar 27, 2017 at 03:46:47PM +0200, Peter Rosin wrote:
> On 2017-03-27 15:06, Johan Hovold wrote:
> > On Mon, Mar 27, 2017 at 02:17:48PM +0200, Peter Rosin wrote:
> >> Comparing a size_t with less than zero is always false as size_t
> >> is unsigned. So, change the type of the variable to ssize_t and
> >> replicate the size check from mux_configure_channel() into
> >> mux_write_ext_info() thus ensuring that the size will fit in the
> >> ssize_t variable.
> >>
> >> Detected by CoverityScan, CID#1415278 ("Unsigned compared against 0")
> >>
> >> Fixes: 1da8e16d2812 ("iio: multiplexer: new iio category and iio-mux driver")
> >
> > You should fold this one and the next patch into the patches that they
> > fix up instead fixing stuff that's not yet merged incrementally like you
> > do here (specifically, the SHA id above will have no matching commit).
> I forgot about that. And similar for the next patch. But how do you
> propose that I attribute the reporters and CoverityScan?
You can mention it in the cover letter and/or commit messages as you
would for other kinds of review feedback.
Johan
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web