lkml.org 
[lkml]   [2018]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] staging: mt29f_spinand: fix memory leak while programming pages
<div dir="ltr"><div class="gmail_default" style="font-family:pmingliu,serif;font-size:small">Dear   <div class="gmail_default" style="display:inline"></div><span style="font-family:Arial,Helvetica,sans-serif">Dan Carpenter,</span></div><div class="gmail_default" style="font-family:pmingliu,serif;font-size:small"><br></div><div class="gmail_default" style="font-family:pmingliu,serif;font-size:small">I know what   you wrote,   but   before   device   is   removed   and   freed   memory   automatically,   programming   pages may   do   many   many   times.<br></div><div class="gmail_default" style="font-family:pmingliu,serif;font-size:small">Assume   we   erase and rewrite a  large  part  of  the   flash,   then  spinand_program_page()   might exhaust   memory if memory is not large enough.</div><div class="gmail_default" style="font-family:pmingliu,serif;font-size:small">In   fact,   OOM   indeed occured  when   I   tested  programming   multi-pages by mtd_debug tool.</div><div class="gmail_default" style="font-family:pmingliu,serif;font-size:small">If   OOM   was not   caused   by   devm_kzalloc() in spinand_program_page(),   what   may   exhaust   memory?</div><div class="gmail_default" style="font-family:pmingliu,serif;font-size:small"><br></div><div><div dir="ltr" class="gmail-m_4442957079003056132m_-5206476855841698597gmail_signature"><div dir="ltr"><font color="#351c75"><b>Best Regards,</b></font><div><b>─────────────────────────</b></div><div><b><font color="#274e13">Jheng-Jhong Wu (Victor Wu)</font></b></div><div><b><font color="#666666">E-mail: </font><a href="mailto:goodwater.wu@gmail.com" target="_blank">goodwater.wu@gmail.com</a></b></div><div><b>─────────────────────────</b><br></div></div></div></div><br><br><div class="gmail_quote"><div dir="ltr"><div class="gmail_default" style="font-family:pmingliu,serif;font-size:small;display:inline"></div>Dan Carpenter &lt;<a href="mailto:dan.carpenter@oracle.com" target="_blank">dan.carpenter@oracle.com</a>&gt; 於 2018年8月1日 週三 下午7:45寫道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">devm_ resources are freed automatically when the device is removed.<br>
The name devm_ stands for &quot;device&quot; and &quot;managed&quot;.<br>
<br>
regards,<br>
dan carpenter<br>
<br>
</blockquote></div></div>
\
 
 \ /
  Last update: 2018-08-02 04:09    [W:0.104 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site