RE: [PATCH] firmware loader: Fix the concurrent request_firmware() race for kref_get/put

2012-11-09 Thread Liu, Chuansheng
> $./scripts/checkpatch.pl > ERROR: space required before the open parenthesis '(' > #97: FILE: drivers/base/firmware_class.c:267: > + if(!kref_put(>ref, __fw_free_buf)) > > > > + spin_unlock(>lock); > > } > > > > /* direct firmware loading support */ > > After fixing the

Re: [PATCH] firmware loader: Fix the concurrent request_firmware() race for kref_get/put

2012-11-09 Thread Ming Lei
On Fri, Nov 9, 2012 at 8:28 PM, Chuansheng Liu wrote: > > There is one race that both request_firmware() with the same > firmware name. > > The race scenerio is as below: > CPU1 CPU2 > request_firmware() --> > _request_firmware_load() return err

Re: [PATCH] firmware loader: Fix the concurrent request_firmware() race for kref_get/put

2012-11-09 Thread Ming Lei
On Fri, Nov 9, 2012 at 8:28 PM, Chuansheng Liu chuansheng@intel.com wrote: There is one race that both request_firmware() with the same firmware name. The race scenerio is as below: CPU1 CPU2 request_firmware() --

RE: [PATCH] firmware loader: Fix the concurrent request_firmware() race for kref_get/put

2012-11-09 Thread Liu, Chuansheng
$./scripts/checkpatch.pl ERROR: space required before the open parenthesis '(' #97: FILE: drivers/base/firmware_class.c:267: + if(!kref_put(buf-ref, __fw_free_buf)) + spin_unlock(fwc-lock); } /* direct firmware loading support */ After fixing the patch style

[PATCH] firmware loader: Fix the concurrent request_firmware() race for kref_get/put

2012-11-08 Thread Chuansheng Liu
There is one race that both request_firmware() with the same firmware name. The race scenerio is as below: CPU1 CPU2 request_firmware() --> _request_firmware_load() return err another request_firmware() is coming -->

[PATCH] firmware loader: Fix the concurrent request_firmware() race for kref_get/put

2012-11-08 Thread Chuansheng Liu
There is one race that both request_firmware() with the same firmware name. The race scenerio is as below: CPU1 CPU2 request_firmware() -- _request_firmware_load() return err another request_firmware() is coming --