From: Palik, Imre Date: Fri, 19 Jun 2015 12:21:51 +0000 (+0200) Subject: xen-netback: fix a BUG() during initialization X-Git-Tag: omap-for-v4.2/fixes-rc1^2~134^2~2^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12b322ac85208de564ecf23aa754d796a91de21f;p=pandora-kernel.git xen-netback: fix a BUG() during initialization Commit edafc132baac ("xen-netback: making the bandwidth limiter runtime settable") introduced the capability to change the bandwidth rate limit at runtime. But it also introduced a possible crashing bug. If netback receives two XenbusStateConnected without getting the hotplug-status watch firing in between, then it will try to register the watches for the rate limiter again. But this triggers a BUG() in the watch registration code. The fix modifies connect() to remove the possibly existing packet-rate watches before trying to install those watches. This behaviour is in line with how connect() deals with the hotplug-status watch. Signed-off-by: Imre Palik Cc: Matt Wilson Acked-by: Wei Liu Signed-off-by: David S. Miller --- Reading git-diff-tree failed