From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753184AbdBCJ4i (ORCPT ); Fri, 3 Feb 2017 04:56:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10594 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753008AbdBCJ4g (ORCPT ); Fri, 3 Feb 2017 04:56:36 -0500 Subject: Re: [PATCH 2/9] virtio_pci: use shared interrupts for virtqueues To: Christoph Hellwig References: <1485504997-17584-1-git-send-email-hch@lst.de> <1485504997-17584-3-git-send-email-hch@lst.de> <20170203082606.GB26800@lst.de> <12332f9d-2cf8-d761-032e-a5a89863fd09@redhat.com> <20170203095219.GA28483@lst.de> Cc: mst@redhat.com, axboe@kernel.dk, pbonzini@redhat.com, virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org From: Jason Wang Message-ID: Date: Fri, 3 Feb 2017 17:56:30 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170203095219.GA28483@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 03 Feb 2017 09:56:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017年02月03日 17:52, Christoph Hellwig wrote: > On Fri, Feb 03, 2017 at 05:47:41PM +0800, Jason Wang wrote: >>> No, we need to allocate the array larger in that case as want proper >>> names for the interrupts. >> Consider the case of !per_vq_vectors, the size of msix_names is 2, but >> snprintf can do out of bound accessing here. (We name the msix shared by >> virtqueues with something like "%s-virtqueues" before the patch). > Yes, that's what I meant above - we need to allocate a large array > starting with this patch. I'll fix it up for the next version. I see. Thanks