From patchwork Wed Dec 13 01:59:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121703 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4886254qgn; Tue, 12 Dec 2017 18:02:15 -0800 (PST) X-Google-Smtp-Source: ACJfBotv9nQW6k0VMXQqFI+TPdKZVc3Kfjq08Iw7laEYiyJppr2qGZnsFaHsAiaRxtkhLa+2boEu X-Received: by 10.84.131.227 with SMTP id d90mr4134241pld.117.1513130535295; Tue, 12 Dec 2017 18:02:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513130535; cv=none; d=google.com; s=arc-20160816; b=GvFI6sSzDeiIkdVESXaTCzq9x0mHiCIlIfL7Rv+V3ZA4cInrOZeROLQaJwt5WOamLX wXUhIfGu6QPHkxOcVLBkIG3JjZSD4+n5exkazLSvSrtou+a8tGZC+ktmIwsI639jVvMu L60a0xh5BO/lRxvOwdUWo4sFAdMeYlFJ9TYty14rdok3fNjsRnLAeoF0LsmkpH5mBCqb 3jFdQoZog52Dy2UEpUDD9V4Ttpbpx0X+koTd1RKUXE4KYTGWk+cwuee0xgkvF/Ylxp0r SZ4wjjzE3OZWa4AwKV1vWWA2+fd0wUiR7SGe9K+EbknDeT8J3ySXjhoaHurgBu8a4f4W ngMA== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=BX5O1kCtgMUSinHmH6Wo09giKmsRd/3yspP1gxRubX4=; b=HRy4x6M6Vjlv7lNN6QSS1FfzOA80wmTbXyCwJXgCGZFSW3JgQzdE0hPHzTAW388QCm b0G6bB9oLyB2lK59W1Cz6SdgfItfXhEw/WJS04GVjYx3c71CBRCnGCOAewgkj+CqkUmZ fuQDwEDUYTQsSF5EOjoYrdsU0RMkOmnggHqQz2ootywB46NNDVAY7+GBcILzi9C2znYQ melG6TvLGbGACDHkqdOqyH2Lc2eh3HAxNnM+oRxvBXoWjymhvoZ3m2fOT5kZspr7D1pz WCzSRtU5xxfCR9DTRn2ORwk/G8ie5/gX2qzb2I6N2wXc98wOay2mD3C2jvH/FqZNw3Al ZsJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=fkYpZU/i; dkim=fail header.i=@verizon.com header.s=corp header.b=IFokESrV; dkim=fail header.i=@verizon.com header.s=corp header.b=NHZznkjs; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si402433pgn.123.2017.12.12.18.02.15; Tue, 12 Dec 2017 18:02:15 -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=fail header.i=@verizon.com header.s=corp header.b=fkYpZU/i; dkim=fail header.i=@verizon.com header.s=corp header.b=IFokESrV; dkim=fail header.i=@verizon.com header.s=corp header.b=NHZznkjs; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753602AbdLMCCJ (ORCPT + 10 others); Tue, 12 Dec 2017 21:02:09 -0500 Received: from omzsmtpe02.verizonbusiness.com ([199.249.25.209]:47774 "EHLO omzsmtpe02.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753861AbdLMCCA (ORCPT ); Tue, 12 Dec 2017 21:02:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130520; x=1544666520; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=fkYpZU/ijEaQueGT0wAUGI9R08L3k29mzoUztA/HRzI3FaJloajikj28 3I7bFnmn219B6yG3Vap70PXN1LHMabR+Det/s06piO2ytRURGL+zlqhuj iUxmw5qmz5Fvd/zQ4/ip0AbFjuoNCnq83eY3/HbTI5OLTAnmVz3zrfNZB A=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by omzsmtpe02.verizonbusiness.com with ESMTP; 13 Dec 2017 02:01:56 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 02:01:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130499; x=1544666499; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=IFokESrV6ny0lLo9ELPatGPr8ozT6Nl2fmQ0Ok56eUE3DJukfR5z7CCo Ib4yqa5Ts8W8JahskVKOL4vEDCoCTOc8yyUS7+t70UJcmX4/Pe0vjJgEV DmCakPja81tJxaPDighcUNfOA9SUZ+nOLTe13BjIZKQhy/22yd+kLI04Q 4=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 21:01:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130499; x=1544666499; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=NHZznkjsHoYR3DpNdcFyDTaNvzymUT2v5p0l/IegOSy1Zx3TujtOiJDr dHg3EzwwspyJZ17QF5rGnnunVQsR5lxV3YSvYPd5sgaXirnpNT+4Ws9sQ w/02uTOOcpt6gEwsWZDaYtaRaguq5VZBtjw+98LtjPdQcL15SbkUJIQuO U=; From: alexander.levin@verizon.com Cc: Arnd Bergmann , "David S . Miller" , alexander.levin@verizon.com X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh002.uswin.ad.vzwcorp.com ([10.144.218.44]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 02:01:39 +0000 Received: from tbwexch09apd.uswin.ad.vzwcorp.com (153.114.162.33) by OHTWI1EXH002.uswin.ad.vzwcorp.com (10.144.218.44) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 21:01:39 -0500 Received: from OMZP1LUMXCA18.uswin.ad.vzwcorp.com (144.8.22.196) by tbwexch09apd.uswin.ad.vzwcorp.com (153.114.162.33) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 21:01:38 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA18.uswin.ad.vzwcorp.com (144.8.22.196) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:01:38 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 20:01:38 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 3.18 23/40] isdn: kcapi: avoid uninitialized data Thread-Topic: [PATCH AUTOSEL for 3.18 23/40] isdn: kcapi: avoid uninitialized data Thread-Index: AQHTc7X7HEoVg8n//0quelW690uYTg== Date: Wed, 13 Dec 2017 01:59:16 +0000 Message-ID: <20171213015905.7059-23-alexander.levin@verizon.com> References: <20171213015905.7059-1-alexander.levin@verizon.com> In-Reply-To: <20171213015905.7059-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ 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(+) -- 2.11.0 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))))