+ parport-fix-interruptible_sleep_on-race.patch added to -mm tree

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

 



Subject: + parport-fix-interruptible_sleep_on-race.patch added to -mm tree
To: arnd@xxxxxxxx,gregkh@xxxxxxxxxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Wed, 26 Feb 2014 16:26:34 -0800


The patch titled
     Subject: parport: fix interruptible_sleep_on() race
has been added to the -mm tree.  Its filename is
     parport-fix-interruptible_sleep_on-race.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/parport-fix-interruptible_sleep_on-race.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/parport-fix-interruptible_sleep_on-race.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: Arnd Bergmann <arnd@xxxxxxxx>
Subject: parport: fix interruptible_sleep_on() race

interruptible_sleep_on() can still lead to the deadlock mentioned in the
comment above the caller, and we want to remove it soon, so replace it now
with the race-free wait_event_interruptible.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/parport/share.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN drivers/parport/share.c~parport-fix-interruptible_sleep_on-race drivers/parport/share.c
--- a/drivers/parport/share.c~parport-fix-interruptible_sleep_on-race
+++ a/drivers/parport/share.c
@@ -905,7 +905,8 @@ int parport_claim_or_block(struct pardev
 		/* If dev->waiting is clear now, an interrupt
 		   gave us the port and we would deadlock if we slept.  */
 		if (dev->waiting) {
-			interruptible_sleep_on (&dev->wait_q);
+			wait_event_interruptible(dev->wait_q,
+						 !dev->waiting);
 			if (signal_pending (current)) {
 				return -EINTR;
 			}
_

Patches currently in -mm which might be from arnd@xxxxxxxx are

kconfig-rename-has_ioport-to-has_ioport_map.patch
parport-fix-interruptible_sleep_on-race.patch
linux-next.patch
asm-systemh-clean-asm-systemh-from-docs.patch
asm-systemh-um-arch_align_stack-moved-to-asm-exech.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