Messages in this thread | | | Date | Sun, 2 Jul 2000 12:01:28 -0700 (PDT) | From | Chris Lattner <> | Subject | Re: console_lock too early in printk??? |
| |
Whoops, my mistake... :) I understand that copy_from_user should be called effectively from outside of printk... but in my case, I was doign some quick debugging work, adding lots of printk's and adding copy from user's would have been "inconvenient". I appreciate that it's the right way to do things. I'll through together a new patch that should be more passable for everyone...
-Chris
On Sun, 2 Jul 2000, Chris Lattner wrote:
> > Assuming I'm operating on which platform? What if the platform has > copy_from_user defined as memcpy? > > -Chris > > > On Sun, 2 Jul 2000, Russell King wrote: > > > Chris Lattner writes: > > > Why are we grabbing the console lock so early? Is it really neccesary > > > there (I don't think so)? With lots of printk's, concurrancy is > > > needlessly killed (vsprintf can take a relatively long time...) > > > > Hint: do we care about the buffer that vsprintf is writing to? Do > > we care that the messages could get corrupted? What's the point in > > preventing two threads writing to the same memory space? > > > > Generally, calling printk with pointers to user-memory is not a good > > thing to do - think about why we have copy_from_user/get_user/ > > strncopy_from_user and friends. IMHO, you're calling printk in an > > illegal way, so it won't behave nicely to you. > > _____ > > |_____| ------------------------------------------------- ---+---+- > > | | Russell King rmk@arm.linux.org.uk --- --- > > | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / | > > | +-+-+ --- -+- > > / | THE developer of ARM Linux |+| /|\ > > / | | | --- | > > +-+-+ ------------------------------------------------- /\\\ | > > > >
- 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/
| |