Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753072Ab3IWBYO (ORCPT ); Sun, 22 Sep 2013 21:24:14 -0400 Received: from mail-yh0-f52.google.com ([209.85.213.52]:54812 "EHLO mail-yh0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752611Ab3IWBYM (ORCPT ); Sun, 22 Sep 2013 21:24:12 -0400 From: Felipe Pena To: "James E.J. Bottomley" , Michal Hocko , Johannes Weiner , Kautuk Consul , Andrew Morton , Helge Deller Cc: linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Felipe Pena Subject: [PATCHv2 1/1] arch/parisc: mm: fix uninitialized variable usage Date: Sun, 22 Sep 2013 22:24:10 -0300 Message-Id: <1379899450-27552-1-git-send-email-felipensp@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1024 Lines: 38 The FAULT_FLAG_WRITE flag has been set based on uninitialized variable Signed-off-by: Felipe Pena --- arch/parisc/mm/fault.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index d10d27a..00c0ed3 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c @@ -182,6 +182,9 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, if (user_mode(regs)) flags |= FAULT_FLAG_USER; + + acc_type = parisc_acctyp(code, regs->iir); + if (acc_type & VM_WRITE) flags |= FAULT_FLAG_WRITE; retry: @@ -196,8 +199,6 @@ retry: good_area: - acc_type = parisc_acctyp(code,regs->iir); - if ((vma->vm_flags & acc_type) != acc_type) goto bad_area; -- 1.7.10.4 -- 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/