Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4092752imu; Tue, 18 Dec 2018 08:57:39 -0800 (PST) X-Google-Smtp-Source: AFSGD/VzthBhnXWrg4DQ0KH4XY9rY8v11y7hIOpKQ86OH2nvwDYlSnsl5c5xh316haa7e5Aw5sz9 X-Received: by 2002:a62:1043:: with SMTP id y64mr17590245pfi.78.1545152259329; Tue, 18 Dec 2018 08:57:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545152259; cv=none; d=google.com; s=arc-20160816; b=sGFTHAkTuPaT2Vw+Xl7hGkWv774ld0d0iGRNan65RFpPQcITffsRgWtXTXhWx3RdKQ IavT0fmQs1GdLuE3gWdEiScrD9Ky4FSakyJpgCPkitOmlSTHjT0icAvcDvI/j/OlfnBO Y+ErCzxvF0AdGKwyvcG4NvhamE6j/EVj166jGedCpSLkB7PtgnuiE1Mxzl0I6A/O1s4k MweXH0ow/X6pT7YAry7kENNKAiw0y0lHsDu8S7xkUsIoiM+dJpOwUkFnn6ZGptJtcliW j9KiAHc1QhemcSeQgD1ox26D+4bS4P4uriW4eZDjsQT9CFk6JWU+28aJaTdOeHcGbaIA 0L1g== 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:dkim-signature; bh=JMwEeeSSbSML21l4eV1WGnzLk+tfle034092yeOdo8w=; b=jIbd4tONeSMYeky9yvHAIykI1Lwu9H+rPWkNcpdX89clcXBw/MuctDy7uRxYJgPjbA XAHRefAk9n1lSwShDCyWtBjqRL2PJLccyfNpmJ0sgnJYOXw/STsckimZEdSlZlsf3jdX Gqt/05DdNPQ9VuZW/aowdAhCUyMgbE4kPo4XVsE0DUPBXfMPgq+n44hm+q7hlN0ri57y Pu7AGHjQGLR4BHPVIOCspjUyzT/DbSbBv5OZsvMRBzutsJibiee9uEDEDNCQXgj8Y7tu q19lMo0RvGm5DwcyP+stQdR7P1rJkm2rTWTJoAwEeyXh3eDvlNx70VYR/OEpoqaba5cN akfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=okgp2Nmi; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 64si11400091ply.372.2018.12.18.08.57.17; Tue, 18 Dec 2018 08:57:39 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=okgp2Nmi; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727044AbeLRQzo (ORCPT + 99 others); Tue, 18 Dec 2018 11:55:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:51398 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbeLRQzo (ORCPT ); Tue, 18 Dec 2018 11:55:44 -0500 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8F8E321841; Tue, 18 Dec 2018 16:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545152143; bh=JMwEeeSSbSML21l4eV1WGnzLk+tfle034092yeOdo8w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=okgp2NmihbPBHhUbzIs9C+IQVYCKoDb+7OSNLhwJGEi2Lx2U9Dkt7w6M1oaQ7Ar7t SNDBWQy4Yv5auvWYux1fv/337/gnSpwTjjLpuo+/x6HqBEimvQPXUYuuI3qrZKmCby GMWKrtHaxot7c+KxkRbXW0PxzTiJCpQ28uTvpgaA= Date: Tue, 18 Dec 2018 11:55:42 -0500 From: Sasha Levin To: Dexuan Cui Cc: "'gregkh@linuxfoundation.org'" , Stephen Hemminger , Sasha Levin , Haiyang Zhang , KY Srinivasan , Stephen Hemminger , "'linux-kernel@vger.kernel.org'" , Michael Kelley , "'apw@canonical.com'" , "'olaf@aepfle.de'" , "'devel@linuxdriverproject.org'" , vkuznets , "'jasowang@redhat.com'" Subject: Re: [PATCH] Drivers: hv: vmbus: Check for ring when getting debug info Message-ID: <20181218165542.GA2746@sasha-vm> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 17, 2018 at 08:16:09PM +0000, Dexuan Cui wrote: > >fc96df16a1ce is good and can already fix the "return stack garbage" issue, >but let's also improve hv_ringbuffer_get_debuginfo(), which would silently >return stack garbage, if people forget to check channel->state or >ring_info->ring_buffer, when using the function in the future. > >Having an error check in the function would eliminate the potential risk. > >Add a Fixes tag to indicate the patch depdendency. > >Fixes: fc96df16a1ce ("Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened channels") >Cc: stable@vger.kernel.org >Cc: K. Y. Srinivasan >Cc: Haiyang Zhang >Signed-off-by: Stephen Hemminger >Signed-off-by: Dexuan Cui >--- > >*NOTE*: the patch is based on char-misc's char-misc-linus branch. Queued up, thank you. -- Thanks, Sasha