From: Mariusz Kozlowski Date: Sun, 5 Jul 2009 19:48:35 +0000 (+0000) Subject: tun/tap: Fix crashes if open() /dev/net/tun and then poll() it. X-Git-Tag: v2.6.31-rc3~70^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c8a9c63d5fd738c261bd0ceece04d9c8357ca13;p=pandora-kernel.git tun/tap: Fix crashes if open() /dev/net/tun and then poll() it. Fix NULL pointer dereference in tun_chr_pool() introduced by commit 33dccbb050bbe35b88ca8cf1228dcf3e4d4b3554 ("tun: Limit amount of queued packets per device") and triggered by this code: int fd; struct pollfd pfd; fd = open("/dev/net/tun", O_RDWR); pfd.fd = fd; pfd.events = POLLIN | POLLOUT; poll(&pfd, 1, 0); Reported-by: Eugene Kapun Signed-off-by: Mariusz Kozlowski Signed-off-by: David S. Miller --- Reading git-diff-tree failed