From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linux-iscsi.org ([67.23.28.174]:43117 "EHLO linux-iscsi.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754008AbcFIFZg (ORCPT ); Thu, 9 Jun 2016 01:25:36 -0400 Message-ID: <1465449618.5365.141.camel@haakon3.risingtidesystems.com> Subject: Re: [PATCH 1/1] target: fix max_unmap_lba_count calc overflow From: "Nicholas A. Bellinger" To: mchristi@redhat.com Cc: target-devel@vger.kernel.org, bart.vanassche@sandisk.com, stable@vger.kernel.org Date: Wed, 08 Jun 2016 22:20:18 -0700 In-Reply-To: <1464916357-8008-1-git-send-email-mchristi@redhat.com> References: <1464916357-8008-1-git-send-email-mchristi@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On Thu, 2016-06-02 at 20:12 -0500, mchristi@redhat.com wrote: > From: Mike Christie > > max_discard_sectors only 32bits, and some non scsi backend > devices will set this to the max 0xffffffff, so we can end up > overflowing during the max_unmap_lba_count calculation. > > This fixes a regression caused by my patch: > > commit 8a9ebe717a133ba7bc90b06047f43cc6b8bcb8b3 > Author: Mike Christie > Date: Mon Jan 18 14:09:27 2016 -0600 > > target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors > > which can result in extra discards being sent to due the overflow > causing max_unmap_lba_count to be smaller than what the backing > device can actually support. > > Signed-off-by: Mike Christie > Cc: stable@vger.kernel.org > Applied to target-pending/master. Thanks MNC + Bart.