Re: [PATCH 4.9 45/83] staging: vc04_services: prevent integer overflow in create_pagelist()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 19, 2019 at 06:02:07PM +0200, Martin Weinelt wrote:
> Hi.
> 
> On 6/9/19 6:42 PM, Greg Kroah-Hartman wrote:
> > From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > 
> > commit ca641bae6da977d638458e78cd1487b6160a2718 upstream.
> 
> This commit breaks the kernel build because the vchiq_pagelist_info
> struct is not defined in v4.9.182.
> 
> It was only added in v4.10, in commit
> 4807f2c0e684e907c501cb96049809d7a957dbc2.
> 
> 
> Best regards,
> 
> Martin Weinelt
> 
> 
> In file included from ./include/uapi/linux/posix_types.h:4:0,
>                  from ./include/uapi/linux/types.h:13,
>                  from ./include/linux/compiler.h:224,
>                  from ./include/linux/linkage.h:4,
>                  from ./include/linux/kernel.h:6,
>                  from
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:34:
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c: In
> function 'create_pagelist':
> ./include/linux/stddef.h:7:14: warning: return makes integer from
> pointer without a cast [-Wint-conversion]
>  #define NULL ((void *)0)
>               ^
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:385:10:
> note: in expansion of macro 'NULL'
>    return NULL;
>           ^~~~
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:391:12:
> error: invalid application of 'sizeof' to incomplete type 'struct
> vchiq_pagelist_info'
>      sizeof(struct vchiq_pagelist_info)) /
>             ^~~~~~
> In file included from ./include/uapi/linux/posix_types.h:4:0,
>                  from ./include/uapi/linux/types.h:13,
>                  from ./include/linux/compiler.h:224,
>                  from ./include/linux/linkage.h:4,
>                  from ./include/linux/kernel.h:6,
>                  from
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:34:
> ./include/linux/stddef.h:7:14: warning: return makes integer from
> pointer without a cast [-Wint-conversion]
>  #define NULL ((void *)0)
>               ^
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c:394:10:
> note: in expansion of macro 'NULL'
>    return NULL;
>           ^~~~

Really?  How come all of the built tests still succeed?

Ah, arm systems :(

Odd that we didn't catch this already, sorry about that.  And that was
my fault in the backport, which the build tests did catch.  Odd that it
didn't catch the failure after that...

Anyway, thanks, I'll go revert this.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux