Re: [PATCH] Isimodem: Crash while setting SCA
Hi Denis, 2011/3/11 Denis Kenzior : >> diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c >> index 957b342..c90c06d 100644 >> --- a/drivers/isimodem/sms.c >> +++ b/drivers/isimodem/sms.c >> @@ -292,7 +292,7 @@ static void isi_sca_set(struct ofono_sms *sms, >> { &sd->params, sizeof(sd->params) }, >> }; >> >> - if (cbd == NULL || sd == NULL) >> + if (cbd == NULL || sd == NULL || sd->sim == NULL) > > The check for sd == NULL is too late since sd->params is being used up > above for initialization of iov... That's right. However, the only way for sd == NULL would be that core first called remove() and then sca_set(), which should not happen. So I think I will just remove that check. Cheers, Aki ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
Re: [PATCH] Isimodem: Crash while setting SCA
Hi Arun, On 03/11/2011 06:49 AM, ext-arun.1.ravind...@nokia.com wrote: > From: Arun Ravindran > > --- > drivers/isimodem/sms.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > I applied the patch, however... > diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c > index 957b342..c90c06d 100644 > --- a/drivers/isimodem/sms.c > +++ b/drivers/isimodem/sms.c > @@ -292,7 +292,7 @@ static void isi_sca_set(struct ofono_sms *sms, > { &sd->params, sizeof(sd->params) }, > }; > > - if (cbd == NULL || sd == NULL) > + if (cbd == NULL || sd == NULL || sd->sim == NULL) The check for sd == NULL is too late since sd->params is being used up above for initialization of iov... > goto error; > > bcd = sd->params.sca; Regards, -Denis ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono
[PATCH] Isimodem: Crash while setting SCA
From: Arun Ravindran --- drivers/isimodem/sms.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/isimodem/sms.c b/drivers/isimodem/sms.c index 957b342..c90c06d 100644 --- a/drivers/isimodem/sms.c +++ b/drivers/isimodem/sms.c @@ -292,7 +292,7 @@ static void isi_sca_set(struct ofono_sms *sms, { &sd->params, sizeof(sd->params) }, }; - if (cbd == NULL || sd == NULL) + if (cbd == NULL || sd == NULL || sd->sim == NULL) goto error; bcd = sd->params.sca; -- 1.7.0.4 ___ ofono mailing list ofono@ofono.org http://lists.ofono.org/listinfo/ofono