diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-10-13 02:17:46 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-10-13 03:07:34 +0300 |
commit | 0e6bb5b7f4c8e6665e76bdafce37ad4a8daf83c5 (patch) | |
tree | 6f71fc5628f01bcf9d2dc6eceb3000ee4e73c79a /net/nfc/nci | |
parent | 2f0968a030f2a5dd4897a0151c8395bf5babe5b0 (diff) | |
parent | e8c127b0576660da9195504fe8393fe9da3de9ce (diff) | |
download | linux-0e6bb5b7f4c8e6665e76bdafce37ad4a8daf83c5.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts.
Adjacent changes:
kernel/bpf/verifier.c
829955981c55 ("bpf: Fix verifier log for async callback return values")
a923819fb2c5 ("bpf: Treat first argument as return value for bpf_throw")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/nfc/nci')
-rw-r--r-- | net/nfc/nci/core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c index fff755dde30d..6c9592d05120 100644 --- a/net/nfc/nci/core.c +++ b/net/nfc/nci/core.c @@ -909,6 +909,11 @@ static int nci_activate_target(struct nfc_dev *nfc_dev, return -EINVAL; } + if (protocol >= NFC_PROTO_MAX) { + pr_err("the requested nfc protocol is invalid\n"); + return -EINVAL; + } + if (!(nci_target->supported_protocols & (1 << protocol))) { pr_err("target does not support the requested protocol 0x%x\n", protocol); |