From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 581FEC4321D for ; Thu, 23 Aug 2018 14:41:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0DF3920836 for ; Thu, 23 Aug 2018 14:41:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DF3920836 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732336AbeHWSLy (ORCPT ); Thu, 23 Aug 2018 14:11:54 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51924 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727974AbeHWSLy (ORCPT ); Thu, 23 Aug 2018 14:11:54 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7NEfEmR083548 for ; Thu, 23 Aug 2018 10:41:54 -0400 Received: from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206]) by mx0a-001b2d01.pphosted.com with ESMTP id 2m1xpbgq7j-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 23 Aug 2018 10:41:49 -0400 Received: from localhost by e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 23 Aug 2018 10:41:47 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 23 Aug 2018 10:41:44 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7NEfhJ746792754 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Aug 2018 14:41:43 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 028D3AC060; Thu, 23 Aug 2018 10:41:54 -0400 (EDT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C7650AC062; Thu, 23 Aug 2018 10:41:51 -0400 (EDT) Received: from morokweng.localdomain (unknown [9.85.189.29]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTPS; Thu, 23 Aug 2018 10:41:51 -0400 (EDT) References: <20180823140917.3060915-1-arnd@arndb.de> User-agent: mu4e 1.0; emacs 25.3.1 From: Thiago Jung Bauermann To: Arnd Bergmann Cc: John Johansen , James Morris , "Serge E. Hallyn" , Seth Arnold , Matthew Garrett , Kees Cook , linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] apparmor: remove unused label In-reply-to: <20180823140917.3060915-1-arnd@arndb.de> Date: Thu, 23 Aug 2018 11:41:36 -0300 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 18082314-0072-0000-0000-00000396263F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009598; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01077719; UDB=6.00555675; IPR=6.00857692; MB=3.00022888; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-23 14:41:46 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18082314-0073-0000-0000-0000492D5C6E Message-Id: <87zhxdrvq7.fsf@morokweng.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-23_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=755 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808230155 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann writes: > After the corresponding 'goto' was removed, we get a warning > for the 'fail' label: > > security/apparmor/policy_unpack.c: In function 'unpack_dfa': > security/apparmor/policy_unpack.c:426:1: error: label 'fail' defined but not used [-Werror=unused-label] > > Fixes: fb5841091f28 ("apparmor: remove no-op permission check in policy_unpack") > Signed-off-by: Arnd Bergmann > --- > security/apparmor/policy_unpack.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c > index 3647b5834ace..96d8cf68ce65 100644 > --- a/security/apparmor/policy_unpack.c > +++ b/security/apparmor/policy_unpack.c > @@ -423,7 +423,6 @@ static struct aa_dfa *unpack_dfa(struct aa_ext *e) > > return dfa; > > -fail: > aa_put_dfa(dfa); > return ERR_PTR(-EPROTO); > } Shouldn't the two lines after the label be removed as well? IIUC they're unreachable now. -- Thiago Jung Bauermann IBM Linux Technology Center