[bug report] habanalabs: add virtual memory and MMU modules

Omer Shpigelman oshpigelman at habana.ai
Tue Mar 5 08:34:50 UTC 2019


From: Dan Carpenter <dan.carpenter at oracle.com>
Sent: Tuesday, 5 March 2019 8:40
> Hello Omer Shpigelman,
> 
> The patch 0feaf86d4e69: "habanalabs: add virtual memory and MMU
> modules" from Feb 16, 2019, leads to the following static checker
> warning:
> 
> 	drivers/misc/habanalabs/memory.c:96 alloc_device_memory()
> 	warn: integer overflows '(args->alloc.mem_size + (page_size - 1)) >>
> page_shift'
> 

You are correct, we'll send a fix shortly.
BTW which static checker did you use? we use Sparse and Smatch and they didn't catch that.

Omer


More information about the devel mailing list