From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:59206 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763247AbdDSMeu (ORCPT ); Wed, 19 Apr 2017 08:34:50 -0400 Subject: Patch "nbd: fix 64-bit division" has been added to the 4.9-stable tree To: axboe@fb.com, ben@decadent.org.uk, gregkh@linuxfoundation.org Cc: , From: Date: Wed, 19 Apr 2017 14:34:17 +0200 Message-ID: <149260525729157@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From e88f72cb9f54f6d244e55f629fe5e2f34ca6f9ed Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Sat, 3 Dec 2016 12:08:03 -0700 Subject: nbd: fix 64-bit division From: Jens Axboe 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 Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- 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