From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4C15A20968915 for ; Wed, 18 Jul 2018 04:20:21 -0700 (PDT) From: David Howells In-Reply-To: <153186087803.27463.7423668214880824595.stgit@djiang5-desk3.ch.intel.com> References: <153186087803.27463.7423668214880824595.stgit@djiang5-desk3.ch.intel.com> <153186061802.27463.14539931103401173743.stgit@djiang5-desk3.ch.intel.com> Subject: Re: [PATCH v5 06/12] nfit/libnvdimm: add set passphrase support for Intel nvdimms MIME-Version: 1.0 Content-ID: <10005.1531912819.1@warthog.procyon.org.uk> Date: Wed, 18 Jul 2018 12:20:19 +0100 Message-ID: <10006.1531912819@warthog.procyon.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: Dave Jiang Cc: alison.schofield@intel.com, keescook@chromium.org, linux-nvdimm@lists.01.org, dhowells@redhat.com, keyrings@vger.kernel.org List-ID: Dave Jiang wrote: > + /* look for a key from keyring if exists and remove */ > + old_key = nvdimm_search_key(dev); > + if (old_key) { > + dev_dbg(dev, "%s: killing old key: %#x\n", > + __func__, old_key->serial); > + key_invalidate(old_key); > + key_put_sync(old_key); > + } Why don't you unlink the key from the .nvdimm keyring here? David _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm