]> git.baikalelectronics.ru Git - kernel.git/commit
mei: ioctl: use sizeof of variable instead of struct type
authorTomas Winkler <tomas.winkler@intel.com>
Thu, 23 Jul 2020 14:59:23 +0000 (17:59 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2020 17:33:09 +0000 (19:33 +0200)
commit1d090f5f31004fd32dcbc69b69f7f30061a4b87d
tree23274b31fea086cd3c86cca0efd1b465b0fc7397
parent2495571f07be9623cc3a24b7fa9ecc05406f6a5e
mei: ioctl: use sizeof of variable instead of struct type

Use sizeof(connect_data))) instead of
sizeof(struct mei_connect_client_data) when copying data
between user space and kernel.

There is a possibility of bug when variable type has changed but
corresponding struct passed to the sizeof has not.

Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20200723145927.882743-3-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/main.c