Search Linux Wireless

Re: [PATCH v4 1/2] devcoredump: remove the useless gfp_t parameter in dev_coredumpv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/2/2022 6:33 AM, Duoming Zhou wrote:
The dev_coredumpv() could not be used in atomic context, because
it calls kvasprintf_const() and kstrdup() with GFP_KERNEL parameter.
The process is shown below:

dev_coredumpv(..., gfp_t gfp)
   dev_coredumpm
     dev_set_name
       kobject_set_name_vargs
         kvasprintf_const(GFP_KERNEL, ...); //may sleep
           kstrdup(s, GFP_KERNEL); //may sleep

This patch removes gfp_t parameter of dev_coredumpv() and changes the
gfp_t parameter of dev_coredumpm() to GFP_KERNEL in order to show
dev_coredumpv() could not be used in atomic context.

shouldn't you remove the gfp parameter to dev_coredumpm() as well since it is actually within that function where dev_set_name() is called which cannot be done in atomic context?



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux