search for: se_wwn

Displaying 20 results from an estimated 45 matches for "se_wwn".

2017 Jan 09
3
[PATCH] vhost: scsi: constify target_core_fabric_ops structures
...gmail.com> --- drivers/vhost/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 253310c..620366d 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -2087,7 +2087,7 @@ static void vhost_scsi_drop_tport(struct se_wwn *wwn) NULL, }; -static struct target_core_fabric_ops vhost_scsi_ops = { +static const struct target_core_fabric_ops vhost_scsi_ops = { .module = THIS_MODULE, .name = "vhost", .get_fabric_name = vhost_scsi_get_fabric_name, -- 1.9.1
2017 Jan 09
3
[PATCH] vhost: scsi: constify target_core_fabric_ops structures
...gmail.com> --- drivers/vhost/scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 253310c..620366d 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -2087,7 +2087,7 @@ static void vhost_scsi_drop_tport(struct se_wwn *wwn) NULL, }; -static struct target_core_fabric_ops vhost_scsi_ops = { +static const struct target_core_fabric_ops vhost_scsi_ops = { .module = THIS_MODULE, .name = "vhost", .get_fabric_name = vhost_scsi_get_fabric_name, -- 1.9.1
2012 Jul 13
1
[patch -next] tcm_vhost: another strlen() off by one
...ne in the patches I sent yesterday. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index 29850cb..ea72198 100644 --- a/drivers/vhost/tcm_vhost.c +++ b/drivers/vhost/tcm_vhost.c @@ -1424,7 +1424,7 @@ static struct se_wwn *tcm_vhost_make_tport( return ERR_PTR(-EINVAL); check_len: - if (strlen(name) > TCM_VHOST_NAMELEN) { + if (strlen(name) >= TCM_VHOST_NAMELEN) { pr_err("Emulated %s Address: %s, exceeds" " max: %d\n", name, tcm_vhost_dump_proto_id(tport), TCM_VHOST_NAMELEN);
2012 Jul 13
1
[patch -next] tcm_vhost: another strlen() off by one
...ne in the patches I sent yesterday. Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com> diff --git a/drivers/vhost/tcm_vhost.c b/drivers/vhost/tcm_vhost.c index 29850cb..ea72198 100644 --- a/drivers/vhost/tcm_vhost.c +++ b/drivers/vhost/tcm_vhost.c @@ -1424,7 +1424,7 @@ static struct se_wwn *tcm_vhost_make_tport( return ERR_PTR(-EINVAL); check_len: - if (strlen(name) > TCM_VHOST_NAMELEN) { + if (strlen(name) >= TCM_VHOST_NAMELEN) { pr_err("Emulated %s Address: %s, exceeds" " max: %d\n", name, tcm_vhost_dump_proto_id(tport), TCM_VHOST_NAMELEN);
2015 Feb 05
1
[patch] vhost/scsi: potential memory corruption
...[1] = tpg->tport_tpgt & 0xFF; + evt->event.lun[1] = tpg->tport_tpgt; if (lun->unpacked_lun >= 256) evt->event.lun[2] = lun->unpacked_lun >> 8 | 0x40 ; evt->event.lun[3] = lun->unpacked_lun & 0xFF; @@ -2149,12 +2149,12 @@ vhost_scsi_make_tpg(struct se_wwn *wwn, struct vhost_scsi_tport, tport_wwn); struct vhost_scsi_tpg *tpg; - unsigned long tpgt; + u16 tpgt; int ret; if (strstr(name, "tpgt_") != name) return ERR_PTR(-EINVAL); - if (kstrtoul(name + 5, 10, &tpgt) || tpgt > UINT_MAX) + if (kstrtou16(name + 5, 10, &...
2015 Feb 05
1
[patch] vhost/scsi: potential memory corruption
...[1] = tpg->tport_tpgt & 0xFF; + evt->event.lun[1] = tpg->tport_tpgt; if (lun->unpacked_lun >= 256) evt->event.lun[2] = lun->unpacked_lun >> 8 | 0x40 ; evt->event.lun[3] = lun->unpacked_lun & 0xFF; @@ -2149,12 +2149,12 @@ vhost_scsi_make_tpg(struct se_wwn *wwn, struct vhost_scsi_tport, tport_wwn); struct vhost_scsi_tpg *tpg; - unsigned long tpgt; + u16 tpgt; int ret; if (strstr(name, "tpgt_") != name) return ERR_PTR(-EINVAL); - if (kstrtoul(name + 5, 10, &tpgt) || tpgt > UINT_MAX) + if (kstrtou16(name + 5, 10, &...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...ruct se_portal_group *se_tpg, +static ssize_t tcm_vhost_tpg_store_nexus(struct se_portal_group *se_tpg, const char *page, size_t count) { @@ -1336,8 +1352,7 @@ static struct configfs_attribute *tcm_vhost_tpg_attrs[] = { NULL, }; -static struct se_portal_group *tcm_vhost_make_tpg( - struct se_wwn *wwn, +static struct se_portal_group *tcm_vhost_make_tpg(struct se_wwn *wwn, struct config_group *group, const char *name) { @@ -1385,7 +1400,7 @@ static void tcm_vhost_drop_tpg(struct se_portal_group *se_tpg) list_del(&tpg->tv_tpg_list); mutex_unlock(&tcm_vhost_mutex); /* -...
2012 Jul 30
0
[PATCH] tcm_vhost: Post-merge review changes requested by MST
...ruct se_portal_group *se_tpg, +static ssize_t tcm_vhost_tpg_store_nexus(struct se_portal_group *se_tpg, const char *page, size_t count) { @@ -1336,8 +1352,7 @@ static struct configfs_attribute *tcm_vhost_tpg_attrs[] = { NULL, }; -static struct se_portal_group *tcm_vhost_make_tpg( - struct se_wwn *wwn, +static struct se_portal_group *tcm_vhost_make_tpg(struct se_wwn *wwn, struct config_group *group, const char *name) { @@ -1385,7 +1400,7 @@ static void tcm_vhost_drop_tpg(struct se_portal_group *se_tpg) list_del(&tpg->tv_tpg_list); mutex_unlock(&tcm_vhost_mutex); /* -...
2017 Jan 10
1
[PATCH] vhost: scsi: constify target_core_fabric_ops structures
...le changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c >> index 253310c..620366d 100644 >> --- a/drivers/vhost/scsi.c >> +++ b/drivers/vhost/scsi.c >> @@ -2087,7 +2087,7 @@ static void vhost_scsi_drop_tport(struct se_wwn *wwn) >> NULL, >> }; >> >> -static struct target_core_fabric_ops vhost_scsi_ops = { >> +static const struct target_core_fabric_ops vhost_scsi_ops = { >> .module = THIS_MODULE, >> .name = &...
2017 Jan 10
1
[PATCH] vhost: scsi: constify target_core_fabric_ops structures
...le changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c >> index 253310c..620366d 100644 >> --- a/drivers/vhost/scsi.c >> +++ b/drivers/vhost/scsi.c >> @@ -2087,7 +2087,7 @@ static void vhost_scsi_drop_tport(struct se_wwn *wwn) >> NULL, >> }; >> >> -static struct target_core_fabric_ops vhost_scsi_ops = { >> +static const struct target_core_fabric_ops vhost_scsi_ops = { >> .module = THIS_MODULE, >> .name = &...
2017 May 20
4
[PATCH 0/2] vhost/scsi: Adjustments for five function implementations
From: Markus Elfring <elfring at users.sourceforge.net> Date: Sat, 20 May 2017 16:25:04 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Improve a size determination in four functions Delete error messages for failed memory allocations in five functions drivers/vhost/scsi.c | 33 +++++++++++---------------------- 1 file
2017 May 20
4
[PATCH 0/2] vhost/scsi: Adjustments for five function implementations
From: Markus Elfring <elfring at users.sourceforge.net> Date: Sat, 20 May 2017 16:25:04 +0200 A few update suggestions were taken into account from static source code analysis. Markus Elfring (2): Improve a size determination in four functions Delete error messages for failed memory allocations in five functions drivers/vhost/scsi.c | 33 +++++++++++---------------------- 1 file
2013 May 03
5
[PATCH 0/5] vhost-scsi cleanup
Asias He (5): vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration vhost-scsi: Rename struct vhost_scsi *s to *vs vhost-scsi: Make func indention more consistent vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd drivers/vhost/scsi.c | 469 +++++++++++++++++++++++++++------------------------ 1 file changed,
2013 May 03
5
[PATCH 0/5] vhost-scsi cleanup
Asias He (5): vhost-scsi: Remove unnecessary forward struct vhost_scsi declaration vhost-scsi: Rename struct vhost_scsi *s to *vs vhost-scsi: Make func indention more consistent vhost-scsi: Rename struct tcm_vhost_tpg *tv_tpg to *tpg vhost-scsi: Rename struct tcm_vhost_cmd *tv_cmd to *cmd drivers/vhost/scsi.c | 469 +++++++++++++++++++++++++++------------------------ 1 file changed,
2017 Jan 10
0
[PATCH] vhost: scsi: constify target_core_fabric_ops structures
...csi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c > index 253310c..620366d 100644 > --- a/drivers/vhost/scsi.c > +++ b/drivers/vhost/scsi.c > @@ -2087,7 +2087,7 @@ static void vhost_scsi_drop_tport(struct se_wwn *wwn) > NULL, > }; > > -static struct target_core_fabric_ops vhost_scsi_ops = { > +static const struct target_core_fabric_ops vhost_scsi_ops = { > .module = THIS_MODULE, > .name = "vhost", > .get_fabric_name = vhost_scsi_get_fabric_name, Ac...
2017 Jan 10
0
[PATCH] vhost: scsi: constify target_core_fabric_ops structures
...csi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c > index 253310c..620366d 100644 > --- a/drivers/vhost/scsi.c > +++ b/drivers/vhost/scsi.c > @@ -2087,7 +2087,7 @@ static void vhost_scsi_drop_tport(struct se_wwn *wwn) > NULL, > }; > > -static struct target_core_fabric_ops vhost_scsi_ops = { > +static const struct target_core_fabric_ops vhost_scsi_ops = { > .module = THIS_MODULE, > .name = "vhost", > .get_fabric_name = vhost_scsi_get_fabric_name, If it ca...
2017 Jan 10
0
[PATCH] vhost: scsi: constify target_core_fabric_ops structures
...deletion(-) > >> > >> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c > >> index 253310c..620366d 100644 > >> --- a/drivers/vhost/scsi.c > >> +++ b/drivers/vhost/scsi.c > >> @@ -2087,7 +2087,7 @@ static void vhost_scsi_drop_tport(struct se_wwn *wwn) > >> NULL, > >> }; > >> > >> -static struct target_core_fabric_ops vhost_scsi_ops = { > >> +static const struct target_core_fabric_ops vhost_scsi_ops = { > >> .module = THIS_MODULE, > >>...
2017 May 20
0
[PATCH 1/2] vhost/scsi: Improve a size determination in four functions
...es; @@ -1757,5 +1756,5 @@ static int vhost_scsi_make_nexus(struct vhost_scsi_tpg *tpg, return -EEXIST; } - tv_nexus = kzalloc(sizeof(struct vhost_scsi_nexus), GFP_KERNEL); + tv_nexus = kzalloc(sizeof(*tv_nexus), GFP_KERNEL); if (!tv_nexus) { @@ -1958,5 +1957,5 @@ vhost_scsi_make_tpg(struct se_wwn *wwn, if (kstrtou16(name + 5, 10, &tpgt) || tpgt >= VHOST_SCSI_MAX_TARGET) return ERR_PTR(-EINVAL); - tpg = kzalloc(sizeof(struct vhost_scsi_tpg), GFP_KERNEL); + tpg = kzalloc(sizeof(*tpg), GFP_KERNEL); if (!tpg) { @@ -2012,5 +2011,5 @@ vhost_scsi_make_tport(struct target_fabric_con...
2017 May 20
0
[PATCH 2/2] vhost/scsi: Delete error messages for failed memory allocations in five functions
...; out: @@ -1760,6 +1753,5 @@ static int vhost_scsi_make_nexus(struct vhost_scsi_tpg *tpg, if (!tv_nexus) { mutex_unlock(&tpg->tv_tpg_mutex); - pr_err("Unable to allocate struct vhost_scsi_nexus\n"); return -ENOMEM; } /* @@ -1961,7 +1953,6 @@ vhost_scsi_make_tpg(struct se_wwn *wwn, - if (!tpg) { - pr_err("Unable to allocate struct vhost_scsi_tpg"); + if (!tpg) return ERR_PTR(-ENOMEM); - } + mutex_init(&tpg->tv_tpg_mutex); INIT_LIST_HEAD(&tpg->tv_tpg_list); tpg->tport = tport; @@ -2015,7 +2006,6 @@ vhost_scsi_make_tport(struct target_...
2020 May 11
0
[PATCH] vhost: scsi: notify TCM about the maximum sg entries supported per command.
...am at oracle.com> --- drivers/vhost/scsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index c39952243fd3..8b104f76f324 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -2280,6 +2280,7 @@ static void vhost_scsi_drop_tport(struct se_wwn *wwn) static const struct target_core_fabric_ops vhost_scsi_ops = { .module = THIS_MODULE, .fabric_name = "vhost", + .max_data_sg_nents = VHOST_SCSI_PREALLOC_SGLS, .tpg_get_wwn = vhost_scsi_get_fabric_wwn, .tpg_get_tag = vhost_scsi_get_tpgt, .tpg_check_demo_mode = vh...