From: Martin Wilck <mwilck@suse.com>
To: lixiaokeng <lixiaokeng@huawei.com>,
Benjamin Marzinski <bmarzins@redhat.com>,
Christophe Varoqui <christophe.varoqui@opensvc.com>,
dm-devel mailing list <dm-devel@redhat.com>
Cc: linfeilong <linfeilong@huawei.com>,
"liuzhiqiang (I)" <liuzhiqiang26@huawei.com>
Subject: Re: [PATCH v2] libmultipath: check udev_device_get_* return value to avoid segfault
Date: Mon, 21 Sep 2020 11:14:24 +0200 [thread overview]
Message-ID: <a09c32f1acded7e3fe2e5187606e27c60c584de6.camel@suse.com> (raw)
In-Reply-To: <be54400a-5da9-8444-c473-562d675b10f3@huawei.com>
On Mon, 2020-09-21 at 12:00 +0800, lixiaokeng wrote:
> The udev_device_get_* function may return NULL, and it will be
> deregerenced in str* and sscanf func. We check the return value
> to avoid segfault. Fix all.
>
Thanks. Let me remark that this patch does _not_ fix all invocations of
udev_device_get_XYZ() (I suppose you meant something else with "Fix
all.", but please be more specific next time then).
See path_discover(), declare_sysfs_get_str(), for instance.
Anyway, that can be fixed later, so:
Reviewed-by: Martin Wilck <mwilck@suse.com>
next prev parent reply other threads:[~2020-09-21 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 4:00 [PATCH v2] libmultipath: check udev_device_get_* return value to avoid segfault lixiaokeng
2020-09-21 9:14 ` Martin Wilck [this message]
2020-09-21 9:52 ` lixiaokeng
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=a09c32f1acded7e3fe2e5187606e27c60c584de6.camel@suse.com \
--to=mwilck@suse.com \
--cc=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
--cc=linfeilong@huawei.com \
--cc=liuzhiqiang26@huawei.com \
--cc=lixiaokeng@huawei.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).