mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: David Howells <dhowells@redhat.com>
Cc: Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: linux-next: manual merge of the keys tree with the afs tree
Date: Wed, 24 Jul 2019 12:29:28 +1000	[thread overview]
Message-ID: <20190724122928.2a27c6aa@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3423 bytes --]

Hi all,

Today's linux-next merge of the keys tree got conflicts in:

  fs/afs/security.c
  include/linux/key.h

between commit:

  dd05d852085f ("afs: Provide an RCU-capable key lookup")

from the afs tree and commit:

  f802f2b3a991 ("keys: Replace uid/gid/perm permissions checking with an ACL")

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

-- 
Cheers,
Stephen Rothwell

diff --cc fs/afs/security.c
index ce9de1e6742b,8866703b2e6c..000000000000
--- a/fs/afs/security.c
+++ b/fs/afs/security.c
@@@ -27,37 -27,8 +27,37 @@@ struct key *afs_request_key(struct afs_
  	_enter("{%x}", key_serial(cell->anonymous_key));
  
  	_debug("key %s", cell->anonymous_key->description);
 -	key = request_key(&key_type_rxrpc, cell->anonymous_key->description,
 -			  NULL, NULL);
 +	key = request_key_net(&key_type_rxrpc, cell->anonymous_key->description,
- 			      cell->net->net, NULL);
++			      cell->net->net, NULL, NULL);
 +	if (IS_ERR(key)) {
 +		if (PTR_ERR(key) != -ENOKEY) {
 +			_leave(" = %ld", PTR_ERR(key));
 +			return key;
 +		}
 +
 +		/* act as anonymous user */
 +		_leave(" = {%x} [anon]", key_serial(cell->anonymous_key));
 +		return key_get(cell->anonymous_key);
 +	} else {
 +		/* act as authorised user */
 +		_leave(" = {%x} [auth]", key_serial(key));
 +		return key;
 +	}
 +}
 +
 +/*
 + * Get a key when pathwalk is in rcuwalk mode.
 + */
 +struct key *afs_request_key_rcu(struct afs_cell *cell)
 +{
 +	struct key *key;
 +
 +	_enter("{%x}", key_serial(cell->anonymous_key));
 +
 +	_debug("key %s", cell->anonymous_key->description);
 +	key = request_key_net_rcu(&key_type_rxrpc,
 +				  cell->anonymous_key->description,
 +				  cell->net->net);
  	if (IS_ERR(key)) {
  		if (PTR_ERR(key) != -ENOKEY) {
  			_leave(" = %ld", PTR_ERR(key));
diff --cc include/linux/key.h
index bec10fbb2462,6fef6684501f..000000000000
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@@ -339,20 -340,8 +340,20 @@@ static inline struct key *request_key(s
   * Furthermore, it then works as wait_for_key_construction() to wait for the
   * completion of keys undergoing construction with a non-interruptible wait.
   */
- #define request_key_net(type, description, net, callout_info) \
- 	request_key_tag(type, description, net->key_domain, callout_info);
+ #define request_key_net(type, description, net, callout_info, acl)	\
+ 	request_key_tag(type, description, net->key_domain, callout_info, acl);
 +
 +/**
 + * request_key_net_rcu - Request a key for a net namespace under RCU conditions
 + * @type: Type of key.
 + * @description: The searchable description of the key.
 + * @net: The network namespace that is the key's domain of operation.
 + *
 + * As for request_key_rcu() except that only keys that operate the specified
 + * network namespace are used.
 + */
 +#define request_key_net_rcu(type, description, net) \
 +	request_key_rcu(type, description, net->key_domain);
  #endif /* CONFIG_NET */
  
  extern int wait_for_key_construction(struct key *key, bool intr);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

                 reply	other threads:[~2019-07-24  2:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190724122928.2a27c6aa@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®