From: Akinobu Mita Date: Wed, 2 Mar 2011 11:35:28 +0000 (+0900) Subject: wusb: fix find_first_zero_bit() return value check X-Git-Tag: v2.6.39-rc1~472^2~60 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=962f3ffa927f2e777a4193843c45ffa6e52ff4b6;p=pandora-kernel.git wusb: fix find_first_zero_bit() return value check In wusb_cluster_id_get(), if no zero bits exist in wusb_cluster_id_table, find_first_zero_bit() returns CLUSTER_IDS. But it is impossible to detect that the bitmap is full because there is an off-by-one error in the return value check. It will cause unexpected memory access by setting bit out of wusb_cluster_id_table bitmap, and caller will get wrong cluster id. Signed-off-by: Akinobu Mita Cc: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed