From patchwork Thu Mar 1 15:20:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130236 Delivered-To: patch@linaro.org Received: by 10.80.172.228 with SMTP id x91csp2932426edc; Thu, 1 Mar 2018 07:23:06 -0800 (PST) X-Google-Smtp-Source: AG47ELsMRqI+xuTp9ghf6oGm0/oBFIr2YU13PsMRJUTtX4uCubIbE88ZZcjGFGDwIAeStiTudJqZ X-Received: by 10.98.11.19 with SMTP id t19mr2333997pfi.70.1519917785971; Thu, 01 Mar 2018 07:23:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519917785; cv=none; d=google.com; s=arc-20160816; b=d/V86owjsGIByNZFkvXBMqUOTWQckJkHz4MUXY4+c8JKNgnMG7muJN8vezT+k2AwYq 5Oh8/5lPWuvglI1k0HzYDLexKSjCPdGwXSYKrQ+PgFwf5lWWCvIztCfLT05saj3SmqlJ NwBULfhHEt1gbOBcnNNno1yPch5CMq9an5SvB+UagsqRQrO+q/v++N2KXz9RA9G6FKS+ PdLt59Xt3c8fvWrmCfrOEPN1tqXxCsasPGJurIeyTZ++2ZVMPFwO7vTQNVWb8l5lu2xd VwFkmgbIynStMcUQJiDlA/NvFC/F1blhpT1siBZc4s53EcBMpfwxGGmKtFns6M72Gav/ IGRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Cq+BK9NsNNgndPkS0jSN+cbJwCCFgEE8dZqw8FX7ijc=; b=EucjrgFmfXtN8ttFiDG7AMuIXRLw+hyIQmn5uJC6Vswlyq5N+Wh0W+cal9yWY6qxNz nj6kBSLCxQZuDEipX5xfQ66KHZvcQKJ2utmBhMmk01M2mYQo+gHENpQlbIowDqpYj+4B C5gRRPgwW6B2EAOYgvYB/8kcrvHD0Wf5T8/sur6BYWTQLYyyYAGoQa/SzgHFnMnnixag gvTnC45lV43yOiSixRTK01Ql0C2DhvELu2MwbSduBj2EWhCSxx/kg49/ql2XVl3tmrkg cMMdO+6Tnhy6WBfgYfM+AMc9/yYcR09HQ8lmv1YJpgtGhRcYLj5cUSrTbEWltsCS5u7C CZow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=oStJvquh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c22si3143541pfl.371.2018.03.01.07.23.05; Thu, 01 Mar 2018 07:23:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=oStJvquh; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031722AbeCAPXE (ORCPT + 10 others); Thu, 1 Mar 2018 10:23:04 -0500 Received: from mail-sn1nam01on0091.outbound.protection.outlook.com ([104.47.32.91]:54291 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1031860AbeCAPXC (ORCPT ); Thu, 1 Mar 2018 10:23:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Cq+BK9NsNNgndPkS0jSN+cbJwCCFgEE8dZqw8FX7ijc=; b=oStJvquhqjt4rFLfr/N4SxSXbKCUCQ0cn9FReQw+VfU/iK1JSieeIEBvj8B+Fi2fVeFAmtvvPs6FWBHMp0kMaGFE/hBl18OFhuj+NSjMBTye7yOlwEbVzF3ORXEMA+gONweZAtkR9y3IKxC2u3o5sKMP7pFOeyVM42GVH3/Wugo= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0870.namprd21.prod.outlook.com (10.167.110.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Thu, 1 Mar 2018 15:22:57 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0567.006; Thu, 1 Mar 2018 15:22:57 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "stable-commits@vger.kernel.org" CC: Arnd Bergmann , "David S . Miller" , Sasha Levin Subject: [added to the stable tree] isdn: kcapi: avoid uninitialized data Thread-Topic: [added to the stable tree] isdn: kcapi: avoid uninitialized data Thread-Index: AQHTsXDLbR+IiK+G50mks7f+4eOVgQ== Date: Thu, 1 Mar 2018 15:20:12 +0000 Message-ID: <20180301151857.721-40-alexander.levin@microsoft.com> References: <20180301151857.721-1-alexander.levin@microsoft.com> In-Reply-To: <20180301151857.721-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0870; 7:Ecc2eAbiD/Iztm0Xy41AOpLcO0H78ev2aFPvSYWwXW6uvv8W/ZQf42bvf0bOwY7TJYs4PE2qf0K0oRLr11Yldf0DHejsvdO5Sp0Vn/KotvEF3Z2/b71dkkqdvsVnys7+WOhO7CsMgtbXogdFi62GGSHGHtvCJqRWiytKif4uVkZ1cwKMWk/mf9qjtaUrh/GuJtzgtHqtLTeL9Qh/gVWo7iIWsJ61ZzkANfRZ69hsVDH79wxIaYTNlSPWZJqAvZTU x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 19da9604-330d-41df-60fe-08d57f884fbe x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603307)(7193020); SRVR:DM5PR2101MB0870; x-ms-traffictypediagnostic: DM5PR2101MB0870: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231220)(944501228)(52105095)(3002001)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB0870; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0870; x-forefront-prvs: 05986C03E0 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(39380400002)(376002)(396003)(346002)(189003)(199004)(68736007)(14454004)(6346003)(6116002)(26005)(1076002)(4326008)(99286004)(305945005)(86612001)(186003)(2906002)(97736004)(86362001)(107886003)(6666003)(66066001)(105586002)(3846002)(2900100001)(10290500003)(3660700001)(3280700002)(316002)(5660300001)(8676002)(8936002)(81166006)(81156014)(22452003)(36756003)(54906003)(10090500001)(76176011)(25786009)(6512007)(59450400001)(6486002)(7736002)(110136005)(478600001)(72206003)(106356001)(6506007)(53936002)(2950100002)(2501003)(5250100002)(6436002)(102836004)(22906009); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0870; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: 5nv24YrCTv1uHiNFA4MB/09UKPika4fPM3MmExdk9cTtoBz7NXxIkx7qecNHlFYQFvq82wHqUjK75y+qRqlzz84nK60vKgUijGan5OFKUv7Oyt0Odj89wPr1aUf0hdUzkAmzKof/IexBeiBsvtPqikjm55FX7eyItMVt7mFmIEA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 19da9604-330d-41df-60fe-08d57f884fbe X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2018 15:20:12.7652 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0870 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann This patch has been added to the stable tree. If you have any objections, please let us know. -- 2.14.1 =============== [ Upstream commit af109a2cf6a9a6271fa420ae2d64d72d86c92b7d ] gcc-7 points out that the AVMB1_ADDCARD ioctl results in an unintialized value ending up in the cardnr parameter: drivers/isdn/capi/kcapi.c: In function 'old_capi_manufacturer': drivers/isdn/capi/kcapi.c:1042:24: error: 'cdef.cardnr' may be used uninitialized in this function [-Werror=maybe-uninitialized] cparams.cardnr = cdef.cardnr; This has been broken since before the start of the git history, so either the value is not used for anything important, or the ioctl command doesn't get called in practice. Setting the cardnr to zero avoids the warning and makes sure we have consistent behavior. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/isdn/capi/kcapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 823f6985b260..dd7e38ac29bd 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -1032,6 +1032,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data) sizeof(avmb1_carddef)))) return -EFAULT; cdef.cardtype = AVM_CARDTYPE_B1; + cdef.cardnr = 0; } else { if ((retval = copy_from_user(&cdef, data, sizeof(avmb1_extcarddef))))