Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: target: Do not write NUL characters into ASCII configfs output

NUL characters are not allowed in ASCII configfs output. Hence this
patch.

Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20251027184639.3501254-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
c03b55f2 5fb43e2f

-1
-1
drivers/target/target_core_configfs.c
··· 2787 2787 cur_len = snprintf(buf, LU_GROUP_NAME_BUF, "%s/%s\n", 2788 2788 config_item_name(&hba->hba_group.cg_item), 2789 2789 config_item_name(&dev->dev_group.cg_item)); 2790 - cur_len++; /* Extra byte for NULL terminator */ 2791 2790 2792 2791 if ((cur_len + len) > PAGE_SIZE || cur_len > LU_GROUP_NAME_BUF) { 2793 2792 pr_warn("Ran out of lu_gp_show_attr"