← Back to team overview

ac100 team mailing list archive

Fwd: hello, please help me check this potential bug, thanks.

 

Hi guys,

I was looking at my old mails, and I found this, which hasn't been fixed.
I guess the migration to DT should make this useless though.

----- Mail transféré -----
De: "Huqiu Liu" <liuhq11@xxxxxxxxxxxxxxxxxxxxx>
À: phhusson@xxxxxxx
Cc: yinj2010@xxxxxxxxx
Envoyé: Lundi 30 Décembre 2013 07:52:50
Objet: hello, please help me check this potential bug, thanks.

Dear Pierre-Hugues Husson, 

I'm very sorry to trouble you. Recently I checked lots of drivers and found the following potential bugs: 

1) In the file drivers\staging\nvec\nvec.c , the function clk_prepare_enable is called by the function tegra_nvec_probe . While the function tegra_nvec_remove does not call the function clk_disable_unprepare to release the acquired resources when removing the device. Generelly the function clk_disable_unprepare and clk_prepare_enable should be used in pairs, and more than 105 drivers have called the function clk_disable_unprepare to release the resources which are acquired by the function clk_prepare_enable . 

2) In the file drivers\staging\nvec\nvec_kbd.c , the function input_allocate_device is called by the function nvec_kbd_probe . While the function nvec_kbd_remove does not call the function input_free_device to release the acquired resources when removing the device. Generelly the function input_free_device and input_allocate_device should be used in pairs, and more than 109 drivers have called the function input_free_device to release the resources which are acquired by the function input_allocate_device . 

The acqured resources are ignored to be released when removing the device, which would cause memory leaks and other potential problems. Could you help me to check or confirm these bugs please? Thank you very much. I'm looking forward to your reply. 

With best regards, 
sincerely yours, 
Huqiu Liu 
----------------------------------------------------------- 
Huqiu Liu 
Department of Computer Science and Technology, Tsinghua University 
Mobile: +86 134 8871 8103 
E-mail: liuhq11@xxxxxxxxxxxxxxxxxxxxx 
Address: Room 1-406, West Main, Tsinghua University, Haidian District, Beijing, 100084, China.