From: Michal Nazarewicz Date: Mon, 14 Jun 2010 08:43:34 +0000 (+0200) Subject: USB: gadget: g_fs: possible invalid pointer reference bug fixed X-Git-Tag: v2.6.35-rc4~18^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f588c0db39ca35f69f815dabe5682759daa25098;p=pandora-kernel.git USB: gadget: g_fs: possible invalid pointer reference bug fixed During __gfs_do_config() some invalid pointers may be left in usb_configuration::interfaces array from previous calls to the __gfs_do_config() for the same configuration. This will always happen if an user space function which has a fewer then the last user space function registers itself. Composite's set_config() function that a pointer after the last interface in usb_configuration::interface is NULL unless the array is full. This patch makes the __gfs_do_config() make sure that if the usb_configuration::interface is not full then a pointer after the last interface is NULL. Signed-off-by: Michal Nazarewicz Signed-off-by: Kyungmin Park Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed