From patchwork Thu Jul 7 07:54:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9218087 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 16C7660B17 for ; Thu, 7 Jul 2016 07:58:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C19C28794 for ; Thu, 7 Jul 2016 07:58:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0126B28795; Thu, 7 Jul 2016 07:58:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73D8028796 for ; Thu, 7 Jul 2016 07:58:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756511AbcGGH6z (ORCPT ); Thu, 7 Jul 2016 03:58:55 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33381 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756594AbcGGHyi (ORCPT ); Thu, 7 Jul 2016 03:54:38 -0400 Received: by mail-wm0-f65.google.com with SMTP id n127so996968wme.0 for ; Thu, 07 Jul 2016 00:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HR1H9mA1Fr8oP47JD3wgtEE/5/TbBb5DmV3l5hMgUmo=; b=F7yzbpxeUipxGLxtrVQq5RNhdJJnukugoX3SViA9hvoISHL38INNB9/7IPA2pRKGkR lpj0549kmGg6oGMLcjc2AWY3PJdmqPkOhspgpFUeGfDtUeQvk5pYcr8RJdms99Myn3BN TgZ/32o7y7C73JXEyieZF6OBs1pcK8TR5g7Pw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HR1H9mA1Fr8oP47JD3wgtEE/5/TbBb5DmV3l5hMgUmo=; b=PHL9GCMsl6Qnu1pM7zd/nv/AVwCfUuS54GGMQsWQ1VLKPXfXpWQ8ch2poHkwjyEcmd iG7NxR2B929bVeiyyqufXHNrmMJWir6yBHuv4gTcg6Cglh0fzRLW0hHad77RkyZSfFxD x7n66BrtH5g4vO/I4ffwUqji5EDQ9GiG2l3nGMeRLFJEHMjWlfTvqcn1v8E1+Kf1yA2x xmutAa09xJzo6PLR8twI5PPfT83E0KRmJ4A5vXq2GTTeeAQdINxSk5sTrkikzwGXzJi6 PU/KDpr9C7gg5kexFfPMJHH6U28SQ4A9ZKJNTmCEd38B74QsVyufBA2Xy88+H/XvtGbO E8hA== X-Gm-Message-State: ALyK8tLOSPbhRZlDJ+Xw7cvd8oIZ2gMkaJcdYY+Kd7L+5/JCB0tDA48844SIpa2UBZOupg== X-Received: by 10.28.60.5 with SMTP id j5mr1470125wma.26.1467878076664; Thu, 07 Jul 2016 00:54:36 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id i74sm1654796wmg.21.2016.07.07.00.54.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 00:54:36 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 03/17] lightnvm: initialize ppa_addr in dev_to_generic_addr() Date: Thu, 7 Jul 2016 09:54:09 +0200 Message-Id: <1467878063-22919-4-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1467878063-22919-1-git-send-email-m@bjorling.me> References: <1467878063-22919-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Javier González The ->reserved bit is not initialized when allocated on stack. This may lead targets to misinterpret the PPA as cached. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- include/linux/lightnvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 9c56148..cee4c8d 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -385,6 +385,7 @@ static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev, { struct ppa_addr l; + l.ppa = 0; /* * (r.ppa << X offset) & X len bitmask. X eq. blk, pg, etc. */