Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3128537imm; Fri, 10 Aug 2018 04:22:22 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy1+gu5mv7UxyGkgBKKwauIe2l4qyIpW3U8WVA64RCSbF2F9kFmft+PbmwYyvPQPiu9YWH7 X-Received: by 2002:a62:b604:: with SMTP id j4-v6mr6710142pff.199.1533900142851; Fri, 10 Aug 2018 04:22:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533900142; cv=none; d=google.com; s=arc-20160816; b=Y3j8RcI+9hplpTO/EL5fVqK0QxT8osNAbSBkeSwgC8awnvvpm8Y2+95dhzRfTwCZhZ gqQO3auZpbhHxrkhaRMTDx8jf+p0VMmAeLyWMtGdvAAOrz8tXcVlHBBaoy3cYEofMI7b k3Ha1biWnlnekrkmLfSoYlBatEyOpYz1ogiWPiHxg0BT7+NETY4nv78KDc2XRjvWyfaW DMFb+zIX42kRPraEk/lvDJR3EvK/lV/GrUv6xEi7vyl8/6etPCYov+zd9zAoTB0lxW8b lFMRzgbS0QuIQvKRKxknAMPkNajDGnX2feLKhWHKQO+mNhUMI1rRu1jC9IIsnrDyRqwL 2QlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=st6efg24P+GhQgzEwIITzjRtyOrAseQ3PASm+m1rIiA=; b=SuJ7C0Z9zEw1+AonXtnKTa6uC7Y7LJbLZe9OOVYEm/NTVSz5ACAqGBjC8ygjrCU5Bq l6bNHdTsypKjdv5JEBfkZ1SVZ/GfiGcWkOHS6G3CgDt5zevU5OEbS6qGPufH2EgLrQv+ ABQWNdEE3elpAsuXDPADLjUC3NCvvcsO1S2xvg7md4wYZqs5/P+SzoPt/4M6mnEUnPM8 Zg6i1hCGFagyscQU6w7zYHQorztcVAk6NP19GW5IkKPqIautAeE4LJbJUe7ibIygFsfp AIsjR1DIFuvur48comBGx8ze/lPvvuVMfeqFqeoUbyjdJkL78pLlNA5u1IPEHr59+CVX GyTA== 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 t196-v6si8500581pgc.308.2018.08.10.04.22.06; Fri, 10 Aug 2018 04:22:22 -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 S1727810AbeHJNXp (ORCPT + 99 others); Fri, 10 Aug 2018 09:23:45 -0400 Received: from mx2.suse.de ([195.135.220.15]:57210 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727270AbeHJNXo (ORCPT ); Fri, 10 Aug 2018 09:23:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 43E13AE16; Fri, 10 Aug 2018 10:54:19 +0000 (UTC) Subject: Re: [PATCH net-next] xen-netfront: fix warn message as irq device name has '/' To: Xiao Liang , netdev@vger.kernel.org, xen-devel@lists.xenproject.org, davem@davemloft.net, boris.ostrovsky@oracle.com Cc: linux-kernel@vger.kernel.org References: <20180809060355.6525-1-xiliang@redhat.com> From: Juergen Gross Openpgp: preference=signencrypt Autocrypt: addr=jgross@suse.com; prefer-encrypt=mutual; keydata= xsBNBFOMcBYBCACgGjqjo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FKCb Message-ID: <979c86e8-41dc-604e-5367-d09b4f1f57e9@suse.com> Date: Fri, 10 Aug 2018 12:54:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180809060355.6525-1-xiliang@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/08/18 08:03, Xiao Liang wrote: > There is a call trace generated after commit 2d408c0d4574b01b9ed45e02516888bf925e11a9( > xen-netfront: fix queue name setting). There is no 'device/vif/xx-q0-tx' file found > under /proc/irq/xx/. > > This patch only picks up device type and id as its name. > > With the patch, now /proc/interrupts looks like and the warning message gone: > 70: 21 0 0 0 xen-dyn -event vif0-q0-tx > 71: 15 0 0 0 xen-dyn -event vif0-q0-rx > 72: 14 0 0 0 xen-dyn -event vif0-q1-tx > 73: 33 0 0 0 xen-dyn -event vif0-q1-rx > 74: 12 0 0 0 xen-dyn -event vif0-q2-tx > 75: 24 0 0 0 xen-dyn -event vif0-q2-rx > 76: 19 0 0 0 xen-dyn -event vif0-q3-tx > 77: 21 0 0 0 xen-dyn -event vif0-q3-rx > > Below is call trace information without this patch: > > name 'device/vif/0-q0-tx' > WARNING: CPU: 2 PID: 37 at fs/proc/generic.c:174 __xlate_proc_name+0x85/0xa0 > RIP: 0010:__xlate_proc_name+0x85/0xa0 > RSP: 0018:ffffb85c40473c18 EFLAGS: 00010286 > RAX: 0000000000000000 RBX: 0000000000000006 RCX: 0000000000000006 > RDX: 0000000000000007 RSI: 0000000000000096 RDI: ffff984c7f516930 > RBP: ffffb85c40473cb8 R08: 000000000000002c R09: 0000000000000229 > R10: 0000000000000000 R11: 0000000000000001 R12: ffffb85c40473c98 > R13: ffffb85c40473cb8 R14: ffffb85c40473c50 R15: 0000000000000000 > FS: 0000000000000000(0000) GS:ffff984c7f500000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00007f69b6899038 CR3: 000000001c20a006 CR4: 00000000001606e0 > Call Trace: > __proc_create+0x45/0x230 > ? snprintf+0x49/0x60 > proc_mkdir_data+0x35/0x90 > register_handler_proc+0xef/0x110 > ? proc_register+0xfc/0x110 > ? proc_create_data+0x70/0xb0 > __setup_irq+0x39b/0x660 > ? request_threaded_irq+0xad/0x160 > request_threaded_irq+0xf5/0x160 > ? xennet_tx_buf_gc+0x1d0/0x1d0 [xen_netfront] > bind_evtchn_to_irqhandler+0x3d/0x70 > ? xenbus_alloc_evtchn+0x41/0xa0 > netback_changed+0xa46/0xcda [xen_netfront] > ? find_watch+0x40/0x40 > xenwatch_thread+0xc5/0x160 > ? finish_wait+0x80/0x80 > kthread+0x112/0x130 > ? kthread_create_worker_on_cpu+0x70/0x70 > ret_from_fork+0x35/0x40 > Code: 81 5c 00 48 85 c0 75 cc 5b 49 89 2e 31 c0 5d 4d 89 3c 24 41 5c 41 5d 41 5e 41 5f c3 4c 89 ee 48 c7 c7 40 4f 0e b4 e8 65 ea d8 ff <0f> 0b b8 fe ff ff ff 5b 5d 41 5c 41 5d 41 5e 41 5f c3 66 0f 1f > ---[ end trace 650e5561b0caab3a ]--- > > Signed-off-by: Xiao Liang > --- > drivers/net/xen-netfront.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c > index 799cba4624a5..6f40df4a452e 100644 > --- a/drivers/net/xen-netfront.c > +++ b/drivers/net/xen-netfront.c > @@ -1604,14 +1604,16 @@ static int xennet_init_queue(struct netfront_queue *queue) > { > unsigned short i; > int err = 0; > + int devid = 0; > > spin_lock_init(&queue->tx_lock); > spin_lock_init(&queue->rx_lock); > > timer_setup(&queue->rx_refill_timer, rx_refill_timeout, 0); > > - snprintf(queue->name, sizeof(queue->name), "%s-q%u", > - queue->info->xbdev->nodename, queue->id); > + kstrtoint(strrchr(queue->info->xbdev->nodename,'/')+1, 10, &devid); Please add blanks before '/' and around the +. With that you can add my: Reviewed-by: Juergen Gross Juergen