]> git.karo-electronics.de Git - karo-tx-linux.git/commit
s390/cmm: make copy_from_user() invocation provably correct
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 14 Oct 2013 11:58:10 +0000 (13:58 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 15 Oct 2013 12:45:46 +0000 (14:45 +0200)
commit76a4954a96c8cbd2f84b802b1720efa5c8b85921
treeac530c6381fd0229b2eb92b7e3726f46096e2e7c
parent529640ab2974fe8f519acf27165ce4e056b3de18
s390/cmm: make copy_from_user() invocation provably correct

Get rid of these two warnings:

In function 'copy_from_user',
    inlined from 'cmm_timeout_handler' at arch/s390/mm/cmm.c:310:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct
In function 'copy_from_user',
    inlined from 'cmm_pages_handler' at arch/s390/mm/cmm.c:270:
      uaccess.h:303: warning: call to 'copy_from_user_overflow' declared
      with attribute warning: copy_from_user() buffer size is not provably
      correct

Change the "len" type to unsigned int, so we can make sure that there is no
buffer overflow. This also generates less code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/cmm.c