[dm-devel] [PATCH 1/2] multipath-tools: check for initialized checker before

Christophe Varoqui christophe.varoqui at opensvc.com
Tue Aug 16 07:39:10 UTC 2016


Applied.
Thanks.

On Mon, Aug 15, 2016 at 7:13 PM, Mike Christie <mchristi at redhat.com> wrote:

> This fixes a regression added with:
> 015f87b16a7797a17afd514aec46e65c2a1a2f73
>
> We can hit a race where when pathinfo is setting up a path, the path
> could have gone down already. In the DI_CHECKER chunk we then do not run
> get_state and attach a checker. Later when check_path is run
> path_offline could still return PATH_DOWN or PATH_REMOVED and
> get_state is again not run so we do not get to attach a checker. I
> was then running repair_path since the state was PATH_DOWN, and we then
> hit a segfault.
>
> This has us test if a checker is selected before running repair.
>
> Signed-off-by: Mike Christie <mchristi at redhat.com>
> ---
>  libmultipath/checkers.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
> index 8976c89..fd999b0 100644
> --- a/libmultipath/checkers.c
> +++ b/libmultipath/checkers.c
> @@ -213,7 +213,7 @@ void checker_put (struct checker * dst)
>
>  void checker_repair (struct checker * c)
>  {
> -       if (!c)
> +       if (!c || !checker_selected(c))
>                 return;
>
>         c->message[0] = '\0';
> --
> 2.7.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20160816/3f53f309/attachment.htm>


More information about the dm-devel mailing list