Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp1974131ima; Thu, 25 Oct 2018 07:48:06 -0700 (PDT) X-Google-Smtp-Source: AJdET5dJv7DnT2yJN3ZVq/MbMNoNH/H3EMcngZDSroxmWMpX4ID+1Xdsa8PmmAk+DCx5W8tSE0Hl X-Received: by 2002:a62:36c3:: with SMTP id d186-v6mr1797433pfa.133.1540478886134; Thu, 25 Oct 2018 07:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540478886; cv=none; d=google.com; s=arc-20160816; b=iuslmjkggZjCAmfuX1EWD/gHhZQu9ifwzn0GLrM+lPk7njzAZP7q/5olYA+xb1+pR2 QN+v0AeUKoUL2EeDMNYxUZu2m7pUCR8g8tAUsLvFFc5dIsXLD7u5vzXKy10r5uNqxCL0 QLzwaDtL1qCLVex2mECmsXWQMVnEWQwPkcNTZxmwwcqapeUWl/vITq8OkmFuc2DN/LCt EoJB1jQheiELK0+mHB+pOcQCJrnjEY3NN3tqxCKXsRLvOqWahPsstoPwyt7bOhBf+LmS i2KBYGF8MetEGMr7kGryBaMbe7lwgjdfaFyK9k5K3U3BLlbvdmsA7wgNqUOC8ITn4Ajn OacQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=4F+98LFWinbw7TMMeVXNX2f1Qz71FmLJkznq9pIwvOI=; b=JugUpFtYSNZfk3OivFn6Xx6PbH23JB8TOl9BArUTU1nIWF3UcwTqVMGCKD+dcQ3Mdj 4WrhnwVZSkUb6CC2rE8A+r5S20dKXndS9b4EYReyyHxDay1/FX4ciOtP3c0aCxLx3vbr EjABa5t6KxXnJ8aBPQWgcVzG6ca+suJ8JzRR1ChJ37M7CW6xjOPUbprBV+5p4pCStchq aCOVnsydSL+A+GuEnFb67GPfNlhHkGnboWJOs0a57FbJ3h39oJ3F8g9vSo4g3fGeBHKf S1cR2IffSUlHkGC96ahNPqvIyy5EpF4CtYaW5zl4JT6Q0mhkYBCiRNdEmlYypPDrG7Ik UAqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=N96x9NOU; 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 m20-v6si8303723pgk.579.2018.10.25.07.47.49; Thu, 25 Oct 2018 07:48:06 -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; dkim=pass header.i=@kernel.org header.s=default header.b=N96x9NOU; 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 S1727840AbeJYWoA (ORCPT + 99 others); Thu, 25 Oct 2018 18:44:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:52502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727699AbeJYWn7 (ORCPT ); Thu, 25 Oct 2018 18:43:59 -0400 Received: from sasha-vm.mshome.net (unknown [167.98.65.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5414C20847; Thu, 25 Oct 2018 14:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540476664; bh=OMVUQ7YV6kTqGfgt0cJeqKYdPOVuDiZ9n1GbNRX898o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N96x9NOUX/UHvJHoN//qtQwWsqH7wyiu1mvF8WTJlglrs5tSZWS9OgY0jsXXQcQbx MAgm2L1hXhbiyboHeoQ7CLSx+mosFS7btvEISc7TCK+b3ZrJ/SeyCByATJwzctQE+E p/FoN2YVRT709c5Ah2CRD3Oj6ajwV8oOZWdpaRuE= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Shuah Khan , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 4.14 06/46] usbip: vhci_hcd: update 'status' file header and format Date: Thu, 25 Oct 2018 10:10:13 -0400 Message-Id: <20181025141053.213330-6-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181025141053.213330-1-sashal@kernel.org> References: <20181025141053.213330-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shuah Khan [ Upstream commit 5468099c747240ed97dbb34340fece8ca87be34f ] Commit 2f2d0088eb93 ("usbip: prevent vhci_hcd driver from leaking a socket pointer address") in the /sys/devices/platform/vhci_hcd/status. Fix the header and field alignment to reflect the changes and make it easier to read. Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/usbip/vhci_sysfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/usb/usbip/vhci_sysfs.c index 4a22a9f06d96..eb7898353457 100644 --- a/drivers/usb/usbip/vhci_sysfs.c +++ b/drivers/usb/usbip/vhci_sysfs.c @@ -34,10 +34,10 @@ /* * output example: - * hub port sta spd dev sockfd local_busid - * hs 0000 004 000 00000000 3 1-2.3 + * hub port sta spd dev sockfd local_busid + * hs 0000 004 000 00000000 000003 1-2.3 * ................................................ - * ss 0008 004 000 00000000 4 2-3.4 + * ss 0008 004 000 00000000 000004 2-3.4 * ................................................ * * Output includes socket fd instead of socket pointer address to avoid @@ -61,13 +61,13 @@ static void port_show_vhci(char **out, int hub, int port, struct vhci_device *vd if (vdev->ud.status == VDEV_ST_USED) { *out += sprintf(*out, "%03u %08x ", vdev->speed, vdev->devid); - *out += sprintf(*out, "%u %s", + *out += sprintf(*out, "%06u %s", vdev->ud.sockfd, dev_name(&vdev->udev->dev)); } else { *out += sprintf(*out, "000 00000000 "); - *out += sprintf(*out, "0000000000000000 0-0"); + *out += sprintf(*out, "000000 0-0"); } *out += sprintf(*out, "\n"); @@ -165,7 +165,7 @@ static ssize_t status_show(struct device *dev, int pdev_nr; out += sprintf(out, - "hub port sta spd dev socket local_busid\n"); + "hub port sta spd dev sockfd local_busid\n"); pdev_nr = status_name_to_id(attr->attr.name); if (pdev_nr < 0) -- 2.17.1