alistair23-linux/drivers/staging/lustre/lnet
Arnd Bergmann 566e1ce22e staging: lustre: ko2iblnd: check copy_from_iter/copy_to_iter return code
We now get a helpful warning for code that calls copy_{from,to}_iter
without checking the return value, introduced by commit aa28de275a
("iov_iter/hardening: move object size checks to inlined part").

drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_send':
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1643:2: error: ignoring return value of 'copy_from_iter', declared with attribute warn_unused_result [-Werror=unused-result]
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c: In function 'kiblnd_recv':
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c:1744:3: error: ignoring return value of 'copy_to_iter', declared with attribute warn_unused_result [-Werror=unused-result]

In case we get short copies here, we may get incorrect behavior.
I've added failure handling for both rx and tx now, returning
-EFAULT as expected.

Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-18 08:36:20 +02:00
..
klnds staging: lustre: ko2iblnd: check copy_from_iter/copy_to_iter return code 2017-07-18 08:36:20 +02:00
libcfs Staging/IIO patches for 4.13-rc1 2017-07-03 19:57:30 -07:00
lnet Staging/IIO patches for 4.13-rc1 2017-07-03 19:57:30 -07:00
selftest staging: lustre: lnet: use struct bio_vec instead of typedef 2017-03-06 09:17:05 +01:00
Kconfig staging: lustre: ko2iblnd: Adapt to the removal of ib_get_dma_mr() 2017-03-06 09:16:59 +01:00
Makefile staging: lustre: move libcfs to lnet layer 2016-03-10 17:48:53 -08:00