+ kernel-async-fixed-the-wrong-waitting-condition-of-wait_event.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: kernel/async.c: fix wrong waiting condition of wait_event
has been added to the -mm tree.  Its filename is
     kernel-async-fixed-the-wrong-waitting-condition-of-wait_event.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/kernel-async-fixed-the-wrong-waitting-condition-of-wait_event.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/kernel-async-fixed-the-wrong-waitting-condition-of-wait_event.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yonghui Yang <mark.yang@xxxxxxxxxxxxxx>
Subject: kernel/async.c: fix wrong waiting condition of wait_event

Change the waitting condition of wait_event in
async_synchronize_cookie_domain().

This function waits until all asynchronous function calls for the certain
domain have been done.

But, lowest_in_progress() returns the lowest *pending* entry's cookie.

So we should make sure that the return value of lowest_in_progress(domain)
must be larger than @cookie.

Signed-off-by: Yonghui Yang <mark.yang@xxxxxxxxxxxxxx>
Signed-off-by: Geng Ren <geng.ren@xxxxxxxxxxxxxx>
Signed-off-by: Chunyan Zhang <chunyan.zhang@xxxxxxxxxxxxxx>
Tested-by: Wei Qiao <wei.qiao@xxxxxxxxxxxxxx>
Cc: Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 kernel/async.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN kernel/async.c~kernel-async-fixed-the-wrong-waitting-condition-of-wait_event kernel/async.c
--- a/kernel/async.c~kernel-async-fixed-the-wrong-waitting-condition-of-wait_event
+++ a/kernel/async.c
@@ -267,7 +267,7 @@ EXPORT_SYMBOL_GPL(async_unregister_domai
  */
 void async_synchronize_full_domain(struct async_domain *domain)
 {
-	async_synchronize_cookie_domain(ASYNC_COOKIE_MAX, domain);
+	async_synchronize_cookie_domain(ASYNC_COOKIE_MAX-1, domain);
 }
 EXPORT_SYMBOL_GPL(async_synchronize_full_domain);
 
@@ -289,7 +289,7 @@ void async_synchronize_cookie_domain(asy
 		starttime = ktime_get();
 	}
 
-	wait_event(async_done, lowest_in_progress(domain) >= cookie);
+	wait_event(async_done, lowest_in_progress(domain) > cookie);
 
 	if (initcall_debug && system_state == SYSTEM_BOOTING) {
 		endtime = ktime_get();
_

Patches currently in -mm which might be from mark.yang@xxxxxxxxxxxxxx are

kernel-async-fixed-the-wrong-waitting-condition-of-wait_event.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux