Skip to contentSkip to conversation

linux-next: manual merge of the fscrypt tree with Linus' tree

DISCUSSION Stephen Rothwell 1 participant 1 message Mar 19, 2017 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi Ted,

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

fs/crypto/keyinfo.c

between commit:

0837e49ab3fa ("KEYS: Differentiate uses of rcu_dereference_key() and user_key_payload()")

from Linus' tree and commit:

1b53cf9815bb ("fscrypt: remove broken support for detecting keyring key revocation")

from the fscrypt 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.

Signature · 20 lines
Cheers,
Stephen Rothwell

diff --cc fs/crypto/keyinfo.c
index d5d896fa5a71,cb3e82abf034..000000000000
--- a/fs/crypto/keyinfo.c
+++ b/fs/crypto/keyinfo.c
@@@ -102,11 -103,9 +103,9 @@@ static int validate_user_key(struct fsc
  		res = -ENOKEY;
  		goto out;
  	}
- 	down_read(&keyring_key->sem);
 -	ukp = user_key_payload(keyring_key);
 +	ukp = user_key_payload_locked(keyring_key);
  	if (ukp->datalen != sizeof(struct fscrypt_key)) {
  		res = -EINVAL;
- 		up_read(&keyring_key->sem);
  		goto out;
  	}
  	master_key = (struct fscrypt_key *)ukp->data;