> -----Original Message----- > From: Bart Van Assche [mailto:Bart.VanAssche@xxxxxxx] > Sent: Thursday, December 21, 2017 9:54 AM > To: jejb@xxxxxxxxxxxxxxxxxx; Raghava Aditya Renukunta > <RaghavaAditya.Renukunta@xxxxxxxxxxxxx>; linux-scsi@xxxxxxxxxxxxxxx; > martin.petersen@xxxxxxxxxx > Cc: dl-esc-Aacraid Linux Driver <aacraid@xxxxxxxxxxxxx>; > gpiccoli@xxxxxxxxxxxxxxxxxx; Tom White <tom.white@xxxxxxxxxxxxx>; > Scott Benesh <scott.benesh@xxxxxxxxxxxxx> > Subject: Re: [PATCH 01/29] scsi: aacraid: Fix udev inquiry race condition > > EXTERNAL EMAIL > > > On Thu, 2017-12-21 at 09:33 -0800, Raghava Aditya Renukunta wrote: > > + char *cp; > > + char *cname = kmalloc(sizeof(sup_adap_info- > >adapter_type_text), > > + GFP_ATOMIC); > > Why did you choose to use GFP_ATOMIC instead of GFP_KERNEL in the > above > kmalloc() call? It was mainly because of a trace call that cut thru the kmalloc call. > > + > > + if (!cname) > > + return; > > + > > + cp = cname; > > + memcpy(cname, sup_adap_info->adapter_type_text, > > + sizeof(sup_adap_info->adapter_type_text)); > > Is the sup_adap_info->adapter_type_text a string that is \0-terminated? If > so, > have you considered to use kmemdup() instead of kmalloc() + memcpy()? I will take that into consideration Bart. Thank you Raghava Aditya > Thanks, > > Bart.