* FAILED: patch "[PATCH] NFC: st-nci: Fix host_list verification after SE activation" failed to apply to 4.3-stable tree
@ 2015-12-07 7:43 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-12-07 7:43 UTC (permalink / raw)
To: christophe.ricard, christophe-h.ricard, sameo; +Cc: stable
The patch below does not apply to the 4.3-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From 4e932acc6fd66c905b2d0ca452dcf69321b6c414 Mon Sep 17 00:00:00 2001
From: Christophe Ricard <christophe.ricard@gmail.com>
Date: Sun, 25 Oct 2015 22:54:41 +0100
Subject: [PATCH] NFC: st-nci: Fix host_list verification after SE activation
A secure element can be activated in different order.
The host_list is updated keeping a fixed order:
<terminal_host_id><uicc_id><ese_id>.
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
diff --git a/drivers/nfc/st-nci/se.c b/drivers/nfc/st-nci/se.c
index 3059baa0f12f..1cc24b6623e0 100644
--- a/drivers/nfc/st-nci/se.c
+++ b/drivers/nfc/st-nci/se.c
@@ -423,7 +423,7 @@ static int st_nci_control_se(struct nci_dev *ndev, u8 se_idx,
u8 state)
{
struct st_nci_info *info = nci_get_drvdata(ndev);
- int r;
+ int r, i;
struct sk_buff *sk_host_list;
u8 host_id;
@@ -470,7 +470,10 @@ static int st_nci_control_se(struct nci_dev *ndev, u8 se_idx,
if (r != NCI_HCI_ANY_OK)
return r;
- host_id = sk_host_list->data[sk_host_list->len - 1];
+ for (i = 0; i < sk_host_list->len &&
+ sk_host_list->data[i] != se_idx; i++)
+ ;
+ host_id = sk_host_list->data[i];
kfree_skb(sk_host_list);
if (state == ST_NCI_SE_MODE_ON && host_id == se_idx)
return se_idx;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-12-07 12:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-07 7:43 FAILED: patch "[PATCH] NFC: st-nci: Fix host_list verification after SE activation" failed to apply to 4.3-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).