Commit 852b6ed1 authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

target/iblock: Use match_strlcpy for Opt_udev_path string assignment

Following commit dbc6e022

 from Al Viro for fileio, go ahead and make
Opt_udev_path within iblock_set_configfs_dev_params use match_strlcpy
instead of the match_strdup -> snprintf -> kfree equivalent.
Reported-by: default avatarAl Viro <>
Cc: Al Viro <>
Signed-off-by: default avatarNicholas Bellinger <>
parent 35d1efe8
......@@ -454,14 +454,11 @@ static ssize_t iblock_set_configfs_dev_params(struct se_hba *hba,
ret = -EEXIST;
goto out;
arg_p = match_strdup(&args[0]);
if (!arg_p) {
ret = -ENOMEM;
if (match_strlcpy(ib_dev->ibd_udev_path, &args[0],
ret = -EINVAL;
snprintf(ib_dev->ibd_udev_path, SE_UDEV_PATH_LEN,
"%s", arg_p);
pr_debug("IBLOCK: Referencing UDEV path: %s\n",
ib_dev->ibd_flags |= IBDF_HAS_UDEV_PATH;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment