]> git.baikalelectronics.ru Git - kernel.git/commit
kfifo: kfifo_copy_{to,from}_user: fix copied bytes calculation
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 14 Nov 2013 22:32:16 +0000 (14:32 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Nov 2013 00:32:23 +0000 (09:32 +0900)
commit45ed4460b671a914c7f2b180ba9baf0467b7b7d5
treeecb17f9f9dde58a8da4b340129efabdece82dcc0
parentc5fc30fbb568316a84a73345cc9a950cccb41463
kfifo: kfifo_copy_{to,from}_user: fix copied bytes calculation

'copied' and 'len' are in bytes, while 'ret' is in elements, so we need to
multiply 'ret' with the size of one element to get the correct result.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/kfifo.c