From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e28smtp08.in.ibm.com (e28smtp08.in.ibm.com [122.248.162.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e28smtp08.in.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id DB8772C013E for ; Tue, 23 Jul 2013 11:51:15 +1000 (EST) Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 23 Jul 2013 07:11:23 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 1A4EEE004F for ; Tue, 23 Jul 2013 07:21:09 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6N1p5rr44171352 for ; Tue, 23 Jul 2013 07:21:05 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r6N1p8to014957 for ; Tue, 23 Jul 2013 11:51:08 +1000 From: "Aneesh Kumar K.V" To: benh@kernel.crashing.org, paulus@samba.org Subject: Re: [PATCH 2/2] powerpc/mm: Fix fallthrough bug in hpte_decode In-Reply-To: <1372839603-8308-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> References: <1372839603-8308-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1372839603-8308-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Date: Tue, 23 Jul 2013 07:21:04 +0530 Message-ID: <87li4ym4c7.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Cc: linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , "Aneesh Kumar K.V" writes: > From: "Aneesh Kumar K.V" > > We should not fallthrough different case statements in hpte_decode. Add > break statement to break out of the switch. The regression is introduced by > dcda287a9b26309ae43a091d0ecde16f8f61b4c0 "powerpc/mm: Simplify hpte_decode" > > Reported-by: Paul Mackerras > Signed-off-by: Aneesh Kumar K.V > --- > arch/powerpc/mm/hash_native_64.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/powerpc/mm/hash_native_64.c b/arch/powerpc/mm/hash_native_64.c > index 0de15fc..e1f9b82 100644 > --- a/arch/powerpc/mm/hash_native_64.c > +++ b/arch/powerpc/mm/hash_native_64.c > @@ -560,6 +560,7 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot, > seg_off |= vpi << shift; > } > *vpn = vsid << (SID_SHIFT - VPN_SHIFT) | seg_off >> VPN_SHIFT; > + break; > case MMU_SEGSIZE_1T: > /* We only have 40 - 23 bits of seg_off in avpn */ > seg_off = (avpn & 0x1ffff) << 23; > @@ -569,6 +570,7 @@ static void hpte_decode(struct hash_pte *hpte, unsigned long slot, > seg_off |= vpi << shift; > } > *vpn = vsid << (SID_SHIFT_1T - VPN_SHIFT) | seg_off >> VPN_SHIFT; > + break; > default: > *vpn = size = 0; > } Any update on this ? -aneesh