From patchwork Wed Dec 13 01:58:34 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: 121711 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4904845qgn; Tue, 12 Dec 2017 18:25:17 -0800 (PST) X-Google-Smtp-Source: ACJfBosIG/skMIiqgImC4C1p4Z8ijsUqBDItjYINfMkoDyb0tZ+51+lB6aVtKeCY2SVvaFUJZHvv X-Received: by 10.98.253.3 with SMTP id p3mr4432027pfh.20.1513131917645; Tue, 12 Dec 2017 18:25:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513131917; cv=none; d=google.com; s=arc-20160816; b=RnovK2e+GnnWZ85mLtAQvE1MwY8I9jJewS0OKNCcJd/dqFzs5nzgbXyFK2+Yr+FCO6 SabH8VWDFo5t3I8kb+suxaJujC0MP/eCj7o3hQfvl2kQPFAj57cKq5a13IIJkH1FQc79 0EN6stZrd8wTEfOVutN7eb/s0PhZM017eucT6jy8Ssq9lcenx6mA8zBD76xrNm2K/jtB bYcazcm5bfl/3wUNUaZ8+Wjs1Jmf3hcwCmcP1sCw9FqkFIC0BAaZY954eiMBLaovx7/G vkhUjA6zcQtgUwfNqpnS8bVOf179cTLMEsVxRkLi4LqGb36E36RSXEcy7Y8mol8s7lbs 8WUA== 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=cmyiFBrTJnfs+3CowJMgiWoE92fYPpbaFrcyldPvQjsK1/s64YU4j0H6vTEF+pJH7d kwcFI1bNtxxbRjFNR3Q3BtuM8khxHMkauiPyr2drG2GhY04l4A5fXzx0uqn/THzNNJzz a0D68JkTRnKZ/z4IiN9srJ9WQaARbvVXFGuqmz/HsHzqd+dcRywnoabnFps83qvf0HqT DooMX5+FzFOl48YDHikzR3mLBY+5lxArfX7aP24cniSE/F/JaiVneb/K7qvRjQZOGQWo XZic8TdSPN7OFq1jGElEmZ9GJWeYbA/iXZPKxfw3rTFysYMOC5ivBxxRgyVNWDvX76s2 F6Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=hMGcE1OY; dkim=fail header.i=@verizon.com header.s=corp header.b=lDUvC5Ro; dkim=fail header.i=@verizon.com header.s=corp header.b=KBbZ4TTN; 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 f8si426047pga.279.2017.12.12.18.25.17; Tue, 12 Dec 2017 18:25:17 -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=hMGcE1OY; dkim=fail header.i=@verizon.com header.s=corp header.b=lDUvC5Ro; dkim=fail header.i=@verizon.com header.s=corp header.b=KBbZ4TTN; 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 S1753621AbdLMCZP (ORCPT + 10 others); Tue, 12 Dec 2017 21:25:15 -0500 Received: from omzsmtpe01.verizonbusiness.com ([199.249.25.210]:35576 "EHLO omzsmtpe01.verizonbusiness.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753553AbdLMCAb (ORCPT ); Tue, 12 Dec 2017 21:00:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130431; x=1544666431; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=hMGcE1OY6siizAcI41GASwEjtarY7feieuIdxUTGUhV4eqv30b+T/Ut7 PZXbyMBVjtI+38z5vA4i4BKRD+rkckj9xQTBop96iW5D51FrvfiDe1a3S BpIy3Pp+X9KQglNxKNhd3FVBJwXnWTF33vxW6ro9qDZBT7b1sNNac3WIE 4=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by omzsmtpe01.verizonbusiness.com with ESMTP; 13 Dec 2017 02:00:20 +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 02:00:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130409; x=1544666409; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=lDUvC5RocAwwVM80aFkzgGXbMvfagL1kmUPbeUPldGFPOVoLKy4LLm1g 0VCWyq/hNJx9u64FsvLpY7ObvFYqPUe1NqJful6jcV6YyXlW/Qm1UaurU rXC4d0fYy68OjiImFeO8CJfCvenmTi9e1ugF6xr1exmjJHa84LpdQ/aqn 4=; 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 21:00:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130410; x=1544666410; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=KBbZ4TTNRmRTsq7WnDU0Q+F1gZcfJ0E+v3Os+HXNuKGOgDghkFyr48p4 9uZKoruq1AlFZWJ8G6YAAhs4uBKUOSC60jbXujrNjdfA+oKy5q/SbOw4h QlIVR9QsARiKqt9/YNmKLz493z0Bqg/Yq/Wn+2nArvM/HyjM1jGeubYC+ U=; From: alexander.levin@verizon.com Cc: Arnd Bergmann , "David S . Miller" , alexander.levin@verizon.com X-Host: surveyor.tdc.vzwcorp.com Received: from ohtwi1exh003.uswin.ad.vzwcorp.com ([10.144.218.45]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 02:00:09 +0000 Received: from tbwexch29apd.uswin.ad.vzwcorp.com (153.114.162.53) by OHTWI1EXH003.uswin.ad.vzwcorp.com (10.144.218.45) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 21:00:09 -0500 Received: from OMZP1LUMXCA11.uswin.ad.vzwcorp.com (144.8.22.186) by tbwexch29apd.uswin.ad.vzwcorp.com (153.114.162.53) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 21:00:09 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA11.uswin.ad.vzwcorp.com (144.8.22.186) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:00:08 -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:00:08 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.4 35/59] isdn: kcapi: avoid uninitialized data Thread-Topic: [PATCH AUTOSEL for 4.4 35/59] isdn: kcapi: avoid uninitialized data Thread-Index: AQHTc7XirF4Q6ixRFkGe6/ZQaGmuag== Date: Wed, 13 Dec 2017 01:58:34 +0000 Message-ID: <20171213015817.6950-35-alexander.levin@verizon.com> References: <20171213015817.6950-1-alexander.levin@verizon.com> In-Reply-To: <20171213015817.6950-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))))