Re: How to solve module collision

2013-02-16 Thread richard -rw- weinberger
On Sat, Feb 16, 2013 at 4:56 AM, Jimmy Pan dsp...@gmail.com wrote: Hi, I would like to write a driver for my usb mouse. It functions normally with kernel driver, nonetheless, I want to study usb system. When the kernel executes the probe function, what would happen if there exists two

Re: process 0 (swapper)

2013-02-16 Thread Kevin Wilson
Hi, we see this code in proc_pid_lookup: tgid = name_to_int(dentry); if (tgid == ~0U) goto out; In other words, if you ask for pid 0, it bails and doesn't return anything. Are you sure that this is what it cjecks? ~0U is not 0 but -1; for example, try:

Re: process 0 (swapper)

2013-02-16 Thread anish kumar
On Sat, 2013-02-16 at 18:48 +0200, Kevin Wilson wrote: Hi, we see this code in proc_pid_lookup: tgid = name_to_int(dentry); if (tgid == ~0U) goto out; It is the error case when name can't be converted to integer i.e. name is wrong. In other words,

Re: process 0 (swapper)

2013-02-16 Thread Valdis . Kletnieks
On Sat, 16 Feb 2013 18:48:52 +0200, Kevin Wilson said: ~0U is not 0 but -1; -ENOCAFFEINE. You'd think that after having done kernel-level C programming since the days of SunOS 3.1.5 and BSD 4.2 I'd k know better. ;) pgpBxhyWvlc2R.pgp Description: PGP signature

Re: spinlock deadlock

2013-02-16 Thread Mulyadi Santosa
On Fri, Feb 15, 2013 at 3:52 PM, buyitian bu...@live.cn wrote: is it possible that printk cause deadlock? the path is as below: 1. taskA runs on CPU0, and run schedule to acqire the rq-lock. 2. taskA calls printk while holding rq-lock. I began to get rusty on this...but, why do you grab run