lkml.org 
[lkml]   [1998]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] loop.c, keyboard.c, trm290.c
The patch below does 3 things:

(i) Fixes a problem with loop.c. Kenn Humborg had added
a new file structure that is created `by hand' by copying
from an existing file structure, and when that is discarded
(after "losetup -d"), the following fput() does a put_write_access()
on an inode that did not hold any write_access, so that
inode->i_writecount goes negative, and subsequent r/w opens fail.
(A few minutes later they succeed again, when the inode has
disappeared from the inode cache.)
[Yes, the code is ugly - it should be rewritten entirely.]

(ii) Repeats a patch I sent a few days ago but that may
have been lost: trm290.c needs a small fix to compile.

(iii) Added a line in keyboard.c - my previous patch was
applied by hand, and I suppose Linus lost one line.

Andries



diff -r -u ../linux-2.1.115/linux/drivers/block/loop.c linux/drivers/block/loop.c
--- ../linux-2.1.115/linux/drivers/block/loop.c Tue Aug 4 20:51:47 1998
+++ linux/drivers/block/loop.c Fri Aug 7 23:56:34 1998
@@ -6,14 +6,13 @@
* Copyright 1993 by Theodore Ts'o. Redistribution of this file is
* permitted under the GNU Public License.
*
- * more DES encryption plus IDEA encryption by Nicholas J. Leon, June 20, 1996
* DES encryption plus some minor changes by Werner Almesberger, 30-MAY-1993
+ * more DES encryption plus IDEA encryption by Nicholas J. Leon, June 20, 1996
*
* Modularized and updated for 1.1.16 kernel - Mitch Dsouza 28th May 1994
- *
* Adapted for 1.3.59 kernel - Andries Brouwer, 1 Feb 1996
*
- * Fixed do_loop_request() re-entrancy - <Vincent.Renardias@waw.com> Mar 20, 1997
+ * Fixed do_loop_request() re-entrancy - Vincent.Renardias@waw.com Mar 20, 1997
*
* Handle sparse backing files correctly - Kenn Humborg, Jun 28, 1998
*/
@@ -427,7 +426,11 @@
lo->lo_backing_file->f_op = file->f_op;
lo->lo_backing_file->private_data = file->private_data;

- error = 0;
+ error = get_write_access(inode); /* cannot fail */
+ if (error) {
+ fput(lo->lo_backing_file);
+ lo->lo_backing_file = NULL;
+ }
}
}
if (error)
diff -r -u ../linux-2.1.115/linux/drivers/block/trm290.c linux/drivers/block/trm290.c
--- ../linux-2.1.115/linux/drivers/block/trm290.c Wed May 6 23:42:54 1998
+++ linux/drivers/block/trm290.c Wed Aug 5 22:01:04 1998
@@ -249,7 +249,7 @@
ide_setup_dma(hwif, (hwif->config_data + 4) ^ (hwif->channel ? 0x0080 : 0x0000), 3);
hwif->dmaproc = &trm290_dmaproc;
hwif->selectproc = &trm290_selectproc;
- hwif->no_autodma = 1; /* play it safe for now */
+ hwif->autodma = 0; /* play it safe for now */
#if 1
{
/*
diff -r -u ../linux-2.1.115/linux/drivers/char/keyboard.c linux/drivers/char/keyboard.c
--- ../linux-2.1.115/linux/drivers/char/keyboard.c Fri Aug 7 12:07:52 1998
+++ linux/drivers/char/keyboard.c Fri Aug 7 12:41:12 1998
@@ -11,8 +11,8 @@
* Diacriticals redone & other small changes, aeb@cwi.nl, June 1993
* Added decr/incr_console, dynamic keymaps, Unicode support,
* dynamic function/string keys, led setting, Sept 1994
- *
* `Sticky' modifier keys, 951006.
+ *
* 11-11-96: SAK should now work in the raw mode (Martin Mares)
*
* Modified to provide 'generic' keyboard support by Hamish Macdonald
@@ -590,6 +590,7 @@
if (ch == ' ' || ch == d)
return d;

+ put_queue(d);
return ch;
}

diff -r -u ../linux-2.1.115/linux/drivers/char/pc_keyb.c linux/drivers/char/pc_keyb.c
--- ../linux-2.1.115/linux/drivers/char/pc_keyb.c Fri Aug 7 12:07:52 1998
+++ linux/drivers/char/pc_keyb.c Fri Aug 7 20:48:54 1998
@@ -50,7 +50,7 @@
*/

/*
- * Some x86 BIOSes do not correctly initializes the keyboard, so the
+ * Some x86 BIOSes do not correctly initialize the keyboard, so the
* "kbd-reset" command line options can be given to force a reset.
* [Ranger]
*/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.039 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site