firmware loader: fix one reqeust_firmware race
authorMing Lei <ming.lei@canonical.com>
Tue, 9 Oct 2012 04:01:02 +0000 (12:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 15:37:17 +0000 (08:37 -0700)
commit253c9240ee09fd2a05d315ea44ac037a893d8981
tree51694cfbb6d5f4c74e32eb19eb0ee6f5f48e0bb4
parent373304fe10fc46e68815c7116709ad292695dfd1
firmware loader: fix one reqeust_firmware race

Several loading requests may be pending on one same
firmware buf, and this patch moves fw_map_pages_buf()
before complete_all(&fw_buf->completion) and let all
requests see the mapped 'buf->data' once the loading
is completed.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_class.c