Files
mirror_zfs/module/zfs
Richard Yao a36b37d4de Fix potential NULL pointer dereference in dsl_dataset_promote_check()
If the `list_head()` returns NULL, we dereference it, right before we
check to see if it returned NULL.

We have defined two different pointers that both point to the same
thing, which are `origin_head` and `origin_ds`. Almost everything uses
`origin_ds`, so we switch them to use `origin_ds`.

We also promote `origin_ds` to a const pointer so that the compiler
verifies that nothing modifies it.

Coverity complained about this.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Neal Gompa <ngompa@datto.com>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13967
2022-09-30 16:59:51 -07:00
..
2022-03-15 15:13:42 -07:00
2022-03-15 15:13:42 -07:00
2022-09-27 16:47:24 -07:00
2022-09-30 15:34:39 -07:00
2022-03-15 15:13:42 -07:00
2022-03-15 15:13:42 -07:00
2022-01-07 10:36:49 -08:00
2022-01-12 16:14:36 -08:00
2019-06-19 09:48:12 -07:00
2022-09-30 15:34:39 -07:00
2022-03-15 15:13:42 -07:00
2022-09-30 15:34:39 -07:00
2022-09-02 13:31:19 -07:00
2022-06-29 14:08:59 -07:00
2022-09-29 09:02:57 -07:00
2022-09-16 13:36:47 -07:00