Re: bug in fbmem.c,

Pavel Machek (pavel@atrey.karlin.mff.cuni.cz)
Tue, 22 Jun 1999 13:02:11 +0200


Hi!

> I'v traced a little bug in the fbmem code. i don't know if it's the right
> way to
> correct it, but on my SX164 alpha this seems to work.
>
> before the patch: cat /dev/fb0 > foo end with an execption.
> after the patch: cat /dev/fb0 > foo ; cat foo > /dev/fb0 work.

Can you try to
h = open (/dev/fb0, )
read(h, 0, 256)
? Yes, I want you to read into null. I suspect you need something like
memcpy_fromio_to_user() which does not actually exist :-).

> There are others problems with the fbdriver on alpha:
> mmapping the /dev/fb0 and writing to it give me a *RANDOM* 'PYXIS machine
> check NOT expected'
> with no effect on the screen.
> Maybe someone have an idea?

> - if (copy_to_user(buf, base_addr+p, copy_size))
> - return -EFAULT;
> + memcpy_fromio(buf, base_addr+p, copy_size);

This is likely not right.

-- 
The best software in life is free (not shareware)!		Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

- 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.tux.org/lkml/