* [PATCH net v9 1/4] nfc: keep devices shut down until registration completes
2026-11-30 9:14 [PATCH net v9 0/4] nfc: nci: uart: split lifecycle teardown fixes Shubham Antil
@ 2026-11-30 9:14 ` Shubham Antil
2026-11-30 9:14 ` [PATCH net v9 2/4] nfc: nci: coordinate transport shutdown in the core Shubham Antil
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Shubham Antil @ 2026-11-30 9:14 UTC (permalink / raw)
To: netdev; +Cc: Simon Horman, gio, David Heidelberg, oe-linux-nfc
nfc_allocate_device() leaves shutting_down clear until unregister begins.
A driver which publishes transport callbacks during registration can
therefore receive an early request before registration has completed.
Initialize the device in the shutting-down state, use one-copy stores
when registration opens and closes admission, and only admit requests
after the device has been fully registered.
Discovered during an AI-assisted source audit using OpenAI Codex,
gpt-5.6-sol. The early-publication condition was reproduced by racing
NFC_CMD_DEV_UP with NCIUARTSETDRIVER on a pty-backed transport. An earlier
high-concurrency pre-fix run also hit a general-protection fault in
nfcmrvl_nci_uart_tx_start() with nu->drv_data still NULL. Patch development
and test planning used the same assistant.
Confirmed with repeated pty-backed NCI UART registration, open, reset, and
hangup cycles. No physical NFC controller was available.
Fixes: 9674da8759df ("NFC: Add firmware upload netlink command")
Assisted-by: LLM (OpenAI Codex, gpt-5.6-sol)
Signed-off-by: Shubham Antil <shubham@octane.security>
---
net/nfc/core.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/nfc/core.c b/net/nfc/core.c
index f52166929..685d1727d 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -1065,6 +1065,9 @@ struct nfc_dev *nfc_allocate_device(const struct nfc_ops *ops,
if (!dev)
return NULL;
+ /* Reject requests until registration has finished. */
+ dev->shutting_down = true;
+
rc = ida_alloc(&nfc_index_ida, GFP_KERNEL);
if (rc < 0)
goto err_free_dev;
@@ -1133,7 +1136,7 @@ int nfc_register_device(struct nfc_dev *dev)
dev->rfkill = NULL;
}
}
- dev->shutting_down = false;
+ WRITE_ONCE(dev->shutting_down, false);
device_unlock(&dev->dev);
rc = nfc_genl_device_added(dev);
@@ -1167,7 +1170,7 @@ void nfc_unregister_rfkill(struct nfc_dev *dev)
rfk = dev->rfkill;
dev->rfkill = NULL;
}
- dev->shutting_down = true;
+ WRITE_ONCE(dev->shutting_down, true);
device_unlock(&dev->dev);
if (rfk) {
base-commit: 30c71476d842b094651bd7712f6c8ee8716147d0
prerequisite-patch-id: da5eea669279340f2925f9be0d203fd3bc407cc5
prerequisite-patch-id: 109c531926f84389d8f1d2030160f6113a749142
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net v9 2/4] nfc: nci: coordinate transport shutdown in the core
2026-11-30 9:14 [PATCH net v9 0/4] nfc: nci: uart: split lifecycle teardown fixes Shubham Antil
2026-11-30 9:14 ` [PATCH net v9 1/4] nfc: keep devices shut down until registration completes Shubham Antil
@ 2026-11-30 9:14 ` Shubham Antil
2026-11-30 9:14 ` [PATCH net v9 3/4] nfc: nci: uart: quiesce callbacks during teardown Shubham Antil
2026-11-30 9:14 ` [PATCH net v9 4/4] nfc: nfcmrvl: adopt the NCI UART lifecycle helpers Shubham Antil
3 siblings, 0 replies; 5+ messages in thread
From: Shubham Antil @ 2026-11-30 9:14 UTC (permalink / raw)
To: netdev; +Cc: Simon Horman, gio, David Heidelberg, oe-linux-nfc
nci_close_device() can cancel command work while an NCI response already
owned by the receive worker makes another command runnable. The close
path also resets the controller without first asking the transport
whether queued bytes preserve frame boundaries.
Close command admission, drain pre-close receive work, and cancel the
command dependency chain before transport shutdown. Add ready and flush
lifecycle callbacks so drivers can publish transport state before
registration and preserve framing before the close-time reset. Reopen
admission only for the reset and driver close callback, then drain any
response and cancel every command left by an interrupted request.
Publish NCI_UP before clearing NCI_INIT after a successful open. Receive
callbacks can therefore never observe both states clear during the
transition.
Discovered during an AI-assisted source audit using OpenAI Codex,
gpt-5.6-sol. The implicated close and reset transitions were exercised by
repeated open, down, reopen, and unregister cycles and by an incomplete-RX
close. No separate pre-fix failure was isolated for this command dependency
race. Patch development and test planning used the same assistant.
Confirmed with repeated pty-backed NCI UART open, command, reset, and
hangup cycles. No physical NFC controller was available.
Fixes: 9961127d4bce ("NFC: nci: add generic uart support")
Assisted-by: LLM (OpenAI Codex, gpt-5.6-sol)
Signed-off-by: Shubham Antil <shubham@octane.security>
---
include/net/nfc/nci_core.h | 10 +++++
net/nfc/nci/core.c | 83 +++++++++++++++++++++++++++++---------
net/nfc/nci/rsp.c | 3 ++
3 files changed, 76 insertions(+), 20 deletions(-)
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index 664d5058e..43b38aeab 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -28,6 +28,7 @@
enum nci_flag {
NCI_INIT,
NCI_UP,
+ NCI_CLOSING,
NCI_DATA_EXCHANGE,
NCI_DATA_EXCHANGE_TO,
NCI_UNREG,
@@ -67,6 +68,15 @@ struct nci_ops {
int (*open)(struct nci_dev *ndev);
int (*close)(struct nci_dev *ndev);
int (*send)(struct nci_dev *ndev, struct sk_buff *skb);
+ /* Publish transport callbacks after core setup, before registration. */
+ void (*ready)(struct nci_dev *ndev);
+ /*
+ * Flush transport-owned frames before the close-time reset. This may
+ * sleep and is called with req_lock held after command producers have
+ * stopped. Return an error if framing cannot be preserved; the core
+ * will then skip the reset exchange.
+ */
+ int (*flush)(struct nci_dev *ndev);
int (*setup)(struct nci_dev *ndev);
int (*post_setup)(struct nci_dev *ndev);
int (*fw_download)(struct nci_dev *ndev, const char *firmware_name);
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 73e3a9647..13fb8c3bc 100644
--- a/net/nfc/nci/core.c
+++ b/net/nfc/nci/core.c
@@ -530,14 +530,14 @@ static int nci_open_device(struct nci_dev *ndev)
msecs_to_jiffies(NCI_INIT_TIMEOUT));
}
- clear_bit(NCI_INIT, &ndev->flags);
-
if (!rc) {
set_bit(NCI_UP, &ndev->flags);
+ clear_bit(NCI_INIT, &ndev->flags);
nci_clear_target_list(ndev);
atomic_set(&ndev->state, NCI_IDLE);
} else {
/* Init failed, cleanup */
+ clear_bit(NCI_INIT, &ndev->flags);
skb_queue_purge(&ndev->cmd_q);
skb_queue_purge(&ndev->rx_q);
skb_queue_purge(&ndev->tx_q);
@@ -553,6 +553,8 @@ static int nci_open_device(struct nci_dev *ndev)
static int nci_close_device(struct nci_dev *ndev)
{
+ int flush_rc = 0;
+
nci_req_cancel(ndev, ENODEV);
/* This mutex needs to be held as a barrier for
@@ -574,33 +576,76 @@ static int nci_close_device(struct nci_dev *ndev)
mutex_unlock(&ndev->req_lock);
return 0;
}
+ set_bit(NCI_CLOSING, &ndev->flags);
/* Drop RX and TX queues */
skb_queue_purge(&ndev->rx_q);
skb_queue_purge(&ndev->tx_q);
- /* Flush TX wq, RX wq flush can't be under the lock */
+ /*
+ * An RX worker may already own a response which can make another
+ * command runnable. No new frame is admitted after NCI_UP was
+ * cleared. Drop req_lock so an old RX worker can finish a request,
+ * then cancel every command it made runnable.
+ */
+ mutex_unlock(&ndev->req_lock);
+ flush_workqueue(ndev->rx_wq);
+ mutex_lock(&ndev->req_lock);
+
+ /* Flush TX wq after the last pre-close RX work has completed. */
flush_workqueue(ndev->tx_wq);
- /* Reset device */
+ /* Stop command producers before flushing the transport backlog. */
+ timer_delete_sync(&ndev->cmd_timer);
skb_queue_purge(&ndev->cmd_q);
- atomic_set(&ndev->cmd_cnt, 1);
+ flush_workqueue(ndev->cmd_wq);
+ timer_delete_sync(&ndev->cmd_timer);
+ flush_workqueue(ndev->cmd_wq);
+ if (ndev->ops->flush)
+ flush_rc = ndev->ops->flush(ndev);
+
+ if (!flush_rc) {
+ /* Reset device only when the transport preserved framing. */
+ atomic_set(&ndev->cmd_cnt, 1);
+
+ set_bit(NCI_INIT, &ndev->flags);
+ clear_bit(NCI_CLOSING, &ndev->flags);
+ __nci_request(ndev, nci_reset_req, (void *)0,
+ msecs_to_jiffies(NCI_RESET_TIMEOUT));
+ set_bit(NCI_CLOSING, &ndev->flags);
+ mutex_unlock(&ndev->req_lock);
+ flush_workqueue(ndev->rx_wq);
+ mutex_lock(&ndev->req_lock);
- set_bit(NCI_INIT, &ndev->flags);
- __nci_request(ndev, nci_reset_req, (void *)0,
- msecs_to_jiffies(NCI_RESET_TIMEOUT));
+ /*
+ * A signal can end the request before cmd_work dequeues its skb.
+ * Remove that command before admitting a driver close callback,
+ * some of which issue their own synchronous NCI command.
+ */
+ timer_delete_sync(&ndev->cmd_timer);
+ atomic_set(&ndev->cmd_cnt, 0);
+ cancel_work_sync(&ndev->cmd_work);
+ timer_delete_sync(&ndev->cmd_timer);
+ skb_queue_purge(&ndev->cmd_q);
+ atomic_set(&ndev->cmd_cnt, 1);
+ clear_bit(NCI_CLOSING, &ndev->flags);
+ }
- /* After this point our queues are empty
- * rx work may be running but will see that NCI_UP was cleared
- */
+ /* Let driver close callbacks complete their final command exchange. */
ndev->ops->close(ndev);
+ set_bit(NCI_CLOSING, &ndev->flags);
clear_bit(NCI_INIT, &ndev->flags);
-
- /* Flush cmd and tx wq */
- flush_workqueue(ndev->cmd_wq);
+ mutex_unlock(&ndev->req_lock);
+ flush_workqueue(ndev->rx_wq);
+ mutex_lock(&ndev->req_lock);
timer_delete_sync(&ndev->cmd_timer);
+ atomic_set(&ndev->cmd_cnt, 0);
+ cancel_work_sync(&ndev->cmd_work);
+ timer_delete_sync(&ndev->cmd_timer);
+ skb_queue_purge(&ndev->cmd_q);
+
timer_delete_sync(&ndev->data_timer);
if (test_bit(NCI_DATA_EXCHANGE, &ndev->flags))
@@ -612,9 +657,6 @@ static int nci_close_device(struct nci_dev *ndev)
mutex_unlock(&ndev->req_lock);
- /* rx_work may take req_lock via nci_deactivate_target */
- flush_workqueue(ndev->rx_wq);
-
return 0;
}
@@ -1254,8 +1296,6 @@ int nci_register_device(struct nci_dev *ndev)
struct device *dev = &ndev->nfc_dev->dev;
char name[32];
- ndev->flags = 0;
-
INIT_WORK(&ndev->cmd_work, nci_cmd_work);
snprintf(name, sizeof(name), "%s_nci_cmd_wq", dev_name(dev));
ndev->cmd_wq = create_singlethread_workqueue(name);
@@ -1289,6 +1329,8 @@ int nci_register_device(struct nci_dev *ndev)
mutex_init(&ndev->req_lock);
INIT_LIST_HEAD(&ndev->conn_info_list);
+ if (ndev->ops->ready)
+ ndev->ops->ready(ndev);
rc = nfc_register_device(ndev->nfc_dev);
if (rc)
@@ -1320,7 +1362,6 @@ void nci_unregister_device(struct nci_dev *ndev)
struct nci_conn_info *conn_info, *n;
nfc_unregister_rfkill(ndev->nfc_dev);
-
/* This set_bit is not protected with specialized barrier,
* However, it is fine because the mutex_lock(&ndev->req_lock);
* in nci_close_device() will help to emit one.
@@ -1614,6 +1655,8 @@ static void nci_cmd_work(struct work_struct *work)
struct sk_buff *skb;
pr_debug("cmd_cnt %d\n", atomic_read(&ndev->cmd_cnt));
+ if (test_bit(NCI_CLOSING, &ndev->flags))
+ return;
/* Send queued command */
if (atomic_read(&ndev->cmd_cnt)) {
diff --git a/net/nfc/nci/rsp.c b/net/nfc/nci/rsp.c
index b0ab4f5ac..da71bf4ec 100644
--- a/net/nfc/nci/rsp.c
+++ b/net/nfc/nci/rsp.c
@@ -458,6 +458,9 @@ void nci_rsp_packet(struct nci_dev *ndev, struct sk_buff *skb)
kfree_skb(skb);
/* trigger the next cmd */
+ if (test_bit(NCI_CLOSING, &ndev->flags))
+ return;
+
atomic_set(&ndev->cmd_cnt, 1);
if (!skb_queue_empty(&ndev->cmd_q))
queue_work(ndev->cmd_wq, &ndev->cmd_work);
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net v9 3/4] nfc: nci: uart: quiesce callbacks during teardown
2026-11-30 9:14 [PATCH net v9 0/4] nfc: nci: uart: split lifecycle teardown fixes Shubham Antil
2026-11-30 9:14 ` [PATCH net v9 1/4] nfc: keep devices shut down until registration completes Shubham Antil
2026-11-30 9:14 ` [PATCH net v9 2/4] nfc: nci: coordinate transport shutdown in the core Shubham Antil
@ 2026-11-30 9:14 ` Shubham Antil
2026-11-30 9:14 ` [PATCH net v9 4/4] nfc: nfcmrvl: adopt the NCI UART lifecycle helpers Shubham Antil
3 siblings, 0 replies; 5+ messages in thread
From: Shubham Antil @ 2026-11-30 9:14 UTC (permalink / raw)
To: netdev; +Cc: Simon Horman, gio, David Heidelberg, oe-linux-nfc
The UART writer can lose a wakeup while handing ownership back to a
producer, and teardown has no state preventing new work after
cancellation begins. A partial skb can also be owned only by the worker
while another context observes the queue as empty.
Protect transmit state, the queue, and tx_skb with one lock, preserve
wakeups across partial writes, and balance each tx_start() with exactly
one tx_done(). Queue admission and wakeup now share one critical section
and use the unlocked skb queue helpers, avoiding repeated per-frame lock
round trips.
Add bounded flush, abort, receive-stop, and transmit-stop helpers so a
driver can preserve complete frames before reset and block callbacks
before releasing transport-private state. Wait until every byte of the
preceding frame has been accepted by the ordered tty queue before adding
the reset frame. Report a partial receive frame as a flush error so a
close-time exchange cannot reuse its suffix. Reject new frames after
quiescing starts and discard parser state outside active NCI states.
Discovered during an AI-assisted source audit using OpenAI Codex,
gpt-5.6-sol. The teardown issue was reproduced on a clean stock v7.3-rc1
kernel with 318 KASAN slab-use-after-free reports in nci_uart_write_work()
after nci_uart_tty_close() freed tx_skb. Patch development and test
planning used the same assistant.
Confirmed with repeated pty-backed NCI UART open, transmit, reset, and
hangup cycles. No physical NFC controller was available.
Fixes: 9961127d4bce ("NFC: nci: add generic uart support")
Assisted-by: LLM (OpenAI Codex, gpt-5.6-sol)
Signed-off-by: Shubham Antil <shubham@octane.security>
---
include/net/nfc/nci_core.h | 11 ++
net/nfc/nci/uart.c | 366 ++++++++++++++++++++++++++++++++++---
2 files changed, 350 insertions(+), 27 deletions(-)
diff --git a/include/net/nfc/nci_core.h b/include/net/nfc/nci_core.h
index 43b38aeab..6d6693042 100644
--- a/include/net/nfc/nci_core.h
+++ b/include/net/nfc/nci_core.h
@@ -20,6 +20,7 @@
#include <linux/interrupt.h>
#include <linux/skbuff.h>
#include <linux/tty.h>
+#include <linux/wait.h>
#include <net/nfc/nfc.h>
#include <net/nfc/nci.h>
@@ -446,6 +447,7 @@ struct nci_uart;
struct nci_uart_ops {
int (*open)(struct nci_uart *nci_uart);
+ /* Quiesce callbacks before releasing transport-private state. */
void (*close)(struct nci_uart *nci_uart);
int (*recv)(struct nci_uart *nci_uart, struct sk_buff *skb);
int (*send)(struct nci_uart *nci_uart, struct sk_buff *skb);
@@ -462,8 +464,11 @@ struct nci_uart {
/* Dynamic data */
struct nci_dev *ndev;
spinlock_t rx_lock;
+ spinlock_t tx_lock; /* protects tx state, skb, and queue */
struct work_struct write_work;
+ wait_queue_head_t tx_wait;
struct tty_struct *tty;
+ unsigned long flags;
unsigned long tx_state;
struct sk_buff_head tx_q;
struct sk_buff *tx_skb;
@@ -475,5 +480,11 @@ struct nci_uart {
int nci_uart_register(struct nci_uart *nu);
void nci_uart_unregister(struct nci_uart *nu);
void nci_uart_set_config(struct nci_uart *nu, int baudrate, int flow_ctrl);
+void nci_uart_set_ready(struct nci_uart *nu);
+int nci_uart_rx_flush(struct nci_uart *nu);
+void nci_uart_rx_stop(struct nci_uart *nu);
+void nci_uart_tx_stop(struct nci_uart *nu);
+void nci_uart_tx_abort(struct nci_uart *nu);
+int nci_uart_tx_flush(struct nci_uart *nu);
#endif /* __NCI_CORE_H */
diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c
index bc2016e62..2d9ee9484 100644
--- a/net/nfc/nci/uart.c
+++ b/net/nfc/nci/uart.c
@@ -34,76 +34,348 @@
/* TX states */
#define NCI_UART_SENDING 1
#define NCI_UART_TX_WAKEUP 2
+#define NCI_UART_CLOSING 3
+#define NCI_UART_TX_STARTED 4
+
+/* UART flags */
+#define NCI_UART_READY 0
static struct nci_uart *nci_uart_drivers[NCI_UART_DRIVER_MAX];
static DEFINE_MUTEX(nci_uart_drivers_lock);
static DEFINE_MUTEX(nci_uart_selection_lock);
-static inline struct sk_buff *nci_uart_dequeue(struct nci_uart *nu)
+static struct sk_buff *nci_uart_dequeue_locked(struct nci_uart *nu)
{
struct sk_buff *skb = nu->tx_skb;
if (!skb)
- skb = skb_dequeue(&nu->tx_q);
+ skb = __skb_dequeue(&nu->tx_q);
else
nu->tx_skb = NULL;
return skb;
}
-static inline int nci_uart_queue_empty(struct nci_uart *nu)
+static bool nci_uart_queue_empty_locked(struct nci_uart *nu)
{
if (nu->tx_skb)
- return 0;
+ return false;
return skb_queue_empty(&nu->tx_q);
}
-static int nci_uart_tx_wakeup(struct nci_uart *nu)
+static bool nci_uart_tx_idle(struct nci_uart *nu)
+{
+ unsigned long flags;
+ bool idle;
+
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ idle = nci_uart_queue_empty_locked(nu) &&
+ !test_bit(NCI_UART_SENDING, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+
+ return idle;
+}
+
+static void nci_uart_tx_wakeup_locked(struct nci_uart *nu)
{
- if (test_and_set_bit(NCI_UART_SENDING, &nu->tx_state)) {
+ if (test_bit(NCI_UART_CLOSING, &nu->tx_state) ||
+ !test_bit_acquire(NCI_UART_READY, &nu->flags))
+ return;
+
+ if (test_bit(NCI_UART_SENDING, &nu->tx_state)) {
set_bit(NCI_UART_TX_WAKEUP, &nu->tx_state);
- return 0;
+ return;
}
+ if (nci_uart_queue_empty_locked(nu))
+ return;
+ set_bit(NCI_UART_SENDING, &nu->tx_state);
schedule_work(&nu->write_work);
+}
+
+static int nci_uart_tx_wakeup(struct nci_uart *nu)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ nci_uart_tx_wakeup_locked(nu);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+
+ return 0;
+}
+
+/**
+ * nci_uart_tx_stop - stop UART transmit callbacks
+ * @nu: NCI UART transport
+ *
+ * Prevent new transmit work, wait for an active worker, and balance an
+ * outstanding tx_start() callback. This function may sleep and the caller
+ * must keep @nu->tty and transport-private state valid until it returns.
+ * Queued skbs are left for the caller to release and the closing state stays
+ * set until the transport instance is either freed or explicitly unwound.
+ */
+void nci_uart_tx_stop(struct nci_uart *nu)
+{
+ unsigned long flags;
+ bool tx_started;
+
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ set_bit(NCI_UART_CLOSING, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+
+ cancel_work_sync(&nu->write_work);
+ clear_bit(TTY_DO_WRITE_WAKEUP, &nu->tty->flags);
+
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ tx_started = test_and_clear_bit(NCI_UART_TX_STARTED,
+ &nu->tx_state);
+ clear_bit(NCI_UART_SENDING, &nu->tx_state);
+ clear_bit(NCI_UART_TX_WAKEUP, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+
+ if (tx_started && nu->ops.tx_done)
+ nu->ops.tx_done(nu);
+ wake_up_all(&nu->tx_wait);
+}
+EXPORT_SYMBOL_GPL(nci_uart_tx_stop);
+
+/**
+ * nci_uart_tx_flush - finish queued UART frames before a controller reset
+ * @nu: NCI UART transport
+ *
+ * Wait until the transport has handed every byte of each complete frame to
+ * the tty driver. Tty writes preserve byte ordering, so the reset frame can
+ * then be queued behind those bytes without waiting for the hardware FIFO to
+ * empty. The caller must first prevent producers from submitting new frames
+ * and must keep the tty valid.
+ *
+ * Return: 0 when every frame was accepted, or a negative error on timeout or
+ * after transport shutdown.
+ */
+int nci_uart_tx_flush(struct nci_uart *nu)
+{
+ long timeout = msecs_to_jiffies(NCI_RESET_TIMEOUT);
+ long retry = max_t(long, 1, msecs_to_jiffies(20));
+ unsigned long deadline = jiffies + timeout;
+ unsigned long flags;
+ bool closing;
+
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ closing = test_bit(NCI_UART_CLOSING, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ if (closing)
+ return -ESHUTDOWN;
+
+ for (;;) {
+ long remaining;
+
+ nci_uart_tx_wakeup(nu);
+ if (nci_uart_tx_idle(nu))
+ break;
+ remaining = deadline - jiffies;
+ if (remaining <= 0)
+ return -ETIMEDOUT;
+
+ /*
+ * Line-discipline close holds ldisc_sem write-locked, so the tty
+ * cannot deliver write_wakeup. Retry a partial write here rather
+ * than depending on that callback to reschedule write_work.
+ */
+ wait_event_timeout(nu->tx_wait, nci_uart_tx_idle(nu),
+ min(retry, remaining));
+ }
return 0;
}
+EXPORT_SYMBOL_GPL(nci_uart_tx_flush);
+
+/**
+ * nci_uart_tx_abort - discard a transport which cannot preserve framing
+ * @nu: NCI UART transport
+ *
+ * Stop the writer, flush the tty driver's output buffer, and release the
+ * unsent suffix and queued frames. Transmit remains stopped so a later NCI
+ * open cannot append bytes to the incomplete frame. Recovery requires the
+ * line discipline to be closed and selected again.
+ */
+void nci_uart_tx_abort(struct nci_uart *nu)
+{
+ struct sk_buff *skb;
+ unsigned long flags;
+
+ nci_uart_tx_stop(nu);
+ tty_driver_flush_buffer(nu->tty);
+
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ skb = nu->tx_skb;
+ nu->tx_skb = NULL;
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ kfree_skb(skb);
+ skb_queue_purge(&nu->tx_q);
+ wake_up_all(&nu->tx_wait);
+}
+EXPORT_SYMBOL_GPL(nci_uart_tx_abort);
static void nci_uart_write_work(struct work_struct *work)
{
struct nci_uart *nu = container_of(work, struct nci_uart, write_work);
struct tty_struct *tty = nu->tty;
struct sk_buff *skb;
+ unsigned long flags;
+ bool tx_started;
restart:
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ if (test_bit(NCI_UART_CLOSING, &nu->tx_state)) {
+ tx_started = test_and_clear_bit(NCI_UART_TX_STARTED,
+ &nu->tx_state);
+ clear_bit(NCI_UART_SENDING, &nu->tx_state);
+ clear_bit(NCI_UART_TX_WAKEUP, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ if (tx_started && nu->ops.tx_done)
+ nu->ops.tx_done(nu);
+ wake_up_all(&nu->tx_wait);
+ return;
+ }
clear_bit(NCI_UART_TX_WAKEUP, &nu->tx_state);
+ tx_started = !test_and_set_bit(NCI_UART_TX_STARTED,
+ &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
- if (nu->ops.tx_start)
+ if (tx_started && nu->ops.tx_start)
nu->ops.tx_start(nu);
- while ((skb = nci_uart_dequeue(nu))) {
+ for (;;) {
int len;
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ skb = nci_uart_dequeue_locked(nu);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ if (!skb)
+ break;
+
set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
len = tty->ops->write(tty, skb->data, skb->len);
skb_pull(skb, len);
if (skb->len) {
+ spin_lock_irqsave(&nu->tx_lock, flags);
nu->tx_skb = skb;
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
break;
}
kfree_skb(skb);
}
- if (test_bit(NCI_UART_TX_WAKEUP, &nu->tx_state))
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ if (test_bit(NCI_UART_CLOSING, &nu->tx_state)) {
+ tx_started = test_and_clear_bit(NCI_UART_TX_STARTED,
+ &nu->tx_state);
+ clear_bit(NCI_UART_SENDING, &nu->tx_state);
+ clear_bit(NCI_UART_TX_WAKEUP, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ if (tx_started && nu->ops.tx_done)
+ nu->ops.tx_done(nu);
+ wake_up_all(&nu->tx_wait);
+ return;
+ }
+ if (test_and_clear_bit(NCI_UART_TX_WAKEUP, &nu->tx_state)) {
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
goto restart;
+ }
+ if (!nci_uart_queue_empty_locked(nu)) {
+ clear_bit(NCI_UART_SENDING, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ wake_up_all(&nu->tx_wait);
+ return;
+ }
+ tx_started = test_and_clear_bit(NCI_UART_TX_STARTED,
+ &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
- if (nu->ops.tx_done && nci_uart_queue_empty(nu))
+ if (tx_started && nu->ops.tx_done)
nu->ops.tx_done(nu);
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ if (test_bit(NCI_UART_CLOSING, &nu->tx_state)) {
+ clear_bit(NCI_UART_SENDING, &nu->tx_state);
+ clear_bit(NCI_UART_TX_WAKEUP, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ wake_up_all(&nu->tx_wait);
+ return;
+ }
+ if (test_and_clear_bit(NCI_UART_TX_WAKEUP, &nu->tx_state) ||
+ !nci_uart_queue_empty_locked(nu)) {
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ goto restart;
+ }
clear_bit(NCI_UART_SENDING, &nu->tx_state);
+ clear_bit(NCI_UART_TX_WAKEUP, &nu->tx_state);
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ wake_up_all(&nu->tx_wait);
+}
+
+/**
+ * nci_uart_set_ready - admit UART callbacks after transport setup
+ * @nu: NCI UART transport
+ *
+ * Publish fully initialized transport state and schedule any frame queued
+ * while the transport was opening. The line discipline and transmit locks
+ * must already be initialized.
+ */
+void nci_uart_set_ready(struct nci_uart *nu)
+{
+ /* Publish transport fields before callbacks observe READY. */
+ smp_mb__before_atomic();
+ set_bit(NCI_UART_READY, &nu->flags);
+ nci_uart_tx_wakeup(nu);
+}
+EXPORT_SYMBOL_GPL(nci_uart_set_ready);
+
+/**
+ * nci_uart_rx_flush - discard an incomplete UART receive frame
+ * @nu: NCI UART transport
+ *
+ * Clear parser state without changing callback admission. Return an error
+ * if a frame was incomplete, so the caller can skip any close-time exchange
+ * which would otherwise be parsed after the discarded prefix.
+ *
+ * Return: 0 if the parser was idle, or -EBADMSG if a partial frame was lost.
+ */
+int nci_uart_rx_flush(struct nci_uart *nu)
+{
+ int ret = 0;
+
+ spin_lock(&nu->rx_lock);
+ if (nu->rx_skb)
+ ret = -EBADMSG;
+ kfree_skb(nu->rx_skb);
+ nu->rx_skb = NULL;
+ nu->rx_packet_len = -1;
+ spin_unlock(&nu->rx_lock);
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(nci_uart_rx_flush);
+
+/**
+ * nci_uart_rx_stop - stop UART receive callbacks
+ * @nu: NCI UART transport
+ *
+ * Withdraw receive callback admission and discard an incomplete frame before
+ * transport-private state is released. The caller must keep @nu valid until
+ * any line-discipline callback already holding rx_lock has completed.
+ */
+void nci_uart_rx_stop(struct nci_uart *nu)
+{
+ spin_lock(&nu->rx_lock);
+ clear_bit(NCI_UART_READY, &nu->flags);
+ kfree_skb(nu->rx_skb);
+ nu->rx_skb = NULL;
+ nu->rx_packet_len = -1;
+ spin_unlock(&nu->rx_lock);
}
+EXPORT_SYMBOL_GPL(nci_uart_rx_stop);
static int nci_uart_set_driver(struct tty_struct *tty, unsigned int driver)
{
@@ -131,14 +403,22 @@ static int nci_uart_set_driver(struct tty_struct *tty, unsigned int driver)
nu->tty = tty;
skb_queue_head_init(&nu->tx_q);
INIT_WORK(&nu->write_work, nci_uart_write_work);
+ init_waitqueue_head(&nu->tx_wait);
+ spin_lock_init(&nu->tx_lock);
spin_lock_init(&nu->rx_lock);
ret = nu->ops.open(nu);
if (ret) {
+ nci_uart_rx_stop(nu);
+ nci_uart_tx_stop(nu);
+ kfree_skb(nu->tx_skb);
+ nu->tx_skb = NULL;
+ skb_queue_purge(&nu->tx_q);
module_put(nu->owner);
kfree(nu);
return ret;
}
+ nci_uart_set_ready(nu);
tty->disc_data = nu;
return 0;
@@ -181,22 +461,20 @@ static void nci_uart_tty_close(struct tty_struct *tty)
{
struct nci_uart *nu = tty->disc_data;
- /* Detach from the tty */
- tty->disc_data = NULL;
-
if (!nu)
return;
- kfree_skb(nu->tx_skb);
- kfree_skb(nu->rx_skb);
+ nu->ops.close(nu);
+ nci_uart_rx_stop(nu);
+ nci_uart_tx_stop(nu);
+ kfree_skb(nu->tx_skb);
+ nu->tx_skb = NULL;
skb_queue_purge(&nu->tx_q);
- nu->ops.close(nu);
- nu->tty = NULL;
module_put(nu->owner);
-
- cancel_work_sync(&nu->write_work);
+ tty->disc_data = NULL;
+ nu->tty = NULL;
kfree(nu);
}
@@ -218,7 +496,8 @@ static void nci_uart_tty_wakeup(struct tty_struct *tty)
clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
- if (tty != nu->tty)
+ if (tty != nu->tty ||
+ !test_bit_acquire(NCI_UART_READY, &nu->flags))
return;
nci_uart_tx_wakeup(nu);
@@ -290,6 +569,17 @@ static int nci_uart_default_recv_buf(struct nci_uart *nu, const u8 *data,
return 0;
}
+static bool nci_uart_rx_active(struct nci_uart *nu)
+{
+ if (!nu->ndev)
+ return false;
+
+ /* Firmware and close-time reset responses bypass the normal UP gate. */
+ return READ_ONCE(nu->ndev->nfc_dev->fw_download_in_progress) ||
+ test_bit(NCI_UP, &nu->ndev->flags) ||
+ test_bit(NCI_INIT, &nu->ndev->flags);
+}
+
/* nci_uart_tty_receive()
*
* Called by tty low level driver when receive data is
@@ -307,13 +597,23 @@ static void nci_uart_tty_receive(struct tty_struct *tty, const u8 *data,
{
struct nci_uart *nu = tty->disc_data;
- if (!nu || tty != nu->tty)
- return;
+ if (!nu || tty != nu->tty ||
+ !test_bit_acquire(NCI_UART_READY, &nu->flags))
+ goto unthrottle;
spin_lock(&nu->rx_lock);
+ if (!test_bit(NCI_UART_READY, &nu->flags) ||
+ !nci_uart_rx_active(nu)) {
+ kfree_skb(nu->rx_skb);
+ nu->rx_skb = NULL;
+ nu->rx_packet_len = -1;
+ spin_unlock(&nu->rx_lock);
+ goto unthrottle;
+ }
nci_uart_default_recv_buf(nu, data, count);
spin_unlock(&nu->rx_lock);
+unthrottle:
tty_unthrottle(tty);
}
@@ -367,11 +667,23 @@ static ssize_t nci_uart_tty_write(struct tty_struct *tty, struct file *file,
static int nci_uart_send(struct nci_uart *nu, struct sk_buff *skb)
{
- /* Queue TX packet */
- skb_queue_tail(&nu->tx_q, skb);
+ unsigned long flags;
+ int ret = 0;
- /* Try to start TX (if possible) */
- nci_uart_tx_wakeup(nu);
+ /* Queue TX packet */
+ spin_lock_irqsave(&nu->tx_lock, flags);
+ if (test_bit(NCI_UART_CLOSING, &nu->tx_state) ||
+ !test_bit(NCI_UART_READY, &nu->flags)) {
+ ret = -ESHUTDOWN;
+ } else {
+ __skb_queue_tail(&nu->tx_q, skb);
+ nci_uart_tx_wakeup_locked(nu);
+ }
+ spin_unlock_irqrestore(&nu->tx_lock, flags);
+ if (ret) {
+ kfree_skb(skb);
+ return ret;
+ }
return 0;
}
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net v9 4/4] nfc: nfcmrvl: adopt the NCI UART lifecycle helpers
2026-11-30 9:14 [PATCH net v9 0/4] nfc: nci: uart: split lifecycle teardown fixes Shubham Antil
` (2 preceding siblings ...)
2026-11-30 9:14 ` [PATCH net v9 3/4] nfc: nci: uart: quiesce callbacks during teardown Shubham Antil
@ 2026-11-30 9:14 ` Shubham Antil
3 siblings, 0 replies; 5+ messages in thread
From: Shubham Antil @ 2026-11-30 9:14 UTC (permalink / raw)
To: netdev; +Cc: Simon Horman, gio, David Heidelberg, oe-linux-nfc
The Marvell UART open path registers its NCI device before publishing the
transport back-pointers, and its close path can release private state
while generic UART callbacks are still admitted.
Publish the back-pointers before NCI registration, make the NCI ready
hook open callback admission immediately before public registration, and
withdraw admission before releasing private state. Flush complete frames
before the close-time reset and treat a partial receive frame as lost
framing, so the reset is skipped rather than parsed after a delayed
suffix. Abort a transport whose framing cannot be preserved, halt the
controller while its reset GPIO is still valid, reject firmware download
on that poisoned UART, and clear the published pointers during unwind.
The generic ready call remains an idempotent fallback after a transport
ready hook. This keeps transports without an early-ready requirement
working without reopening admission after it has been withdrawn.
Discovered during an AI-assisted source audit using OpenAI Codex,
gpt-5.6-sol. A high-concurrency pre-fix run reproduced a
general-protection fault in nfcmrvl_nci_uart_tx_start() while
nu->drv_data was still NULL. Patch development and test planning used the
same assistant.
Confirmed with repeated NCI UART registration, device-open, reset, and
hangup cycles using a pty-backed user-space controller. No physical NFC
controller was available.
Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver")
Assisted-by: LLM (OpenAI Codex, gpt-5.6-sol)
Signed-off-by: Shubham Antil <shubham@octane.security>
---
drivers/nfc/nfcmrvl/main.c | 46 +++++++++++++++++++++----
drivers/nfc/nfcmrvl/nfcmrvl.h | 4 +++
drivers/nfc/nfcmrvl/uart.c | 63 +++++++++++++++++++++++++++++++----
3 files changed, 101 insertions(+), 12 deletions(-)
diff --git a/drivers/nfc/nfcmrvl/main.c b/drivers/nfc/nfcmrvl/main.c
index 6efa83219..bc0d80ab1 100644
--- a/drivers/nfc/nfcmrvl/main.c
+++ b/drivers/nfc/nfcmrvl/main.c
@@ -22,13 +22,12 @@ static int nfcmrvl_nci_open(struct nci_dev *ndev)
if (test_and_set_bit(NFCMRVL_NCI_RUNNING, &priv->flags))
return 0;
- /* Reset possible fault of previous session */
- clear_bit(NFCMRVL_PHY_ERROR, &priv->flags);
-
err = priv->if_ops->nci_open(priv);
if (err)
clear_bit(NFCMRVL_NCI_RUNNING, &priv->flags);
+ else
+ clear_bit(NFCMRVL_PHY_ERROR, &priv->flags);
return err;
}
@@ -67,6 +66,24 @@ static int nfcmrvl_nci_send(struct nci_dev *ndev, struct sk_buff *skb)
return priv->if_ops->nci_send(priv, skb);
}
+static void nfcmrvl_nci_ready(struct nci_dev *ndev)
+{
+ struct nfcmrvl_private *priv = nci_get_drvdata(ndev);
+
+ if (priv->if_ops->nci_ready)
+ priv->if_ops->nci_ready(priv);
+}
+
+static int nfcmrvl_nci_flush(struct nci_dev *ndev)
+{
+ struct nfcmrvl_private *priv = nci_get_drvdata(ndev);
+
+ if (priv->if_ops->nci_flush)
+ return priv->if_ops->nci_flush(priv);
+
+ return 0;
+}
+
static int nfcmrvl_nci_setup(struct nci_dev *ndev)
{
__u8 val = 1;
@@ -78,6 +95,12 @@ static int nfcmrvl_nci_setup(struct nci_dev *ndev)
static int nfcmrvl_nci_fw_download(struct nci_dev *ndev,
const char *firmware_name)
{
+ struct nfcmrvl_private *priv = nci_get_drvdata(ndev);
+
+ if (priv->phy == NFCMRVL_PHY_UART &&
+ test_bit(NFCMRVL_PHY_ERROR, &priv->flags))
+ return -EIO;
+
return nfcmrvl_fw_dnld_start(ndev, firmware_name);
}
@@ -85,6 +108,8 @@ static const struct nci_ops nfcmrvl_nci_ops = {
.open = nfcmrvl_nci_open,
.close = nfcmrvl_nci_close,
.send = nfcmrvl_nci_send,
+ .ready = nfcmrvl_nci_ready,
+ .flush = nfcmrvl_nci_flush,
.setup = nfcmrvl_nci_setup,
.fw_download = nfcmrvl_nci_fw_download,
};
@@ -154,19 +179,24 @@ struct nfcmrvl_private *nfcmrvl_nci_register_dev(enum nfcmrvl_phy phy,
nci_set_drvdata(priv->ndev, priv);
+ /* Ensure that the controller is powered off before exposing it. */
+ nfcmrvl_chip_halt(priv);
+
+ if (priv->if_ops->nci_prepare)
+ priv->if_ops->nci_prepare(priv);
+
rc = nci_register_device(priv->ndev);
if (rc) {
nfc_err(dev, "nci_register_device failed %d\n", rc);
goto error_fw_dnld_deinit;
}
- /* Ensure that controller is powered off */
- nfcmrvl_chip_halt(priv);
-
nfc_info(dev, "registered with nci successfully\n");
return priv;
error_fw_dnld_deinit:
+ if (priv->if_ops->nci_quiesce)
+ priv->if_ops->nci_quiesce(priv);
nfcmrvl_fw_dnld_deinit(priv);
error_free_dev:
nci_free_device(priv->ndev);
@@ -181,6 +211,9 @@ void nfcmrvl_nci_unregister_dev(struct nfcmrvl_private *priv)
struct nci_dev *ndev = priv->ndev;
nci_unregister_device(ndev);
+ if (priv->if_ops->nci_quiesce)
+ priv->if_ops->nci_quiesce(priv);
+
if (priv->ndev->nfc_dev->fw_download_in_progress)
nfcmrvl_fw_dnld_abort(priv);
@@ -241,6 +274,7 @@ void nfcmrvl_chip_halt(struct nfcmrvl_private *priv)
if (priv->config.reset_gpio)
gpiod_set_value(priv->config.reset_gpio, 1);
}
+EXPORT_SYMBOL_GPL(nfcmrvl_chip_halt);
int nfcmrvl_parse_dt(struct device_node *node,
struct nfcmrvl_platform_data *pdata)
diff --git a/drivers/nfc/nfcmrvl/nfcmrvl.h b/drivers/nfc/nfcmrvl/nfcmrvl.h
index 62fa77d58..085ea4953 100644
--- a/drivers/nfc/nfcmrvl/nfcmrvl.h
+++ b/drivers/nfc/nfcmrvl/nfcmrvl.h
@@ -112,6 +112,10 @@ struct nfcmrvl_if_ops {
int (*nci_open) (struct nfcmrvl_private *priv);
int (*nci_close) (struct nfcmrvl_private *priv);
int (*nci_send) (struct nfcmrvl_private *priv, struct sk_buff *skb);
+ void (*nci_ready)(struct nfcmrvl_private *priv);
+ int (*nci_flush)(struct nfcmrvl_private *priv);
+ void (*nci_prepare)(struct nfcmrvl_private *priv);
+ void (*nci_quiesce)(struct nfcmrvl_private *priv);
void (*nci_update_config)(struct nfcmrvl_private *priv,
const void *param);
};
diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c
index 9aedd1687..8cecb48e7 100644
--- a/drivers/nfc/nfcmrvl/uart.c
+++ b/drivers/nfc/nfcmrvl/uart.c
@@ -28,11 +28,17 @@ static unsigned int break_control;
static int nfcmrvl_uart_nci_open(struct nfcmrvl_private *priv)
{
- return 0;
+ struct nci_uart *nu = priv->drv_data;
+
+ /* A failed close-time flush poisons this line-discipline instance. */
+ return nci_uart_tx_flush(nu);
}
static int nfcmrvl_uart_nci_close(struct nfcmrvl_private *priv)
{
+ if (test_bit(NFCMRVL_PHY_ERROR, &priv->flags))
+ nfcmrvl_chip_halt(priv);
+
return 0;
}
@@ -44,6 +50,51 @@ static int nfcmrvl_uart_nci_send(struct nfcmrvl_private *priv,
return nu->ops.send(nu, skb);
}
+static void nfcmrvl_uart_nci_ready(struct nfcmrvl_private *priv)
+{
+ struct nci_uart *nu = priv->drv_data;
+
+ nci_uart_set_ready(nu);
+}
+
+static int nfcmrvl_uart_nci_flush(struct nfcmrvl_private *priv)
+{
+ struct nci_uart *nu = priv->drv_data;
+ int rx_ret;
+ int ret;
+
+ ret = nci_uart_tx_flush(nu);
+ rx_ret = nci_uart_rx_flush(nu);
+ if (!ret)
+ ret = rx_ret;
+ if (ret) {
+ set_bit(NFCMRVL_PHY_ERROR, &priv->flags);
+ nci_uart_tx_abort(nu);
+ }
+
+ return ret;
+}
+
+static void nfcmrvl_uart_nci_prepare(struct nfcmrvl_private *priv)
+{
+ struct nci_uart *nu = priv->drv_data;
+
+ priv->support_fw_dnld = true;
+ nu->drv_data = priv;
+ nu->ndev = priv->ndev;
+}
+
+static void nfcmrvl_uart_nci_quiesce(struct nfcmrvl_private *priv)
+{
+ struct nci_uart *nu = priv->drv_data;
+
+ nci_uart_rx_stop(nu);
+ nci_uart_tx_stop(nu);
+ nfcmrvl_chip_halt(priv);
+ nu->drv_data = NULL;
+ nu->ndev = NULL;
+}
+
static void nfcmrvl_uart_nci_update_config(struct nfcmrvl_private *priv,
const void *param)
{
@@ -58,6 +109,10 @@ static const struct nfcmrvl_if_ops uart_ops = {
.nci_open = nfcmrvl_uart_nci_open,
.nci_close = nfcmrvl_uart_nci_close,
.nci_send = nfcmrvl_uart_nci_send,
+ .nci_ready = nfcmrvl_uart_nci_ready,
+ .nci_flush = nfcmrvl_uart_nci_flush,
+ .nci_prepare = nfcmrvl_uart_nci_prepare,
+ .nci_quiesce = nfcmrvl_uart_nci_quiesce,
.nci_update_config = nfcmrvl_uart_nci_update_config
};
@@ -136,11 +191,6 @@ static int nfcmrvl_nci_uart_open(struct nci_uart *nu)
if (IS_ERR(priv))
return PTR_ERR(priv);
- priv->support_fw_dnld = true;
-
- nu->drv_data = priv;
- nu->ndev = priv->ndev;
-
return 0;
}
@@ -199,6 +249,7 @@ static struct nci_uart nfcmrvl_nci_uart = {
.tx_done = nfcmrvl_nci_uart_tx_done,
}
};
+
module_driver(nfcmrvl_nci_uart, nci_uart_register, nci_uart_unregister);
MODULE_AUTHOR("Marvell International Ltd.");
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread