Skip to contentSkip to conversation

Is there a bug in dgnc.ko?

DISCUSSION Navy Cheng 4 participants 8 messages Feb 24, 2016 – Feb 25, 2016

lore
Share & tools
lore

Navy Cheng

author
#0 lore raw

Hi,

My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this:

sudo insmod ./dgnc.ko
sudo lsmod | grep dgnc
sudo rmmod ./dgnc
sudo insmod ./dgnc.ko

After I re-insmod the dgnc module, my laptop is breakdown.

My OS is debian 8.0. Is there a bug in dgnc.ko or something wrong with my OS or kernel. If there is a bug, How can I find it?

Thanks.

#1 lore raw
Quoted 6 lines · Navy Cheng

Hi,

My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this:

sudo insmod ./dgnc.ko

What output, if any, did this generate?

Quoted 1 line

sudo lsmod | grep dgnc

Again, what messages?

Quoted 1 line

sudo rmmod ./dgnc

Again, what happened?

Quoted 1 line

sudo insmod ./dgnc.ko

And here?

Quoted 1 line

After I re-insmod the dgnc module, my laptop is breakdown.

What does "breakdown" mean? Did it hang entirely? Did you get a message in your dmesg output and/or on the console? Other?

Quoted 2 lines

My OS is debian 8.0. Is there a bug in dgnc.ko or something wrong with my OS or kernel. If there is a bug, How can I find it?

Start by providing enough info to see if there's a bug.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160224/28ca56d2/attachment.bin

author
#2 lore raw
Quoted 9 lines · Valdis.Kletnieks at vt.edu
Quoted 6 lines · Navy Cheng

Hi,

My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this:

sudo insmod ./dgnc.ko

What output, if any, did this generate?

No output. I use *dmesg* to find more information:

[  572.915977] dgnc: module is from the staging directory, the quality is
   	       unknown, you have been warned.
Quoted 3 lines
Quoted 1 line

sudo lsmod | grep dgnc

Again, what messages?

Output:
dgnc 65536 0

Quoted 3 lines
Quoted 1 line

sudo rmmod ./dgnc

Again, what happened?

No output. After *dmesg*, no more info in the ring buffer.

Quoted 3 lines
Quoted 1 line

sudo insmod ./dgnc.ko

And here?

No output.

Quoted 4 lines
Quoted 1 line

After I re-insmod the dgnc module, my laptop is breakdown.

What does "breakdown" mean? Did it hang entirely? Did you get a message in your dmesg output and/or on the console? Other?

The GUI stop work and any key in my laptop is not work. The *Caps Lock lamp* in the keyboard is flashing.

Quoted 11 lines
Quoted 2 lines

My OS is debian 8.0. Is there a bug in dgnc.ko or something wrong with my OS or kernel. If there is a bug, How can I find it?

Start by providing enough info to see if there's a bug.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

#3 lore raw
In reply to Navy Cheng
Quoted 6 lines · Navy Cheng

Hi,

My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this:

sudo insmod ./dgnc.ko

Do you have the hardware that this driver controls?

Quoted 1 line

sudo lsmod | grep dgnc

Does that show anything?

Quoted 4 lines

sudo rmmod ./dgnc
sudo insmod ./dgnc.ko

After I re-insmod the dgnc module, my laptop is breakdown.

Then there's a bug to fix in the driver, it must not clean up everything properly. Based on a quick read of it, there is lots of things that need to be fixed in it, that's why it is in staging. If you are interested, I would suggest fixing this issue would be a great start.

good luck!

greg k-h

author
#4 lore raw
Quoted 9 lines · Greg KH
Quoted 6 lines · Navy Cheng

Hi,

My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this:

sudo insmod ./dgnc.ko

Do you have the hardware that this driver controls?

I'm not sure. My laptop is Dell Inspiron 14R - 5437 and I don't know if there is the right hardware. I often don't know about what a driver is used for in drivers/staging/. Is there any good way to know the function of a driver or module?

Quoted 4 lines
Quoted 2 lines

sudo lsmod | grep dgnc

Does that show anything?

Output: dgnc 65536 0

Quoted 9 lines
Quoted 4 lines

sudo rmmod ./dgnc
sudo insmod ./dgnc.ko

After I re-insmod the dgnc module, my laptop is breakdown.

Then there's a bug to fix in the driver, it must not clean up everything properly. Based on a quick read of it, there is lots of things that need to be fixed in it, that's why it is in staging. If you are interested, I would suggest fixing this issue would be a great start.

I'm very glad to get your advice to fix this issue. As a kernelnewbies, I have sent two patches about code cleaning to you, and they are merged to the kernel tree. I realy interested to fix this bug to improve my understanding of the kerenl.

Thank you.

#5 lore raw
Quoted 17 lines · Navy Cheng
Quoted 9 lines · Greg KH
Quoted 6 lines · Navy Cheng

Hi,

My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this:

sudo insmod ./dgnc.ko

Do you have the hardware that this driver controls?

I'm not sure. My laptop is Dell Inspiron 14R - 5437 and I don't know if there is the right hardware. I often don't know about what a driver is used for in drivers/staging/. Is there any good way to know the function of a driver or module?

Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

sudo lsmod | grep dgnc

Does that show anything?

Output: dgnc 65536 0

Quoted 1 line
Quoted 1 line

sudo rmmod ./dgnc

what did dmesg showed after you did rmmod?

regards
sudip

author
#6 lore raw
Quoted 20 lines · Sudip Mukherjee
Quoted 19 lines · Navy Cheng
Quoted 9 lines · Greg KH
Quoted 6 lines · Navy Cheng

Hi,

My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this:

sudo insmod ./dgnc.ko

Do you have the hardware that this driver controls?

I'm not sure. My laptop is Dell Inspiron 14R - 5437 and I don't know if there is the right hardware. I often don't know about what a driver is used for in drivers/staging/. Is there any good way to know the function of a driver or module?

Quoted 3 lines
Quoted 2 lines

sudo lsmod | grep dgnc

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Does that show anything?

Output: dgnc 65536 0

Quoted 1 line
Quoted 1 line

sudo rmmod ./dgnc

what did dmesg showed after you did rmmod?

*dmesg* show nothing after I rmmod dgnc. I guess something wrong with dgnc_cleanup_module() which is called when dgnc is removed.

#7 lore raw
In reply to Navy Cheng
Quoted 7 lines · Navy Cheng
Quoted 6 lines · Greg KH
Quoted 5 lines · Navy Cheng

Hi,

My kernel version is v4.4, and I have built drivers/staging/dgnc/dgnc.ko. I change to *dir*/drivers/staging/dgnc and do like this:

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

sudo insmod ./dgnc.ko

Do you have the hardware that this driver controls?

I'm not sure. My laptop is Dell Inspiron 14R - 5437 and I don't know if there is the right hardware. I often don't know about what a driver is used for in drivers/staging/. Is there any good way to know the function of a driver or module?

If you don't think you have the hardware, then almost always, you don't have the hardware, it's pretty simple :)

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

sudo lsmod | grep dgnc

Does that show anything?

Output: dgnc 65536 0

Great, it loaded, then crashes when you unload, congratulations, you can now work on fixing that bug!

good luck,

greg k-h