command input, causing multipathd can not execute the true funcion. It
>>> could be
>>> an same error for executing multipathd by the old mode.
>>>
>>> multipathd invokes the corresponding function based on the handle value.
>>> CVE-2022-41964 changed the meth
arg will be free by cleanup_charp. FREE(args)
is unnecessary before return. Remove it.
Signed-off-by: Lixiaokeng
---
libmultipath/prioritizers/weightedpath.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libmultipath/prioritizers/weightedpath.c
b/libmultipath
MALLOC will set memory zero. memset is unnecessary.
Remove it.
Signed-off-by: Lixiaokeng
---
libmultipath/log.c | 1 -
multipathd/waiter.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/libmultipath/log.c b/libmultipath/log.c
index 10fa32cd..f41efb5b 100644
--- a/libmultipath/log.c
+++ b
udev_device_* may return NULL, check it.
Signed-off-by: Lixiaokeng
---
libmultipath/discovery.c| 8 +---
libmultipath/foreign/nvme.c | 4 +++-
libmultipath/util.c | 10 +-
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/libmultipath/discovery.c b
*** BLURB HERE ***
lixiaokeng (3):
Fix potential null pointer dereference
remove unnecessary memset
remove unnecessary free
libmultipath/discovery.c | 8 +---
libmultipath/foreign/nvme.c | 4 +++-
libmultipath/log.c | 1
On 2021/11/19 0:57, Benjamin Marzinski wrote:
> On Tue, Nov 16, 2021 at 10:01:15PM +0800, lixiaokeng wrote:
>> The update_map will frequently be called and there will be
>> unnecessary checks of reseravtion. We add prflag to path
>> to avoid this.
>>
>> The pp
On 2021/11/18 8:47, Benjamin Marzinski wrote:
> On Tue, Nov 16, 2021 at 10:00:53PM +0800, lixiaokeng wrote:
>> In _DEBUG_ mode, MALLOC/STRDUP/REALLOC and FREE will record
>> the memory usage. Match them.
>
> This looks fine, but personally, I'd rather just have all th
"firmware_rev"));
>> case 'r':
>> val = udev_device_get_sysattr_value(nvm->udev, "ro");
>> -if (val[0] == 1)
>> + if (!val)
>> +return -1;
>
&g
lixiaokeng (5):
Fix potential null pointer dereference
remove unnecessary memset
remove unnecessary free
Match FREE and MALLOC/STRDUP/REALLOC
add prflag to path
kpartx/dasd.c| 5 +++--
kpartx/kpartx.c | 7 ---
libmpathpersist
In _DEBUG_ mode, MALLOC/STRDUP/REALLOC and FREE will record
the memory usage. Match them.
Signed-off-by: Lixiaokeng
---
kpartx/dasd.c| 5 +++--
kpartx/kpartx.c | 7 ---
libmultipath/blacklist.c | 6 +++---
libmultipath/checkers
pp->prkey PRKEY_NO when path is removed.
Fix: 4db4fa
Signed-off-by: Lixiaokeng
---
libmpathpersist/mpath_persist.c | 2 +-
libmultipath/structs.c | 1 +
libmultipath/structs.h | 12
multipathd/cli_handlers.c | 15 ++-
multipathd/
arg will be free by cleanup_charp. FREE(args)
is unnecessary before return. Remove it.
Signed-off-by: Lixiaokeng
---
libmultipath/prioritizers/weightedpath.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libmultipath/prioritizers/weightedpath.c
b/libmultipath
MALLOC will set memory zero. memset is unnecessary.
Remove it.
Signed-off-by: Lixiaokeng
---
libmultipath/log.c | 1 -
multipathd/waiter.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/libmultipath/log.c b/libmultipath/log.c
index 10fa32cd..f41efb5b 100644
--- a/libmultipath/log.c
+++ b
udev_device_* may return NULL, check it.
Signed-off-by: Lixiaokeng
---
libmultipath/discovery.c| 8 +---
libmultipath/foreign/nvme.c | 4 +++-
libmultipath/util.c | 10 +-
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/libmultipath/discovery.c b
On 2021/9/14 0:32, Martin Wilck wrote:
> On Mon, 2021-09-13 at 10:32 -0500, Benjamin Marzinski wrote:
>> On Mon, Sep 13, 2021 at 09:01:11AM +0200, Martin Wilck wrote:
>>> Hello lixiaokeng,
>>>
>>> On Mon, 2021-09-13 at 10:43 +0800, lixiaokeng wrote:
>>
is after add path
uevent, the the uevent(add sdb) will delay and missing persistent
reseravtion check.
Here, we add persistent reseravtion check in update_map() which
is called ev_add_map().
Signed-off-by: Lixiaokeng
---
multipathd/main.c | 11 +++
1 file changed, 11 insertions(+)
diff --git
On 2021/9/11 0:17, Martin Wilck wrote:
> Hello lixiaokeng,
>
> thanks for your patch.
>
> On Fri, 2021-09-10 at 20:31 +0800, lixiaokeng wrote:
>> There are two paths(sucu as sda and adb) for one LUN. The two
>> paths log in, but before the two uevents have bee
is after add path
uevent, the the uevent(add sdb) will delay and missing persistent
reseravtion check.
Here, we add persistent reseravtion check in ev_add_map if
mpp->wait_for_udev > 1.
Signed-off-by: Lixiaokeng
---
multipathd/main.c | 9 +
1 file changed, 9 insertions(+)
diff
On 2021/8/12 19:17, Martin Wilck wrote:
> Hello Lixiaokeng,
>
> On Mi, 2021-08-11 at 21:11 +0800, lixiaokeng wrote:
>> There is an error when complie with glibc-2.34:
>> comparison of integer expressions of different signedness:
>> 'size_t' {aka 'long unsigned int'}
On 2021/8/12 19:09, Martin Wilck wrote:
> On Mo, 2021-07-26 at 11:28 -0500, Benjamin Marzinski wrote:
>> On Mon, Jul 26, 2021 at 08:22:49PM +0800, lixiaokeng wrote:
>>>
>>>>> After sdb mounted to /var, we can start multipathd service
>>>>> su
it to the size_t variable to fix it.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
---
libmultipath/util.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libmultipath/util.c b/libmultipath/util.c
index 0e37f3ff..5c2fd5c6 100644
--- a/libmultipath/util.c
+++ b
n instead of /var/run, right?
>
> This is why I asked what multipath packages are you using.
>
This problem is found in 0.7.7.
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
On 2021/7/23 5:42, Benjamin Marzinski wrote:
> On Thu, Jul 22, 2021 at 10:51:22AM +0800, lixiaokeng wrote:
>> When we enable multipathd.service with systemctl and reboot,
>> multipathd doesn't start and log "failed to create pidfile".
>>
>> The reason is
be defined as run?
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Hi Martin,
You are right!! This problem was found in 0.7.7. Now I know it
is fixed with commit 9b715bf9 in 0.8.1.
I will use the commit 9b715bf9 to fix it. Thanks for your
review and answer very much.
Regarts
Lixiaokeng
On 2021/6/24 18:19, Martin Wilck wrote:
> On Do, 2021-06-24 at 16:47 +0
-> pathinfo is called before
check_path, the state of the first path will be set PATH_UP
without checking persistent reservation registration.
Here we add checking in uev_update_path.
Signed-off-by: Lixiaokeng
---
multipathd/main.c | 14 ++
1 file changed, 14 insertions(+)
diff --
If checker_cleanup_thread is called after cleanup_checkers,
the checker_class will not be freed.
Here, we use free_checker_class instead of checker_class_unref
in checker_cleanup_thread.
Signed-off-by: Lixiaokeng
---
libmultipath/checkers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
t_status //return DMP_NOT_FOUND
->condlog //pp->mpp->alias, NULL dereference
Here we don't dereference pp-> mpp if it is NULL.
Signed-off-by: Lixiaokeng
---
multipathd/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multipathd/main.c b/multipathd/main.c
; multipath which has different uuid. Finally, the metadata err
>>> occurs when umounting filesystem to down write metadata on
>>> the iscsi device which is actually not owned by the multipath
>>> device.
>>>
>>> So we need to check whether all pgpaths of
On 2021/3/18 0:59, Martin Wilck wrote:
> Hello Lixiaokeng,
>
>
>> Hi Martin
>>
>> I'm sorry for missing this. 38ffd89 ("libmultipath: prevent
>> DSO unloading with astray checker threads") fixes my issue.
>
> Thanks! Am I right assuming th
>>
>> Can you confirm that that commit fixes your issue?
>
> Any updates on this?
>
Hi Martin
I'm sorry for missing this. 38ffd89 ("libmultipath: prevent
DSO unloading with astray checker threads") fixes my issue.
Regards
Lixiaokeng
--
dm-devel mailing
uction pointers were
> broken. That would suggest something similar as dicussed in the ML
> thread leading to 38ffd89 ("libmultipath: prevent DSO unloading with
> astray checker threads"). Your logs show "tur checker refcount 1", so
> the next call to checker_put would h
On 2021/3/2 19:07, Martin Wilck wrote:
> On Tue, 2021-03-02 at 16:41 +0800, lixiaokeng wrote:
>>
>>>
>>> Hi Martin:
>>> Here I add condlog(2, "start funcname"),
>>> pthread_cleanup_push(func_print, NULL)
>>> in every pthread
;> to test it.
>
> Where exactly do you want to put that code?
>
I add this in BEGAIN and END of tur_thread. But it is not helpful.
> IIUC you don't compile multipathd with -fexceptions, do you? You
> haven't answered my previous question why you do that for systemd.
I don'
e may be in tur_thread.
>
If I made no mistake, these coredumps happened when the tur_thread(which is
libcheck_thread in latest code) was not finished but checker(tur)was
cleared by cleanup_checkers. But I can't understand this, because the ctx
in tur_thread wasn't freed by cleanup_checkers.
Please give
On 2021/2/3 21:57, Martin Wilck wrote:
> On Wed, 2021-02-03 at 18:48 +0800, lixiaokeng wrote:
>>
>>
>> On 2021/2/3 4:52, Martin Wilck wrote:
>>> did this fix your "crash on exit" issue?
>>
>> Unfortunately, the issue is not solved.
>>
&
On 2021/2/10 1:30, Martin Wilck wrote:
> On Tue, 2021-02-09 at 09:36 +0800, lixiaokeng wrote:
>>
>>>
>>> I still don't fully understand. Above you said "this coredump
>>> doesn't
>>> seem to appear any more". Am I understanding cor
pthread_cleanup_push()/pop() calls from our code.
>
> Finding all these points would be a challenge though, and if we don't
> find them, we risk hanging on exit again, which is bad too, and was
> just recently improved.
Do you mean some patches have been made to solve these problem?
Regards,
L
On 2021/2/8 17:50, Martin Wilck wrote:
> On Mon, 2021-02-08 at 15:41 +0800, lixiaokeng wrote:
>>
>> Hi Martin,
>>
>> There is a _cleanup_ in device_new_from_nulstr. If uevent_thr exit in
>> device_new_from_nulstr and some keys is not be append to sd_device
_DISABLE, );
>
> udev_monitor_receive_device(...)
>
> pthread_setcancelstate(oldstate, NULL);
> pthread_testcancel();
this coredump does not seem to appear anymore (several hours with test scripts).
Here are some discussion in https://github.com/systemd/systemd/issues/18376.
Should be pthread cancellation set in multipath-tools?
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
rds,
Lixiaokeng
The kernel log:
84087 Feb 5 16:13:12 client1 kernel: [618082.728130] sd 1:0:0:2: [sdi]
Synchronizing SCSI cache
multipath -r (first)
84103 Feb 5 16:13:12 client1 kernel: [618082.992107] lxk kernel params 0 1
alua 1 1 service-time 0 1 1 8:96 1
84104 Feb 5 16:13:12 client1 ker
p->fd) in orphan_path(). It may solve the
problem (device with wrong path). I will take some time to test it.
However, I don’t know if there are potential risks. Do you have
suggestions about this?
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On 2021/2/3 21:14, Martin Wilck wrote:
> On Wed, 2021-02-03 at 17:42 +0800, lixiaokeng wrote:
>>
>>
>> On 2021/2/3 16:14, Martin Wilck wrote:
>>> Is this also a Tested-by:?
>>> IOW, did it fix your issue?
>>
>> Yes, it solves the cras
> would actually be expected.
When running_state is DAEMON_SHUTDOWN, break while then _exit(0). But
is is not a great method.
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
hread cancel but I don't know how it
comes.
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
membership of the
> path to be added in mpp->paths.
>
> Fixes: 2d32d6f ("libmultipath: adopt_paths(): don't bail out on single path
> failure")
> Signed-off-by: Martin Wilck
> ---
>
> @lixiaokeng, I believe that this fixes the issue you mentioned in
t;pathvec, pp) == -1 ||
!pp->mpp)
goto out;
This is better than my first patch to avoid this problem. However, it
is beyond my ability to slove the problem of filter_property returning
different values.
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
->add_map_with_path
->adopt_paths
->pathinfo
->pp->bus == SYSFS_BUS_SCSI
->return PATHINFO_SKIPPED,
->pp->mpp is NULL and not be set
->return 0
->mpath_pr_event_handle
->get_be64 //pp->mpp is dereference
If you think my patch is ok, I will resend it.
Regards
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
->return PATHINFO_SKIPPED,
->pp->mpp is NULL and not be set
->return 0
->mpath_pr_event_handle
->get_be64 //pp->mpp is dereference
The multipath.conf show:
defaults {
find_multipaths no
}
Here, my local disks can't p
Hi Martin,
The local disks will not be a multipath device. Is it?
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
When find_multipaths is no and add local path by multiapthd,
the local path will be filtered by filter_property. The
pp->mpp is not set in adopt_paths. Then the pp->mpp will be
dereferenced in get_be6.
Here add check pp->mpp in ev_add_path.
Signed-off-by: Lixiaokeng
---
multipathd/m
d_testcancel () at pthread_testcancel.c:26
#7 0xb5c528e8 in ?? ()
This issue seems being different from that I described firstly.
Do you think they are related?
Will udev_device_unref lead to double free about first issue?
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
no problem (they have been
runing for 96h and for 48h respectively).
I will replace the kernel of the computer with this issue and test
it again.
Do you have any great idea about dm-5 destruction? Thanks.
Regards,
Lixiaokeng
>> (3)iscsi login: The sdf appears in iscsi in system time
&
in domap using gdb and iscsi log out/in,
the sdf will not be used again becasue the disk refcount is not zero. I
add a print if the disk refcount is zero in put_disk_and_module (for
example lxk ref put after: name sdi; count 0), but there is not this print
about sdf.
(4)domap successd.
Do you have any
-fsanitize=address, but
> in this specific case you'd need to compile libudev with this option,
> too.
>
> Martin
>
Thanks very much. Your suggestions is very helpful.
The problem reproduced and the bug seems that shown in
https://bugzilla.redhat.com/show_bug.cgi?id=1293594.
Regards
When stopping multipathd (systemctl restart multipathd.service), there
is a multipathd crash occasionally(not reproduced).
Here is stack:
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x87d9e81c in __GI_abort () at abort.c:79
#2 0x87dd7818 in
em.
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
another way to
lead multipath with wrong path, but now I can't find the way from log.
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
When I test the 0.8.5 code with iscsi login/out, multipathd command
and multipath command concurrently, there is a multipathd coredump.
The stack is shown:
uxlsnrloop
->cli_list_devices
->show_devices
->snprint_devices
->find_path_by_dev
The reason is that devname is NULL in
m what the kernel sees.
What you said is very reasonable. When this problem was found, I think
it is difficult to solve that entirely, while it is hard to happen. Well,
I will discuss the rationality of test scripts with testers.
> There's definitely room for improvement in multipathd wrt lockin
are base on code 0.7.7. I think similar process
exists in 0.8.5 but there may be another to cause error.
The latest "queue" code isn't tested. I will try.
Regards,
Lixiaokeng
On 2021/1/19 17:41, Martin Wilck wrote:
> Hi Lixiaokeng,
>
> On Mon, 2021-01-18 at 19:08 +0800, lixi
but sdi is actually the path of 36001405b7679bd96b094bccbf971bc90.
(3) metadata of 36001405ca5165367d67447ea68108e1d sync
The metadata of 36001405b7679bd96b094bccbf971bc90 will be covered.
(4) umount 36001405b7679bd96b094bccbf971bc90
36001405b7679bd96b094bccbf971bc90 has no usable path when umount,
-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/configure.c | 40 +---
1 file changed, 29 insertions(+), 11 deletions(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 6fb477fc..2547e1d5 100644
ise, you
> could leak newmp on those failures.
>
> -Ben
>
>> /* ignore refwwid if it's empty */
>> if (refwwid && !strlen(refwwid))
>> refwwid = NULL;
Hi
Thanks for your great advice. I will move these codes after checking
the pathvec
r
advice again.
Regards,
Lixiaokeng
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
When multipath -F are executed first and multipath -v2 or
-d are executed later, asan will warn memory leaks. The
reason is that the mpp allocated in coalesce_paths isn't
freed. Here we use newmp to store mpp. If mpvec is NULL,
we free newmp at the end of the func.
Signed-off-by: Lixiaokeng
>
> Thanks for the patches, but unless you can provide evidence that the
> issues are still present in recent upstream code, we likely won't
> bother with this on dm-devel. Please report this to the distribution(s)
> you are using that are still shipping the old multipath-tools versions.
>
>
. Multipathd will try to
delete the multipath device but fail because the
device is used. Here we check the offline path; if its'
size is different with other path, delete it.
Signed-off-by: Yanfei Zhang
Signed-off-by: Lixiaokeng
---
libmultipath/configure.c | 18
If the pgp is NULL, this code will lead to coredump.
Here we check the pgp before dereference. And there
are some code enhance.
Signed-off-by: Lixiaokeng
---
libmultipath/prioritizers/alua.c | 4
libmultipath/prioritizers/emc.c | 2 +-
libmultipath/prioritizers/hds.c | 19
Signed-off-by: Lixiaokeng
---
libmpathpersist/mpath_persist.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c
index 1f9817ed..02d173dc 100644
--- a/libmpathpersist/mpath_persist.c
+++ b/lib
Write to /etc/multipath/prkeys, for example
0x0001 3620f17c1007609293677bb21058e.
Power-off and restart in 5 seconds. There will
be some 0 byte in /etc/multipath/prkeys.
Here we flush and sync before reboot.
Signed-off-by: Jianbing Jiao
Signed-off-by: Lixiaokeng
The mpathpersist -I and -G does not work.
Here we fix that.
Signed-off-by: Jianbing Jiao
Signed-off-by: Lixiaokeng
---
libmpathpersist/mpath_persist.c | 20
1 file changed, 12 insertions(+), 8 deletions(-)
diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist
In history, the "multipathd resize" may fail without failed
messages because of there are different sizes paths in mpp.
Here we check every path size in cli_resize, fail and print
messages if there are some different size paths. This patch
was made in 12 Oct 2017.
Signed-off-by:
Hi,
There are some old patches in our multipath-tools code. They fix some
bugs in old version (0.4.9). I'm not the auther of these patches,
but I send them. Please review.Thanks.
lixiaokeng (3):
fix multipathd resize when not all sizes of paths are equal
fix lun expansion failure when
There is a bug in commit acff7d4. Before return, we should call
udev_device_unref(hostdev) in sysfs_get_tgt_nodenam.
Signed-off_by:lixiaokeng
---
libmultipath/discovery.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/configure.c | 66 +---
1 file changed, 41 insertions(+), 25 deletions(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 6fb477fc..9d6eeba1 100644
On 2020/10/17 3:51, Martin Wilck wrote:
> On Fri, 2020-10-16 at 14:23 +0800, lixiaokeng wrote:
>> When multipath -F are executed firstly and multipath -v2 or
>> -d are executed later, asan will warn memory leaks. The
>> reason is that the mpp allocated in coalesce_paths is
Hi Martin:
I'm sorry for forgetting to reply this. When I test with
this patch, the multipath coredump don't cause again.
Regards
Lixiaokeng
On 2020/8/21 21:54, mwi...@suse.com wrote:
> From: Martin Wilck
>
> Use the same logic as map_discovery() to discard maps that
> couldn
Here the segfault causes in select_pgfailback again. As show:
Core was generated by `/sbin/multipathd -d -s'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0xa2eb4a20 in select_pgfailback (conf=conf@entry=0xf89d0dd0,
mp=mp@entry=0x88006be0) at propsel.c:199
199
Hi Martin,
Thanks for your careful review. In path_discover() and
declare_sysfs_get_str(),
NULL will not be dereferenced. I just check all return value that will cause
segfault. But you are right, the other invocations of udev_device_get_XYZ()
should be checked too.
Regards,
Lixiaokeng
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.
Signed-off-by:Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/configure.c| 4 +++-
amp->trnptid_list[j].
We change num_transport to num_transportids to combine them.
Signed-off-by: Zhiqiang Liu
Signed-off-by: lixiaokeng
---
mpathpersist/main.c | 64 ++---
1 file changed, 49 insertions(+), 15 deletions(-)
diff --git a/mpathpersist/ma
_null to ensure malloc returns non-null
pointer
mpathpersist: check whether malloc paramp->trnptid_list fails in
handle_args func
lixiaokeng (7):
multipathd: initialize major and minor in cli_add_map
libmultipath: change malloc to calloc in print_foreign_topology
libm
Hi Martin,
On 2020/9/18 15:37, Martin Wilck wrote:
> On Thu, 2020-09-17 at 21:26 -0500, Benjamin Marzinski wrote:
>> On Tue, Sep 15, 2020 at 12:38:27PM +0800, lixiaokeng wrote:
>>> Hi,
>>> The udev* function may return NULL,and it will be
>>> dereferenced
We check udev_device_get_syspath return value before
dereference it.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/foreign/nvme.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libmultipath/foreign/nvme.c b
We check return value of udev_device_get_devtype before
dereference it.
Signed-off-by:Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/foreign/nvme.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libmultipath/foreign/nvme.c
We check the return value of udev_device_get_devtype before
dereference it.
Signed-off-by:Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/configure.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libmultipath/configure.c
We check the return value of udev_device_get_sysname.
Signed-off-by:Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/discovery.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 4264b0da..27cb67f8
: https://github.com/openSUSE/multipath-tools
branch: upstream-queue
lixiaokeng (6):
libmultipath: check uedv* return value in sysfs_get_host_pci_name
libmultipath: check udev* return value in ccw_sysfs_pathinfo
libmultipath: check udev* return value in sysfs_get_tgt_nodename
libmultipath: check
udev_device_get_sysname may return NULL. We check the return value.
Signed-off-by:Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/discovery.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index
We check the return value of udev_device_get_parent and
udev_device_get_sysname.
Signed-off-by:lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/discovery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/discovery.c
On 2020/9/11 2:48, Martin Wilck wrote:
> On Thu, 2020-09-10 at 18:52 +0800, lixiaokeng wrote:
>> In handle_args func, we donot check whether malloc paramp and
>> each paramp->trnptid_list[j] fails before using them, it may
>> cause access NULL poi
In handle_args, the tmp isn't used. We delete it.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
mpathpersist/main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mpathpersist/main.c b/mpathpersist/main.c
index da67c15c..85453ac2 100644
amp->trnptid_list[j].
We change num_transport to num_transportids to combine them.
Signed-off-by: Zhiqiang Liu
Signed-off-by: lixiaokeng
---
mpathpersist/main.c | 65 ++---
1 file changed, 50 insertions(+), 15 deletions(-)
diff --git a/mpathpersist/ma
The return values of dm_get_map, disassemble_map in get_mpvec
were not checked. Use update_multipath_table/status to instead
of them. If these function fail, call remove_map
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmpathpersist/mpath_persist.c
In assemble_map func, f = STRDUP(mp->features) is just used
for APPEND(). We can directly pass mp->features to APPEND().
The mpp->features, hwhandler and selector got form strdup
should be check after select* function.
Signed-off-by: Zhiqiang Liu
Signed-off-by: Lixiaokeng
---
lib
In main func of kpartx.c, we should check return value of
malloc before using it. So we use xmalloc to instead of
malloc.
Signed-off-by: Zhiqiang Liu
Signed-off-by: Lixiaokeng
---
kpartx/kpartx.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff
In mpath_pr_event_handler_fn, we use MALLOC instead of malloc, and check
the return value of MALLOC. And we delete seting ret when jump to out
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
multipathd/main.c | 8
1 file changed, 4 insertions
In cli_getprkey func, we check the return value of malloc.
Signed-off-by: Zhiqiang Liu
Signed-off-by: Lixiaokeng
Signed-off-by: Linfeilong
---
multipathd/cli_handlers.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index e9698704
We chanege malloc to calloc.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/foreign.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/foreign.c b/libmultipath/foreign.c
index e8f61351..fce19347 100644
1 - 100 of 174 matches
Mail list logo