On 9/20/2016 7:36 PM, Stephen Hemminger wrote:
> On Tue, 20 Sep 2016 21:16:37 +0300
> Vladyslav Buslov <vladyslav.buslov at harmonicinc.com> wrote:
> 
>> @@ -123,6 +125,9 @@ static int __net_init kni_init_net(struct net *net)
>>      /* Clear the bit of device in use */
>>      clear_bit(KNI_DEV_IN_USE_BIT_NUM, &knet->device_in_use);
>>  
>> +    mutex_init(&knet->kni_kthread_lock);
>> +    knet->kni_kthread = NULL;
>> +
> 
> Why not just use kzalloc() here? You would still need to init the mutex
> etc, but it would be safer.
> 

Hi Vladyslav,

This is good suggestion, if you send a new version for this update,
please keep my Ack.

Thanks,
ferruh

Reply via email to