Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp431396imm; Mon, 9 Jul 2018 04:37:20 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeTwEGj+8jSQsYXVKYIx4+c1BjPrJMyezdROob0pFLjHnTgtMIdvlyP37lidFIu46r1Z494 X-Received: by 2002:a17:902:8497:: with SMTP id c23-v6mr20698136plo.124.1531136240237; Mon, 09 Jul 2018 04:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531136240; cv=none; d=google.com; s=arc-20160816; b=ygn09Vg5Ole88NORPYaW+HMURGMbN/2VBjKEnHmUW9LApdJpFjSnASgae4qIT73nqk 343l8zG0LxmCcH3zCjsLFTvkEfC+GhANbyd5WHxLcTIdYqzEOAkjyrM2nOk2GlGQ39jK rd6JXizYuCjXimQ6H7PaSq9gGqHJF3865mq+2HMftftPA90QEH/BMpzLNzz2yZ7Y06pR ipe8W8ZKDEMhSCIpCwIA2BHlOkGG/LgMimzwFItELpsCvGRQ0UYPSpbnVZlqz+PL9b+s hgZFmfW/4pwdtseBm79oXFGwHrTIlLarCk8g2/LGmb4icdSB0B4sH4uQ1vsTa4E9ngfY FM2w== 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 :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=JywpbklC+3ntwW9AHSqRHEdA50dY3+PftA1XG6Z4yhM=; b=L1rvqAVxf9xpMEsBGVuz7v9us/6nkY2Q0Fd+7bh9Ao5oKF4gnoBMbqhy09/BF4dmi8 epVfLQw+5/ktHCXKp5fbbVvu2sYpwxKNZoWWj5uEoiPQ3bGZ7veks56sBrdElUNM9IIT A2bA/tqTzuSxEtSIdMh+OVMoRvHGSMtkSh4jO9lxoiDiWeEr5am5jFcr1NGrakskoSYz BX0295wt+rQdJg88PF9N9Z5P7xYDL8NgAuVp+2sqkq5A/KfryKH62v4viHeYLDz5/Fxi Oa4qtEfyAB7DvzfnLCDluvrcDVh2rD5Asll1EpQZnLksfsCu9DRVFEAwFPck6vbUQD2j 9nOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x188-v6si2493694pfx.19.2018.07.09.04.37.05; Mon, 09 Jul 2018 04:37:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754523AbeGILg1 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 9 Jul 2018 07:36:27 -0400 Received: from mga06.intel.com ([134.134.136.31]:13948 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754432AbeGILgZ (ORCPT ); Mon, 9 Jul 2018 07:36:25 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 04:36:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,330,1526367600"; d="scan'208";a="70754935" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 09 Jul 2018 04:36:24 -0700 Received: from HASMSX110.ger.corp.intel.com (10.184.198.28) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 9 Jul 2018 04:36:24 -0700 Received: from hasmsx108.ger.corp.intel.com ([169.254.9.54]) by HASMSX110.ger.corp.intel.com ([169.254.6.45]) with mapi id 14.03.0319.002; Mon, 9 Jul 2018 14:36:21 +0300 From: "Winkler, Tomas" To: Greg Kroah-Hartman , Dan Carpenter CC: "Usyskin, Alexander" , Arnd Bergmann , "linux-kernel@vger.kernel.org" , "kernel-janitors@vger.kernel.org" Subject: RE: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version() Thread-Topic: [PATCH] mei: bus: type promotion bug in mei_nfc_if_version() Thread-Index: AQHUE3png2dbGFvDeUeKteEow93QvaSDtk2AgAMUYbA= Date: Mon, 9 Jul 2018 11:36:21 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B9D968DBA@hasmsx108.ger.corp.intel.com> References: <20180704093449.vryluk7khaudstgp@kili.mountain> <20180707153255.GA29925@kroah.com> In-Reply-To: <20180707153255.GA29925@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMDE3YWRmYzMtN2JiZS00ZTEwLTliMjgtM2NiNDgyNDU2NDg2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiXC9wNWpiY2pwbVQzUm1xdUVTUGN2QmVMaVN2THFrUkF2ancyQVkwZjB3M2xUc0xXZzRPTlwvMFpWY0pxV09yU3BnIn0= dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.12.116.147] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > On Wed, Jul 04, 2018 at 12:34:49PM +0300, Dan Carpenter wrote: > > We accidentally removed the check for negative returns without > > considering the issue of type promotion. The "if_version_length" > > variable is type size_t so if __mei_cl_recv() returns a negative then > > "bytes_recv" is type promoted to a high positive value and treated as > > success. > > > > Fixes: 582ab27a063a ("mei: bus: fix received data size check in NFC > > fixup") > > Signed-off-by: Dan Carpenter > > Didn't apply to my tree at all :( I will rework this, anyhow I would prefer if you can wait for my signoff before applying, I believe we are reasonably responsive. Thanks Tomas