Skip to contentSkip to conversation

linux-next: manual merge of the char-misc tree with the char-misc.current tree

PATCH Mark Brown 2 participants 2 messages Jul 20 – Jul 27

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

Today's linux-next merge of the char-misc tree got a conflict in:

drivers/misc/nsm.c

between commit:

ce1fed11d18e1 ("misc: nsm: only unlock nsm_dev on post-lock error paths")

from the char-misc.current tree and commit:

937cd823bb2c9 ("misc: nsm: do not unlock mutex before locking it")

from the char-misc 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.

drivers/misc/nsm.c +0 -0
diff --combined drivers/misc/nsm.c
index 3960506eb7ab3,bb254ee65b840..0000000000000
@@@ -243,7 -243,7 +243,7 @@@ static int nsm_sendrecv_msg_locked(stru
  		goto cleanup;
  	}
  
- 	msg->resp.len = len;
+ 	msg->resp.len = min_t(unsigned int, len, sizeof(msg->resp.data));
  
  	rc = 0;
  
@@@ -365,9 -365,8 +365,8 @@@ static long nsm_dev_ioctl(struct file *
  		return -EINVAL;
  
  	/* Copy user argument struct to kernel argument struct */
- 	r = -EFAULT;
  	if (copy_from_user(&raw, argp, _IOC_SIZE(cmd)))
- 		return r;
+ 		return -EFAULT;
  
  	mutex_lock(&nsm->lock);
  
@@@ -413,7 -412,6 +412,7 @@@ static int nsm_device_init_vq(struct vi
  }
  
  static const struct file_operations nsm_dev_fops = {
 +	.owner = THIS_MODULE,
  	.unlocked_ioctl = nsm_dev_ioctl,
  	.compat_ioctl = compat_ptr_ioctl,
  };
#1 lore raw
Quoted 48 lines · Mark Brown

Hi all,

Today's linux-next merge of the char-misc tree got a conflict in:

drivers/misc/nsm.c

between commit:

ce1fed11d18e1 ("misc: nsm: only unlock nsm_dev on post-lock error paths")

from the char-misc.current tree and commit:

937cd823bb2c9 ("misc: nsm: do not unlock mutex before locking it")

from the char-misc 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.

drivers/misc/nsm.c +2 -3
diff --combined drivers/misc/nsm.c
index 3960506eb7ab3,bb254ee65b840..0000000000000
@@@ -243,7 -243,7 +243,7 @@@ static int nsm_sendrecv_msg_locked(stru
  		goto cleanup;
  	}
 
- 	msg->resp.len = len;
+ 	msg->resp.len = min_t(unsigned int, len, sizeof(msg->resp.data));
 
  	rc = 0;
@@@ -365,9 -365,8 +365,8 @@@ static long nsm_dev_ioctl(struct file *
  		return -EINVAL;
 
  	/* Copy user argument struct to kernel argument struct */
- 	r = -EFAULT;
  	if (copy_from_user(&raw, argp, _IOC_SIZE(cmd)))
- 		return r;
+ 		return -EFAULT;
 
  	mutex_lock(&nsm->lock);

drivers/misc/nsm.c

Quoted 7 lines
drivers/misc/nsm.c +0 -0
@@@ -413,7 -412,6 +412,7 @@@ static int nsm_device_init_vq(struct vi
  }
 
  static const struct file_operations nsm_dev_fops = {
 +	.owner = THIS_MODULE,
  	.unlocked_ioctl = nsm_dev_ioctl,
  	.compat_ioctl = compat_ptr_ioctl,
  };

Thanks, looks good, this is now done in my tree too.

greg k-h