linux-next: manual merge of the scsi-mkp tree with the vfs-brauner tree
From: Mark Brown
Date: Tue Nov 17 2026 - 18:25:50 EST
Hi all,
Today's linux-next merge of the scsi-mkp tree got a conflict in:
drivers/scsi/scsi_devinfo.c
between commit:
6d14b93c111a1 ("scsi: core: let procfs copy in writes")
from the vfs-brauner tree and commit:
787fd1429b360 ("scsi: scsi_devinfo: Return an error when the proc write fails")
from the scsi-mkp tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc drivers/scsi/scsi_devinfo.c
index d9093851b23e0,b1f3bcd739b46..0000000000000
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@@ -678,14 -683,37 +678,19 @@@ static const struct seq_operations scsi
* To use, echo "vendor:model:flag" > /proc/scsi/device_info
*/
static ssize_t proc_scsi_devinfo_write(struct file *file,
- const char __user *buf,
+ char *buffer,
size_t length, loff_t *ppos)
{
- char *buffer;
- ssize_t err = length;
+ int ret;
+
- if (!buf || length>PAGE_SIZE)
+ if (length == PAGE_SIZE && buffer[PAGE_SIZE-1])
return -EINVAL;
- buffer = kmalloc(PAGE_SIZE, GFP_KERNEL);
- if (!buffer)
- return -ENOMEM;
- if (copy_from_user(buffer, buf, length)) {
- err =-EFAULT;
- goto out;
- }
-
- if (length < PAGE_SIZE)
- buffer[length] = '\0';
- else if (buffer[PAGE_SIZE-1]) {
- err = -EINVAL;
- goto out;
- }
- scsi_dev_info_list_add_str(buffer);
+ ret = scsi_dev_info_list_add_str(buffer);
+ if (ret)
+ return ret;
+
-out:
- kfree(buffer);
- return err;
+ return length;
}
static const struct proc_ops scsi_devinfo_proc_ops = {
Attachment:
signature.asc
Description: PGP signature