Skip to content

Commit bdacc43

Browse files
author
CKI KWF Bot
committed
Merge: iSCSI driver updates
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/789 JIRA: https://issues.redhat.com/browse/RHEL-90551 Goal Update iSCSI drivers to the latest upstream, where compatible As a developer, I want to keep these driver in sync with upstream development as much as possible, to provide the latest bug fixes and enhancements to our customers. Acceptance criteria A list of verification conditions, successful functional tests, or expected outcomes in order to declare this story/task successfully completed. iSCSI regression testing passes Signed-off-by: Chris Leech <cleech@redhat.com> Approved-by: John Meneghini <jmeneghi@redhat.com> Approved-by: bgurney <bgurney@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 1e9ccb2 + ae0b911 commit bdacc43

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

drivers/scsi/qedi/qedi_dbg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct Scsi_Host;
9191

9292
struct sysfs_bin_attrs {
9393
char *name;
94-
struct bin_attribute *attr;
94+
const struct bin_attribute *attr;
9595
};
9696

9797
int qedi_create_sysfs_attr(struct Scsi_Host *shost,

drivers/scsi/qedi/qedi_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ static int qedi_alloc_and_init_sb(struct qedi_ctx *qedi,
369369
ret = qedi_ops->common->sb_init(qedi->cdev, sb_info, sb_virt, sb_phys,
370370
sb_id, QED_SB_TYPE_STORAGE);
371371
if (ret) {
372+
dma_free_coherent(&qedi->pdev->dev, sizeof(*sb_virt), sb_virt, sb_phys);
372373
QEDI_ERR(&qedi->dbg_ctx,
373374
"Status block initialization failed for id = %d.\n",
374375
sb_id);

drivers/scsi/qla4xxx/ql4_attr.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
static ssize_t
1212
qla4_8xxx_sysfs_read_fw_dump(struct file *filep, struct kobject *kobj,
13-
struct bin_attribute *ba, char *buf, loff_t off,
13+
const struct bin_attribute *ba, char *buf, loff_t off,
1414
size_t count)
1515
{
1616
struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
@@ -28,7 +28,7 @@ qla4_8xxx_sysfs_read_fw_dump(struct file *filep, struct kobject *kobj,
2828

2929
static ssize_t
3030
qla4_8xxx_sysfs_write_fw_dump(struct file *filep, struct kobject *kobj,
31-
struct bin_attribute *ba, char *buf, loff_t off,
31+
const struct bin_attribute *ba, char *buf, loff_t off,
3232
size_t count)
3333
{
3434
struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj,
@@ -104,19 +104,19 @@ qla4_8xxx_sysfs_write_fw_dump(struct file *filep, struct kobject *kobj,
104104
return count;
105105
}
106106

107-
static struct bin_attribute sysfs_fw_dump_attr = {
107+
static const struct bin_attribute sysfs_fw_dump_attr = {
108108
.attr = {
109109
.name = "fw_dump",
110110
.mode = S_IRUSR | S_IWUSR,
111111
},
112112
.size = 0,
113-
.read = qla4_8xxx_sysfs_read_fw_dump,
114-
.write = qla4_8xxx_sysfs_write_fw_dump,
113+
.read_new = qla4_8xxx_sysfs_read_fw_dump,
114+
.write_new = qla4_8xxx_sysfs_write_fw_dump,
115115
};
116116

117117
static struct sysfs_entry {
118118
char *name;
119-
struct bin_attribute *attr;
119+
const struct bin_attribute *attr;
120120
} bin_file_entries[] = {
121121
{ "fw_dump", &sysfs_fw_dump_attr },
122122
{ NULL },

drivers/scsi/scsi_transport_iscsi.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3182,11 +3182,14 @@ iscsi_set_host_param(struct iscsi_transport *transport,
31823182
}
31833183

31843184
/* see similar check in iscsi_if_set_param() */
3185-
if (strlen(data) > ev->u.set_host_param.len)
3186-
return -EINVAL;
3185+
if (strlen(data) > ev->u.set_host_param.len) {
3186+
err = -EINVAL;
3187+
goto out;
3188+
}
31873189

31883190
err = transport->set_host_param(shost, ev->u.set_host_param.param,
31893191
data, ev->u.set_host_param.len);
3192+
out:
31903193
scsi_host_put(shost);
31913194
return err;
31923195
}

0 commit comments

Comments
 (0)