All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.4 01/15] NFSv4 only print the label when its queried
@ 2022-02-03 20:35 Sasha Levin
  2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 02/15] nfs: nfs4clinet: check the return value of kstrdup() Sasha Levin
                   ` (13 more replies)
  0 siblings, 14 replies; 17+ messages in thread
From: Sasha Levin @ 2022-02-03 20:35 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Olga Kornievskaia, Anna Schumaker, Sasha Levin, trond.myklebust,
	anna.schumaker, linux-nfs

From: Olga Kornievskaia <kolga@netapp.com>

[ Upstream commit 2c52c8376db7160a1dd8a681c61c9258405ef143 ]

When the bitmask of the attributes doesn't include the security label,
don't bother printing it. Since the label might not be null terminated,
adjust the printing format accordingly.

Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 fs/nfs/nfs4xdr.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 9a022a4fb9643..0fc08d22c9218 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4187,10 +4187,11 @@ static int decode_attr_security_label(struct xdr_stream *xdr, uint32_t *bitmap,
 		} else
 			printk(KERN_WARNING "%s: label too long (%u)!\n",
 					__func__, len);
+		if (label && label->label)
+			dprintk("%s: label=%.*s, len=%d, PI=%d, LFS=%d\n",
+				__func__, label->len, (char *)label->label,
+				label->len, label->pi, label->lfs);
 	}
-	if (label && label->label)
-		dprintk("%s: label=%s, len=%d, PI=%d, LFS=%d\n", __func__,
-			(char *)label->label, label->len, label->pi, label->lfs);
 	return status;
 }
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-02-03 20:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 20:35 [PATCH AUTOSEL 5.4 01/15] NFSv4 only print the label when its queried Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 02/15] nfs: nfs4clinet: check the return value of kstrdup() Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 03/15] NFSv4.1: Fix uninitialised variable in devicenotify Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 04/15] netfilter: nf_conntrack_netbios_ns: fix helper module alias Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 05/15] NFSv4 remove zero number of fs_locations entries error check Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 06/15] NFSv4 expose nfs_parse_server_name function Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 07/15] drm: panel-orientation-quirks: Add quirk for the 1Netbook OneXPlayer Sasha Levin
2022-02-03 20:35   ` Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 08/15] net: sched: Clarify error message when qdisc kind is unknown Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 09/15] scsi: target: iscsi: Make sure the np under each tpg is unique Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 10/15] scsi: qedf: Fix refcount issue when LOGO is received during TMF Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 11/15] scsi: myrs: Fix crash in error case Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 12/15] PM: wakeup: simplify the output logic of pm_show_wakelocks() Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 13/15] PM: hibernate: Remove register_nosave_region_late() Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 14/15] usb: dwc2: gadget: don't try to disable ep0 in dwc2_hsotg_suspend Sasha Levin
2022-02-03 20:35 ` [PATCH AUTOSEL 5.4 15/15] net: stmmac: dwmac-sun8i: use return val of readl_poll_timeout() Sasha Levin
2022-02-03 20:35   ` Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.