public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
	jasowang@redhat.com, Stable <stable@vger.kernel.org>
Subject: Re: [PATCH 1/2] Drivers: hv: balloon: Fix a bug in the hot-add code
Date: Fri, 12 Jul 2013 21:17:03 +0100	[thread overview]
Message-ID: <20130712201703.GB7729@decadent.org.uk> (raw)
In-Reply-To: <1373637375-25936-1-git-send-email-kys@microsoft.com>

On Fri, Jul 12, 2013 at 06:56:14AM -0700, K. Y. Srinivasan wrote:
> As we hot-add 128 MB chunks of memory, we wait to ensure that the memory
> is onlined before attempting to hot-add the next chunk. If the udev rule for
> memory hot-add is not executed within the allowed time, we would rollback the
> state and abort further hot-add. Since the hot-add has succeeded and the only
> failure is that the memory is not onlined within the allowed time, we should not
> be rolling back the state. Fix this bug.
[...]
>  		/*
>  		 * Wait for the memory block to be onlined.
>  		 */
> -		t = wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ);
> -		if (t == 0) {
> -			pr_info("hot_add memory timedout\n");
> -			has->ha_end_pfn -= HA_CHUNK;
> -			has->covered_end_pfn -=  processed_pfn;
> -			break;
> -		}
> +		wait_for_completion_timeout(&dm_device.ol_waitevent, 5*HZ);
>  
>  	}
>  

Well now it might look like a bug that you don't test the result
of wait_for_completion_timeout().  Maybe update the comment to
explain why it's OK to continue anyway?

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert Camus

  parent reply	other threads:[~2013-07-12 20:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1373637292-25855-1-git-send-email-kys@microsoft.com>
2013-07-12 13:56 ` [PATCH 1/2] Drivers: hv: balloon: Fix a bug in the hot-add code K. Y. Srinivasan
2013-07-12 13:56   ` [PATCH 2/2] Drivers: hv: balloon: Do not post pressure status if interrupted K. Y. Srinivasan
2013-07-12 20:17   ` Ben Hutchings [this message]
2013-07-12 21:07     ` [PATCH 1/2] Drivers: hv: balloon: Fix a bug in the hot-add code KY Srinivasan
2013-07-12 21:12       ` Ben Hutchings
2013-07-14  2:03         ` KY Srinivasan

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=20130712201703.GB7729@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=stable@vger.kernel.org \
    /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