Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753554AbbL2P3Q (ORCPT ); Tue, 29 Dec 2015 10:29:16 -0500 Received: from mail-ob0-f179.google.com ([209.85.214.179]:34735 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753513AbbL2P25 (ORCPT ); Tue, 29 Dec 2015 10:28:57 -0500 Subject: Re: [PATCH] lightnvm: wrong offset in bad blk lun calculation To: =?UTF-8?Q?Matias_Bj=c3=b8rling?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com References: <1451396276-2589-1-git-send-email-m@bjorling.me> <1451396276-2589-2-git-send-email-m@bjorling.me> From: Jens Axboe Message-ID: <5682A6B6.1010909@kernel.dk> Date: Tue, 29 Dec 2015 08:28:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1451396276-2589-2-git-send-email-m@bjorling.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 749 Lines: 19 On 12/29/2015 06:37 AM, Matias Bjørling wrote: > dev->nr_luns reports the total number of luns available in a device > while dev->luns_per_chnl is the number of luns per channel. > > When multiple channels are available, the offset is calculated from a > channel and lun id into a linear array. As it multiplies with > the total number of luns, we go out of bound when channel id > 0 and > causes the kernel to panic when we read a protected kernel memory area. Added for 4.4, thanks. -- Jens Axboe -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/