Skip to contentSkip to conversation

Linux 2.6.16.28

DISCUSSION Applied Chuck Ebbert 4 participants 5 messages Aug 26, 2006 – Aug 27, 2006 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

In-Reply-To: <[email protected]>

Quoted 2 lines · Adrian Bunk

Location:
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/

Could you post the incremental patch as a reply like Greg does?

And are you going to apply Paul Fulghum's tty patch? Without it I get solid lockup on pppd disconnect about once a month.

Signature · 1 line
Chuck
Acked-by Alan Cox
#1 lore raw
Quoted 8 lines · Chuck Ebbert

In-Reply-To: <[email protected]>

Quoted 2 lines · Adrian Bunk

Location:
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/

Could you post the incremental patch as a reply like Greg does?

After Michaels reminder I've put it at ftp.kernel.org .

Quoted 2 lines

And are you going to apply Paul Fulghum's tty patch? Without it I get solid lockup on pppd disconnect about once a month.

I've still many patches (including parts of four 2.6.17 releases) to review and I wasn't yet there.

Paul, can you ACK that this patch is OK for 2.6.16?

Quoted 1 line

Chuck

cu
Adrian

Subject: tty serialize flush_to_ldisc

From: Paul Fulghum <[email protected]>

Serialize processing of tty buffers in flush_to_ldisc to fix (very rare) corruption of tty buffer free list on SMP systems.

---
 drivers/char/tty_io.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
drivers/char/tty_io.c +9 -5
@@ -2776,7 +2776,7 @@ static void flush_to_ldisc(void *private
 	struct tty_struct *tty = (struct tty_struct *) private_;
 	unsigned long 	flags;
 	struct tty_ldisc *disc;
-	struct tty_buffer *tbuf;
+	struct tty_buffer *tbuf, *head;
 	int count;
 	char *char_buf;
 	unsigned char *flag_buf;
@@ -2793,7 +2793,9 @@ static void flush_to_ldisc(void *private
 		goto out;
 	}
 	spin_lock_irqsave(&tty->buf.lock, flags);
-	while((tbuf = tty->buf.head) != NULL) {
+	head = tty->buf.head;
+	tty->buf.head = NULL;
+	while((tbuf = head) != NULL) {
 		while ((count = tbuf->commit - tbuf->read) != 0) {
 			char_buf = tbuf->char_buf_ptr + tbuf->read;
 			flag_buf = tbuf->flag_buf_ptr + tbuf->read;
@@ -2802,10 +2804,12 @@ static void flush_to_ldisc(void *private
 			disc->receive_buf(tty, char_buf, flag_buf, count);
 			spin_lock_irqsave(&tty->buf.lock, flags);
 		}
-		if (tbuf->active)
+		if (tbuf->active) {
+			tty->buf.head = head;
 			break;
-		tty->buf.head = tbuf->next;
-		if (tty->buf.head == NULL)
+		}
+		head = tbuf->next;
+		if (head == NULL)
 			tty->buf.tail = NULL;
 		tty_buffer_free(tty, tbuf);
 	}
#2 lore raw
Quoted 11 lines · Adrian Bunk
Quoted 8 lines · Chuck Ebbert

In-Reply-To: <[email protected]>

Quoted 2 lines · Adrian Bunk

Location:
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/

Could you post the incremental patch as a reply like Greg does?

After Michaels reminder I've put it at ftp.kernel.org .

Well, actually it would be good to have that incremental patch as a reply to the mail (like Greg does).
The reason I asked for the incremental patch is that I have to search the diff and decide if I have to apply that to my server kernel or not. If it was as reply, this would be much easier.

But anyway. Thanks for maintaining 2.6.16.x. I very much like to have a stable series kernel for my server.

Signature · 1 line
Greetings Michael.
#3 lore raw
In reply to Adrian Bunk
Quoted 2 lines · Adrian Bunk

Paul, can you ACK that this patch is OK for 2.6.16?
Subject: tty serialize flush_to_ldisc

Yes, it is OK for 2.6.16.

Thanks,
Paul

Applied
#4 lore raw
Quoted 5 lines · Paul Fulghum
Quoted 2 lines · Adrian Bunk

Paul, can you ACK that this patch is OK for 2.6.16?
Subject: tty serialize flush_to_ldisc

Yes, it is OK for 2.6.16.

Thanks, applied.

Quoted 2 lines

Thanks,
Paul

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed