From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Stephen Hemminger <sthemmin@microsoft.com>
Subject: [dpdk-dev] [PATCH 1/3] vmbus: close directory in error path
Date: Mon, 6 Aug 2018 11:11:06 -0700 [thread overview]
Message-ID: <20180806181108.5913-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20180806181108.5913-1-stephen@networkplumber.org>
Fix bug reported by Coverity where directory being scanned was
not closed in error path (leaking file descriptor).
Coverity issue: 302848
Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
drivers/bus/vmbus/linux/vmbus_uio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c
index b0f8ebaea6ea..0b1b153cc017 100644
--- a/drivers/bus/vmbus/linux/vmbus_uio.c
+++ b/drivers/bus/vmbus/linux/vmbus_uio.c
@@ -357,6 +357,7 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary,
if (err) {
VMBUS_LOG(NOTICE, "invalid subchannel id %lu",
subid);
+ closedir(chan_dir);
return err;
}
--
2.18.0
next prev parent reply other threads:[~2018-08-06 18:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-06 18:11 [dpdk-dev] [PATCH 0/3] vmbus: coverity bug fixes Stephen Hemminger
2018-08-06 18:11 ` Stephen Hemminger [this message]
2018-08-06 18:11 ` [dpdk-dev] [PATCH 2/3] vmbus: make sure path is null terminated Stephen Hemminger
2018-08-06 18:11 ` [dpdk-dev] [PATCH 3/3] vmbus: handle eof on irq read Stephen Hemminger
2018-08-07 11:26 ` [dpdk-dev] [PATCH 0/3] vmbus: coverity bug fixes Thomas Monjalon
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=20180806181108.5913-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=sthemmin@microsoft.com \
/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;
as well as URLs for NNTP newsgroup(s).