Re: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-09 Thread Greg Kroah-Hartman
On Mon, Jul 09, 2018 at 11:36:21AM +, Winkler, Tomas wrote: > > > > On Wed, Jul 04, 2018 at 12:34:49PM +0300, Dan Carpenter wrote: > > > We accidentally removed the check for negative returns without > > > considering the issue of type promotion. The "if_version_length" > > > variable is type

RE: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-09 Thread Winkler, Tomas
> > On Wed, Jul 04, 2018 at 12:34:49PM +0300, Dan Carpenter wrote: > > We accidentally removed the check for negative returns without > > considering the issue of type promotion. The "if_version_length" > > variable is type size_t so if __mei_cl_recv() returns a negative then > > "bytes_recv" is

Re: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-07 Thread Greg Kroah-Hartman
On Wed, Jul 04, 2018 at 12:34:49PM +0300, Dan Carpenter wrote: > We accidentally removed the check for negative returns without > considering the issue of type promotion. The "if_version_length" > variable is type size_t so if __mei_cl_recv() returns a negative then > "bytes_recv" is type promoted

RE: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-04 Thread Julia Lawall
On Wed, 4 Jul 2018, Winkler, Tomas wrote: > > > On Wed, Jul 04, 2018 at 01:57:44PM +, Winkler, Tomas wrote: > > > > > > > > On Wed, Jul 04, 2018 at 01:59:14PM +0200, Julia Lawall wrote: > > > > > > > > > > > > > > > On Wed, 4 Jul 2018, Dan Carpenter wrote: > > > > > > > > > > > We accidenta

RE: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-04 Thread Winkler, Tomas
> On Wed, Jul 04, 2018 at 01:57:44PM +, Winkler, Tomas wrote: > > > > > > On Wed, Jul 04, 2018 at 01:59:14PM +0200, Julia Lawall wrote: > > > > > > > > > > > > On Wed, 4 Jul 2018, Dan Carpenter wrote: > > > > > > > > > We accidentally removed the check for negative returns without > > > > > c

Re: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-04 Thread Dan Carpenter
On Wed, Jul 04, 2018 at 01:57:44PM +, Winkler, Tomas wrote: > > > > On Wed, Jul 04, 2018 at 01:59:14PM +0200, Julia Lawall wrote: > > > > > > > > > On Wed, 4 Jul 2018, Dan Carpenter wrote: > > > > > > > We accidentally removed the check for negative returns without > > > > considering the issu

RE: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-04 Thread Winkler, Tomas
> > On Wed, Jul 04, 2018 at 01:59:14PM +0200, Julia Lawall wrote: > > > > > > On Wed, 4 Jul 2018, Dan Carpenter wrote: > > > > > We accidentally removed the check for negative returns without > > > considering the issue of type promotion. The "if_version_length" > > > variable is type size_t so i

Re: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-04 Thread Dan Carpenter
On Wed, Jul 04, 2018 at 01:59:14PM +0200, Julia Lawall wrote: > > > On Wed, 4 Jul 2018, Dan Carpenter wrote: > > > We accidentally removed the check for negative returns without > > considering the issue of type promotion. The "if_version_length" > > variable is type size_t so if __mei_cl_recv(

Re: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version()

2018-07-04 Thread Julia Lawall
On Wed, 4 Jul 2018, Dan Carpenter wrote: > We accidentally removed the check for negative returns without > considering the issue of type promotion. The "if_version_length" > variable is type size_t so if __mei_cl_recv() returns a negative then > "bytes_recv" is type promoted to a high positiv