From patchwork Wed Dec 13 01:57:37 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: 121698 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4883482qgn; Tue, 12 Dec 2017 17:59:29 -0800 (PST) X-Google-Smtp-Source: ACJfBosQwVPAud3AueT6qipn5NYv20sw9l6t5qQnOaZyHlLhpfsD141qm/pgAQIrV48hSAxY4unZ X-Received: by 10.99.121.74 with SMTP id u71mr3922430pgc.251.1513130369880; Tue, 12 Dec 2017 17:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513130369; cv=none; d=google.com; s=arc-20160816; b=XZMAoGpY99QI5Pw7pWnlgwpK2hQBjUGgiRGOdfOmhfO1kR0bWO226uY8S08jIJt7bF JA+FHl5XYxAROlyNGmfdnqKb5Dc/2ITswwPtNK81GxNNlV3AcjhSgYVT/D89pWGVpBp7 vKF/e/nW5fIIKbesUmlOi//0PShMCt/f8DWQQYSZspy3TaYmHh/QGGByeTsYmuwp9eyT lhSxNAKUYTWz6vZuRjuECKR1FCHitvncNKFWN3ZRkrZMoqSEKf3C5hRRTc0pI4PqVVVP 7NbmvOsV18lrEdA6xFr5YTAjfdm1Ei4c9hSnmtiK7BM4aXh9qZHvGrqpD9Hep+laiU79 4ROA== 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=oreiZo5KcgZe7JND0vzXE8+QiqOatg3hsDRgs0IWFIvmgy8jyLTRyUl8ElxpNTeOTh YFwJRMTQ2WWHUYfHQN+k2ithW6ilpoyyIOZy4uJ6Ub5KKTEuxmnYHza20eicVk4wkvMv VgpvxlJtYLp/ly1n127+wxo7e4QNAxf1Papa8kYU151XxW8uFDUpUzMvlEZRiUg3GvRx W/yJTFf2eY5uqMbrhYKI/VUnlrS97SPjyODjp799il1/VG/mGctp3xhhR67HM7Hqjmvg pZljkOY8Ft+JfYdUUVpoIJIEH3mRNfj4cTOgUOyFFTXbk5PtrPZhj3ZfXZGNOgsdMcD9 RdLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=IAMYo8Kb; dkim=fail header.i=@verizon.com header.s=corp header.b=aUdgLbh7; dkim=fail header.i=@verizon.com header.s=corp header.b=IHov2h9v; 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 g1si453300pfk.52.2017.12.12.17.59.29; Tue, 12 Dec 2017 17:59:29 -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=IAMYo8Kb; dkim=fail header.i=@verizon.com header.s=corp header.b=aUdgLbh7; dkim=fail header.i=@verizon.com header.s=corp header.b=IHov2h9v; 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 S1753194AbdLMB7Y (ORCPT + 10 others); Tue, 12 Dec 2017 20:59:24 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:46399 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753281AbdLMB67 (ORCPT ); Tue, 12 Dec 2017 20:58:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130339; x=1544666339; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=IAMYo8KbuIJR28ES4G32fTCiVwhQh901BmB6lHpNW81bZ5ekZ0s0CCvj lCYX3iJmitQskniENX52GFnYD1mAW2MRShARrb7l50BNdfH4DyqzYlduR unfKbHKnEC+FRGXEFgZ6/cOh/0uHCRT8X9m6IhadcPMbTiZLMZPad/M6n 4=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by fldsmtpe03.verizon.com with ESMTP; 13 Dec 2017 01:58:57 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 01:58:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130302; x=1544666302; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=aUdgLbh7xgOT2iXK5kOvFbY1SGXzuOBj+zGEt++8+vsCYj4yewW0ZbHd kqho/xBtw1o77GVUMzgBU8e2EtyOD49lLcru8yalVJqbuin5B+jGYE6zt ydP6+2u23vdMfoXhm1XZgesXHPbCAm6uJBUGy88xlnN6YBOpgzYrcaHat I=; Received: from surveyor.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.83]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 20:58:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130302; x=1544666302; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=IHov2h9vg4Sm3/6dfCaY/bUWNxjh/TrZDaGqyvcQhoKMhbTuFMIfi7nY qvF45fKNwL2cQi9pC1i57JYY34VAQgsvW0qTZtKATOWYB+2OImXB7e4PT nSJ+0NamRuisq8Z+FuPANAX38ccilOnxl//tPWzClcCQvxzaE4F8iDpWR 8=; From: alexander.levin@verizon.com Cc: Arnd Bergmann , "David S . Miller" , alexander.levin@verizon.com X-Host: surveyor.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 01:58:22 +0000 Received: from tbwexch29apd.uswin.ad.vzwcorp.com (153.114.162.53) by OHTWI1EXH002.uswin.ad.vzwcorp.com (10.144.218.44) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 20:58:22 -0500 Received: from OMZP1LUMXCA16.uswin.ad.vzwcorp.com (144.8.22.194) by tbwexch29apd.uswin.ad.vzwcorp.com (153.114.162.53) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:58:21 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA16.uswin.ad.vzwcorp.com (144.8.22.194) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 19:58:21 -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 19:58:21 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 061/100] isdn: kcapi: avoid uninitialized data Thread-Topic: [PATCH AUTOSEL for 4.9 061/100] isdn: kcapi: avoid uninitialized data Thread-Index: AQHTc7XAC1cRMjkPeEW7rMskb5SCSA== Date: Wed, 13 Dec 2017 01:57:37 +0000 Message-ID: <20171213015722.6722-36-alexander.levin@verizon.com> References: <20171213015722.6722-1-alexander.levin@verizon.com> In-Reply-To: <20171213015722.6722-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))))