lkml.org 
[lkml]   [1997]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: Message while writing to /dev/lp0 in 2.1.41
    On Thu, 29 May 1997 tenthumbs@cybernex.net wrote:

    > If I say "cat foo.txt >/dev/lp0" I get the message "kfree_s: Bad obj 00000000"
    > from the kernel. This is a 2.1.41 kernel with lp and parport built as modules.
    > This doesn't seem to cause any problems, however.

    Yes, this needs to go into 2.1.42 (but it isn't in the pre-patch):

    --- linux/drivers/char/lp.c~ Thu May 29 01:08:48 1997
    +++ linux/drivers/char/lp.c Thu May 29 01:08:49 1997
    @@ -501,9 +501,8 @@
    static int lp_release(struct inode * inode, struct file * file)
    {
    unsigned int minor = MINOR(inode->i_rdev);
    - unsigned int irq;

    - if ((irq = LP_IRQ(minor))) {
    + if (LP_IRQ(minor) > 0) {
    kfree_s(lp_table[minor].lp_buffer, LP_BUFFER_SIZE);
    lp_table[minor].lp_buffer = NULL;
    }
    @@ -707,7 +706,7 @@
    lp_table[count].flags |= LP_EXIST;
    printk(KERN_INFO "lp%d: using %s at 0x%x, ",
    count, pb->name, pb->base);
    - if (pb->irq == -1)
    + if (pb->irq == PARPORT_IRQ_NONE)
    printk("polling.\n");
    else
    printk("irq %d.\n", pb->irq);

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