diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 53fbdbbe8..24ea350cd 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@ -1410,9 +1410,13 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr, return BATADV_NO_DUP; orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing); - if (WARN_ON(!orig_ifinfo)) { + if (!orig_ifinfo) { + /* The GFP_ATOMIC allocation inside batadv_orig_ifinfo_new() + * may fail under memory pressure. That is not a kernel bug, + * so don't WARN; just skip duplicate detection. + */ batadv_orig_node_put(orig_node); - return 0; + return BATADV_NO_DUP; } spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock);