* Patch "nbd: fix 64-bit division" has been added to the 4.9-stable tree
@ 2017-04-19 12:34 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-04-19 12:34 UTC (permalink / raw)
To: axboe, ben, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
nbd: fix 64-bit division
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nbd-fix-64-bit-division.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From e88f72cb9f54f6d244e55f629fe5e2f34ca6f9ed Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@fb.com>
Date: Sat, 3 Dec 2016 12:08:03 -0700
Subject: nbd: fix 64-bit division
From: Jens Axboe <axboe@fb.com>
commit e88f72cb9f54f6d244e55f629fe5e2f34ca6f9ed upstream.
We have this:
ERROR: "__aeabi_ldivmod" [drivers/block/nbd.ko] undefined!
ERROR: "__divdi3" [drivers/block/nbd.ko] undefined!
nbd.c:(.text+0x247c72): undefined reference to `__divdi3'
due to a recent commit, that did 64-bit division. Use the proper
divider function so that 32-bit compiles don't break.
Fixes: ef77b515243b ("nbd: use loff_t for blocksize and nbd_set_size args")
Signed-off-by: Jens Axboe <axboe@fb.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/nbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -648,7 +648,7 @@ static int __nbd_ioctl(struct block_devi
case NBD_SET_SIZE:
return nbd_size_set(nbd, bdev, nbd->blksize,
- arg / nbd->blksize);
+ div_s64(arg, nbd->blksize));
case NBD_SET_SIZE_BLOCKS:
return nbd_size_set(nbd, bdev, nbd->blksize, arg);
Patches currently in stable-queue which might be from axboe@fb.com are
queue-4.9/nbd-fix-64-bit-division.patch
queue-4.9/nbd-use-loff_t-for-blocksize-and-nbd_set_size-args.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-19 12:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-19 12:34 Patch "nbd: fix 64-bit division" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).