From: Jason Wang Date: Wed, 11 Sep 2013 10:09:48 +0000 (+0800) Subject: tuntap: correctly handle error in tun_set_iff() X-Git-Tag: v3.12-rc2~14^2~60 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=662ca437e714caaab855b12415d6ffd815985bc0;p=pandora-kernel.git tuntap: correctly handle error in tun_set_iff() Commit c8d68e6be1c3b242f1c598595830890b65cea64a (tuntap: multiqueue support) only call free_netdev() on error in tun_set_iff(). This causes several issues: - memory of tun security were leaked - use after free since the flow gc timer was not deleted and the tfile were not detached This patch solves the above issues. Reported-by: Wannes Rombouts Cc: Michael S. Tsirkin Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller --- Reading git-diff-tree failed