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 fixi

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