]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: mesh: handle failed alloc for rmc cache
authorBob Copeland <me@bobcopeland.com>
Sat, 19 Mar 2016 02:11:28 +0000 (22:11 -0400)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 5 Apr 2016 19:34:50 +0000 (21:34 +0200)
commit5241f56ef62f0f4b0c6d61c75f88a304c010a6ae
treebb69412b2a94fe667a655be8ef40f974cb5fab9a
parent274cb4f964a60d07d09001684b07bd71a8fd0123
mac80211: mesh: handle failed alloc for rmc cache

In the unlikely case that mesh_rmc_init() fails with -ENOMEM,
the rmc pointer will be left as NULL but the interface is still
operational because ieee80211_mesh_init_sdata() is not allowed
to fail.

If this happens, we would blindly dereference rmc when checking
whether a multicast frame is in the cache.  Instead just drop the
frames in the forwarding path.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh.c