lkml.org 
[lkml]   [2017]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PM / devfreq: Fix potential NULL pointer dereference in governor_store

Quoting MyungJoo Ham <myungjoo.ham@samsung.com>:

>> df->governor is being dereferenced before it is null checked,
>> hence there is a potential null pointer dereference.
>>
>> Notice that df->governor is being null checked at line 1004:
>> if (df->governor) {, which implies it might be null.
>>
>> Fix this by null checking df->governor before dereferencing it.
>>
>> Addresses-Coverity-ID: 1401988 ("Dereference before null check")
>> Fixes: bcf23c79c4e4 ("PM / devfreq: Fix available_governor sysfs")
>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
>
> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
>

Thank you, MyungJoo

--
Gustavo A. R. Silva






\
 
 \ /
  Last update: 2017-12-08 00:57    [W:0.048 / U:23.128 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site