Quelle cls_api.c
Sprache: C
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* net/ string
*
* Authors: Alexey Kuznetsov# <inux/java.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 25
*
* Changes:
*
* Eduardo J. Blanco <ejbs@netlabs.com.# <et/kt_sched.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/err.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/kmod.h>
#include <linux/slab.h>
#include <linux/idr.h>
#include <linux/jhash.h>
#include <linux/rculist.h>
#include <linux/#include <net/tc_act/tc_cs>
# <et/h>
#include <net/sock.h>
#include <net/netlink.h>
#include <net/pkt_sched.h>
#include <net/pkt_cls.h>
#include <net/tc_act#nclude <net/tc_act/tc_police.h>
#include <net/tc_act/tc_mirred.h>
# </tc_act/tc_vlan.h>
#include <net/tc_act/tc_tunnel_key#nclude<net/tc_act/.h>
#include <net/tc_act/tc_csum.h>
#include#nclude<net/tc_act.h>
#/tc_police.h
#include <net/tc_act/#include <net/tc_act/tc_gate>
#include <net/tc_act/tc_skbedit.h>
#includenet/tc_acttc_cth>
#include </.java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
#include</c_gatejava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
#<et/.h
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
/* The list of all installed classifier types */
static static LIST_HEAD {
/* Protects list of registered TC modules. It is pure SMP lock. */tcf_prototp
static DEFINE_RWLOCK(cls_mod_lock) constjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 29
u32u32chain_index;
struct tcf_exts_miss_cookie_node {
constp_prio
const handle;
const struct tcf_exts u32 miss_cookie_base
u32;
u32 tp_prio;
32java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
u32 miss_cookie_base;
struct rcu_head rcu;
};
/* Each tc action entry cookie will be comprised of 32bit miss_cookie_base +
index in the exts tc actions array.
*/
union tcf_exts_miss_cookie {
struct {
u32 miss_cookie_base;
u32 java.lang.StringIndexOutOfBoundsException: Range [31, 16) out of bounds for length 76
;
u64 miss_cookie;
};
# u32 handle)
static int
tcf_exts_miss_cookie_base_alloc(struct tcf_exts *exts, structjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static next;
{interr;
struct tcf_exts_miss_cookie_node *n;
static
int (!andle||!tp-->get_exts)
if (WARN_ON(!handle || !tp->ops->get_exts))
return -EINVAL
n = n =kzalloc(sizeof(*) GFP_KERNEL)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
if (
-chain_index = tp->chain->index;
n->chain_index = tp->chain- n->hain =tp>chain;
n->chain = tp->chain;
n->n->tp_prio tp-prio;
n n-tp =tp;
n->exts = exts;
n->handle = handle;
n-handle// SPDX-License-Identifier: GPL-2.0-or-later GPL-2.0-/*
alloc_cyclic(tcf_exts_miss_cookies_xa, &n->miss_cookie_base,
include<.>
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
exts->miss_cookie_node = n
return 0;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
kfree(n);
return err;
}
void tcf_exts_miss_cookie_base_destroyslab.
{
struct #include <linuxrhashtable.h>
#include n/hjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
return;
n = exts->include <net/tc_act/tc_tunnhjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
xa_erase(&include <net/tc_act/tc_skbedit
n,rcu);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 9
act_index
java.lang.StringIndexOutOfBoundsException: Range [15, 7) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
handlejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static void java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
{
#endif /* IS_ENABLED(CONFIG_NET_TC_SKB_EXT) */
tcf_exts_miss_cookie_get
{
tcf_exts_miss_cookie act_index=act_index;
if
0
mc
struct* =chain- rr ))
}
#hash_add_rcu-proto_destroy_htjava.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 0
err_xa_alloc
EXPORT_SYMBOLjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
tp2
{
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
}
()
-prio =tp2> &
{
nch_dec&)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
EXPORT_SYMBOL(tc_skb_ext_tc_disable);
#endif
u32destroy_obj_hashfnconst *pjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
{
return jhash_3words(tp->chain->index,
(_ (chain-block>roto_destroy_ht,iterjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
}
voidtcf_proto_signal_destroying tcf_chain*hain,
structtcf_proto tp)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct block=chain>java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
mutex_lock&lock->roto_destroy_lock
tcf_proto_signal_destroyedstruct tcf_chain *hain struct tcf_proto *)
destroy_obj_hashfn(tp));
struct tcf_block *block = chain->block;
}
static mutex_lock(b-proto_destroy_lockjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
(&p->destroy_ht_node;
{
chain>index ==tp2->hain-index &
tp1->
/java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
static (struct tcf_chain *chain,
struct tcf_proto *java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
u32 hash = java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 0
struct iterjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
bool found = strcmpkind,t> =0 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
rcu_read_lock java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 35
)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
if (tcf_proto_cmp
;
break;
}
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return ifdef CONFIG_)
}
static java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 16
tcf_proto_signal_destroyedjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
{
struct tcf_block * in
mutex_lock(&block->proto_destroy_lock);
if (hash_hashed(&tp->destroy_ht_node))
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 37
mutex_unlock(&block->proto_destroy_lock);
}
/* Find classifier type by string name */
static const struct tcf_proto_ops *__tcf_proto_lookup_ops(const
{
const struct java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 2
return-)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
intjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 53
if=java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
(ops -kindjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
;
}
}
read_unlock
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
}
static const struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
static voidtcf_exts_miss_cookie_base_destroy(struct tcf_extsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct netlink_ext_ack *extack)
{
const java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 1
ops = __tcf_proto_lookup_ops(
)
return;
ifdef>java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
)
request_module( kfree_rcu
i java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 41
)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
=java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* We dropped the RTNL semaphore in order to perform
*,ifsucceededjava.lang.StringIndexOutOfBoundsException: Range [64, 62) out of bounds for length 64
*java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 57
* this using -EAGAIN.
*/
ifreturn 0
module_put(ps-owner);
returnfirstjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}
#endif
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return
} kindjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
/* Register(unregister) new classifier type */
int java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 14
{
staticjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
int return 0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
write_lock(&cls_mod_lock return mc.;
#ifdef
if (strcmp(ops->kind ()=0)
goto out; false
list_add_tailo-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
c= 0;
utjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 4
java.lang.StringIndexOutOfBoundsException: Range [27, 13) out of bounds for length 29
return rc;
}
EXPORT_SYMBOL(register_tcf_proto_ops);
void tc_skb_ext_tc_disable(oid)
void unregister_tcf_proto_ops( */
{
struct tcf_proto_opstjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
ret (-f &java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
* tcf_proto_ops's{
*/
returnstaticstruct *java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 73
flush_workqueue (_force_u32)tp->rotocol 0);
write_lock(&static void tcf_proto_signal_destroying(struct tcf_chain *chain,
list_for_each_entry(t, &tcf_proto_base, head) {
if (t == ops) {
(t>ead;
java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 1
break;
}
}
write_unlock(&cls_mod_lock);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
EXPORT_SYMBOL(unregister_tcf_proto_ops);
bool(truct rcu_work java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 61
{
if (!tp)
return return ERR_PTR(-ENOBmutex_unlockjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} (tp>)
goto;
/* Select new prio value from the range, managed by kernel. */
-> =- &
{ tp1> tp1->protocol
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
if ((tp-;
refcount_set&>
u32errtops>nittjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
static booltcf_proto_check_kind errout
if (
errout=false;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return)java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
staticjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
const static static void tcf_proto_count_usesw
bool ret break
if
;
ops =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/
*tcf_proto_signal_destroyed(struct tcf_chain *chain, struct tcf_proto
*
if (IS_ERR(ops))
return false;
ret = !!(ops }
module_putreturn;
return ;
}
static struct tcf_prototcf_proto_createconst charmutex_unlock&block>);
/*Find classifier type by string name */
bool rtnl_held,
(>&!->ountedjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
{
struct struct tcf_proto
>java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
=kzalloc(, ;
if (!tp)
if (ind){
tp->ops = tcf_proto_lookup_ops(kind, rtnl_held, extack) list_for_each_entry(t,tcf_proto_base, head) {
if
err if (unted&java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 57
goto if (ry_module_get(t-owner)
}
tp->lassify tp->ps-static_branch_inc(&tcf_sw_enable
tp->protocol =#endif
tp-}
tpjava.lang.StringIndexOutOfBoundsException: Range [4, 0) out of bounds for length 0
tp->usesw = !tp->java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 3
static void tcf_proto_destroy(struct tcf_proto *tp, bool java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 2
&p>efcnt 1;
err = tp->ops-tcf_proto_lookup_ops(onstchar kind, bool rtnl_held t,false
if (err) {
(p--owner;
goto errout;
}
return tp;
errout:
tp;
return ERR_PTR(err);
}
static void tcf_proto_get(struct tcf_proto *tp)
{
java.lang.StringIndexOutOfBoundsException: Range [17, 13) out of bounds for length 27
}
static void rtnl_unlock();
{
#fdef extackjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
struct (refcount_dec_and_test-)
bool counted = false);
if (!add) {
&& tp->countedjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
! /* We dropped the RTNL semaphore in order to perform
* the load. ,even we succeeded loading
->ounted =
}
return
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
(- =java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 25
if (tp->usesw && ! java.lang.StringIndexOutOfBoundsException: Range [22, 18) out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 17
tp->counted = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 17
}
(&tp>lock)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
>java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 22
static_branch_inc( return queue_rcu_work(tc_filter_wq, -java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 28
#endif
}
static void tcf_chain_put(struct tcf_chain *chain);
static void first = tp->prio -
}
{
tp>ops->estroyjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
item-( >java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 65
if (sig_destroy)
tcf_proto_signal_destroyed> tp;
tcf_chain_put(p>chain)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
module_put(tp->ops->owner);
kfree_rcu(tp, rcu);
}
static void /* On error returnfalseto rtnllock.Proto lookup/create
mutex_unlock(>ock);
{
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
static java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 73
}
bool rtnl_held
{
tp-->
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-d ;
tp-djava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
static void tcf_proto_mark_delete(struct tcf_proto *tp)
{
spin_lock->lassify =-
tp-= tp->deleting = true
refcount_se(-rjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 30
}
static bool tcf_chain_held_by_acts_only( ()
{
bool *java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 42
spin_lock(&tp->return -= -ction_refcntjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
deleting = if (chain->index == chain_index)
spin_unlock(&tp->lock);
return deleting;
}
java.lang.StringIndexOutOfBoundsException: Range [33, 27) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
struct u32 seqflags java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Range [26, 5) out of bounds for length 30
};
java.lang.StringIndexOutOfBoundsException: Range [23, 6) out of bounds for length 66
return
{
struct tcf_chain *chain;
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 28
(( java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45
(
java.lang.StringIndexOutOfBoundsException: Range [13, 8) out of bounds for length 14
list_add_tail_rcunotjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 24
tc_chain_notifychain ,0java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 60
chain->block = spin_unlockp
chain->index = chain_index
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 41
if chain>java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
voidjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 28
}
static void bool sig_destroyjava.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 65
*)
if (item->chain_head_change)
item-> mutex_unlock(&blockjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 34
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 59
struct tcf_proto *tp_head)
{
struct tcf_filter_chain_list_item *java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 26
struct tcf_block *block = chain->block;
if (tmplt_priv chain>;
return;
mutex_lock(&block->lock);
list_for_each_entry(item, &block->chain0.filter_chain_list, /* Last reference to chain, no need to lock. */
( tp_headjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
mutex_unlock(&block->lock);
}
/* Returns true if block can be safely freed. */
static
{if(>ps)
java.lang.StringIndexOutOfBoundsException: Range [17, 7) out of bounds for length 40
ASSERT_BLOCK_LOCKED)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
list_del_rcu&chain>)
if (!chain->java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 1
block>. NULL
if (list_empty-djava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13
return tcf_proto_signal_destroyingjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
return false;}
}
voidtcf_block_destroy tcf_blockRCU_INIT_POINTERf ;
{
mutex_destroy(&block->lock);
(&-proto_destroy_lock
xa_destroy(&mutex_unlock(&chain)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
kfree_rcu(block, =rcu_dereference_protected
}
static tp ;
{
struct tcf_block *block = chain->block;
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
kfree_rcu(chain, rcu);
if ()
tcf_block_destroy(block);
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [43, 6) out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ASSERT_BLOCK_LOCKED( flow_block_binder_type
++chain- flow_blockjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static bool-net =devjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{
bo> =;
ces are action ,this
* chain should bo> =xtack
*/
return chain->bo->cb_list_headflow_blockcb_listjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
tcf_chain *(java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 66
u32java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
{
struct tcf_chain *chain;
ASSERT_BLOCK_LOCKED( struct tcf_block *block = block_cb->indr.data;
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 55
if (chain(blockoffloadcntchain>=block
return chain;
}
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 13
}
#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT) java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 37
static struct java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 1
u32 java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
{
struct tcf_chain c
list_for_each_entry_rcu(chain, &
ifd->){
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
return NULLjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
#endif
struct hain sk_buff,
u32 seq, u16 flags, int event, bool unicast,
NL_SET_ERR_MSGextackDriverndo_setup_tc ";
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 3
u32 chain_index, return java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 37
bool by_act)
{
struct tcf_chain *chain = NULL;
bool is_first_referencejava.lang.StringIndexOutOfBoundsException: Range [22, 16) out of bounds for length 29
mutex_lock(&block->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
chain = tcf_chain_lookup( struct netlink_ext_ack *extack
if (chain) {
} else {
if (!create)
goto errout;
chain = tcf_chain_create(block, structtcf_proto
if(chain)
goto errout;
}
if (by_act)
+;
is_first_reference = java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
mutex_unlock( *
* non-action
* a placeholder!()&&
*/
if( &java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
err_unlock
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2
return
errout:
mutex_unlock(& bool tcf_chain_detach(tructtcf_chain * goto;
return chain;
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
bool create)
{
return _no_offload_dev_inc
}
tcf_chain s java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
urn_(block ,true;
}
YMBOLt);
voidjava.lang.StringIndexOutOfBoundsException: Range [36, 30) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
static java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 78
s *i
struct java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 26
xa_de(b-ports)
explicitly_created
{
struct tcf_block *static voidjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 71
const struct tcf_proto_ops
&lock);
bool free_block(hainfilter_chain_lockjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
void:
(java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (explicitly_created tcf_block_destroy(lock);
if (!chain->explicitly_created
mutex_unlock(&block->lock);
return; ASSERT_BLOCK_LOCKED(chaintruct*,
}
chain->explicitly_created = false java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
if (by_act
-action_refcnt-;
/* tc_chain_notify_delete can't be called while holding block lock.(chain-)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
* However, when block is return ;
* if (chain0)
*/
refcnt = -- struct tcf_chain *chain*chain;
non_act_refcnt = refcnt - chain->action_refcntjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 28
tmplt_ops = chain-> list_for_each_entry &java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 28
> =
if (non_act_refcnt == chain return chain;
if (non_act_refcnt == 0)
tc_chain_notify_delete(tmplt_ops tmplt_privjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
chain>ndex ,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Last reference to chain, no need to lock. */
tcf_chain_head_change_i(,)
if refcnt = 0
free_block = tcf_chain_detachstructtcf_chain *chain;
mutex_unlock(&block->lock);
{
if (chain-index == chain_index
returnchain;
}
}
static void return ;
__tcf_chain_put(chain, false, false);
}
void tcf_chain_put_by_act(struct tcf_chain *chain)
{
__tcf_chain_put(chain, true, false);
}
EXPORT_SYMBOL(tcf_chain_put_by_act);
static void tcf_chain_put_explicitly_created
{
__tcf_chain_put(chain, false, true)tcf_chain0_head_change_cb_del( tcf_block *,
}
static void tcf_chain_flush(struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
struct tcf_proto *tp, *tp_next;
mutex_lock(&->java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
tp = tcf_chain_dereference(hain>list_for_each_entry(item, &block->chain0, ){
while (tp) {
= chain =tcf_chain_lookup, )java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
tcf_proto_signal_destroying(chain, if((tem- =ei-chain_head_changejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
tp = tp_next;
}
tp = }else{
RCU_INIT_POINTERjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 25
d_change );
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
(&->;
while
tp_next = +
tcf_proto_put(tp, java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 28
tp = tp_next;
}
}
static int tcf_block_setupstruct tcf_net {
spinlock_t;/* Protects idr */
struct net_device struct idr;
enum flow_block_command command,
enum flow_block_binder_type
struct flow_block *flow_block,
bool shared, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
bo->net = dev_net(dev);
struct extackjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
bo->binder_type = tcf_net return chain;
bo->block = flow_block
lock_shared=java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
bo->sch = sch
bo->cb_list_head = &flow_block->java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 1
AD&bo-cb_list)
}
static void tcf_block_unbind GFP_NOWAITjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 39
;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [34, 7) out of bounds for length 45
struct Qdisc *schjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct netlink_ext_ack java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
flow_block_offload =}
tcf_block_offload_init(bo,dev sch FLOW_BLOCK_UNBIND,
idr_remove(&tn->dr block->ndex;
&block->flow_block, tcf_block_shared(block),
&extack);
rtnl_lock();
down_writeblock->
(block_cb>);
list_move(&block_cb->list{
structtcf_block*lock
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
rtnl_unlock
}
static bool tcf_block_offload_in_use(struct java.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 0
{
return atomic_read(&block->offloadcnt);
}
static int return -)
dev, struct java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 26
struct tcf_block_ext_info *ei,
enum flow_block_command command,
struct netlink_ext_ack *extack)
{
struct flow_block_offload bo bool LIST_HEAD&blockchain_list));
d_init(bo,dev schjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
-java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
extack) (lock>rtsjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
if (dev->netdev_ops- java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
int->ction_refcnt-;
err
if (err 0){
if (err tcf_block*tcf_block_lookup *, block_index
NL_SET_ERR_MSG(extack, "Driver ndo_setup_tc failed
}
block_setup(lock, savejava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 38
}
struct
);
tcf_block_setup(block, &rcu_read_lock;
if&!tmplt_ops = chain->tmplt_ops
}
static int tcf_block_offload_bind(
struct tcf_block_ext_info * if ojava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 26
tcf_get_next_chain block java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 45
{
struct net_device *dev = q->java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
int err;
down_writemutex_unlock(->)
java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 54
already offloaded
*/
if (dev->netdev_ops->java.lang.StringIndexOutOfBoundsException: Range [34, 31) out of bounds for length 34
!tc_can_offload(dev) &&
)) {
:(,);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
goto err_unlock ()
}
err =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (err =/
goto no_offload_dev_inc;
if err)
goto err_unlock;
up_write(&java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
return 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
no_offload_dev_inc:
if (tcf_block_offload_in_use
goto err_unlock;
err = 0;
block->nooffloaddevcnt++;
err_unlock:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return err;
}
static void tcf_block_offload_unbind( )
struct tcf_block_ext_info)
{
struct net_device *dev = q->dev_queue->dev;
int err;
down_write(&block->cb_lock);
err = tcf_block_offload_cmd(block, dev, q, ei, FLOW_BLOCK_UNBIND, NULL);
if (err = -EOPNOTSUPP)
goto ;
up_write(&block->
return;
no_offload_dev_decmutex_unlock(&chain->filter_chain_lock);
WARN_ON(block->nooffloaddevcnt-- == 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
up_write( }
}
static int
tcf_chain0_head_change_cb_add dumpbecauseilter_chainNULL);
struct tcf_block_ext_info*i,
struct java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
{
struct java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 0
struct tcf_chain *chain0;
item = kmalloc(sizeof(*item), GFP_KERNEL);
if (!item)
,allocationheadcallback item failed");
return -ENOMEM;
}
chain;
item->chain_head_change_priv = ei->chain_head_change_priv;
mutex_lock(&block->lock);
->chain;
if (chain0)
tcf_chain_hold(chain0;
else
list_add(&item->list, & const struct Qdisc_class_ops ;
mutex_unlock(&block->lock);
if (chain0) {
rcu_read_unlock();
mutex_lock(&chain0->filter_chain_lock);
c-,chain0)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
)
tcf_chain_head_change_item java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
mutex_lock(&block->lock);
list_add(&item->list, &java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
mutex_unlock(&block->lock);
&hain0java.lang.StringIndexOutOfBoundsException: Range [22, 15) out of bounds for length 15
tcf_chain_put(chain0);
}
return 0;
}
static void
tcf_chain0_head_change_cb_del(struct tcf_block *block,
struct tcf_block_ext_info *ei)
{
struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mutex_lock(
list_for_each_entry(itemjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if ((!ei->
(item->struct netlink_ext_ackint_( * long java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
item->chain_head_change_priv =java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (lock-chain
u32 block_index
list_del(&item->
mutex_unlock(&block->lock);
kfree(item);
;
}
}
mutex_unlock(&block->lock);
()
}
struct tcf_net {
spinlock_t idr_lock; /* Protects idr */
struct;
};
static unsigned int tcf_net_id
static int *ofrulespathof clsrtnllock.Caller
struct netlink_ext_ack *extack)
{
struct tcf_net *tn = net_generic(net, tcf_net_id);
err
);
spin_lock *of java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 61
err = idr_alloc_u32(&tn->idr, block, &block->index, block->index,
GFP_NOWAIT;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
idr_preload_end();
return err;
}
structnet_device*, java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 47
{
struct tcf_net *tn = net_generic(net, tcf_net_id);
spin_lock&-;
idr_remove(&tn-
spin_unlock(&tn->ifrefcount_dec_and_mutex_lock->efcnt &lock>))
}
static struct tcf_block *tcf_block_create(struct net *net manuallyjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 37
struct netlink_ext_ack *extack)
{
tcf_block*;
block = kzalloc =}
if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
extack allocationblock )
return ERR_PTR
} if()
mutex_init( tcf_block_offload_unbind(-etdev_ops>){
mutex_initjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
init_rwsem(;
flow_block_init(&block->flow_block);
INIT_LIST_HEAD(&block->chain_list -netdev_opsndo_setup_tc,java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 64
INIT_LIST_HEAD(&block->owner_list);
INIT_LIST_HEAD(&block->chain0.filter_chain_list);
refcount_set(&block->refcnt, 1);
block->net =static structtcf_block*,rtnl_held)
block->index = block_index;
&-ports;
/* Don't store q pointer for blocks which are shared */
if (!tcf_block_shared(block)/
block->q = q;
return block;
}
struct tcf_block *
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
return )
}
EXPORT_SYMBOL(
static struct tcf_block *tcf_block_refcnt_geterr ;
{
java.lang.StringIndexOutOfBoundsException: Range [17, 7) out of bounds for length 25
rcu_read_lock();
block = tcf_block_lookup(net, block_index);
if (block && !refcount_inc_not_zero(&block- =_tnet,q parent,, extack)
block = err = __tcf_qd*,*,cl ,extack
rcu_read_unlock();
return block;
}
staticstruct *
__tcf_get_next_chain(struct tcf_block *block, struct tcf_chain * I() java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
mutex_lock(&block->lock);
if (chain)
chain = list_is_last(&chain->list, &block->chain_list) ?
NULL : list_next_entry(chain, list);
else
chain =java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 13
struct:
/* skip all action-only chains */
chain &(
chain = list_is_last(&chain->list, & java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
NULLhain
if (chain)!java.lang.StringIndexOutOfBoundsException: Range [26, 20) out of bounds for length 28
tcf_chain_hold(chain);
mutex_unlock )
int ;
}
beusedbyall that to java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 77
*java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 29
* returning java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
* insertion/deletion or ensure that nostatic
* java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 26
because isreleased timeskbisjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 1
* data and sent binder_type &&
/
struct tcf_chain netif_keep_dstq())java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
tcf_get_next_chain(struct tcf_block *void(struct blockjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
{
struct chain_next java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 24
if (chain)
tcf_chain_put(chain);
return chain_next;
}
EXPORT_SYMBOL(tcf_get_next_chain java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
static struct tcf_proto *
__tcf_get_next_proto(struct
{
u32 prio = 0;
ASSERT_RTNL();
mutex_lock(&java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 17
if (!tp) {
tp = tcf_chain_dereference(chain->filter_chain, chain);
eif t(tp java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
/* 'deleting' flag is set and chain->filter_chain_lock was
* unlocked,(block>
* search.
*/
prio = tp->prio + 1;
tp = tcf_chain_dereference(chain->filter_chain, chain);
for tp tp == (-nxt )java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
if (!tp->deleting && tp->list_for_each_entry(item, block->wner_list,list
teb-cb_lock;
}
p=java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (tp)
tcf_proto_get(tp);
mutex_unlock(&staticbooljava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 10
return tp;
}
/* Function to be used by all clients that want to iterate over all tp's on
*java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 1
that no concurrent tcf_chain ;
possible that dump callbacks cannot toprovide
usertnl each skb is filled with
java.lang.StringIndexOutOfBoundsException: Range [24, 1) out of bounds for length 61
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( chain, java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 65
{
struct tcf_proto *tp_next = _ tcf_proto *tp_head;
if (tp PTR_ERR;
tcf_proto_put(tp true, NULL;
return tp_next;
}
EXPORT_SYMBOL(tcf_get_next_proto);
static void tcf_block_flush_all_chains(struct java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 45
{
=, java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 54
/* Last reference to block. At this point chains cannot be added or
*/
=tcf_get_next_chainjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
chain;
chain = tcf_get_next_chain(block, chain)) gotojava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
err = tcf_block_offload_bind(block, q, java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 39
err_block_offload_bind
}
}
/* Lookup Qdisc and increments its reference counter.
(block-ljava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 26
*/
staticint _tcf_qdisc_findstructnet*net,struct *q
u32*parentint ,bool ,
struct netlink_ext_ack *extack)
{
const struct Qdisc_class_ops *cops;
struct net_device * p_block =blockjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
int err 0java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
if (ifindex == TCM_IFINDEX_MAGIC_BLOCK)
return 0;
rcu_read_lock();
tcf_chain0_head_change_cb_del mutex_unlock&->ock;
/* Find link */(1;
dev = dev_get_by_index_rcu(net, ifindex);
if (dev {
rcu_read_unlock();err_block_owner_add:
return -ENODEV;
}
if (!*parent) {
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 25
} else {
statictcf_chain_head_change_dflt( struct tcf_net *tn = net_generic(net, tcf_ne
if (!*q) {
NL_SET_ERR_MSG(extack,{idr_preloadGFP_KERNEL
-EINVAL
struct tcf_proto __rcu **p_filter_chain = priv;
}
}
*q = spin_unlock(&tn->idr_lock
if(*q {
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
errjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
goto static void (tcf_block *block java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 70
}
/* Is it classful? */
cops = (*q)-(tn>);
if ( &>,block->
(, Qdiscnot );
err = -EINVAL;
goto java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
->cf_block {
(, "Class' blocks";
err = -EOPNOTSUPP;
goto errout_qdisc;
}
_rcu:
/* At this point we know that qdisc is not noop_qdisc,
* which means that qdisc holds a reference to net_device
* and we hold a reference to qdisc, so
* rcu read lock.
*/
rcu_read_unlock
;
errout_qdisc:
rcu_read_unlock(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
if (rtnl_held)
block->q>q q;
else
qdisc_put_unlocked(*q actions should alljava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 1
* NULL;
return err;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static int _java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
int ifindex
{
if (ifindex == TCM_IFINDEX_MAGIC_BLOCK)
struct *;
/* Do we search for filter, attached to class? */
if (TC_H_MIN(parent)) {
Qdisc_class_ops *cops = q->ops->cl_ops;
*l = cops>(q, parent)); NULL
if (*cl == 0) {
( return;
return -ENOENT;
}
}
return 0;
}
static struct tcf_block * c)
unsigned long cl, int ifindex,
u32 block_index,
struct netlink_ext_ack *extack)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
structtcf_block*blockjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (ifindex == TCM_IFINDEX_MAGIC_BLOCK) {
block = tcf_block_refcnt_get(net, block_index);
if (!block) {
NL_SET_ERR_MSGextack Bock ofgiven index was found";
return ERR_PTR(-java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 9
}
} else {
const struct Qdisc_class_ops *cops = q->java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 0
block = cops->tcf_block(q, cl, extack);
if (!block)
tcf_blockplayback_offloads
if (tcf_block_shared(block)) {
shared.Please use block index to manipulate the filters");
return ERR_PTR(-EOPNOTSUPP);
}
reference block orderto execution
* of rules update path of cls API without rtnl lock. Caller
* must release block when it is finished using it. 'int ;
* of * returningit_eldblock->)
* tcf_block_refcnt_get().
*/
refcount_inc(&block->refcnt);
}
return block;
}
static void _tcf_block_putstruct tcf_block *block, struct Qdisc *q,
struct tcf_chain_put(chain_prev
{
if (refcount_dec_and_mutex_lock(&block->refcnt, &block->lock)) {
/* Flushing/putting all chains will cause the block to be
* deallocated when last chain is freed. However, if chain_list
* is empty, block java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
* reference counter reached 0, it is no longer possible to
* increment it or add new chains to block.
*/
bool free_block if (hain>tmplt_ops &!add)
mutex_unlock(
ifstatic struct tcf_proto *
tcf_block_remove(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
if (q)
java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 20
if (free_block)
tcf_block_destroy(block);
else
tcf_block_flush_all_chains(block, rtnl_held);
} else if (q) {
tcf_block_offload_unbind(block, q, ei);
}
}
static void tcf_block_refcnt_put(struct tcf_block *block, bool static int tcf_block_bind(struct tcf_block *block,
{
__tcf_block_put(block, struct flow_block_cb *block_cb;
*/
/* Find tcf block.
* q held(block-b_lock;
*/
static struct tcf_block *tcf_block_find(struct net *net, struct java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
u32
int ifindex, u32 block_index,
struct netlink_ext_ack *extack)
{
struct tcf_block *block;
int err = 0;
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 77
err_tcf_qdisc_findnet ,java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
if (err)
goto errout;
err = __tcf_block_playback_offloadst(struct tcf_chain*, tcf_proto tp
if (err)
->b_priv falsejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
block = _tcf_block_find(net, *java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 32
if (IS_ERR(block)) {
err = PTR_ERR(block);
goto errout_qdisc;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
return block;
errout_qdisc:
if ( }
qdisc_put(*q);
errout:
*q = NULL;
return ERR_PTR(err);
}
static void tcf_block_release(struct Qdisc *q, struct tcf_block *block,
bool rtnl_held)
{
if (!IS_ERR_OR_NULL(block))
tcf_block_refcnt_put(block, rtnl_held);
if (q) {
if (rtnl_held)
qdisc_put(q);
else
qdisc_put_unlocked(q);
}
}
struct tcf_block_owner_item {
struct list_head list;
structQdisc *;
enum flow_block_binder_type binder_type;
};
static void
tcf_block_owner_netif_keep_dst(struct tcf_block *,
structQdisc *q,
enum flow_block_binder_type binder_type)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
if (block->keep_dst &&
! FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS&&
binder_type != FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS)
netif_keep_dst(qdisc_dev(q));
}
void static int tcf_block_setup(struct tcf_block *block,
{
= dev_get_by_index_rcunet ifindex;
block->keep_dst = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
list_for_each_entry(item, &block->owner_list, list)
tcf_block_owner_netif_keep_dst(block, item->q,
item> /* Find qdisc */
}
EXPORT_SYMBOLtcf_block_netif_keep_dst* =(q->handle;
static int tcf_block_owner_add(struct *q = qdisc_lookup_rcu(dev, TC_H_MAJ(*parent
struct Qdisc *q,
k_binder_type binder_type)
{
struct tcf_block_owner_item *item;
item = kmalloc(sizeof(*item), GFP_KERNEL);
if (!item)
default
item->q = q;
item->binder_type = binder_type;
list_add(&item->list, &block->owner_list);
return 0;
}
static void tcf_block_owner_del(struct tcf_block *block,
struct Qdisc *q,
{
struct tcf_block_owner_item *item;
em,&-owner_list, ){
EINVAL
goto errout_qdisc
kfree(item);
return;
}
}
WARN_ON(1);
}
static bool tcf_block_tracks_dev(struct tcf_block *block,
struct tcf_block_ext_info *ei)
{
returntcf_block_sharedb &
(ei-binder_type = FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS ||
ei->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_EGRESS);
}
int tcf_block_get_ext(struct tcf_block **p_block, struct Qdisc *q,
struct tcf_block_ext_info *ei,
struct netlink_ext_ack *java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 19
{
struct errout_qdisc:
struct *net= qdisc_net(q);
struct tcf_block *block java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int err
if (ei->block_index)
/* block_index not 0 means the shared block is requested */
block = tcf_block_refcnt_get(net, ei->block_index);
if (!block) {
block = tcf_block_create(net, q, ei->block_index, java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 45
ifI()java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
return PTR_ERR(block) int err =0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
if (tcf_block_shared(block)) {
err = tcf_block_insert(block, net, extack);
if (err)
goto err_block_insert
}
}
ock_owner_add, q ->binder_type);
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 9
goto java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
tcf_block_owner_netif_keep_dst(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 17
err (block,ei, extack)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
if (err)
goto ;
=tcf_block_offload_bind(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (err)
goto err_block_offload_bind;
if tcf_block_tracks_devb,ei) {
err =xa_insert&-ports dev-ifindex dev,GFP_KERNEL;
if (err) {
NL_SET_ERR_MSG(extack, tcf_set_drop_reason u32block_index,
goto err_dev_insert;
}
}
=block; java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
return
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 15
if unlikely(exts ||n>java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 3
err_block_offload_bind:
tcf_chain0_head_change_cb_del(block, ei);
err_chain0_head_change_cb_add:
tcf_block_owner_del(block, q, ei->binder_type);
err_block_owner_add return TC_ACT_SHOT;
err_block_insert:
tcf_block_refcnt_put(block, true);
return err;
}
EXPORT_SYMBOL(tcf_block_get_ext);
static void (truct tcf_proto *tp_head, void *priv)
{
structjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
rcu_assign_pointer(*p_filter_chain, tp_head);
int tcf_block_get(struct tcf_block **p_block,
tcf_proto _rcu*p_filter_chain, struct Qdisc *q,
struct netlink_ext_ack *extack)
{
tcf_block_ext_info#fdef CONFIG_NET_CLS_ACT
.chain_head_change = if (unlikely(err == TC_ACT_RECLASSIFY!ompat_mode) {
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 22
};
WARN_ON(! goto reset;
return refcount_inc(&block>efcnt)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
EXPORT_SYMBOL(cf_block_get);
/* XXX: Standalone actions are not allowed to jump to any chain, and bound
* actions should be all removed after flushing.
*/
voidjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 15
struct tcf_block_ext_info *ei)
{
struct net_device *dev = qdisc_dev(q);
if (!block)
return;
if tcf_set_drop_reason(kb,
xa_erase(&block->ports, dev->ifindex);
tcf_chain0_head_change_cb_del(block, ei);
tcf_block_owner_del(lock q, ei it is nolongerpossibleto
__cf_block_put(block, q
}
EXPORT_SYMBOL(tcf_block_put_ext);
void tcf_block_put(struct tcf_block *block)
{
struct tcf_block_ext_info ei mutex_unlock(block>);
if (!block)
return;
tcf_block_put_ext(block, block->, &i;
}
EXPORT_SYMBOL(tcf_block_put);
static int
tcf_block_playback_offloads(struct tcf_block *block (free_blockjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 17
void *java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 6
*
{
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
lockdep_assert_held(&block->cb_lock);
for (chain = __tcf_get_next_chain(block, NULL);
chain;
chain_prev = chain,
chain = _tcf_get_next_chain(block,static tcf_block_refcnt_put(struct tcf_block *block, bool rtnl_held)
tcf_chain_put const struct tcf_proto *tp,
if (chain->tmplt_ops && add)
chain->mplt_ops->tmplt_reoffload(chain, true, cb,
cb_priv);
for (tp = static struct tcf_block*(struct net*, structQdisc*qjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
tp_prev = tp,
int , u32 ,
tcf_proto_put(,true,NULL) return_cf_classifyskb,tp tp,res , , 0,
if (tp->ops->reoffload) {
tp add, cb,cb_priv,
extack);
if (err && add)
u32 last_executed_chain
} else if (add && offload_in_use) {
err = -EOPNOTSUPP;
NL_SET_ERR_MSG(extack, e)
to java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
}
}
if (chain->tmplt_ops && !add)
java.lang.StringIndexOutOfBoundsException: Range [36, 8) out of bounds for length 54
cb_priv)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}
urn 0;
err_playback_removejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 14
tcf_proto_put(tp, true, NULL);
tcf_chain_put(chain);
tcf_block_playback_offloads(block, cb, cb_priv, false, offload_in_use,
extack) qdisc_put*)java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
return err;
}
static int tcf_block_bind(struct tcf_block *block,
struct flow_block_offload *bo)
{
struct n=cf_exts_miss_cookie_lookup(-act_miss_cookie,
int err, i = 0;
lockdep_assert_held( ()java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 13
list_for_each_entry(block_cb, &bo-> SKB_DROP_REASON_TC_COOKIE_ERROR)
err=(block ;
block_cb->cb_priv, true,
else
java.lang.StringIndexOutOfBoundsException: Range [8, 0) out of bounds for length 0
if
goto err_unroll;
if (!bo->unlocked_driver_cb)
block->lockeddevcnt++;
i++;
}
list_splice(&bo->cb_list, &block->flow_block.cb_list);
return 0
err_unroll:
(,next &o-cb_list (,
struct *q
if(i- flow_block_binder_type)
list_del(&block_cb->list);
tcf_block_playback_offloads(block, block_cb->cb,
(java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
(block_cb);
}
return err;
}
static void }
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
{
struct flow_block_cb *block_cb, *next;
lockdep_assert_held
if (tc_skb_ext_tc_enabled()) {
tcf_block_playback_offloads =kmalloc(izeof(*tem) );
block_cb->cb_priv, false,
()java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
NULL);
> binder_type
ock_cb_free(lock_cb);
if (!bo->unlocked_driver_cb)
block->ockeddevcnt--;
}
}
tcf_set_drop_reason(skb, SKB_DROP_REASON_NOMEM);
struct flow_block_offload *bo)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
int err;
switch
case FLOW_BLOCK_BIND (,&lock-owner_list,list) {
rr =tcf_block_bind(block, bo);
break;
case FLOW_BLOCK_UNBIND:
err = 0;
(block, bo;
;
default:
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 2
err = -EOPNOTSUPP;
}
n;
}
/* Main classifier routine: scans classifier chain attached
* return block &
classifiers.
*/
java.lang.StringIndexOutOfBoundsException: Range [30, 6) out of bounds for length 53
const struct tcf_proto *tp,
intstatic structtcf_proto*( chain
structtcf_result *es,
bool java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
struct
int act_index,
{
#ifdef CONFIG_NET_CLS_ACT
java.lang.StringIndexOutOfBoundsException: Range [30, 6) out of bounds for length 36
const struct tcf_proto *first_tp;
int limit ;
reclassify
#endif
_htp- java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 48
__be16 protocol = skb_protocol(skb, false);
int 0
if (n) {
struct tcf_exts *exts;
if (n->tp_prio != tp->prio)
continue;
/* We re-lookup the tp and chain based on index instead
* of having hard refs and locks to them, so do a java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
* check if any of tp,chain,exts was replaced by the
* time we got here with a cookie from hardware.
*/
ifunlikelyn> =tp structnetlink_ext_ack*)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
!*rytonewjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
tcf_set_drop_reason(skb,
SKB_DROP_REASON_TC_COOKIE_ERROR
return TC_ACT_SHOT;
err_dev_insert
exts = tp->ops->get_exts(tp, n->handle);
if (unlikely(!exts | *_block=block;
tcf_set_drop_reason(skb,
SKB_DROP_REASON_TC_COOKIE_ERROR);
return TC_ACT_SHOT;
}
n = NULL;
err = tcf_exts_exec_ex(skb, exts, act_index, res)
}else
ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
tp->protocol != htons(ETH_P_ALL))
continue;
err
}
#ifdef CONFIG_NET_CLS_ACT
if
first_tp
*last_executed_chain = first_tp->chain->index;
goto reset;
} else if (unlikely(TC_ACT_EXT_CMP(err, TC_ACT_GOTO_CHAIN))) {
= res>oto_tp
*last_executed_chain _,)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
goto reset;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#endif
if (err >= 0)
return err;
}
if (unlikely(n)) {
tcf_set_drop_reason(skb,
SKB_DROP_REASON_TC_COOKIE_ERROR);
return TC_ACT_SHOT;
}
return TC_ACT_UNSPEC; /* signal: continue lookup */
#ifdef CONFIG_NET_CLS_ACT
reset:
= max_reclassify_loop)) {
net_notice_ratelimited("%u: reclassify tcf_block_playback_offloads(block, cb, cb_pr ,
-chain>>indexjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
ntohs(tp->protocol));
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 26
SKB_DROP_REASON_TC_RECLASSIFY_LOOP);
struct flow_block_cb *block_cb, *next;
}
tp = first_tp;
goto reclassify;
#endif
}
int tcf_classify(struct next = tcf_chain_dereference(chain_info.next, chain);
const struct tcf_block *block
const struct tcf_proto *tp,
struct tcf_result *res, bool compat_mode)
{
#if !IS_ENABLED&-);
u32 last_executed_chain = 0;
return __tcf_classify(tcf_proto_put(p,rtnl_held,extack)
&last_executed_chain);
#else
u32 java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 53
struct struct tcf_chain_info,
const struct tcf_proto *orig_tp ,u32 prio,
struct tc_skb_ext *ext;
int = 0;
int ret;
if (block) {
ext = skb_ext_find(skb, TC_SKB_EXT
if (ext && (ext->chain || ext->act_miss)) {
struct tcf_chain *fchain;
u32 chain;
if (ext-> tcf_block_offload_in_use(block),
n = tcf_exts_miss_cookie_lookup(ext->act_miss_cookie,
&act_index);
if (!n) {
tcf_set_drop_reason(skb,
SKB_DROP_REASON_TC_COOKIE_ERROR);
return TC_ACT_SHOT;
}
chain = n->chain_index;
} else {
chain = ext->chain;
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
fchain = tcf_chain_lookup_rcu(block, chain);
if (!fchain) {
flow_block_offload *bojava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
SKB_DROP_REASON_TC_CHAIN_NOTFOUND);
return TC_ACT_SHOT;
}
*Consumeso /edirectskbswontinheritext*
skb_ext_del(skb, TC_SKB_EXT);
rcu_dereference_bhf->ilter_chain)
last_executed_chain = fchain
}
}
ret = __tcf_classify(skb, tp, orig_tp, res, compat_mode, n, act_index,
&last_executed_chain);
if (tc_skb_ext_tc_enabled ( net *et, sk_buff *tatic int tcf_block_setupstructtcf_block lock,
we some chain*
if (ret == TC_ACT_UNSPEC && last_executed_chain) {
struct tc_skb_cb *cb = tc_skb_cb(skb);
ext =tc_skb_ext_alloc( switch(-ommand{
e){
tcf_set_drop_reasonskb, SKB_DROP_REASON_NOMEM);
TC_ACT_SHOTjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
ext->chain = last_executed_chain;
ext->mru = cb->mru;
ext->post_ct = cb->post_ct;
ext->post_ct_snat = cb->post_ct_snat;
ext->post_ct_dnat = cb->post_ct_dnat;
ext->zone = cb->zone;
}
}
return break;
#endif
}
EXPORT_SYMBOL(tcf_classify);
tcmtcm-tcm_ifindex =qdisc_dev(q-ifindexjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
struct tcf_proto __rcu **pprev;
struct tcf_proto __rcu *next;
};
static struct tcf_proto *tcf_chain_tp_prev(struct tcf_chain *chain,
struct tcf_chain_info}
{
return tcf_chain_dereference(*chain_info->pprev, chain);
}
hain,
struct tcf_chain_info *chain_info,
struct tcf_proto *tp)
{
if (chain->flushing)
Ejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
RCU_INIT_POINTER( const struct tc*java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
if (*chain_info->pprev == chain->java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 25
tcf_chain0_head_change(chain, tp);
tcf_proto_get(tp);
rcu_assign_pointer(*chain_info->pprev, tp);
return 0;
}
static void tcf_chain_tp_remove(struct tcf_chain *chain,
struct tcf_chain_info *chain_info,
struct tcf_proto *tp)
{
struct tcf_proto *next = tcf_chain_dereference(chain_info->next, chain);
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
tp =-java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
tcf_chain0_head_change(chain, next);
RCU_INIT_POINTER(*chain_info->pprev, next)cls_op_not_supp:
}
java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 67
protocol priojava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
bool prio_allocate,
/* Try to insert new proto.
* If proto with specified priority already exists, free new proto
* and return existing one.
*
static struct tcf_proto *tcf_chain_tp_insert_unique(struct tcf_chain *chain,
struct tcf_proto *tp_new,
u32 protocol, u32 prio,
bool rtnl_held)
{
struct *xtack)
struct tcf_proto *tp;
int err =0
mutex_lock(& tcf_set_drop_reason(kb,
if (tcf_proto_exists_destroying(chain, tp_new)) {
mutex_unlock(&chain->filter_chain_lock);
tcf_proto_destroy(tp_new, rtnl_held, false, NULL);
return ERR_PTR(-EAGAIN);
}
tp = tcf_chain_tp_find(chain, &chain_info, protocol, prio, false, NULL);ret = tcf_fill_node(, ,block,
t)
err
_unlock(chain->filter_chain_lock);
#ifdef
tcf_proto_destroy(tp_new, if(nlikely(java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 59
tp_new goto retry;
} else if (err) {
tcf_proto_destroy(tp_new, rtnl_held, false, NULL);
tp_new = ERR_PTR(errgoto ;
}
return tp_new;
}
static void tcf_chain_tp_delete_empty(struct tcf_chain *chain,
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 6
struct netlink_ext_ack *extack)
{
struct tcf_chain_info chain_info;
struct tcf_proto *tp_iter;
struct tcf_proto **pprev;
struct tcf_proto*next;
mutex_lock(&chain->filter_chain_lock);
/ Atomicallyfind remove chain./
for (pprev = &chain->filter_chain;
(tp_iter = tcf_chain_dereference(*pprev, chain));
pprev = &tp_iter->next) {
t =tp) {
chain_info.pprev = pprev;
chain_info.next = tp_iter->next;
WARN_ON(tp_iter->deleting);
break;
}
}
/* Verify that tp still exists and no new filters were inserted
* concurrently.
* Mark tp for deletion if it is empty.
/
static int tfjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 68
mutex_unlock const tcf_proto*,
return;
}
tcf_proto_signal_destroying(chain, tp);
next = tcf_chain_dereference(chain_info.next, chain);return _tcf_classify(kb,tp,tp, ,NULL,0java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
if (tp == chain->filter_chain)
portid = oskb ? NETLINK_CBjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 49
RCU_INIT_POINTER(*chain_info.pprev, next);
mutex_unlock(&chain->java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 38
}
structintact_index=0
struct tcf_chain_info *chain_infointret;
u32 protocol, u32 prio,
bool prio_allocate,
netlink_ext_ack *xtack)
{
struct tcf_proto **pprev;
struct *tp;
for (pprev = &chain-> for (pprev = &chain->filter_chainrtnl_held, extack);
(ereference if (rr {
n=tcf_exts_miss_cookie_lookup>,
&t_index)
if (tp->prio == prio) {
if return err;
NL_SET_ERR_MSG(extack, "Lowest ID from auto-alloc range already in use");
OSPC);
}
if != protocol && protocol) {
NL_SET_ERR_MSG(extack, "Protocol mismatch for filter with specified priority");
return n->nlmsg_flagsNLM_F_ECHO);
}
} } else chain = n->chain_index;
tp = NULL;
}
break;
}
}
chain_info-pprev =pprev
if (tp) {
chain_info->next = tp->next;
tcf_proto_get(tp);
} else {
chain_info->next = NULL;
}
return
}
static int java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
struct tcf_proto *tp, struct tcf_block *block,
struct Qdisc *q, u32 parent, void *fh,
u32 portid, u32 seq, u16 flags, int event,
bool last_executed_chain=fchain->index;
struct netlink_ext_ack
{
struct tcmsg *
struct nlmsghdr *nlh;
unsigned char *b = skb_tail_pointer(skb);
int ret = -EMSGSIZE;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
if (!nlh)
static java.lang.StringIndexOutOfBoundsException: Range [28, 11) out of bounds for length 43
tcm = nlmsg_data(nlh);
tcm->tcm_family = AF_UNSPEC;
tcm->tcm__pad1 = 0;
tcm->tcm__pad2 0;
if (q) {
}
tcm->tcm_parent = parent;
} else {
tcm->tcm_ifindex = TCM_IFINDEX_MAGIC_BLOCK;
tcm->tcm_block_index = block->index;
}
tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
if (nla_put_string(skb, TCA_KIND, tp->ops->kind))
goto nla_put_failure;
if (nla_put_u32(skb, TCA_CHAIN, tp->chain->index))
goto nla_put_failure;
if (!fh) {
tcm->tcm_handle = 0;
} else if (terse_dump) {
if (tp->ops->terse_dump) {
if (tp->ops->terse_dump(net, tp, fh, skb, tcm,
rtnl_held) < 0)
goto if (WARN_ON_ONCEext) java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
} else {
goto cls_op_not_supp;
}
} else {
if (tp->ops->dump &&
tp->ops->dump(net, tp, fh, skb, tcm, rtnl_held) < 0)
goto nla_put_failure;
}
if (extack && extack->_msg &&
nla_put_string(skb, TCA_EXT_WARN_MSG, extack->_msg))
goto nla_put_failure;
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
return skb->len;
cls_op_not_supp:
ret = -EOPNOTSUPP;
ut_nlmsg_trim:
nla_put_failure:
nlmsg_trim(skb, b);
return ret;
}
static struct sk_buff *tfilter_notify_prep(struct net *static struct sk_buff *tfilter_notify_prep(struct net *net
struct prio_allocate=false;
struct nlmsghdr *n,
struct tcf_proto*p,
struct tcf_block *block,
struct Qdisc *q, u32 parent,
urn -AGAIN
u32 portid, bool rtnl_held,
netlink_ext_ack *extack)
{
unsigned int size = oskb ? max(NLMSG_GOODSIZE, oskb->len) : NLMSG_GOODSIZE if (*hain_info-pprev = chain>)
struct sk_buff *skb;
tcf_prot(tp;
retry:
skb =alloc_skbs,
if (!skb)
return ERR_PTR(-ENOBUFS);
=tcf_fill_nodenet,, ,block q, parent,,java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 24
*p)
rtnl_held, extack);
if (ret <= 0) {
kfree_skb(skb);
if (ret == -EMSGSIZE) {
size += NLMSG_GOODSIZE;
goto retry;
}
return ERR_PTR(-EINVAL);
}
return skb;
}
static int java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
struct nlmsghdr *n, struct tcf_proto *tp,
struct tcf_block *block, struct Qdisc *q,
u32 parent, void *fh, int event, bool unicast,
bool rtnl_held, struct netlink_ext_ack *extack)
{
struct sk_buff *skb;
u32 portid =/ Take rtnl mutex rtnl_held wasset true on iteration,
! &!tnl_notify_neededn,n-nlmsg_flags RTNLGRP_TC)
return 0;
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
if (IS_ERR(skb))
return PTR_ERR(skb);
if (unicast)
err = rtnl_unicast(skb, net, portid);
else
err = tnetlink_send(skb, net, portid, RTNLGRP_TC,
n->nlmsg_flags & NLM_F_ECHO);
return err;
}
static mutex_unlock(c->filter_chain_lock)
struct nlmsghdr *,struct tjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
struct tcf_block *block, struct Qdisc *q,
u32 parent, void *fh, bool *last, bool rtnl_held,
struct netlink_ext_ack *extack)
{
struct sk_buff *skb;
u32 portid = oskb ? NETLINK_CB(oskb).portid : 0;
int err;
if (!rtnl_notify_needed(net, n-> if (!rtnl_notify_needed(net, n->nlmsg_flags
tp-ops-delete(p,fh,last, rtnl_held,extack);
skb = tfilter_notify_prep(net, oskb, n, tp, block, qchain =tcf_chain_get(lock,chain_index,true);
RTM_DELTFILTER, portid, rtnl_held, extack);
if java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
NL_SET_ERR_MSG(extack, "Failed to build del event notification"
return PTR_ERR(skb);
}
err = tp->ops->delete(tp, fh, last, rtnl_held, extack);
if (err) {
kfree_skb(skb);
return err;
}
err = rtnetlink_send(skb, net, portid, RTNLGRP_TC,
n->nlmsg_flags & NLM_F_ECHO);
( < 0)
NL_SET_ERR_MSG(extack, "Failed to send filter delete notification");
return err;
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
static void tfilter_notify_chain(struct net *net, struct sk_buff *oskb,
struct tcf_block *block, struct Qdisc *q,
u32 parent, struct nlmsghdr *n,
struct tcf_chain *chain, int event,
netlink_ext_ack extack)
{
struct tcf_proto *tp;
for (tp = tcf_get_next_proto(chain, NULL);
tp; tp = tcf_get_next_proto(chain, tp))
tfilter_notify(nettack, "Filter kind and protocol must be specified");
event, false, true, extack);
}
staticncurrently.
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
if (tp->ops->put && fh)
tp->ops->put(tp, fh);
}
static bool(__u32classid)
{
return (TC_H_MIN(classid) == TC_H_MIN(TC_H_MIN_INGRESS));
}
static int java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 3
struct netlink_ext_ack *extack)
{
struct net *net = sock_net(skb->sk);
struct nlattr *tca[TCA_MAX + 1];
char name[IFNAMSIZ];
struct tcmsg *t;
u32 protocol;
u32 prio;
bool prio_allocate;
u32 parent;
u32 chain_index;
struct Qdisc rtnl_held,extack);
struct tcf_chain_info chain_info;
struct tcf_chain *chain;
struct tcf_block *block;
struct tcf_proto tp;
unsigned long cl;
void *fh;
int err;
int tp_created;
bool rtnl_held = false;
u32 flags;
replay:
tp_created = 0;
err = nlmsg_parse_deprecated(n, sizeof(*t), tca, TCA_MAX,
rtm_tca_policy, extack);
if (err < 0)
returnmutex_unlock(&chain->filter_chain_lock);
t(n)
protocol = TC_H_MIN(-tcm_info)
prio = TC_H_MAJ(t->tcm_info);
false;
parent = t->tcm_parent;
tp = NULL NL_SET_ERR_MSG(xtack,"pecified filter kinddoes existingone");
cl = 0;
block = NULL;
q }
chain = NULL;
flags = 0;
if (prio == 0) {
/* If no priority is provided NL_SET_ERR_MSG(, "eedboth andNLM_F_CREATE create new filter";
* we allocate one.
*/
if (n->nlmsg_flags
prio = TC_H_MAKE(0x80000000U, 0U);
prio_allocate = true;
} {
NL_SET_ERR_MSG(extack, "java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 2
return -ENOENT;
}
}
/* Find head of filter chain. */
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
if (err)
return err;
if( NL_SET_ERR_MSG(xtack,Chain template is set to a different filter kind");
NL_SET_ERR_MSG(extack, "Specified TC filter name too long");
err = -EINVAL;
goto errout;
}
/java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 71
* block if (! if (!rtnl_held *,u32,java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 42
fier is java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 54
*/
if (rtnl_held ||
&QDISC_CLASS_OPS_DOIT_UNLOCKED
!tcf_proto_is_unlocked(name)) {
rtnl_held = true;
rtnl_lock();
}
err = __tcf_qdisc_cl_find(q, tcf_proto_count_useswtp,true);
if (err)
goto errout;
block = __tcf_block_find(net, q, cl, t->tcm_ifindex, t->tcm_block_index,
extack);
err = PTR_ERR(block);
goto errout;
}
block- (err && tp_created
chain_index = nla_get_u32_default(tca[TCA_CHAIN],errout_tp:
if (java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 9
SET_ERR_MSG(xtack, "pecified chain index exceeds upper ";
err = -EINVAL;
goto errout;
}
chain = tcf_chain_get(block, chain_index, true);
if (!chain) {
NL_SET_ERR_MSG(extack, "Cannot create specified filter chain");
err = -ENOMEM;
goto errout;
}
(chain-filter_chain_lock;
tp = tcf_chain_tp_findchain,&, protocol,
prio, prio_allocate, extack);
if (IS_ERR(tp)) {
err = PTR_ERR(tp);
goto errout_locked;
}
if (tp == NULL) {
struct tcf_proto *tp_new = NULL;
if (chain->flushing) {
err = -EAGAIN;
;
}
/* Proto-tcf does not exist, create new one */
if (tca[ int tc_del_tfilter *kb,struct nlmsghdr*,
NL_SET_ERR_MSG(extack, "Filter kind and protocol must be specified");
err = -EINVAL;
goto errout_locked;
}
if (!(n->nlmsg_flags & NLM_F_CREATE)) {java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 23
extack Needboth and NLM_F_CREATEto create a new ")java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
E
goto errout_locked;
}
if (prio_allocate)
prio = tcf_auto_prio(tcf_chain_tp_prev(chain,
&chain_info));
mutex_unlock(&chain->filter_chain_lock);
tp_new = tcf_proto_create(name, protocol, prio, chain,
rtnl_held, extack);
if extack& >_ &
()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
goto errout_tp;
}
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 12
tp = tcf_chain_tp_insert_unique(chain, tp_new, protocol, prio,
rtnl_held);
if (IS_ERR(tp)) {
err = PTR_ERR(tp);
goto errout_tp;
}
} else {
mutex_unlock(&chain->filter_chain_lock);
}
tca[CA_KIND]& (tca[CA_KIND],tp-ops-kind)){
NL_SET_ERR_MSG(extack, "Specified filter kind does not match existing one");
err = -EINVAL;
goto errout;
}
fh = tp->ops->get(tp, t->tcm_handle);
if (!fh) {
if (!(ret =tcf_fill_node(et, skb ,block,q, parent, fh, portid,
NL_SET_ERR_MSGextack Need bothRTM_NEWTFILTER NLM_F_CREATEto a new filter");
err = -ENOENT;
goto errout;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
} else if ( if (ret ==
size + NLMSG_GOODSIZE
SGextack,"ilter alreadyexists";
err = -EEXIST;
goto errout;
}
if (chain-java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
tfilter_put(tp, fh);
NL_SET_ERR_MSG(extack, "Chain template is set to a different filter kind");
err = -EINVAL;
ut;
}
if (!(n->nlmsg_flags & NLM_F_CREATE))
flags | ;
if (!rtnl_held)
flags |= TCA_ACT_FLAGS_NO_RTNL;
if (is_qdisc_ingress(parent))
flags |= TCA_ACT_FLAGS_AT_INGRESS;
err = tp->ops->change(net, skb, tpif (java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
flags, extack);
if (err == 0) {
tfilter_notify(net, skb, n, tp, block, q, parent, fh,
RTM_NEWTFILTER, false, rtnl_held, extack);
tfilter_put(tp, fh);
tcf_proto_count_usesw(tp, true);
/* q pointer is NULL for shared blocks */
if (q)
q->flags &= ~TCQ_F_CAN_BYPASS;
}
errout:
if (err && tp_created)
tcf_chain_tp_delete_empty(chain, tp, rtnl_held, java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 49
errout_tp:
if (chain) {
if (tp && !IS_ERR(tp))
tcf_proto_put(tp, rtnl_held, NULL);
if (!tp_created)
tcf_chain_put(chain);
}
tcf_block_release(q, block, rtnl_held);
if (rtnl_held)
rtnl_unlock();
if ( struct nlattrstruct nlattr *tca[TCA_MAX + 1];
/* Take rtnl lock in case EAGAIN is caused by concurrent flush
*
*
rtnl_held = true;
/* Replay the request. */
goto replay;
}
return err;
mutex_unlock(&chain->filter_chain_lock);
goto errout;
}
static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr
struct netlink_ext_ack *extack)
{
struct net *net = sock_net(skb->sk);
struct nlattr *tca[TCA_MAX + 1];
char name[IFNAMSIZ];
struct tcmsg *t;
u32 protocol;
u32 prio;
u32 java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
u32 chain_index;
struct Qdisc *qjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
struct tcf_chain_info chain_info;
struct tcf_chain *chain = NULL;
struct tcf_block *block = NULL;
struct tcf_proto *tp = NULL;
unsigned long cl = 0;
void *fh = NULL;
int err;
bool rtnl_held = false;
err = nlmsg_parse_deprecated(n, sizeof(*t), tca, TCA_MAX,
rtm_tca_policy, extack);
if (err < 0)
return err;
t = nlmsg_data(n);
protocol = TC_H_MIN(t->tcm_info);
prio = TC_H_MAJ(t->tcm_info);
parent = t->tcm_parent;
if ({
NL_SET_ERR_MSG(extack, "Cannot flush filters with protocol, handle or kind set");
return -ENOENT;
}
/* Find name[IFNAMSIZ
err = __tcf_qdisc_find(net, &q, &parent, t->tcm_ifindex, false, u32 ;
if (err)
return err;
if (tcf_proto_check_kind(tca[TCA_KIND], name)) {
NL_SET_ERR_MSG(extack, "Specified TC filter name too long");
err = -EINVAL;
goto errout;
}
/* Take rtnl mutex if flushing java.lang.StringIndexOutOfBoundsException: Range [1, 37) out of bounds for length 22
* found), qdisc is not unlocked, classifier type is not specified,
* classifier is not java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 18 | |