From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] Query locked pins after reset pin
Date: Thu, 12 Sep 2013 08:51:47 -0500 [thread overview]
Message-ID: <5231C6F3.5090403@gmail.com> (raw)
In-Reply-To: <DA62CA5DDF4CA640AA25B1684E5D141101D861A1@SHSMSX102.ccr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1718 bytes --]
Hi Caiwen,
>>> +
>>> + if (sim->driver->query_locked)
>>> + sim->driver->query_locked(sim, type, sim_query_locked_cb, req);
>>
>> The oFono driver calling semantics do not allow for a cleanup handler.
>> So if the modem hardware crashes or is removed in the time between you
>> submit the request to the driver and the driver returns with the result, you will
>> incur a memory leak.
>>
> In any case, the callback (sim_query_locked_cb) will be invoked. If only the callback is called,
> "req" will be freed. If I am wrong, please correct me.
Please re-read my comment above. The callback is not guaranteed to be
always called. If the atom is removed for any reason between the time
the driver request is submitted and the callback is called, you have a
memory leak. For example, if the modem resets itself or crashes or the
SIM is removed.
>>
>> Why do you need this in the first place. Are you suggesting that by unblocking
>> the SIM PIN it somehow has the side-effect of also resetting the SIM lock
>> status?
>>
> It is true for IMC modem. After reset SIM PIN, the SIM PIN locking is changed. I doubt this is an issue of
> IMC modem. Following is the log:
>
>> AT+CLCK="SC",2
> < \r\n+CLCK: 0\r\n
> < \r\nOK\r\n
>
>> AT+CLCK="SC",1,"1111"
> < \r\nERROR\r\n
>
>> AT+CMEE=1
> < \r\nOK\r\n
>
>> AT+CLCK="SC",1,"1111"
> < \r\n+CME ERROR: 16\r\n
>
>> AT+CLCK="SC",1,"1111"
> < \r\n+CME ERROR: 12\r\n
>
>> AT+CPIN="13570794","1234"
> < \r\nOK\r\n
>
>> AT+CLCK="SC",2
> < \r\n+CLCK: 1\r\n
> < \r\nOK\r\n
>
> To be safe, query SIM PIN locked information after reset sim pin.
Fair enough. Please fix the other comments in my review.
Regards,
-Denis
prev parent reply other threads:[~2013-09-12 13:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 19:13 [PATCH] Query locked pins after reset pin caiwen.zhang
2013-09-11 18:22 ` Denis Kenzior
2013-09-12 7:31 ` Zhang, Caiwen
2013-09-12 13:51 ` Denis Kenzior [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5231C6F3.5090403@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.