Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp456101imm; Mon, 9 Jul 2018 05:05:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcF18k+10eeMbNQmdmXH1BxBLEQ52Ao33LftpMdglvDTDxE/vN456N9wz2f32BGubceyG/f X-Received: by 2002:a63:9741:: with SMTP id d1-v6mr18206898pgo.403.1531137934523; Mon, 09 Jul 2018 05:05:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531137934; cv=none; d=google.com; s=arc-20160816; b=hY7JkFlzYaqGt6FTYY2gFShnBYQDHHVfxz/hH8n03TU2SAfKgPpxV547qVBte3ANdM ta8NgBxEe5TgQUaOnk2VLcgMeWDpHYmZxaEEocJ3PBaiMEuWz7J+8SguKA0tOWk9PLYv fFL4CSU2K+FY7TgcWGS0p9kfBnrys5U8+WyW+n4bnV5lNG3ofIEenvPnCl7HlUtftuPd ZMxVILfElS6yqI8b8Ru87gjk6TSUdkpLN5XWfMp5pfogXOGIAQQ2zkIOx3Jm9spDilSU J6PTPFx4VnJGa8s0c8N9USui8tS+JtN/XE4UnSK/O9O60McROx5B1GM3PAq+p/Sebn2t rlxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=GusxrVvRX1ZpPR+JDSgBQZLjgIqjdUNzb3jgMPXJqJc=; b=IJ3T5vtuFzXVY5PvmY4axCXbiQRuSwdiIDepyfiFBdIZnNPoLg4SIqf/5ZZlwEf4VG lGy+RUce0u5UysPXIlNvFl6AVxgcloXrAAwevul4RnYRdGjVju0uR04hrd8PQJCg7eIa vNmI5JvpsDvY2ExvbJelPU6LKpVFHYU61xTaKQO6HstK6bGo4vzD/buR2rz+RXhHbAHy +HELFMNrXmwVz9v2J2vTccoobXbzbuaea+NuJNFSCwsduivB6vpa73uM5oCR18a4u8q4 YGVcDfAHjF2N6QU/hHPMtUt26DEjQ1JSRqhTehYnkq70Npk3ir39wuUPn4czoL49YiI3 Oouw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4-v6si14528851pfi.184.2018.07.09.05.05.19; Mon, 09 Jul 2018 05:05:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932687AbeGIMDW (ORCPT + 99 others); Mon, 9 Jul 2018 08:03:22 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42232 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932595AbeGIMDV (ORCPT ); Mon, 9 Jul 2018 08:03:21 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D48F7B78; Mon, 9 Jul 2018 12:03:20 +0000 (UTC) Date: Mon, 9 Jul 2018 14:03:17 +0200 From: Greg Kroah-Hartman To: "Winkler, Tomas" Cc: Dan Carpenter , "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() Message-ID: <20180709120317.GC5196@kroah.com> References: <20180704093449.vryluk7khaudstgp@kili.mountain> <20180707153255.GA29925@kroah.com> <5B8DA87D05A7694D9FA63FD143655C1B9D968DBA@hasmsx108.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B9D968DBA@hasmsx108.ger.corp.intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 09, 2018 at 11:36:21AM +0000, Winkler, Tomas wrote: > > > > 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. Yes you are, but for trusted developers, it's fine to merge their stuff as well. Remember, maintainers are not "gatekeepers" :) thanks, greg k-h