]> git.baikalelectronics.ru Git - kernel.git/commit
tun: Fix crash with non-GSO users
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Apr 2009 09:09:43 +0000 (02:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Apr 2009 09:09:43 +0000 (02:09 -0700)
commitd83cfa352a4427d4306b70356624c7800b709257
treeb4a95f8442b99cea946bfc8a4767489c0107feca
parent35ee4db2619f642ddc135f721eaad66406067cb5
tun: Fix crash with non-GSO users

When I made the tun driver use non-linear packets as the preferred
option, it broke non-GSO users because they would end up allocating
a completely non-linear packet, which triggers a crash when we call
eth_type_trans.

This patch reverts non-GSO users to using linear packets and adds
a check to ensure that GSO users can't cause crashes in the same
way.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c