+ jffs2-remove-wait-queue-after-schedule.patch added to -mm tree

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

 



Subject: + jffs2-remove-wait-queue-after-schedule.patch added to -mm tree
To: lizefan@xxxxxxxxxx,dwmw2@xxxxxxxxxxxxx,stable@xxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Tue, 11 Feb 2014 15:56:28 -0800


The patch titled
     Subject: jffs2: remove wait queue after schedule()
has been added to the -mm tree.  Its filename is
     jffs2-remove-wait-queue-after-schedule.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/jffs2-remove-wait-queue-after-schedule.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/jffs2-remove-wait-queue-after-schedule.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: Li Zefan <lizefan@xxxxxxxxxx>
Subject: jffs2: remove wait queue after schedule()

@wait is a local variable, so if we don't remove it from the wait queue
list, later wake_up() may end up accessing invalid memory.

This was spotted by eyes.

Signed-off-by: Li Zefan <lizefan@xxxxxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/jffs2/nodemgmt.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN fs/jffs2/nodemgmt.c~jffs2-remove-wait-queue-after-schedule fs/jffs2/nodemgmt.c
--- a/fs/jffs2/nodemgmt.c~jffs2-remove-wait-queue-after-schedule
+++ a/fs/jffs2/nodemgmt.c
@@ -179,6 +179,7 @@ int jffs2_reserve_space(struct jffs2_sb_
 					spin_unlock(&c->erase_completion_lock);
 
 					schedule();
+					remove_wait_queue(&c->erase_wait, &wait);
 				} else
 					spin_unlock(&c->erase_completion_lock);
 			} else if (ret)
_

Patches currently in -mm which might be from lizefan@xxxxxxxxxx are

jffs2-fix-unbalanced-locking.patch
jffs2-avoid-soft-lockup-in-jffs2_reserve_space_gc.patch
jffs2-avoid-soft-lockup-in-jffs2_reserve_space_gc-fix.patch
jffs2-remove-wait-queue-after-schedule.patch
linux-next.patch

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




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]