extern void __VERIFIER_error() __attribute__ ((__noreturn__)); /* Generated by CIL v. 1.5.1 */ /* print_CIL_Input is false */ typedef unsigned char __u8; typedef short __s16; typedef unsigned short __u16; typedef int __s32; typedef unsigned int __u32; typedef unsigned long long __u64; typedef signed char s8; typedef unsigned char u8; typedef unsigned short u16; typedef int s32; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; typedef long __kernel_long_t; typedef unsigned long __kernel_ulong_t; typedef int __kernel_pid_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef __kernel_ulong_t __kernel_size_t; typedef __kernel_long_t __kernel_ssize_t; typedef long long __kernel_loff_t; typedef __kernel_long_t __kernel_time_t; typedef __kernel_long_t __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef __u16 __be16; typedef __u32 __be32; typedef __u32 __wsum; struct module; typedef __u32 __kernel_dev_t; typedef __kernel_dev_t dev_t; typedef unsigned short umode_t; typedef __kernel_pid_t pid_t; typedef __kernel_clockid_t clockid_t; typedef _Bool bool; typedef __kernel_uid32_t uid_t; typedef __kernel_gid32_t gid_t; typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef __kernel_time_t time_t; typedef __s32 int32_t; typedef __u8 uint8_t; typedef __u32 uint32_t; typedef __u64 uint64_t; typedef unsigned long sector_t; typedef unsigned long blkcnt_t; typedef u64 dma_addr_t; typedef unsigned int gfp_t; typedef unsigned int fmode_t; typedef unsigned int oom_flags_t; struct __anonstruct_atomic_t_6 { int counter ; }; typedef struct __anonstruct_atomic_t_6 atomic_t; struct __anonstruct_atomic64_t_7 { long counter ; }; typedef struct __anonstruct_atomic64_t_7 atomic64_t; struct list_head { struct list_head *next ; struct list_head *prev ; }; struct hlist_node; struct hlist_head { struct hlist_node *first ; }; struct hlist_node { struct hlist_node *next ; struct hlist_node **pprev ; }; struct callback_head { struct callback_head *next ; void (*func)(struct callback_head * ) ; }; struct pt_regs { unsigned long r15 ; unsigned long r14 ; unsigned long r13 ; unsigned long r12 ; unsigned long bp ; unsigned long bx ; unsigned long r11 ; unsigned long r10 ; unsigned long r9 ; unsigned long r8 ; unsigned long ax ; unsigned long cx ; unsigned long dx ; unsigned long si ; unsigned long di ; unsigned long orig_ax ; unsigned long ip ; unsigned long cs ; unsigned long flags ; unsigned long sp ; unsigned long ss ; }; struct __anonstruct____missing_field_name_9 { unsigned int a ; unsigned int b ; }; struct __anonstruct____missing_field_name_10 { u16 limit0 ; u16 base0 ; unsigned char base1 ; unsigned char type : 4 ; unsigned char s : 1 ; unsigned char dpl : 2 ; unsigned char p : 1 ; unsigned char limit : 4 ; unsigned char avl : 1 ; unsigned char l : 1 ; unsigned char d : 1 ; unsigned char g : 1 ; unsigned char base2 ; }; union __anonunion____missing_field_name_8 { struct __anonstruct____missing_field_name_9 __annonCompField4 ; struct __anonstruct____missing_field_name_10 __annonCompField5 ; }; struct desc_struct { union __anonunion____missing_field_name_8 __annonCompField6 ; }; typedef unsigned long pteval_t; typedef unsigned long pgdval_t; typedef unsigned long pgprotval_t; struct __anonstruct_pte_t_11 { pteval_t pte ; }; typedef struct __anonstruct_pte_t_11 pte_t; struct pgprot { pgprotval_t pgprot ; }; typedef struct pgprot pgprot_t; struct __anonstruct_pgd_t_12 { pgdval_t pgd ; }; typedef struct __anonstruct_pgd_t_12 pgd_t; struct page; typedef struct page *pgtable_t; struct file; struct seq_file; struct thread_struct; struct mm_struct; struct task_struct; struct cpumask; struct qspinlock { atomic_t val ; }; typedef struct qspinlock arch_spinlock_t; struct qrwlock { atomic_t cnts ; arch_spinlock_t lock ; }; typedef struct qrwlock arch_rwlock_t; struct _ddebug { char const *modname ; char const *function ; char const *filename ; char const *format ; unsigned int lineno : 18 ; unsigned char flags ; }; struct device; struct net_device; struct file_operations; struct completion; struct lockdep_map; struct kernel_vm86_regs { struct pt_regs pt ; unsigned short es ; unsigned short __esh ; unsigned short ds ; unsigned short __dsh ; unsigned short fs ; unsigned short __fsh ; unsigned short gs ; unsigned short __gsh ; }; union __anonunion____missing_field_name_15 { struct pt_regs *regs ; struct kernel_vm86_regs *vm86 ; }; struct math_emu_info { long ___orig_eip ; union __anonunion____missing_field_name_15 __annonCompField7 ; }; struct cpumask { unsigned long bits[128U] ; }; typedef struct cpumask cpumask_t; typedef struct cpumask *cpumask_var_t; struct fregs_state { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u32 status ; }; struct __anonstruct____missing_field_name_25 { u64 rip ; u64 rdp ; }; struct __anonstruct____missing_field_name_26 { u32 fip ; u32 fcs ; u32 foo ; u32 fos ; }; union __anonunion____missing_field_name_24 { struct __anonstruct____missing_field_name_25 __annonCompField11 ; struct __anonstruct____missing_field_name_26 __annonCompField12 ; }; union __anonunion____missing_field_name_27 { u32 padding1[12U] ; u32 sw_reserved[12U] ; }; struct fxregs_state { u16 cwd ; u16 swd ; u16 twd ; u16 fop ; union __anonunion____missing_field_name_24 __annonCompField13 ; u32 mxcsr ; u32 mxcsr_mask ; u32 st_space[32U] ; u32 xmm_space[64U] ; u32 padding[12U] ; union __anonunion____missing_field_name_27 __annonCompField14 ; }; struct swregs_state { u32 cwd ; u32 swd ; u32 twd ; u32 fip ; u32 fcs ; u32 foo ; u32 fos ; u32 st_space[20U] ; u8 ftop ; u8 changed ; u8 lookahead ; u8 no_update ; u8 rm ; u8 alimit ; struct math_emu_info *info ; u32 entry_eip ; }; struct xstate_header { u64 xfeatures ; u64 xcomp_bv ; u64 reserved[6U] ; }; struct xregs_state { struct fxregs_state i387 ; struct xstate_header header ; u8 __reserved[464U] ; }; union fpregs_state { struct fregs_state fsave ; struct fxregs_state fxsave ; struct swregs_state soft ; struct xregs_state xsave ; }; struct fpu { union fpregs_state state ; unsigned int last_cpu ; unsigned char fpstate_active ; unsigned char fpregs_active ; unsigned char counter ; }; struct seq_operations; struct perf_event; struct thread_struct { struct desc_struct tls_array[3U] ; unsigned long sp0 ; unsigned long sp ; unsigned short es ; unsigned short ds ; unsigned short fsindex ; unsigned short gsindex ; unsigned long fs ; unsigned long gs ; struct fpu fpu ; struct perf_event *ptrace_bps[4U] ; unsigned long debugreg6 ; unsigned long ptrace_dr7 ; unsigned long cr2 ; unsigned long trap_nr ; unsigned long error_code ; unsigned long *io_bitmap_ptr ; unsigned long iopl ; unsigned int io_bitmap_max ; }; typedef atomic64_t atomic_long_t; struct stack_trace { unsigned int nr_entries ; unsigned int max_entries ; unsigned long *entries ; int skip ; }; struct lockdep_subclass_key { char __one_byte ; }; struct lock_class_key { struct lockdep_subclass_key subkeys[8U] ; }; struct lock_class { struct list_head hash_entry ; struct list_head lock_entry ; struct lockdep_subclass_key *key ; unsigned int subclass ; unsigned int dep_gen_id ; unsigned long usage_mask ; struct stack_trace usage_traces[13U] ; struct list_head locks_after ; struct list_head locks_before ; unsigned int version ; unsigned long ops ; char const *name ; int name_version ; unsigned long contention_point[4U] ; unsigned long contending_point[4U] ; }; struct lockdep_map { struct lock_class_key *key ; struct lock_class *class_cache[2U] ; char const *name ; int cpu ; unsigned long ip ; }; struct held_lock { u64 prev_chain_key ; unsigned long acquire_ip ; struct lockdep_map *instance ; struct lockdep_map *nest_lock ; u64 waittime_stamp ; u64 holdtime_stamp ; unsigned short class_idx : 13 ; unsigned char irq_context : 2 ; unsigned char trylock : 1 ; unsigned char read : 2 ; unsigned char check : 1 ; unsigned char hardirqs_off : 1 ; unsigned short references : 12 ; unsigned int pin_count ; }; struct raw_spinlock { arch_spinlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct raw_spinlock raw_spinlock_t; struct __anonstruct____missing_field_name_31 { u8 __padding[24U] ; struct lockdep_map dep_map ; }; union __anonunion____missing_field_name_30 { struct raw_spinlock rlock ; struct __anonstruct____missing_field_name_31 __annonCompField16 ; }; struct spinlock { union __anonunion____missing_field_name_30 __annonCompField17 ; }; typedef struct spinlock spinlock_t; struct __anonstruct_rwlock_t_32 { arch_rwlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_rwlock_t_32 rwlock_t; struct optimistic_spin_queue { atomic_t tail ; }; struct mutex { atomic_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct task_struct *owner ; void *magic ; struct lockdep_map dep_map ; }; struct mutex_waiter { struct list_head list ; struct task_struct *task ; void *magic ; }; struct timespec; struct compat_timespec; struct __anonstruct_futex_34 { u32 *uaddr ; u32 val ; u32 flags ; u32 bitset ; u64 time ; u32 *uaddr2 ; }; struct __anonstruct_nanosleep_35 { clockid_t clockid ; struct timespec *rmtp ; struct compat_timespec *compat_rmtp ; u64 expires ; }; struct pollfd; struct __anonstruct_poll_36 { struct pollfd *ufds ; int nfds ; int has_timeout ; unsigned long tv_sec ; unsigned long tv_nsec ; }; union __anonunion____missing_field_name_33 { struct __anonstruct_futex_34 futex ; struct __anonstruct_nanosleep_35 nanosleep ; struct __anonstruct_poll_36 poll ; }; struct restart_block { long (*fn)(struct restart_block * ) ; union __anonunion____missing_field_name_33 __annonCompField18 ; }; struct seqcount { unsigned int sequence ; struct lockdep_map dep_map ; }; typedef struct seqcount seqcount_t; struct __anonstruct_seqlock_t_45 { struct seqcount seqcount ; spinlock_t lock ; }; typedef struct __anonstruct_seqlock_t_45 seqlock_t; struct timespec { __kernel_time_t tv_sec ; long tv_nsec ; }; union ktime { s64 tv64 ; }; typedef union ktime ktime_t; struct timer_list { struct hlist_node entry ; unsigned long expires ; void (*function)(unsigned long ) ; unsigned long data ; u32 flags ; int slack ; int start_pid ; void *start_site ; char start_comm[16U] ; struct lockdep_map lockdep_map ; }; struct hrtimer; enum hrtimer_restart; struct __wait_queue_head { spinlock_t lock ; struct list_head task_list ; }; typedef struct __wait_queue_head wait_queue_head_t; struct completion { unsigned int done ; wait_queue_head_t wait ; }; struct notifier_block; struct rb_node { unsigned long __rb_parent_color ; struct rb_node *rb_right ; struct rb_node *rb_left ; }; struct rb_root { struct rb_node *rb_node ; }; struct ctl_table; struct nsproxy; struct ctl_table_root; struct ctl_table_header; struct ctl_dir; typedef int proc_handler(struct ctl_table * , int , void * , size_t * , loff_t * ); struct ctl_table_poll { atomic_t event ; wait_queue_head_t wait ; }; struct ctl_table { char const *procname ; void *data ; int maxlen ; umode_t mode ; struct ctl_table *child ; proc_handler *proc_handler ; struct ctl_table_poll *poll ; void *extra1 ; void *extra2 ; }; struct ctl_node { struct rb_node node ; struct ctl_table_header *header ; }; struct __anonstruct____missing_field_name_47 { struct ctl_table *ctl_table ; int used ; int count ; int nreg ; }; union __anonunion____missing_field_name_46 { struct __anonstruct____missing_field_name_47 __annonCompField19 ; struct callback_head rcu ; }; struct ctl_table_set; struct ctl_table_header { union __anonunion____missing_field_name_46 __annonCompField20 ; struct completion *unregistering ; struct ctl_table *ctl_table_arg ; struct ctl_table_root *root ; struct ctl_table_set *set ; struct ctl_dir *parent ; struct ctl_node *node ; }; struct ctl_dir { struct ctl_table_header header ; struct rb_root root ; }; struct ctl_table_set { int (*is_seen)(struct ctl_table_set * ) ; struct ctl_dir dir ; }; struct ctl_table_root { struct ctl_table_set default_set ; struct ctl_table_set *(*lookup)(struct ctl_table_root * , struct nsproxy * ) ; int (*permissions)(struct ctl_table_header * , struct ctl_table * ) ; }; struct workqueue_struct; struct work_struct; struct work_struct { atomic_long_t data ; struct list_head entry ; void (*func)(struct work_struct * ) ; struct lockdep_map lockdep_map ; }; struct delayed_work { struct work_struct work ; struct timer_list timer ; struct workqueue_struct *wq ; int cpu ; }; struct vm_area_struct; struct __anonstruct_nodemask_t_48 { unsigned long bits[16U] ; }; typedef struct __anonstruct_nodemask_t_48 nodemask_t; struct rw_semaphore; struct rw_semaphore { long count ; struct list_head wait_list ; raw_spinlock_t wait_lock ; struct optimistic_spin_queue osq ; struct task_struct *owner ; struct lockdep_map dep_map ; }; struct notifier_block { int (*notifier_call)(struct notifier_block * , unsigned long , void * ) ; struct notifier_block *next ; int priority ; }; struct pm_message { int event ; }; typedef struct pm_message pm_message_t; struct dev_pm_ops { int (*prepare)(struct device * ) ; void (*complete)(struct device * ) ; int (*suspend)(struct device * ) ; int (*resume)(struct device * ) ; int (*freeze)(struct device * ) ; int (*thaw)(struct device * ) ; int (*poweroff)(struct device * ) ; int (*restore)(struct device * ) ; int (*suspend_late)(struct device * ) ; int (*resume_early)(struct device * ) ; int (*freeze_late)(struct device * ) ; int (*thaw_early)(struct device * ) ; int (*poweroff_late)(struct device * ) ; int (*restore_early)(struct device * ) ; int (*suspend_noirq)(struct device * ) ; int (*resume_noirq)(struct device * ) ; int (*freeze_noirq)(struct device * ) ; int (*thaw_noirq)(struct device * ) ; int (*poweroff_noirq)(struct device * ) ; int (*restore_noirq)(struct device * ) ; int (*runtime_suspend)(struct device * ) ; int (*runtime_resume)(struct device * ) ; int (*runtime_idle)(struct device * ) ; }; enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ; enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_AUTOSUSPEND = 3, RPM_REQ_RESUME = 4 } ; struct wakeup_source; struct wake_irq; struct pm_subsys_data { spinlock_t lock ; unsigned int refcount ; struct list_head clock_list ; }; struct dev_pm_qos; struct dev_pm_info { pm_message_t power_state ; unsigned char can_wakeup : 1 ; unsigned char async_suspend : 1 ; bool is_prepared ; bool is_suspended ; bool is_noirq_suspended ; bool is_late_suspended ; bool ignore_children ; bool early_init ; bool direct_complete ; spinlock_t lock ; struct list_head entry ; struct completion completion ; struct wakeup_source *wakeup ; bool wakeup_path ; bool syscore ; struct timer_list suspend_timer ; unsigned long timer_expires ; struct work_struct work ; wait_queue_head_t wait_queue ; struct wake_irq *wakeirq ; atomic_t usage_count ; atomic_t child_count ; unsigned char disable_depth : 3 ; unsigned char idle_notification : 1 ; unsigned char request_pending : 1 ; unsigned char deferred_resume : 1 ; unsigned char run_wake : 1 ; unsigned char runtime_auto : 1 ; unsigned char no_callbacks : 1 ; unsigned char irq_safe : 1 ; unsigned char use_autosuspend : 1 ; unsigned char timer_autosuspends : 1 ; unsigned char memalloc_noio : 1 ; enum rpm_request request ; enum rpm_status runtime_status ; int runtime_error ; int autosuspend_delay ; unsigned long last_busy ; unsigned long active_jiffies ; unsigned long suspended_jiffies ; unsigned long accounting_timestamp ; struct pm_subsys_data *subsys_data ; void (*set_latency_tolerance)(struct device * , s32 ) ; struct dev_pm_qos *qos ; }; struct dev_pm_domain { struct dev_pm_ops ops ; void (*detach)(struct device * , bool ) ; int (*activate)(struct device * ) ; void (*sync)(struct device * ) ; void (*dismiss)(struct device * ) ; }; struct __anonstruct_mm_context_t_113 { void *ldt ; int size ; unsigned short ia32_compat ; struct mutex lock ; void *vdso ; atomic_t perf_rdpmc_allowed ; }; typedef struct __anonstruct_mm_context_t_113 mm_context_t; struct bio_vec; struct llist_node; struct llist_node { struct llist_node *next ; }; struct call_single_data { struct llist_node llist ; void (*func)(void * ) ; void *info ; unsigned int flags ; }; struct kmem_cache; struct kernel_cap_struct { __u32 cap[2U] ; }; typedef struct kernel_cap_struct kernel_cap_t; struct inode; struct dentry; struct user_namespace; struct plist_node { int prio ; struct list_head prio_list ; struct list_head node_list ; }; struct arch_uprobe_task { unsigned long saved_scratch_register ; unsigned int saved_trap_nr ; unsigned int saved_tf ; }; enum uprobe_task_state { UTASK_RUNNING = 0, UTASK_SSTEP = 1, UTASK_SSTEP_ACK = 2, UTASK_SSTEP_TRAPPED = 3 } ; struct __anonstruct____missing_field_name_146 { struct arch_uprobe_task autask ; unsigned long vaddr ; }; struct __anonstruct____missing_field_name_147 { struct callback_head dup_xol_work ; unsigned long dup_xol_addr ; }; union __anonunion____missing_field_name_145 { struct __anonstruct____missing_field_name_146 __annonCompField33 ; struct __anonstruct____missing_field_name_147 __annonCompField34 ; }; struct uprobe; struct return_instance; struct uprobe_task { enum uprobe_task_state state ; union __anonunion____missing_field_name_145 __annonCompField35 ; struct uprobe *active_uprobe ; unsigned long xol_vaddr ; struct return_instance *return_instances ; unsigned int depth ; }; struct xol_area; struct uprobes_state { struct xol_area *xol_area ; }; struct address_space; struct mem_cgroup; typedef void compound_page_dtor(struct page * ); union __anonunion____missing_field_name_148 { struct address_space *mapping ; void *s_mem ; }; union __anonunion____missing_field_name_150 { unsigned long index ; void *freelist ; bool pfmemalloc ; }; struct __anonstruct____missing_field_name_154 { unsigned short inuse ; unsigned short objects : 15 ; unsigned char frozen : 1 ; }; union __anonunion____missing_field_name_153 { atomic_t _mapcount ; struct __anonstruct____missing_field_name_154 __annonCompField38 ; int units ; }; struct __anonstruct____missing_field_name_152 { union __anonunion____missing_field_name_153 __annonCompField39 ; atomic_t _count ; }; union __anonunion____missing_field_name_151 { unsigned long counters ; struct __anonstruct____missing_field_name_152 __annonCompField40 ; unsigned int active ; }; struct __anonstruct____missing_field_name_149 { union __anonunion____missing_field_name_150 __annonCompField37 ; union __anonunion____missing_field_name_151 __annonCompField41 ; }; struct __anonstruct____missing_field_name_156 { struct page *next ; int pages ; int pobjects ; }; struct slab; struct __anonstruct____missing_field_name_157 { compound_page_dtor *compound_dtor ; unsigned long compound_order ; }; union __anonunion____missing_field_name_155 { struct list_head lru ; struct __anonstruct____missing_field_name_156 __annonCompField43 ; struct slab *slab_page ; struct callback_head callback_head ; struct __anonstruct____missing_field_name_157 __annonCompField44 ; pgtable_t pmd_huge_pte ; }; union __anonunion____missing_field_name_158 { unsigned long private ; spinlock_t *ptl ; struct kmem_cache *slab_cache ; struct page *first_page ; }; struct page { unsigned long flags ; union __anonunion____missing_field_name_148 __annonCompField36 ; struct __anonstruct____missing_field_name_149 __annonCompField42 ; union __anonunion____missing_field_name_155 __annonCompField45 ; union __anonunion____missing_field_name_158 __annonCompField46 ; struct mem_cgroup *mem_cgroup ; }; struct page_frag { struct page *page ; __u32 offset ; __u32 size ; }; struct __anonstruct_shared_159 { struct rb_node rb ; unsigned long rb_subtree_last ; }; struct anon_vma; struct vm_operations_struct; struct mempolicy; struct vm_area_struct { unsigned long vm_start ; unsigned long vm_end ; struct vm_area_struct *vm_next ; struct vm_area_struct *vm_prev ; struct rb_node vm_rb ; unsigned long rb_subtree_gap ; struct mm_struct *vm_mm ; pgprot_t vm_page_prot ; unsigned long vm_flags ; struct __anonstruct_shared_159 shared ; struct list_head anon_vma_chain ; struct anon_vma *anon_vma ; struct vm_operations_struct const *vm_ops ; unsigned long vm_pgoff ; struct file *vm_file ; void *vm_private_data ; struct mempolicy *vm_policy ; }; struct core_thread { struct task_struct *task ; struct core_thread *next ; }; struct core_state { atomic_t nr_threads ; struct core_thread dumper ; struct completion startup ; }; struct task_rss_stat { int events ; int count[3U] ; }; struct mm_rss_stat { atomic_long_t count[3U] ; }; struct kioctx_table; struct linux_binfmt; struct mmu_notifier_mm; struct mm_struct { struct vm_area_struct *mmap ; struct rb_root mm_rb ; u32 vmacache_seqnum ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; unsigned long mmap_base ; unsigned long mmap_legacy_base ; unsigned long task_size ; unsigned long highest_vm_end ; pgd_t *pgd ; atomic_t mm_users ; atomic_t mm_count ; atomic_long_t nr_ptes ; atomic_long_t nr_pmds ; int map_count ; spinlock_t page_table_lock ; struct rw_semaphore mmap_sem ; struct list_head mmlist ; unsigned long hiwater_rss ; unsigned long hiwater_vm ; unsigned long total_vm ; unsigned long locked_vm ; unsigned long pinned_vm ; unsigned long shared_vm ; unsigned long exec_vm ; unsigned long stack_vm ; unsigned long def_flags ; unsigned long start_code ; unsigned long end_code ; unsigned long start_data ; unsigned long end_data ; unsigned long start_brk ; unsigned long brk ; unsigned long start_stack ; unsigned long arg_start ; unsigned long arg_end ; unsigned long env_start ; unsigned long env_end ; unsigned long saved_auxv[46U] ; struct mm_rss_stat rss_stat ; struct linux_binfmt *binfmt ; cpumask_var_t cpu_vm_mask_var ; mm_context_t context ; unsigned long flags ; struct core_state *core_state ; spinlock_t ioctx_lock ; struct kioctx_table *ioctx_table ; struct task_struct *owner ; struct file *exe_file ; struct mmu_notifier_mm *mmu_notifier_mm ; struct cpumask cpumask_allocation ; unsigned long numa_next_scan ; unsigned long numa_scan_offset ; int numa_scan_seq ; bool tlb_flush_pending ; struct uprobes_state uprobes_state ; void *bd_addr ; }; typedef unsigned long cputime_t; struct __anonstruct_kuid_t_161 { uid_t val ; }; typedef struct __anonstruct_kuid_t_161 kuid_t; struct __anonstruct_kgid_t_162 { gid_t val ; }; typedef struct __anonstruct_kgid_t_162 kgid_t; struct sem_undo_list; struct sysv_sem { struct sem_undo_list *undo_list ; }; struct user_struct; struct sysv_shm { struct list_head shm_clist ; }; struct __anonstruct_sigset_t_163 { unsigned long sig[1U] ; }; typedef struct __anonstruct_sigset_t_163 sigset_t; struct siginfo; typedef void __signalfn_t(int ); typedef __signalfn_t *__sighandler_t; typedef void __restorefn_t(void); typedef __restorefn_t *__sigrestore_t; union sigval { int sival_int ; void *sival_ptr ; }; typedef union sigval sigval_t; struct __anonstruct__kill_165 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; }; struct __anonstruct__timer_166 { __kernel_timer_t _tid ; int _overrun ; char _pad[0U] ; sigval_t _sigval ; int _sys_private ; }; struct __anonstruct__rt_167 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; sigval_t _sigval ; }; struct __anonstruct__sigchld_168 { __kernel_pid_t _pid ; __kernel_uid32_t _uid ; int _status ; __kernel_clock_t _utime ; __kernel_clock_t _stime ; }; struct __anonstruct__addr_bnd_170 { void *_lower ; void *_upper ; }; struct __anonstruct__sigfault_169 { void *_addr ; short _addr_lsb ; struct __anonstruct__addr_bnd_170 _addr_bnd ; }; struct __anonstruct__sigpoll_171 { long _band ; int _fd ; }; struct __anonstruct__sigsys_172 { void *_call_addr ; int _syscall ; unsigned int _arch ; }; union __anonunion__sifields_164 { int _pad[28U] ; struct __anonstruct__kill_165 _kill ; struct __anonstruct__timer_166 _timer ; struct __anonstruct__rt_167 _rt ; struct __anonstruct__sigchld_168 _sigchld ; struct __anonstruct__sigfault_169 _sigfault ; struct __anonstruct__sigpoll_171 _sigpoll ; struct __anonstruct__sigsys_172 _sigsys ; }; struct siginfo { int si_signo ; int si_errno ; int si_code ; union __anonunion__sifields_164 _sifields ; }; typedef struct siginfo siginfo_t; struct sigpending { struct list_head list ; sigset_t signal ; }; struct sigaction { __sighandler_t sa_handler ; unsigned long sa_flags ; __sigrestore_t sa_restorer ; sigset_t sa_mask ; }; struct k_sigaction { struct sigaction sa ; }; enum pid_type { PIDTYPE_PID = 0, PIDTYPE_PGID = 1, PIDTYPE_SID = 2, PIDTYPE_MAX = 3 } ; struct pid_namespace; struct upid { int nr ; struct pid_namespace *ns ; struct hlist_node pid_chain ; }; struct pid { atomic_t count ; unsigned int level ; struct hlist_head tasks[3U] ; struct callback_head rcu ; struct upid numbers[1U] ; }; struct pid_link { struct hlist_node node ; struct pid *pid ; }; struct percpu_counter { raw_spinlock_t lock ; s64 count ; struct list_head list ; s32 *counters ; }; struct seccomp_filter; struct seccomp { int mode ; struct seccomp_filter *filter ; }; struct rt_mutex_waiter; struct rlimit { __kernel_ulong_t rlim_cur ; __kernel_ulong_t rlim_max ; }; struct timerqueue_node { struct rb_node node ; ktime_t expires ; }; struct timerqueue_head { struct rb_root head ; struct timerqueue_node *next ; }; struct hrtimer_clock_base; struct hrtimer_cpu_base; enum hrtimer_restart { HRTIMER_NORESTART = 0, HRTIMER_RESTART = 1 } ; struct hrtimer { struct timerqueue_node node ; ktime_t _softexpires ; enum hrtimer_restart (*function)(struct hrtimer * ) ; struct hrtimer_clock_base *base ; unsigned long state ; int start_pid ; void *start_site ; char start_comm[16U] ; }; struct hrtimer_clock_base { struct hrtimer_cpu_base *cpu_base ; int index ; clockid_t clockid ; struct timerqueue_head active ; ktime_t (*get_time)(void) ; ktime_t offset ; }; struct hrtimer_cpu_base { raw_spinlock_t lock ; seqcount_t seq ; struct hrtimer *running ; unsigned int cpu ; unsigned int active_bases ; unsigned int clock_was_set_seq ; bool migration_enabled ; bool nohz_active ; unsigned char in_hrtirq : 1 ; unsigned char hres_active : 1 ; unsigned char hang_detected : 1 ; ktime_t expires_next ; struct hrtimer *next_timer ; unsigned int nr_events ; unsigned int nr_retries ; unsigned int nr_hangs ; unsigned int max_hang_time ; struct hrtimer_clock_base clock_base[4U] ; }; struct task_io_accounting { u64 rchar ; u64 wchar ; u64 syscr ; u64 syscw ; u64 read_bytes ; u64 write_bytes ; u64 cancelled_write_bytes ; }; struct latency_record { unsigned long backtrace[12U] ; unsigned int count ; unsigned long time ; unsigned long max ; }; struct assoc_array_ptr; struct assoc_array { struct assoc_array_ptr *root ; unsigned long nr_leaves_on_tree ; }; typedef int32_t key_serial_t; typedef uint32_t key_perm_t; struct key; struct signal_struct; struct cred; struct key_type; struct keyring_index_key { struct key_type *type ; char const *description ; size_t desc_len ; }; union __anonunion____missing_field_name_179 { struct list_head graveyard_link ; struct rb_node serial_node ; }; struct key_user; union __anonunion____missing_field_name_180 { time_t expiry ; time_t revoked_at ; }; struct __anonstruct____missing_field_name_182 { struct key_type *type ; char *description ; }; union __anonunion____missing_field_name_181 { struct keyring_index_key index_key ; struct __anonstruct____missing_field_name_182 __annonCompField49 ; }; union __anonunion_type_data_183 { struct list_head link ; unsigned long x[2U] ; void *p[2U] ; int reject_error ; }; union __anonunion_payload_185 { unsigned long value ; void *rcudata ; void *data ; void *data2[2U] ; }; union __anonunion____missing_field_name_184 { union __anonunion_payload_185 payload ; struct assoc_array keys ; }; struct key { atomic_t usage ; key_serial_t serial ; union __anonunion____missing_field_name_179 __annonCompField47 ; struct rw_semaphore sem ; struct key_user *user ; void *security ; union __anonunion____missing_field_name_180 __annonCompField48 ; time_t last_used_at ; kuid_t uid ; kgid_t gid ; key_perm_t perm ; unsigned short quotalen ; unsigned short datalen ; unsigned long flags ; union __anonunion____missing_field_name_181 __annonCompField50 ; union __anonunion_type_data_183 type_data ; union __anonunion____missing_field_name_184 __annonCompField51 ; }; struct audit_context; struct group_info { atomic_t usage ; int ngroups ; int nblocks ; kgid_t small_block[32U] ; kgid_t *blocks[0U] ; }; struct cred { atomic_t usage ; atomic_t subscribers ; void *put_addr ; unsigned int magic ; kuid_t uid ; kgid_t gid ; kuid_t suid ; kgid_t sgid ; kuid_t euid ; kgid_t egid ; kuid_t fsuid ; kgid_t fsgid ; unsigned int securebits ; kernel_cap_t cap_inheritable ; kernel_cap_t cap_permitted ; kernel_cap_t cap_effective ; kernel_cap_t cap_bset ; unsigned char jit_keyring ; struct key *session_keyring ; struct key *process_keyring ; struct key *thread_keyring ; struct key *request_key_auth ; void *security ; struct user_struct *user ; struct user_namespace *user_ns ; struct group_info *group_info ; struct callback_head rcu ; }; union __anonunion____missing_field_name_186 { unsigned long bitmap[4U] ; struct callback_head callback_head ; }; struct idr_layer { int prefix ; int layer ; struct idr_layer *ary[256U] ; int count ; union __anonunion____missing_field_name_186 __annonCompField52 ; }; struct idr { struct idr_layer *hint ; struct idr_layer *top ; int layers ; int cur ; spinlock_t lock ; int id_free_cnt ; struct idr_layer *id_free ; }; struct ida_bitmap { long nr_busy ; unsigned long bitmap[15U] ; }; struct ida { struct idr idr ; struct ida_bitmap *free_bitmap ; }; struct percpu_ref; typedef void percpu_ref_func_t(struct percpu_ref * ); struct percpu_ref { atomic_long_t count ; unsigned long percpu_count_ptr ; percpu_ref_func_t *release ; percpu_ref_func_t *confirm_switch ; bool force_atomic ; struct callback_head rcu ; }; struct cgroup; struct cgroup_root; struct cgroup_subsys; struct cgroup_taskset; struct kernfs_node; struct kernfs_ops; struct kernfs_open_file; struct cgroup_subsys_state { struct cgroup *cgroup ; struct cgroup_subsys *ss ; struct percpu_ref refcnt ; struct cgroup_subsys_state *parent ; struct list_head sibling ; struct list_head children ; int id ; unsigned int flags ; u64 serial_nr ; struct callback_head callback_head ; struct work_struct destroy_work ; }; struct css_set { atomic_t refcount ; struct hlist_node hlist ; struct list_head tasks ; struct list_head mg_tasks ; struct list_head cgrp_links ; struct cgroup *dfl_cgrp ; struct cgroup_subsys_state *subsys[12U] ; struct list_head mg_preload_node ; struct list_head mg_node ; struct cgroup *mg_src_cgrp ; struct css_set *mg_dst_cset ; struct list_head e_cset_node[12U] ; struct callback_head callback_head ; }; struct cgroup { struct cgroup_subsys_state self ; unsigned long flags ; int id ; int populated_cnt ; struct kernfs_node *kn ; struct kernfs_node *procs_kn ; struct kernfs_node *populated_kn ; unsigned int subtree_control ; unsigned int child_subsys_mask ; struct cgroup_subsys_state *subsys[12U] ; struct cgroup_root *root ; struct list_head cset_links ; struct list_head e_csets[12U] ; struct list_head pidlists ; struct mutex pidlist_mutex ; wait_queue_head_t offline_waitq ; struct work_struct release_agent_work ; }; struct kernfs_root; struct cgroup_root { struct kernfs_root *kf_root ; unsigned int subsys_mask ; int hierarchy_id ; struct cgroup cgrp ; atomic_t nr_cgrps ; struct list_head root_list ; unsigned int flags ; struct idr cgroup_idr ; char release_agent_path[4096U] ; char name[64U] ; }; struct cftype { char name[64U] ; int private ; umode_t mode ; size_t max_write_len ; unsigned int flags ; struct cgroup_subsys *ss ; struct list_head node ; struct kernfs_ops *kf_ops ; u64 (*read_u64)(struct cgroup_subsys_state * , struct cftype * ) ; s64 (*read_s64)(struct cgroup_subsys_state * , struct cftype * ) ; int (*seq_show)(struct seq_file * , void * ) ; void *(*seq_start)(struct seq_file * , loff_t * ) ; void *(*seq_next)(struct seq_file * , void * , loff_t * ) ; void (*seq_stop)(struct seq_file * , void * ) ; int (*write_u64)(struct cgroup_subsys_state * , struct cftype * , u64 ) ; int (*write_s64)(struct cgroup_subsys_state * , struct cftype * , s64 ) ; ssize_t (*write)(struct kernfs_open_file * , char * , size_t , loff_t ) ; struct lock_class_key lockdep_key ; }; struct cgroup_subsys { struct cgroup_subsys_state *(*css_alloc)(struct cgroup_subsys_state * ) ; int (*css_online)(struct cgroup_subsys_state * ) ; void (*css_offline)(struct cgroup_subsys_state * ) ; void (*css_released)(struct cgroup_subsys_state * ) ; void (*css_free)(struct cgroup_subsys_state * ) ; void (*css_reset)(struct cgroup_subsys_state * ) ; void (*css_e_css_changed)(struct cgroup_subsys_state * ) ; int (*can_attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*cancel_attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*attach)(struct cgroup_subsys_state * , struct cgroup_taskset * ) ; void (*fork)(struct task_struct * ) ; void (*exit)(struct cgroup_subsys_state * , struct cgroup_subsys_state * , struct task_struct * ) ; void (*bind)(struct cgroup_subsys_state * ) ; int disabled ; int early_init ; bool broken_hierarchy ; bool warned_broken_hierarchy ; int id ; char const *name ; struct cgroup_root *root ; struct idr css_idr ; struct list_head cfts ; struct cftype *dfl_cftypes ; struct cftype *legacy_cftypes ; unsigned int depends_on ; }; struct futex_pi_state; struct robust_list_head; struct bio_list; struct fs_struct; struct perf_event_context; struct blk_plug; struct nameidata; struct cfs_rq; struct task_group; struct sighand_struct { atomic_t count ; struct k_sigaction action[64U] ; spinlock_t siglock ; wait_queue_head_t signalfd_wqh ; }; struct pacct_struct { int ac_flag ; long ac_exitcode ; unsigned long ac_mem ; cputime_t ac_utime ; cputime_t ac_stime ; unsigned long ac_minflt ; unsigned long ac_majflt ; }; struct cpu_itimer { cputime_t expires ; cputime_t incr ; u32 error ; u32 incr_error ; }; struct cputime { cputime_t utime ; cputime_t stime ; }; struct task_cputime { cputime_t utime ; cputime_t stime ; unsigned long long sum_exec_runtime ; }; struct task_cputime_atomic { atomic64_t utime ; atomic64_t stime ; atomic64_t sum_exec_runtime ; }; struct thread_group_cputimer { struct task_cputime_atomic cputime_atomic ; int running ; }; struct autogroup; struct tty_struct; struct taskstats; struct tty_audit_buf; struct signal_struct { atomic_t sigcnt ; atomic_t live ; int nr_threads ; struct list_head thread_head ; wait_queue_head_t wait_chldexit ; struct task_struct *curr_target ; struct sigpending shared_pending ; int group_exit_code ; int notify_count ; struct task_struct *group_exit_task ; int group_stop_count ; unsigned int flags ; unsigned char is_child_subreaper : 1 ; unsigned char has_child_subreaper : 1 ; int posix_timer_id ; struct list_head posix_timers ; struct hrtimer real_timer ; struct pid *leader_pid ; ktime_t it_real_incr ; struct cpu_itimer it[2U] ; struct thread_group_cputimer cputimer ; struct task_cputime cputime_expires ; struct list_head cpu_timers[3U] ; struct pid *tty_old_pgrp ; int leader ; struct tty_struct *tty ; struct autogroup *autogroup ; seqlock_t stats_lock ; cputime_t utime ; cputime_t stime ; cputime_t cutime ; cputime_t cstime ; cputime_t gtime ; cputime_t cgtime ; struct cputime prev_cputime ; unsigned long nvcsw ; unsigned long nivcsw ; unsigned long cnvcsw ; unsigned long cnivcsw ; unsigned long min_flt ; unsigned long maj_flt ; unsigned long cmin_flt ; unsigned long cmaj_flt ; unsigned long inblock ; unsigned long oublock ; unsigned long cinblock ; unsigned long coublock ; unsigned long maxrss ; unsigned long cmaxrss ; struct task_io_accounting ioac ; unsigned long long sum_sched_runtime ; struct rlimit rlim[16U] ; struct pacct_struct pacct ; struct taskstats *stats ; unsigned int audit_tty ; unsigned int audit_tty_log_passwd ; struct tty_audit_buf *tty_audit_buf ; oom_flags_t oom_flags ; short oom_score_adj ; short oom_score_adj_min ; struct mutex cred_guard_mutex ; }; struct user_struct { atomic_t __count ; atomic_t processes ; atomic_t sigpending ; atomic_t inotify_watches ; atomic_t inotify_devs ; atomic_t fanotify_listeners ; atomic_long_t epoll_watches ; unsigned long mq_bytes ; unsigned long locked_shm ; struct key *uid_keyring ; struct key *session_keyring ; struct hlist_node uidhash_node ; kuid_t uid ; atomic_long_t locked_vm ; }; struct backing_dev_info; struct reclaim_state; struct sched_info { unsigned long pcount ; unsigned long long run_delay ; unsigned long long last_arrival ; unsigned long long last_queued ; }; struct task_delay_info { spinlock_t lock ; unsigned int flags ; u64 blkio_start ; u64 blkio_delay ; u64 swapin_delay ; u32 blkio_count ; u32 swapin_count ; u64 freepages_start ; u64 freepages_delay ; u32 freepages_count ; }; struct wake_q_node { struct wake_q_node *next ; }; struct io_context; struct pipe_inode_info; struct uts_namespace; struct load_weight { unsigned long weight ; u32 inv_weight ; }; struct sched_avg { u64 last_runnable_update ; s64 decay_count ; unsigned long load_avg_contrib ; unsigned long utilization_avg_contrib ; u32 runnable_avg_sum ; u32 avg_period ; u32 running_avg_sum ; }; struct sched_statistics { u64 wait_start ; u64 wait_max ; u64 wait_count ; u64 wait_sum ; u64 iowait_count ; u64 iowait_sum ; u64 sleep_start ; u64 sleep_max ; s64 sum_sleep_runtime ; u64 block_start ; u64 block_max ; u64 exec_max ; u64 slice_max ; u64 nr_migrations_cold ; u64 nr_failed_migrations_affine ; u64 nr_failed_migrations_running ; u64 nr_failed_migrations_hot ; u64 nr_forced_migrations ; u64 nr_wakeups ; u64 nr_wakeups_sync ; u64 nr_wakeups_migrate ; u64 nr_wakeups_local ; u64 nr_wakeups_remote ; u64 nr_wakeups_affine ; u64 nr_wakeups_affine_attempts ; u64 nr_wakeups_passive ; u64 nr_wakeups_idle ; }; struct sched_entity { struct load_weight load ; struct rb_node run_node ; struct list_head group_node ; unsigned int on_rq ; u64 exec_start ; u64 sum_exec_runtime ; u64 vruntime ; u64 prev_sum_exec_runtime ; u64 nr_migrations ; struct sched_statistics statistics ; int depth ; struct sched_entity *parent ; struct cfs_rq *cfs_rq ; struct cfs_rq *my_q ; struct sched_avg avg ; }; struct rt_rq; struct sched_rt_entity { struct list_head run_list ; unsigned long timeout ; unsigned long watchdog_stamp ; unsigned int time_slice ; struct sched_rt_entity *back ; struct sched_rt_entity *parent ; struct rt_rq *rt_rq ; struct rt_rq *my_q ; }; struct sched_dl_entity { struct rb_node rb_node ; u64 dl_runtime ; u64 dl_deadline ; u64 dl_period ; u64 dl_bw ; s64 runtime ; u64 deadline ; unsigned int flags ; int dl_throttled ; int dl_new ; int dl_boosted ; int dl_yielded ; struct hrtimer dl_timer ; }; struct memcg_oom_info { struct mem_cgroup *memcg ; gfp_t gfp_mask ; int order ; unsigned char may_oom : 1 ; }; struct sched_class; struct files_struct; struct compat_robust_list_head; struct numa_group; struct task_struct { long volatile state ; void *stack ; atomic_t usage ; unsigned int flags ; unsigned int ptrace ; struct llist_node wake_entry ; int on_cpu ; struct task_struct *last_wakee ; unsigned long wakee_flips ; unsigned long wakee_flip_decay_ts ; int wake_cpu ; int on_rq ; int prio ; int static_prio ; int normal_prio ; unsigned int rt_priority ; struct sched_class const *sched_class ; struct sched_entity se ; struct sched_rt_entity rt ; struct task_group *sched_task_group ; struct sched_dl_entity dl ; struct hlist_head preempt_notifiers ; unsigned int policy ; int nr_cpus_allowed ; cpumask_t cpus_allowed ; unsigned long rcu_tasks_nvcsw ; bool rcu_tasks_holdout ; struct list_head rcu_tasks_holdout_list ; int rcu_tasks_idle_cpu ; struct sched_info sched_info ; struct list_head tasks ; struct plist_node pushable_tasks ; struct rb_node pushable_dl_tasks ; struct mm_struct *mm ; struct mm_struct *active_mm ; u32 vmacache_seqnum ; struct vm_area_struct *vmacache[4U] ; struct task_rss_stat rss_stat ; int exit_state ; int exit_code ; int exit_signal ; int pdeath_signal ; unsigned long jobctl ; unsigned int personality ; unsigned char in_execve : 1 ; unsigned char in_iowait : 1 ; unsigned char sched_reset_on_fork : 1 ; unsigned char sched_contributes_to_load : 1 ; unsigned char sched_migrated : 1 ; unsigned char memcg_kmem_skip_account : 1 ; unsigned char brk_randomized : 1 ; unsigned long atomic_flags ; struct restart_block restart_block ; pid_t pid ; pid_t tgid ; struct task_struct *real_parent ; struct task_struct *parent ; struct list_head children ; struct list_head sibling ; struct task_struct *group_leader ; struct list_head ptraced ; struct list_head ptrace_entry ; struct pid_link pids[3U] ; struct list_head thread_group ; struct list_head thread_node ; struct completion *vfork_done ; int *set_child_tid ; int *clear_child_tid ; cputime_t utime ; cputime_t stime ; cputime_t utimescaled ; cputime_t stimescaled ; cputime_t gtime ; struct cputime prev_cputime ; unsigned long nvcsw ; unsigned long nivcsw ; u64 start_time ; u64 real_start_time ; unsigned long min_flt ; unsigned long maj_flt ; struct task_cputime cputime_expires ; struct list_head cpu_timers[3U] ; struct cred const *real_cred ; struct cred const *cred ; char comm[16U] ; struct nameidata *nameidata ; struct sysv_sem sysvsem ; struct sysv_shm sysvshm ; unsigned long last_switch_count ; struct thread_struct thread ; struct fs_struct *fs ; struct files_struct *files ; struct nsproxy *nsproxy ; struct signal_struct *signal ; struct sighand_struct *sighand ; sigset_t blocked ; sigset_t real_blocked ; sigset_t saved_sigmask ; struct sigpending pending ; unsigned long sas_ss_sp ; size_t sas_ss_size ; int (*notifier)(void * ) ; void *notifier_data ; sigset_t *notifier_mask ; struct callback_head *task_works ; struct audit_context *audit_context ; kuid_t loginuid ; unsigned int sessionid ; struct seccomp seccomp ; u32 parent_exec_id ; u32 self_exec_id ; spinlock_t alloc_lock ; raw_spinlock_t pi_lock ; struct wake_q_node wake_q ; struct rb_root pi_waiters ; struct rb_node *pi_waiters_leftmost ; struct rt_mutex_waiter *pi_blocked_on ; struct mutex_waiter *blocked_on ; unsigned int irq_events ; unsigned long hardirq_enable_ip ; unsigned long hardirq_disable_ip ; unsigned int hardirq_enable_event ; unsigned int hardirq_disable_event ; int hardirqs_enabled ; int hardirq_context ; unsigned long softirq_disable_ip ; unsigned long softirq_enable_ip ; unsigned int softirq_disable_event ; unsigned int softirq_enable_event ; int softirqs_enabled ; int softirq_context ; u64 curr_chain_key ; int lockdep_depth ; unsigned int lockdep_recursion ; struct held_lock held_locks[48U] ; gfp_t lockdep_reclaim_gfp ; void *journal_info ; struct bio_list *bio_list ; struct blk_plug *plug ; struct reclaim_state *reclaim_state ; struct backing_dev_info *backing_dev_info ; struct io_context *io_context ; unsigned long ptrace_message ; siginfo_t *last_siginfo ; struct task_io_accounting ioac ; u64 acct_rss_mem1 ; u64 acct_vm_mem1 ; cputime_t acct_timexpd ; nodemask_t mems_allowed ; seqcount_t mems_allowed_seq ; int cpuset_mem_spread_rotor ; int cpuset_slab_spread_rotor ; struct css_set *cgroups ; struct list_head cg_list ; struct robust_list_head *robust_list ; struct compat_robust_list_head *compat_robust_list ; struct list_head pi_state_list ; struct futex_pi_state *pi_state_cache ; struct perf_event_context *perf_event_ctxp[2U] ; struct mutex perf_event_mutex ; struct list_head perf_event_list ; struct mempolicy *mempolicy ; short il_next ; short pref_node_fork ; int numa_scan_seq ; unsigned int numa_scan_period ; unsigned int numa_scan_period_max ; int numa_preferred_nid ; unsigned long numa_migrate_retry ; u64 node_stamp ; u64 last_task_numa_placement ; u64 last_sum_exec_runtime ; struct callback_head numa_work ; struct list_head numa_entry ; struct numa_group *numa_group ; unsigned long *numa_faults ; unsigned long total_numa_faults ; unsigned long numa_faults_locality[3U] ; unsigned long numa_pages_migrated ; struct callback_head rcu ; struct pipe_inode_info *splice_pipe ; struct page_frag task_frag ; struct task_delay_info *delays ; int make_it_fail ; int nr_dirtied ; int nr_dirtied_pause ; unsigned long dirty_paused_when ; int latency_record_count ; struct latency_record latency_record[32U] ; unsigned long timer_slack_ns ; unsigned long default_timer_slack_ns ; unsigned int kasan_depth ; unsigned long trace ; unsigned long trace_recursion ; struct memcg_oom_info memcg_oom ; struct uprobe_task *utask ; unsigned int sequential_io ; unsigned int sequential_io_avg ; unsigned long task_state_change ; int pagefault_disabled ; }; struct se_node_acl; struct se_portal_group; struct se_tpg_np; struct se_session; struct configfs_attribute; struct iscsi_login; struct se_wwn; struct config_item; struct target_fabric_configfs; struct iscsi_conn; struct iscsi_np; struct config_group; struct iovec { void *iov_base ; __kernel_size_t iov_len ; }; struct kvec { void *iov_base ; size_t iov_len ; }; union __anonunion____missing_field_name_205 { struct iovec const *iov ; struct kvec const *kvec ; struct bio_vec const *bvec ; }; struct iov_iter { int type ; size_t iov_offset ; size_t count ; union __anonunion____missing_field_name_205 __annonCompField56 ; unsigned long nr_segs ; }; typedef unsigned short __kernel_sa_family_t; struct __kernel_sockaddr_storage { __kernel_sa_family_t ss_family ; char __data[126U] ; }; typedef __kernel_sa_family_t sa_family_t; struct sockaddr { sa_family_t sa_family ; char sa_data[14U] ; }; struct kiocb; struct msghdr { void *msg_name ; int msg_namelen ; struct iov_iter msg_iter ; void *msg_control ; __kernel_size_t msg_controllen ; unsigned int msg_flags ; struct kiocb *msg_iocb ; }; struct kref { atomic_t refcount ; }; struct configfs_item_operations; struct configfs_group_operations; struct configfs_subsystem; struct config_item_type; struct config_item { char *ci_name ; char ci_namebuf[20U] ; struct kref ci_kref ; struct list_head ci_entry ; struct config_item *ci_parent ; struct config_group *ci_group ; struct config_item_type *ci_type ; struct dentry *ci_dentry ; }; struct config_item_type { struct module *ct_owner ; struct configfs_item_operations *ct_item_ops ; struct configfs_group_operations *ct_group_ops ; struct configfs_attribute **ct_attrs ; }; struct config_group { struct config_item cg_item ; struct list_head cg_children ; struct configfs_subsystem *cg_subsys ; struct config_group **default_groups ; }; struct configfs_attribute { char const *ca_name ; struct module *ca_owner ; umode_t ca_mode ; }; struct configfs_item_operations { void (*release)(struct config_item * ) ; ssize_t (*show_attribute)(struct config_item * , struct configfs_attribute * , char * ) ; ssize_t (*store_attribute)(struct config_item * , struct configfs_attribute * , char const * , size_t ) ; int (*allow_link)(struct config_item * , struct config_item * ) ; int (*drop_link)(struct config_item * , struct config_item * ) ; }; struct configfs_group_operations { struct config_item *(*make_item)(struct config_group * , char const * ) ; struct config_group *(*make_group)(struct config_group * , char const * ) ; int (*commit_item)(struct config_item * ) ; void (*disconnect_notify)(struct config_group * , struct config_item * ) ; void (*drop_item)(struct config_group * , struct config_item * ) ; }; struct configfs_subsystem { struct config_group su_group ; struct mutex su_mutex ; }; struct proc_dir_entry; struct hlist_nulls_node; struct hlist_nulls_head { struct hlist_nulls_node *first ; }; struct hlist_nulls_node { struct hlist_nulls_node *next ; struct hlist_nulls_node **pprev ; }; struct iattr; struct super_block; struct file_system_type; struct kernfs_open_node; struct kernfs_iattrs; struct kernfs_elem_dir { unsigned long subdirs ; struct rb_root children ; struct kernfs_root *root ; }; struct kernfs_elem_symlink { struct kernfs_node *target_kn ; }; struct kernfs_elem_attr { struct kernfs_ops const *ops ; struct kernfs_open_node *open ; loff_t size ; struct kernfs_node *notify_next ; }; union __anonunion____missing_field_name_214 { struct kernfs_elem_dir dir ; struct kernfs_elem_symlink symlink ; struct kernfs_elem_attr attr ; }; struct kernfs_node { atomic_t count ; atomic_t active ; struct lockdep_map dep_map ; struct kernfs_node *parent ; char const *name ; struct rb_node rb ; void const *ns ; unsigned int hash ; union __anonunion____missing_field_name_214 __annonCompField64 ; void *priv ; unsigned short flags ; umode_t mode ; unsigned int ino ; struct kernfs_iattrs *iattr ; }; struct kernfs_syscall_ops { int (*remount_fs)(struct kernfs_root * , int * , char * ) ; int (*show_options)(struct seq_file * , struct kernfs_root * ) ; int (*mkdir)(struct kernfs_node * , char const * , umode_t ) ; int (*rmdir)(struct kernfs_node * ) ; int (*rename)(struct kernfs_node * , struct kernfs_node * , char const * ) ; }; struct kernfs_root { struct kernfs_node *kn ; unsigned int flags ; struct ida ino_ida ; struct kernfs_syscall_ops *syscall_ops ; struct list_head supers ; wait_queue_head_t deactivate_waitq ; }; struct kernfs_open_file { struct kernfs_node *kn ; struct file *file ; void *priv ; struct mutex mutex ; int event ; struct list_head list ; char *prealloc_buf ; size_t atomic_write_len ; bool mmapped ; struct vm_operations_struct const *vm_ops ; }; struct kernfs_ops { int (*seq_show)(struct seq_file * , void * ) ; void *(*seq_start)(struct seq_file * , loff_t * ) ; void *(*seq_next)(struct seq_file * , void * , loff_t * ) ; void (*seq_stop)(struct seq_file * , void * ) ; ssize_t (*read)(struct kernfs_open_file * , char * , size_t , loff_t ) ; size_t atomic_write_len ; bool prealloc ; ssize_t (*write)(struct kernfs_open_file * , char * , size_t , loff_t ) ; int (*mmap)(struct kernfs_open_file * , struct vm_area_struct * ) ; struct lock_class_key lockdep_key ; }; struct sock; struct kobject; enum kobj_ns_type { KOBJ_NS_TYPE_NONE = 0, KOBJ_NS_TYPE_NET = 1, KOBJ_NS_TYPES = 2 } ; struct kobj_ns_type_operations { enum kobj_ns_type type ; bool (*current_may_mount)(void) ; void *(*grab_current_ns)(void) ; void const *(*netlink_ns)(struct sock * ) ; void const *(*initial_ns)(void) ; void (*drop_ns)(void * ) ; }; struct kstat { u64 ino ; dev_t dev ; umode_t mode ; unsigned int nlink ; kuid_t uid ; kgid_t gid ; dev_t rdev ; loff_t size ; struct timespec atime ; struct timespec mtime ; struct timespec ctime ; unsigned long blksize ; unsigned long long blocks ; }; struct bin_attribute; struct attribute { char const *name ; umode_t mode ; bool ignore_lockdep ; struct lock_class_key *key ; struct lock_class_key skey ; }; struct attribute_group { char const *name ; umode_t (*is_visible)(struct kobject * , struct attribute * , int ) ; struct attribute **attrs ; struct bin_attribute **bin_attrs ; }; struct bin_attribute { struct attribute attr ; size_t size ; void *private ; ssize_t (*read)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; ssize_t (*write)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; int (*mmap)(struct file * , struct kobject * , struct bin_attribute * , struct vm_area_struct * ) ; }; struct sysfs_ops { ssize_t (*show)(struct kobject * , struct attribute * , char * ) ; ssize_t (*store)(struct kobject * , struct attribute * , char const * , size_t ) ; }; struct kset; struct kobj_type; struct kobject { char const *name ; struct list_head entry ; struct kobject *parent ; struct kset *kset ; struct kobj_type *ktype ; struct kernfs_node *sd ; struct kref kref ; struct delayed_work release ; unsigned char state_initialized : 1 ; unsigned char state_in_sysfs : 1 ; unsigned char state_add_uevent_sent : 1 ; unsigned char state_remove_uevent_sent : 1 ; unsigned char uevent_suppress : 1 ; }; struct kobj_type { void (*release)(struct kobject * ) ; struct sysfs_ops const *sysfs_ops ; struct attribute **default_attrs ; struct kobj_ns_type_operations const *(*child_ns_type)(struct kobject * ) ; void const *(*namespace)(struct kobject * ) ; }; struct kobj_uevent_env { char *argv[3U] ; char *envp[32U] ; int envp_idx ; char buf[2048U] ; int buflen ; }; struct kset_uevent_ops { int (* const filter)(struct kset * , struct kobject * ) ; char const *(* const name)(struct kset * , struct kobject * ) ; int (* const uevent)(struct kset * , struct kobject * , struct kobj_uevent_env * ) ; }; struct kset { struct list_head list ; spinlock_t list_lock ; struct kobject kobj ; struct kset_uevent_ops const *uevent_ops ; }; struct klist_node; struct klist_node { void *n_klist ; struct list_head n_node ; struct kref n_ref ; }; struct path; struct seq_file { char *buf ; size_t size ; size_t from ; size_t count ; size_t pad_until ; loff_t index ; loff_t read_pos ; u64 version ; struct mutex lock ; struct seq_operations const *op ; int poll_event ; struct user_namespace *user_ns ; void *private ; }; struct seq_operations { void *(*start)(struct seq_file * , loff_t * ) ; void (*stop)(struct seq_file * , void * ) ; void *(*next)(struct seq_file * , void * , loff_t * ) ; int (*show)(struct seq_file * , void * ) ; }; struct pinctrl; struct pinctrl_state; struct dev_pin_info { struct pinctrl *p ; struct pinctrl_state *default_state ; struct pinctrl_state *sleep_state ; struct pinctrl_state *idle_state ; }; struct dma_map_ops; struct dev_archdata { struct dma_map_ops *dma_ops ; void *iommu ; }; struct device_private; struct device_driver; struct driver_private; struct class; struct subsys_private; struct bus_type; struct device_node; struct fwnode_handle; struct iommu_ops; struct iommu_group; struct device_attribute; struct bus_type { char const *name ; char const *dev_name ; struct device *dev_root ; struct device_attribute *dev_attrs ; struct attribute_group const **bus_groups ; struct attribute_group const **dev_groups ; struct attribute_group const **drv_groups ; int (*match)(struct device * , struct device_driver * ) ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*online)(struct device * ) ; int (*offline)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct dev_pm_ops const *pm ; struct iommu_ops const *iommu_ops ; struct subsys_private *p ; struct lock_class_key lock_key ; }; struct device_type; enum probe_type { PROBE_DEFAULT_STRATEGY = 0, PROBE_PREFER_ASYNCHRONOUS = 1, PROBE_FORCE_SYNCHRONOUS = 2 } ; struct of_device_id; struct acpi_device_id; struct device_driver { char const *name ; struct bus_type *bus ; struct module *owner ; char const *mod_name ; bool suppress_bind_attrs ; enum probe_type probe_type ; struct of_device_id const *of_match_table ; struct acpi_device_id const *acpi_match_table ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct attribute_group const **groups ; struct dev_pm_ops const *pm ; struct driver_private *p ; }; struct class_attribute; struct class { char const *name ; struct module *owner ; struct class_attribute *class_attrs ; struct attribute_group const **dev_groups ; struct kobject *dev_kobj ; int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , umode_t * ) ; void (*class_release)(struct class * ) ; void (*dev_release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct kobj_ns_type_operations const *ns_type ; void const *(*namespace)(struct device * ) ; struct dev_pm_ops const *pm ; struct subsys_private *p ; }; struct class_attribute { struct attribute attr ; ssize_t (*show)(struct class * , struct class_attribute * , char * ) ; ssize_t (*store)(struct class * , struct class_attribute * , char const * , size_t ) ; }; struct device_type { char const *name ; struct attribute_group const **groups ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , umode_t * , kuid_t * , kgid_t * ) ; void (*release)(struct device * ) ; struct dev_pm_ops const *pm ; }; struct device_attribute { struct attribute attr ; ssize_t (*show)(struct device * , struct device_attribute * , char * ) ; ssize_t (*store)(struct device * , struct device_attribute * , char const * , size_t ) ; }; struct device_dma_parameters { unsigned int max_segment_size ; unsigned long segment_boundary_mask ; }; struct dma_coherent_mem; struct cma; struct device { struct device *parent ; struct device_private *p ; struct kobject kobj ; char const *init_name ; struct device_type const *type ; struct mutex mutex ; struct bus_type *bus ; struct device_driver *driver ; void *platform_data ; void *driver_data ; struct dev_pm_info power ; struct dev_pm_domain *pm_domain ; struct dev_pin_info *pins ; int numa_node ; u64 *dma_mask ; u64 coherent_dma_mask ; unsigned long dma_pfn_offset ; struct device_dma_parameters *dma_parms ; struct list_head dma_pools ; struct dma_coherent_mem *dma_mem ; struct cma *cma_area ; struct dev_archdata archdata ; struct device_node *of_node ; struct fwnode_handle *fwnode ; dev_t devt ; u32 id ; spinlock_t devres_lock ; struct list_head devres_head ; struct klist_node knode_class ; struct class *class ; struct attribute_group const **groups ; void (*release)(struct device * ) ; struct iommu_group *iommu_group ; bool offline_disabled ; bool offline ; }; struct wakeup_source { char const *name ; struct list_head entry ; spinlock_t lock ; struct wake_irq *wakeirq ; struct timer_list timer ; unsigned long timer_expires ; ktime_t total_time ; ktime_t max_time ; ktime_t last_time ; ktime_t start_prevent_time ; ktime_t prevent_sleep_time ; unsigned long event_count ; unsigned long active_count ; unsigned long relax_count ; unsigned long expire_count ; unsigned long wakeup_count ; bool active ; bool autosleep_enabled ; }; struct shrink_control { gfp_t gfp_mask ; unsigned long nr_to_scan ; int nid ; struct mem_cgroup *memcg ; }; struct shrinker { unsigned long (*count_objects)(struct shrinker * , struct shrink_control * ) ; unsigned long (*scan_objects)(struct shrinker * , struct shrink_control * ) ; int seeks ; long batch ; unsigned long flags ; struct list_head list ; atomic_long_t *nr_deferred ; }; struct file_ra_state; struct writeback_control; struct bdi_writeback; struct vm_fault { unsigned int flags ; unsigned long pgoff ; void *virtual_address ; struct page *cow_page ; struct page *page ; unsigned long max_pgoff ; pte_t *pte ; }; struct vm_operations_struct { void (*open)(struct vm_area_struct * ) ; void (*close)(struct vm_area_struct * ) ; int (*fault)(struct vm_area_struct * , struct vm_fault * ) ; void (*map_pages)(struct vm_area_struct * , struct vm_fault * ) ; int (*page_mkwrite)(struct vm_area_struct * , struct vm_fault * ) ; int (*pfn_mkwrite)(struct vm_area_struct * , struct vm_fault * ) ; int (*access)(struct vm_area_struct * , unsigned long , void * , int , int ) ; char const *(*name)(struct vm_area_struct * ) ; int (*set_policy)(struct vm_area_struct * , struct mempolicy * ) ; struct mempolicy *(*get_policy)(struct vm_area_struct * , unsigned long ) ; struct page *(*find_special_page)(struct vm_area_struct * , unsigned long ) ; }; struct scatterlist { unsigned long sg_magic ; unsigned long page_link ; unsigned int offset ; unsigned int length ; dma_addr_t dma_address ; unsigned int dma_length ; }; struct sg_table { struct scatterlist *sgl ; unsigned int nents ; unsigned int orig_nents ; }; struct dql { unsigned int num_queued ; unsigned int adj_limit ; unsigned int last_obj_cnt ; unsigned int limit ; unsigned int num_completed ; unsigned int prev_ovlimit ; unsigned int prev_num_queued ; unsigned int prev_last_obj_cnt ; unsigned int lowest_slack ; unsigned long slack_start_time ; unsigned int max_limit ; unsigned int min_limit ; unsigned int slack_hold_time ; }; struct __anonstruct_sync_serial_settings_216 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; }; typedef struct __anonstruct_sync_serial_settings_216 sync_serial_settings; struct __anonstruct_te1_settings_217 { unsigned int clock_rate ; unsigned int clock_type ; unsigned short loopback ; unsigned int slot_map ; }; typedef struct __anonstruct_te1_settings_217 te1_settings; struct __anonstruct_raw_hdlc_proto_218 { unsigned short encoding ; unsigned short parity ; }; typedef struct __anonstruct_raw_hdlc_proto_218 raw_hdlc_proto; struct __anonstruct_fr_proto_219 { unsigned int t391 ; unsigned int t392 ; unsigned int n391 ; unsigned int n392 ; unsigned int n393 ; unsigned short lmi ; unsigned short dce ; }; typedef struct __anonstruct_fr_proto_219 fr_proto; struct __anonstruct_fr_proto_pvc_220 { unsigned int dlci ; }; typedef struct __anonstruct_fr_proto_pvc_220 fr_proto_pvc; struct __anonstruct_fr_proto_pvc_info_221 { unsigned int dlci ; char master[16U] ; }; typedef struct __anonstruct_fr_proto_pvc_info_221 fr_proto_pvc_info; struct __anonstruct_cisco_proto_222 { unsigned int interval ; unsigned int timeout ; }; typedef struct __anonstruct_cisco_proto_222 cisco_proto; struct ifmap { unsigned long mem_start ; unsigned long mem_end ; unsigned short base_addr ; unsigned char irq ; unsigned char dma ; unsigned char port ; }; union __anonunion_ifs_ifsu_223 { raw_hdlc_proto *raw_hdlc ; cisco_proto *cisco ; fr_proto *fr ; fr_proto_pvc *fr_pvc ; fr_proto_pvc_info *fr_pvc_info ; sync_serial_settings *sync ; te1_settings *te1 ; }; struct if_settings { unsigned int type ; unsigned int size ; union __anonunion_ifs_ifsu_223 ifs_ifsu ; }; union __anonunion_ifr_ifrn_224 { char ifrn_name[16U] ; }; union __anonunion_ifr_ifru_225 { struct sockaddr ifru_addr ; struct sockaddr ifru_dstaddr ; struct sockaddr ifru_broadaddr ; struct sockaddr ifru_netmask ; struct sockaddr ifru_hwaddr ; short ifru_flags ; int ifru_ivalue ; int ifru_mtu ; struct ifmap ifru_map ; char ifru_slave[16U] ; char ifru_newname[16U] ; void *ifru_data ; struct if_settings ifru_settings ; }; struct ifreq { union __anonunion_ifr_ifrn_224 ifr_ifrn ; union __anonunion_ifr_ifru_225 ifr_ifru ; }; struct hlist_bl_node; struct hlist_bl_head { struct hlist_bl_node *first ; }; struct hlist_bl_node { struct hlist_bl_node *next ; struct hlist_bl_node **pprev ; }; struct __anonstruct____missing_field_name_230 { spinlock_t lock ; int count ; }; union __anonunion____missing_field_name_229 { struct __anonstruct____missing_field_name_230 __annonCompField65 ; }; struct lockref { union __anonunion____missing_field_name_229 __annonCompField66 ; }; struct vfsmount; struct __anonstruct____missing_field_name_232 { u32 hash ; u32 len ; }; union __anonunion____missing_field_name_231 { struct __anonstruct____missing_field_name_232 __annonCompField67 ; u64 hash_len ; }; struct qstr { union __anonunion____missing_field_name_231 __annonCompField68 ; unsigned char const *name ; }; struct dentry_operations; union __anonunion_d_u_233 { struct hlist_node d_alias ; struct callback_head d_rcu ; }; struct dentry { unsigned int d_flags ; seqcount_t d_seq ; struct hlist_bl_node d_hash ; struct dentry *d_parent ; struct qstr d_name ; struct inode *d_inode ; unsigned char d_iname[32U] ; struct lockref d_lockref ; struct dentry_operations const *d_op ; struct super_block *d_sb ; unsigned long d_time ; void *d_fsdata ; struct list_head d_lru ; struct list_head d_child ; struct list_head d_subdirs ; union __anonunion_d_u_233 d_u ; }; struct dentry_operations { int (*d_revalidate)(struct dentry * , unsigned int ) ; int (*d_weak_revalidate)(struct dentry * , unsigned int ) ; int (*d_hash)(struct dentry const * , struct qstr * ) ; int (*d_compare)(struct dentry const * , struct dentry const * , unsigned int , char const * , struct qstr const * ) ; int (*d_delete)(struct dentry const * ) ; void (*d_release)(struct dentry * ) ; void (*d_prune)(struct dentry * ) ; void (*d_iput)(struct dentry * , struct inode * ) ; char *(*d_dname)(struct dentry * , char * , int ) ; struct vfsmount *(*d_automount)(struct path * ) ; int (*d_manage)(struct dentry * , bool ) ; struct inode *(*d_select_inode)(struct dentry * , unsigned int ) ; }; struct path { struct vfsmount *mnt ; struct dentry *dentry ; }; struct list_lru_one { struct list_head list ; long nr_items ; }; struct list_lru_memcg { struct list_lru_one *lru[0U] ; }; struct list_lru_node { spinlock_t lock ; struct list_lru_one lru ; struct list_lru_memcg *memcg_lrus ; }; struct list_lru { struct list_lru_node *node ; struct list_head list ; }; struct __anonstruct____missing_field_name_237 { struct radix_tree_node *parent ; void *private_data ; }; union __anonunion____missing_field_name_236 { struct __anonstruct____missing_field_name_237 __annonCompField69 ; struct callback_head callback_head ; }; struct radix_tree_node { unsigned int path ; unsigned int count ; union __anonunion____missing_field_name_236 __annonCompField70 ; struct list_head private_list ; void *slots[64U] ; unsigned long tags[3U][1U] ; }; struct radix_tree_root { unsigned int height ; gfp_t gfp_mask ; struct radix_tree_node *rnode ; }; struct semaphore { raw_spinlock_t lock ; unsigned int count ; struct list_head wait_list ; }; struct fiemap_extent { __u64 fe_logical ; __u64 fe_physical ; __u64 fe_length ; __u64 fe_reserved64[2U] ; __u32 fe_flags ; __u32 fe_reserved[3U] ; }; enum migrate_mode { MIGRATE_ASYNC = 0, MIGRATE_SYNC_LIGHT = 1, MIGRATE_SYNC = 2 } ; struct bio_set; struct bio; struct bio_integrity_payload; struct block_device; typedef void bio_end_io_t(struct bio * , int ); struct bio_vec { struct page *bv_page ; unsigned int bv_len ; unsigned int bv_offset ; }; struct bvec_iter { sector_t bi_sector ; unsigned int bi_size ; unsigned int bi_idx ; unsigned int bi_bvec_done ; }; union __anonunion____missing_field_name_240 { struct bio_integrity_payload *bi_integrity ; }; struct bio { struct bio *bi_next ; struct block_device *bi_bdev ; unsigned long bi_flags ; unsigned long bi_rw ; struct bvec_iter bi_iter ; unsigned int bi_phys_segments ; unsigned int bi_seg_front_size ; unsigned int bi_seg_back_size ; atomic_t __bi_remaining ; bio_end_io_t *bi_end_io ; void *bi_private ; struct io_context *bi_ioc ; struct cgroup_subsys_state *bi_css ; union __anonunion____missing_field_name_240 __annonCompField71 ; unsigned short bi_vcnt ; unsigned short bi_max_vecs ; atomic_t __bi_cnt ; struct bio_vec *bi_io_vec ; struct bio_set *bi_pool ; struct bio_vec bi_inline_vecs[0U] ; }; struct export_operations; struct hd_geometry; struct poll_table_struct; struct kstatfs; struct swap_info_struct; struct iattr { unsigned int ia_valid ; umode_t ia_mode ; kuid_t ia_uid ; kgid_t ia_gid ; loff_t ia_size ; struct timespec ia_atime ; struct timespec ia_mtime ; struct timespec ia_ctime ; struct file *ia_file ; }; struct dquot; typedef __kernel_uid32_t projid_t; struct __anonstruct_kprojid_t_241 { projid_t val ; }; typedef struct __anonstruct_kprojid_t_241 kprojid_t; enum quota_type { USRQUOTA = 0, GRPQUOTA = 1, PRJQUOTA = 2 } ; typedef long long qsize_t; union __anonunion____missing_field_name_242 { kuid_t uid ; kgid_t gid ; kprojid_t projid ; }; struct kqid { union __anonunion____missing_field_name_242 __annonCompField72 ; enum quota_type type ; }; struct mem_dqblk { qsize_t dqb_bhardlimit ; qsize_t dqb_bsoftlimit ; qsize_t dqb_curspace ; qsize_t dqb_rsvspace ; qsize_t dqb_ihardlimit ; qsize_t dqb_isoftlimit ; qsize_t dqb_curinodes ; time_t dqb_btime ; time_t dqb_itime ; }; struct quota_format_type; struct mem_dqinfo { struct quota_format_type *dqi_format ; int dqi_fmt_id ; struct list_head dqi_dirty_list ; unsigned long dqi_flags ; unsigned int dqi_bgrace ; unsigned int dqi_igrace ; qsize_t dqi_max_spc_limit ; qsize_t dqi_max_ino_limit ; void *dqi_priv ; }; struct dquot { struct hlist_node dq_hash ; struct list_head dq_inuse ; struct list_head dq_free ; struct list_head dq_dirty ; struct mutex dq_lock ; atomic_t dq_count ; wait_queue_head_t dq_wait_unused ; struct super_block *dq_sb ; struct kqid dq_id ; loff_t dq_off ; unsigned long dq_flags ; struct mem_dqblk dq_dqb ; }; struct quota_format_ops { int (*check_quota_file)(struct super_block * , int ) ; int (*read_file_info)(struct super_block * , int ) ; int (*write_file_info)(struct super_block * , int ) ; int (*free_file_info)(struct super_block * , int ) ; int (*read_dqblk)(struct dquot * ) ; int (*commit_dqblk)(struct dquot * ) ; int (*release_dqblk)(struct dquot * ) ; }; struct dquot_operations { int (*write_dquot)(struct dquot * ) ; struct dquot *(*alloc_dquot)(struct super_block * , int ) ; void (*destroy_dquot)(struct dquot * ) ; int (*acquire_dquot)(struct dquot * ) ; int (*release_dquot)(struct dquot * ) ; int (*mark_dirty)(struct dquot * ) ; int (*write_info)(struct super_block * , int ) ; qsize_t *(*get_reserved_space)(struct inode * ) ; int (*get_projid)(struct inode * , kprojid_t * ) ; }; struct qc_dqblk { int d_fieldmask ; u64 d_spc_hardlimit ; u64 d_spc_softlimit ; u64 d_ino_hardlimit ; u64 d_ino_softlimit ; u64 d_space ; u64 d_ino_count ; s64 d_ino_timer ; s64 d_spc_timer ; int d_ino_warns ; int d_spc_warns ; u64 d_rt_spc_hardlimit ; u64 d_rt_spc_softlimit ; u64 d_rt_space ; s64 d_rt_spc_timer ; int d_rt_spc_warns ; }; struct qc_type_state { unsigned int flags ; unsigned int spc_timelimit ; unsigned int ino_timelimit ; unsigned int rt_spc_timelimit ; unsigned int spc_warnlimit ; unsigned int ino_warnlimit ; unsigned int rt_spc_warnlimit ; unsigned long long ino ; blkcnt_t blocks ; blkcnt_t nextents ; }; struct qc_state { unsigned int s_incoredqs ; struct qc_type_state s_state[3U] ; }; struct qc_info { int i_fieldmask ; unsigned int i_flags ; unsigned int i_spc_timelimit ; unsigned int i_ino_timelimit ; unsigned int i_rt_spc_timelimit ; unsigned int i_spc_warnlimit ; unsigned int i_ino_warnlimit ; unsigned int i_rt_spc_warnlimit ; }; struct quotactl_ops { int (*quota_on)(struct super_block * , int , int , struct path * ) ; int (*quota_off)(struct super_block * , int ) ; int (*quota_enable)(struct super_block * , unsigned int ) ; int (*quota_disable)(struct super_block * , unsigned int ) ; int (*quota_sync)(struct super_block * , int ) ; int (*set_info)(struct super_block * , int , struct qc_info * ) ; int (*get_dqblk)(struct super_block * , struct kqid , struct qc_dqblk * ) ; int (*set_dqblk)(struct super_block * , struct kqid , struct qc_dqblk * ) ; int (*get_state)(struct super_block * , struct qc_state * ) ; int (*rm_xquota)(struct super_block * , unsigned int ) ; }; struct quota_format_type { int qf_fmt_id ; struct quota_format_ops const *qf_ops ; struct module *qf_owner ; struct quota_format_type *qf_next ; }; struct quota_info { unsigned int flags ; struct mutex dqio_mutex ; struct mutex dqonoff_mutex ; struct inode *files[3U] ; struct mem_dqinfo info[3U] ; struct quota_format_ops const *ops[3U] ; }; struct kiocb { struct file *ki_filp ; loff_t ki_pos ; void (*ki_complete)(struct kiocb * , long , long ) ; void *private ; int ki_flags ; }; struct address_space_operations { int (*writepage)(struct page * , struct writeback_control * ) ; int (*readpage)(struct file * , struct page * ) ; int (*writepages)(struct address_space * , struct writeback_control * ) ; int (*set_page_dirty)(struct page * ) ; int (*readpages)(struct file * , struct address_space * , struct list_head * , unsigned int ) ; int (*write_begin)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page ** , void ** ) ; int (*write_end)(struct file * , struct address_space * , loff_t , unsigned int , unsigned int , struct page * , void * ) ; sector_t (*bmap)(struct address_space * , sector_t ) ; void (*invalidatepage)(struct page * , unsigned int , unsigned int ) ; int (*releasepage)(struct page * , gfp_t ) ; void (*freepage)(struct page * ) ; ssize_t (*direct_IO)(struct kiocb * , struct iov_iter * , loff_t ) ; int (*migratepage)(struct address_space * , struct page * , struct page * , enum migrate_mode ) ; int (*launder_page)(struct page * ) ; int (*is_partially_uptodate)(struct page * , unsigned long , unsigned long ) ; void (*is_dirty_writeback)(struct page * , bool * , bool * ) ; int (*error_remove_page)(struct address_space * , struct page * ) ; int (*swap_activate)(struct swap_info_struct * , struct file * , sector_t * ) ; void (*swap_deactivate)(struct file * ) ; }; struct address_space { struct inode *host ; struct radix_tree_root page_tree ; spinlock_t tree_lock ; atomic_t i_mmap_writable ; struct rb_root i_mmap ; struct rw_semaphore i_mmap_rwsem ; unsigned long nrpages ; unsigned long nrshadows ; unsigned long writeback_index ; struct address_space_operations const *a_ops ; unsigned long flags ; spinlock_t private_lock ; struct list_head private_list ; void *private_data ; }; struct request_queue; struct hd_struct; struct gendisk; struct block_device { dev_t bd_dev ; int bd_openers ; struct inode *bd_inode ; struct super_block *bd_super ; struct mutex bd_mutex ; struct list_head bd_inodes ; void *bd_claiming ; void *bd_holder ; int bd_holders ; bool bd_write_holder ; struct list_head bd_holder_disks ; struct block_device *bd_contains ; unsigned int bd_block_size ; struct hd_struct *bd_part ; unsigned int bd_part_count ; int bd_invalidated ; struct gendisk *bd_disk ; struct request_queue *bd_queue ; struct list_head bd_list ; unsigned long bd_private ; int bd_fsfreeze_count ; struct mutex bd_fsfreeze_mutex ; }; struct posix_acl; struct inode_operations; union __anonunion____missing_field_name_245 { unsigned int const i_nlink ; unsigned int __i_nlink ; }; union __anonunion____missing_field_name_246 { struct hlist_head i_dentry ; struct callback_head i_rcu ; }; struct file_lock_context; struct cdev; union __anonunion____missing_field_name_247 { struct pipe_inode_info *i_pipe ; struct block_device *i_bdev ; struct cdev *i_cdev ; char *i_link ; }; struct inode { umode_t i_mode ; unsigned short i_opflags ; kuid_t i_uid ; kgid_t i_gid ; unsigned int i_flags ; struct posix_acl *i_acl ; struct posix_acl *i_default_acl ; struct inode_operations const *i_op ; struct super_block *i_sb ; struct address_space *i_mapping ; void *i_security ; unsigned long i_ino ; union __anonunion____missing_field_name_245 __annonCompField73 ; dev_t i_rdev ; loff_t i_size ; struct timespec i_atime ; struct timespec i_mtime ; struct timespec i_ctime ; spinlock_t i_lock ; unsigned short i_bytes ; unsigned int i_blkbits ; blkcnt_t i_blocks ; unsigned long i_state ; struct mutex i_mutex ; unsigned long dirtied_when ; unsigned long dirtied_time_when ; struct hlist_node i_hash ; struct list_head i_wb_list ; struct bdi_writeback *i_wb ; int i_wb_frn_winner ; u16 i_wb_frn_avg_time ; u16 i_wb_frn_history ; struct list_head i_lru ; struct list_head i_sb_list ; union __anonunion____missing_field_name_246 __annonCompField74 ; u64 i_version ; atomic_t i_count ; atomic_t i_dio_count ; atomic_t i_writecount ; atomic_t i_readcount ; struct file_operations const *i_fop ; struct file_lock_context *i_flctx ; struct address_space i_data ; struct list_head i_devices ; union __anonunion____missing_field_name_247 __annonCompField75 ; __u32 i_generation ; __u32 i_fsnotify_mask ; struct hlist_head i_fsnotify_marks ; void *i_private ; }; struct fown_struct { rwlock_t lock ; struct pid *pid ; enum pid_type pid_type ; kuid_t uid ; kuid_t euid ; int signum ; }; struct file_ra_state { unsigned long start ; unsigned int size ; unsigned int async_size ; unsigned int ra_pages ; unsigned int mmap_miss ; loff_t prev_pos ; }; union __anonunion_f_u_248 { struct llist_node fu_llist ; struct callback_head fu_rcuhead ; }; struct file { union __anonunion_f_u_248 f_u ; struct path f_path ; struct inode *f_inode ; struct file_operations const *f_op ; spinlock_t f_lock ; atomic_long_t f_count ; unsigned int f_flags ; fmode_t f_mode ; struct mutex f_pos_lock ; loff_t f_pos ; struct fown_struct f_owner ; struct cred const *f_cred ; struct file_ra_state f_ra ; u64 f_version ; void *f_security ; void *private_data ; struct list_head f_ep_links ; struct list_head f_tfile_llink ; struct address_space *f_mapping ; }; typedef void *fl_owner_t; struct file_lock; struct file_lock_operations { void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ; void (*fl_release_private)(struct file_lock * ) ; }; struct lock_manager_operations { int (*lm_compare_owner)(struct file_lock * , struct file_lock * ) ; unsigned long (*lm_owner_key)(struct file_lock * ) ; fl_owner_t (*lm_get_owner)(fl_owner_t ) ; void (*lm_put_owner)(fl_owner_t ) ; void (*lm_notify)(struct file_lock * ) ; int (*lm_grant)(struct file_lock * , int ) ; bool (*lm_break)(struct file_lock * ) ; int (*lm_change)(struct file_lock * , int , struct list_head * ) ; void (*lm_setup)(struct file_lock * , void ** ) ; }; struct net; struct nlm_lockowner; struct nfs_lock_info { u32 state ; struct nlm_lockowner *owner ; struct list_head list ; }; struct nfs4_lock_state; struct nfs4_lock_info { struct nfs4_lock_state *owner ; }; struct fasync_struct; struct __anonstruct_afs_250 { struct list_head link ; int state ; }; union __anonunion_fl_u_249 { struct nfs_lock_info nfs_fl ; struct nfs4_lock_info nfs4_fl ; struct __anonstruct_afs_250 afs ; }; struct file_lock { struct file_lock *fl_next ; struct list_head fl_list ; struct hlist_node fl_link ; struct list_head fl_block ; fl_owner_t fl_owner ; unsigned int fl_flags ; unsigned char fl_type ; unsigned int fl_pid ; int fl_link_cpu ; struct pid *fl_nspid ; wait_queue_head_t fl_wait ; struct file *fl_file ; loff_t fl_start ; loff_t fl_end ; struct fasync_struct *fl_fasync ; unsigned long fl_break_time ; unsigned long fl_downgrade_time ; struct file_lock_operations const *fl_ops ; struct lock_manager_operations const *fl_lmops ; union __anonunion_fl_u_249 fl_u ; }; struct file_lock_context { spinlock_t flc_lock ; struct list_head flc_flock ; struct list_head flc_posix ; struct list_head flc_lease ; }; struct fasync_struct { spinlock_t fa_lock ; int magic ; int fa_fd ; struct fasync_struct *fa_next ; struct file *fa_file ; struct callback_head fa_rcu ; }; struct sb_writers { struct percpu_counter counter[3U] ; wait_queue_head_t wait ; int frozen ; wait_queue_head_t wait_unfrozen ; struct lockdep_map lock_map[3U] ; }; struct super_operations; struct xattr_handler; struct mtd_info; struct super_block { struct list_head s_list ; dev_t s_dev ; unsigned char s_blocksize_bits ; unsigned long s_blocksize ; loff_t s_maxbytes ; struct file_system_type *s_type ; struct super_operations const *s_op ; struct dquot_operations const *dq_op ; struct quotactl_ops const *s_qcop ; struct export_operations const *s_export_op ; unsigned long s_flags ; unsigned long s_iflags ; unsigned long s_magic ; struct dentry *s_root ; struct rw_semaphore s_umount ; int s_count ; atomic_t s_active ; void *s_security ; struct xattr_handler const **s_xattr ; struct list_head s_inodes ; struct hlist_bl_head s_anon ; struct list_head s_mounts ; struct block_device *s_bdev ; struct backing_dev_info *s_bdi ; struct mtd_info *s_mtd ; struct hlist_node s_instances ; unsigned int s_quota_types ; struct quota_info s_dquot ; struct sb_writers s_writers ; char s_id[32U] ; u8 s_uuid[16U] ; void *s_fs_info ; unsigned int s_max_links ; fmode_t s_mode ; u32 s_time_gran ; struct mutex s_vfs_rename_mutex ; char *s_subtype ; char *s_options ; struct dentry_operations const *s_d_op ; int cleancache_poolid ; struct shrinker s_shrink ; atomic_long_t s_remove_count ; int s_readonly_remount ; struct workqueue_struct *s_dio_done_wq ; struct hlist_head s_pins ; struct list_lru s_dentry_lru ; struct list_lru s_inode_lru ; struct callback_head rcu ; int s_stack_depth ; }; struct fiemap_extent_info { unsigned int fi_flags ; unsigned int fi_extents_mapped ; unsigned int fi_extents_max ; struct fiemap_extent *fi_extents_start ; }; struct dir_context; struct dir_context { int (*actor)(struct dir_context * , char const * , int , loff_t , u64 , unsigned int ) ; loff_t pos ; }; struct block_device_operations; struct file_operations { struct module *owner ; loff_t (*llseek)(struct file * , loff_t , int ) ; ssize_t (*read)(struct file * , char * , size_t , loff_t * ) ; ssize_t (*write)(struct file * , char const * , size_t , loff_t * ) ; ssize_t (*read_iter)(struct kiocb * , struct iov_iter * ) ; ssize_t (*write_iter)(struct kiocb * , struct iov_iter * ) ; int (*iterate)(struct file * , struct dir_context * ) ; unsigned int (*poll)(struct file * , struct poll_table_struct * ) ; long (*unlocked_ioctl)(struct file * , unsigned int , unsigned long ) ; long (*compat_ioctl)(struct file * , unsigned int , unsigned long ) ; int (*mmap)(struct file * , struct vm_area_struct * ) ; int (*mremap)(struct file * , struct vm_area_struct * ) ; int (*open)(struct inode * , struct file * ) ; int (*flush)(struct file * , fl_owner_t ) ; int (*release)(struct inode * , struct file * ) ; int (*fsync)(struct file * , loff_t , loff_t , int ) ; int (*aio_fsync)(struct kiocb * , int ) ; int (*fasync)(int , struct file * , int ) ; int (*lock)(struct file * , int , struct file_lock * ) ; ssize_t (*sendpage)(struct file * , struct page * , int , size_t , loff_t * , int ) ; unsigned long (*get_unmapped_area)(struct file * , unsigned long , unsigned long , unsigned long , unsigned long ) ; int (*check_flags)(int ) ; int (*flock)(struct file * , int , struct file_lock * ) ; ssize_t (*splice_write)(struct pipe_inode_info * , struct file * , loff_t * , size_t , unsigned int ) ; ssize_t (*splice_read)(struct file * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; int (*setlease)(struct file * , long , struct file_lock ** , void ** ) ; long (*fallocate)(struct file * , int , loff_t , loff_t ) ; void (*show_fdinfo)(struct seq_file * , struct file * ) ; }; struct inode_operations { struct dentry *(*lookup)(struct inode * , struct dentry * , unsigned int ) ; char const *(*follow_link)(struct dentry * , void ** ) ; int (*permission)(struct inode * , int ) ; struct posix_acl *(*get_acl)(struct inode * , int ) ; int (*readlink)(struct dentry * , char * , int ) ; void (*put_link)(struct inode * , void * ) ; int (*create)(struct inode * , struct dentry * , umode_t , bool ) ; int (*link)(struct dentry * , struct inode * , struct dentry * ) ; int (*unlink)(struct inode * , struct dentry * ) ; int (*symlink)(struct inode * , struct dentry * , char const * ) ; int (*mkdir)(struct inode * , struct dentry * , umode_t ) ; int (*rmdir)(struct inode * , struct dentry * ) ; int (*mknod)(struct inode * , struct dentry * , umode_t , dev_t ) ; int (*rename)(struct inode * , struct dentry * , struct inode * , struct dentry * ) ; int (*rename2)(struct inode * , struct dentry * , struct inode * , struct dentry * , unsigned int ) ; int (*setattr)(struct dentry * , struct iattr * ) ; int (*getattr)(struct vfsmount * , struct dentry * , struct kstat * ) ; int (*setxattr)(struct dentry * , char const * , void const * , size_t , int ) ; ssize_t (*getxattr)(struct dentry * , char const * , void * , size_t ) ; ssize_t (*listxattr)(struct dentry * , char * , size_t ) ; int (*removexattr)(struct dentry * , char const * ) ; int (*fiemap)(struct inode * , struct fiemap_extent_info * , u64 , u64 ) ; int (*update_time)(struct inode * , struct timespec * , int ) ; int (*atomic_open)(struct inode * , struct dentry * , struct file * , unsigned int , umode_t , int * ) ; int (*tmpfile)(struct inode * , struct dentry * , umode_t ) ; int (*set_acl)(struct inode * , struct posix_acl * , int ) ; }; struct super_operations { struct inode *(*alloc_inode)(struct super_block * ) ; void (*destroy_inode)(struct inode * ) ; void (*dirty_inode)(struct inode * , int ) ; int (*write_inode)(struct inode * , struct writeback_control * ) ; int (*drop_inode)(struct inode * ) ; void (*evict_inode)(struct inode * ) ; void (*put_super)(struct super_block * ) ; int (*sync_fs)(struct super_block * , int ) ; int (*freeze_super)(struct super_block * ) ; int (*freeze_fs)(struct super_block * ) ; int (*thaw_super)(struct super_block * ) ; int (*unfreeze_fs)(struct super_block * ) ; int (*statfs)(struct dentry * , struct kstatfs * ) ; int (*remount_fs)(struct super_block * , int * , char * ) ; void (*umount_begin)(struct super_block * ) ; int (*show_options)(struct seq_file * , struct dentry * ) ; int (*show_devname)(struct seq_file * , struct dentry * ) ; int (*show_path)(struct seq_file * , struct dentry * ) ; int (*show_stats)(struct seq_file * , struct dentry * ) ; ssize_t (*quota_read)(struct super_block * , int , char * , size_t , loff_t ) ; ssize_t (*quota_write)(struct super_block * , int , char const * , size_t , loff_t ) ; struct dquot **(*get_dquots)(struct inode * ) ; int (*bdev_try_to_free_page)(struct super_block * , struct page * , gfp_t ) ; long (*nr_cached_objects)(struct super_block * , struct shrink_control * ) ; long (*free_cached_objects)(struct super_block * , struct shrink_control * ) ; }; struct file_system_type { char const *name ; int fs_flags ; struct dentry *(*mount)(struct file_system_type * , int , char const * , void * ) ; void (*kill_sb)(struct super_block * ) ; struct module *owner ; struct file_system_type *next ; struct hlist_head fs_supers ; struct lock_class_key s_lock_key ; struct lock_class_key s_umount_key ; struct lock_class_key s_vfs_rename_key ; struct lock_class_key s_writers_key[3U] ; struct lock_class_key i_lock_key ; struct lock_class_key i_mutex_key ; struct lock_class_key i_mutex_dir_key ; }; typedef s32 compat_time_t; typedef s32 compat_long_t; typedef u32 compat_uptr_t; struct compat_timespec { compat_time_t tv_sec ; s32 tv_nsec ; }; struct compat_robust_list { compat_uptr_t next ; }; struct compat_robust_list_head { struct compat_robust_list list ; compat_long_t futex_offset ; compat_uptr_t list_op_pending ; }; enum ldv_24541 { SS_FREE = 0, SS_UNCONNECTED = 1, SS_CONNECTING = 2, SS_CONNECTED = 3, SS_DISCONNECTING = 4 } ; typedef enum ldv_24541 socket_state; struct socket_wq { wait_queue_head_t wait ; struct fasync_struct *fasync_list ; struct callback_head rcu ; }; struct proto_ops; struct socket { socket_state state ; short type ; unsigned long flags ; struct socket_wq *wq ; struct file *file ; struct sock *sk ; struct proto_ops const *ops ; }; struct proto_ops { int family ; struct module *owner ; int (*release)(struct socket * ) ; int (*bind)(struct socket * , struct sockaddr * , int ) ; int (*connect)(struct socket * , struct sockaddr * , int , int ) ; int (*socketpair)(struct socket * , struct socket * ) ; int (*accept)(struct socket * , struct socket * , int ) ; int (*getname)(struct socket * , struct sockaddr * , int * , int ) ; unsigned int (*poll)(struct file * , struct socket * , struct poll_table_struct * ) ; int (*ioctl)(struct socket * , unsigned int , unsigned long ) ; int (*compat_ioctl)(struct socket * , unsigned int , unsigned long ) ; int (*listen)(struct socket * , int ) ; int (*shutdown)(struct socket * , int ) ; int (*setsockopt)(struct socket * , int , int , char * , unsigned int ) ; int (*getsockopt)(struct socket * , int , int , char * , int * ) ; int (*compat_setsockopt)(struct socket * , int , int , char * , unsigned int ) ; int (*compat_getsockopt)(struct socket * , int , int , char * , int * ) ; int (*sendmsg)(struct socket * , struct msghdr * , size_t ) ; int (*recvmsg)(struct socket * , struct msghdr * , size_t , int ) ; int (*mmap)(struct file * , struct socket * , struct vm_area_struct * ) ; ssize_t (*sendpage)(struct socket * , struct page * , int , size_t , int ) ; ssize_t (*splice_read)(struct socket * , loff_t * , struct pipe_inode_info * , size_t , unsigned int ) ; int (*set_peek_off)(struct sock * , int ) ; }; struct in6_addr; struct sk_buff; struct dma_attrs { unsigned long flags[1U] ; }; enum dma_data_direction { DMA_BIDIRECTIONAL = 0, DMA_TO_DEVICE = 1, DMA_FROM_DEVICE = 2, DMA_NONE = 3 } ; struct dma_map_ops { void *(*alloc)(struct device * , size_t , dma_addr_t * , gfp_t , struct dma_attrs * ) ; void (*free)(struct device * , size_t , void * , dma_addr_t , struct dma_attrs * ) ; int (*mmap)(struct device * , struct vm_area_struct * , void * , dma_addr_t , size_t , struct dma_attrs * ) ; int (*get_sgtable)(struct device * , struct sg_table * , void * , dma_addr_t , size_t , struct dma_attrs * ) ; dma_addr_t (*map_page)(struct device * , struct page * , unsigned long , size_t , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_page)(struct device * , dma_addr_t , size_t , enum dma_data_direction , struct dma_attrs * ) ; int (*map_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*unmap_sg)(struct device * , struct scatterlist * , int , enum dma_data_direction , struct dma_attrs * ) ; void (*sync_single_for_cpu)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_single_for_device)(struct device * , dma_addr_t , size_t , enum dma_data_direction ) ; void (*sync_sg_for_cpu)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; void (*sync_sg_for_device)(struct device * , struct scatterlist * , int , enum dma_data_direction ) ; int (*mapping_error)(struct device * , dma_addr_t ) ; int (*dma_supported)(struct device * , u64 ) ; int (*set_dma_mask)(struct device * , u64 ) ; int is_phys ; }; typedef u64 netdev_features_t; union __anonunion_in6_u_265 { __u8 u6_addr8[16U] ; __be16 u6_addr16[8U] ; __be32 u6_addr32[4U] ; }; struct in6_addr { union __anonunion_in6_u_265 in6_u ; }; struct ethhdr { unsigned char h_dest[6U] ; unsigned char h_source[6U] ; __be16 h_proto ; }; struct pipe_buf_operations; struct pipe_buffer { struct page *page ; unsigned int offset ; unsigned int len ; struct pipe_buf_operations const *ops ; unsigned int flags ; unsigned long private ; }; struct pipe_inode_info { struct mutex mutex ; wait_queue_head_t wait ; unsigned int nrbufs ; unsigned int curbuf ; unsigned int buffers ; unsigned int readers ; unsigned int writers ; unsigned int files ; unsigned int waiting_writers ; unsigned int r_counter ; unsigned int w_counter ; struct page *tmp_page ; struct fasync_struct *fasync_readers ; struct fasync_struct *fasync_writers ; struct pipe_buffer *bufs ; }; struct pipe_buf_operations { int can_merge ; int (*confirm)(struct pipe_inode_info * , struct pipe_buffer * ) ; void (*release)(struct pipe_inode_info * , struct pipe_buffer * ) ; int (*steal)(struct pipe_inode_info * , struct pipe_buffer * ) ; void (*get)(struct pipe_inode_info * , struct pipe_buffer * ) ; }; struct napi_struct; struct nf_conntrack { atomic_t use ; }; union __anonunion____missing_field_name_270 { struct net_device *physoutdev ; char neigh_header[8U] ; }; union __anonunion____missing_field_name_271 { __be32 ipv4_daddr ; struct in6_addr ipv6_daddr ; }; struct nf_bridge_info { atomic_t use ; unsigned char orig_proto ; bool pkt_otherhost ; __u16 frag_max_size ; unsigned int mask ; struct net_device *physindev ; union __anonunion____missing_field_name_270 __annonCompField79 ; union __anonunion____missing_field_name_271 __annonCompField80 ; }; struct sk_buff_head { struct sk_buff *next ; struct sk_buff *prev ; __u32 qlen ; spinlock_t lock ; }; typedef unsigned int sk_buff_data_t; struct __anonstruct____missing_field_name_274 { u32 stamp_us ; u32 stamp_jiffies ; }; union __anonunion____missing_field_name_273 { u64 v64 ; struct __anonstruct____missing_field_name_274 __annonCompField81 ; }; struct skb_mstamp { union __anonunion____missing_field_name_273 __annonCompField82 ; }; union __anonunion____missing_field_name_277 { ktime_t tstamp ; struct skb_mstamp skb_mstamp ; }; struct __anonstruct____missing_field_name_276 { struct sk_buff *next ; struct sk_buff *prev ; union __anonunion____missing_field_name_277 __annonCompField83 ; }; union __anonunion____missing_field_name_275 { struct __anonstruct____missing_field_name_276 __annonCompField84 ; struct rb_node rbnode ; }; struct sec_path; struct __anonstruct____missing_field_name_279 { __u16 csum_start ; __u16 csum_offset ; }; union __anonunion____missing_field_name_278 { __wsum csum ; struct __anonstruct____missing_field_name_279 __annonCompField86 ; }; union __anonunion____missing_field_name_280 { unsigned int napi_id ; unsigned int sender_cpu ; }; union __anonunion____missing_field_name_281 { __u32 mark ; __u32 reserved_tailroom ; }; union __anonunion____missing_field_name_282 { __be16 inner_protocol ; __u8 inner_ipproto ; }; struct sk_buff { union __anonunion____missing_field_name_275 __annonCompField85 ; struct sock *sk ; struct net_device *dev ; char cb[48U] ; unsigned long _skb_refdst ; void (*destructor)(struct sk_buff * ) ; struct sec_path *sp ; struct nf_conntrack *nfct ; struct nf_bridge_info *nf_bridge ; unsigned int len ; unsigned int data_len ; __u16 mac_len ; __u16 hdr_len ; __u16 queue_mapping ; unsigned char cloned : 1 ; unsigned char nohdr : 1 ; unsigned char fclone : 2 ; unsigned char peeked : 1 ; unsigned char head_frag : 1 ; unsigned char xmit_more : 1 ; __u32 headers_start[0U] ; __u8 __pkt_type_offset[0U] ; unsigned char pkt_type : 3 ; unsigned char pfmemalloc : 1 ; unsigned char ignore_df : 1 ; unsigned char nfctinfo : 3 ; unsigned char nf_trace : 1 ; unsigned char ip_summed : 2 ; unsigned char ooo_okay : 1 ; unsigned char l4_hash : 1 ; unsigned char sw_hash : 1 ; unsigned char wifi_acked_valid : 1 ; unsigned char wifi_acked : 1 ; unsigned char no_fcs : 1 ; unsigned char encapsulation : 1 ; unsigned char encap_hdr_csum : 1 ; unsigned char csum_valid : 1 ; unsigned char csum_complete_sw : 1 ; unsigned char csum_level : 2 ; unsigned char csum_bad : 1 ; unsigned char ndisc_nodetype : 2 ; unsigned char ipvs_property : 1 ; unsigned char inner_protocol_type : 1 ; unsigned char remcsum_offload : 1 ; __u16 tc_index ; __u16 tc_verd ; union __anonunion____missing_field_name_278 __annonCompField87 ; __u32 priority ; int skb_iif ; __u32 hash ; __be16 vlan_proto ; __u16 vlan_tci ; union __anonunion____missing_field_name_280 __annonCompField88 ; __u32 secmark ; union __anonunion____missing_field_name_281 __annonCompField89 ; union __anonunion____missing_field_name_282 __annonCompField90 ; __u16 inner_transport_header ; __u16 inner_network_header ; __u16 inner_mac_header ; __be16 protocol ; __u16 transport_header ; __u16 network_header ; __u16 mac_header ; __u32 headers_end[0U] ; sk_buff_data_t tail ; sk_buff_data_t end ; unsigned char *head ; unsigned char *data ; unsigned int truesize ; atomic_t users ; }; struct dst_entry; struct rtable; struct ethtool_cmd { __u32 cmd ; __u32 supported ; __u32 advertising ; __u16 speed ; __u8 duplex ; __u8 port ; __u8 phy_address ; __u8 transceiver ; __u8 autoneg ; __u8 mdio_support ; __u32 maxtxpkt ; __u32 maxrxpkt ; __u16 speed_hi ; __u8 eth_tp_mdix ; __u8 eth_tp_mdix_ctrl ; __u32 lp_advertising ; __u32 reserved[2U] ; }; struct ethtool_drvinfo { __u32 cmd ; char driver[32U] ; char version[32U] ; char fw_version[32U] ; char bus_info[32U] ; char erom_version[32U] ; char reserved2[12U] ; __u32 n_priv_flags ; __u32 n_stats ; __u32 testinfo_len ; __u32 eedump_len ; __u32 regdump_len ; }; struct ethtool_wolinfo { __u32 cmd ; __u32 supported ; __u32 wolopts ; __u8 sopass[6U] ; }; struct ethtool_tunable { __u32 cmd ; __u32 id ; __u32 type_id ; __u32 len ; void *data[0U] ; }; struct ethtool_regs { __u32 cmd ; __u32 version ; __u32 len ; __u8 data[0U] ; }; struct ethtool_eeprom { __u32 cmd ; __u32 magic ; __u32 offset ; __u32 len ; __u8 data[0U] ; }; struct ethtool_eee { __u32 cmd ; __u32 supported ; __u32 advertised ; __u32 lp_advertised ; __u32 eee_active ; __u32 eee_enabled ; __u32 tx_lpi_enabled ; __u32 tx_lpi_timer ; __u32 reserved[2U] ; }; struct ethtool_modinfo { __u32 cmd ; __u32 type ; __u32 eeprom_len ; __u32 reserved[8U] ; }; struct ethtool_coalesce { __u32 cmd ; __u32 rx_coalesce_usecs ; __u32 rx_max_coalesced_frames ; __u32 rx_coalesce_usecs_irq ; __u32 rx_max_coalesced_frames_irq ; __u32 tx_coalesce_usecs ; __u32 tx_max_coalesced_frames ; __u32 tx_coalesce_usecs_irq ; __u32 tx_max_coalesced_frames_irq ; __u32 stats_block_coalesce_usecs ; __u32 use_adaptive_rx_coalesce ; __u32 use_adaptive_tx_coalesce ; __u32 pkt_rate_low ; __u32 rx_coalesce_usecs_low ; __u32 rx_max_coalesced_frames_low ; __u32 tx_coalesce_usecs_low ; __u32 tx_max_coalesced_frames_low ; __u32 pkt_rate_high ; __u32 rx_coalesce_usecs_high ; __u32 rx_max_coalesced_frames_high ; __u32 tx_coalesce_usecs_high ; __u32 tx_max_coalesced_frames_high ; __u32 rate_sample_interval ; }; struct ethtool_ringparam { __u32 cmd ; __u32 rx_max_pending ; __u32 rx_mini_max_pending ; __u32 rx_jumbo_max_pending ; __u32 tx_max_pending ; __u32 rx_pending ; __u32 rx_mini_pending ; __u32 rx_jumbo_pending ; __u32 tx_pending ; }; struct ethtool_channels { __u32 cmd ; __u32 max_rx ; __u32 max_tx ; __u32 max_other ; __u32 max_combined ; __u32 rx_count ; __u32 tx_count ; __u32 other_count ; __u32 combined_count ; }; struct ethtool_pauseparam { __u32 cmd ; __u32 autoneg ; __u32 rx_pause ; __u32 tx_pause ; }; struct ethtool_test { __u32 cmd ; __u32 flags ; __u32 reserved ; __u32 len ; __u64 data[0U] ; }; struct ethtool_stats { __u32 cmd ; __u32 n_stats ; __u64 data[0U] ; }; struct ethtool_tcpip4_spec { __be32 ip4src ; __be32 ip4dst ; __be16 psrc ; __be16 pdst ; __u8 tos ; }; struct ethtool_ah_espip4_spec { __be32 ip4src ; __be32 ip4dst ; __be32 spi ; __u8 tos ; }; struct ethtool_usrip4_spec { __be32 ip4src ; __be32 ip4dst ; __be32 l4_4_bytes ; __u8 tos ; __u8 ip_ver ; __u8 proto ; }; union ethtool_flow_union { struct ethtool_tcpip4_spec tcp_ip4_spec ; struct ethtool_tcpip4_spec udp_ip4_spec ; struct ethtool_tcpip4_spec sctp_ip4_spec ; struct ethtool_ah_espip4_spec ah_ip4_spec ; struct ethtool_ah_espip4_spec esp_ip4_spec ; struct ethtool_usrip4_spec usr_ip4_spec ; struct ethhdr ether_spec ; __u8 hdata[52U] ; }; struct ethtool_flow_ext { __u8 padding[2U] ; unsigned char h_dest[6U] ; __be16 vlan_etype ; __be16 vlan_tci ; __be32 data[2U] ; }; struct ethtool_rx_flow_spec { __u32 flow_type ; union ethtool_flow_union h_u ; struct ethtool_flow_ext h_ext ; union ethtool_flow_union m_u ; struct ethtool_flow_ext m_ext ; __u64 ring_cookie ; __u32 location ; }; struct ethtool_rxnfc { __u32 cmd ; __u32 flow_type ; __u64 data ; struct ethtool_rx_flow_spec fs ; __u32 rule_cnt ; __u32 rule_locs[0U] ; }; struct ethtool_flash { __u32 cmd ; __u32 region ; char data[128U] ; }; struct ethtool_dump { __u32 cmd ; __u32 version ; __u32 flag ; __u32 len ; __u8 data[0U] ; }; struct ethtool_ts_info { __u32 cmd ; __u32 so_timestamping ; __s32 phc_index ; __u32 tx_types ; __u32 tx_reserved[3U] ; __u32 rx_filters ; __u32 rx_reserved[3U] ; }; enum ethtool_phys_id_state { ETHTOOL_ID_INACTIVE = 0, ETHTOOL_ID_ACTIVE = 1, ETHTOOL_ID_ON = 2, ETHTOOL_ID_OFF = 3 } ; struct ethtool_ops { int (*get_settings)(struct net_device * , struct ethtool_cmd * ) ; int (*set_settings)(struct net_device * , struct ethtool_cmd * ) ; void (*get_drvinfo)(struct net_device * , struct ethtool_drvinfo * ) ; int (*get_regs_len)(struct net_device * ) ; void (*get_regs)(struct net_device * , struct ethtool_regs * , void * ) ; void (*get_wol)(struct net_device * , struct ethtool_wolinfo * ) ; int (*set_wol)(struct net_device * , struct ethtool_wolinfo * ) ; u32 (*get_msglevel)(struct net_device * ) ; void (*set_msglevel)(struct net_device * , u32 ) ; int (*nway_reset)(struct net_device * ) ; u32 (*get_link)(struct net_device * ) ; int (*get_eeprom_len)(struct net_device * ) ; int (*get_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*set_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*get_coalesce)(struct net_device * , struct ethtool_coalesce * ) ; int (*set_coalesce)(struct net_device * , struct ethtool_coalesce * ) ; void (*get_ringparam)(struct net_device * , struct ethtool_ringparam * ) ; int (*set_ringparam)(struct net_device * , struct ethtool_ringparam * ) ; void (*get_pauseparam)(struct net_device * , struct ethtool_pauseparam * ) ; int (*set_pauseparam)(struct net_device * , struct ethtool_pauseparam * ) ; void (*self_test)(struct net_device * , struct ethtool_test * , u64 * ) ; void (*get_strings)(struct net_device * , u32 , u8 * ) ; int (*set_phys_id)(struct net_device * , enum ethtool_phys_id_state ) ; void (*get_ethtool_stats)(struct net_device * , struct ethtool_stats * , u64 * ) ; int (*begin)(struct net_device * ) ; void (*complete)(struct net_device * ) ; u32 (*get_priv_flags)(struct net_device * ) ; int (*set_priv_flags)(struct net_device * , u32 ) ; int (*get_sset_count)(struct net_device * , int ) ; int (*get_rxnfc)(struct net_device * , struct ethtool_rxnfc * , u32 * ) ; int (*set_rxnfc)(struct net_device * , struct ethtool_rxnfc * ) ; int (*flash_device)(struct net_device * , struct ethtool_flash * ) ; int (*reset)(struct net_device * , u32 * ) ; u32 (*get_rxfh_key_size)(struct net_device * ) ; u32 (*get_rxfh_indir_size)(struct net_device * ) ; int (*get_rxfh)(struct net_device * , u32 * , u8 * , u8 * ) ; int (*set_rxfh)(struct net_device * , u32 const * , u8 const * , u8 const ) ; void (*get_channels)(struct net_device * , struct ethtool_channels * ) ; int (*set_channels)(struct net_device * , struct ethtool_channels * ) ; int (*get_dump_flag)(struct net_device * , struct ethtool_dump * ) ; int (*get_dump_data)(struct net_device * , struct ethtool_dump * , void * ) ; int (*set_dump)(struct net_device * , struct ethtool_dump * ) ; int (*get_ts_info)(struct net_device * , struct ethtool_ts_info * ) ; int (*get_module_info)(struct net_device * , struct ethtool_modinfo * ) ; int (*get_module_eeprom)(struct net_device * , struct ethtool_eeprom * , u8 * ) ; int (*get_eee)(struct net_device * , struct ethtool_eee * ) ; int (*set_eee)(struct net_device * , struct ethtool_eee * ) ; int (*get_tunable)(struct net_device * , struct ethtool_tunable const * , void * ) ; int (*set_tunable)(struct net_device * , struct ethtool_tunable const * , void const * ) ; }; struct prot_inuse; struct netns_core { struct ctl_table_header *sysctl_hdr ; int sysctl_somaxconn ; struct prot_inuse *inuse ; }; struct u64_stats_sync { }; struct ipstats_mib { u64 mibs[36U] ; struct u64_stats_sync syncp ; }; struct icmp_mib { unsigned long mibs[28U] ; }; struct icmpmsg_mib { atomic_long_t mibs[512U] ; }; struct icmpv6_mib { unsigned long mibs[6U] ; }; struct icmpv6_mib_device { atomic_long_t mibs[6U] ; }; struct icmpv6msg_mib { atomic_long_t mibs[512U] ; }; struct icmpv6msg_mib_device { atomic_long_t mibs[512U] ; }; struct tcp_mib { unsigned long mibs[16U] ; }; struct udp_mib { unsigned long mibs[9U] ; }; struct linux_mib { unsigned long mibs[115U] ; }; struct linux_xfrm_mib { unsigned long mibs[29U] ; }; struct netns_mib { struct tcp_mib *tcp_statistics ; struct ipstats_mib *ip_statistics ; struct linux_mib *net_statistics ; struct udp_mib *udp_statistics ; struct udp_mib *udplite_statistics ; struct icmp_mib *icmp_statistics ; struct icmpmsg_mib *icmpmsg_statistics ; struct proc_dir_entry *proc_net_devsnmp6 ; struct udp_mib *udp_stats_in6 ; struct udp_mib *udplite_stats_in6 ; struct ipstats_mib *ipv6_statistics ; struct icmpv6_mib *icmpv6_statistics ; struct icmpv6msg_mib *icmpv6msg_statistics ; struct linux_xfrm_mib *xfrm_statistics ; }; struct netns_unix { int sysctl_max_dgram_qlen ; struct ctl_table_header *ctl ; }; struct netns_packet { struct mutex sklist_lock ; struct hlist_head sklist ; }; struct netns_frags { struct percpu_counter mem ; int timeout ; int high_thresh ; int low_thresh ; }; struct ipv4_devconf; struct fib_rules_ops; struct fib_table; struct local_ports { seqlock_t lock ; int range[2U] ; bool warned ; }; struct ping_group_range { seqlock_t lock ; kgid_t range[2U] ; }; struct inet_peer_base; struct xt_table; struct netns_ipv4 { struct ctl_table_header *forw_hdr ; struct ctl_table_header *frags_hdr ; struct ctl_table_header *ipv4_hdr ; struct ctl_table_header *route_hdr ; struct ctl_table_header *xfrm4_hdr ; struct ipv4_devconf *devconf_all ; struct ipv4_devconf *devconf_dflt ; struct fib_rules_ops *rules_ops ; bool fib_has_custom_rules ; struct fib_table *fib_local ; struct fib_table *fib_main ; struct fib_table *fib_default ; int fib_num_tclassid_users ; struct hlist_head *fib_table_hash ; bool fib_offload_disabled ; struct sock *fibnl ; struct sock **icmp_sk ; struct sock *mc_autojoin_sk ; struct inet_peer_base *peers ; struct sock **tcp_sk ; struct netns_frags frags ; struct xt_table *iptable_filter ; struct xt_table *iptable_mangle ; struct xt_table *iptable_raw ; struct xt_table *arptable_filter ; struct xt_table *iptable_security ; struct xt_table *nat_table ; int sysctl_icmp_echo_ignore_all ; int sysctl_icmp_echo_ignore_broadcasts ; int sysctl_icmp_ignore_bogus_error_responses ; int sysctl_icmp_ratelimit ; int sysctl_icmp_ratemask ; int sysctl_icmp_errors_use_inbound_ifaddr ; struct local_ports ip_local_ports ; int sysctl_tcp_ecn ; int sysctl_tcp_ecn_fallback ; int sysctl_ip_no_pmtu_disc ; int sysctl_ip_fwd_use_pmtu ; int sysctl_ip_nonlocal_bind ; int sysctl_fwmark_reflect ; int sysctl_tcp_fwmark_accept ; int sysctl_tcp_mtu_probing ; int sysctl_tcp_base_mss ; int sysctl_tcp_probe_threshold ; u32 sysctl_tcp_probe_interval ; struct ping_group_range ping_group_range ; atomic_t dev_addr_genid ; unsigned long *sysctl_local_reserved_ports ; struct list_head mr_tables ; struct fib_rules_ops *mr_rules_ops ; atomic_t rt_genid ; }; struct neighbour; struct dst_ops { unsigned short family ; unsigned int gc_thresh ; int (*gc)(struct dst_ops * ) ; struct dst_entry *(*check)(struct dst_entry * , __u32 ) ; unsigned int (*default_advmss)(struct dst_entry const * ) ; unsigned int (*mtu)(struct dst_entry const * ) ; u32 *(*cow_metrics)(struct dst_entry * , unsigned long ) ; void (*destroy)(struct dst_entry * ) ; void (*ifdown)(struct dst_entry * , struct net_device * , int ) ; struct dst_entry *(*negative_advice)(struct dst_entry * ) ; void (*link_failure)(struct sk_buff * ) ; void (*update_pmtu)(struct dst_entry * , struct sock * , struct sk_buff * , u32 ) ; void (*redirect)(struct dst_entry * , struct sock * , struct sk_buff * ) ; int (*local_out)(struct sk_buff * ) ; struct neighbour *(*neigh_lookup)(struct dst_entry const * , struct sk_buff * , void const * ) ; struct kmem_cache *kmem_cachep ; struct percpu_counter pcpuc_entries ; }; struct netns_sysctl_ipv6 { struct ctl_table_header *hdr ; struct ctl_table_header *route_hdr ; struct ctl_table_header *icmp_hdr ; struct ctl_table_header *frags_hdr ; struct ctl_table_header *xfrm6_hdr ; int bindv6only ; int flush_delay ; int ip6_rt_max_size ; int ip6_rt_gc_min_interval ; int ip6_rt_gc_timeout ; int ip6_rt_gc_interval ; int ip6_rt_gc_elasticity ; int ip6_rt_mtu_expires ; int ip6_rt_min_advmss ; int flowlabel_consistency ; int auto_flowlabels ; int icmpv6_time ; int anycast_src_echo_reply ; int fwmark_reflect ; int idgen_retries ; int idgen_delay ; int flowlabel_state_ranges ; }; struct ipv6_devconf; struct rt6_info; struct rt6_statistics; struct fib6_table; struct netns_ipv6 { struct netns_sysctl_ipv6 sysctl ; struct ipv6_devconf *devconf_all ; struct ipv6_devconf *devconf_dflt ; struct inet_peer_base *peers ; struct netns_frags frags ; struct xt_table *ip6table_filter ; struct xt_table *ip6table_mangle ; struct xt_table *ip6table_raw ; struct xt_table *ip6table_security ; struct xt_table *ip6table_nat ; struct rt6_info *ip6_null_entry ; struct rt6_statistics *rt6_stats ; struct timer_list ip6_fib_timer ; struct hlist_head *fib_table_hash ; struct fib6_table *fib6_main_tbl ; struct dst_ops ip6_dst_ops ; unsigned int ip6_rt_gc_expire ; unsigned long ip6_rt_last_gc ; struct rt6_info *ip6_prohibit_entry ; struct rt6_info *ip6_blk_hole_entry ; struct fib6_table *fib6_local_tbl ; struct fib_rules_ops *fib6_rules_ops ; struct sock **icmp_sk ; struct sock *ndisc_sk ; struct sock *tcp_sk ; struct sock *igmp_sk ; struct sock *mc_autojoin_sk ; struct list_head mr6_tables ; struct fib_rules_ops *mr6_rules_ops ; atomic_t dev_addr_genid ; atomic_t fib6_sernum ; }; struct netns_nf_frag { struct netns_sysctl_ipv6 sysctl ; struct netns_frags frags ; }; struct netns_sysctl_lowpan { struct ctl_table_header *frags_hdr ; }; struct netns_ieee802154_lowpan { struct netns_sysctl_lowpan sysctl ; struct netns_frags frags ; }; struct sctp_mib; struct netns_sctp { struct sctp_mib *sctp_statistics ; struct proc_dir_entry *proc_net_sctp ; struct ctl_table_header *sysctl_header ; struct sock *ctl_sock ; struct list_head local_addr_list ; struct list_head addr_waitq ; struct timer_list addr_wq_timer ; struct list_head auto_asconf_splist ; spinlock_t addr_wq_lock ; spinlock_t local_addr_lock ; unsigned int rto_initial ; unsigned int rto_min ; unsigned int rto_max ; int rto_alpha ; int rto_beta ; int max_burst ; int cookie_preserve_enable ; char *sctp_hmac_alg ; unsigned int valid_cookie_life ; unsigned int sack_timeout ; unsigned int hb_interval ; int max_retrans_association ; int max_retrans_path ; int max_retrans_init ; int pf_retrans ; int sndbuf_policy ; int rcvbuf_policy ; int default_auto_asconf ; int addip_enable ; int addip_noauth ; int prsctp_enable ; int auth_enable ; int scope_policy ; int rwnd_upd_shift ; unsigned long max_autoclose ; }; struct netns_dccp { struct sock *v4_ctl_sk ; struct sock *v6_ctl_sk ; }; struct nf_logger; struct netns_nf { struct proc_dir_entry *proc_netfilter ; struct nf_logger const *nf_loggers[13U] ; struct ctl_table_header *nf_log_dir_header ; }; struct ebt_table; struct netns_xt { struct list_head tables[13U] ; bool notrack_deprecated_warning ; bool clusterip_deprecated_warning ; struct ebt_table *broute_table ; struct ebt_table *frame_filter ; struct ebt_table *frame_nat ; }; struct nf_proto_net { struct ctl_table_header *ctl_table_header ; struct ctl_table *ctl_table ; struct ctl_table_header *ctl_compat_header ; struct ctl_table *ctl_compat_table ; unsigned int users ; }; struct nf_generic_net { struct nf_proto_net pn ; unsigned int timeout ; }; struct nf_tcp_net { struct nf_proto_net pn ; unsigned int timeouts[14U] ; unsigned int tcp_loose ; unsigned int tcp_be_liberal ; unsigned int tcp_max_retrans ; }; struct nf_udp_net { struct nf_proto_net pn ; unsigned int timeouts[2U] ; }; struct nf_icmp_net { struct nf_proto_net pn ; unsigned int timeout ; }; struct nf_ip_net { struct nf_generic_net generic ; struct nf_tcp_net tcp ; struct nf_udp_net udp ; struct nf_icmp_net icmp ; struct nf_icmp_net icmpv6 ; struct ctl_table_header *ctl_table_header ; struct ctl_table *ctl_table ; }; struct ct_pcpu { spinlock_t lock ; struct hlist_nulls_head unconfirmed ; struct hlist_nulls_head dying ; struct hlist_nulls_head tmpl ; }; struct ip_conntrack_stat; struct nf_ct_event_notifier; struct nf_exp_event_notifier; struct netns_ct { atomic_t count ; unsigned int expect_count ; struct delayed_work ecache_dwork ; bool ecache_dwork_pending ; struct ctl_table_header *sysctl_header ; struct ctl_table_header *acct_sysctl_header ; struct ctl_table_header *tstamp_sysctl_header ; struct ctl_table_header *event_sysctl_header ; struct ctl_table_header *helper_sysctl_header ; char *slabname ; unsigned int sysctl_log_invalid ; int sysctl_events ; int sysctl_acct ; int sysctl_auto_assign_helper ; bool auto_assign_helper_warned ; int sysctl_tstamp ; int sysctl_checksum ; unsigned int htable_size ; seqcount_t generation ; struct kmem_cache *nf_conntrack_cachep ; struct hlist_nulls_head *hash ; struct hlist_head *expect_hash ; struct ct_pcpu *pcpu_lists ; struct ip_conntrack_stat *stat ; struct nf_ct_event_notifier *nf_conntrack_event_cb ; struct nf_exp_event_notifier *nf_expect_event_cb ; struct nf_ip_net nf_ct_proto ; unsigned int labels_used ; u8 label_words ; struct hlist_head *nat_bysource ; unsigned int nat_htable_size ; }; struct nft_af_info; struct netns_nftables { struct list_head af_info ; struct list_head commit_list ; struct nft_af_info *ipv4 ; struct nft_af_info *ipv6 ; struct nft_af_info *inet ; struct nft_af_info *arp ; struct nft_af_info *bridge ; struct nft_af_info *netdev ; unsigned int base_seq ; u8 gencursor ; }; struct tasklet_struct { struct tasklet_struct *next ; unsigned long state ; atomic_t count ; void (*func)(unsigned long ) ; unsigned long data ; }; struct flow_cache_percpu { struct hlist_head *hash_table ; int hash_count ; u32 hash_rnd ; int hash_rnd_recalc ; struct tasklet_struct flush_tasklet ; }; struct flow_cache { u32 hash_shift ; struct flow_cache_percpu *percpu ; struct notifier_block hotcpu_notifier ; int low_watermark ; int high_watermark ; struct timer_list rnd_timer ; }; struct xfrm_policy_hash { struct hlist_head *table ; unsigned int hmask ; u8 dbits4 ; u8 sbits4 ; u8 dbits6 ; u8 sbits6 ; }; struct xfrm_policy_hthresh { struct work_struct work ; seqlock_t lock ; u8 lbits4 ; u8 rbits4 ; u8 lbits6 ; u8 rbits6 ; }; struct netns_xfrm { struct list_head state_all ; struct hlist_head *state_bydst ; struct hlist_head *state_bysrc ; struct hlist_head *state_byspi ; unsigned int state_hmask ; unsigned int state_num ; struct work_struct state_hash_work ; struct hlist_head state_gc_list ; struct work_struct state_gc_work ; struct list_head policy_all ; struct hlist_head *policy_byidx ; unsigned int policy_idx_hmask ; struct hlist_head policy_inexact[3U] ; struct xfrm_policy_hash policy_bydst[3U] ; unsigned int policy_count[6U] ; struct work_struct policy_hash_work ; struct xfrm_policy_hthresh policy_hthresh ; struct sock *nlsk ; struct sock *nlsk_stash ; u32 sysctl_aevent_etime ; u32 sysctl_aevent_rseqth ; int sysctl_larval_drop ; u32 sysctl_acq_expires ; struct ctl_table_header *sysctl_hdr ; struct dst_ops xfrm4_dst_ops ; struct dst_ops xfrm6_dst_ops ; spinlock_t xfrm_state_lock ; rwlock_t xfrm_policy_lock ; struct mutex xfrm_cfg_mutex ; struct flow_cache flow_cache_global ; atomic_t flow_cache_genid ; struct list_head flow_cache_gc_list ; spinlock_t flow_cache_gc_lock ; struct work_struct flow_cache_gc_work ; struct work_struct flow_cache_flush_work ; struct mutex flow_flush_sem ; }; struct mpls_route; struct netns_mpls { size_t platform_labels ; struct mpls_route **platform_label ; struct ctl_table_header *ctl ; }; struct proc_ns_operations; struct ns_common { atomic_long_t stashed ; struct proc_ns_operations const *ops ; unsigned int inum ; }; struct net_generic; struct netns_ipvs; struct net { atomic_t passive ; atomic_t count ; spinlock_t rules_mod_lock ; atomic64_t cookie_gen ; struct list_head list ; struct list_head cleanup_list ; struct list_head exit_list ; struct user_namespace *user_ns ; spinlock_t nsid_lock ; struct idr netns_ids ; struct ns_common ns ; struct proc_dir_entry *proc_net ; struct proc_dir_entry *proc_net_stat ; struct ctl_table_set sysctls ; struct sock *rtnl ; struct sock *genl_sock ; struct list_head dev_base_head ; struct hlist_head *dev_name_head ; struct hlist_head *dev_index_head ; unsigned int dev_base_seq ; int ifindex ; unsigned int dev_unreg_count ; struct list_head rules_ops ; struct net_device *loopback_dev ; struct netns_core core ; struct netns_mib mib ; struct netns_packet packet ; struct netns_unix unx ; struct netns_ipv4 ipv4 ; struct netns_ipv6 ipv6 ; struct netns_ieee802154_lowpan ieee802154_lowpan ; struct netns_sctp sctp ; struct netns_dccp dccp ; struct netns_nf nf ; struct netns_xt xt ; struct netns_ct ct ; struct netns_nftables nft ; struct netns_nf_frag nf_frag ; struct sock *nfnl ; struct sock *nfnl_stash ; struct sk_buff_head wext_nlevents ; struct net_generic *gen ; struct netns_xfrm xfrm ; struct netns_ipvs *ipvs ; struct netns_mpls mpls ; struct sock *diag_nlsk ; atomic_t fnhe_genid ; }; struct __anonstruct_possible_net_t_291 { struct net *net ; }; typedef struct __anonstruct_possible_net_t_291 possible_net_t; typedef unsigned long kernel_ulong_t; struct acpi_device_id { __u8 id[9U] ; kernel_ulong_t driver_data ; }; struct of_device_id { char name[32U] ; char type[32U] ; char compatible[128U] ; void const *data ; }; enum fwnode_type { FWNODE_INVALID = 0, FWNODE_OF = 1, FWNODE_ACPI = 2, FWNODE_PDATA = 3 } ; struct fwnode_handle { enum fwnode_type type ; struct fwnode_handle *secondary ; }; typedef u32 phandle; struct property { char *name ; int length ; void *value ; struct property *next ; unsigned long _flags ; unsigned int unique_id ; struct bin_attribute attr ; }; struct device_node { char const *name ; char const *type ; phandle phandle ; char const *full_name ; struct fwnode_handle fwnode ; struct property *properties ; struct property *deadprops ; struct device_node *parent ; struct device_node *child ; struct device_node *sibling ; struct kobject kobj ; unsigned long _flags ; void *data ; }; enum ldv_27596 { PHY_INTERFACE_MODE_NA = 0, PHY_INTERFACE_MODE_MII = 1, PHY_INTERFACE_MODE_GMII = 2, PHY_INTERFACE_MODE_SGMII = 3, PHY_INTERFACE_MODE_TBI = 4, PHY_INTERFACE_MODE_REVMII = 5, PHY_INTERFACE_MODE_RMII = 6, PHY_INTERFACE_MODE_RGMII = 7, PHY_INTERFACE_MODE_RGMII_ID = 8, PHY_INTERFACE_MODE_RGMII_RXID = 9, PHY_INTERFACE_MODE_RGMII_TXID = 10, PHY_INTERFACE_MODE_RTBI = 11, PHY_INTERFACE_MODE_SMII = 12, PHY_INTERFACE_MODE_XGMII = 13, PHY_INTERFACE_MODE_MOCA = 14, PHY_INTERFACE_MODE_QSGMII = 15, PHY_INTERFACE_MODE_MAX = 16 } ; typedef enum ldv_27596 phy_interface_t; enum ldv_27650 { MDIOBUS_ALLOCATED = 1, MDIOBUS_REGISTERED = 2, MDIOBUS_UNREGISTERED = 3, MDIOBUS_RELEASED = 4 } ; struct phy_device; struct mii_bus { char const *name ; char id[17U] ; void *priv ; int (*read)(struct mii_bus * , int , int ) ; int (*write)(struct mii_bus * , int , int , u16 ) ; int (*reset)(struct mii_bus * ) ; struct mutex mdio_lock ; struct device *parent ; enum ldv_27650 state ; struct device dev ; struct phy_device *phy_map[32U] ; u32 phy_mask ; u32 phy_ignore_ta_mask ; int *irq ; }; enum phy_state { PHY_DOWN = 0, PHY_STARTING = 1, PHY_READY = 2, PHY_PENDING = 3, PHY_UP = 4, PHY_AN = 5, PHY_RUNNING = 6, PHY_NOLINK = 7, PHY_FORCING = 8, PHY_CHANGELINK = 9, PHY_HALTED = 10, PHY_RESUMING = 11 } ; struct phy_c45_device_ids { u32 devices_in_package ; u32 device_ids[8U] ; }; struct phy_driver; struct phy_device { struct phy_driver *drv ; struct mii_bus *bus ; struct device dev ; u32 phy_id ; struct phy_c45_device_ids c45_ids ; bool is_c45 ; bool is_internal ; bool has_fixups ; bool suspended ; enum phy_state state ; u32 dev_flags ; phy_interface_t interface ; int addr ; int speed ; int duplex ; int pause ; int asym_pause ; int link ; u32 interrupts ; u32 supported ; u32 advertising ; u32 lp_advertising ; int autoneg ; int link_timeout ; int irq ; void *priv ; struct work_struct phy_queue ; struct delayed_work state_queue ; atomic_t irq_disable ; struct mutex lock ; struct net_device *attached_dev ; void (*adjust_link)(struct net_device * ) ; }; struct phy_driver { u32 phy_id ; char *name ; unsigned int phy_id_mask ; u32 features ; u32 flags ; void const *driver_data ; int (*soft_reset)(struct phy_device * ) ; int (*config_init)(struct phy_device * ) ; int (*probe)(struct phy_device * ) ; int (*suspend)(struct phy_device * ) ; int (*resume)(struct phy_device * ) ; int (*config_aneg)(struct phy_device * ) ; int (*aneg_done)(struct phy_device * ) ; int (*read_status)(struct phy_device * ) ; int (*ack_interrupt)(struct phy_device * ) ; int (*config_intr)(struct phy_device * ) ; int (*did_interrupt)(struct phy_device * ) ; void (*remove)(struct phy_device * ) ; int (*match_phy_device)(struct phy_device * ) ; int (*ts_info)(struct phy_device * , struct ethtool_ts_info * ) ; int (*hwtstamp)(struct phy_device * , struct ifreq * ) ; bool (*rxtstamp)(struct phy_device * , struct sk_buff * , int ) ; void (*txtstamp)(struct phy_device * , struct sk_buff * , int ) ; int (*set_wol)(struct phy_device * , struct ethtool_wolinfo * ) ; void (*get_wol)(struct phy_device * , struct ethtool_wolinfo * ) ; void (*link_change_notify)(struct phy_device * ) ; int (*read_mmd_indirect)(struct phy_device * , int , int , int ) ; void (*write_mmd_indirect)(struct phy_device * , int , int , int , u32 ) ; int (*module_info)(struct phy_device * , struct ethtool_modinfo * ) ; int (*module_eeprom)(struct phy_device * , struct ethtool_eeprom * , u8 * ) ; struct device_driver driver ; }; struct fixed_phy_status { int link ; int speed ; int duplex ; int pause ; int asym_pause ; }; enum dsa_tag_protocol { DSA_TAG_PROTO_NONE = 0, DSA_TAG_PROTO_DSA = 1, DSA_TAG_PROTO_TRAILER = 2, DSA_TAG_PROTO_EDSA = 3, DSA_TAG_PROTO_BRCM = 4 } ; struct dsa_chip_data { struct device *host_dev ; int sw_addr ; int eeprom_len ; struct device_node *of_node ; char *port_names[12U] ; struct device_node *port_dn[12U] ; s8 *rtable ; }; struct dsa_platform_data { struct device *netdev ; struct net_device *of_netdev ; int nr_chips ; struct dsa_chip_data *chip ; }; struct packet_type; struct dsa_switch; struct dsa_switch_tree { struct dsa_platform_data *pd ; struct net_device *master_netdev ; int (*rcv)(struct sk_buff * , struct net_device * , struct packet_type * , struct net_device * ) ; enum dsa_tag_protocol tag_protocol ; s8 cpu_switch ; s8 cpu_port ; int link_poll_needed ; struct work_struct link_poll_work ; struct timer_list link_poll_timer ; struct dsa_switch *ds[4U] ; }; struct dsa_switch_driver; struct dsa_switch { struct dsa_switch_tree *dst ; int index ; enum dsa_tag_protocol tag_protocol ; struct dsa_chip_data *pd ; struct dsa_switch_driver *drv ; struct device *master_dev ; char hwmon_name[24U] ; struct device *hwmon_dev ; u32 dsa_port_mask ; u32 phys_port_mask ; u32 phys_mii_mask ; struct mii_bus *slave_mii_bus ; struct net_device *ports[12U] ; }; struct dsa_switch_driver { struct list_head list ; enum dsa_tag_protocol tag_protocol ; int priv_size ; char *(*probe)(struct device * , int ) ; int (*setup)(struct dsa_switch * ) ; int (*set_addr)(struct dsa_switch * , u8 * ) ; u32 (*get_phy_flags)(struct dsa_switch * , int ) ; int (*phy_read)(struct dsa_switch * , int , int ) ; int (*phy_write)(struct dsa_switch * , int , int , u16 ) ; void (*poll_link)(struct dsa_switch * ) ; void (*adjust_link)(struct dsa_switch * , int , struct phy_device * ) ; void (*fixed_link_update)(struct dsa_switch * , int , struct fixed_phy_status * ) ; void (*get_strings)(struct dsa_switch * , int , uint8_t * ) ; void (*get_ethtool_stats)(struct dsa_switch * , int , uint64_t * ) ; int (*get_sset_count)(struct dsa_switch * ) ; void (*get_wol)(struct dsa_switch * , int , struct ethtool_wolinfo * ) ; int (*set_wol)(struct dsa_switch * , int , struct ethtool_wolinfo * ) ; int (*suspend)(struct dsa_switch * ) ; int (*resume)(struct dsa_switch * ) ; int (*port_enable)(struct dsa_switch * , int , struct phy_device * ) ; void (*port_disable)(struct dsa_switch * , int , struct phy_device * ) ; int (*set_eee)(struct dsa_switch * , int , struct phy_device * , struct ethtool_eee * ) ; int (*get_eee)(struct dsa_switch * , int , struct ethtool_eee * ) ; int (*get_temp)(struct dsa_switch * , int * ) ; int (*get_temp_limit)(struct dsa_switch * , int * ) ; int (*set_temp_limit)(struct dsa_switch * , int ) ; int (*get_temp_alarm)(struct dsa_switch * , bool * ) ; int (*get_eeprom_len)(struct dsa_switch * ) ; int (*get_eeprom)(struct dsa_switch * , struct ethtool_eeprom * , u8 * ) ; int (*set_eeprom)(struct dsa_switch * , struct ethtool_eeprom * , u8 * ) ; int (*get_regs_len)(struct dsa_switch * , int ) ; void (*get_regs)(struct dsa_switch * , int , struct ethtool_regs * , void * ) ; int (*port_join_bridge)(struct dsa_switch * , int , u32 ) ; int (*port_leave_bridge)(struct dsa_switch * , int , u32 ) ; int (*port_stp_update)(struct dsa_switch * , int , u8 ) ; int (*fdb_add)(struct dsa_switch * , int , unsigned char const * , u16 ) ; int (*fdb_del)(struct dsa_switch * , int , unsigned char const * , u16 ) ; int (*fdb_getnext)(struct dsa_switch * , int , unsigned char * , bool * ) ; }; struct ieee_ets { __u8 willing ; __u8 ets_cap ; __u8 cbs ; __u8 tc_tx_bw[8U] ; __u8 tc_rx_bw[8U] ; __u8 tc_tsa[8U] ; __u8 prio_tc[8U] ; __u8 tc_reco_bw[8U] ; __u8 tc_reco_tsa[8U] ; __u8 reco_prio_tc[8U] ; }; struct ieee_maxrate { __u64 tc_maxrate[8U] ; }; struct ieee_qcn { __u8 rpg_enable[8U] ; __u32 rppp_max_rps[8U] ; __u32 rpg_time_reset[8U] ; __u32 rpg_byte_reset[8U] ; __u32 rpg_threshold[8U] ; __u32 rpg_max_rate[8U] ; __u32 rpg_ai_rate[8U] ; __u32 rpg_hai_rate[8U] ; __u32 rpg_gd[8U] ; __u32 rpg_min_dec_fac[8U] ; __u32 rpg_min_rate[8U] ; __u32 cndd_state_machine[8U] ; }; struct ieee_qcn_stats { __u64 rppp_rp_centiseconds[8U] ; __u32 rppp_created_rps[8U] ; }; struct ieee_pfc { __u8 pfc_cap ; __u8 pfc_en ; __u8 mbc ; __u16 delay ; __u64 requests[8U] ; __u64 indications[8U] ; }; struct cee_pg { __u8 willing ; __u8 error ; __u8 pg_en ; __u8 tcs_supported ; __u8 pg_bw[8U] ; __u8 prio_pg[8U] ; }; struct cee_pfc { __u8 willing ; __u8 error ; __u8 pfc_en ; __u8 tcs_supported ; }; struct dcb_app { __u8 selector ; __u8 priority ; __u16 protocol ; }; struct dcb_peer_app_info { __u8 willing ; __u8 error ; }; struct dcbnl_rtnl_ops { int (*ieee_getets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_setets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_getmaxrate)(struct net_device * , struct ieee_maxrate * ) ; int (*ieee_setmaxrate)(struct net_device * , struct ieee_maxrate * ) ; int (*ieee_getqcn)(struct net_device * , struct ieee_qcn * ) ; int (*ieee_setqcn)(struct net_device * , struct ieee_qcn * ) ; int (*ieee_getqcnstats)(struct net_device * , struct ieee_qcn_stats * ) ; int (*ieee_getpfc)(struct net_device * , struct ieee_pfc * ) ; int (*ieee_setpfc)(struct net_device * , struct ieee_pfc * ) ; int (*ieee_getapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_setapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_delapp)(struct net_device * , struct dcb_app * ) ; int (*ieee_peer_getets)(struct net_device * , struct ieee_ets * ) ; int (*ieee_peer_getpfc)(struct net_device * , struct ieee_pfc * ) ; u8 (*getstate)(struct net_device * ) ; u8 (*setstate)(struct net_device * , u8 ) ; void (*getpermhwaddr)(struct net_device * , u8 * ) ; void (*setpgtccfgtx)(struct net_device * , int , u8 , u8 , u8 , u8 ) ; void (*setpgbwgcfgtx)(struct net_device * , int , u8 ) ; void (*setpgtccfgrx)(struct net_device * , int , u8 , u8 , u8 , u8 ) ; void (*setpgbwgcfgrx)(struct net_device * , int , u8 ) ; void (*getpgtccfgtx)(struct net_device * , int , u8 * , u8 * , u8 * , u8 * ) ; void (*getpgbwgcfgtx)(struct net_device * , int , u8 * ) ; void (*getpgtccfgrx)(struct net_device * , int , u8 * , u8 * , u8 * , u8 * ) ; void (*getpgbwgcfgrx)(struct net_device * , int , u8 * ) ; void (*setpfccfg)(struct net_device * , int , u8 ) ; void (*getpfccfg)(struct net_device * , int , u8 * ) ; u8 (*setall)(struct net_device * ) ; u8 (*getcap)(struct net_device * , int , u8 * ) ; int (*getnumtcs)(struct net_device * , int , u8 * ) ; int (*setnumtcs)(struct net_device * , int , u8 ) ; u8 (*getpfcstate)(struct net_device * ) ; void (*setpfcstate)(struct net_device * , u8 ) ; void (*getbcncfg)(struct net_device * , int , u32 * ) ; void (*setbcncfg)(struct net_device * , int , u32 ) ; void (*getbcnrp)(struct net_device * , int , u8 * ) ; void (*setbcnrp)(struct net_device * , int , u8 ) ; int (*setapp)(struct net_device * , u8 , u16 , u8 ) ; int (*getapp)(struct net_device * , u8 , u16 ) ; u8 (*getfeatcfg)(struct net_device * , int , u8 * ) ; u8 (*setfeatcfg)(struct net_device * , int , u8 ) ; u8 (*getdcbx)(struct net_device * ) ; u8 (*setdcbx)(struct net_device * , u8 ) ; int (*peer_getappinfo)(struct net_device * , struct dcb_peer_app_info * , u16 * ) ; int (*peer_getapptable)(struct net_device * , struct dcb_app * ) ; int (*cee_peer_getpg)(struct net_device * , struct cee_pg * ) ; int (*cee_peer_getpfc)(struct net_device * , struct cee_pfc * ) ; }; struct taskstats { __u16 version ; __u32 ac_exitcode ; __u8 ac_flag ; __u8 ac_nice ; __u64 cpu_count ; __u64 cpu_delay_total ; __u64 blkio_count ; __u64 blkio_delay_total ; __u64 swapin_count ; __u64 swapin_delay_total ; __u64 cpu_run_real_total ; __u64 cpu_run_virtual_total ; char ac_comm[32U] ; __u8 ac_sched ; __u8 ac_pad[3U] ; __u32 ac_uid ; __u32 ac_gid ; __u32 ac_pid ; __u32 ac_ppid ; __u32 ac_btime ; __u64 ac_etime ; __u64 ac_utime ; __u64 ac_stime ; __u64 ac_minflt ; __u64 ac_majflt ; __u64 coremem ; __u64 virtmem ; __u64 hiwater_rss ; __u64 hiwater_vm ; __u64 read_char ; __u64 write_char ; __u64 read_syscalls ; __u64 write_syscalls ; __u64 read_bytes ; __u64 write_bytes ; __u64 cancelled_write_bytes ; __u64 nvcsw ; __u64 nivcsw ; __u64 ac_utimescaled ; __u64 ac_stimescaled ; __u64 cpu_scaled_run_real_total ; __u64 freepages_count ; __u64 freepages_delay_total ; }; struct netprio_map { struct callback_head rcu ; u32 priomap_len ; u32 priomap[] ; }; struct xfrm_policy; struct xfrm_state; struct request_sock; struct mnt_namespace; struct ipc_namespace; struct nsproxy { atomic_t count ; struct uts_namespace *uts_ns ; struct ipc_namespace *ipc_ns ; struct mnt_namespace *mnt_ns ; struct pid_namespace *pid_ns_for_children ; struct net *net_ns ; }; struct nlmsghdr { __u32 nlmsg_len ; __u16 nlmsg_type ; __u16 nlmsg_flags ; __u32 nlmsg_seq ; __u32 nlmsg_pid ; }; struct nlattr { __u16 nla_len ; __u16 nla_type ; }; struct netlink_callback { struct sk_buff *skb ; struct nlmsghdr const *nlh ; int (*dump)(struct sk_buff * , struct netlink_callback * ) ; int (*done)(struct netlink_callback * ) ; void *data ; struct module *module ; u16 family ; u16 min_dump_alloc ; unsigned int prev_seq ; unsigned int seq ; long args[6U] ; }; struct ndmsg { __u8 ndm_family ; __u8 ndm_pad1 ; __u16 ndm_pad2 ; __s32 ndm_ifindex ; __u16 ndm_state ; __u8 ndm_flags ; __u8 ndm_type ; }; struct rtnl_link_stats64 { __u64 rx_packets ; __u64 tx_packets ; __u64 rx_bytes ; __u64 tx_bytes ; __u64 rx_errors ; __u64 tx_errors ; __u64 rx_dropped ; __u64 tx_dropped ; __u64 multicast ; __u64 collisions ; __u64 rx_length_errors ; __u64 rx_over_errors ; __u64 rx_crc_errors ; __u64 rx_frame_errors ; __u64 rx_fifo_errors ; __u64 rx_missed_errors ; __u64 tx_aborted_errors ; __u64 tx_carrier_errors ; __u64 tx_fifo_errors ; __u64 tx_heartbeat_errors ; __u64 tx_window_errors ; __u64 rx_compressed ; __u64 tx_compressed ; }; struct ifla_vf_stats { __u64 rx_packets ; __u64 tx_packets ; __u64 rx_bytes ; __u64 tx_bytes ; __u64 broadcast ; __u64 multicast ; }; struct ifla_vf_info { __u32 vf ; __u8 mac[32U] ; __u32 vlan ; __u32 qos ; __u32 spoofchk ; __u32 linkstate ; __u32 min_tx_rate ; __u32 max_tx_rate ; __u32 rss_query_en ; }; struct netpoll_info; struct wireless_dev; struct wpan_dev; struct mpls_dev; enum netdev_tx { __NETDEV_TX_MIN = (-0x7FFFFFFF-1), NETDEV_TX_OK = 0, NETDEV_TX_BUSY = 16, NETDEV_TX_LOCKED = 32 } ; typedef enum netdev_tx netdev_tx_t; struct net_device_stats { unsigned long rx_packets ; unsigned long tx_packets ; unsigned long rx_bytes ; unsigned long tx_bytes ; unsigned long rx_errors ; unsigned long tx_errors ; unsigned long rx_dropped ; unsigned long tx_dropped ; unsigned long multicast ; unsigned long collisions ; unsigned long rx_length_errors ; unsigned long rx_over_errors ; unsigned long rx_crc_errors ; unsigned long rx_frame_errors ; unsigned long rx_fifo_errors ; unsigned long rx_missed_errors ; unsigned long tx_aborted_errors ; unsigned long tx_carrier_errors ; unsigned long tx_fifo_errors ; unsigned long tx_heartbeat_errors ; unsigned long tx_window_errors ; unsigned long rx_compressed ; unsigned long tx_compressed ; }; struct neigh_parms; struct netdev_hw_addr_list { struct list_head list ; int count ; }; struct hh_cache { u16 hh_len ; u16 __pad ; seqlock_t hh_lock ; unsigned long hh_data[16U] ; }; struct header_ops { int (*create)(struct sk_buff * , struct net_device * , unsigned short , void const * , void const * , unsigned int ) ; int (*parse)(struct sk_buff const * , unsigned char * ) ; int (*cache)(struct neighbour const * , struct hh_cache * , __be16 ) ; void (*cache_update)(struct hh_cache * , struct net_device const * , unsigned char const * ) ; }; struct napi_struct { struct list_head poll_list ; unsigned long state ; int weight ; unsigned int gro_count ; int (*poll)(struct napi_struct * , int ) ; spinlock_t poll_lock ; int poll_owner ; struct net_device *dev ; struct sk_buff *gro_list ; struct sk_buff *skb ; struct hrtimer timer ; struct list_head dev_list ; struct hlist_node napi_hash_node ; unsigned int napi_id ; }; enum rx_handler_result { RX_HANDLER_CONSUMED = 0, RX_HANDLER_ANOTHER = 1, RX_HANDLER_EXACT = 2, RX_HANDLER_PASS = 3 } ; typedef enum rx_handler_result rx_handler_result_t; typedef rx_handler_result_t rx_handler_func_t(struct sk_buff ** ); struct Qdisc; struct netdev_queue { struct net_device *dev ; struct Qdisc *qdisc ; struct Qdisc *qdisc_sleeping ; struct kobject kobj ; int numa_node ; spinlock_t _xmit_lock ; int xmit_lock_owner ; unsigned long trans_start ; unsigned long trans_timeout ; unsigned long state ; struct dql dql ; unsigned long tx_maxrate ; }; struct rps_map { unsigned int len ; struct callback_head rcu ; u16 cpus[0U] ; }; struct rps_dev_flow { u16 cpu ; u16 filter ; unsigned int last_qtail ; }; struct rps_dev_flow_table { unsigned int mask ; struct callback_head rcu ; struct rps_dev_flow flows[0U] ; }; struct netdev_rx_queue { struct rps_map *rps_map ; struct rps_dev_flow_table *rps_flow_table ; struct kobject kobj ; struct net_device *dev ; }; struct xps_map { unsigned int len ; unsigned int alloc_len ; struct callback_head rcu ; u16 queues[0U] ; }; struct xps_dev_maps { struct callback_head rcu ; struct xps_map *cpu_map[0U] ; }; struct netdev_tc_txq { u16 count ; u16 offset ; }; struct netdev_fcoe_hbainfo { char manufacturer[64U] ; char serial_number[64U] ; char hardware_version[64U] ; char driver_version[64U] ; char optionrom_version[64U] ; char firmware_version[64U] ; char model[256U] ; char model_description[256U] ; }; struct netdev_phys_item_id { unsigned char id[32U] ; unsigned char id_len ; }; struct net_device_ops { int (*ndo_init)(struct net_device * ) ; void (*ndo_uninit)(struct net_device * ) ; int (*ndo_open)(struct net_device * ) ; int (*ndo_stop)(struct net_device * ) ; netdev_tx_t (*ndo_start_xmit)(struct sk_buff * , struct net_device * ) ; u16 (*ndo_select_queue)(struct net_device * , struct sk_buff * , void * , u16 (*)(struct net_device * , struct sk_buff * ) ) ; void (*ndo_change_rx_flags)(struct net_device * , int ) ; void (*ndo_set_rx_mode)(struct net_device * ) ; int (*ndo_set_mac_address)(struct net_device * , void * ) ; int (*ndo_validate_addr)(struct net_device * ) ; int (*ndo_do_ioctl)(struct net_device * , struct ifreq * , int ) ; int (*ndo_set_config)(struct net_device * , struct ifmap * ) ; int (*ndo_change_mtu)(struct net_device * , int ) ; int (*ndo_neigh_setup)(struct net_device * , struct neigh_parms * ) ; void (*ndo_tx_timeout)(struct net_device * ) ; struct rtnl_link_stats64 *(*ndo_get_stats64)(struct net_device * , struct rtnl_link_stats64 * ) ; struct net_device_stats *(*ndo_get_stats)(struct net_device * ) ; int (*ndo_vlan_rx_add_vid)(struct net_device * , __be16 , u16 ) ; int (*ndo_vlan_rx_kill_vid)(struct net_device * , __be16 , u16 ) ; void (*ndo_poll_controller)(struct net_device * ) ; int (*ndo_netpoll_setup)(struct net_device * , struct netpoll_info * ) ; void (*ndo_netpoll_cleanup)(struct net_device * ) ; int (*ndo_busy_poll)(struct napi_struct * ) ; int (*ndo_set_vf_mac)(struct net_device * , int , u8 * ) ; int (*ndo_set_vf_vlan)(struct net_device * , int , u16 , u8 ) ; int (*ndo_set_vf_rate)(struct net_device * , int , int , int ) ; int (*ndo_set_vf_spoofchk)(struct net_device * , int , bool ) ; int (*ndo_get_vf_config)(struct net_device * , int , struct ifla_vf_info * ) ; int (*ndo_set_vf_link_state)(struct net_device * , int , int ) ; int (*ndo_get_vf_stats)(struct net_device * , int , struct ifla_vf_stats * ) ; int (*ndo_set_vf_port)(struct net_device * , int , struct nlattr ** ) ; int (*ndo_get_vf_port)(struct net_device * , int , struct sk_buff * ) ; int (*ndo_set_vf_rss_query_en)(struct net_device * , int , bool ) ; int (*ndo_setup_tc)(struct net_device * , u8 ) ; int (*ndo_fcoe_enable)(struct net_device * ) ; int (*ndo_fcoe_disable)(struct net_device * ) ; int (*ndo_fcoe_ddp_setup)(struct net_device * , u16 , struct scatterlist * , unsigned int ) ; int (*ndo_fcoe_ddp_done)(struct net_device * , u16 ) ; int (*ndo_fcoe_ddp_target)(struct net_device * , u16 , struct scatterlist * , unsigned int ) ; int (*ndo_fcoe_get_hbainfo)(struct net_device * , struct netdev_fcoe_hbainfo * ) ; int (*ndo_fcoe_get_wwn)(struct net_device * , u64 * , int ) ; int (*ndo_rx_flow_steer)(struct net_device * , struct sk_buff const * , u16 , u32 ) ; int (*ndo_add_slave)(struct net_device * , struct net_device * ) ; int (*ndo_del_slave)(struct net_device * , struct net_device * ) ; netdev_features_t (*ndo_fix_features)(struct net_device * , netdev_features_t ) ; int (*ndo_set_features)(struct net_device * , netdev_features_t ) ; int (*ndo_neigh_construct)(struct neighbour * ) ; void (*ndo_neigh_destroy)(struct neighbour * ) ; int (*ndo_fdb_add)(struct ndmsg * , struct nlattr ** , struct net_device * , unsigned char const * , u16 , u16 ) ; int (*ndo_fdb_del)(struct ndmsg * , struct nlattr ** , struct net_device * , unsigned char const * , u16 ) ; int (*ndo_fdb_dump)(struct sk_buff * , struct netlink_callback * , struct net_device * , struct net_device * , int ) ; int (*ndo_bridge_setlink)(struct net_device * , struct nlmsghdr * , u16 ) ; int (*ndo_bridge_getlink)(struct sk_buff * , u32 , u32 , struct net_device * , u32 , int ) ; int (*ndo_bridge_dellink)(struct net_device * , struct nlmsghdr * , u16 ) ; int (*ndo_change_carrier)(struct net_device * , bool ) ; int (*ndo_get_phys_port_id)(struct net_device * , struct netdev_phys_item_id * ) ; int (*ndo_get_phys_port_name)(struct net_device * , char * , size_t ) ; void (*ndo_add_vxlan_port)(struct net_device * , sa_family_t , __be16 ) ; void (*ndo_del_vxlan_port)(struct net_device * , sa_family_t , __be16 ) ; void *(*ndo_dfwd_add_station)(struct net_device * , struct net_device * ) ; void (*ndo_dfwd_del_station)(struct net_device * , void * ) ; netdev_tx_t (*ndo_dfwd_start_xmit)(struct sk_buff * , struct net_device * , void * ) ; int (*ndo_get_lock_subclass)(struct net_device * ) ; netdev_features_t (*ndo_features_check)(struct sk_buff * , struct net_device * , netdev_features_t ) ; int (*ndo_set_tx_maxrate)(struct net_device * , int , u32 ) ; int (*ndo_get_iflink)(struct net_device const * ) ; }; struct __anonstruct_adj_list_304 { struct list_head upper ; struct list_head lower ; }; struct __anonstruct_all_adj_list_305 { struct list_head upper ; struct list_head lower ; }; struct iw_handler_def; struct iw_public_data; struct switchdev_ops; struct vlan_info; struct tipc_bearer; struct in_device; struct dn_dev; struct inet6_dev; struct tcf_proto; struct cpu_rmap; struct pcpu_lstats; struct pcpu_sw_netstats; struct pcpu_dstats; struct pcpu_vstats; union __anonunion____missing_field_name_306 { void *ml_priv ; struct pcpu_lstats *lstats ; struct pcpu_sw_netstats *tstats ; struct pcpu_dstats *dstats ; struct pcpu_vstats *vstats ; }; struct garp_port; struct mrp_port; struct rtnl_link_ops; struct net_device { char name[16U] ; struct hlist_node name_hlist ; char *ifalias ; unsigned long mem_end ; unsigned long mem_start ; unsigned long base_addr ; int irq ; atomic_t carrier_changes ; unsigned long state ; struct list_head dev_list ; struct list_head napi_list ; struct list_head unreg_list ; struct list_head close_list ; struct list_head ptype_all ; struct list_head ptype_specific ; struct __anonstruct_adj_list_304 adj_list ; struct __anonstruct_all_adj_list_305 all_adj_list ; netdev_features_t features ; netdev_features_t hw_features ; netdev_features_t wanted_features ; netdev_features_t vlan_features ; netdev_features_t hw_enc_features ; netdev_features_t mpls_features ; int ifindex ; int group ; struct net_device_stats stats ; atomic_long_t rx_dropped ; atomic_long_t tx_dropped ; struct iw_handler_def const *wireless_handlers ; struct iw_public_data *wireless_data ; struct net_device_ops const *netdev_ops ; struct ethtool_ops const *ethtool_ops ; struct switchdev_ops const *switchdev_ops ; struct header_ops const *header_ops ; unsigned int flags ; unsigned int priv_flags ; unsigned short gflags ; unsigned short padded ; unsigned char operstate ; unsigned char link_mode ; unsigned char if_port ; unsigned char dma ; unsigned int mtu ; unsigned short type ; unsigned short hard_header_len ; unsigned short needed_headroom ; unsigned short needed_tailroom ; unsigned char perm_addr[32U] ; unsigned char addr_assign_type ; unsigned char addr_len ; unsigned short neigh_priv_len ; unsigned short dev_id ; unsigned short dev_port ; spinlock_t addr_list_lock ; unsigned char name_assign_type ; bool uc_promisc ; struct netdev_hw_addr_list uc ; struct netdev_hw_addr_list mc ; struct netdev_hw_addr_list dev_addrs ; struct kset *queues_kset ; unsigned int promiscuity ; unsigned int allmulti ; struct vlan_info *vlan_info ; struct dsa_switch_tree *dsa_ptr ; struct tipc_bearer *tipc_ptr ; void *atalk_ptr ; struct in_device *ip_ptr ; struct dn_dev *dn_ptr ; struct inet6_dev *ip6_ptr ; void *ax25_ptr ; struct wireless_dev *ieee80211_ptr ; struct wpan_dev *ieee802154_ptr ; struct mpls_dev *mpls_ptr ; unsigned long last_rx ; unsigned char *dev_addr ; struct netdev_rx_queue *_rx ; unsigned int num_rx_queues ; unsigned int real_num_rx_queues ; unsigned long gro_flush_timeout ; rx_handler_func_t *rx_handler ; void *rx_handler_data ; struct tcf_proto *ingress_cl_list ; struct netdev_queue *ingress_queue ; struct list_head nf_hooks_ingress ; unsigned char broadcast[32U] ; struct cpu_rmap *rx_cpu_rmap ; struct hlist_node index_hlist ; struct netdev_queue *_tx ; unsigned int num_tx_queues ; unsigned int real_num_tx_queues ; struct Qdisc *qdisc ; unsigned long tx_queue_len ; spinlock_t tx_global_lock ; int watchdog_timeo ; struct xps_dev_maps *xps_maps ; unsigned long trans_start ; struct timer_list watchdog_timer ; int *pcpu_refcnt ; struct list_head todo_list ; struct list_head link_watch_list ; unsigned char reg_state ; bool dismantle ; unsigned short rtnl_link_state ; void (*destructor)(struct net_device * ) ; struct netpoll_info *npinfo ; possible_net_t nd_net ; union __anonunion____missing_field_name_306 __annonCompField93 ; struct garp_port *garp_port ; struct mrp_port *mrp_port ; struct device dev ; struct attribute_group const *sysfs_groups[4U] ; struct attribute_group const *sysfs_rx_queue_group ; struct rtnl_link_ops const *rtnl_link_ops ; unsigned int gso_max_size ; u16 gso_max_segs ; u16 gso_min_segs ; struct dcbnl_rtnl_ops const *dcbnl_ops ; u8 num_tc ; struct netdev_tc_txq tc_to_txq[16U] ; u8 prio_tc_map[16U] ; unsigned int fcoe_ddp_xid ; struct netprio_map *priomap ; struct phy_device *phydev ; struct lock_class_key *qdisc_tx_busylock ; }; struct packet_type { __be16 type ; struct net_device *dev ; int (*func)(struct sk_buff * , struct net_device * , struct packet_type * , struct net_device * ) ; bool (*id_match)(struct packet_type * , struct sock * ) ; void *af_packet_priv ; struct list_head list ; }; struct pcpu_sw_netstats { u64 rx_packets ; u64 rx_bytes ; u64 tx_packets ; u64 tx_bytes ; struct u64_stats_sync syncp ; }; struct page_counter { atomic_long_t count ; unsigned long limit ; struct page_counter *parent ; unsigned long watermark ; unsigned long failcnt ; }; struct sock_filter { __u16 code ; __u8 jt ; __u8 jf ; __u32 k ; }; struct bpf_insn { __u8 code ; unsigned char dst_reg : 4 ; unsigned char src_reg : 4 ; __s16 off ; __s32 imm ; }; enum bpf_prog_type { BPF_PROG_TYPE_UNSPEC = 0, BPF_PROG_TYPE_SOCKET_FILTER = 1, BPF_PROG_TYPE_KPROBE = 2, BPF_PROG_TYPE_SCHED_CLS = 3, BPF_PROG_TYPE_SCHED_ACT = 4 } ; struct bpf_prog_aux; struct sock_fprog_kern { u16 len ; struct sock_filter *filter ; }; union __anonunion____missing_field_name_317 { struct sock_filter insns[0U] ; struct bpf_insn insnsi[0U] ; }; struct bpf_prog { u16 pages ; bool jited ; bool gpl_compatible ; u32 len ; enum bpf_prog_type type ; struct bpf_prog_aux *aux ; struct sock_fprog_kern *orig_prog ; unsigned int (*bpf_func)(struct sk_buff const * , struct bpf_insn const * ) ; union __anonunion____missing_field_name_317 __annonCompField98 ; }; struct sk_filter { atomic_t refcnt ; struct callback_head rcu ; struct bpf_prog *prog ; }; struct pollfd { int fd ; short events ; short revents ; }; struct poll_table_struct { void (*_qproc)(struct file * , wait_queue_head_t * , struct poll_table_struct * ) ; unsigned long _key ; }; struct nla_policy { u16 type ; u16 len ; }; struct rtnl_link_ops { struct list_head list ; char const *kind ; size_t priv_size ; void (*setup)(struct net_device * ) ; int maxtype ; struct nla_policy const *policy ; int (*validate)(struct nlattr ** , struct nlattr ** ) ; int (*newlink)(struct net * , struct net_device * , struct nlattr ** , struct nlattr ** ) ; int (*changelink)(struct net_device * , struct nlattr ** , struct nlattr ** ) ; void (*dellink)(struct net_device * , struct list_head * ) ; size_t (*get_size)(struct net_device const * ) ; int (*fill_info)(struct sk_buff * , struct net_device const * ) ; size_t (*get_xstats_size)(struct net_device const * ) ; int (*fill_xstats)(struct sk_buff * , struct net_device const * ) ; unsigned int (*get_num_tx_queues)(void) ; unsigned int (*get_num_rx_queues)(void) ; int slave_maxtype ; struct nla_policy const *slave_policy ; int (*slave_validate)(struct nlattr ** , struct nlattr ** ) ; int (*slave_changelink)(struct net_device * , struct net_device * , struct nlattr ** , struct nlattr ** ) ; size_t (*get_slave_size)(struct net_device const * , struct net_device const * ) ; int (*fill_slave_info)(struct sk_buff * , struct net_device const * , struct net_device const * ) ; struct net *(*get_link_net)(struct net_device const * ) ; }; struct neigh_table; struct neigh_parms { possible_net_t net ; struct net_device *dev ; struct list_head list ; int (*neigh_setup)(struct neighbour * ) ; void (*neigh_cleanup)(struct neighbour * ) ; struct neigh_table *tbl ; void *sysctl_table ; int dead ; atomic_t refcnt ; struct callback_head callback_head ; int reachable_time ; int data[13U] ; unsigned long data_state[1U] ; }; struct neigh_statistics { unsigned long allocs ; unsigned long destroys ; unsigned long hash_grows ; unsigned long res_failed ; unsigned long lookups ; unsigned long hits ; unsigned long rcv_probes_mcast ; unsigned long rcv_probes_ucast ; unsigned long periodic_gc_runs ; unsigned long forced_gc_runs ; unsigned long unres_discards ; }; struct neigh_ops; struct neighbour { struct neighbour *next ; struct neigh_table *tbl ; struct neigh_parms *parms ; unsigned long confirmed ; unsigned long updated ; rwlock_t lock ; atomic_t refcnt ; struct sk_buff_head arp_queue ; unsigned int arp_queue_len_bytes ; struct timer_list timer ; unsigned long used ; atomic_t probes ; __u8 flags ; __u8 nud_state ; __u8 type ; __u8 dead ; seqlock_t ha_lock ; unsigned char ha[32U] ; struct hh_cache hh ; int (*output)(struct neighbour * , struct sk_buff * ) ; struct neigh_ops const *ops ; struct callback_head rcu ; struct net_device *dev ; u8 primary_key[0U] ; }; struct neigh_ops { int family ; void (*solicit)(struct neighbour * , struct sk_buff * ) ; void (*error_report)(struct neighbour * , struct sk_buff * ) ; int (*output)(struct neighbour * , struct sk_buff * ) ; int (*connected_output)(struct neighbour * , struct sk_buff * ) ; }; struct pneigh_entry { struct pneigh_entry *next ; possible_net_t net ; struct net_device *dev ; u8 flags ; u8 key[0U] ; }; struct neigh_hash_table { struct neighbour **hash_buckets ; unsigned int hash_shift ; __u32 hash_rnd[4U] ; struct callback_head rcu ; }; struct neigh_table { int family ; int entry_size ; int key_len ; __be16 protocol ; __u32 (*hash)(void const * , struct net_device const * , __u32 * ) ; bool (*key_eq)(struct neighbour const * , void const * ) ; int (*constructor)(struct neighbour * ) ; int (*pconstructor)(struct pneigh_entry * ) ; void (*pdestructor)(struct pneigh_entry * ) ; void (*proxy_redo)(struct sk_buff * ) ; char *id ; struct neigh_parms parms ; struct list_head parms_list ; int gc_interval ; int gc_thresh1 ; int gc_thresh2 ; int gc_thresh3 ; unsigned long last_flush ; struct delayed_work gc_work ; struct timer_list proxy_timer ; struct sk_buff_head proxy_queue ; atomic_t entries ; rwlock_t lock ; unsigned long last_rand ; struct neigh_statistics *stats ; struct neigh_hash_table *nht ; struct pneigh_entry **phash_buckets ; }; struct dn_route; union __anonunion____missing_field_name_328 { struct dst_entry *next ; struct rtable *rt_next ; struct rt6_info *rt6_next ; struct dn_route *dn_next ; }; struct dst_entry { struct callback_head callback_head ; struct dst_entry *child ; struct net_device *dev ; struct dst_ops *ops ; unsigned long _metrics ; unsigned long expires ; struct dst_entry *path ; struct dst_entry *from ; struct xfrm_state *xfrm ; int (*input)(struct sk_buff * ) ; int (*output)(struct sock * , struct sk_buff * ) ; unsigned short flags ; unsigned short pending_confirm ; short error ; short obsolete ; unsigned short header_len ; unsigned short trailer_len ; __u32 tclassid ; long __pad_to_align_refcnt[2U] ; atomic_t __refcnt ; int __use ; unsigned long lastuse ; union __anonunion____missing_field_name_328 __annonCompField99 ; }; struct __anonstruct_socket_lock_t_329 { spinlock_t slock ; int owned ; wait_queue_head_t wq ; struct lockdep_map dep_map ; }; typedef struct __anonstruct_socket_lock_t_329 socket_lock_t; struct proto; typedef __u32 __portpair; typedef __u64 __addrpair; struct __anonstruct____missing_field_name_331 { __be32 skc_daddr ; __be32 skc_rcv_saddr ; }; union __anonunion____missing_field_name_330 { __addrpair skc_addrpair ; struct __anonstruct____missing_field_name_331 __annonCompField100 ; }; union __anonunion____missing_field_name_332 { unsigned int skc_hash ; __u16 skc_u16hashes[2U] ; }; struct __anonstruct____missing_field_name_334 { __be16 skc_dport ; __u16 skc_num ; }; union __anonunion____missing_field_name_333 { __portpair skc_portpair ; struct __anonstruct____missing_field_name_334 __annonCompField103 ; }; union __anonunion____missing_field_name_335 { struct hlist_node skc_bind_node ; struct hlist_nulls_node skc_portaddr_node ; }; union __anonunion____missing_field_name_336 { struct hlist_node skc_node ; struct hlist_nulls_node skc_nulls_node ; }; struct sock_common { union __anonunion____missing_field_name_330 __annonCompField101 ; union __anonunion____missing_field_name_332 __annonCompField102 ; union __anonunion____missing_field_name_333 __annonCompField104 ; unsigned short skc_family ; unsigned char volatile skc_state ; unsigned char skc_reuse : 4 ; unsigned char skc_reuseport : 1 ; unsigned char skc_ipv6only : 1 ; unsigned char skc_net_refcnt : 1 ; int skc_bound_dev_if ; union __anonunion____missing_field_name_335 __annonCompField105 ; struct proto *skc_prot ; possible_net_t skc_net ; struct in6_addr skc_v6_daddr ; struct in6_addr skc_v6_rcv_saddr ; atomic64_t skc_cookie ; int skc_dontcopy_begin[0U] ; union __anonunion____missing_field_name_336 __annonCompField106 ; int skc_tx_queue_mapping ; atomic_t skc_refcnt ; int skc_dontcopy_end[0U] ; }; struct cg_proto; struct __anonstruct_sk_backlog_337 { atomic_t rmem_alloc ; int len ; struct sk_buff *head ; struct sk_buff *tail ; }; struct sock { struct sock_common __sk_common ; socket_lock_t sk_lock ; struct sk_buff_head sk_receive_queue ; struct __anonstruct_sk_backlog_337 sk_backlog ; int sk_forward_alloc ; __u32 sk_rxhash ; u16 sk_incoming_cpu ; __u32 sk_txhash ; unsigned int sk_napi_id ; unsigned int sk_ll_usec ; atomic_t sk_drops ; int sk_rcvbuf ; struct sk_filter *sk_filter ; struct socket_wq *sk_wq ; struct xfrm_policy *sk_policy[2U] ; unsigned long sk_flags ; struct dst_entry *sk_rx_dst ; struct dst_entry *sk_dst_cache ; spinlock_t sk_dst_lock ; atomic_t sk_wmem_alloc ; atomic_t sk_omem_alloc ; int sk_sndbuf ; struct sk_buff_head sk_write_queue ; unsigned char sk_shutdown : 2 ; unsigned char sk_no_check_tx : 1 ; unsigned char sk_no_check_rx : 1 ; unsigned char sk_userlocks : 4 ; unsigned char sk_protocol ; unsigned short sk_type ; int sk_wmem_queued ; gfp_t sk_allocation ; u32 sk_pacing_rate ; u32 sk_max_pacing_rate ; netdev_features_t sk_route_caps ; netdev_features_t sk_route_nocaps ; int sk_gso_type ; unsigned int sk_gso_max_size ; u16 sk_gso_max_segs ; int sk_rcvlowat ; unsigned long sk_lingertime ; struct sk_buff_head sk_error_queue ; struct proto *sk_prot_creator ; rwlock_t sk_callback_lock ; int sk_err ; int sk_err_soft ; u32 sk_ack_backlog ; u32 sk_max_ack_backlog ; __u32 sk_priority ; __u32 sk_cgrp_prioidx ; struct pid *sk_peer_pid ; struct cred const *sk_peer_cred ; long sk_rcvtimeo ; long sk_sndtimeo ; struct timer_list sk_timer ; ktime_t sk_stamp ; u16 sk_tsflags ; u32 sk_tskey ; struct socket *sk_socket ; void *sk_user_data ; struct page_frag sk_frag ; struct sk_buff *sk_send_head ; __s32 sk_peek_off ; int sk_write_pending ; void *sk_security ; __u32 sk_mark ; u32 sk_classid ; struct cg_proto *sk_cgrp ; void (*sk_state_change)(struct sock * ) ; void (*sk_data_ready)(struct sock * ) ; void (*sk_write_space)(struct sock * ) ; void (*sk_error_report)(struct sock * ) ; int (*sk_backlog_rcv)(struct sock * , struct sk_buff * ) ; void (*sk_destruct)(struct sock * ) ; }; struct request_sock_ops; struct timewait_sock_ops; struct inet_hashinfo; struct raw_hashinfo; struct udp_table; union __anonunion_h_340 { struct inet_hashinfo *hashinfo ; struct udp_table *udp_table ; struct raw_hashinfo *raw_hash ; }; struct proto { void (*close)(struct sock * , long ) ; int (*connect)(struct sock * , struct sockaddr * , int ) ; int (*disconnect)(struct sock * , int ) ; struct sock *(*accept)(struct sock * , int , int * ) ; int (*ioctl)(struct sock * , int , unsigned long ) ; int (*init)(struct sock * ) ; void (*destroy)(struct sock * ) ; void (*shutdown)(struct sock * , int ) ; int (*setsockopt)(struct sock * , int , int , char * , unsigned int ) ; int (*getsockopt)(struct sock * , int , int , char * , int * ) ; int (*compat_setsockopt)(struct sock * , int , int , char * , unsigned int ) ; int (*compat_getsockopt)(struct sock * , int , int , char * , int * ) ; int (*compat_ioctl)(struct sock * , unsigned int , unsigned long ) ; int (*sendmsg)(struct sock * , struct msghdr * , size_t ) ; int (*recvmsg)(struct sock * , struct msghdr * , size_t , int , int , int * ) ; int (*sendpage)(struct sock * , struct page * , int , size_t , int ) ; int (*bind)(struct sock * , struct sockaddr * , int ) ; int (*backlog_rcv)(struct sock * , struct sk_buff * ) ; void (*release_cb)(struct sock * ) ; void (*hash)(struct sock * ) ; void (*unhash)(struct sock * ) ; void (*rehash)(struct sock * ) ; int (*get_port)(struct sock * , unsigned short ) ; void (*clear_sk)(struct sock * , int ) ; unsigned int inuse_idx ; bool (*stream_memory_free)(struct sock const * ) ; void (*enter_memory_pressure)(struct sock * ) ; atomic_long_t *memory_allocated ; struct percpu_counter *sockets_allocated ; int *memory_pressure ; long *sysctl_mem ; int *sysctl_wmem ; int *sysctl_rmem ; int max_header ; bool no_autobind ; struct kmem_cache *slab ; unsigned int obj_size ; int slab_flags ; struct percpu_counter *orphan_count ; struct request_sock_ops *rsk_prot ; struct timewait_sock_ops *twsk_prot ; union __anonunion_h_340 h ; struct module *owner ; char name[32U] ; struct list_head node ; int (*init_cgroup)(struct mem_cgroup * , struct cgroup_subsys * ) ; void (*destroy_cgroup)(struct mem_cgroup * ) ; struct cg_proto *(*proto_cgroup)(struct mem_cgroup * ) ; }; struct cg_proto { struct page_counter memory_allocated ; struct percpu_counter sockets_allocated ; int memory_pressure ; long sysctl_mem[3U] ; unsigned long flags ; struct mem_cgroup *memcg ; }; struct request_sock_ops { int family ; int obj_size ; struct kmem_cache *slab ; char *slab_name ; int (*rtx_syn_ack)(struct sock * , struct request_sock * ) ; void (*send_ack)(struct sock * , struct sk_buff * , struct request_sock * ) ; void (*send_reset)(struct sock * , struct sk_buff * ) ; void (*destructor)(struct request_sock * ) ; void (*syn_ack_timeout)(struct request_sock const * ) ; }; struct request_sock { struct sock_common __req_common ; struct request_sock *dl_next ; struct sock *rsk_listener ; u16 mss ; u8 num_retrans ; unsigned char cookie_ts : 1 ; unsigned char num_timeout : 7 ; u32 window_clamp ; u32 rcv_wnd ; u32 ts_recent ; struct timer_list rsk_timer ; struct request_sock_ops const *rsk_ops ; struct sock *sk ; u32 *saved_syn ; u32 secid ; u32 peer_secid ; }; struct timewait_sock_ops { struct kmem_cache *twsk_slab ; char *twsk_slab_name ; unsigned int twsk_obj_size ; int (*twsk_unique)(struct sock * , struct sock * , void * ) ; void (*twsk_destructor)(struct sock * ) ; }; struct crypto_ablkcipher; struct crypto_async_request; struct crypto_aead; struct crypto_blkcipher; struct crypto_hash; struct crypto_tfm; struct crypto_type; struct aead_request; struct aead_givcrypt_request; struct skcipher_givcrypt_request; struct crypto_async_request { struct list_head list ; void (*complete)(struct crypto_async_request * , int ) ; void *data ; struct crypto_tfm *tfm ; u32 flags ; }; struct ablkcipher_request { struct crypto_async_request base ; unsigned int nbytes ; void *info ; struct scatterlist *src ; struct scatterlist *dst ; void *__ctx[] ; }; struct blkcipher_desc { struct crypto_blkcipher *tfm ; void *info ; u32 flags ; }; struct hash_desc { struct crypto_hash *tfm ; u32 flags ; }; struct ablkcipher_alg { int (*setkey)(struct crypto_ablkcipher * , u8 const * , unsigned int ) ; int (*encrypt)(struct ablkcipher_request * ) ; int (*decrypt)(struct ablkcipher_request * ) ; int (*givencrypt)(struct skcipher_givcrypt_request * ) ; int (*givdecrypt)(struct skcipher_givcrypt_request * ) ; char const *geniv ; unsigned int min_keysize ; unsigned int max_keysize ; unsigned int ivsize ; }; struct old_aead_alg { int (*setkey)(struct crypto_aead * , u8 const * , unsigned int ) ; int (*setauthsize)(struct crypto_aead * , unsigned int ) ; int (*encrypt)(struct aead_request * ) ; int (*decrypt)(struct aead_request * ) ; int (*givencrypt)(struct aead_givcrypt_request * ) ; int (*givdecrypt)(struct aead_givcrypt_request * ) ; char const *geniv ; unsigned int ivsize ; unsigned int maxauthsize ; }; struct blkcipher_alg { int (*setkey)(struct crypto_tfm * , u8 const * , unsigned int ) ; int (*encrypt)(struct blkcipher_desc * , struct scatterlist * , struct scatterlist * , unsigned int ) ; int (*decrypt)(struct blkcipher_desc * , struct scatterlist * , struct scatterlist * , unsigned int ) ; char const *geniv ; unsigned int min_keysize ; unsigned int max_keysize ; unsigned int ivsize ; }; struct cipher_alg { unsigned int cia_min_keysize ; unsigned int cia_max_keysize ; int (*cia_setkey)(struct crypto_tfm * , u8 const * , unsigned int ) ; void (*cia_encrypt)(struct crypto_tfm * , u8 * , u8 const * ) ; void (*cia_decrypt)(struct crypto_tfm * , u8 * , u8 const * ) ; }; struct compress_alg { int (*coa_compress)(struct crypto_tfm * , u8 const * , unsigned int , u8 * , unsigned int * ) ; int (*coa_decompress)(struct crypto_tfm * , u8 const * , unsigned int , u8 * , unsigned int * ) ; }; union __anonunion_cra_u_356 { struct ablkcipher_alg ablkcipher ; struct old_aead_alg aead ; struct blkcipher_alg blkcipher ; struct cipher_alg cipher ; struct compress_alg compress ; }; struct crypto_alg { struct list_head cra_list ; struct list_head cra_users ; u32 cra_flags ; unsigned int cra_blocksize ; unsigned int cra_ctxsize ; unsigned int cra_alignmask ; int cra_priority ; atomic_t cra_refcnt ; char cra_name[64U] ; char cra_driver_name[64U] ; struct crypto_type const *cra_type ; union __anonunion_cra_u_356 cra_u ; int (*cra_init)(struct crypto_tfm * ) ; void (*cra_exit)(struct crypto_tfm * ) ; void (*cra_destroy)(struct crypto_alg * ) ; struct module *cra_module ; }; struct ablkcipher_tfm { int (*setkey)(struct crypto_ablkcipher * , u8 const * , unsigned int ) ; int (*encrypt)(struct ablkcipher_request * ) ; int (*decrypt)(struct ablkcipher_request * ) ; int (*givencrypt)(struct skcipher_givcrypt_request * ) ; int (*givdecrypt)(struct skcipher_givcrypt_request * ) ; struct crypto_ablkcipher *base ; unsigned int ivsize ; unsigned int reqsize ; }; struct blkcipher_tfm { void *iv ; int (*setkey)(struct crypto_tfm * , u8 const * , unsigned int ) ; int (*encrypt)(struct blkcipher_desc * , struct scatterlist * , struct scatterlist * , unsigned int ) ; int (*decrypt)(struct blkcipher_desc * , struct scatterlist * , struct scatterlist * , unsigned int ) ; }; struct cipher_tfm { int (*cit_setkey)(struct crypto_tfm * , u8 const * , unsigned int ) ; void (*cit_encrypt_one)(struct crypto_tfm * , u8 * , u8 const * ) ; void (*cit_decrypt_one)(struct crypto_tfm * , u8 * , u8 const * ) ; }; struct hash_tfm { int (*init)(struct hash_desc * ) ; int (*update)(struct hash_desc * , struct scatterlist * , unsigned int ) ; int (*final)(struct hash_desc * , u8 * ) ; int (*digest)(struct hash_desc * , struct scatterlist * , unsigned int , u8 * ) ; int (*setkey)(struct crypto_hash * , u8 const * , unsigned int ) ; unsigned int digestsize ; }; struct compress_tfm { int (*cot_compress)(struct crypto_tfm * , u8 const * , unsigned int , u8 * , unsigned int * ) ; int (*cot_decompress)(struct crypto_tfm * , u8 const * , unsigned int , u8 * , unsigned int * ) ; }; union __anonunion_crt_u_357 { struct ablkcipher_tfm ablkcipher ; struct blkcipher_tfm blkcipher ; struct cipher_tfm cipher ; struct hash_tfm hash ; struct compress_tfm compress ; }; struct crypto_tfm { u32 crt_flags ; union __anonunion_crt_u_357 crt_u ; void (*exit)(struct crypto_tfm * ) ; struct crypto_alg *__crt_alg ; void *__crt_ctx[] ; }; struct crypto_ablkcipher { struct crypto_tfm base ; }; struct crypto_blkcipher { struct crypto_tfm base ; }; struct crypto_hash { struct crypto_tfm base ; }; struct ipv6_stable_secret { bool initialized ; struct in6_addr secret ; }; struct ipv6_devconf { __s32 forwarding ; __s32 hop_limit ; __s32 mtu6 ; __s32 accept_ra ; __s32 accept_redirects ; __s32 autoconf ; __s32 dad_transmits ; __s32 rtr_solicits ; __s32 rtr_solicit_interval ; __s32 rtr_solicit_delay ; __s32 force_mld_version ; __s32 mldv1_unsolicited_report_interval ; __s32 mldv2_unsolicited_report_interval ; __s32 use_tempaddr ; __s32 temp_valid_lft ; __s32 temp_prefered_lft ; __s32 regen_max_retry ; __s32 max_desync_factor ; __s32 max_addresses ; __s32 accept_ra_defrtr ; __s32 accept_ra_pinfo ; __s32 accept_ra_rtr_pref ; __s32 rtr_probe_interval ; __s32 accept_ra_rt_info_max_plen ; __s32 proxy_ndp ; __s32 accept_source_route ; __s32 accept_ra_from_local ; __s32 optimistic_dad ; __s32 use_optimistic ; __s32 mc_forwarding ; __s32 disable_ipv6 ; __s32 accept_dad ; __s32 force_tllao ; __s32 ndisc_notify ; __s32 suppress_frag_ndisc ; __s32 accept_ra_mtu ; struct ipv6_stable_secret stable_secret ; void *sysctl ; }; struct ip6_sf_list { struct ip6_sf_list *sf_next ; struct in6_addr sf_addr ; unsigned long sf_count[2U] ; unsigned char sf_gsresp ; unsigned char sf_oldin ; unsigned char sf_crcount ; }; struct ifmcaddr6 { struct in6_addr mca_addr ; struct inet6_dev *idev ; struct ifmcaddr6 *next ; struct ip6_sf_list *mca_sources ; struct ip6_sf_list *mca_tomb ; unsigned int mca_sfmode ; unsigned char mca_crcount ; unsigned long mca_sfcount[2U] ; struct timer_list mca_timer ; unsigned int mca_flags ; int mca_users ; atomic_t mca_refcnt ; spinlock_t mca_lock ; unsigned long mca_cstamp ; unsigned long mca_tstamp ; }; struct ifacaddr6 { struct in6_addr aca_addr ; struct inet6_dev *aca_idev ; struct rt6_info *aca_rt ; struct ifacaddr6 *aca_next ; int aca_users ; atomic_t aca_refcnt ; unsigned long aca_cstamp ; unsigned long aca_tstamp ; }; struct ipv6_devstat { struct proc_dir_entry *proc_dir_entry ; struct ipstats_mib *ipv6 ; struct icmpv6_mib_device *icmpv6dev ; struct icmpv6msg_mib_device *icmpv6msgdev ; }; struct inet6_dev { struct net_device *dev ; struct list_head addr_list ; struct ifmcaddr6 *mc_list ; struct ifmcaddr6 *mc_tomb ; spinlock_t mc_lock ; unsigned char mc_qrv ; unsigned char mc_gq_running ; unsigned char mc_ifc_count ; unsigned char mc_dad_count ; unsigned long mc_v1_seen ; unsigned long mc_qi ; unsigned long mc_qri ; unsigned long mc_maxdelay ; struct timer_list mc_gq_timer ; struct timer_list mc_ifc_timer ; struct timer_list mc_dad_timer ; struct ifacaddr6 *ac_list ; rwlock_t lock ; atomic_t refcnt ; __u32 if_flags ; int dead ; u8 rndid[8U] ; struct timer_list regen_timer ; struct list_head tempaddr_list ; struct in6_addr token ; struct neigh_parms *nd_parms ; struct ipv6_devconf cnf ; struct ipv6_devstat stats ; struct timer_list rs_timer ; __u8 rs_probes ; __u8 addr_gen_mode ; unsigned long tstamp ; struct callback_head rcu ; }; union __anonunion____missing_field_name_362 { __be32 a4 ; __be32 a6[4U] ; struct in6_addr in6 ; }; struct inetpeer_addr_base { union __anonunion____missing_field_name_362 __annonCompField108 ; }; struct inetpeer_addr { struct inetpeer_addr_base addr ; __u16 family ; }; union __anonunion____missing_field_name_363 { struct list_head gc_list ; struct callback_head gc_rcu ; }; struct __anonstruct____missing_field_name_365 { atomic_t rid ; }; union __anonunion____missing_field_name_364 { struct __anonstruct____missing_field_name_365 __annonCompField110 ; struct callback_head rcu ; struct inet_peer *gc_next ; }; struct inet_peer { struct inet_peer *avl_left ; struct inet_peer *avl_right ; struct inetpeer_addr daddr ; __u32 avl_height ; u32 metrics[16U] ; u32 rate_tokens ; unsigned long rate_last ; union __anonunion____missing_field_name_363 __annonCompField109 ; union __anonunion____missing_field_name_364 __annonCompField111 ; __u32 dtime ; atomic_t refcnt ; }; struct inet_peer_base { struct inet_peer *root ; seqlock_t lock ; int total ; }; struct uncached_list; struct rtable { struct dst_entry dst ; int rt_genid ; unsigned int rt_flags ; __u16 rt_type ; __u8 rt_is_input ; __u8 rt_uses_gateway ; int rt_iif ; __be32 rt_gateway ; u32 rt_pmtu ; struct list_head rt_uncached ; struct uncached_list *rt_uncached_list ; }; struct inet_ehash_bucket { struct hlist_nulls_head chain ; }; struct inet_bind_hashbucket { spinlock_t lock ; struct hlist_head chain ; }; struct inet_listen_hashbucket { spinlock_t lock ; struct hlist_nulls_head head ; }; struct inet_hashinfo { struct inet_ehash_bucket *ehash ; spinlock_t *ehash_locks ; unsigned int ehash_mask ; unsigned int ehash_locks_mask ; struct inet_bind_hashbucket *bhash ; unsigned int bhash_size ; struct kmem_cache *bind_bucket_cachep ; struct inet_listen_hashbucket listening_hash[32U] ; }; typedef uint32_t itt_t; struct disk_stats { unsigned long sectors[2U] ; unsigned long ios[2U] ; unsigned long merges[2U] ; unsigned long ticks[2U] ; unsigned long io_ticks ; unsigned long time_in_queue ; }; struct partition_meta_info { char uuid[37U] ; u8 volname[64U] ; }; struct hd_struct { sector_t start_sect ; sector_t nr_sects ; seqcount_t nr_sects_seq ; sector_t alignment_offset ; unsigned int discard_alignment ; struct device __dev ; struct kobject *holder_dir ; int policy ; int partno ; struct partition_meta_info *info ; int make_it_fail ; unsigned long stamp ; atomic_t in_flight[2U] ; struct disk_stats *dkstats ; atomic_t ref ; struct callback_head callback_head ; }; struct disk_part_tbl { struct callback_head callback_head ; int len ; struct hd_struct *last_lookup ; struct hd_struct *part[] ; }; struct disk_events; struct timer_rand_state; struct blk_integrity; struct gendisk { int major ; int first_minor ; int minors ; char disk_name[32U] ; char *(*devnode)(struct gendisk * , umode_t * ) ; unsigned int events ; unsigned int async_events ; struct disk_part_tbl *part_tbl ; struct hd_struct part0 ; struct block_device_operations const *fops ; struct request_queue *queue ; void *private_data ; int flags ; struct device *driverfs_dev ; struct kobject *slave_dir ; struct timer_rand_state *random ; atomic_t sync_io ; struct disk_events *ev ; struct blk_integrity *integrity ; int node_id ; }; struct fprop_local_percpu { struct percpu_counter events ; unsigned int period ; raw_spinlock_t lock ; }; typedef int congested_fn(void * , int ); struct bdi_writeback_congested { unsigned long state ; atomic_t refcnt ; struct backing_dev_info *bdi ; int blkcg_id ; struct rb_node rb_node ; }; union __anonunion____missing_field_name_370 { struct work_struct release_work ; struct callback_head rcu ; }; struct bdi_writeback { struct backing_dev_info *bdi ; unsigned long state ; unsigned long last_old_flush ; struct list_head b_dirty ; struct list_head b_io ; struct list_head b_more_io ; struct list_head b_dirty_time ; spinlock_t list_lock ; struct percpu_counter stat[4U] ; struct bdi_writeback_congested *congested ; unsigned long bw_time_stamp ; unsigned long dirtied_stamp ; unsigned long written_stamp ; unsigned long write_bandwidth ; unsigned long avg_write_bandwidth ; unsigned long dirty_ratelimit ; unsigned long balanced_dirty_ratelimit ; struct fprop_local_percpu completions ; int dirty_exceeded ; spinlock_t work_lock ; struct list_head work_list ; struct delayed_work dwork ; struct percpu_ref refcnt ; struct fprop_local_percpu memcg_completions ; struct cgroup_subsys_state *memcg_css ; struct cgroup_subsys_state *blkcg_css ; struct list_head memcg_node ; struct list_head blkcg_node ; union __anonunion____missing_field_name_370 __annonCompField115 ; }; struct backing_dev_info { struct list_head bdi_list ; unsigned long ra_pages ; unsigned int capabilities ; congested_fn *congested_fn ; void *congested_data ; char *name ; unsigned int min_ratio ; unsigned int max_ratio ; unsigned int max_prop_frac ; atomic_long_t tot_write_bandwidth ; struct bdi_writeback wb ; struct radix_tree_root cgwb_tree ; struct rb_root cgwb_congested_tree ; atomic_t usage_cnt ; wait_queue_head_t wb_waitq ; struct device *dev ; struct timer_list laptop_mode_wb_timer ; struct dentry *debug_dir ; struct dentry *debug_stats ; }; typedef void *mempool_alloc_t(gfp_t , void * ); typedef void mempool_free_t(void * , void * ); struct mempool_s { spinlock_t lock ; int min_nr ; int curr_nr ; void **elements ; void *pool_data ; mempool_alloc_t *alloc ; mempool_free_t *free ; wait_queue_head_t wait ; }; typedef struct mempool_s mempool_t; union __anonunion____missing_field_name_371 { struct list_head q_node ; struct kmem_cache *__rcu_icq_cache ; }; union __anonunion____missing_field_name_372 { struct hlist_node ioc_node ; struct callback_head __rcu_head ; }; struct io_cq { struct request_queue *q ; struct io_context *ioc ; union __anonunion____missing_field_name_371 __annonCompField116 ; union __anonunion____missing_field_name_372 __annonCompField117 ; unsigned int flags ; }; struct io_context { atomic_long_t refcount ; atomic_t active_ref ; atomic_t nr_tasks ; spinlock_t lock ; unsigned short ioprio ; int nr_batch_requests ; unsigned long last_waited ; struct radix_tree_root icq_tree ; struct io_cq *icq_hint ; struct hlist_head icq_list ; struct work_struct release_work ; }; struct bio_integrity_payload { struct bio *bip_bio ; struct bvec_iter bip_iter ; bio_end_io_t *bip_end_io ; unsigned short bip_slab ; unsigned short bip_vcnt ; unsigned short bip_max_vcnt ; unsigned short bip_flags ; struct work_struct bip_work ; struct bio_vec *bip_vec ; struct bio_vec bip_inline_vecs[0U] ; }; struct bio_list { struct bio *head ; struct bio *tail ; }; struct bio_set { struct kmem_cache *bio_slab ; unsigned int front_pad ; mempool_t *bio_pool ; mempool_t *bvec_pool ; mempool_t *bio_integrity_pool ; mempool_t *bvec_integrity_pool ; spinlock_t rescue_lock ; struct bio_list rescue_list ; struct work_struct rescue_work ; struct workqueue_struct *rescue_workqueue ; }; struct bsg_class_device { struct device *class_dev ; struct device *parent ; int minor ; struct request_queue *queue ; struct kref ref ; void (*release)(struct device * ) ; }; struct elevator_queue; struct request; struct bsg_job; struct blkcg_gq; struct blk_flush_queue; typedef void rq_end_io_fn(struct request * , int ); struct request_list { struct request_queue *q ; struct blkcg_gq *blkg ; int count[2U] ; int starved[2U] ; mempool_t *rq_pool ; wait_queue_head_t wait[2U] ; unsigned int flags ; }; union __anonunion____missing_field_name_373 { struct call_single_data csd ; unsigned long fifo_time ; }; struct blk_mq_ctx; union __anonunion____missing_field_name_374 { struct hlist_node hash ; struct list_head ipi_list ; }; union __anonunion____missing_field_name_375 { struct rb_node rb_node ; void *completion_data ; }; struct __anonstruct_elv_377 { struct io_cq *icq ; void *priv[2U] ; }; struct __anonstruct_flush_378 { unsigned int seq ; struct list_head list ; rq_end_io_fn *saved_end_io ; }; union __anonunion____missing_field_name_376 { struct __anonstruct_elv_377 elv ; struct __anonstruct_flush_378 flush ; }; struct request { struct list_head queuelist ; union __anonunion____missing_field_name_373 __annonCompField118 ; struct request_queue *q ; struct blk_mq_ctx *mq_ctx ; u64 cmd_flags ; unsigned int cmd_type ; unsigned long atomic_flags ; int cpu ; unsigned int __data_len ; sector_t __sector ; struct bio *bio ; struct bio *biotail ; union __anonunion____missing_field_name_374 __annonCompField119 ; union __anonunion____missing_field_name_375 __annonCompField120 ; union __anonunion____missing_field_name_376 __annonCompField121 ; struct gendisk *rq_disk ; struct hd_struct *part ; unsigned long start_time ; struct request_list *rl ; unsigned long long start_time_ns ; unsigned long long io_start_time_ns ; unsigned short nr_phys_segments ; unsigned short nr_integrity_segments ; unsigned short ioprio ; void *special ; int tag ; int errors ; unsigned char __cmd[16U] ; unsigned char *cmd ; unsigned short cmd_len ; unsigned int extra_len ; unsigned int sense_len ; unsigned int resid_len ; void *sense ; unsigned long deadline ; struct list_head timeout_list ; unsigned int timeout ; int retries ; rq_end_io_fn *end_io ; void *end_io_data ; struct request *next_rq ; }; struct elevator_type; typedef int elevator_merge_fn(struct request_queue * , struct request ** , struct bio * ); typedef void elevator_merge_req_fn(struct request_queue * , struct request * , struct request * ); typedef void elevator_merged_fn(struct request_queue * , struct request * , int ); typedef int elevator_allow_merge_fn(struct request_queue * , struct request * , struct bio * ); typedef void elevator_bio_merged_fn(struct request_queue * , struct request * , struct bio * ); typedef int elevator_dispatch_fn(struct request_queue * , int ); typedef void elevator_add_req_fn(struct request_queue * , struct request * ); typedef struct request *elevator_request_list_fn(struct request_queue * , struct request * ); typedef void elevator_completed_req_fn(struct request_queue * , struct request * ); typedef int elevator_may_queue_fn(struct request_queue * , int ); typedef void elevator_init_icq_fn(struct io_cq * ); typedef void elevator_exit_icq_fn(struct io_cq * ); typedef int elevator_set_req_fn(struct request_queue * , struct request * , struct bio * , gfp_t ); typedef void elevator_put_req_fn(struct request * ); typedef void elevator_activate_req_fn(struct request_queue * , struct request * ); typedef void elevator_deactivate_req_fn(struct request_queue * , struct request * ); typedef int elevator_init_fn(struct request_queue * , struct elevator_type * ); typedef void elevator_exit_fn(struct elevator_queue * ); typedef void elevator_registered_fn(struct request_queue * ); struct elevator_ops { elevator_merge_fn *elevator_merge_fn ; elevator_merged_fn *elevator_merged_fn ; elevator_merge_req_fn *elevator_merge_req_fn ; elevator_allow_merge_fn *elevator_allow_merge_fn ; elevator_bio_merged_fn *elevator_bio_merged_fn ; elevator_dispatch_fn *elevator_dispatch_fn ; elevator_add_req_fn *elevator_add_req_fn ; elevator_activate_req_fn *elevator_activate_req_fn ; elevator_deactivate_req_fn *elevator_deactivate_req_fn ; elevator_completed_req_fn *elevator_completed_req_fn ; elevator_request_list_fn *elevator_former_req_fn ; elevator_request_list_fn *elevator_latter_req_fn ; elevator_init_icq_fn *elevator_init_icq_fn ; elevator_exit_icq_fn *elevator_exit_icq_fn ; elevator_set_req_fn *elevator_set_req_fn ; elevator_put_req_fn *elevator_put_req_fn ; elevator_may_queue_fn *elevator_may_queue_fn ; elevator_init_fn *elevator_init_fn ; elevator_exit_fn *elevator_exit_fn ; elevator_registered_fn *elevator_registered_fn ; }; struct elv_fs_entry { struct attribute attr ; ssize_t (*show)(struct elevator_queue * , char * ) ; ssize_t (*store)(struct elevator_queue * , char const * , size_t ) ; }; struct elevator_type { struct kmem_cache *icq_cache ; struct elevator_ops ops ; size_t icq_size ; size_t icq_align ; struct elv_fs_entry *elevator_attrs ; char elevator_name[16U] ; struct module *elevator_owner ; char icq_cache_name[21U] ; struct list_head list ; }; struct elevator_queue { struct elevator_type *type ; void *elevator_data ; struct kobject kobj ; struct mutex sysfs_lock ; unsigned char registered : 1 ; struct hlist_head hash[64U] ; }; typedef void request_fn_proc(struct request_queue * ); typedef void make_request_fn(struct request_queue * , struct bio * ); typedef int prep_rq_fn(struct request_queue * , struct request * ); typedef void unprep_rq_fn(struct request_queue * , struct request * ); struct bvec_merge_data { struct block_device *bi_bdev ; sector_t bi_sector ; unsigned int bi_size ; unsigned long bi_rw ; }; typedef int merge_bvec_fn(struct request_queue * , struct bvec_merge_data * , struct bio_vec * ); typedef void softirq_done_fn(struct request * ); typedef int dma_drain_needed_fn(struct request * ); typedef int lld_busy_fn(struct request_queue * ); typedef int bsg_job_fn(struct bsg_job * ); enum blk_eh_timer_return { BLK_EH_NOT_HANDLED = 0, BLK_EH_HANDLED = 1, BLK_EH_RESET_TIMER = 2 } ; typedef enum blk_eh_timer_return rq_timed_out_fn(struct request * ); struct blk_queue_tag { struct request **tag_index ; unsigned long *tag_map ; int busy ; int max_depth ; int real_max_depth ; atomic_t refcnt ; int alloc_policy ; int next_tag ; }; struct queue_limits { unsigned long bounce_pfn ; unsigned long seg_boundary_mask ; unsigned int max_hw_sectors ; unsigned int chunk_sectors ; unsigned int max_sectors ; unsigned int max_segment_size ; unsigned int physical_block_size ; unsigned int alignment_offset ; unsigned int io_min ; unsigned int io_opt ; unsigned int max_discard_sectors ; unsigned int max_write_same_sectors ; unsigned int discard_granularity ; unsigned int discard_alignment ; unsigned short logical_block_size ; unsigned short max_segments ; unsigned short max_integrity_segments ; unsigned char misaligned ; unsigned char discard_misaligned ; unsigned char cluster ; unsigned char discard_zeroes_data ; unsigned char raid_partial_stripes_expensive ; }; struct blk_mq_ops; struct blk_mq_hw_ctx; struct throtl_data; struct blk_mq_tag_set; struct request_queue { struct list_head queue_head ; struct request *last_merge ; struct elevator_queue *elevator ; int nr_rqs[2U] ; int nr_rqs_elvpriv ; struct request_list root_rl ; request_fn_proc *request_fn ; make_request_fn *make_request_fn ; prep_rq_fn *prep_rq_fn ; unprep_rq_fn *unprep_rq_fn ; merge_bvec_fn *merge_bvec_fn ; softirq_done_fn *softirq_done_fn ; rq_timed_out_fn *rq_timed_out_fn ; dma_drain_needed_fn *dma_drain_needed ; lld_busy_fn *lld_busy_fn ; struct blk_mq_ops *mq_ops ; unsigned int *mq_map ; struct blk_mq_ctx *queue_ctx ; unsigned int nr_queues ; struct blk_mq_hw_ctx **queue_hw_ctx ; unsigned int nr_hw_queues ; sector_t end_sector ; struct request *boundary_rq ; struct delayed_work delay_work ; struct backing_dev_info backing_dev_info ; void *queuedata ; unsigned long queue_flags ; int id ; gfp_t bounce_gfp ; spinlock_t __queue_lock ; spinlock_t *queue_lock ; struct kobject kobj ; struct kobject mq_kobj ; struct device *dev ; int rpm_status ; unsigned int nr_pending ; unsigned long nr_requests ; unsigned int nr_congestion_on ; unsigned int nr_congestion_off ; unsigned int nr_batching ; unsigned int dma_drain_size ; void *dma_drain_buffer ; unsigned int dma_pad_mask ; unsigned int dma_alignment ; struct blk_queue_tag *queue_tags ; struct list_head tag_busy_list ; unsigned int nr_sorted ; unsigned int in_flight[2U] ; unsigned int request_fn_active ; unsigned int rq_timeout ; struct timer_list timeout ; struct list_head timeout_list ; struct list_head icq_list ; unsigned long blkcg_pols[1U] ; struct blkcg_gq *root_blkg ; struct list_head blkg_list ; struct queue_limits limits ; unsigned int sg_timeout ; unsigned int sg_reserved_size ; int node ; unsigned int flush_flags ; unsigned char flush_not_queueable : 1 ; struct blk_flush_queue *fq ; struct list_head requeue_list ; spinlock_t requeue_lock ; struct work_struct requeue_work ; struct mutex sysfs_lock ; int bypass_depth ; atomic_t mq_freeze_depth ; bsg_job_fn *bsg_job_fn ; int bsg_job_size ; struct bsg_class_device bsg_dev ; struct throtl_data *td ; struct callback_head callback_head ; wait_queue_head_t mq_freeze_wq ; struct percpu_ref mq_usage_counter ; struct list_head all_q_node ; struct blk_mq_tag_set *tag_set ; struct list_head tag_set_list ; }; struct blk_plug { struct list_head list ; struct list_head mq_list ; struct list_head cb_list ; }; struct blk_integrity_iter { void *prot_buf ; void *data_buf ; sector_t seed ; unsigned int data_size ; unsigned short interval ; char const *disk_name ; }; typedef int integrity_processing_fn(struct blk_integrity_iter * ); struct blk_integrity { integrity_processing_fn *generate_fn ; integrity_processing_fn *verify_fn ; unsigned short flags ; unsigned short tuple_size ; unsigned short interval ; unsigned short tag_size ; char const *name ; struct kobject kobj ; }; struct block_device_operations { int (*open)(struct block_device * , fmode_t ) ; void (*release)(struct gendisk * , fmode_t ) ; int (*rw_page)(struct block_device * , sector_t , struct page * , int ) ; int (*ioctl)(struct block_device * , fmode_t , unsigned int , unsigned long ) ; int (*compat_ioctl)(struct block_device * , fmode_t , unsigned int , unsigned long ) ; long (*direct_access)(struct block_device * , sector_t , void ** , unsigned long * , long ) ; unsigned int (*check_events)(struct gendisk * , unsigned int ) ; int (*media_changed)(struct gendisk * ) ; void (*unlock_native_capacity)(struct gendisk * ) ; int (*revalidate_disk)(struct gendisk * ) ; int (*getgeo)(struct block_device * , struct hd_geometry * ) ; void (*swap_slot_free_notify)(struct block_device * , unsigned long ) ; struct module *owner ; }; struct percpu_ida_cpu; struct __anonstruct____missing_field_name_380 { spinlock_t lock ; unsigned int cpu_last_stolen ; wait_queue_head_t wait ; unsigned int nr_free ; unsigned int *freelist ; }; struct percpu_ida { unsigned int nr_tags ; unsigned int percpu_max_size ; unsigned int percpu_batch_size ; struct percpu_ida_cpu *tag_cpu ; cpumask_t cpus_have_tags ; struct __anonstruct____missing_field_name_380 __annonCompField122 ; }; struct se_device; struct t10_alua_tg_pt_gp; struct t10_alua { u16 alua_tg_pt_gps_counter ; u32 alua_tg_pt_gps_count ; spinlock_t lba_map_lock ; u32 lba_map_segment_size ; u32 lba_map_segment_multiplier ; struct list_head lba_map_list ; spinlock_t tg_pt_gps_lock ; struct se_device *t10_dev ; struct t10_alua_tg_pt_gp *default_tg_pt_gp ; struct config_group alua_tg_pt_gps_group ; struct list_head tg_pt_gps_list ; }; struct t10_alua_lu_gp { u16 lu_gp_id ; int lu_gp_valid_id ; u32 lu_gp_members ; atomic_t lu_gp_ref_cnt ; spinlock_t lu_gp_lock ; struct config_group lu_gp_group ; struct list_head lu_gp_node ; struct list_head lu_gp_mem_list ; }; struct t10_alua_lu_gp_member { bool lu_gp_assoc ; atomic_t lu_gp_mem_ref_cnt ; spinlock_t lu_gp_mem_lock ; struct t10_alua_lu_gp *lu_gp ; struct se_device *lu_gp_mem_dev ; struct list_head lu_gp_mem_list ; }; struct se_lun; struct t10_alua_tg_pt_gp { u16 tg_pt_gp_id ; int tg_pt_gp_valid_id ; int tg_pt_gp_alua_supported_states ; int tg_pt_gp_alua_pending_state ; int tg_pt_gp_alua_previous_state ; int tg_pt_gp_alua_access_status ; int tg_pt_gp_alua_access_type ; int tg_pt_gp_nonop_delay_msecs ; int tg_pt_gp_trans_delay_msecs ; int tg_pt_gp_implicit_trans_secs ; int tg_pt_gp_pref ; int tg_pt_gp_write_metadata ; u32 tg_pt_gp_members ; atomic_t tg_pt_gp_alua_access_state ; atomic_t tg_pt_gp_ref_cnt ; spinlock_t tg_pt_gp_lock ; struct mutex tg_pt_gp_md_mutex ; struct se_device *tg_pt_gp_dev ; struct config_group tg_pt_gp_group ; struct list_head tg_pt_gp_list ; struct list_head tg_pt_gp_lun_list ; struct se_lun *tg_pt_gp_alua_lun ; struct se_node_acl *tg_pt_gp_alua_nacl ; struct delayed_work tg_pt_gp_transition_work ; struct completion *tg_pt_gp_transition_complete ; }; struct t10_wwn { char vendor[8U] ; char model[16U] ; char revision[4U] ; char unit_serial[254U] ; spinlock_t t10_vpd_lock ; struct se_device *t10_dev ; struct config_group t10_wwn_group ; struct list_head t10_vpd_list ; }; struct se_dev_entry; struct t10_pr_registration { char pr_reg_isid[16U] ; unsigned char pr_iport[256U] ; unsigned char pr_tport[256U] ; u16 pr_aptpl_rpti ; u16 pr_reg_tpgt ; int pr_reg_all_tg_pt ; int pr_reg_aptpl ; int pr_res_holder ; int pr_res_type ; int pr_res_scope ; bool isid_present_at_reg ; u64 pr_res_mapped_lun ; u64 pr_aptpl_target_lun ; u16 tg_pt_sep_rtpi ; u32 pr_res_generation ; u64 pr_reg_bin_isid ; u64 pr_res_key ; atomic_t pr_res_holders ; struct se_node_acl *pr_reg_nacl ; struct se_dev_entry *pr_reg_deve ; struct list_head pr_reg_list ; struct list_head pr_reg_abort_list ; struct list_head pr_reg_aptpl_list ; struct list_head pr_reg_atp_list ; struct list_head pr_reg_atp_mem_list ; }; struct t10_reservation { int pr_all_tg_pt ; int pr_aptpl_active ; u32 pr_generation ; spinlock_t registration_lock ; spinlock_t aptpl_reg_lock ; struct se_node_acl *pr_res_holder ; struct list_head registration_list ; struct list_head aptpl_reg_list ; }; enum target_prot_op { TARGET_PROT_NORMAL = 0, TARGET_PROT_DIN_INSERT = 1, TARGET_PROT_DOUT_INSERT = 2, TARGET_PROT_DIN_STRIP = 4, TARGET_PROT_DOUT_STRIP = 8, TARGET_PROT_DIN_PASS = 16, TARGET_PROT_DOUT_PASS = 32 } ; enum target_prot_type { TARGET_DIF_TYPE0_PROT = 0, TARGET_DIF_TYPE1_PROT = 1, TARGET_DIF_TYPE2_PROT = 2, TARGET_DIF_TYPE3_PROT = 3 } ; struct target_core_fabric_ops; struct se_node_acl { char initiatorname[224U] ; bool dynamic_node_acl ; bool acl_stop ; u32 queue_depth ; u32 acl_index ; enum target_prot_type saved_prot_type ; char acl_tag[64U] ; atomic_t acl_pr_ref_count ; struct hlist_head lun_entry_hlist ; struct se_session *nacl_sess ; struct se_portal_group *se_tpg ; struct mutex lun_entry_mutex ; spinlock_t nacl_sess_lock ; struct config_group acl_group ; struct config_group acl_attrib_group ; struct config_group acl_auth_group ; struct config_group acl_param_group ; struct config_group acl_fabric_stat_group ; struct config_group *acl_default_groups[5U] ; struct list_head acl_list ; struct list_head acl_sess_list ; struct completion acl_free_comp ; struct kref acl_kref ; }; struct se_session { unsigned char sess_tearing_down : 1 ; u64 sess_bin_isid ; enum target_prot_op sup_prot_ops ; enum target_prot_type sess_prot_type ; struct se_node_acl *se_node_acl ; struct se_portal_group *se_tpg ; void *fabric_sess_ptr ; struct list_head sess_list ; struct list_head sess_acl_list ; struct list_head sess_cmd_list ; struct list_head sess_wait_list ; spinlock_t sess_cmd_lock ; struct kref sess_kref ; void *sess_cmd_map ; struct percpu_ida sess_tag_pool ; }; struct se_ml_stat_grps { struct config_group stat_group ; struct config_group scsi_auth_intr_group ; struct config_group scsi_att_intr_port_group ; }; struct se_lun_acl { char initiatorname[224U] ; u64 mapped_lun ; struct se_node_acl *se_lun_nacl ; struct se_lun *se_lun ; struct config_group se_lun_group ; struct se_ml_stat_grps ml_stat_grps ; }; struct se_dev_entry { u64 mapped_lun ; u64 pr_res_key ; u64 creation_time ; u32 lun_flags ; u32 attach_count ; atomic_long_t total_cmds ; atomic_long_t read_bytes ; atomic_long_t write_bytes ; atomic_t ua_count ; struct kref pr_kref ; struct completion pr_comp ; struct se_lun_acl *se_lun_acl ; spinlock_t ua_lock ; struct se_lun *se_lun ; unsigned long deve_flags ; struct list_head alua_port_list ; struct list_head lun_link ; struct list_head ua_list ; struct hlist_node link ; struct callback_head callback_head ; }; struct se_dev_attrib { int emulate_model_alias ; int emulate_dpo ; int emulate_fua_write ; int emulate_fua_read ; int emulate_write_cache ; int emulate_ua_intlck_ctrl ; int emulate_tas ; int emulate_tpu ; int emulate_tpws ; int emulate_caw ; int emulate_3pc ; int pi_prot_format ; enum target_prot_type pi_prot_type ; enum target_prot_type hw_pi_prot_type ; int enforce_pr_isids ; int force_pr_aptpl ; int is_nonrot ; int emulate_rest_reord ; u32 hw_block_size ; u32 block_size ; u32 hw_max_sectors ; u32 optimal_sectors ; u32 hw_queue_depth ; u32 queue_depth ; u32 max_unmap_lba_count ; u32 max_unmap_block_desc_count ; u32 unmap_granularity ; u32 unmap_granularity_alignment ; u32 max_write_same_len ; u32 max_bytes_per_io ; struct se_device *da_dev ; struct config_group da_group ; }; struct se_port_stat_grps { struct config_group stat_group ; struct config_group scsi_port_group ; struct config_group scsi_tgt_port_group ; struct config_group scsi_transport_group ; }; struct scsi_port_stats { atomic_long_t cmd_pdus ; atomic_long_t tx_data_octets ; atomic_long_t rx_data_octets ; }; struct se_lun { u64 unpacked_lun ; u32 lun_link_magic ; u32 lun_access ; u32 lun_flags ; u32 lun_index ; u16 lun_rtpi ; atomic_t lun_acl_count ; struct se_device *lun_se_dev ; struct list_head lun_deve_list ; spinlock_t lun_deve_lock ; int lun_tg_pt_secondary_stat ; int lun_tg_pt_secondary_write_md ; atomic_t lun_tg_pt_secondary_offline ; struct mutex lun_tg_pt_md_mutex ; struct list_head lun_tg_pt_gp_link ; struct t10_alua_tg_pt_gp *lun_tg_pt_gp ; spinlock_t lun_tg_pt_gp_lock ; struct se_portal_group *lun_tpg ; struct scsi_port_stats lun_stats ; struct config_group lun_group ; struct se_port_stat_grps port_stat_grps ; struct completion lun_ref_comp ; struct percpu_ref lun_ref ; struct list_head lun_dev_link ; struct hlist_node link ; struct callback_head callback_head ; }; struct se_dev_stat_grps { struct config_group stat_group ; struct config_group scsi_dev_group ; struct config_group scsi_tgt_dev_group ; struct config_group scsi_lu_group ; }; struct se_hba; struct target_backend_ops; struct se_device { u32 dev_link_magic ; u16 dev_rpti_counter ; u32 dev_cur_ordered_id ; u32 dev_flags ; u32 queue_depth ; u64 dev_res_bin_isid ; u32 dev_index ; u64 creation_time ; atomic_long_t num_resets ; atomic_long_t num_cmds ; atomic_long_t read_bytes ; atomic_long_t write_bytes ; atomic_t simple_cmds ; atomic_t dev_ordered_id ; atomic_t dev_ordered_sync ; atomic_t dev_qf_count ; u32 export_count ; spinlock_t delayed_cmd_lock ; spinlock_t execute_task_lock ; spinlock_t dev_reservation_lock ; unsigned int dev_reservation_flags ; spinlock_t se_port_lock ; spinlock_t se_tmr_lock ; spinlock_t qf_cmd_lock ; struct semaphore caw_sem ; struct se_node_acl *dev_reserved_node_acl ; struct t10_alua_lu_gp_member *dev_alua_lu_gp_mem ; struct t10_pr_registration *dev_pr_res_holder ; struct list_head dev_sep_list ; struct list_head dev_tmr_list ; struct workqueue_struct *tmr_wq ; struct work_struct qf_work_queue ; struct list_head delayed_cmd_list ; struct list_head state_list ; struct list_head qf_cmd_list ; struct list_head g_dev_node ; struct se_hba *se_hba ; struct t10_wwn t10_wwn ; struct t10_alua t10_alua ; struct t10_reservation t10_pr ; struct se_dev_attrib dev_attrib ; struct config_group dev_group ; struct config_group dev_pr_group ; struct se_dev_stat_grps dev_stat_grps ; unsigned char dev_alias[512U] ; unsigned char udev_path[512U] ; struct target_backend_ops const *transport ; struct list_head dev_list ; struct se_lun xcopy_lun ; int prot_length ; u32 hba_index ; struct callback_head callback_head ; }; struct target_backend; struct se_hba { u16 hba_tpgt ; u32 hba_id ; u32 hba_flags ; u32 dev_count ; u32 hba_index ; void *hba_ptr ; struct list_head hba_node ; spinlock_t device_lock ; struct config_group hba_group ; struct mutex hba_access_mutex ; struct target_backend *backend ; }; struct se_tpg_np { struct se_portal_group *tpg_np_parent ; struct config_group tpg_np_group ; }; struct se_portal_group { int proto_id ; u32 num_node_acls ; atomic_t tpg_pr_ref_count ; struct mutex acl_node_mutex ; spinlock_t session_lock ; struct mutex tpg_lun_mutex ; struct list_head se_tpg_node ; struct list_head acl_node_list ; struct hlist_head tpg_lun_hlist ; struct se_lun *tpg_virt_lun0 ; struct list_head tpg_sess_list ; struct target_core_fabric_ops const *se_tpg_tfo ; struct se_wwn *se_tpg_wwn ; struct config_group tpg_group ; struct config_group *tpg_default_groups[7U] ; struct config_group tpg_lun_group ; struct config_group tpg_np_group ; struct config_group tpg_acl_group ; struct config_group tpg_attrib_group ; struct config_group tpg_auth_group ; struct config_group tpg_param_group ; }; struct se_wwn { struct target_fabric_configfs *wwn_tf ; struct config_group wwn_group ; struct config_group *wwn_default_groups[2U] ; struct config_group fabric_stat_group ; }; enum tpg_state_table { TPG_STATE_FREE = 0, TPG_STATE_ACTIVE = 1, TPG_STATE_INACTIVE = 2, TPG_STATE_COLD_RESET = 3 } ; enum tiqn_state_table { TIQN_STATE_ACTIVE = 1, TIQN_STATE_SHUTDOWN = 2 } ; enum naf_flags_table { NAF_USERID_SET = 1, NAF_PASSWORD_SET = 2, NAF_USERID_IN_SET = 4, NAF_PASSWORD_IN_SET = 8 } ; enum iscsi_timer_flags_table { ISCSI_TF_RUNNING = 1, ISCSI_TF_STOP = 2, ISCSI_TF_EXPIRED = 4 } ; enum np_flags_table { NPF_IP_NETWORK = 0 } ; enum np_thread_state_table { ISCSI_NP_THREAD_ACTIVE = 1, ISCSI_NP_THREAD_INACTIVE = 2, ISCSI_NP_THREAD_RESET = 3, ISCSI_NP_THREAD_SHUTDOWN = 4, ISCSI_NP_THREAD_EXIT = 5 } ; struct iscsi_conn_ops { u8 HeaderDigest ; u8 DataDigest ; u32 MaxRecvDataSegmentLength ; u32 MaxXmitDataSegmentLength ; u32 InitiatorRecvDataSegmentLength ; u32 TargetRecvDataSegmentLength ; }; struct iscsi_sess_ops { char InitiatorName[224U] ; char InitiatorAlias[256U] ; char TargetName[224U] ; char TargetAlias[256U] ; char TargetAddress[256U] ; u16 TargetPortalGroupTag ; u16 MaxConnections ; u8 InitialR2T ; u8 ImmediateData ; u32 MaxBurstLength ; u32 FirstBurstLength ; u16 DefaultTime2Wait ; u16 DefaultTime2Retain ; u16 MaxOutstandingR2T ; u8 DataPDUInOrder ; u8 DataSequenceInOrder ; u8 ErrorRecoveryLevel ; u8 SessionType ; u8 RDMAExtensions ; }; struct iscsi_param_list { bool iser ; struct list_head param_list ; struct list_head extra_response_list ; }; struct iscsi_session; struct iscsit_transport; struct iscsi_login_thread_s; struct iscsi_portal_group; struct iscsi_tpg_np; struct iscsi_conn { wait_queue_head_t queues_wq ; u8 auth_complete ; u8 conn_state ; u8 conn_logout_reason ; u8 network_transport ; enum iscsi_timer_flags_table nopin_timer_flags ; enum iscsi_timer_flags_table nopin_response_timer_flags ; u8 which_thread ; u16 cid ; u16 login_port ; u16 local_port ; int net_size ; int login_family ; u32 auth_id ; u32 conn_flags ; itt_t login_itt ; u32 exp_statsn ; u32 stat_sn ; unsigned char login_ip[48U] ; unsigned char local_ip[48U] ; int conn_usage_count ; int conn_waiting_on_uc ; atomic_t check_immediate_queue ; atomic_t conn_logout_remove ; atomic_t connection_exit ; atomic_t connection_recovery ; atomic_t connection_reinstatement ; atomic_t connection_wait_rcfr ; atomic_t sleep_on_conn_wait_comp ; atomic_t transport_failed ; struct completion conn_post_wait_comp ; struct completion conn_wait_comp ; struct completion conn_wait_rcfr_comp ; struct completion conn_waiting_on_uc_comp ; struct completion conn_logout_comp ; struct completion tx_half_close_comp ; struct completion rx_half_close_comp ; struct socket *sock ; void (*orig_data_ready)(struct sock * ) ; void (*orig_state_change)(struct sock * ) ; unsigned long login_flags ; struct delayed_work login_work ; struct delayed_work login_cleanup_work ; struct iscsi_login *login ; struct timer_list nopin_timer ; struct timer_list nopin_response_timer ; struct timer_list transport_timer ; struct task_struct *login_kworker ; spinlock_t cmd_lock ; spinlock_t conn_usage_lock ; spinlock_t immed_queue_lock ; spinlock_t nopin_timer_lock ; spinlock_t response_queue_lock ; spinlock_t state_lock ; struct hash_desc conn_rx_hash ; struct hash_desc conn_tx_hash ; cpumask_var_t conn_cpumask ; unsigned char conn_rx_reset_cpumask : 1 ; unsigned char conn_tx_reset_cpumask : 1 ; struct list_head conn_cmd_list ; struct list_head immed_queue_list ; struct list_head response_queue_list ; struct iscsi_conn_ops *conn_ops ; struct iscsi_login *conn_login ; struct iscsit_transport *conn_transport ; struct iscsi_param_list *param_list ; void *auth_protocol ; void *context ; struct iscsi_login_thread_s *login_thread ; struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; struct iscsi_session *sess ; int bitmap_id ; int rx_thread_active ; struct task_struct *rx_thread ; int tx_thread_active ; struct task_struct *tx_thread ; struct list_head conn_list ; }; struct iscsi_session { u8 initiator_vendor ; u8 isid[6U] ; enum iscsi_timer_flags_table time2retain_timer_flags ; u8 version_active ; u16 cid_called ; u16 conn_recovery_count ; u16 tsih ; u32 session_state ; itt_t init_task_tag ; u32 targ_xfer_tag ; u32 cmdsn_window ; struct mutex cmdsn_mutex ; u32 exp_cmd_sn ; u32 max_cmd_sn ; struct list_head sess_ooo_cmdsn_list ; u32 sid ; char auth_type[8U] ; int session_index ; int session_usage_count ; int session_waiting_on_uc ; atomic_long_t cmd_pdus ; atomic_long_t rsp_pdus ; atomic_long_t tx_data_octets ; atomic_long_t rx_data_octets ; atomic_long_t conn_digest_errors ; atomic_long_t conn_timeout_errors ; u64 creation_time ; atomic_t nconn ; atomic_t session_continuation ; atomic_t session_fall_back_to_erl0 ; atomic_t session_logout ; atomic_t session_reinstatement ; atomic_t session_stop_active ; atomic_t sleep_on_sess_wait_comp ; struct list_head sess_conn_list ; struct list_head cr_active_list ; struct list_head cr_inactive_list ; spinlock_t conn_lock ; spinlock_t cr_a_lock ; spinlock_t cr_i_lock ; spinlock_t session_usage_lock ; spinlock_t ttt_lock ; struct completion async_msg_comp ; struct completion reinstatement_comp ; struct completion session_wait_comp ; struct completion session_waiting_on_uc_comp ; struct timer_list time2retain_timer ; struct iscsi_sess_ops *sess_ops ; struct se_session *se_sess ; struct iscsi_portal_group *tpg ; }; struct iscsi_login { u8 auth_complete ; u8 checked_for_existing ; u8 current_stage ; u8 leading_connection ; u8 first_request ; u8 version_min ; u8 version_max ; u8 login_complete ; u8 login_failed ; bool zero_tsih ; char isid[6U] ; u32 cmd_sn ; itt_t init_task_tag ; u32 initial_exp_statsn ; u32 rsp_length ; u16 cid ; u16 tsih ; char req[48U] ; char rsp[48U] ; char *req_buf ; char *rsp_buf ; struct iscsi_conn *conn ; struct iscsi_np *np ; }; struct iscsi_node_auth { enum naf_flags_table naf_flags ; int authenticate_target ; int enforce_discovery_auth ; char userid[256U] ; char password[256U] ; char userid_mutual[256U] ; char password_mutual[256U] ; }; struct iscsi_sess_err_stats { spinlock_t lock ; u32 digest_errors ; u32 cxn_timeout_errors ; u32 pdu_format_errors ; u32 last_sess_failure_type ; char last_sess_fail_rem_name[224U] ; }; struct iscsi_login_stats { spinlock_t lock ; u32 accepts ; u32 other_fails ; u32 redirects ; u32 authorize_fails ; u32 authenticate_fails ; u32 negotiate_fails ; u64 last_fail_time ; u32 last_fail_type ; int last_intr_fail_ip_family ; unsigned char last_intr_fail_ip_addr[48U] ; char last_intr_fail_name[224U] ; }; struct iscsi_logout_stats { spinlock_t lock ; u32 normal_logouts ; u32 abnormal_logouts ; }; struct iscsi_tpg_attrib { u32 authentication ; u32 login_timeout ; u32 netif_timeout ; u32 generate_node_acls ; u32 cache_dynamic_acls ; u32 default_cmdsn_depth ; u32 demo_mode_write_protect ; u32 prod_mode_write_protect ; u32 demo_mode_discovery ; u32 default_erl ; u8 t10_pi ; u32 fabric_prot_type ; struct iscsi_portal_group *tpg ; }; struct iscsi_np { int np_network_transport ; int np_ip_proto ; int np_sock_type ; enum np_thread_state_table np_thread_state ; bool enabled ; enum iscsi_timer_flags_table np_login_timer_flags ; u32 np_exports ; enum np_flags_table np_flags ; unsigned char np_ip[48U] ; u16 np_port ; spinlock_t np_thread_lock ; struct completion np_restart_comp ; struct socket *np_socket ; struct __kernel_sockaddr_storage np_sockaddr ; struct task_struct *np_thread ; struct timer_list np_login_timer ; void *np_context ; struct iscsit_transport *np_transport ; struct list_head np_list ; }; struct iscsi_tpg_np { struct iscsi_np *tpg_np ; struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np_parent ; struct list_head tpg_np_list ; struct list_head tpg_np_child_list ; struct list_head tpg_np_parent_list ; struct se_tpg_np se_tpg_np ; spinlock_t tpg_np_parent_lock ; struct completion tpg_np_comp ; struct kref tpg_np_kref ; }; struct iscsi_tiqn; struct iscsi_portal_group { unsigned char tpg_chap_id ; enum tpg_state_table tpg_state ; u16 tpgt ; u16 ntsih ; u32 nsessions ; u32 num_tpg_nps ; u32 sid ; spinlock_t tpg_np_lock ; spinlock_t tpg_state_lock ; struct se_portal_group tpg_se_tpg ; struct mutex tpg_access_lock ; struct semaphore np_login_sem ; struct iscsi_tpg_attrib tpg_attrib ; struct iscsi_node_auth tpg_demo_auth ; struct iscsi_param_list *param_list ; struct iscsi_tiqn *tpg_tiqn ; struct list_head tpg_gnp_list ; struct list_head tpg_list ; }; struct iscsi_wwn_stat_grps { struct config_group iscsi_stat_group ; struct config_group iscsi_instance_group ; struct config_group iscsi_sess_err_group ; struct config_group iscsi_tgt_attr_group ; struct config_group iscsi_login_stats_group ; struct config_group iscsi_logout_stats_group ; }; struct iscsi_tiqn { unsigned char tiqn[224U] ; enum tiqn_state_table tiqn_state ; int tiqn_access_count ; u32 tiqn_active_tpgs ; u32 tiqn_ntpgs ; u32 tiqn_num_tpg_nps ; u32 tiqn_nsessions ; struct list_head tiqn_list ; struct list_head tiqn_tpg_list ; spinlock_t tiqn_state_lock ; spinlock_t tiqn_tpg_lock ; struct se_wwn tiqn_wwn ; struct iscsi_wwn_stat_grps tiqn_stat_grps ; int tiqn_index ; struct iscsi_sess_err_stats sess_err_stats ; struct iscsi_login_stats login_stats ; struct iscsi_logout_stats logout_stats ; }; struct iscsi_extra_response { char key[64U] ; char value[32U] ; struct list_head er_list ; }; struct iscsi_param { char *name ; char *value ; u8 set_param ; u8 phase ; u8 scope ; u8 sender ; u8 type ; u8 use ; u16 type_range ; u32 state ; struct list_head p_list ; }; typedef bool ldv_func_ret_type; typedef bool ldv_func_ret_type___0; typedef bool ldv_func_ret_type___1; typedef bool ldv_func_ret_type___2; typedef int ldv_func_ret_type___3; enum hrtimer_restart; struct iscsi_cmd; struct se_cmd; enum transport_state_table { TRANSPORT_NO_STATE = 0, TRANSPORT_NEW_CMD = 1, TRANSPORT_WRITE_PENDING = 3, TRANSPORT_PROCESSING = 5, TRANSPORT_COMPLETE = 6, TRANSPORT_ISTATE_PROCESSING = 11, TRANSPORT_COMPLETE_QF_WP = 18, TRANSPORT_COMPLETE_QF_OK = 19 } ; typedef unsigned int sense_reason_t; struct se_tmr_req { u8 function ; u8 response ; int call_transport ; u64 ref_task_tag ; void *fabric_tmr_ptr ; struct se_cmd *task_cmd ; struct se_device *tmr_dev ; struct se_lun *tmr_lun ; struct list_head tmr_list ; }; struct se_cmd { u8 scsi_status ; u8 scsi_asc ; u8 scsi_ascq ; u16 scsi_sense_length ; u64 tag ; int alua_nonop_delay ; enum dma_data_direction data_direction ; int sam_task_attr ; unsigned int map_tag ; enum transport_state_table t_state ; unsigned char cmd_wait_set : 1 ; unsigned char unknown_data_length : 1 ; u32 se_cmd_flags ; u32 se_ordered_id ; u32 data_length ; u32 residual_count ; u64 orig_fe_lun ; u64 pr_res_key ; void *sense_buffer ; struct list_head se_delayed_node ; struct list_head se_qf_node ; struct se_device *se_dev ; struct se_lun *se_lun ; struct se_session *se_sess ; struct se_tmr_req *se_tmr_req ; struct list_head se_cmd_list ; struct completion cmd_wait_comp ; struct kref cmd_kref ; struct target_core_fabric_ops const *se_tfo ; sense_reason_t (*execute_cmd)(struct se_cmd * ) ; sense_reason_t (*transport_complete_callback)(struct se_cmd * , bool ) ; void *protocol_data ; unsigned char *t_task_cdb ; unsigned char __t_task_cdb[32U] ; unsigned long long t_task_lba ; unsigned int t_task_nolb ; unsigned int transport_state ; spinlock_t t_state_lock ; struct completion t_transport_stop_comp ; struct work_struct work ; struct scatterlist *t_data_sg ; struct scatterlist *t_data_sg_orig ; unsigned int t_data_nents ; unsigned int t_data_nents_orig ; void *t_data_vmap ; struct scatterlist *t_bidi_data_sg ; unsigned int t_bidi_data_nents ; struct list_head state_list ; bool state_active ; struct completion task_stop_comp ; void *priv ; int lun_ref_active ; enum target_prot_op prot_op ; enum target_prot_type prot_type ; u8 prot_checks ; u32 prot_length ; u32 reftag_seed ; struct scatterlist *t_prot_sg ; unsigned int t_prot_nents ; sense_reason_t pi_err ; sector_t bad_sector ; bool prot_pto ; }; enum cmd_flags_table { ICF_GOT_LAST_DATAOUT = 1, ICF_GOT_DATACK_SNACK = 2, ICF_NON_IMMEDIATE_UNSOLICITED_DATA = 4, ICF_SENT_LAST_R2T = 8, ICF_WITHIN_COMMAND_RECOVERY = 16, ICF_CONTIG_MEMORY = 32, ICF_ATTACHED_TO_RQUEUE = 64, ICF_OOO_CMDSN = 128, ICF_SENDTARGETS_ALL = 256, ICF_SENDTARGETS_SINGLE = 512 } ; enum cmd_i_state_table { ISTATE_NO_STATE = 0, ISTATE_NEW_CMD = 1, ISTATE_DEFERRED_CMD = 2, ISTATE_UNSOLICITED_DATA = 3, ISTATE_RECEIVE_DATAOUT = 4, ISTATE_RECEIVE_DATAOUT_RECOVERY = 5, ISTATE_RECEIVED_LAST_DATAOUT = 6, ISTATE_WITHIN_DATAOUT_RECOVERY = 7, ISTATE_IN_CONNECTION_RECOVERY = 8, ISTATE_RECEIVED_TASKMGT = 9, ISTATE_SEND_ASYNCMSG = 10, ISTATE_SENT_ASYNCMSG = 11, ISTATE_SEND_DATAIN = 12, ISTATE_SEND_LAST_DATAIN = 13, ISTATE_SENT_LAST_DATAIN = 14, ISTATE_SEND_LOGOUTRSP = 15, ISTATE_SENT_LOGOUTRSP = 16, ISTATE_SEND_NOPIN = 17, ISTATE_SENT_NOPIN = 18, ISTATE_SEND_REJECT = 19, ISTATE_SENT_REJECT = 20, ISTATE_SEND_R2T = 21, ISTATE_SENT_R2T = 22, ISTATE_SEND_R2T_RECOVERY = 23, ISTATE_SENT_R2T_RECOVERY = 24, ISTATE_SEND_LAST_R2T = 25, ISTATE_SENT_LAST_R2T = 26, ISTATE_SEND_LAST_R2T_RECOVERY = 27, ISTATE_SENT_LAST_R2T_RECOVERY = 28, ISTATE_SEND_STATUS = 29, ISTATE_SEND_STATUS_BROKEN_PC = 30, ISTATE_SENT_STATUS = 31, ISTATE_SEND_STATUS_RECOVERY = 32, ISTATE_SENT_STATUS_RECOVERY = 33, ISTATE_SEND_TASKMGTRSP = 34, ISTATE_SENT_TASKMGTRSP = 35, ISTATE_SEND_TEXTRSP = 36, ISTATE_SENT_TEXTRSP = 37, ISTATE_SEND_NOPIN_WANT_RESPONSE = 38, ISTATE_SENT_NOPIN_WANT_RESPONSE = 39, ISTATE_SEND_NOPIN_NO_RESPONSE = 40, ISTATE_REMOVE = 41, ISTATE_FREE = 42 } ; struct iscsi_pdu; struct iscsi_seq; struct iscsi_tmr_req; struct iscsi_conn_recovery; struct iscsi_cmd { enum iscsi_timer_flags_table dataout_timer_flags ; u8 dataout_timeout_retries ; u8 error_recovery_count ; enum cmd_i_state_table deferred_i_state ; enum cmd_i_state_table i_state ; u8 immediate_cmd ; u8 immediate_data ; u8 iscsi_opcode ; u8 iscsi_response ; u8 logout_reason ; u8 logout_response ; u8 maxcmdsn_inc ; u8 unsolicited_data ; u8 reject_reason ; u16 logout_cid ; enum cmd_flags_table cmd_flags ; itt_t init_task_tag ; u32 targ_xfer_tag ; u32 cmd_sn ; u32 exp_stat_sn ; u32 stat_sn ; u32 data_sn ; u32 r2t_sn ; u32 acked_data_sn ; u32 buf_ptr_size ; u32 data_crc ; u32 outstanding_r2ts ; u32 r2t_offset ; u32 iov_data_count ; u32 orig_iov_data_count ; u32 iov_misc_count ; u32 pdu_count ; u32 pdu_send_order ; u32 pdu_start ; u32 seq_send_order ; u32 seq_count ; u32 seq_no ; u32 seq_start_offset ; u32 seq_end_offset ; u32 read_data_done ; u32 write_data_done ; u32 first_burst_len ; u32 next_burst_len ; u32 tx_size ; void *buf_ptr ; void *text_in_ptr ; enum dma_data_direction data_direction ; unsigned char pdu[52U] ; atomic_t immed_queue_count ; atomic_t response_queue_count ; spinlock_t datain_lock ; spinlock_t dataout_timeout_lock ; spinlock_t istate_lock ; spinlock_t error_lock ; spinlock_t r2t_lock ; struct list_head datain_list ; struct list_head cmd_r2t_list ; struct timer_list dataout_timer ; struct kvec *iov_data ; struct kvec iov_misc[5U] ; struct iscsi_pdu *pdu_list ; struct iscsi_pdu *pdu_ptr ; struct iscsi_seq *seq_list ; struct iscsi_seq *seq_ptr ; struct iscsi_tmr_req *tmr_req ; struct iscsi_conn *conn ; struct iscsi_conn_recovery *cr ; struct iscsi_session *sess ; struct list_head i_conn_node ; struct se_cmd se_cmd ; unsigned char sense_buffer[98U] ; u32 padding ; u8 pad_bytes[4U] ; struct scatterlist *first_data_sg ; u32 first_data_sg_off ; u32 kmapped_nents ; sense_reason_t sense_reason ; }; struct iscsi_tmr_req { bool task_reassign ; u32 exp_data_sn ; struct iscsi_cmd *ref_cmd ; struct iscsi_conn_recovery *conn_recovery ; struct se_tmr_req *se_tmr_req ; }; struct iscsi_conn_recovery { u16 cid ; u32 cmd_count ; u32 maxrecvdatasegmentlength ; u32 maxxmitdatasegmentlength ; int ready_for_reallegiance ; struct list_head conn_recovery_cmd_list ; spinlock_t conn_recovery_cmd_lock ; struct timer_list time2retain_timer ; struct iscsi_session *sess ; struct list_head cr_list ; }; struct iscsi_node_acl; struct iscsi_node_attrib { u32 dataout_timeout ; u32 dataout_timeout_retries ; u32 default_erl ; u32 nopin_timeout ; u32 nopin_response_timeout ; u32 random_datain_pdu_offsets ; u32 random_datain_seq_offsets ; u32 random_r2t_offsets ; u32 tmr_cold_reset ; u32 tmr_warm_reset ; struct iscsi_node_acl *nacl ; }; struct iscsi_node_stat_grps { struct config_group iscsi_sess_stats_group ; struct config_group iscsi_conn_stats_group ; }; struct iscsi_node_acl { struct se_node_acl se_node_acl ; struct iscsi_node_attrib node_attrib ; struct iscsi_node_auth node_auth ; struct iscsi_node_stat_grps node_stat_grps ; }; struct iscsi_build_list { int data_direction ; int randomize ; int type ; int immediate_data_length ; }; struct iscsi_pdu { int status ; int type ; u8 flags ; u32 data_sn ; u32 length ; u32 offset ; u32 pdu_send_order ; u32 seq_no ; }; struct iscsi_seq { int sent ; int status ; int type ; u32 data_sn ; u32 first_datasn ; u32 last_datasn ; u32 next_burst_len ; u32 pdu_start ; u32 pdu_count ; u32 offset ; u32 orig_offset ; u32 pdu_send_order ; u32 r2t_sn ; u32 seq_send_order ; u32 seq_no ; u32 xfer_len ; }; enum hrtimer_restart; struct iscsi_chap { unsigned char digest_type ; unsigned char id ; unsigned char challenge[16U] ; unsigned int authenticate_target ; unsigned int chap_state ; }; enum hrtimer_restart; enum datain_req_comp_table { DATAIN_COMPLETE_NORMAL = 1, DATAIN_COMPLETE_WITHIN_COMMAND_RECOVERY = 2, DATAIN_COMPLETE_CONNECTION_RECOVERY = 3 } ; enum datain_req_rec_table { DATAIN_WITHIN_COMMAND_RECOVERY = 1, DATAIN_CONNECTION_RECOVERY = 2 } ; struct iscsi_datain_req { enum datain_req_comp_table dr_complete ; int generate_recovery_values ; enum datain_req_rec_table recovery ; u32 begrun ; u32 runlength ; u32 data_length ; u32 data_offset ; u32 data_sn ; u32 next_burst_len ; u32 read_data_done ; u32 seq_send_order ; struct list_head cmd_datain_node ; }; struct iscsi_datain { u8 flags ; u32 data_sn ; u32 length ; u32 offset ; }; struct kernel_symbol { unsigned long value ; char const *name ; }; enum hrtimer_restart; struct target_core_fabric_ops { struct module *module ; char const *name ; size_t node_acl_size ; char *(*get_fabric_name)(void) ; char *(*tpg_get_wwn)(struct se_portal_group * ) ; u16 (*tpg_get_tag)(struct se_portal_group * ) ; u32 (*tpg_get_default_depth)(struct se_portal_group * ) ; int (*tpg_check_demo_mode)(struct se_portal_group * ) ; int (*tpg_check_demo_mode_cache)(struct se_portal_group * ) ; int (*tpg_check_demo_mode_write_protect)(struct se_portal_group * ) ; int (*tpg_check_prod_mode_write_protect)(struct se_portal_group * ) ; int (*tpg_check_demo_mode_login_only)(struct se_portal_group * ) ; int (*tpg_check_prot_fabric_only)(struct se_portal_group * ) ; u32 (*tpg_get_inst_index)(struct se_portal_group * ) ; int (*check_stop_free)(struct se_cmd * ) ; void (*release_cmd)(struct se_cmd * ) ; int (*shutdown_session)(struct se_session * ) ; void (*close_session)(struct se_session * ) ; u32 (*sess_get_index)(struct se_session * ) ; u32 (*sess_get_initiator_sid)(struct se_session * , unsigned char * , u32 ) ; int (*write_pending)(struct se_cmd * ) ; int (*write_pending_status)(struct se_cmd * ) ; void (*set_default_node_attributes)(struct se_node_acl * ) ; int (*get_cmd_state)(struct se_cmd * ) ; int (*queue_data_in)(struct se_cmd * ) ; int (*queue_status)(struct se_cmd * ) ; void (*queue_tm_rsp)(struct se_cmd * ) ; void (*aborted_task)(struct se_cmd * ) ; struct se_wwn *(*fabric_make_wwn)(struct target_fabric_configfs * , struct config_group * , char const * ) ; void (*fabric_drop_wwn)(struct se_wwn * ) ; struct se_portal_group *(*fabric_make_tpg)(struct se_wwn * , struct config_group * , char const * ) ; void (*fabric_drop_tpg)(struct se_portal_group * ) ; int (*fabric_post_link)(struct se_portal_group * , struct se_lun * ) ; void (*fabric_pre_unlink)(struct se_portal_group * , struct se_lun * ) ; struct se_tpg_np *(*fabric_make_np)(struct se_portal_group * , struct config_group * , char const * ) ; void (*fabric_drop_np)(struct se_tpg_np * ) ; int (*fabric_init_nodeacl)(struct se_node_acl * , char const * ) ; void (*fabric_cleanup_nodeacl)(struct se_node_acl * ) ; struct configfs_attribute **tfc_discovery_attrs ; struct configfs_attribute **tfc_wwn_attrs ; struct configfs_attribute **tfc_tpg_base_attrs ; struct configfs_attribute **tfc_tpg_np_base_attrs ; struct configfs_attribute **tfc_tpg_attrib_attrs ; struct configfs_attribute **tfc_tpg_auth_attrs ; struct configfs_attribute **tfc_tpg_param_attrs ; struct configfs_attribute **tfc_tpg_nacl_base_attrs ; struct configfs_attribute **tfc_tpg_nacl_attrib_attrs ; struct configfs_attribute **tfc_tpg_nacl_auth_attrs ; struct configfs_attribute **tfc_tpg_nacl_param_attrs ; }; enum hrtimer_restart; struct scsi_lun { __u8 scsi_lun[8U] ; }; struct iscsi_data { uint8_t opcode ; uint8_t flags ; uint8_t rsvd2[2U] ; uint8_t rsvd3 ; uint8_t dlength[3U] ; struct scsi_lun lun ; itt_t itt ; __be32 ttt ; __be32 rsvd4 ; __be32 exp_statsn ; __be32 rsvd5 ; __be32 datasn ; __be32 offset ; __be32 rsvd6 ; }; struct iscsi_r2t { int seq_complete ; int recovery_r2t ; int sent_r2t ; u32 r2t_sn ; u32 offset ; u32 targ_xfer_tag ; u32 xfer_len ; struct list_head r2t_list ; }; typedef int ldv_func_ret_type___4; typedef void (*ctor_fn_t)(void); struct bug_entry { int bug_addr_disp ; int file_disp ; unsigned short line ; unsigned short flags ; }; enum hrtimer_restart; struct exception_table_entry { int insn ; int fixup ; }; typedef __u64 Elf64_Addr; typedef __u16 Elf64_Half; typedef __u32 Elf64_Word; typedef __u64 Elf64_Xword; struct elf64_sym { Elf64_Word st_name ; unsigned char st_info ; unsigned char st_other ; Elf64_Half st_shndx ; Elf64_Addr st_value ; Elf64_Xword st_size ; }; typedef struct elf64_sym Elf64_Sym; struct kernel_param; struct kernel_param_ops { unsigned int flags ; int (*set)(char const * , struct kernel_param const * ) ; int (*get)(char * , struct kernel_param const * ) ; void (*free)(void * ) ; }; struct kparam_string; struct kparam_array; union __anonunion____missing_field_name_385 { void *arg ; struct kparam_string const *str ; struct kparam_array const *arr ; }; struct kernel_param { char const *name ; struct module *mod ; struct kernel_param_ops const *ops ; u16 const perm ; s8 level ; u8 flags ; union __anonunion____missing_field_name_385 __annonCompField123 ; }; struct kparam_string { unsigned int maxlen ; char *string ; }; struct kparam_array { unsigned int max ; unsigned int elemsize ; unsigned int *num ; struct kernel_param_ops const *ops ; void *elem ; }; struct latch_tree_node { struct rb_node node[2U] ; }; struct mod_arch_specific { }; struct module_param_attrs; struct module_kobject { struct kobject kobj ; struct module *mod ; struct kobject *drivers_dir ; struct module_param_attrs *mp ; struct completion *kobj_completion ; }; struct module_attribute { struct attribute attr ; ssize_t (*show)(struct module_attribute * , struct module_kobject * , char * ) ; ssize_t (*store)(struct module_attribute * , struct module_kobject * , char const * , size_t ) ; void (*setup)(struct module * , char const * ) ; int (*test)(struct module * ) ; void (*free)(struct module * ) ; }; enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2, MODULE_STATE_UNFORMED = 3 } ; struct mod_tree_node { struct module *mod ; struct latch_tree_node node ; }; struct module_sect_attrs; struct module_notes_attrs; struct tracepoint; struct trace_event_call; struct trace_enum_map; struct module { enum module_state state ; struct list_head list ; char name[56U] ; struct module_kobject mkobj ; struct module_attribute *modinfo_attrs ; char const *version ; char const *srcversion ; struct kobject *holders_dir ; struct kernel_symbol const *syms ; unsigned long const *crcs ; unsigned int num_syms ; struct mutex param_lock ; struct kernel_param *kp ; unsigned int num_kp ; unsigned int num_gpl_syms ; struct kernel_symbol const *gpl_syms ; unsigned long const *gpl_crcs ; struct kernel_symbol const *unused_syms ; unsigned long const *unused_crcs ; unsigned int num_unused_syms ; unsigned int num_unused_gpl_syms ; struct kernel_symbol const *unused_gpl_syms ; unsigned long const *unused_gpl_crcs ; bool sig_ok ; bool async_probe_requested ; struct kernel_symbol const *gpl_future_syms ; unsigned long const *gpl_future_crcs ; unsigned int num_gpl_future_syms ; unsigned int num_exentries ; struct exception_table_entry *extable ; int (*init)(void) ; void *module_init ; void *module_core ; unsigned int init_size ; unsigned int core_size ; unsigned int init_text_size ; unsigned int core_text_size ; struct mod_tree_node mtn_core ; struct mod_tree_node mtn_init ; unsigned int init_ro_size ; unsigned int core_ro_size ; struct mod_arch_specific arch ; unsigned int taints ; unsigned int num_bugs ; struct list_head bug_list ; struct bug_entry *bug_table ; Elf64_Sym *symtab ; Elf64_Sym *core_symtab ; unsigned int num_symtab ; unsigned int core_num_syms ; char *strtab ; char *core_strtab ; struct module_sect_attrs *sect_attrs ; struct module_notes_attrs *notes_attrs ; char *args ; void *percpu ; unsigned int percpu_size ; unsigned int num_tracepoints ; struct tracepoint * const *tracepoints_ptrs ; unsigned int num_trace_bprintk_fmt ; char const **trace_bprintk_fmt_start ; struct trace_event_call **trace_events ; unsigned int num_trace_events ; struct trace_enum_map **trace_enums ; unsigned int num_trace_enums ; bool klp_alive ; struct list_head source_list ; struct list_head target_list ; void (*exit)(void) ; atomic_t refcnt ; ctor_fn_t (**ctors)(void) ; unsigned int num_ctors ; }; struct iscsi_ooo_cmdsn { u16 cid ; u32 batch_count ; u32 cmdsn ; u32 exp_cmdsn ; struct iscsi_cmd *cmd ; struct list_head ooo_list ; }; struct iscsit_transport { char name[16U] ; int transport_type ; int priv_size ; struct module *owner ; struct list_head t_node ; int (*iscsit_setup_np)(struct iscsi_np * , struct __kernel_sockaddr_storage * ) ; int (*iscsit_accept_np)(struct iscsi_np * , struct iscsi_conn * ) ; void (*iscsit_free_np)(struct iscsi_np * ) ; void (*iscsit_wait_conn)(struct iscsi_conn * ) ; void (*iscsit_free_conn)(struct iscsi_conn * ) ; int (*iscsit_get_login_rx)(struct iscsi_conn * , struct iscsi_login * ) ; int (*iscsit_put_login_tx)(struct iscsi_conn * , struct iscsi_login * , u32 ) ; int (*iscsit_immediate_queue)(struct iscsi_conn * , struct iscsi_cmd * , int ) ; int (*iscsit_response_queue)(struct iscsi_conn * , struct iscsi_cmd * , int ) ; int (*iscsit_get_dataout)(struct iscsi_conn * , struct iscsi_cmd * , bool ) ; int (*iscsit_queue_data_in)(struct iscsi_conn * , struct iscsi_cmd * ) ; int (*iscsit_queue_status)(struct iscsi_conn * , struct iscsi_cmd * ) ; void (*iscsit_aborted_task)(struct iscsi_conn * , struct iscsi_cmd * ) ; enum target_prot_op (*iscsit_get_sup_prot_ops)(struct iscsi_conn * ) ; }; typedef int ldv_func_ret_type___5; enum hrtimer_restart; struct va_list; typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; struct __anonstruct_mm_segment_t_29 { unsigned long seg ; }; typedef struct __anonstruct_mm_segment_t_29 mm_segment_t; struct thread_info { struct task_struct *task ; __u32 flags ; __u32 status ; __u32 cpu ; int saved_preempt_count ; mm_segment_t addr_limit ; void *sysenter_return ; unsigned char sig_on_uaccess_error : 1 ; unsigned char uaccess_err : 1 ; }; typedef int pao_T_____0; enum hrtimer_restart; struct iscsi_login_req { uint8_t opcode ; uint8_t flags ; uint8_t max_version ; uint8_t min_version ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t isid[6U] ; __be16 tsih ; itt_t itt ; __be16 cid ; __be16 rsvd3 ; __be32 cmdsn ; __be32 exp_statsn ; uint8_t rsvd5[16U] ; }; struct in_addr { __be32 s_addr ; }; struct sockaddr_in { __kernel_sa_family_t sin_family ; __be16 sin_port ; struct in_addr sin_addr ; unsigned char __pad[8U] ; }; struct sockaddr_in6 { unsigned short sin6_family ; __be16 sin6_port ; __be32 sin6_flowinfo ; struct in6_addr sin6_addr ; __u32 sin6_scope_id ; }; struct iscsit_global { u32 in_shutdown ; u32 active_ts ; u32 auth_id ; u32 inactive_ts ; unsigned long *ts_bitmap ; spinlock_t ts_bitmap_lock ; struct iscsi_node_acl discovery_acl ; struct iscsi_portal_group *discovery_tpg ; }; enum hrtimer_restart; struct iscsi_login_rsp { uint8_t opcode ; uint8_t flags ; uint8_t max_version ; uint8_t active_version ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t isid[6U] ; __be16 tsih ; itt_t itt ; __be32 rsvd3 ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; uint8_t status_class ; uint8_t status_detail ; uint8_t rsvd4[10U] ; }; typedef bool ldv_func_ret_type___6; typedef bool ldv_func_ret_type___7; typedef bool ldv_func_ret_type___8; enum hrtimer_restart; enum hrtimer_restart; struct iscsi_tm { uint8_t opcode ; uint8_t flags ; uint8_t rsvd1[2U] ; uint8_t hlength ; uint8_t dlength[3U] ; struct scsi_lun lun ; itt_t itt ; itt_t rtt ; __be32 cmdsn ; __be32 exp_statsn ; __be32 refcmdsn ; __be32 exp_datasn ; uint8_t rsvd2[8U] ; }; enum hrtimer_restart; enum hrtimer_restart; struct blk_mq_tags; struct blk_mq_cpu_notifier { struct list_head list ; void *data ; int (*notify)(void * , unsigned long , unsigned int ) ; }; struct blk_align_bitmap; struct blk_mq_ctxmap { unsigned int size ; unsigned int bits_per_word ; struct blk_align_bitmap *map ; }; struct __anonstruct____missing_field_name_249 { spinlock_t lock ; struct list_head dispatch ; }; struct blk_mq_hw_ctx { struct __anonstruct____missing_field_name_249 __annonCompField83 ; unsigned long state ; struct delayed_work run_work ; struct delayed_work delay_work ; cpumask_var_t cpumask ; int next_cpu ; int next_cpu_batch ; unsigned long flags ; struct request_queue *queue ; struct blk_flush_queue *fq ; void *driver_data ; struct blk_mq_ctxmap ctx_map ; unsigned int nr_ctx ; struct blk_mq_ctx **ctxs ; atomic_t wait_index ; struct blk_mq_tags *tags ; unsigned long queued ; unsigned long run ; unsigned long dispatched[10U] ; unsigned int numa_node ; unsigned int queue_num ; atomic_t nr_active ; struct blk_mq_cpu_notifier cpu_notifier ; struct kobject kobj ; }; struct blk_mq_tag_set { struct blk_mq_ops *ops ; unsigned int nr_hw_queues ; unsigned int queue_depth ; unsigned int reserved_tags ; unsigned int cmd_size ; int numa_node ; unsigned int timeout ; unsigned int flags ; void *driver_data ; struct blk_mq_tags **tags ; struct mutex tag_list_lock ; struct list_head tag_list ; }; struct blk_mq_queue_data { struct request *rq ; struct list_head *list ; bool last ; }; typedef int queue_rq_fn(struct blk_mq_hw_ctx * , struct blk_mq_queue_data const * ); typedef struct blk_mq_hw_ctx *map_queue_fn(struct request_queue * , int const ); typedef enum blk_eh_timer_return timeout_fn(struct request * , bool ); typedef int init_hctx_fn(struct blk_mq_hw_ctx * , void * , unsigned int ); typedef void exit_hctx_fn(struct blk_mq_hw_ctx * , unsigned int ); typedef int init_request_fn(void * , struct request * , unsigned int , unsigned int , unsigned int ); typedef void exit_request_fn(void * , struct request * , unsigned int , unsigned int ); struct blk_mq_ops { queue_rq_fn *queue_rq ; map_queue_fn *map_queue ; timeout_fn *timeout ; softirq_done_fn *complete ; init_hctx_fn *init_hctx ; exit_hctx_fn *exit_hctx ; init_request_fn *init_request ; exit_request_fn *exit_request ; }; enum data_count_type { ISCSI_RX_DATA = 1, ISCSI_TX_DATA = 2 } ; struct iscsi_queue_req { int state ; struct iscsi_cmd *cmd ; struct list_head qr_list ; }; struct iscsi_data_count { int data_length ; int sync_and_steering ; enum data_count_type type ; u32 iov_count ; u32 ss_iov_count ; u32 ss_marker_count ; struct kvec *iov ; }; typedef int ldv_func_ret_type___9; typedef __u64 __le64; typedef __u64 __be64; enum hrtimer_restart; struct __wait_queue; typedef struct __wait_queue wait_queue_t; struct __wait_queue { unsigned int flags ; void *private ; int (*func)(wait_queue_t * , unsigned int , int , void * ) ; struct list_head task_list ; }; struct iscsi_hdr { uint8_t opcode ; uint8_t flags ; uint8_t rsvd2[2U] ; uint8_t hlength ; uint8_t dlength[3U] ; struct scsi_lun lun ; itt_t itt ; __be32 ttt ; __be32 statsn ; __be32 exp_statsn ; __be32 max_statsn ; uint8_t other[12U] ; }; struct iscsi_scsi_req { uint8_t opcode ; uint8_t flags ; __be16 rsvd2 ; uint8_t hlength ; uint8_t dlength[3U] ; struct scsi_lun lun ; itt_t itt ; __be32 data_length ; __be32 cmdsn ; __be32 exp_statsn ; uint8_t cdb[16U] ; }; struct iscsi_scsi_rsp { uint8_t opcode ; uint8_t flags ; uint8_t response ; uint8_t cmd_status ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t rsvd[8U] ; itt_t itt ; __be32 rsvd1 ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; __be32 exp_datasn ; __be32 bi_residual_count ; __be32 residual_count ; }; struct iscsi_async { uint8_t opcode ; uint8_t flags ; uint8_t rsvd2[2U] ; uint8_t rsvd3 ; uint8_t dlength[3U] ; struct scsi_lun lun ; uint8_t rsvd4[8U] ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; uint8_t async_event ; uint8_t async_vcode ; __be16 param1 ; __be16 param2 ; __be16 param3 ; uint8_t rsvd5[4U] ; }; struct iscsi_nopout { uint8_t opcode ; uint8_t flags ; __be16 rsvd2 ; uint8_t rsvd3 ; uint8_t dlength[3U] ; struct scsi_lun lun ; itt_t itt ; __be32 ttt ; __be32 cmdsn ; __be32 exp_statsn ; uint8_t rsvd4[16U] ; }; struct iscsi_nopin { uint8_t opcode ; uint8_t flags ; __be16 rsvd2 ; uint8_t rsvd3 ; uint8_t dlength[3U] ; struct scsi_lun lun ; itt_t itt ; __be32 ttt ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; uint8_t rsvd4[12U] ; }; struct iscsi_tm_rsp { uint8_t opcode ; uint8_t flags ; uint8_t response ; uint8_t qualifier ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t rsvd2[8U] ; itt_t itt ; itt_t rtt ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; uint8_t rsvd3[12U] ; }; struct iscsi_r2t_rsp { uint8_t opcode ; uint8_t flags ; uint8_t rsvd2[2U] ; uint8_t hlength ; uint8_t dlength[3U] ; struct scsi_lun lun ; itt_t itt ; __be32 ttt ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; __be32 r2tsn ; __be32 data_offset ; __be32 data_length ; }; struct iscsi_data_rsp { uint8_t opcode ; uint8_t flags ; uint8_t rsvd2 ; uint8_t cmd_status ; uint8_t hlength ; uint8_t dlength[3U] ; struct scsi_lun lun ; itt_t itt ; __be32 ttt ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; __be32 datasn ; __be32 offset ; __be32 residual_count ; }; struct iscsi_text { uint8_t opcode ; uint8_t flags ; uint8_t rsvd2[2U] ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t rsvd4[8U] ; itt_t itt ; __be32 ttt ; __be32 cmdsn ; __be32 exp_statsn ; uint8_t rsvd5[16U] ; }; struct iscsi_text_rsp { uint8_t opcode ; uint8_t flags ; uint8_t rsvd2[2U] ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t rsvd4[8U] ; itt_t itt ; __be32 ttt ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; uint8_t rsvd5[12U] ; }; struct iscsi_logout { uint8_t opcode ; uint8_t flags ; uint8_t rsvd1[2U] ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t rsvd2[8U] ; itt_t itt ; __be16 cid ; uint8_t rsvd3[2U] ; __be32 cmdsn ; __be32 exp_statsn ; uint8_t rsvd4[16U] ; }; struct iscsi_logout_rsp { uint8_t opcode ; uint8_t flags ; uint8_t response ; uint8_t rsvd2 ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t rsvd3[8U] ; itt_t itt ; __be32 rsvd4 ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; __be32 rsvd5 ; __be16 t2wait ; __be16 t2retain ; __be32 rsvd6 ; }; struct iscsi_snack { uint8_t opcode ; uint8_t flags ; uint8_t rsvd2[2U] ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t lun[8U] ; itt_t itt ; __be32 ttt ; uint8_t rsvd3[4U] ; __be32 exp_statsn ; uint8_t rsvd4[8U] ; __be32 begrun ; __be32 runlength ; }; struct iscsi_reject { uint8_t opcode ; uint8_t flags ; uint8_t reason ; uint8_t rsvd2 ; uint8_t hlength ; uint8_t dlength[3U] ; uint8_t rsvd3[8U] ; __be32 ffffffff ; uint8_t rsvd4[4U] ; __be32 statsn ; __be32 exp_cmdsn ; __be32 max_cmdsn ; __be32 datasn ; uint8_t rsvd5[8U] ; }; enum iscsit_transport_type { ISCSI_TCP = 0, ISCSI_SCTP_TCP = 1, ISCSI_SCTP_UDP = 2, ISCSI_IWARP_TCP = 3, ISCSI_IWARP_SCTP = 4, ISCSI_INFINIBAND = 5 } ; enum hrtimer_restart; struct target_fabric_nacl_attrib_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_node_acl * , char * ) ; ssize_t (*store)(struct se_node_acl * , char const * , size_t ) ; }; struct target_fabric_nacl_auth_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_node_acl * , char * ) ; ssize_t (*store)(struct se_node_acl * , char const * , size_t ) ; }; struct target_fabric_nacl_param_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_node_acl * , char * ) ; ssize_t (*store)(struct se_node_acl * , char const * , size_t ) ; }; struct target_fabric_nacl_base_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_node_acl * , char * ) ; ssize_t (*store)(struct se_node_acl * , char const * , size_t ) ; }; struct target_fabric_np_base_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_tpg_np * , char * ) ; ssize_t (*store)(struct se_tpg_np * , char const * , size_t ) ; }; struct target_fabric_tpg_attrib_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_portal_group * , char * ) ; ssize_t (*store)(struct se_portal_group * , char const * , size_t ) ; }; struct target_fabric_tpg_auth_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_portal_group * , char * ) ; ssize_t (*store)(struct se_portal_group * , char const * , size_t ) ; }; struct target_fabric_tpg_param_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_portal_group * , char * ) ; ssize_t (*store)(struct se_portal_group * , char const * , size_t ) ; }; struct target_fabric_tpg_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct se_portal_group * , char * ) ; ssize_t (*store)(struct se_portal_group * , char const * , size_t ) ; }; struct target_fabric_wwn_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct target_fabric_configfs * , char * ) ; ssize_t (*store)(struct target_fabric_configfs * , char const * , size_t ) ; }; struct target_fabric_discovery_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct target_fabric_configfs * , char * ) ; ssize_t (*store)(struct target_fabric_configfs * , char const * , size_t ) ; }; enum hrtimer_restart; struct iscsi_stat_instance_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct iscsi_wwn_stat_grps * , char * ) ; ssize_t (*store)(struct iscsi_wwn_stat_grps * , char const * , size_t ) ; }; struct iscsi_stat_sess_err_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct iscsi_wwn_stat_grps * , char * ) ; ssize_t (*store)(struct iscsi_wwn_stat_grps * , char const * , size_t ) ; }; struct iscsi_stat_tgt_attr_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct iscsi_wwn_stat_grps * , char * ) ; ssize_t (*store)(struct iscsi_wwn_stat_grps * , char const * , size_t ) ; }; struct iscsi_stat_login_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct iscsi_wwn_stat_grps * , char * ) ; ssize_t (*store)(struct iscsi_wwn_stat_grps * , char const * , size_t ) ; }; struct iscsi_stat_logout_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct iscsi_wwn_stat_grps * , char * ) ; ssize_t (*store)(struct iscsi_wwn_stat_grps * , char const * , size_t ) ; }; struct iscsi_stat_sess_attribute { struct configfs_attribute attr ; ssize_t (*show)(struct iscsi_node_stat_grps * , char * ) ; ssize_t (*store)(struct iscsi_node_stat_grps * , char const * , size_t ) ; }; enum hrtimer_restart; __inline static long ldv__builtin_expect(long exp , long c ) ; extern int printk(char const * , ...) ; extern void __dynamic_pr_debug(struct _ddebug * , char const * , ...) ; extern int kstrtoull(char const * , unsigned int , unsigned long long * ) ; extern unsigned long simple_strtoul(char const * , char ** , unsigned int ) ; extern int sprintf(char * , char const * , ...) ; extern int snprintf(char * , size_t , char const * , ...) ; __inline static void INIT_LIST_HEAD(struct list_head *list ) { { list->next = list; list->prev = list; return; } } extern void __list_add(struct list_head * , struct list_head * , struct list_head * ) ; __inline static void list_add_tail(struct list_head *new , struct list_head *head ) { { __list_add(new, head->prev, head); return; } } extern void list_del(struct list_head * ) ; __inline static int list_empty(struct list_head const *head ) { { return ((unsigned long )((struct list_head const *)head->next) == (unsigned long )head); } } extern void *memcpy(void * , void const * , size_t ) ; extern void *memset(void * , int , size_t ) ; extern size_t strlen(char const * ) ; extern int strcmp(char const * , char const * ) ; extern size_t strlcpy(char * , char const * , size_t ) ; extern char *strchr(char const * , int ) ; extern char *kstrdup(char const * , gfp_t ) ; extern int mutex_trylock(struct mutex * ) ; int ldv_mutex_trylock_13(struct mutex *ldv_func_arg1 ) ; extern void mutex_unlock(struct mutex * ) ; void ldv_mutex_unlock_11(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_14(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_15(struct mutex *ldv_func_arg1 ) ; extern void *malloc(size_t ) ; extern void *calloc(size_t , size_t ) ; extern int __VERIFIER_nondet_int(void) ; extern unsigned long __VERIFIER_nondet_ulong(void) ; extern void *__VERIFIER_nondet_pointer(void) ; extern void __VERIFIER_assume(int ) ; void *ldv_malloc(size_t size ) { void *p ; void *tmp ; int tmp___0 ; { tmp___0 = __VERIFIER_nondet_int(); if (tmp___0 != 0) { return ((void *)0); } else { tmp = malloc(size); p = tmp; __VERIFIER_assume((unsigned long )p != (unsigned long )((void *)0)); return (p); } } } void *ldv_zalloc(size_t size ) { void *p ; void *tmp ; int tmp___0 ; { tmp___0 = __VERIFIER_nondet_int(); if (tmp___0 != 0) { return ((void *)0); } else { tmp = calloc(1UL, size); p = tmp; __VERIFIER_assume((unsigned long )p != (unsigned long )((void *)0)); return (p); } } } void *ldv_init_zalloc(size_t size ) { void *p ; void *tmp ; { tmp = calloc(1UL, size); p = tmp; __VERIFIER_assume((unsigned long )p != (unsigned long )((void *)0)); return (p); } } void *ldv_memset(void *s , int c , size_t n ) { void *tmp ; { tmp = memset(s, c, n); return (tmp); } } int ldv_undef_int(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); return (tmp); } } void *ldv_undef_ptr(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); return (tmp); } } unsigned long ldv_undef_ulong(void) { unsigned long tmp ; { tmp = __VERIFIER_nondet_ulong(); return (tmp); } } __inline static long ldv__builtin_expect(long exp , long c ) { { return (exp); } } extern void mutex_lock(struct mutex * ) ; void ldv_mutex_lock_10(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_12(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_16(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_i_mutex_of_inode(struct mutex *lock ) ; void ldv_mutex_unlock_i_mutex_of_inode(struct mutex *lock ) ; void ldv_mutex_lock_lock(struct mutex *lock ) ; void ldv_mutex_unlock_lock(struct mutex *lock ) ; void ldv_mutex_lock_mutex_of_device(struct mutex *lock ) ; int ldv_mutex_trylock_mutex_of_device(struct mutex *lock ) ; void ldv_mutex_unlock_mutex_of_device(struct mutex *lock ) ; extern bool queue_work_on(int , struct workqueue_struct * , struct work_struct * ) ; bool ldv_queue_work_on_5(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_7(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; extern bool queue_delayed_work_on(int , struct workqueue_struct * , struct delayed_work * , unsigned long ) ; bool ldv_queue_delayed_work_on_6(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_9(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; extern void flush_workqueue(struct workqueue_struct * ) ; void ldv_flush_workqueue_8(struct workqueue_struct *ldv_func_arg1 ) ; extern void kfree(void const * ) ; extern void *__kmalloc(size_t , gfp_t ) ; __inline static void *kmalloc(size_t size , gfp_t flags ) { void *tmp___2 ; { tmp___2 = __kmalloc(size, flags); return (tmp___2); } } __inline static void *kzalloc(size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc(size, flags | 32768U); return (tmp); } } int ldv_timer_state_3 = 0; int ldv_timer_state_7 = 0; int LDV_IN_INTERRUPT = 1; int ldv_timer_state_9 = 0; int ldv_timer_state_6 = 0; int ldv_timer_state_5 = 0; int ldv_timer_state_8 = 0; int ldv_timer_state_4 = 0; void activate_work_2(struct work_struct *work , int state ) ; void call_and_disable_all_2(int state ) ; int rx_data(struct iscsi_conn *conn , struct kvec *iov , int iov_count , int data ) ; int tx_data(struct iscsi_conn *conn , struct kvec *iov , int iov_count , int data ) ; int iscsi_login_rx_data(struct iscsi_conn *conn , char *buf , int length ) ; int iscsi_login_tx_data(struct iscsi_conn *conn , char *pdu_buf , char *text_buf , int text_length ) ; void iscsi_dump_conn_ops(struct iscsi_conn_ops *conn_ops ) ; void iscsi_dump_sess_ops(struct iscsi_sess_ops *sess_ops ) ; void iscsi_print_params(struct iscsi_param_list *param_list ) ; int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr ) ; int iscsi_set_keys_to_negotiate(struct iscsi_param_list *param_list , bool iser ) ; int iscsi_set_keys_irrelevant_for_discovery(struct iscsi_param_list *param_list ) ; int iscsi_copy_param_list(struct iscsi_param_list **dst_param_list , struct iscsi_param_list *src_param_list , int leading ) ; int iscsi_change_param_value(char *keyvalue , struct iscsi_param_list *param_list , int check_key ) ; void iscsi_release_param_list(struct iscsi_param_list *param_list ) ; struct iscsi_param *iscsi_find_param_from_key(char *key , struct iscsi_param_list *param_list ) ; int iscsi_extract_key_value(char *textbuf , char **key , char **value ) ; int iscsi_update_param_value(struct iscsi_param *param , char *value ) ; int iscsi_decode_text_input(u8 phase , u8 sender , char *textbuf , u32 length , struct iscsi_conn *conn ) ; int iscsi_encode_text_output(u8 phase , u8 sender , char *textbuf , u32 *length , struct iscsi_param_list *param_list ) ; int iscsi_check_negotiated_keys(struct iscsi_param_list *param_list ) ; void iscsi_set_connection_parameters(struct iscsi_conn_ops *ops , struct iscsi_param_list *param_list ) ; void iscsi_set_session_parameters(struct iscsi_sess_ops *ops , struct iscsi_param_list *param_list , int leading ) ; int iscsi_login_rx_data(struct iscsi_conn *conn , char *buf , int length ) { int rx_got ; struct kvec iov ; { memset((void *)(& iov), 0, 16UL); iov.iov_len = (size_t )length; iov.iov_base = (void *)buf; rx_got = rx_data(conn, & iov, 1, length); if (rx_got != length) { printk("\vrx_data returned %d, expecting %d.\n", rx_got, length); return (-1); } else { } return (0); } } int iscsi_login_tx_data(struct iscsi_conn *conn , char *pdu_buf , char *text_buf , int text_length ) { int length ; int tx_sent ; int iov_cnt ; struct kvec iov[2U] ; { iov_cnt = 1; length = text_length + 48; memset((void *)(& iov), 0, 32UL); iov[0].iov_len = 48UL; iov[0].iov_base = (void *)pdu_buf; if ((unsigned long )text_buf != (unsigned long )((char *)0) && text_length != 0) { iov[1].iov_len = (size_t )text_length; iov[1].iov_base = (void *)text_buf; iov_cnt = iov_cnt + 1; } else { } tx_sent = tx_data(conn, (struct kvec *)(& iov), iov_cnt, length); if (tx_sent != length) { printk("\vtx_data returned %d, expecting %d.\n", tx_sent, length); return (-1); } else { } return (0); } } void iscsi_dump_conn_ops(struct iscsi_conn_ops *conn_ops ) { struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_dump_conn_ops"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "HeaderDigest: %s\n"; descriptor.lineno = 81U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "HeaderDigest: %s\n", (unsigned int )conn_ops->HeaderDigest != 0U ? (char *)"CRC32C" : (char *)"None"); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_dump_conn_ops"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___0.format = "DataDigest: %s\n"; descriptor___0.lineno = 83U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "DataDigest: %s\n", (unsigned int )conn_ops->DataDigest != 0U ? (char *)"CRC32C" : (char *)"None"); } else { } descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_dump_conn_ops"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___1.format = "MaxRecvDataSegmentLength: %u\n"; descriptor___1.lineno = 85U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___1, "MaxRecvDataSegmentLength: %u\n", conn_ops->MaxRecvDataSegmentLength); } else { } return; } } void iscsi_dump_sess_ops(struct iscsi_sess_ops *sess_ops ) { struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; struct _ddebug descriptor___3 ; long tmp___3 ; struct _ddebug descriptor___4 ; long tmp___4 ; struct _ddebug descriptor___5 ; long tmp___5 ; struct _ddebug descriptor___6 ; long tmp___6 ; struct _ddebug descriptor___7 ; long tmp___7 ; struct _ddebug descriptor___8 ; long tmp___8 ; struct _ddebug descriptor___9 ; long tmp___9 ; struct _ddebug descriptor___10 ; long tmp___10 ; struct _ddebug descriptor___11 ; long tmp___11 ; struct _ddebug descriptor___12 ; long tmp___12 ; struct _ddebug descriptor___13 ; long tmp___13 ; struct _ddebug descriptor___14 ; long tmp___14 ; struct _ddebug descriptor___15 ; long tmp___15 ; { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_dump_sess_ops"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "InitiatorName: %s\n"; descriptor.lineno = 90U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "InitiatorName: %s\n", (char *)(& sess_ops->InitiatorName)); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_dump_sess_ops"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___0.format = "InitiatorAlias: %s\n"; descriptor___0.lineno = 91U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "InitiatorAlias: %s\n", (char *)(& sess_ops->InitiatorAlias)); } else { } descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_dump_sess_ops"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___1.format = "TargetName: %s\n"; descriptor___1.lineno = 92U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___1, "TargetName: %s\n", (char *)(& sess_ops->TargetName)); } else { } descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsi_dump_sess_ops"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___2.format = "TargetAlias: %s\n"; descriptor___2.lineno = 93U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___2, "TargetAlias: %s\n", (char *)(& sess_ops->TargetAlias)); } else { } descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsi_dump_sess_ops"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___3.format = "TargetPortalGroupTag: %hu\n"; descriptor___3.lineno = 95U; descriptor___3.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___3, "TargetPortalGroupTag: %hu\n", (int )sess_ops->TargetPortalGroupTag); } else { } descriptor___4.modname = "iscsi_target_mod"; descriptor___4.function = "iscsi_dump_sess_ops"; descriptor___4.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___4.format = "MaxConnections: %hu\n"; descriptor___4.lineno = 96U; descriptor___4.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___4, "MaxConnections: %hu\n", (int )sess_ops->MaxConnections); } else { } descriptor___5.modname = "iscsi_target_mod"; descriptor___5.function = "iscsi_dump_sess_ops"; descriptor___5.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___5.format = "InitialR2T: %s\n"; descriptor___5.lineno = 98U; descriptor___5.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___5, "InitialR2T: %s\n", (unsigned int )sess_ops->InitialR2T != 0U ? (char *)"Yes" : (char *)"No"); } else { } descriptor___6.modname = "iscsi_target_mod"; descriptor___6.function = "iscsi_dump_sess_ops"; descriptor___6.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___6.format = "ImmediateData: %s\n"; descriptor___6.lineno = 100U; descriptor___6.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___6, "ImmediateData: %s\n", (unsigned int )sess_ops->ImmediateData != 0U ? (char *)"Yes" : (char *)"No"); } else { } descriptor___7.modname = "iscsi_target_mod"; descriptor___7.function = "iscsi_dump_sess_ops"; descriptor___7.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___7.format = "MaxBurstLength: %u\n"; descriptor___7.lineno = 101U; descriptor___7.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___7.flags & 1L, 0L); if (tmp___7 != 0L) { __dynamic_pr_debug(& descriptor___7, "MaxBurstLength: %u\n", sess_ops->MaxBurstLength); } else { } descriptor___8.modname = "iscsi_target_mod"; descriptor___8.function = "iscsi_dump_sess_ops"; descriptor___8.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___8.format = "FirstBurstLength: %u\n"; descriptor___8.lineno = 102U; descriptor___8.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___8.flags & 1L, 0L); if (tmp___8 != 0L) { __dynamic_pr_debug(& descriptor___8, "FirstBurstLength: %u\n", sess_ops->FirstBurstLength); } else { } descriptor___9.modname = "iscsi_target_mod"; descriptor___9.function = "iscsi_dump_sess_ops"; descriptor___9.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___9.format = "DefaultTime2Wait: %hu\n"; descriptor___9.lineno = 103U; descriptor___9.flags = 0U; tmp___9 = ldv__builtin_expect((long )descriptor___9.flags & 1L, 0L); if (tmp___9 != 0L) { __dynamic_pr_debug(& descriptor___9, "DefaultTime2Wait: %hu\n", (int )sess_ops->DefaultTime2Wait); } else { } descriptor___10.modname = "iscsi_target_mod"; descriptor___10.function = "iscsi_dump_sess_ops"; descriptor___10.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___10.format = "DefaultTime2Retain: %hu\n"; descriptor___10.lineno = 105U; descriptor___10.flags = 0U; tmp___10 = ldv__builtin_expect((long )descriptor___10.flags & 1L, 0L); if (tmp___10 != 0L) { __dynamic_pr_debug(& descriptor___10, "DefaultTime2Retain: %hu\n", (int )sess_ops->DefaultTime2Retain); } else { } descriptor___11.modname = "iscsi_target_mod"; descriptor___11.function = "iscsi_dump_sess_ops"; descriptor___11.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___11.format = "MaxOutstandingR2T: %hu\n"; descriptor___11.lineno = 107U; descriptor___11.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___11.flags & 1L, 0L); if (tmp___11 != 0L) { __dynamic_pr_debug(& descriptor___11, "MaxOutstandingR2T: %hu\n", (int )sess_ops->MaxOutstandingR2T); } else { } descriptor___12.modname = "iscsi_target_mod"; descriptor___12.function = "iscsi_dump_sess_ops"; descriptor___12.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___12.format = "DataPDUInOrder: %s\n"; descriptor___12.lineno = 109U; descriptor___12.flags = 0U; tmp___12 = ldv__builtin_expect((long )descriptor___12.flags & 1L, 0L); if (tmp___12 != 0L) { __dynamic_pr_debug(& descriptor___12, "DataPDUInOrder: %s\n", (unsigned int )sess_ops->DataPDUInOrder != 0U ? (char *)"Yes" : (char *)"No"); } else { } descriptor___13.modname = "iscsi_target_mod"; descriptor___13.function = "iscsi_dump_sess_ops"; descriptor___13.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___13.format = "DataSequenceInOrder: %s\n"; descriptor___13.lineno = 111U; descriptor___13.flags = 0U; tmp___13 = ldv__builtin_expect((long )descriptor___13.flags & 1L, 0L); if (tmp___13 != 0L) { __dynamic_pr_debug(& descriptor___13, "DataSequenceInOrder: %s\n", (unsigned int )sess_ops->DataSequenceInOrder != 0U ? (char *)"Yes" : (char *)"No"); } else { } descriptor___14.modname = "iscsi_target_mod"; descriptor___14.function = "iscsi_dump_sess_ops"; descriptor___14.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___14.format = "ErrorRecoveryLevel: %hu\n"; descriptor___14.lineno = 113U; descriptor___14.flags = 0U; tmp___14 = ldv__builtin_expect((long )descriptor___14.flags & 1L, 0L); if (tmp___14 != 0L) { __dynamic_pr_debug(& descriptor___14, "ErrorRecoveryLevel: %hu\n", (int )sess_ops->ErrorRecoveryLevel); } else { } descriptor___15.modname = "iscsi_target_mod"; descriptor___15.function = "iscsi_dump_sess_ops"; descriptor___15.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___15.format = "SessionType: %s\n"; descriptor___15.lineno = 115U; descriptor___15.flags = 0U; tmp___15 = ldv__builtin_expect((long )descriptor___15.flags & 1L, 0L); if (tmp___15 != 0L) { __dynamic_pr_debug(& descriptor___15, "SessionType: %s\n", (unsigned int )sess_ops->SessionType != 0U ? (char *)"Discovery" : (char *)"Normal"); } else { } return; } } void iscsi_print_params(struct iscsi_param_list *param_list ) { struct iscsi_param *param ; struct list_head const *__mptr ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr___0 ; { __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57349; ldv_57348: descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_print_params"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "%s: %s\n"; descriptor.lineno = 123U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "%s: %s\n", param->name, param->value); } else { } __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57349: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57348; } else { } return; } } static struct iscsi_param *iscsi_set_default_param(struct iscsi_param_list *param_list , char *name , char *value , u8 phase , u8 scope , u8 sender , u16 type_range , u8 use ) { struct iscsi_param *param ; void *tmp ; { param = (struct iscsi_param *)0; tmp = kzalloc(64UL, 208U); param = (struct iscsi_param *)tmp; if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { printk("\vUnable to allocate memory for parameter.\n"); goto out; } else { } INIT_LIST_HEAD(& param->p_list); param->name = kstrdup((char const *)name, 208U); if ((unsigned long )param->name == (unsigned long )((char *)0)) { printk("\vUnable to allocate memory for parameter name.\n"); goto out; } else { } param->value = kstrdup((char const *)value, 208U); if ((unsigned long )param->value == (unsigned long )((char *)0)) { printk("\vUnable to allocate memory for parameter value.\n"); goto out; } else { } param->phase = phase; param->scope = scope; param->sender = sender; param->use = use; param->type_range = type_range; switch ((int )param->type_range) { case 1: param->type = 1U; goto ldv_57364; case 2: param->type = 2U; goto ldv_57364; case 4: ; case 8: ; case 16: ; case 32: ; case 64: ; case 128: ; case 256: param->type = 4U; goto ldv_57364; case 512: ; case 1024: param->type = 48U; goto ldv_57364; case 2048: ; case 4096: ; case 8192: ; case 16384: param->type = 16U; goto ldv_57364; default: printk("\vUnknown type_range 0x%02x\n", (int )param->type_range); goto out; } ldv_57364: list_add_tail(& param->p_list, & param_list->param_list); return (param); out: ; if ((unsigned long )param != (unsigned long )((struct iscsi_param *)0)) { kfree((void const *)param->value); kfree((void const *)param->name); kfree((void const *)param); } else { } return ((struct iscsi_param *)0); } } int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr ) { struct iscsi_param *param ; struct iscsi_param_list *pl ; void *tmp ; { param = (struct iscsi_param *)0; tmp = kzalloc(40UL, 208U); pl = (struct iscsi_param_list *)tmp; if ((unsigned long )pl == (unsigned long )((struct iscsi_param_list *)0)) { printk("\vUnable to allocate memory for struct iscsi_param_list.\n"); return (-1); } else { } INIT_LIST_HEAD(& pl->param_list); INIT_LIST_HEAD(& pl->extra_response_list); param = iscsi_set_default_param(pl, (char *)"AuthMethod", (char *)"CHAP", 1, 1, 3, 512, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"HeaderDigest", (char *)"CRC32C,None", 2, 1, 3, 1024, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"DataDigest", (char *)"CRC32C,None", 2, 1, 3, 1024, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"MaxConnections", (char *)"1", 2, 2, 3, 64, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"SendTargets", (char *)"All", 8, 2, 1, 16384, 0); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"TargetName", (char *)"LIO.Target", 4, 2, 3, 2048, 4); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"InitiatorName", (char *)"LIO.Initiator", 4, 2, 1, 2048, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"TargetAlias", (char *)"LIO Target", 4, 2, 2, 16384, 4); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"InitiatorAlias", (char *)"LIO Initiator", 4, 2, 1, 16384, 4); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"TargetAddress", (char *)"0.0.0.0:0000,0", 4, 2, 2, 8192, 4); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"TargetPortalGroupTag", (char *)"1", 4, 2, 2, 32, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"InitialR2T", (char *)"Yes", 2, 2, 3, 2, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"ImmediateData", (char *)"Yes", 2, 2, 3, 1, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"MaxXmitDataSegmentLength", (char *)"262144", 2, 1, 3, 256, 4); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"MaxRecvDataSegmentLength", (char *)"8192", 2, 1, 3, 256, 4); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"MaxBurstLength", (char *)"262144", 2, 2, 3, 256, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"FirstBurstLength", (char *)"65536", 2, 2, 3, 256, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"DefaultTime2Wait", (char *)"2", 2, 2, 3, 8, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"DefaultTime2Retain", (char *)"20", 2, 2, 3, 8, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"MaxOutstandingR2T", (char *)"1", 2, 2, 3, 64, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"DataPDUInOrder", (char *)"Yes", 2, 2, 3, 2, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"DataSequenceInOrder", (char *)"Yes", 2, 2, 3, 2, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"ErrorRecoveryLevel", (char *)"0", 2, 2, 3, 4, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"SessionType", (char *)"Normal", 4, 2, 1, 4096, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"IFMarker", (char *)"No", 2, 1, 3, 1, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"OFMarker", (char *)"No", 2, 1, 3, 1, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"IFMarkInt", (char *)"Reject", 2, 1, 3, 16384, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"OFMarkInt", (char *)"Reject", 2, 1, 3, 16384, 2); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"RDMAExtensions", (char *)"No", 2, 2, 3, 1, 1); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"InitiatorRecvDataSegmentLength", (char *)"262144", 2, 1, 3, 256, 4); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } param = iscsi_set_default_param(pl, (char *)"TargetRecvDataSegmentLength", (char *)"8192", 2, 1, 3, 256, 4); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } *param_list_ptr = pl; return (0); out: iscsi_release_param_list(pl); return (-1); } } int iscsi_set_keys_to_negotiate(struct iscsi_param_list *param_list , bool iser ) { struct iscsi_param *param ; struct list_head const *__mptr ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; int tmp___14 ; int tmp___15 ; int tmp___16 ; int tmp___17 ; int tmp___18 ; int tmp___19 ; int tmp___20 ; int tmp___21 ; int tmp___22 ; int tmp___23 ; int tmp___24 ; int tmp___25 ; int tmp___26 ; int tmp___27 ; struct list_head const *__mptr___0 ; { param_list->iser = iser; __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57397; ldv_57396: param->state = 0U; tmp___27 = strcmp((char const *)param->name, "AuthMethod"); if (tmp___27 == 0) { param->state = param->state | 2U; } else { tmp___26 = strcmp((char const *)param->name, "HeaderDigest"); if (tmp___26 == 0) { if (! iser) { param->state = param->state | 2U; } else { } } else { tmp___25 = strcmp((char const *)param->name, "DataDigest"); if (tmp___25 == 0) { if (! iser) { param->state = param->state | 2U; } else { } } else { tmp___24 = strcmp((char const *)param->name, "MaxConnections"); if (tmp___24 == 0) { param->state = param->state | 2U; } else { tmp___23 = strcmp((char const *)param->name, "TargetName"); if (tmp___23 == 0) { goto ldv_57395; } else { tmp___22 = strcmp((char const *)param->name, "InitiatorName"); if (tmp___22 == 0) { goto ldv_57395; } else { tmp___21 = strcmp((char const *)param->name, "TargetAlias"); if (tmp___21 == 0) { if ((unsigned long )param->value != (unsigned long )((char *)0)) { param->state = param->state | 2U; } else { } } else { tmp___20 = strcmp((char const *)param->name, "InitiatorAlias"); if (tmp___20 == 0) { goto ldv_57395; } else { tmp___19 = strcmp((char const *)param->name, "TargetPortalGroupTag"); if (tmp___19 == 0) { param->state = param->state | 2U; } else { tmp___18 = strcmp((char const *)param->name, "InitialR2T"); if (tmp___18 == 0) { param->state = param->state | 2U; } else { tmp___17 = strcmp((char const *)param->name, "ImmediateData"); if (tmp___17 == 0) { param->state = param->state | 2U; } else { tmp___16 = strcmp((char const *)param->name, "MaxRecvDataSegmentLength"); if (tmp___16 == 0) { if (! iser) { param->state = param->state | 2U; } else { } } else { tmp___15 = strcmp((char const *)param->name, "MaxXmitDataSegmentLength"); if (tmp___15 == 0) { goto ldv_57395; } else { tmp___14 = strcmp((char const *)param->name, "MaxBurstLength"); if (tmp___14 == 0) { param->state = param->state | 2U; } else { tmp___13 = strcmp((char const *)param->name, "FirstBurstLength"); if (tmp___13 == 0) { param->state = param->state | 2U; } else { tmp___12 = strcmp((char const *)param->name, "DefaultTime2Wait"); if (tmp___12 == 0) { param->state = param->state | 2U; } else { tmp___11 = strcmp((char const *)param->name, "DefaultTime2Retain"); if (tmp___11 == 0) { param->state = param->state | 2U; } else { tmp___10 = strcmp((char const *)param->name, "MaxOutstandingR2T"); if (tmp___10 == 0) { param->state = param->state | 2U; } else { tmp___9 = strcmp((char const *)param->name, "DataPDUInOrder"); if (tmp___9 == 0) { param->state = param->state | 2U; } else { tmp___8 = strcmp((char const *)param->name, "DataSequenceInOrder"); if (tmp___8 == 0) { param->state = param->state | 2U; } else { tmp___7 = strcmp((char const *)param->name, "ErrorRecoveryLevel"); if (tmp___7 == 0) { param->state = param->state | 2U; } else { tmp___6 = strcmp((char const *)param->name, "SessionType"); if (tmp___6 == 0) { param->state = param->state | 2U; } else { tmp___5 = strcmp((char const *)param->name, "IFMarker"); if (tmp___5 == 0) { param->state = param->state | 2U; } else { tmp___4 = strcmp((char const *)param->name, "OFMarker"); if (tmp___4 == 0) { param->state = param->state | 2U; } else { tmp___3 = strcmp((char const *)param->name, "IFMarkInt"); if (tmp___3 == 0) { param->state = param->state | 16U; } else { tmp___2 = strcmp((char const *)param->name, "OFMarkInt"); if (tmp___2 == 0) { param->state = param->state | 16U; } else { tmp___1 = strcmp((char const *)param->name, "RDMAExtensions"); if (tmp___1 == 0) { if ((int )iser) { param->state = param->state | 2U; } else { } } else { tmp___0 = strcmp((char const *)param->name, "InitiatorRecvDataSegmentLength"); if (tmp___0 == 0) { if ((int )iser) { param->state = param->state | 2U; } else { } } else { tmp = strcmp((char const *)param->name, "TargetRecvDataSegmentLength"); if (tmp == 0) { if ((int )iser) { param->state = param->state | 2U; } else { } } else { } } } } } } } } } } } } } } } } } } } } } } } } } } } } } ldv_57395: __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57397: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57396; } else { } return (0); } } int iscsi_set_keys_irrelevant_for_discovery(struct iscsi_param_list *param_list ) { struct iscsi_param *param ; struct list_head const *__mptr ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; int tmp___14 ; int tmp___15 ; int tmp___16 ; struct list_head const *__mptr___0 ; { __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57408; ldv_57407: tmp___16 = strcmp((char const *)param->name, "MaxConnections"); if (tmp___16 == 0) { param->state = param->state & 4294967293U; } else { tmp___15 = strcmp((char const *)param->name, "InitialR2T"); if (tmp___15 == 0) { param->state = param->state & 4294967293U; } else { tmp___14 = strcmp((char const *)param->name, "ImmediateData"); if (tmp___14 == 0) { param->state = param->state & 4294967293U; } else { tmp___13 = strcmp((char const *)param->name, "MaxBurstLength"); if (tmp___13 == 0) { param->state = param->state & 4294967293U; } else { tmp___12 = strcmp((char const *)param->name, "FirstBurstLength"); if (tmp___12 == 0) { param->state = param->state & 4294967293U; } else { tmp___11 = strcmp((char const *)param->name, "MaxOutstandingR2T"); if (tmp___11 == 0) { param->state = param->state & 4294967293U; } else { tmp___10 = strcmp((char const *)param->name, "DataPDUInOrder"); if (tmp___10 == 0) { param->state = param->state & 4294967293U; } else { tmp___9 = strcmp((char const *)param->name, "DataSequenceInOrder"); if (tmp___9 == 0) { param->state = param->state & 4294967293U; } else { tmp___8 = strcmp((char const *)param->name, "ErrorRecoveryLevel"); if (tmp___8 == 0) { param->state = param->state & 4294967293U; } else { tmp___7 = strcmp((char const *)param->name, "DefaultTime2Wait"); if (tmp___7 == 0) { param->state = param->state & 4294967293U; } else { tmp___6 = strcmp((char const *)param->name, "DefaultTime2Retain"); if (tmp___6 == 0) { param->state = param->state & 4294967293U; } else { tmp___5 = strcmp((char const *)param->name, "IFMarker"); if (tmp___5 == 0) { param->state = param->state & 4294967293U; } else { tmp___4 = strcmp((char const *)param->name, "OFMarker"); if (tmp___4 == 0) { param->state = param->state & 4294967293U; } else { tmp___3 = strcmp((char const *)param->name, "IFMarkInt"); if (tmp___3 == 0) { param->state = param->state & 4294967293U; } else { tmp___2 = strcmp((char const *)param->name, "OFMarkInt"); if (tmp___2 == 0) { param->state = param->state & 4294967293U; } else { tmp___1 = strcmp((char const *)param->name, "RDMAExtensions"); if (tmp___1 == 0) { param->state = param->state & 4294967293U; } else { tmp___0 = strcmp((char const *)param->name, "InitiatorRecvDataSegmentLength"); if (tmp___0 == 0) { param->state = param->state & 4294967293U; } else { tmp = strcmp((char const *)param->name, "TargetRecvDataSegmentLength"); if (tmp == 0) { param->state = param->state & 4294967293U; } else { } } } } } } } } } } } } } } } } } } __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57408: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57407; } else { } return (0); } } int iscsi_copy_param_list(struct iscsi_param_list **dst_param_list , struct iscsi_param_list *src_param_list , int leading ) { struct iscsi_param *param ; struct iscsi_param *new_param ; struct iscsi_param_list *param_list ; void *tmp ; struct list_head const *__mptr ; int tmp___0 ; int tmp___1 ; int tmp___2 ; void *tmp___3 ; struct list_head const *__mptr___0 ; int tmp___4 ; { param = (struct iscsi_param *)0; new_param = (struct iscsi_param *)0; param_list = (struct iscsi_param_list *)0; tmp = kzalloc(40UL, 208U); param_list = (struct iscsi_param_list *)tmp; if ((unsigned long )param_list == (unsigned long )((struct iscsi_param_list *)0)) { printk("\vUnable to allocate memory for struct iscsi_param_list.\n"); return (-1); } else { } INIT_LIST_HEAD(& param_list->param_list); INIT_LIST_HEAD(& param_list->extra_response_list); __mptr = (struct list_head const *)src_param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57425; ldv_57424: ; if (leading == 0 && ((int )param->scope & 2) != 0) { tmp___0 = strcmp((char const *)param->name, "TargetName"); if (tmp___0 != 0) { tmp___1 = strcmp((char const *)param->name, "InitiatorName"); if (tmp___1 != 0) { tmp___2 = strcmp((char const *)param->name, "TargetPortalGroupTag"); if (tmp___2 != 0) { goto ldv_57422; } else { } } else { } } else { } } else { } tmp___3 = kzalloc(64UL, 208U); new_param = (struct iscsi_param *)tmp___3; if ((unsigned long )new_param == (unsigned long )((struct iscsi_param *)0)) { printk("\vUnable to allocate memory for struct iscsi_param.\n"); goto err_out; } else { } new_param->name = kstrdup((char const *)param->name, 208U); new_param->value = kstrdup((char const *)param->value, 208U); if ((unsigned long )new_param->value == (unsigned long )((char *)0) || (unsigned long )new_param->name == (unsigned long )((char *)0)) { kfree((void const *)new_param->value); kfree((void const *)new_param->name); kfree((void const *)new_param); printk("\vUnable to allocate memory for parameter name/value.\n"); goto err_out; } else { } new_param->set_param = param->set_param; new_param->phase = param->phase; new_param->scope = param->scope; new_param->sender = param->sender; new_param->type = param->type; new_param->use = param->use; new_param->type_range = param->type_range; list_add_tail(& new_param->p_list, & param_list->param_list); ldv_57422: __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57425: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& src_param_list->param_list)) { goto ldv_57424; } else { } tmp___4 = list_empty((struct list_head const *)(& param_list->param_list)); if (tmp___4 == 0) { *dst_param_list = param_list; } else { printk("\vNo parameters allocated.\n"); goto err_out; } return (0); err_out: iscsi_release_param_list(param_list); return (-1); } } static void iscsi_release_extra_responses(struct iscsi_param_list *param_list ) { struct iscsi_extra_response *er ; struct iscsi_extra_response *er_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { __mptr = (struct list_head const *)param_list->extra_response_list.next; er = (struct iscsi_extra_response *)__mptr + 0xffffffffffffffa0UL; __mptr___0 = (struct list_head const *)er->er_list.next; er_tmp = (struct iscsi_extra_response *)__mptr___0 + 0xffffffffffffffa0UL; goto ldv_57439; ldv_57438: list_del(& er->er_list); kfree((void const *)er); er = er_tmp; __mptr___1 = (struct list_head const *)er_tmp->er_list.next; er_tmp = (struct iscsi_extra_response *)__mptr___1 + 0xffffffffffffffa0UL; ldv_57439: ; if ((unsigned long )(& er->er_list) != (unsigned long )(& param_list->extra_response_list)) { goto ldv_57438; } else { } return; } } void iscsi_release_param_list(struct iscsi_param_list *param_list ) { struct iscsi_param *param ; struct iscsi_param *param_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; __mptr___0 = (struct list_head const *)param->p_list.next; param_tmp = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; goto ldv_57453; ldv_57452: list_del(& param->p_list); kfree((void const *)param->name); kfree((void const *)param->value); kfree((void const *)param); param = param_tmp; __mptr___1 = (struct list_head const *)param_tmp->p_list.next; param_tmp = (struct iscsi_param *)__mptr___1 + 0xffffffffffffffe0UL; ldv_57453: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57452; } else { } iscsi_release_extra_responses(param_list); kfree((void const *)param_list); return; } } struct iscsi_param *iscsi_find_param_from_key(char *key , struct iscsi_param_list *param_list ) { struct iscsi_param *param ; struct list_head const *__mptr ; int tmp ; struct list_head const *__mptr___0 ; { if ((unsigned long )key == (unsigned long )((char *)0) || (unsigned long )param_list == (unsigned long )((struct iscsi_param_list *)0)) { printk("\vKey or parameter list pointer is NULL.\n"); return ((struct iscsi_param *)0); } else { } __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57465; ldv_57464: tmp = strcmp((char const *)key, (char const *)param->name); if (tmp == 0) { return (param); } else { } __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57465: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57464; } else { } printk("\vUnable to locate key \"%s\".\n", key); return ((struct iscsi_param *)0); } } int iscsi_extract_key_value(char *textbuf , char **key , char **value ) { { *value = strchr((char const *)textbuf, 61); if ((unsigned long )*value == (unsigned long )((char *)0)) { printk("\vUnable to locate \"=\" separator for key, ignoring request.\n"); return (-1); } else { } *key = textbuf; *(*value) = 0; *value = *value + 1UL; return (0); } } int iscsi_update_param_value(struct iscsi_param *param , char *value ) { struct _ddebug descriptor ; long tmp ; { kfree((void const *)param->value); param->value = kstrdup((char const *)value, 208U); if ((unsigned long )param->value == (unsigned long )((char *)0)) { printk("\vUnable to allocate memory for value.\n"); return (-12); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_update_param_value"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "iSCSI Parameter updated to %s=%s\n"; descriptor.lineno = 710U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI Parameter updated to %s=%s\n", param->name, param->value); } else { } return (0); } } static int iscsi_add_notunderstood_response(char *key , char *value , struct iscsi_param_list *param_list ) { struct iscsi_extra_response *extra_response ; size_t tmp ; void *tmp___0 ; { tmp = strlen((char const *)value); if (tmp > 255UL) { printk("\vValue for notunderstood key \"%s\" exceeds %d, protocol error.\n", key, 255); return (-1); } else { } tmp___0 = kzalloc(128UL, 208U); extra_response = (struct iscsi_extra_response *)tmp___0; if ((unsigned long )extra_response == (unsigned long )((struct iscsi_extra_response *)0)) { printk("\vUnable to allocate memory for struct iscsi_extra_response.\n"); return (-1); } else { } INIT_LIST_HEAD(& extra_response->er_list); strlcpy((char *)(& extra_response->key), (char const *)key, 64UL); strlcpy((char *)(& extra_response->value), "NotUnderstood", 32UL); list_add_tail(& extra_response->er_list, & param_list->extra_response_list); return (0); } } static int iscsi_check_for_auth_key(char *key ) { int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; { tmp = strcmp((char const *)key, "CHAP_A"); if (tmp == 0) { return (1); } else { tmp___0 = strcmp((char const *)key, "CHAP_I"); if (tmp___0 == 0) { return (1); } else { tmp___1 = strcmp((char const *)key, "CHAP_C"); if (tmp___1 == 0) { return (1); } else { tmp___2 = strcmp((char const *)key, "CHAP_N"); if (tmp___2 == 0) { return (1); } else { tmp___3 = strcmp((char const *)key, "CHAP_R"); if (tmp___3 == 0) { return (1); } else { } } } } } tmp___4 = strcmp((char const *)key, "SRP_U"); if (tmp___4 == 0) { return (1); } else { tmp___5 = strcmp((char const *)key, "SRP_N"); if (tmp___5 == 0) { return (1); } else { tmp___6 = strcmp((char const *)key, "SRP_g"); if (tmp___6 == 0) { return (1); } else { tmp___7 = strcmp((char const *)key, "SRP_s"); if (tmp___7 == 0) { return (1); } else { tmp___8 = strcmp((char const *)key, "SRP_A"); if (tmp___8 == 0) { return (1); } else { tmp___9 = strcmp((char const *)key, "SRP_B"); if (tmp___9 == 0) { return (1); } else { tmp___10 = strcmp((char const *)key, "SRP_M"); if (tmp___10 == 0) { return (1); } else { tmp___11 = strcmp((char const *)key, "SRP_HM"); if (tmp___11 == 0) { return (1); } else { } } } } } } } } return (0); } } static void iscsi_check_proposer_for_optional_reply(struct iscsi_param *param ) { int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; { if ((int )param->type & 1) { tmp = strcmp((char const *)param->value, "No"); if (tmp == 0) { param->state = param->state | 32U; } else { } } else if (((int )param->type & 2) != 0) { tmp___0 = strcmp((char const *)param->value, "Yes"); if (tmp___0 == 0) { param->state = param->state | 32U; } else { } tmp___1 = strcmp((char const *)param->name, "ImmediateData"); if (tmp___1 == 0) { param->state = param->state | 32U; } else { } } else if (((int )param->type & 4) != 0) { tmp___2 = strcmp((char const *)param->name, "MaxRecvDataSegmentLength"); if (tmp___2 == 0) { param->state = param->state | 32U; } else { } tmp___3 = strcmp((char const *)param->name, "MaxBurstLength"); if (tmp___3 == 0) { param->state = param->state | 32U; } else { } tmp___4 = strcmp((char const *)param->name, "FirstBurstLength"); if (tmp___4 == 0) { param->state = param->state | 32U; } else { } tmp___5 = strcmp((char const *)param->name, "DefaultTime2Wait"); if (tmp___5 == 0) { param->state = param->state | 32U; } else { } tmp___6 = strcmp((char const *)param->name, "DefaultTime2Retain"); if (tmp___6 == 0) { param->state = param->state | 32U; } else { } tmp___7 = strcmp((char const *)param->name, "MaxConnections"); if (tmp___7 == 0) { param->state = param->state | 32U; } else { } } else if (((int )param->phase & 4) != 0) { param->state = param->state | 32U; } else { } return; } } static int iscsi_check_boolean_value(struct iscsi_param *param , char *value ) { int tmp ; int tmp___0 ; { tmp = strcmp((char const *)value, "Yes"); if (tmp != 0) { tmp___0 = strcmp((char const *)value, "No"); if (tmp___0 != 0) { printk("\vIllegal value for \"%s\", must be either \"%s\" or \"%s\".\n", param->name, (char *)"Yes", (char *)"No"); return (-1); } else { } } else { } return (0); } } static int iscsi_check_numerical_value(struct iscsi_param *param , char *value_ptr ) { char *tmpptr ; int value ; unsigned long tmp ; { value = 0; tmp = simple_strtoul((char const *)value_ptr, & tmpptr, 0U); value = (int )tmp; if (((int )param->type_range & 4) != 0) { if (value < 0 || value > 2) { printk("\vIllegal value for \"%s\", must be between 0 and 2.\n", param->name); return (-1); } else { } return (0); } else { } if (((int )param->type_range & 8) != 0) { if (value < 0 || value > 3600) { printk("\vIllegal value for \"%s\", must be between 0 and 3600.\n", param->name); return (-1); } else { } return (0); } else { } if (((int )param->type_range & 16) != 0) { if (value < 0 || value > 32767) { printk("\vIllegal value for \"%s\", must be between 0 and 32767.\n", param->name); return (-1); } else { } return (0); } else { } if (((int )param->type_range & 32) != 0) { if (value < 0 || value > 65535) { printk("\vIllegal value for \"%s\", must be between 0 and 65535.\n", param->name); return (-1); } else { } return (0); } else { } if (((int )param->type_range & 64) != 0) { if (value <= 0 || value > 65535) { printk("\vIllegal value for \"%s\", must be between 1 and 65535.\n", param->name); return (-1); } else { } return (0); } else { } if (((int )param->type_range & 128) != 0) { if (value <= 1 || value > 3600) { printk("\vIllegal value for \"%s\", must be between 2 and 3600.\n", param->name); return (-1); } else { } return (0); } else { } if (((int )param->type_range & 256) != 0) { if (value <= 511 || value > 16777215) { printk("\vIllegal value for \"%s\", must be between 512 and 16777215.\n", param->name); return (-1); } else { } return (0); } else { } return (0); } } static int iscsi_check_string_or_list_value(struct iscsi_param *param , char *value ) { int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; { if ((param->state & 4U) != 0U) { return (0); } else { } if (((int )param->type_range & 512) != 0) { tmp = strcmp((char const *)value, "KRB5"); if (tmp != 0) { tmp___0 = strcmp((char const *)value, "SPKM1"); if (tmp___0 != 0) { tmp___1 = strcmp((char const *)value, "SPKM2"); if (tmp___1 != 0) { tmp___2 = strcmp((char const *)value, "SRP"); if (tmp___2 != 0) { tmp___3 = strcmp((char const *)value, "CHAP"); if (tmp___3 != 0) { tmp___4 = strcmp((char const *)value, "None"); if (tmp___4 != 0) { printk("\vIllegal value for \"%s\", must be \"%s\", \"%s\", \"%s\", \"%s\", \"%s\" or \"%s\".\n", param->name, (char *)"KRB5", (char *)"SPKM1", (char *)"SPKM2", (char *)"SRP", (char *)"CHAP", (char *)"None"); return (-1); } else { } } else { } } else { } } else { } } else { } } else { } } else { } if (((int )param->type_range & 1024) != 0) { tmp___5 = strcmp((char const *)value, "CRC32C"); if (tmp___5 != 0) { tmp___6 = strcmp((char const *)value, "None"); if (tmp___6 != 0) { printk("\vIllegal value for \"%s\", must be \"%s\" or \"%s\".\n", param->name, (char *)"CRC32C", (char *)"None"); return (-1); } else { } } else { } } else { } if (((int )param->type_range & 4096) != 0) { tmp___7 = strcmp((char const *)value, "Discovery"); if (tmp___7 != 0) { tmp___8 = strcmp((char const *)value, "Normal"); if (tmp___8 != 0) { printk("\vIllegal value for \"%s\", must be \"%s\" or \"%s\".\n", param->name, (char *)"Discovery", (char *)"Normal"); return (-1); } else { } } else { } } else { } return (0); } } static char *iscsi_check_valuelist_for_support(struct iscsi_param *param , char *value ) { char *tmp1 ; char *tmp2 ; char *acceptor_values ; char *proposer_values ; int tmp ; char *tmp___0 ; char *tmp___1 ; { tmp1 = (char *)0; tmp2 = (char *)0; acceptor_values = (char *)0; proposer_values = (char *)0; acceptor_values = param->value; proposer_values = value; ldv_57515: ; if ((unsigned long )proposer_values == (unsigned long )((char *)0)) { return ((char *)0); } else { } tmp1 = strchr((char const *)proposer_values, 44); if ((unsigned long )tmp1 != (unsigned long )((char *)0)) { *tmp1 = 0; } else { } acceptor_values = param->value; ldv_57513: ; if ((unsigned long )acceptor_values == (unsigned long )((char *)0)) { if ((unsigned long )tmp1 != (unsigned long )((char *)0)) { *tmp1 = 44; } else { } return ((char *)0); } else { } tmp2 = strchr((char const *)acceptor_values, 44); if ((unsigned long )tmp2 != (unsigned long )((char *)0)) { *tmp2 = 0; } else { } tmp = strcmp((char const *)acceptor_values, (char const *)proposer_values); if (tmp == 0) { if ((unsigned long )tmp2 != (unsigned long )((char *)0)) { *tmp2 = 44; } else { } goto out; } else { } if ((unsigned long )tmp2 != (unsigned long )((char *)0)) { tmp___0 = tmp2; tmp2 = tmp2 + 1; *tmp___0 = 44; } else { } acceptor_values = tmp2; if ((unsigned long )acceptor_values != (unsigned long )((char *)0)) { goto ldv_57513; } else { } if ((unsigned long )tmp1 != (unsigned long )((char *)0)) { tmp___1 = tmp1; tmp1 = tmp1 + 1; *tmp___1 = 44; } else { } proposer_values = tmp1; if ((unsigned long )proposer_values != (unsigned long )((char *)0)) { goto ldv_57515; } else { } out: ; return (proposer_values); } } static int iscsi_check_acceptor_state(struct iscsi_param *param , char *value , struct iscsi_conn *conn ) { u8 acceptor_boolean_value ; u8 proposer_boolean_value ; char *negotiated_value ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; char *tmpptr ; char buf[11U] ; u32 acceptor_value ; unsigned long tmp___5 ; u32 proposer_value ; unsigned long tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; int tmp___14 ; int tmp___15 ; int tmp___16 ; int tmp___17 ; int tmp___18 ; struct iscsi_param *param_mxdsl ; unsigned long long tmp___19 ; int rc ; struct _ddebug descriptor ; long tmp___20 ; struct _ddebug descriptor___0 ; long tmp___21 ; int tmp___22 ; int tmp___23 ; int tmp___24 ; { acceptor_boolean_value = 0U; proposer_boolean_value = 0U; negotiated_value = (char *)0; if ((int )param->state & 1) { printk("\vReceived key \"%s\" twice, protocol error.\n", param->name); return (-1); } else { } if ((param->state & 16U) != 0U) { return (0); } else { } if ((int )param->type & 1) { tmp = strcmp((char const *)value, "Yes"); if (tmp == 0) { proposer_boolean_value = 1U; } else { } tmp___0 = strcmp((char const *)param->value, "Yes"); if (tmp___0 == 0) { acceptor_boolean_value = 1U; } else { } if ((unsigned int )acceptor_boolean_value != 0U && (unsigned int )proposer_boolean_value != 0U) { } else { tmp___1 = iscsi_update_param_value(param, (char *)"No"); if (tmp___1 < 0) { return (-1); } else { } if ((unsigned int )proposer_boolean_value == 0U) { param->state = param->state | 32U; } else { } } } else if (((int )param->type & 2) != 0) { tmp___2 = strcmp((char const *)value, "Yes"); if (tmp___2 == 0) { proposer_boolean_value = 1U; } else { } tmp___3 = strcmp((char const *)param->value, "Yes"); if (tmp___3 == 0) { acceptor_boolean_value = 1U; } else { } if ((unsigned int )acceptor_boolean_value != 0U || (unsigned int )proposer_boolean_value != 0U) { tmp___4 = iscsi_update_param_value(param, (char *)"Yes"); if (tmp___4 < 0) { return (-1); } else { } if ((unsigned int )proposer_boolean_value != 0U) { param->state = param->state | 32U; } else { } } else { } } else if (((int )param->type & 4) != 0) { tmp___5 = simple_strtoul((char const *)param->value, & tmpptr, 0U); acceptor_value = (u32 )tmp___5; tmp___6 = simple_strtoul((char const *)value, & tmpptr, 0U); proposer_value = (u32 )tmp___6; memset((void *)(& buf), 0, 11UL); tmp___13 = strcmp((char const *)param->name, "MaxConnections"); if (tmp___13 == 0) { goto _L; } else { tmp___14 = strcmp((char const *)param->name, "MaxBurstLength"); if (tmp___14 == 0) { goto _L; } else { tmp___15 = strcmp((char const *)param->name, "FirstBurstLength"); if (tmp___15 == 0) { goto _L; } else { tmp___16 = strcmp((char const *)param->name, "MaxOutstandingR2T"); if (tmp___16 == 0) { goto _L; } else { tmp___17 = strcmp((char const *)param->name, "DefaultTime2Retain"); if (tmp___17 == 0) { goto _L; } else { tmp___18 = strcmp((char const *)param->name, "ErrorRecoveryLevel"); if (tmp___18 == 0) { _L: /* CIL Label */ if (proposer_value > acceptor_value) { sprintf((char *)(& buf), "%u", acceptor_value); tmp___7 = iscsi_update_param_value(param, (char *)(& buf)); if (tmp___7 < 0) { return (-1); } else { } } else { tmp___8 = iscsi_update_param_value(param, value); if (tmp___8 < 0) { return (-1); } else { } } } else { tmp___12 = strcmp((char const *)param->name, "DefaultTime2Wait"); if (tmp___12 == 0) { if (acceptor_value > proposer_value) { sprintf((char *)(& buf), "%u", acceptor_value); tmp___9 = iscsi_update_param_value(param, (char *)(& buf)); if (tmp___9 < 0) { return (-1); } else { } } else { tmp___10 = iscsi_update_param_value(param, value); if (tmp___10 < 0) { return (-1); } else { } } } else { tmp___11 = iscsi_update_param_value(param, value); if (tmp___11 < 0) { return (-1); } else { } } } } } } } } tmp___22 = strcmp((char const *)param->name, "MaxRecvDataSegmentLength"); if (tmp___22 == 0) { rc = kstrtoull((char const *)param->value, 0U, & tmp___19); if (rc < 0) { return (-1); } else { } (conn->conn_ops)->MaxRecvDataSegmentLength = (u32 )tmp___19; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_check_acceptor_state"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "Saving op->MaxRecvDataSegmentLength from original initiator received value: %u\n"; descriptor.lineno = 1054U; descriptor.flags = 0U; tmp___20 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___20 != 0L) { __dynamic_pr_debug(& descriptor, "Saving op->MaxRecvDataSegmentLength from original initiator received value: %u\n", (conn->conn_ops)->MaxRecvDataSegmentLength); } else { } param_mxdsl = iscsi_find_param_from_key((char *)"MaxXmitDataSegmentLength", conn->param_list); if ((unsigned long )param_mxdsl == (unsigned long )((struct iscsi_param *)0)) { return (-1); } else { } rc = iscsi_update_param_value(param, param_mxdsl->value); if (rc < 0) { return (-1); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_check_acceptor_state"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___0.format = "Updated %s to target MXDSL value: %s\n"; descriptor___0.lineno = 1068U; descriptor___0.flags = 0U; tmp___21 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___21 != 0L) { __dynamic_pr_debug(& descriptor___0, "Updated %s to target MXDSL value: %s\n", param->name, param->value); } else { } } else { } } else if (((int )param->type & 32) != 0) { negotiated_value = iscsi_check_valuelist_for_support(param, value); if ((unsigned long )negotiated_value == (unsigned long )((char *)0)) { printk("\vProposer\'s value list \"%s\" contains no valid values from Acceptor\'s value list \"%s\".\n", value, param->value); return (-1); } else { } tmp___23 = iscsi_update_param_value(param, negotiated_value); if (tmp___23 < 0) { return (-1); } else { } } else if (((int )param->phase & 4) != 0) { tmp___24 = iscsi_update_param_value(param, value); if (tmp___24 < 0) { return (-1); } else { } param->state = param->state | 32U; } else { } return (0); } } static int iscsi_check_proposer_state(struct iscsi_param *param , char *value ) { char *comma_ptr ; char *tmp_ptr ; int tmp ; { if ((param->state & 64U) != 0U) { printk("\vReceived key \"%s\" twice, protocol error.\n", param->name); return (-1); } else { } if (((int )param->type & 32) != 0) { comma_ptr = (char *)0; tmp_ptr = (char *)0; comma_ptr = strchr((char const *)value, 44); if ((unsigned long )comma_ptr != (unsigned long )((char *)0)) { printk("\vIllegal \",\" in response for \"%s\".\n", param->name); return (-1); } else { } tmp_ptr = iscsi_check_valuelist_for_support(param, value); if ((unsigned long )tmp_ptr == (unsigned long )((char *)0)) { return (-1); } else { } } else { } tmp = iscsi_update_param_value(param, value); if (tmp < 0) { return (-1); } else { } return (0); } } static int iscsi_check_value(struct iscsi_param *param , char *value ) { char *comma_ptr ; int tmp ; int tmp___0 ; int tmp___1 ; struct _ddebug descriptor ; long tmp___2 ; int tmp___3 ; int tmp___4 ; size_t tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; char *tmp___9 ; { comma_ptr = (char *)0; tmp___1 = strcmp((char const *)value, "Reject"); if (tmp___1 == 0) { tmp = strcmp((char const *)param->name, "IFMarkInt"); if (tmp == 0) { param->state = param->state | 16U; return (0); } else { tmp___0 = strcmp((char const *)param->name, "OFMarkInt"); if (tmp___0 == 0) { param->state = param->state | 16U; return (0); } else { } } printk("\vReceived %s=%s\n", param->name, value); return (-1); } else { } tmp___3 = strcmp((char const *)value, "Irrelevant"); if (tmp___3 == 0) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_check_value"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "Received %s=%s\n"; descriptor.lineno = 1137U; descriptor.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor, "Received %s=%s\n", param->name, value); } else { } param->state = param->state | 8U; return (0); } else { } tmp___4 = strcmp((char const *)value, "NotUnderstood"); if (tmp___4 == 0) { if ((param->state & 4U) == 0U) { printk("\vReceived illegal offer %s=%s\n", param->name, value); return (-1); } else { } printk("\vStandard iSCSI key \"%s\" cannot be answered with \"%s\", protocol error.\n", param->name, value); return (-1); } else { } ldv_57548: comma_ptr = (char *)0; comma_ptr = strchr((char const *)value, 44); if ((unsigned long )comma_ptr != (unsigned long )((char *)0) && ((int )param->type & 32) == 0) { printk("\vDetected value separator \",\", but key \"%s\" does not allow a value list, protocol error.\n", param->name); return (-1); } else { } if ((unsigned long )comma_ptr != (unsigned long )((char *)0)) { *comma_ptr = 0; } else { } tmp___5 = strlen((char const *)value); if (tmp___5 > 255UL) { printk("\vValue for key \"%s\" exceeds %d, protocol error.\n", param->name, 255); return (-1); } else { } if ((int )param->type & 1 || ((int )param->type & 2) != 0) { tmp___6 = iscsi_check_boolean_value(param, value); if (tmp___6 < 0) { return (-1); } else { } } else if (((int )param->type & 4) != 0) { tmp___7 = iscsi_check_numerical_value(param, value); if (tmp___7 < 0) { return (-1); } else { } } else if (((int )param->type & 16) != 0 || ((int )param->type & 32) != 0) { tmp___8 = iscsi_check_string_or_list_value(param, value); if (tmp___8 < 0) { return (-1); } else { } } else { printk("\vHuh? 0x%02x\n", (int )param->type); return (-1); } if ((unsigned long )comma_ptr != (unsigned long )((char *)0)) { tmp___9 = comma_ptr; comma_ptr = comma_ptr + 1; *tmp___9 = 44; } else { } value = comma_ptr; if ((unsigned long )value != (unsigned long )((char *)0)) { goto ldv_57548; } else { } return (0); } } static struct iscsi_param *__iscsi_check_key(char *key , int sender , struct iscsi_param_list *param_list ) { struct iscsi_param *param ; size_t tmp ; { tmp = strlen((char const *)key); if (tmp > 64UL) { printk("\vLength of key name \"%s\" exceeds %d.\n", key, 64); return ((struct iscsi_param *)0); } else { } param = iscsi_find_param_from_key(key, param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { return ((struct iscsi_param *)0); } else { } if (sender & 1 && ((int )param->sender & 1) == 0) { printk("\vKey \"%s\" may not be sent to %s, protocol error.\n", param->name, (sender & 4) != 0 ? (char *)"target" : (char *)"initiator"); return ((struct iscsi_param *)0); } else { } if ((sender & 2) != 0 && ((int )param->sender & 2) == 0) { printk("\vKey \"%s\" may not be sent to %s, protocol error.\n", param->name, (sender & 4) != 0 ? (char *)"initiator" : (char *)"target"); return ((struct iscsi_param *)0); } else { } return (param); } } static struct iscsi_param *iscsi_check_key(char *key , int phase , int sender , struct iscsi_param_list *param_list ) { struct iscsi_param *param ; size_t tmp ; struct _ddebug descriptor ; long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; { tmp = strlen((char const *)key); if (tmp > 64UL) { printk("\vLength of key name \"%s\" exceeds %d.\n", key, 64); return ((struct iscsi_param *)0); } else { } param = iscsi_find_param_from_key(key, param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { return ((struct iscsi_param *)0); } else { } if (sender & 1 && ((int )param->sender & 1) == 0) { printk("\vKey \"%s\" may not be sent to %s, protocol error.\n", param->name, (sender & 4) != 0 ? (char *)"target" : (char *)"initiator"); return ((struct iscsi_param *)0); } else { } if ((sender & 2) != 0 && ((int )param->sender & 2) == 0) { printk("\vKey \"%s\" may not be sent to %s, protocol error.\n", param->name, (sender & 4) != 0 ? (char *)"initiator" : (char *)"target"); return ((struct iscsi_param *)0); } else { } if ((int )param->state & 1) { printk("\vKey \"%s\" received twice, protocol error.\n", key); return ((struct iscsi_param *)0); } else { } if (phase == 0) { return (param); } else { } if (((int )param->phase & phase) == 0) { printk("\vKey \"%s\" may not be negotiated during ", param->name); switch (phase) { case 1: descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_check_key"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "Security phase.\n"; descriptor.lineno = 1278U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Security phase.\n"); } else { } goto ldv_57566; case 2: descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_check_key"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___0.format = "Operational phase.\n"; descriptor___0.lineno = 1281U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___0, "Operational phase.\n"); } else { } goto ldv_57566; default: descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_check_key"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___1.format = "Unknown phase.\n"; descriptor___1.lineno = 1284U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___1, "Unknown phase.\n"); } else { } } ldv_57566: ; return ((struct iscsi_param *)0); } else { } return (param); } } static int iscsi_enforce_integrity_rules(u8 phase , struct iscsi_param_list *param_list ) { char *tmpptr ; u8 DataSequenceInOrder ; u8 ErrorRecoveryLevel ; u8 SessionType ; u32 FirstBurstLength ; u32 MaxBurstLength ; struct iscsi_param *param ; struct list_head const *__mptr ; int tmp ; int tmp___0 ; unsigned long tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; unsigned long tmp___5 ; int tmp___6 ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; int tmp___7 ; struct _ddebug descriptor ; long tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; struct _ddebug descriptor___0 ; long tmp___12 ; int tmp___13 ; int tmp___14 ; unsigned long tmp___15 ; char tmpbuf[11U] ; int tmp___16 ; struct _ddebug descriptor___1 ; long tmp___17 ; int tmp___18 ; struct list_head const *__mptr___2 ; { DataSequenceInOrder = 0U; ErrorRecoveryLevel = 0U; SessionType = 0U; FirstBurstLength = 0U; MaxBurstLength = 0U; param = (struct iscsi_param *)0; __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57588; ldv_57587: ; if ((unsigned int )((int )param->phase & (int )phase) == 0U) { goto ldv_57586; } else { } tmp___0 = strcmp((char const *)param->name, "SessionType"); if (tmp___0 == 0) { tmp = strcmp((char const *)param->value, "Normal"); if (tmp == 0) { SessionType = 1U; } else { } } else { } tmp___2 = strcmp((char const *)param->name, "ErrorRecoveryLevel"); if (tmp___2 == 0) { tmp___1 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ErrorRecoveryLevel = (u8 )tmp___1; } else { } tmp___4 = strcmp((char const *)param->name, "DataSequenceInOrder"); if (tmp___4 == 0) { tmp___3 = strcmp((char const *)param->value, "Yes"); if (tmp___3 == 0) { DataSequenceInOrder = 1U; } else { } } else { } tmp___6 = strcmp((char const *)param->name, "MaxBurstLength"); if (tmp___6 == 0) { tmp___5 = simple_strtoul((char const *)param->value, & tmpptr, 0U); MaxBurstLength = (u32 )tmp___5; } else { } ldv_57586: __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57588: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57587; } else { } __mptr___1 = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr___1 + 0xffffffffffffffe0UL; goto ldv_57601; ldv_57600: ; if ((unsigned int )((int )param->phase & (int )phase) == 0U) { goto ldv_57594; } else { } if ((unsigned int )SessionType == 0U && (param->state & 1U) == 0U) { goto ldv_57594; } else { } tmp___10 = strcmp((char const *)param->name, "MaxOutstandingR2T"); if ((tmp___10 == 0 && (unsigned int )DataSequenceInOrder != 0U) && (unsigned int )ErrorRecoveryLevel != 0U) { tmp___9 = strcmp((char const *)param->value, "1"); if (tmp___9 != 0) { tmp___7 = iscsi_update_param_value(param, (char *)"1"); if (tmp___7 < 0) { return (-1); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_enforce_integrity_rules"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "Reset \"%s\" to \"%s\".\n"; descriptor.lineno = 1330U; descriptor.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___8 != 0L) { __dynamic_pr_debug(& descriptor, "Reset \"%s\" to \"%s\".\n", param->name, param->value); } else { } } else { } } else { } tmp___14 = strcmp((char const *)param->name, "MaxConnections"); if (tmp___14 == 0 && (unsigned int )SessionType == 0U) { tmp___13 = strcmp((char const *)param->value, "1"); if (tmp___13 != 0) { tmp___11 = iscsi_update_param_value(param, (char *)"1"); if (tmp___11 < 0) { return (-1); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_enforce_integrity_rules"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___0.format = "Reset \"%s\" to \"%s\".\n"; descriptor___0.lineno = 1338U; descriptor___0.flags = 0U; tmp___12 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___12 != 0L) { __dynamic_pr_debug(& descriptor___0, "Reset \"%s\" to \"%s\".\n", param->name, param->value); } else { } } else { } } else { } tmp___18 = strcmp((char const *)param->name, "FirstBurstLength"); if (tmp___18 == 0) { tmp___15 = simple_strtoul((char const *)param->value, & tmpptr, 0U); FirstBurstLength = (u32 )tmp___15; if (FirstBurstLength > MaxBurstLength) { memset((void *)(& tmpbuf), 0, 11UL); sprintf((char *)(& tmpbuf), "%u", MaxBurstLength); tmp___16 = iscsi_update_param_value(param, (char *)(& tmpbuf)); if (tmp___16 != 0) { return (-1); } else { } descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_enforce_integrity_rules"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___1.format = "Reset \"%s\" to \"%s\".\n"; descriptor___1.lineno = 1351U; descriptor___1.flags = 0U; tmp___17 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___17 != 0L) { __dynamic_pr_debug(& descriptor___1, "Reset \"%s\" to \"%s\".\n", param->name, param->value); } else { } } else { } } else { } ldv_57594: __mptr___2 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___2 + 0xffffffffffffffe0UL; ldv_57601: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57600; } else { } return (0); } } int iscsi_decode_text_input(u8 phase , u8 sender , char *textbuf , u32 length , struct iscsi_conn *conn ) { struct iscsi_param_list *param_list ; char *tmpbuf ; char *start ; char *end ; void *tmp ; char *key ; char *value ; struct iscsi_param *param ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; int tmp___3 ; size_t tmp___4 ; size_t tmp___5 ; int tmp___6 ; size_t tmp___7 ; size_t tmp___8 ; int tmp___9 ; int tmp___10 ; { param_list = conn->param_list; start = (char *)0; end = (char *)0; tmp = kzalloc((size_t )(length + 1U), 208U); tmpbuf = (char *)tmp; if ((unsigned long )tmpbuf == (unsigned long )((char *)0)) { printk("\vUnable to allocate %u + 1 bytes for tmpbuf.\n", length); return (-1); } else { } memcpy((void *)tmpbuf, (void const *)textbuf, (size_t )length); *(tmpbuf + (unsigned long )length) = 0; start = tmpbuf; end = start + (unsigned long )length; goto ldv_57619; ldv_57620: tmp___0 = iscsi_extract_key_value(start, & key, & value); if (tmp___0 < 0) { kfree((void const *)tmpbuf); return (-1); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_decode_text_input"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "Got key: %s=%s\n"; descriptor.lineno = 1389U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Got key: %s=%s\n", key, value); } else { } if ((int )phase & 1) { tmp___2 = iscsi_check_for_auth_key(key); if (tmp___2 > 0) { kfree((void const *)tmpbuf); return (1); } else { } } else { } param = iscsi_check_key(key, (int )phase, (int )sender, param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { tmp___3 = iscsi_add_notunderstood_response(key, value, param_list); if (tmp___3 < 0) { kfree((void const *)tmpbuf); return (-1); } else { } tmp___4 = strlen((char const *)key); tmp___5 = strlen((char const *)value); start = start + ((tmp___4 + tmp___5) + 2UL); goto ldv_57619; } else { } tmp___6 = iscsi_check_value(param, value); if (tmp___6 < 0) { kfree((void const *)tmpbuf); return (-1); } else { } tmp___7 = strlen((char const *)key); tmp___8 = strlen((char const *)value); start = start + ((tmp___7 + tmp___8) + 2UL); if ((param->state & 4U) != 0U) { tmp___9 = iscsi_check_proposer_state(param, value); if (tmp___9 < 0) { kfree((void const *)tmpbuf); return (-1); } else { } param->state = param->state | 64U; } else { tmp___10 = iscsi_check_acceptor_state(param, value, conn); if (tmp___10 < 0) { kfree((void const *)tmpbuf); return (-1); } else { } param->state = param->state | 1U; } ldv_57619: ; if ((unsigned long )start < (unsigned long )end) { goto ldv_57620; } else { } kfree((void const *)tmpbuf); return (0); } } int iscsi_encode_text_output(u8 phase , u8 sender , char *textbuf , u32 *length , struct iscsi_param_list *param_list ) { char *output_buf ; struct iscsi_extra_response *er ; struct iscsi_param *param ; int tmp ; struct list_head const *__mptr ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; struct _ddebug descriptor___0 ; long tmp___3 ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; int tmp___4 ; struct _ddebug descriptor___1 ; long tmp___5 ; struct list_head const *__mptr___2 ; { output_buf = (char *)0; output_buf = textbuf + (unsigned long )*length; tmp = iscsi_enforce_integrity_rules((int )phase, param_list); if (tmp < 0) { return (-1); } else { } __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57641; ldv_57640: ; if ((unsigned int )((int )param->sender & (int )sender) == 0U) { goto ldv_57636; } else { } if ((((int )param->state & 1 && (param->state & 128U) == 0U) && (param->state & 32U) == 0U) && (unsigned int )((int )param->phase & (int )phase) != 0U) { tmp___0 = sprintf(output_buf, "%s=%s", param->name, param->value); *length = *length + (u32 )tmp___0; *length = *length + 1U; output_buf = textbuf + (unsigned long )*length; param->state = param->state | 128U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_encode_text_output"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "Sending key: %s=%s\n"; descriptor.lineno = 1463U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Sending key: %s=%s\n", param->name, param->value); } else { } goto ldv_57636; } else { } if ((((param->state & 2U) != 0U && (param->state & 1U) == 0U) && (param->state & 4U) == 0U) && (unsigned int )((int )param->phase & (int )phase) != 0U) { tmp___2 = sprintf(output_buf, "%s=%s", param->name, param->value); *length = *length + (u32 )tmp___2; *length = *length + 1U; output_buf = textbuf + (unsigned long )*length; param->state = param->state | 4U; iscsi_check_proposer_for_optional_reply(param); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_encode_text_output"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___0.format = "Sending key: %s=%s\n"; descriptor___0.lineno = 1477U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___0, "Sending key: %s=%s\n", param->name, param->value); } else { } } else { } ldv_57636: __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57641: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57640; } else { } __mptr___1 = (struct list_head const *)param_list->extra_response_list.next; er = (struct iscsi_extra_response *)__mptr___1 + 0xffffffffffffffa0UL; goto ldv_57649; ldv_57648: tmp___4 = sprintf(output_buf, "%s=%s", (char *)(& er->key), (char *)(& er->value)); *length = *length + (u32 )tmp___4; *length = *length + 1U; output_buf = textbuf + (unsigned long )*length; descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_encode_text_output"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___1.format = "Sending key: %s=%s\n"; descriptor___1.lineno = 1485U; descriptor___1.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___1, "Sending key: %s=%s\n", (char *)(& er->key), (char *)(& er->value)); } else { } __mptr___2 = (struct list_head const *)er->er_list.next; er = (struct iscsi_extra_response *)__mptr___2 + 0xffffffffffffffa0UL; ldv_57649: ; if ((unsigned long )(& er->er_list) != (unsigned long )(& param_list->extra_response_list)) { goto ldv_57648; } else { } iscsi_release_extra_responses(param_list); return (0); } } int iscsi_check_negotiated_keys(struct iscsi_param_list *param_list ) { int ret ; struct iscsi_param *param ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { ret = 0; __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57661; ldv_57660: ; if (((((param->state & 2U) != 0U && (param->state & 4U) != 0U) && (param->state & 64U) == 0U) && (param->state & 32U) == 0U) && ((int )param->phase & 4) == 0) { printk("\vNo response for proposed key \"%s\".\n", param->name); ret = -1; } else { } __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57661: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57660; } else { } return (ret); } } int iscsi_change_param_value(char *keyvalue , struct iscsi_param_list *param_list , int check_key ) { char *key ; char *value ; struct iscsi_param *param ; int sender ; int tmp ; int tmp___0 ; int tmp___1 ; { key = (char *)0; value = (char *)0; sender = 0; tmp = iscsi_extract_key_value(keyvalue, & key, & value); if (tmp < 0) { return (-1); } else { } if (check_key == 0) { param = __iscsi_check_key(keyvalue, sender, param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { return (-1); } else { } } else { param = iscsi_check_key(keyvalue, 0, sender, param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { return (-1); } else { } param->set_param = 1U; tmp___0 = iscsi_check_value(param, value); if (tmp___0 < 0) { param->set_param = 0U; return (-1); } else { } param->set_param = 0U; } tmp___1 = iscsi_update_param_value(param, value); if (tmp___1 < 0) { return (-1); } else { } return (0); } } void iscsi_set_connection_parameters(struct iscsi_conn_ops *ops , struct iscsi_param_list *param_list ) { char *tmpptr ; struct iscsi_param *param ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr ; unsigned long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; int tmp___2 ; struct _ddebug descriptor___1 ; long tmp___3 ; int tmp___4 ; struct _ddebug descriptor___2 ; long tmp___5 ; int tmp___6 ; struct _ddebug descriptor___3 ; long tmp___7 ; struct _ddebug descriptor___4 ; long tmp___8 ; unsigned long tmp___9 ; struct _ddebug descriptor___5 ; long tmp___10 ; struct _ddebug descriptor___6 ; long tmp___11 ; unsigned long tmp___12 ; struct _ddebug descriptor___7 ; long tmp___13 ; struct _ddebug descriptor___8 ; long tmp___14 ; int tmp___15 ; int tmp___16 ; int tmp___17 ; int tmp___18 ; int tmp___19 ; int tmp___20 ; struct list_head const *__mptr___0 ; struct _ddebug descriptor___9 ; long tmp___21 ; { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_set_connection_parameters"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "------------------------------------------------------------------\n"; descriptor.lineno = 1555U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "------------------------------------------------------------------\n"); } else { } __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57695; ldv_57694: tmp___2 = strcmp((char const *)param->name, "MaxXmitDataSegmentLength"); if (tmp___2 == 0) { tmp___0 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->MaxXmitDataSegmentLength = (u32 )tmp___0; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_set_connection_parameters"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___0.format = "MaxXmitDataSegmentLength: %s\n"; descriptor___0.lineno = 1566U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___0, "MaxXmitDataSegmentLength: %s\n", param->value); } else { } } else { } if ((param->state & 1U) == 0U && (param->state & 4U) == 0U) { goto ldv_57685; } else { } tmp___20 = strcmp((char const *)param->name, "AuthMethod"); if (tmp___20 == 0) { descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_set_connection_parameters"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___1.format = "AuthMethod: %s\n"; descriptor___1.lineno = 1573U; descriptor___1.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___1, "AuthMethod: %s\n", param->value); } else { } } else { tmp___19 = strcmp((char const *)param->name, "HeaderDigest"); if (tmp___19 == 0) { tmp___4 = strcmp((char const *)param->value, "CRC32C"); ops->HeaderDigest = tmp___4 == 0; descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsi_set_connection_parameters"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___2.format = "HeaderDigest: %s\n"; descriptor___2.lineno = 1577U; descriptor___2.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___2, "HeaderDigest: %s\n", param->value); } else { } } else { tmp___18 = strcmp((char const *)param->name, "DataDigest"); if (tmp___18 == 0) { tmp___6 = strcmp((char const *)param->value, "CRC32C"); ops->DataDigest = tmp___6 == 0; descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsi_set_connection_parameters"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___3.format = "DataDigest: %s\n"; descriptor___3.lineno = 1581U; descriptor___3.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___7 != 0L) { __dynamic_pr_debug(& descriptor___3, "DataDigest: %s\n", param->value); } else { } } else { tmp___17 = strcmp((char const *)param->name, "MaxRecvDataSegmentLength"); if (tmp___17 == 0) { descriptor___4.modname = "iscsi_target_mod"; descriptor___4.function = "iscsi_set_connection_parameters"; descriptor___4.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___4.format = "MaxRecvDataSegmentLength: %u\n"; descriptor___4.lineno = 1589U; descriptor___4.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); if (tmp___8 != 0L) { __dynamic_pr_debug(& descriptor___4, "MaxRecvDataSegmentLength: %u\n", ops->MaxRecvDataSegmentLength); } else { } } else { tmp___16 = strcmp((char const *)param->name, "InitiatorRecvDataSegmentLength"); if (tmp___16 == 0) { tmp___9 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->InitiatorRecvDataSegmentLength = (u32 )tmp___9; descriptor___5.modname = "iscsi_target_mod"; descriptor___5.function = "iscsi_set_connection_parameters"; descriptor___5.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___5.format = "InitiatorRecvDataSegmentLength: %s\n"; descriptor___5.lineno = 1594U; descriptor___5.flags = 0U; tmp___10 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); if (tmp___10 != 0L) { __dynamic_pr_debug(& descriptor___5, "InitiatorRecvDataSegmentLength: %s\n", param->value); } else { } ops->MaxRecvDataSegmentLength = ops->InitiatorRecvDataSegmentLength; descriptor___6.modname = "iscsi_target_mod"; descriptor___6.function = "iscsi_set_connection_parameters"; descriptor___6.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___6.format = "Set MRDSL from InitiatorRecvDataSegmentLength\n"; descriptor___6.lineno = 1597U; descriptor___6.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); if (tmp___11 != 0L) { __dynamic_pr_debug(& descriptor___6, "Set MRDSL from InitiatorRecvDataSegmentLength\n"); } else { } } else { tmp___15 = strcmp((char const *)param->name, "TargetRecvDataSegmentLength"); if (tmp___15 == 0) { tmp___12 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->TargetRecvDataSegmentLength = (u32 )tmp___12; descriptor___7.modname = "iscsi_target_mod"; descriptor___7.function = "iscsi_set_connection_parameters"; descriptor___7.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___7.format = "TargetRecvDataSegmentLength: %s\n"; descriptor___7.lineno = 1602U; descriptor___7.flags = 0U; tmp___13 = ldv__builtin_expect((long )descriptor___7.flags & 1L, 0L); if (tmp___13 != 0L) { __dynamic_pr_debug(& descriptor___7, "TargetRecvDataSegmentLength: %s\n", param->value); } else { } ops->MaxXmitDataSegmentLength = ops->TargetRecvDataSegmentLength; descriptor___8.modname = "iscsi_target_mod"; descriptor___8.function = "iscsi_set_connection_parameters"; descriptor___8.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___8.format = "Set MXDSL from TargetRecvDataSegmentLength\n"; descriptor___8.lineno = 1605U; descriptor___8.flags = 0U; tmp___14 = ldv__builtin_expect((long )descriptor___8.flags & 1L, 0L); if (tmp___14 != 0L) { __dynamic_pr_debug(& descriptor___8, "Set MXDSL from TargetRecvDataSegmentLength\n"); } else { } } else { } } } } } } ldv_57685: __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57695: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57694; } else { } descriptor___9.modname = "iscsi_target_mod"; descriptor___9.function = "iscsi_set_connection_parameters"; descriptor___9.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___9.format = "------------------------------------------------------------------\n"; descriptor___9.lineno = 1609U; descriptor___9.flags = 0U; tmp___21 = ldv__builtin_expect((long )descriptor___9.flags & 1L, 0L); if (tmp___21 != 0L) { __dynamic_pr_debug(& descriptor___9, "------------------------------------------------------------------\n"); } else { } return; } } void iscsi_set_session_parameters(struct iscsi_sess_ops *ops , struct iscsi_param_list *param_list , int leading ) { char *tmpptr ; struct iscsi_param *param ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; struct _ddebug descriptor___3 ; long tmp___3 ; unsigned long tmp___4 ; struct _ddebug descriptor___4 ; long tmp___5 ; unsigned long tmp___6 ; struct _ddebug descriptor___5 ; long tmp___7 ; int tmp___8 ; struct _ddebug descriptor___6 ; long tmp___9 ; int tmp___10 ; struct _ddebug descriptor___7 ; long tmp___11 ; unsigned long tmp___12 ; struct _ddebug descriptor___8 ; long tmp___13 ; unsigned long tmp___14 ; struct _ddebug descriptor___9 ; long tmp___15 ; unsigned long tmp___16 ; struct _ddebug descriptor___10 ; long tmp___17 ; unsigned long tmp___18 ; struct _ddebug descriptor___11 ; long tmp___19 ; unsigned long tmp___20 ; struct _ddebug descriptor___12 ; long tmp___21 ; int tmp___22 ; struct _ddebug descriptor___13 ; long tmp___23 ; int tmp___24 ; struct _ddebug descriptor___14 ; long tmp___25 ; unsigned long tmp___26 ; struct _ddebug descriptor___15 ; long tmp___27 ; int tmp___28 ; struct _ddebug descriptor___16 ; long tmp___29 ; int tmp___30 ; struct _ddebug descriptor___17 ; long tmp___31 ; int tmp___32 ; int tmp___33 ; int tmp___34 ; int tmp___35 ; int tmp___36 ; int tmp___37 ; int tmp___38 ; int tmp___39 ; int tmp___40 ; int tmp___41 ; int tmp___42 ; int tmp___43 ; int tmp___44 ; int tmp___45 ; int tmp___46 ; int tmp___47 ; int tmp___48 ; int tmp___49 ; struct list_head const *__mptr___0 ; struct _ddebug descriptor___18 ; long tmp___50 ; { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_set_session_parameters"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor.format = "------------------------------------------------------------------\n"; descriptor.lineno = 1621U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "------------------------------------------------------------------\n"); } else { } __mptr = (struct list_head const *)param_list->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_57731; ldv_57730: ; if ((param->state & 1U) == 0U && (param->state & 4U) == 0U) { goto ldv_57711; } else { } tmp___49 = strcmp((char const *)param->name, "InitiatorName"); if (tmp___49 == 0) { if ((unsigned long )param->value == (unsigned long )((char *)0)) { goto ldv_57711; } else { } if (leading != 0) { snprintf((char *)(& ops->InitiatorName), 224UL, "%s", param->value); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_set_session_parameters"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___0.format = "InitiatorName: %s\n"; descriptor___0.lineno = 1633U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "InitiatorName: %s\n", param->value); } else { } } else { tmp___48 = strcmp((char const *)param->name, "InitiatorAlias"); if (tmp___48 == 0) { if ((unsigned long )param->value == (unsigned long )((char *)0)) { goto ldv_57711; } else { } snprintf((char *)(& ops->InitiatorAlias), 256UL, "%s", param->value); descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_set_session_parameters"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___1.format = "InitiatorAlias: %s\n"; descriptor___1.lineno = 1641U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___1, "InitiatorAlias: %s\n", param->value); } else { } } else { tmp___47 = strcmp((char const *)param->name, "TargetName"); if (tmp___47 == 0) { if ((unsigned long )param->value == (unsigned long )((char *)0)) { goto ldv_57711; } else { } if (leading != 0) { snprintf((char *)(& ops->TargetName), 224UL, "%s", param->value); } else { } descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsi_set_session_parameters"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___2.format = "TargetName: %s\n"; descriptor___2.lineno = 1650U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___2, "TargetName: %s\n", param->value); } else { } } else { tmp___46 = strcmp((char const *)param->name, "TargetAlias"); if (tmp___46 == 0) { if ((unsigned long )param->value == (unsigned long )((char *)0)) { goto ldv_57711; } else { } snprintf((char *)(& ops->TargetAlias), 256UL, "%s", param->value); descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsi_set_session_parameters"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___3.format = "TargetAlias: %s\n"; descriptor___3.lineno = 1657U; descriptor___3.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___3, "TargetAlias: %s\n", param->value); } else { } } else { tmp___45 = strcmp((char const *)param->name, "TargetPortalGroupTag"); if (tmp___45 == 0) { tmp___4 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->TargetPortalGroupTag = (u16 )tmp___4; descriptor___4.modname = "iscsi_target_mod"; descriptor___4.function = "iscsi_set_session_parameters"; descriptor___4.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___4.format = "TargetPortalGroupTag: %s\n"; descriptor___4.lineno = 1662U; descriptor___4.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___4, "TargetPortalGroupTag: %s\n", param->value); } else { } } else { tmp___44 = strcmp((char const *)param->name, "MaxConnections"); if (tmp___44 == 0) { tmp___6 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->MaxConnections = (u16 )tmp___6; descriptor___5.modname = "iscsi_target_mod"; descriptor___5.function = "iscsi_set_session_parameters"; descriptor___5.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___5.format = "MaxConnections: %s\n"; descriptor___5.lineno = 1667U; descriptor___5.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); if (tmp___7 != 0L) { __dynamic_pr_debug(& descriptor___5, "MaxConnections: %s\n", param->value); } else { } } else { tmp___43 = strcmp((char const *)param->name, "InitialR2T"); if (tmp___43 == 0) { tmp___8 = strcmp((char const *)param->value, "Yes"); ops->InitialR2T = tmp___8 == 0; descriptor___6.modname = "iscsi_target_mod"; descriptor___6.function = "iscsi_set_session_parameters"; descriptor___6.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___6.format = "InitialR2T: %s\n"; descriptor___6.lineno = 1671U; descriptor___6.flags = 0U; tmp___9 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); if (tmp___9 != 0L) { __dynamic_pr_debug(& descriptor___6, "InitialR2T: %s\n", param->value); } else { } } else { tmp___42 = strcmp((char const *)param->name, "ImmediateData"); if (tmp___42 == 0) { tmp___10 = strcmp((char const *)param->value, "Yes"); ops->ImmediateData = tmp___10 == 0; descriptor___7.modname = "iscsi_target_mod"; descriptor___7.function = "iscsi_set_session_parameters"; descriptor___7.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___7.format = "ImmediateData: %s\n"; descriptor___7.lineno = 1675U; descriptor___7.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___7.flags & 1L, 0L); if (tmp___11 != 0L) { __dynamic_pr_debug(& descriptor___7, "ImmediateData: %s\n", param->value); } else { } } else { tmp___41 = strcmp((char const *)param->name, "MaxBurstLength"); if (tmp___41 == 0) { tmp___12 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->MaxBurstLength = (u32 )tmp___12; descriptor___8.modname = "iscsi_target_mod"; descriptor___8.function = "iscsi_set_session_parameters"; descriptor___8.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___8.format = "MaxBurstLength: %s\n"; descriptor___8.lineno = 1680U; descriptor___8.flags = 0U; tmp___13 = ldv__builtin_expect((long )descriptor___8.flags & 1L, 0L); if (tmp___13 != 0L) { __dynamic_pr_debug(& descriptor___8, "MaxBurstLength: %s\n", param->value); } else { } } else { tmp___40 = strcmp((char const *)param->name, "FirstBurstLength"); if (tmp___40 == 0) { tmp___14 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->FirstBurstLength = (u32 )tmp___14; descriptor___9.modname = "iscsi_target_mod"; descriptor___9.function = "iscsi_set_session_parameters"; descriptor___9.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___9.format = "FirstBurstLength: %s\n"; descriptor___9.lineno = 1685U; descriptor___9.flags = 0U; tmp___15 = ldv__builtin_expect((long )descriptor___9.flags & 1L, 0L); if (tmp___15 != 0L) { __dynamic_pr_debug(& descriptor___9, "FirstBurstLength: %s\n", param->value); } else { } } else { tmp___39 = strcmp((char const *)param->name, "DefaultTime2Wait"); if (tmp___39 == 0) { tmp___16 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->DefaultTime2Wait = (u16 )tmp___16; descriptor___10.modname = "iscsi_target_mod"; descriptor___10.function = "iscsi_set_session_parameters"; descriptor___10.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___10.format = "DefaultTime2Wait: %s\n"; descriptor___10.lineno = 1690U; descriptor___10.flags = 0U; tmp___17 = ldv__builtin_expect((long )descriptor___10.flags & 1L, 0L); if (tmp___17 != 0L) { __dynamic_pr_debug(& descriptor___10, "DefaultTime2Wait: %s\n", param->value); } else { } } else { tmp___38 = strcmp((char const *)param->name, "DefaultTime2Retain"); if (tmp___38 == 0) { tmp___18 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->DefaultTime2Retain = (u16 )tmp___18; descriptor___11.modname = "iscsi_target_mod"; descriptor___11.function = "iscsi_set_session_parameters"; descriptor___11.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___11.format = "DefaultTime2Retain: %s\n"; descriptor___11.lineno = 1695U; descriptor___11.flags = 0U; tmp___19 = ldv__builtin_expect((long )descriptor___11.flags & 1L, 0L); if (tmp___19 != 0L) { __dynamic_pr_debug(& descriptor___11, "DefaultTime2Retain: %s\n", param->value); } else { } } else { tmp___37 = strcmp((char const *)param->name, "MaxOutstandingR2T"); if (tmp___37 == 0) { tmp___20 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->MaxOutstandingR2T = (u16 )tmp___20; descriptor___12.modname = "iscsi_target_mod"; descriptor___12.function = "iscsi_set_session_parameters"; descriptor___12.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___12.format = "MaxOutstandingR2T: %s\n"; descriptor___12.lineno = 1700U; descriptor___12.flags = 0U; tmp___21 = ldv__builtin_expect((long )descriptor___12.flags & 1L, 0L); if (tmp___21 != 0L) { __dynamic_pr_debug(& descriptor___12, "MaxOutstandingR2T: %s\n", param->value); } else { } } else { tmp___36 = strcmp((char const *)param->name, "DataPDUInOrder"); if (tmp___36 == 0) { tmp___22 = strcmp((char const *)param->value, "Yes"); ops->DataPDUInOrder = tmp___22 == 0; descriptor___13.modname = "iscsi_target_mod"; descriptor___13.function = "iscsi_set_session_parameters"; descriptor___13.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___13.format = "DataPDUInOrder: %s\n"; descriptor___13.lineno = 1704U; descriptor___13.flags = 0U; tmp___23 = ldv__builtin_expect((long )descriptor___13.flags & 1L, 0L); if (tmp___23 != 0L) { __dynamic_pr_debug(& descriptor___13, "DataPDUInOrder: %s\n", param->value); } else { } } else { tmp___35 = strcmp((char const *)param->name, "DataSequenceInOrder"); if (tmp___35 == 0) { tmp___24 = strcmp((char const *)param->value, "Yes"); ops->DataSequenceInOrder = tmp___24 == 0; descriptor___14.modname = "iscsi_target_mod"; descriptor___14.function = "iscsi_set_session_parameters"; descriptor___14.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___14.format = "DataSequenceInOrder: %s\n"; descriptor___14.lineno = 1708U; descriptor___14.flags = 0U; tmp___25 = ldv__builtin_expect((long )descriptor___14.flags & 1L, 0L); if (tmp___25 != 0L) { __dynamic_pr_debug(& descriptor___14, "DataSequenceInOrder: %s\n", param->value); } else { } } else { tmp___34 = strcmp((char const *)param->name, "ErrorRecoveryLevel"); if (tmp___34 == 0) { tmp___26 = simple_strtoul((char const *)param->value, & tmpptr, 0U); ops->ErrorRecoveryLevel = (u8 )tmp___26; descriptor___15.modname = "iscsi_target_mod"; descriptor___15.function = "iscsi_set_session_parameters"; descriptor___15.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___15.format = "ErrorRecoveryLevel: %s\n"; descriptor___15.lineno = 1713U; descriptor___15.flags = 0U; tmp___27 = ldv__builtin_expect((long )descriptor___15.flags & 1L, 0L); if (tmp___27 != 0L) { __dynamic_pr_debug(& descriptor___15, "ErrorRecoveryLevel: %s\n", param->value); } else { } } else { tmp___33 = strcmp((char const *)param->name, "SessionType"); if (tmp___33 == 0) { tmp___28 = strcmp((char const *)param->value, "Discovery"); ops->SessionType = tmp___28 == 0; descriptor___16.modname = "iscsi_target_mod"; descriptor___16.function = "iscsi_set_session_parameters"; descriptor___16.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___16.format = "SessionType: %s\n"; descriptor___16.lineno = 1717U; descriptor___16.flags = 0U; tmp___29 = ldv__builtin_expect((long )descriptor___16.flags & 1L, 0L); if (tmp___29 != 0L) { __dynamic_pr_debug(& descriptor___16, "SessionType: %s\n", param->value); } else { } } else { tmp___32 = strcmp((char const *)param->name, "RDMAExtensions"); if (tmp___32 == 0) { tmp___30 = strcmp((char const *)param->value, "Yes"); ops->RDMAExtensions = tmp___30 == 0; descriptor___17.modname = "iscsi_target_mod"; descriptor___17.function = "iscsi_set_session_parameters"; descriptor___17.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___17.format = "RDMAExtensions: %s\n"; descriptor___17.lineno = 1721U; descriptor___17.flags = 0U; tmp___31 = ldv__builtin_expect((long )descriptor___17.flags & 1L, 0L); if (tmp___31 != 0L) { __dynamic_pr_debug(& descriptor___17, "RDMAExtensions: %s\n", param->value); } else { } } else { } } } } } } } } } } } } } } } } } } ldv_57711: __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_57731: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& param_list->param_list)) { goto ldv_57730; } else { } descriptor___18.modname = "iscsi_target_mod"; descriptor___18.function = "iscsi_set_session_parameters"; descriptor___18.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_parameters.c"; descriptor___18.format = "------------------------------------------------------------------\n"; descriptor___18.lineno = 1725U; descriptor___18.flags = 0U; tmp___50 = ldv__builtin_expect((long )descriptor___18.flags & 1L, 0L); if (tmp___50 != 0L) { __dynamic_pr_debug(& descriptor___18, "------------------------------------------------------------------\n"); } else { } return; } } bool ldv_queue_work_on_5(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_6(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_7(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_8(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_9(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_10(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_11(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_12(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_13(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_14(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_15(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_16(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; int ldv_mutex_trylock_41(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_39(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_42(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_43(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_38(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_40(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_44(struct mutex *ldv_func_arg1 ) ; bool ldv_queue_work_on_33(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_35(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_34(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_37(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_36(struct workqueue_struct *ldv_func_arg1 ) ; __inline static void *kmalloc_array(size_t n , size_t size , gfp_t flags ) { void *tmp ; { if (size != 0UL && 0xffffffffffffffffUL / size < n) { return ((void *)0); } else { } tmp = __kmalloc(n * size, flags); return (tmp); } } __inline static void *kcalloc(size_t n , size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc_array(n, size, flags | 32768U); return (tmp); } } extern void get_random_bytes(void * , int ) ; struct iscsi_node_attrib *iscsit_tpg_get_node_attrib(struct iscsi_session *sess ) ; int iscsit_build_pdu_and_seq_lists(struct iscsi_cmd *cmd , u32 immediate_data_length ) ; struct iscsi_pdu *iscsit_get_pdu_holder(struct iscsi_cmd *cmd , u32 offset , u32 length ) ; struct iscsi_pdu *iscsit_get_pdu_holder_for_seq(struct iscsi_cmd *cmd , struct iscsi_seq *seq ) ; struct iscsi_seq *iscsit_get_seq_holder(struct iscsi_cmd *cmd , u32 offset , u32 length ) ; static void iscsit_dump_seq_list(struct iscsi_cmd *cmd ) { { return; } } static void iscsit_dump_pdu_list(struct iscsi_cmd *cmd ) { { return; } } static void iscsit_ordered_seq_lists(struct iscsi_cmd *cmd , u8 type ) { u32 i ; u32 seq_count ; u32 tmp ; { seq_count = 0U; i = 0U; goto ldv_57364; ldv_57363: ; if ((cmd->seq_list + (unsigned long )i)->type != 3) { goto ldv_57362; } else { } tmp = seq_count; seq_count = seq_count + 1U; (cmd->seq_list + (unsigned long )i)->seq_send_order = tmp; ldv_57362: i = i + 1U; ldv_57364: ; if (cmd->seq_count > i) { goto ldv_57363; } else { } return; } } static void iscsit_ordered_pdu_lists(struct iscsi_cmd *cmd , u8 type ) { u32 i ; u32 pdu_send_order ; u32 seq_no ; u32 tmp ; { pdu_send_order = 0U; seq_no = 0U; i = 0U; goto ldv_57376; ldv_57375: ; redo: ; if ((cmd->pdu_list + (unsigned long )i)->seq_no == seq_no) { tmp = pdu_send_order; pdu_send_order = pdu_send_order + 1U; (cmd->pdu_list + (unsigned long )i)->pdu_send_order = tmp; goto ldv_57374; } else { } seq_no = seq_no + 1U; pdu_send_order = 0U; goto redo; ldv_57374: i = i + 1U; ldv_57376: ; if (cmd->pdu_count > i) { goto ldv_57375; } else { } return; } } static void iscsit_create_random_array(u32 *array , u32 count ) { int i ; int j ; int k ; { if (count == 1U) { *array = 0U; return; } else { } i = 0; goto ldv_57390; ldv_57389: ; redo: get_random_bytes((void *)(& j), 4); j = (int )((u32 )(10001 - j) % count); k = 0; goto ldv_57387; ldv_57386: j = (int )((unsigned int )j | 2147483648U); if ((int )*(array + (unsigned long )k) < 0 && *(array + (unsigned long )k) == (u32 )j) { goto redo; } else { } k = k + 1; ldv_57387: ; if (i + 1 > k) { goto ldv_57386; } else { } *(array + (unsigned long )i) = (u32 )j; i = i + 1; ldv_57390: ; if ((u32 )i < count) { goto ldv_57389; } else { } i = 0; goto ldv_57393; ldv_57392: *(array + (unsigned long )i) = *(array + (unsigned long )i) & 2147483647U; i = i + 1; ldv_57393: ; if ((u32 )i < count) { goto ldv_57392; } else { } return; } } static int iscsit_randomize_pdu_lists(struct iscsi_cmd *cmd , u8 type ) { int i ; u32 *array ; u32 pdu_count ; u32 seq_count ; u32 seq_no ; u32 seq_offset ; void *tmp ; void *tmp___0 ; { i = 0; seq_count = 0U; seq_no = 0U; seq_offset = 0U; pdu_count = 0U; goto ldv_57411; ldv_57410: ; redo: ; if ((cmd->pdu_list + (unsigned long )pdu_count)->seq_no == seq_no) { seq_count = seq_count + 1U; goto ldv_57406; } else { } tmp = kcalloc((size_t )seq_count, 4UL, 208U); array = (u32 *)tmp; if ((unsigned long )array == (unsigned long )((u32 *)0U)) { printk("\vUnable to allocate memory for random array.\n"); return (-12); } else { } iscsit_create_random_array(array, seq_count); i = 0; goto ldv_57408; ldv_57407: (cmd->pdu_list + (unsigned long )(seq_offset + (u32 )i))->pdu_send_order = *(array + (unsigned long )i); i = i + 1; ldv_57408: ; if ((u32 )i < seq_count) { goto ldv_57407; } else { } kfree((void const *)array); seq_offset = seq_offset + seq_count; seq_count = 0U; seq_no = seq_no + 1U; goto redo; ldv_57406: pdu_count = pdu_count + 1U; ldv_57411: ; if (cmd->pdu_count > pdu_count) { goto ldv_57410; } else { } if (seq_count != 0U) { tmp___0 = kcalloc((size_t )seq_count, 4UL, 208U); array = (u32 *)tmp___0; if ((unsigned long )array == (unsigned long )((u32 *)0U)) { printk("\vUnable to allocate memory for random array.\n"); return (-12); } else { } iscsit_create_random_array(array, seq_count); i = 0; goto ldv_57414; ldv_57413: (cmd->pdu_list + (unsigned long )(seq_offset + (u32 )i))->pdu_send_order = *(array + (unsigned long )i); i = i + 1; ldv_57414: ; if ((u32 )i < seq_count) { goto ldv_57413; } else { } kfree((void const *)array); } else { } return (0); } } static int iscsit_randomize_seq_lists(struct iscsi_cmd *cmd , u8 type ) { int i ; int j ; u32 *array ; u32 seq_count ; void *tmp ; int tmp___0 ; { j = 0; seq_count = cmd->seq_count; if ((unsigned int )type == 2U || (unsigned int )type == 3U) { seq_count = seq_count - 1U; } else if ((unsigned int )type == 4U) { seq_count = seq_count - 2U; } else { } if (seq_count == 0U) { return (0); } else { } tmp = kcalloc((size_t )seq_count, 4UL, 208U); array = (u32 *)tmp; if ((unsigned long )array == (unsigned long )((u32 *)0U)) { printk("\vUnable to allocate memory for random array.\n"); return (-12); } else { } iscsit_create_random_array(array, seq_count); i = 0; goto ldv_57426; ldv_57425: ; if ((cmd->seq_list + (unsigned long )i)->type != 3) { goto ldv_57424; } else { } tmp___0 = j; j = j + 1; (cmd->seq_list + (unsigned long )i)->seq_send_order = *(array + (unsigned long )tmp___0); ldv_57424: i = i + 1; ldv_57426: ; if ((u32 )i < cmd->seq_count) { goto ldv_57425; } else { } kfree((void const *)array); return (0); } } static void iscsit_determine_counts_for_list(struct iscsi_cmd *cmd , struct iscsi_build_list *bl , u32 *seq_count , u32 *pdu_count ) { int check_immediate ; u32 burstlength ; u32 offset ; u32 unsolicited_data_length ; u32 mdsl ; struct iscsi_conn *conn ; u32 _min1 ; u32 _min2 ; { check_immediate = 0; burstlength = 0U; offset = 0U; unsolicited_data_length = 0U; conn = cmd->conn; if ((unsigned int )cmd->se_cmd.data_direction == 1U) { mdsl = ((cmd->conn)->conn_ops)->MaxXmitDataSegmentLength; } else { mdsl = ((cmd->conn)->conn_ops)->MaxRecvDataSegmentLength; } if (bl->type == 2 || bl->type == 4) { check_immediate = 1; } else { } if (bl->type == 3 || bl->type == 4) { _min1 = cmd->se_cmd.data_length; _min2 = ((conn->sess)->sess_ops)->FirstBurstLength; unsolicited_data_length = _min1 < _min2 ? _min1 : _min2; } else { } goto ldv_57443; ldv_57444: *pdu_count = *pdu_count + 1U; if (check_immediate != 0) { check_immediate = 0; offset = (u32 )bl->immediate_data_length + offset; *seq_count = *seq_count + 1U; if (unsolicited_data_length != 0U) { unsolicited_data_length = unsolicited_data_length - (u32 )bl->immediate_data_length; } else { } goto ldv_57443; } else { } if (unsolicited_data_length != 0U) { if (offset + mdsl >= cmd->se_cmd.data_length) { unsolicited_data_length = (offset - cmd->se_cmd.data_length) + unsolicited_data_length; offset = (cmd->se_cmd.data_length - offset) + offset; goto ldv_57443; } else { } if (offset + mdsl >= ((conn->sess)->sess_ops)->FirstBurstLength) { unsolicited_data_length = (offset - ((conn->sess)->sess_ops)->FirstBurstLength) + unsolicited_data_length; offset = (((conn->sess)->sess_ops)->FirstBurstLength - offset) + offset; burstlength = 0U; *seq_count = *seq_count + 1U; goto ldv_57443; } else { } offset = offset + mdsl; unsolicited_data_length = unsolicited_data_length - mdsl; goto ldv_57443; } else { } if (offset + mdsl >= cmd->se_cmd.data_length) { offset = (cmd->se_cmd.data_length - offset) + offset; goto ldv_57443; } else { } if (burstlength + mdsl >= ((conn->sess)->sess_ops)->MaxBurstLength) { offset = (((conn->sess)->sess_ops)->MaxBurstLength - burstlength) + offset; burstlength = 0U; *seq_count = *seq_count + 1U; goto ldv_57443; } else { } burstlength = burstlength + mdsl; offset = offset + mdsl; ldv_57443: ; if (cmd->se_cmd.data_length > offset) { goto ldv_57444; } else { } return; } } static int iscsit_do_build_pdu_and_seq_lists(struct iscsi_cmd *cmd , struct iscsi_build_list *bl ) { int check_immediate ; int datapduinorder ; int datasequenceinorder ; u32 burstlength ; u32 offset ; u32 i ; u32 mdsl ; u32 pdu_count ; u32 seq_no ; u32 unsolicited_data_length ; struct iscsi_conn *conn ; struct iscsi_pdu *pdu ; struct iscsi_seq *seq ; u32 _min1 ; u32 _min2 ; u32 tmp ; u32 tmp___0 ; u32 tmp___1 ; u32 tmp___2 ; u32 tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; { check_immediate = 0; burstlength = 0U; offset = 0U; i = 0U; pdu_count = 0U; seq_no = 0U; unsolicited_data_length = 0U; conn = cmd->conn; pdu = cmd->pdu_list; seq = cmd->seq_list; if ((unsigned int )cmd->se_cmd.data_direction == 1U) { mdsl = ((cmd->conn)->conn_ops)->MaxXmitDataSegmentLength; } else { mdsl = ((cmd->conn)->conn_ops)->MaxRecvDataSegmentLength; } datapduinorder = (int )((conn->sess)->sess_ops)->DataPDUInOrder; datasequenceinorder = (int )((conn->sess)->sess_ops)->DataSequenceInOrder; if (bl->type == 2 || bl->type == 4) { check_immediate = 1; } else { } if (bl->type == 3 || bl->type == 4) { _min1 = cmd->se_cmd.data_length; _min2 = ((conn->sess)->sess_ops)->FirstBurstLength; unsolicited_data_length = _min1 < _min2 ? _min1 : _min2; } else { } goto ldv_57466; ldv_57467: pdu_count = pdu_count + 1U; if (datapduinorder == 0) { (pdu + (unsigned long )i)->offset = offset; (pdu + (unsigned long )i)->seq_no = seq_no; } else { } if (datasequenceinorder == 0 && pdu_count == 1U) { (seq + (unsigned long )seq_no)->pdu_start = i; (seq + (unsigned long )seq_no)->seq_no = seq_no; (seq + (unsigned long )seq_no)->offset = offset; (seq + (unsigned long )seq_no)->orig_offset = offset; } else { } if (check_immediate != 0) { check_immediate = 0; if (datapduinorder == 0) { (pdu + (unsigned long )i)->type = 1; tmp = i; i = i + 1U; (pdu + (unsigned long )tmp)->length = (u32 )bl->immediate_data_length; } else { } if (datasequenceinorder == 0) { (seq + (unsigned long )seq_no)->type = 1; (seq + (unsigned long )seq_no)->pdu_count = 1U; (seq + (unsigned long )seq_no)->xfer_len = (u32 )bl->immediate_data_length; } else { } offset = (u32 )bl->immediate_data_length + offset; pdu_count = 0U; seq_no = seq_no + 1U; if (unsolicited_data_length != 0U) { unsolicited_data_length = unsolicited_data_length - (u32 )bl->immediate_data_length; } else { } goto ldv_57466; } else { } if (unsolicited_data_length != 0U) { if (offset + mdsl >= cmd->se_cmd.data_length) { if (datapduinorder == 0) { (pdu + (unsigned long )i)->type = 2; (pdu + (unsigned long )i)->length = cmd->se_cmd.data_length - offset; } else { } if (datasequenceinorder == 0) { (seq + (unsigned long )seq_no)->type = 2; (seq + (unsigned long )seq_no)->pdu_count = pdu_count; (seq + (unsigned long )seq_no)->xfer_len = (cmd->se_cmd.data_length - offset) + burstlength; } else { } unsolicited_data_length = (offset - cmd->se_cmd.data_length) + unsolicited_data_length; offset = (cmd->se_cmd.data_length - offset) + offset; goto ldv_57466; } else { } if (offset + mdsl >= ((conn->sess)->sess_ops)->FirstBurstLength) { if (datapduinorder == 0) { (pdu + (unsigned long )i)->type = 2; tmp___0 = i; i = i + 1U; (pdu + (unsigned long )tmp___0)->length = ((conn->sess)->sess_ops)->FirstBurstLength - offset; } else { } if (datasequenceinorder == 0) { (seq + (unsigned long )seq_no)->type = 2; (seq + (unsigned long )seq_no)->pdu_count = pdu_count; (seq + (unsigned long )seq_no)->xfer_len = (((conn->sess)->sess_ops)->FirstBurstLength - offset) + burstlength; } else { } unsolicited_data_length = (offset - ((conn->sess)->sess_ops)->FirstBurstLength) + unsolicited_data_length; offset = (((conn->sess)->sess_ops)->FirstBurstLength - offset) + offset; burstlength = 0U; pdu_count = 0U; seq_no = seq_no + 1U; goto ldv_57466; } else { } if (datapduinorder == 0) { (pdu + (unsigned long )i)->type = 2; tmp___1 = i; i = i + 1U; (pdu + (unsigned long )tmp___1)->length = mdsl; } else { } burstlength = burstlength + mdsl; offset = offset + mdsl; unsolicited_data_length = unsolicited_data_length - mdsl; goto ldv_57466; } else { } if (offset + mdsl >= cmd->se_cmd.data_length) { if (datapduinorder == 0) { (pdu + (unsigned long )i)->type = 3; (pdu + (unsigned long )i)->length = cmd->se_cmd.data_length - offset; } else { } if (datasequenceinorder == 0) { (seq + (unsigned long )seq_no)->type = 3; (seq + (unsigned long )seq_no)->pdu_count = pdu_count; (seq + (unsigned long )seq_no)->xfer_len = (cmd->se_cmd.data_length - offset) + burstlength; } else { } offset = (cmd->se_cmd.data_length - offset) + offset; goto ldv_57466; } else { } if (burstlength + mdsl >= ((conn->sess)->sess_ops)->MaxBurstLength) { if (datapduinorder == 0) { (pdu + (unsigned long )i)->type = 3; tmp___2 = i; i = i + 1U; (pdu + (unsigned long )tmp___2)->length = ((conn->sess)->sess_ops)->MaxBurstLength - burstlength; } else { } if (datasequenceinorder == 0) { (seq + (unsigned long )seq_no)->type = 3; (seq + (unsigned long )seq_no)->pdu_count = pdu_count; (seq + (unsigned long )seq_no)->xfer_len = (((conn->sess)->sess_ops)->MaxBurstLength - burstlength) + burstlength; } else { } offset = (((conn->sess)->sess_ops)->MaxBurstLength - burstlength) + offset; burstlength = 0U; pdu_count = 0U; seq_no = seq_no + 1U; goto ldv_57466; } else { } if (datapduinorder == 0) { (pdu + (unsigned long )i)->type = 3; tmp___3 = i; i = i + 1U; (pdu + (unsigned long )tmp___3)->length = mdsl; } else { } burstlength = burstlength + mdsl; offset = offset + mdsl; ldv_57466: ; if (cmd->se_cmd.data_length > offset) { goto ldv_57467; } else { } if (datasequenceinorder == 0) { if ((bl->data_direction & 2) != 0) { if ((bl->randomize & 8) != 0) { tmp___4 = iscsit_randomize_seq_lists(cmd, (int )((u8 )bl->type)); if (tmp___4 < 0) { return (-1); } else { } } else { iscsit_ordered_seq_lists(cmd, (int )((u8 )bl->type)); } } else if (bl->data_direction & 1) { if ((bl->randomize & 2) != 0) { tmp___5 = iscsit_randomize_seq_lists(cmd, (int )((u8 )bl->type)); if (tmp___5 < 0) { return (-1); } else { } } else { iscsit_ordered_seq_lists(cmd, (int )((u8 )bl->type)); } } else { } iscsit_dump_seq_list(cmd); } else { } if (datapduinorder == 0) { if ((bl->data_direction & 2) != 0) { if ((bl->randomize & 4) != 0) { tmp___6 = iscsit_randomize_pdu_lists(cmd, (int )((u8 )bl->type)); if (tmp___6 < 0) { return (-1); } else { } } else { iscsit_ordered_pdu_lists(cmd, (int )((u8 )bl->type)); } } else if (bl->data_direction & 1) { if (bl->randomize & 1) { tmp___7 = iscsit_randomize_pdu_lists(cmd, (int )((u8 )bl->type)); if (tmp___7 < 0) { return (-1); } else { } } else { iscsit_ordered_pdu_lists(cmd, (int )((u8 )bl->type)); } } else { } iscsit_dump_pdu_list(cmd); } else { } return (0); } } int iscsit_build_pdu_and_seq_lists(struct iscsi_cmd *cmd , u32 immediate_data_length ) { struct iscsi_build_list bl ; u32 pdu_count ; u32 seq_count ; struct iscsi_conn *conn ; struct iscsi_pdu *pdu ; struct iscsi_seq *seq ; struct iscsi_session *sess ; struct iscsi_node_attrib *na ; void *tmp ; void *tmp___0 ; int tmp___1 ; { pdu_count = 0U; seq_count = 1U; conn = cmd->conn; pdu = (struct iscsi_pdu *)0; seq = (struct iscsi_seq *)0; sess = conn->sess; if ((unsigned int )(sess->sess_ops)->DataSequenceInOrder != 0U && (unsigned int )(sess->sess_ops)->DataPDUInOrder != 0U) { return (0); } else { } if ((unsigned int )cmd->data_direction == 3U) { return (0); } else { } na = iscsit_tpg_get_node_attrib(sess); memset((void *)(& bl), 0, 16UL); if ((unsigned int )cmd->data_direction == 2U) { bl.data_direction = 1; bl.type = 1; if (na->random_datain_pdu_offsets != 0U) { bl.randomize = bl.randomize | 1; } else { } if (na->random_datain_seq_offsets != 0U) { bl.randomize = bl.randomize | 2; } else { } } else { bl.data_direction = 2; bl.immediate_data_length = (int )immediate_data_length; if (na->random_r2t_offsets != 0U) { bl.randomize = bl.randomize | 8; } else { } if ((unsigned int )cmd->immediate_data == 0U && (unsigned int )cmd->unsolicited_data == 0U) { bl.type = 1; } else if ((unsigned int )cmd->immediate_data != 0U && (unsigned int )cmd->unsolicited_data == 0U) { bl.type = 2; } else if ((unsigned int )cmd->immediate_data == 0U && (unsigned int )cmd->unsolicited_data != 0U) { bl.type = 3; } else if ((unsigned int )cmd->immediate_data != 0U && (unsigned int )cmd->unsolicited_data != 0U) { bl.type = 4; } else { } } iscsit_determine_counts_for_list(cmd, & bl, & seq_count, & pdu_count); if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder == 0U) { tmp = kcalloc((size_t )seq_count, 64UL, 32U); seq = (struct iscsi_seq *)tmp; if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { printk("\vUnable to allocate struct iscsi_seq list\n"); return (-12); } else { } cmd->seq_list = seq; cmd->seq_count = seq_count; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { tmp___0 = kcalloc((size_t )pdu_count, 64UL, 32U); pdu = (struct iscsi_pdu *)tmp___0; if ((unsigned long )pdu == (unsigned long )((struct iscsi_pdu *)0)) { printk("\vUnable to allocate struct iscsi_pdu list.\n"); kfree((void const *)seq); return (-12); } else { } cmd->pdu_list = pdu; cmd->pdu_count = pdu_count; } else { } tmp___1 = iscsit_do_build_pdu_and_seq_lists(cmd, & bl); return (tmp___1); } } struct iscsi_pdu *iscsit_get_pdu_holder(struct iscsi_cmd *cmd , u32 offset , u32 length ) { u32 i ; struct iscsi_pdu *pdu ; { pdu = (struct iscsi_pdu *)0; if ((unsigned long )cmd->pdu_list == (unsigned long )((struct iscsi_pdu *)0)) { printk("\vstruct iscsi_cmd->pdu_list is NULL!\n"); return ((struct iscsi_pdu *)0); } else { } pdu = cmd->pdu_list; i = 0U; goto ldv_57489; ldv_57488: ; if ((pdu + (unsigned long )i)->offset == offset && (pdu + (unsigned long )i)->length == length) { return (pdu + (unsigned long )i); } else { } i = i + 1U; ldv_57489: ; if (cmd->pdu_count > i) { goto ldv_57488; } else { } printk("\vUnable to locate PDU holder for ITT: 0x%08x, Offset: %u, Length: %u\n", cmd->init_task_tag, offset, length); return ((struct iscsi_pdu *)0); } } struct iscsi_pdu *iscsit_get_pdu_holder_for_seq(struct iscsi_cmd *cmd , struct iscsi_seq *seq ) { u32 i ; struct iscsi_conn *conn ; struct iscsi_pdu *pdu ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { conn = cmd->conn; pdu = (struct iscsi_pdu *)0; if ((unsigned long )cmd->pdu_list == (unsigned long )((struct iscsi_pdu *)0)) { printk("\vstruct iscsi_cmd->pdu_list is NULL!\n"); return ((struct iscsi_pdu *)0); } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { redo: pdu = cmd->pdu_list + (unsigned long )cmd->pdu_start; i = 0U; goto ldv_57502; ldv_57501: descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_get_pdu_holder_for_seq"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_seq_pdu_list.c"; descriptor.format = "pdu[i].seq_no: %d, pdu[i].pdu_send_order: %d, pdu[i].offset: %d, pdu[i].length: %d\n"; descriptor.lineno = 617U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "pdu[i].seq_no: %d, pdu[i].pdu_send_order: %d, pdu[i].offset: %d, pdu[i].length: %d\n", (pdu + (unsigned long )i)->seq_no, (pdu + (unsigned long )i)->pdu_send_order, (pdu + (unsigned long )i)->offset, (pdu + (unsigned long )i)->length); } else { } if ((pdu + (unsigned long )i)->pdu_send_order == cmd->pdu_send_order) { cmd->pdu_send_order = cmd->pdu_send_order + 1U; return (pdu + (unsigned long )i); } else { } i = i + 1U; ldv_57502: ; if ((pdu + (unsigned long )i)->seq_no != cmd->seq_no) { goto ldv_57501; } else { } cmd->pdu_start = cmd->pdu_start + cmd->pdu_send_order; cmd->pdu_send_order = 0U; cmd->seq_no = cmd->seq_no + 1U; if (cmd->pdu_start < cmd->pdu_count) { goto redo; } else { } printk("\vCommand ITT: 0x%08x unable to locate struct iscsi_pdu for cmd->pdu_send_order: %u.\n", cmd->init_task_tag, cmd->pdu_send_order); return ((struct iscsi_pdu *)0); } else { if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { printk("\vstruct iscsi_seq is NULL!\n"); return ((struct iscsi_pdu *)0); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_get_pdu_holder_for_seq"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_seq_pdu_list.c"; descriptor___0.format = "seq->pdu_start: %d, seq->pdu_count: %d, seq->seq_no: %d\n"; descriptor___0.lineno = 644U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "seq->pdu_start: %d, seq->pdu_count: %d, seq->seq_no: %d\n", seq->pdu_start, seq->pdu_count, seq->seq_no); } else { } pdu = cmd->pdu_list + (unsigned long )seq->pdu_start; if (seq->pdu_send_order == seq->pdu_count) { printk("\vCommand ITT: 0x%08x seq->pdu_send_order: %u equals seq->pdu_count: %u\n", cmd->init_task_tag, seq->pdu_send_order, seq->pdu_count); return ((struct iscsi_pdu *)0); } else { } i = 0U; goto ldv_57506; ldv_57505: ; if ((pdu + (unsigned long )i)->pdu_send_order == seq->pdu_send_order) { seq->pdu_send_order = seq->pdu_send_order + 1U; return (pdu + (unsigned long )i); } else { } i = i + 1U; ldv_57506: ; if (seq->pdu_count > i) { goto ldv_57505; } else { } printk("\vCommand ITT: 0x%08x unable to locate iscsi_pdu_t for seq->pdu_send_order: %u.\n", cmd->init_task_tag, seq->pdu_send_order); return ((struct iscsi_pdu *)0); } return ((struct iscsi_pdu *)0); } } struct iscsi_seq *iscsit_get_seq_holder(struct iscsi_cmd *cmd , u32 offset , u32 length ) { u32 i ; struct _ddebug descriptor ; long tmp ; { if ((unsigned long )cmd->seq_list == (unsigned long )((struct iscsi_seq *)0)) { printk("\vstruct iscsi_cmd->seq_list is NULL!\n"); return ((struct iscsi_seq *)0); } else { } i = 0U; goto ldv_57517; ldv_57516: descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_get_seq_holder"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_seq_pdu_list.c"; descriptor.format = "seq_list[i].orig_offset: %d, seq_list[i].xfer_len: %d, seq_list[i].seq_no %u\n"; descriptor.lineno = 688U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "seq_list[i].orig_offset: %d, seq_list[i].xfer_len: %d, seq_list[i].seq_no %u\n", (cmd->seq_list + (unsigned long )i)->orig_offset, (cmd->seq_list + (unsigned long )i)->xfer_len, (cmd->seq_list + (unsigned long )i)->seq_no); } else { } if ((cmd->seq_list + (unsigned long )i)->orig_offset + (cmd->seq_list + (unsigned long )i)->xfer_len >= offset + length) { return (cmd->seq_list + (unsigned long )i); } else { } i = i + 1U; ldv_57517: ; if (cmd->seq_count > i) { goto ldv_57516; } else { } printk("\vUnable to locate Sequence holder for ITT: 0x%08x, Offset: %u, Length: %u\n", cmd->init_task_tag, offset, length); return ((struct iscsi_seq *)0); } } bool ldv_queue_work_on_33(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_34(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_35(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_36(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_37(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_38(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_39(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_40(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_41(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_42(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_43(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_44(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; __inline static int kstrtoul(char const *s , unsigned int base , unsigned long *res ) { int tmp ; { tmp = kstrtoull(s, base, (unsigned long long *)res); return (tmp); } } extern int hex2bin(u8 * , char const * , size_t ) ; bool ldv_is_err(void const *ptr ) ; extern int memcmp(void const * , void const * , size_t ) ; extern int strncmp(char const * , char const * , __kernel_size_t ) ; extern char *strsep(char ** , char const * ) ; __inline static bool IS_ERR(void const *ptr ) ; int ldv_mutex_trylock_69(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_67(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_70(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_71(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_66(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_68(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_72(struct mutex *ldv_func_arg1 ) ; bool ldv_queue_work_on_61(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_63(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_62(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_65(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_64(struct workqueue_struct *ldv_func_arg1 ) ; extern struct crypto_tfm *crypto_alloc_base(char const * , u32 , u32 ) ; __inline static void crypto_free_tfm(struct crypto_tfm *tfm ) { { return; } } __inline static struct crypto_hash *__crypto_hash_cast(struct crypto_tfm *tfm ) { { return ((struct crypto_hash *)tfm); } } __inline static struct crypto_hash *crypto_alloc_hash(char const *alg_name , u32 type , u32 mask ) { struct crypto_tfm *tmp ; struct crypto_hash *tmp___0 ; { type = type & 4294967280U; mask = mask & 4294967280U; type = type | 8U; mask = mask | 14U; tmp = crypto_alloc_base(alg_name, type, mask); tmp___0 = __crypto_hash_cast(tmp); return (tmp___0); } } __inline static struct crypto_tfm *crypto_hash_tfm(struct crypto_hash *tfm ) { { return (& tfm->base); } } __inline static void crypto_free_hash(struct crypto_hash *tfm ) { struct crypto_tfm *tmp ; { tmp = crypto_hash_tfm(tfm); crypto_free_tfm(tmp); return; } } __inline static struct hash_tfm *crypto_hash_crt(struct crypto_hash *tfm ) { struct crypto_tfm *tmp ; { tmp = crypto_hash_tfm(tfm); return (& tmp->crt_u.hash); } } __inline static int crypto_hash_init(struct hash_desc *desc ) { struct hash_tfm *tmp ; int tmp___0 ; { tmp = crypto_hash_crt(desc->tfm); tmp___0 = (*(tmp->init))(desc); return (tmp___0); } } __inline static int crypto_hash_update(struct hash_desc *desc , struct scatterlist *sg , unsigned int nbytes ) { struct hash_tfm *tmp ; int tmp___0 ; { tmp = crypto_hash_crt(desc->tfm); tmp___0 = (*(tmp->update))(desc, sg, nbytes); return (tmp___0); } } __inline static int crypto_hash_final(struct hash_desc *desc , u8 *out ) { struct hash_tfm *tmp ; int tmp___0 ; { tmp = crypto_hash_crt(desc->tfm); tmp___0 = (*(tmp->final))(desc, out); return (tmp___0); } } extern void sg_init_one(struct scatterlist * , void const * , unsigned int ) ; void convert_null_to_semi(char *buf , int len ) ; int extract_param(char const *in_buf , char const *pattern , unsigned int max_length , char *out_buf , unsigned char *type ) ; u32 chap_main_loop(struct iscsi_conn *conn , struct iscsi_node_auth *auth , char *in_text , char *out_text , int *in_len , int *out_len ) ; static int chap_string_to_hex(unsigned char *dst , unsigned char *src , int len ) { int j ; int rc ; struct _ddebug descriptor ; long tmp ; { j = (len + 1) / 2; rc = hex2bin(dst, (char const *)src, (size_t )j); if (rc < 0) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "chap_string_to_hex"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor.format = "CHAP string contains non hex digit symbols\n"; descriptor.lineno = 35U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "CHAP string contains non hex digit symbols\n"); } else { } } else { } *(dst + (unsigned long )j) = 0U; return (j); } } static void chap_binaryhex_to_asciihex(char *dst , char *src , int src_len ) { int i ; { i = 0; goto ldv_57114; ldv_57113: sprintf(dst + (unsigned long )(i * 2), "%02x", (int )*(src + (unsigned long )i) & 255); i = i + 1; ldv_57114: ; if (i < src_len) { goto ldv_57113; } else { } return; } } static void chap_gen_challenge(struct iscsi_conn *conn , int caller , char *c_str , unsigned int *c_len ) { unsigned char challenge_asciihex[33U] ; struct iscsi_chap *chap ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; { chap = (struct iscsi_chap *)conn->auth_protocol; memset((void *)(& challenge_asciihex), 0, 33UL); get_random_bytes((void *)(& chap->challenge), 16); chap_binaryhex_to_asciihex((char *)(& challenge_asciihex), (char *)(& chap->challenge), 16); tmp = sprintf(c_str + (unsigned long )*c_len, "CHAP_C=0x%s", (unsigned char *)(& challenge_asciihex)); *c_len = *c_len + (unsigned int )tmp; *c_len = *c_len + 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "chap_gen_challenge"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor.format = "[%s] Sending CHAP_C=0x%s\n\n"; descriptor.lineno = 71U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "[%s] Sending CHAP_C=0x%s\n\n", caller != 0 ? (char *)"server" : (char *)"client", (unsigned char *)(& challenge_asciihex)); } else { } return; } } static int chap_check_algorithm(char const *a_str ) { char *tmp ; char *orig ; char *token ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; { tmp = kstrdup(a_str, 208U); if ((unsigned long )tmp == (unsigned long )((char *)0)) { printk("\vMemory allocation failed for CHAP_A temporary buffer\n"); return (0); } else { } orig = tmp; token = strsep(& tmp, "="); if ((unsigned long )token == (unsigned long )((char *)0)) { goto out; } else { } tmp___0 = strcmp((char const *)token, "CHAP_A"); if (tmp___0 != 0) { printk("\vUnable to locate CHAP_A key\n"); goto out; } else { } goto ldv_57136; ldv_57135: token = strsep(& tmp, ","); if ((unsigned long )token == (unsigned long )((char *)0)) { goto out; } else { } tmp___2 = strncmp((char const *)token, "5", 1UL); if (tmp___2 == 0) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "chap_check_algorithm"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor.format = "Selected MD5 Algorithm\n"; descriptor.lineno = 99U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Selected MD5 Algorithm\n"); } else { } kfree((void const *)orig); return (5); } else { } ldv_57136: ; if ((unsigned long )token != (unsigned long )((char *)0)) { goto ldv_57135; } else { } out: kfree((void const *)orig); return (0); } } static struct iscsi_chap *chap_server_open(struct iscsi_conn *conn , struct iscsi_node_auth *auth , char const *a_str , char *aic_str , unsigned int *aic_len ) { int ret ; struct iscsi_chap *chap ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; unsigned char tmp___2 ; int tmp___3 ; struct _ddebug descriptor___1 ; long tmp___4 ; { if (((unsigned int )auth->naf_flags & 1U) == 0U || ((unsigned int )auth->naf_flags & 2U) == 0U) { printk("\vCHAP user or password not set for Initiator ACL\n"); return ((struct iscsi_chap *)0); } else { } conn->auth_protocol = kzalloc(64UL, 208U); if ((unsigned long )conn->auth_protocol == (unsigned long )((void *)0)) { return ((struct iscsi_chap *)0); } else { } chap = (struct iscsi_chap *)conn->auth_protocol; ret = chap_check_algorithm(a_str); switch (ret) { case 5: descriptor.modname = "iscsi_target_mod"; descriptor.function = "chap_server_open"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor.format = "[server] Got CHAP_A=5\n"; descriptor.lineno = 134U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "[server] Got CHAP_A=5\n"); } else { } tmp___0 = sprintf(aic_str, "CHAP_A=5"); *aic_len = (unsigned int )tmp___0; *aic_len = *aic_len + 1U; chap->digest_type = 5U; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "chap_server_open"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___0.format = "[server] Sending CHAP_A=%d\n"; descriptor___0.lineno = 141U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___0, "[server] Sending CHAP_A=%d\n", (int )chap->digest_type); } else { } goto ldv_57151; case 0: ; default: printk("\vUnsupported CHAP_A value\n"); return ((struct iscsi_chap *)0); } ldv_57151: tmp___2 = (conn->tpg)->tpg_chap_id; (conn->tpg)->tpg_chap_id = (unsigned char )((int )(conn->tpg)->tpg_chap_id + 1); chap->id = tmp___2; tmp___3 = sprintf(aic_str + (unsigned long )*aic_len, "CHAP_I=%d", (int )chap->id); *aic_len = *aic_len + (unsigned int )tmp___3; *aic_len = *aic_len + 1U; descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "chap_server_open"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___1.format = "[server] Sending CHAP_I=%d\n"; descriptor___1.lineno = 155U; descriptor___1.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___1, "[server] Sending CHAP_I=%d\n", (int )chap->id); } else { } chap_gen_challenge(conn, 1, aic_str, aic_len); return (chap); } } static void chap_close(struct iscsi_conn *conn ) { { kfree((void const *)conn->auth_protocol); conn->auth_protocol = (void *)0; return; } } static int chap_server_compute_md5(struct iscsi_conn *conn , struct iscsi_node_auth *auth , char *nr_in_ptr , char *nr_out_ptr , unsigned int *nr_out_len ) { unsigned long id ; unsigned char id_as_uchar ; unsigned char digest[16U] ; unsigned char type ; unsigned char response[34U] ; unsigned char identifier[10U] ; unsigned char *challenge ; unsigned char *challenge_binhex ; unsigned char client_digest[16U] ; unsigned char server_digest[16U] ; unsigned char chap_n[512U] ; unsigned char chap_r[64U] ; size_t compare_len ; struct iscsi_chap *chap ; struct crypto_hash *tfm ; struct hash_desc desc ; struct scatterlist sg ; int auth_ret ; int ret ; int challenge_len ; void *tmp ; void *tmp___0 ; int tmp___1 ; size_t tmp___2 ; int tmp___3 ; struct _ddebug descriptor ; long tmp___4 ; int tmp___5 ; struct _ddebug descriptor___0 ; long tmp___6 ; size_t tmp___7 ; bool tmp___8 ; size_t tmp___9 ; size_t tmp___10 ; struct _ddebug descriptor___1 ; long tmp___11 ; struct _ddebug descriptor___2 ; long tmp___12 ; struct _ddebug descriptor___3 ; long tmp___13 ; int tmp___14 ; int tmp___15 ; struct _ddebug descriptor___4 ; long tmp___16 ; int tmp___17 ; struct _ddebug descriptor___5 ; long tmp___18 ; size_t tmp___19 ; int tmp___20 ; bool tmp___21 ; size_t tmp___22 ; size_t tmp___23 ; int tmp___24 ; struct _ddebug descriptor___6 ; long tmp___25 ; int tmp___26 ; struct _ddebug descriptor___7 ; long tmp___27 ; { challenge = (unsigned char *)0U; challenge_binhex = (unsigned char *)0U; chap = (struct iscsi_chap *)conn->auth_protocol; auth_ret = -1; memset((void *)(& identifier), 0, 10UL); memset((void *)(& chap_n), 0, 512UL); memset((void *)(& chap_r), 0, 64UL); memset((void *)(& digest), 0, 16UL); memset((void *)(& response), 0, 34UL); memset((void *)(& client_digest), 0, 16UL); memset((void *)(& server_digest), 0, 16UL); tmp = kzalloc(4096UL, 208U); challenge = (unsigned char *)tmp; if ((unsigned long )challenge == (unsigned long )((unsigned char *)0U)) { printk("\vUnable to allocate challenge buffer\n"); goto out; } else { } tmp___0 = kzalloc(4096UL, 208U); challenge_binhex = (unsigned char *)tmp___0; if ((unsigned long )challenge_binhex == (unsigned long )((unsigned char *)0U)) { printk("\vUnable to allocate challenge_binhex buffer\n"); goto out; } else { } tmp___1 = extract_param((char const *)nr_in_ptr, "CHAP_N", 512U, (char *)(& chap_n), & type); if (tmp___1 < 0) { printk("\vCould not find CHAP_N.\n"); goto out; } else { } if ((unsigned int )type == 1U) { printk("\vCould not find CHAP_N.\n"); goto out; } else { } tmp___2 = strlen((char const *)(& auth->userid)); compare_len = tmp___2 + 1UL; tmp___3 = strncmp((char const *)(& chap_n), (char const *)(& auth->userid), compare_len); if (tmp___3 != 0) { printk("\vCHAP_N values do not match!\n"); goto out; } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "chap_server_compute_md5"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor.format = "[server] Got CHAP_N=%s\n"; descriptor.lineno = 231U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor, "[server] Got CHAP_N=%s\n", (unsigned char *)(& chap_n)); } else { } tmp___5 = extract_param((char const *)nr_in_ptr, "CHAP_R", 64U, (char *)(& chap_r), & type); if (tmp___5 < 0) { printk("\vCould not find CHAP_R.\n"); goto out; } else { } if ((unsigned int )type != 1U) { printk("\vCould not find CHAP_R.\n"); goto out; } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "chap_server_compute_md5"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___0.format = "[server] Got CHAP_R=%s\n"; descriptor___0.lineno = 245U; descriptor___0.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___0, "[server] Got CHAP_R=%s\n", (unsigned char *)(& chap_r)); } else { } tmp___7 = strlen((char const *)(& chap_r)); chap_string_to_hex((unsigned char *)(& client_digest), (unsigned char *)(& chap_r), (int )tmp___7); tfm = crypto_alloc_hash("md5", 0U, 128U); tmp___8 = IS_ERR((void const *)tfm); if ((int )tmp___8) { printk("\vUnable to allocate struct crypto_hash\n"); goto out; } else { } desc.tfm = tfm; desc.flags = 0U; ret = crypto_hash_init(& desc); if (ret < 0) { printk("\vcrypto_hash_init() failed\n"); crypto_free_hash(tfm); goto out; } else { } sg_init_one(& sg, (void const *)(& chap->id), 1U); ret = crypto_hash_update(& desc, & sg, 1U); if (ret < 0) { printk("\vcrypto_hash_update() failed for id\n"); crypto_free_hash(tfm); goto out; } else { } tmp___9 = strlen((char const *)(& auth->password)); sg_init_one(& sg, (void const *)(& auth->password), (unsigned int )tmp___9); tmp___10 = strlen((char const *)(& auth->password)); ret = crypto_hash_update(& desc, & sg, (unsigned int )tmp___10); if (ret < 0) { printk("\vcrypto_hash_update() failed for password\n"); crypto_free_hash(tfm); goto out; } else { } sg_init_one(& sg, (void const *)(& chap->challenge), 16U); ret = crypto_hash_update(& desc, & sg, 16U); if (ret < 0) { printk("\vcrypto_hash_update() failed for challenge\n"); crypto_free_hash(tfm); goto out; } else { } ret = crypto_hash_final(& desc, (u8 *)(& server_digest)); if (ret < 0) { printk("\vcrypto_hash_final() failed for server digest\n"); crypto_free_hash(tfm); goto out; } else { } crypto_free_hash(tfm); chap_binaryhex_to_asciihex((char *)(& response), (char *)(& server_digest), 16); descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "chap_server_compute_md5"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___1.format = "[server] MD5 Server Digest: %s\n"; descriptor___1.lineno = 296U; descriptor___1.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___11 != 0L) { __dynamic_pr_debug(& descriptor___1, "[server] MD5 Server Digest: %s\n", (unsigned char *)(& response)); } else { } tmp___14 = memcmp((void const *)(& server_digest), (void const *)(& client_digest), 16UL); if (tmp___14 != 0) { descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "chap_server_compute_md5"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___2.format = "[server] MD5 Digests do not match!\n\n"; descriptor___2.lineno = 299U; descriptor___2.flags = 0U; tmp___12 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___12 != 0L) { __dynamic_pr_debug(& descriptor___2, "[server] MD5 Digests do not match!\n\n"); } else { } goto out; } else { descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "chap_server_compute_md5"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___3.format = "[server] MD5 Digests match, CHAP connetication successful.\n\n"; descriptor___3.lineno = 303U; descriptor___3.flags = 0U; tmp___13 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___13 != 0L) { __dynamic_pr_debug(& descriptor___3, "[server] MD5 Digests match, CHAP connetication successful.\n\n"); } else { } } if (auth->authenticate_target == 0) { kfree((void const *)challenge); kfree((void const *)challenge_binhex); return (0); } else { } tmp___15 = extract_param((char const *)nr_in_ptr, "CHAP_I", 10U, (char *)(& identifier), & type); if (tmp___15 < 0) { printk("\vCould not find CHAP_I.\n"); goto out; } else { } if ((unsigned int )type == 1U) { ret = kstrtoul((char const *)(& identifier) + 2U, 0U, & id); } else { ret = kstrtoul((char const *)(& identifier), 0U, & id); } if (ret < 0) { printk("\vkstrtoul() failed for CHAP identifier: %d\n", ret); goto out; } else { } if (id > 255UL) { printk("\vchap identifier: %lu greater than 255\n", id); goto out; } else { } descriptor___4.modname = "iscsi_target_mod"; descriptor___4.function = "chap_server_compute_md5"; descriptor___4.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___4.format = "[server] Got CHAP_I=%lu\n"; descriptor___4.lineno = 337U; descriptor___4.flags = 0U; tmp___16 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); if (tmp___16 != 0L) { __dynamic_pr_debug(& descriptor___4, "[server] Got CHAP_I=%lu\n", id); } else { } tmp___17 = extract_param((char const *)nr_in_ptr, "CHAP_C", 4096U, (char *)challenge, & type); if (tmp___17 < 0) { printk("\vCould not find CHAP_C.\n"); goto out; } else { } if ((unsigned int )type != 1U) { printk("\vCould not find CHAP_C.\n"); goto out; } else { } descriptor___5.modname = "iscsi_target_mod"; descriptor___5.function = "chap_server_compute_md5"; descriptor___5.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___5.format = "[server] Got CHAP_C=%s\n"; descriptor___5.lineno = 351U; descriptor___5.flags = 0U; tmp___18 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); if (tmp___18 != 0L) { __dynamic_pr_debug(& descriptor___5, "[server] Got CHAP_C=%s\n", challenge); } else { } tmp___19 = strlen((char const *)challenge); challenge_len = chap_string_to_hex(challenge_binhex, challenge, (int )tmp___19); if (challenge_len == 0) { printk("\vUnable to convert incoming challenge\n"); goto out; } else { } if (challenge_len > 1024) { printk("\vCHAP_C exceeds maximum binary size of 1024 bytes\n"); goto out; } else { } tmp___20 = memcmp((void const *)challenge_binhex, (void const *)(& chap->challenge), 16UL); if (tmp___20 == 0) { printk("\vinitiator CHAP_C matches target CHAP_C, failing login attempt\n"); goto out; } else { } tfm = crypto_alloc_hash("md5", 0U, 128U); tmp___21 = IS_ERR((void const *)tfm); if ((int )tmp___21) { printk("\vUnable to allocate struct crypto_hash\n"); goto out; } else { } desc.tfm = tfm; desc.flags = 0U; ret = crypto_hash_init(& desc); if (ret < 0) { printk("\vcrypto_hash_init() failed\n"); crypto_free_hash(tfm); goto out; } else { } id_as_uchar = (unsigned char )id; sg_init_one(& sg, (void const *)(& id_as_uchar), 1U); ret = crypto_hash_update(& desc, & sg, 1U); if (ret < 0) { printk("\vcrypto_hash_update() failed for id\n"); crypto_free_hash(tfm); goto out; } else { } tmp___22 = strlen((char const *)(& auth->password_mutual)); sg_init_one(& sg, (void const *)(& auth->password_mutual), (unsigned int )tmp___22); tmp___23 = strlen((char const *)(& auth->password_mutual)); ret = crypto_hash_update(& desc, & sg, (unsigned int )tmp___23); if (ret < 0) { printk("\vcrypto_hash_update() failed for password_mutual\n"); crypto_free_hash(tfm); goto out; } else { } sg_init_one(& sg, (void const *)challenge_binhex, (unsigned int )challenge_len); ret = crypto_hash_update(& desc, & sg, (unsigned int )challenge_len); if (ret < 0) { printk("\vcrypto_hash_update() failed for ma challenge\n"); crypto_free_hash(tfm); goto out; } else { } ret = crypto_hash_final(& desc, (u8 *)(& digest)); if (ret < 0) { printk("\vcrypto_hash_final() failed for ma digest\n"); crypto_free_hash(tfm); goto out; } else { } crypto_free_hash(tfm); tmp___24 = sprintf(nr_out_ptr, "CHAP_N=%s", (char *)(& auth->userid_mutual)); *nr_out_len = (unsigned int )tmp___24; *nr_out_len = *nr_out_len + 1U; descriptor___6.modname = "iscsi_target_mod"; descriptor___6.function = "chap_server_compute_md5"; descriptor___6.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___6.format = "[server] Sending CHAP_N=%s\n"; descriptor___6.lineno = 432U; descriptor___6.flags = 0U; tmp___25 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); if (tmp___25 != 0L) { __dynamic_pr_debug(& descriptor___6, "[server] Sending CHAP_N=%s\n", (char *)(& auth->userid_mutual)); } else { } chap_binaryhex_to_asciihex((char *)(& response), (char *)(& digest), 16); tmp___26 = sprintf(nr_out_ptr + (unsigned long )*nr_out_len, "CHAP_R=0x%s", (unsigned char *)(& response)); *nr_out_len = *nr_out_len + (unsigned int )tmp___26; *nr_out_len = *nr_out_len + 1U; descriptor___7.modname = "iscsi_target_mod"; descriptor___7.function = "chap_server_compute_md5"; descriptor___7.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_auth.c"; descriptor___7.format = "[server] Sending CHAP_R=0x%s\n"; descriptor___7.lineno = 440U; descriptor___7.flags = 0U; tmp___27 = ldv__builtin_expect((long )descriptor___7.flags & 1L, 0L); if (tmp___27 != 0L) { __dynamic_pr_debug(& descriptor___7, "[server] Sending CHAP_R=0x%s\n", (unsigned char *)(& response)); } else { } auth_ret = 0; out: kfree((void const *)challenge); kfree((void const *)challenge_binhex); return (auth_ret); } } static int chap_got_response(struct iscsi_conn *conn , struct iscsi_node_auth *auth , char *nr_in_ptr , char *nr_out_ptr , unsigned int *nr_out_len ) { struct iscsi_chap *chap ; int tmp ; { chap = (struct iscsi_chap *)conn->auth_protocol; switch ((int )chap->digest_type) { case 5: tmp = chap_server_compute_md5(conn, auth, nr_in_ptr, nr_out_ptr, nr_out_len); if (tmp < 0) { return (-1); } else { } return (0); default: printk("\vUnknown CHAP digest type %d!\n", (int )chap->digest_type); return (-1); } } } u32 chap_main_loop(struct iscsi_conn *conn , struct iscsi_node_auth *auth , char *in_text , char *out_text , int *in_len , int *out_len ) { struct iscsi_chap *chap ; int tmp ; { chap = (struct iscsi_chap *)conn->auth_protocol; if ((unsigned long )chap == (unsigned long )((struct iscsi_chap *)0)) { chap = chap_server_open(conn, auth, (char const *)in_text, out_text, (unsigned int *)out_len); if ((unsigned long )chap == (unsigned long )((struct iscsi_chap *)0)) { return (2U); } else { } chap->chap_state = 2U; return (0U); } else if (chap->chap_state == 2U) { convert_null_to_semi(in_text, *in_len); tmp = chap_got_response(conn, auth, in_text, out_text, (unsigned int *)out_len); if (tmp < 0) { chap_close(conn); return (2U); } else { } if (auth->authenticate_target != 0) { chap->chap_state = 5U; } else { *out_len = 0; } chap_close(conn); return (1U); } else { } return (2U); } } __inline static bool IS_ERR(void const *ptr ) { bool tmp ; { tmp = ldv_is_err(ptr); return (tmp); } } bool ldv_queue_work_on_61(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_62(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_63(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_64(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_65(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_66(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_67(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_68(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_69(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_70(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_71(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_72(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_97(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_95(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_98(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_99(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_94(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_96(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_100(struct mutex *ldv_func_arg1 ) ; extern void _raw_spin_lock(raw_spinlock_t * ) ; extern void _raw_spin_unlock(raw_spinlock_t * ) ; __inline static void spin_lock(spinlock_t *lock ) { { _raw_spin_lock(& lock->__annonCompField17.rlock); return; } } __inline static void spin_unlock(spinlock_t *lock ) { { _raw_spin_unlock(& lock->__annonCompField17.rlock); return; } } bool ldv_queue_work_on_89(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_91(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_90(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_93(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_92(struct workqueue_struct *ldv_func_arg1 ) ; extern void *kmem_cache_alloc(struct kmem_cache * , gfp_t ) ; extern void kmem_cache_free(struct kmem_cache * , void * ) ; __inline static void *kmem_cache_zalloc(struct kmem_cache *k , gfp_t flags ) { void *tmp ; { tmp = kmem_cache_alloc(k, flags | 32768U); return (tmp); } } int iscsit_create_recovery_datain_values_datasequenceinorder_yes(struct iscsi_cmd *cmd , struct iscsi_datain_req *dr ) ; int iscsit_create_recovery_datain_values_datasequenceinorder_no(struct iscsi_cmd *cmd , struct iscsi_datain_req *dr ) ; struct iscsi_seq *iscsit_get_seq_holder_for_datain(struct iscsi_cmd *cmd , u32 seq_send_order ) ; struct kmem_cache *lio_dr_cache ; struct iscsi_datain_req *iscsit_allocate_datain_req(void) ; void iscsit_attach_datain_req(struct iscsi_cmd *cmd , struct iscsi_datain_req *dr ) ; void iscsit_free_datain_req(struct iscsi_cmd *cmd , struct iscsi_datain_req *dr ) ; void iscsit_free_all_datain_reqs(struct iscsi_cmd *cmd ) ; struct iscsi_datain_req *iscsit_get_datain_req(struct iscsi_cmd *cmd ) ; struct iscsi_datain_req *iscsit_get_datain_values(struct iscsi_cmd *cmd , struct iscsi_datain *datain ) ; struct iscsi_datain_req *iscsit_allocate_datain_req(void) { struct iscsi_datain_req *dr ; void *tmp ; { tmp = kmem_cache_zalloc(lio_dr_cache, 32U); dr = (struct iscsi_datain_req *)tmp; if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { printk("\vUnable to allocate memory for struct iscsi_datain_req\n"); return ((struct iscsi_datain_req *)0); } else { } INIT_LIST_HEAD(& dr->cmd_datain_node); return (dr); } } void iscsit_attach_datain_req(struct iscsi_cmd *cmd , struct iscsi_datain_req *dr ) { { spin_lock(& cmd->datain_lock); list_add_tail(& dr->cmd_datain_node, & cmd->datain_list); spin_unlock(& cmd->datain_lock); return; } } void iscsit_free_datain_req(struct iscsi_cmd *cmd , struct iscsi_datain_req *dr ) { { spin_lock(& cmd->datain_lock); list_del(& dr->cmd_datain_node); spin_unlock(& cmd->datain_lock); kmem_cache_free(lio_dr_cache, (void *)dr); return; } } void iscsit_free_all_datain_reqs(struct iscsi_cmd *cmd ) { struct iscsi_datain_req *dr ; struct iscsi_datain_req *dr_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { spin_lock(& cmd->datain_lock); __mptr = (struct list_head const *)cmd->datain_list.next; dr = (struct iscsi_datain_req *)__mptr + 0xffffffffffffffd0UL; __mptr___0 = (struct list_head const *)dr->cmd_datain_node.next; dr_tmp = (struct iscsi_datain_req *)__mptr___0 + 0xffffffffffffffd0UL; goto ldv_57443; ldv_57442: list_del(& dr->cmd_datain_node); kmem_cache_free(lio_dr_cache, (void *)dr); dr = dr_tmp; __mptr___1 = (struct list_head const *)dr_tmp->cmd_datain_node.next; dr_tmp = (struct iscsi_datain_req *)__mptr___1 + 0xffffffffffffffd0UL; ldv_57443: ; if ((unsigned long )(& dr->cmd_datain_node) != (unsigned long )(& cmd->datain_list)) { goto ldv_57442; } else { } spin_unlock(& cmd->datain_lock); return; } } struct iscsi_datain_req *iscsit_get_datain_req(struct iscsi_cmd *cmd ) { int tmp ; struct list_head const *__mptr ; { tmp = list_empty((struct list_head const *)(& cmd->datain_list)); if (tmp != 0) { printk("\vcmd->datain_list is empty for ITT: 0x%08x\n", cmd->init_task_tag); return ((struct iscsi_datain_req *)0); } else { } __mptr = (struct list_head const *)cmd->datain_list.next; return ((struct iscsi_datain_req *)__mptr + 0xffffffffffffffd0UL); } } static struct iscsi_datain_req *iscsit_set_datain_values_yes_and_yes(struct iscsi_cmd *cmd , struct iscsi_datain *datain ) { u32 next_burst_len ; u32 read_data_done ; u32 read_data_left ; struct iscsi_conn *conn ; struct iscsi_datain_req *dr ; int tmp ; u32 tmp___0 ; u32 tmp___1 ; { conn = cmd->conn; dr = iscsit_get_datain_req(cmd); if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { return ((struct iscsi_datain_req *)0); } else { } if ((unsigned int )dr->recovery != 0U && dr->generate_recovery_values != 0) { tmp = iscsit_create_recovery_datain_values_datasequenceinorder_yes(cmd, dr); if (tmp < 0) { return ((struct iscsi_datain_req *)0); } else { } dr->generate_recovery_values = 0; } else { } next_burst_len = (unsigned int )dr->recovery == 0U ? cmd->next_burst_len : dr->next_burst_len; read_data_done = (unsigned int )dr->recovery == 0U ? cmd->read_data_done : dr->read_data_done; read_data_left = cmd->se_cmd.data_length - read_data_done; if (read_data_left == 0U) { printk("\vITT: 0x%08x read_data_left is zero!\n", cmd->init_task_tag); return ((struct iscsi_datain_req *)0); } else { } if ((conn->conn_ops)->MaxRecvDataSegmentLength >= read_data_left && ((conn->sess)->sess_ops)->MaxBurstLength - next_burst_len >= read_data_left) { datain->length = read_data_left; datain->flags = (u8 )((unsigned int )datain->flags | 129U); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel != 0U) { datain->flags = (u8 )((unsigned int )datain->flags | 64U); } else { } } else if ((conn->conn_ops)->MaxRecvDataSegmentLength + next_burst_len < ((conn->sess)->sess_ops)->MaxBurstLength) { datain->length = (conn->conn_ops)->MaxRecvDataSegmentLength; next_burst_len = datain->length + next_burst_len; } else { datain->length = ((conn->sess)->sess_ops)->MaxBurstLength - next_burst_len; next_burst_len = 0U; datain->flags = (u8 )((unsigned int )datain->flags | 128U); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel != 0U) { datain->flags = (u8 )((unsigned int )datain->flags | 64U); } else { } } if ((unsigned int )dr->recovery == 0U) { tmp___0 = cmd->data_sn; cmd->data_sn = cmd->data_sn + 1U; datain->data_sn = tmp___0; } else { tmp___1 = dr->data_sn; dr->data_sn = dr->data_sn + 1U; datain->data_sn = tmp___1; } datain->offset = read_data_done; if ((unsigned int )dr->recovery == 0U) { cmd->next_burst_len = next_burst_len; cmd->read_data_done = cmd->read_data_done + datain->length; } else { dr->next_burst_len = next_burst_len; dr->read_data_done = dr->read_data_done + datain->length; } if ((unsigned int )dr->recovery == 0U) { if ((int )datain->flags & 1) { dr->dr_complete = 1; } else { } return (dr); } else { } if (dr->runlength == 0U) { if ((int )datain->flags & 1) { dr->dr_complete = (unsigned int )dr->recovery == 1U ? 2 : 3; } else { } } else if (dr->begrun + dr->runlength == dr->data_sn) { dr->dr_complete = (unsigned int )dr->recovery == 1U ? 2 : 3; } else { } return (dr); } } static struct iscsi_datain_req *iscsit_set_datain_values_no_and_yes(struct iscsi_cmd *cmd , struct iscsi_datain *datain ) { u32 offset ; u32 read_data_done ; u32 read_data_left ; u32 seq_send_order ; struct iscsi_conn *conn ; struct iscsi_datain_req *dr ; struct iscsi_seq *seq ; int tmp ; u32 tmp___0 ; u32 tmp___1 ; { conn = cmd->conn; dr = iscsit_get_datain_req(cmd); if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { return ((struct iscsi_datain_req *)0); } else { } if ((unsigned int )dr->recovery != 0U && dr->generate_recovery_values != 0) { tmp = iscsit_create_recovery_datain_values_datasequenceinorder_no(cmd, dr); if (tmp < 0) { return ((struct iscsi_datain_req *)0); } else { } dr->generate_recovery_values = 0; } else { } read_data_done = (unsigned int )dr->recovery == 0U ? cmd->read_data_done : dr->read_data_done; seq_send_order = (unsigned int )dr->recovery == 0U ? cmd->seq_send_order : dr->seq_send_order; read_data_left = cmd->se_cmd.data_length - read_data_done; if (read_data_left == 0U) { printk("\vITT: 0x%08x read_data_left is zero!\n", cmd->init_task_tag); return ((struct iscsi_datain_req *)0); } else { } seq = iscsit_get_seq_holder_for_datain(cmd, seq_send_order); if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { return ((struct iscsi_datain_req *)0); } else { } seq->sent = 1; if ((unsigned int )dr->recovery == 0U && seq->next_burst_len == 0U) { seq->first_datasn = cmd->data_sn; } else { } offset = seq->offset + seq->next_burst_len; if ((conn->conn_ops)->MaxRecvDataSegmentLength + offset >= cmd->se_cmd.data_length) { datain->length = cmd->se_cmd.data_length - offset; datain->offset = offset; datain->flags = (u8 )((unsigned int )datain->flags | 128U); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel != 0U) { datain->flags = (u8 )((unsigned int )datain->flags | 64U); } else { } seq->next_burst_len = 0U; seq_send_order = seq_send_order + 1U; } else if (seq->next_burst_len + (conn->conn_ops)->MaxRecvDataSegmentLength < ((conn->sess)->sess_ops)->MaxBurstLength) { datain->length = (conn->conn_ops)->MaxRecvDataSegmentLength; datain->offset = seq->offset + seq->next_burst_len; seq->next_burst_len = seq->next_burst_len + datain->length; } else { datain->length = ((conn->sess)->sess_ops)->MaxBurstLength - seq->next_burst_len; datain->offset = seq->offset + seq->next_burst_len; datain->flags = (u8 )((unsigned int )datain->flags | 128U); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel != 0U) { datain->flags = (u8 )((unsigned int )datain->flags | 64U); } else { } seq->next_burst_len = 0U; seq_send_order = seq_send_order + 1U; } if (datain->length + read_data_done == cmd->se_cmd.data_length) { datain->flags = (u8 )((unsigned int )datain->flags | 1U); } else { } if ((unsigned int )dr->recovery == 0U) { tmp___0 = cmd->data_sn; cmd->data_sn = cmd->data_sn + 1U; datain->data_sn = tmp___0; } else { tmp___1 = dr->data_sn; dr->data_sn = dr->data_sn + 1U; datain->data_sn = tmp___1; } if ((unsigned int )dr->recovery == 0U) { cmd->seq_send_order = seq_send_order; cmd->read_data_done = cmd->read_data_done + datain->length; } else { dr->seq_send_order = seq_send_order; dr->read_data_done = dr->read_data_done + datain->length; } if ((unsigned int )dr->recovery == 0U) { if ((int )((signed char )datain->flags) < 0) { seq->last_datasn = datain->data_sn; } else { } if ((int )datain->flags & 1) { dr->dr_complete = 1; } else { } return (dr); } else { } if (dr->runlength == 0U) { if ((int )datain->flags & 1) { dr->dr_complete = (unsigned int )dr->recovery == 1U ? 2 : 3; } else { } } else if (dr->begrun + dr->runlength == dr->data_sn) { dr->dr_complete = (unsigned int )dr->recovery == 1U ? 2 : 3; } else { } return (dr); } } static struct iscsi_datain_req *iscsit_set_datain_values_yes_and_no(struct iscsi_cmd *cmd , struct iscsi_datain *datain ) { u32 next_burst_len ; u32 read_data_done ; u32 read_data_left ; struct iscsi_conn *conn ; struct iscsi_datain_req *dr ; struct iscsi_pdu *pdu ; int tmp ; u32 tmp___0 ; u32 tmp___1 ; { conn = cmd->conn; dr = iscsit_get_datain_req(cmd); if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { return ((struct iscsi_datain_req *)0); } else { } if ((unsigned int )dr->recovery != 0U && dr->generate_recovery_values != 0) { tmp = iscsit_create_recovery_datain_values_datasequenceinorder_yes(cmd, dr); if (tmp < 0) { return ((struct iscsi_datain_req *)0); } else { } dr->generate_recovery_values = 0; } else { } next_burst_len = (unsigned int )dr->recovery == 0U ? cmd->next_burst_len : dr->next_burst_len; read_data_done = (unsigned int )dr->recovery == 0U ? cmd->read_data_done : dr->read_data_done; read_data_left = cmd->se_cmd.data_length - read_data_done; if (read_data_left == 0U) { printk("\vITT: 0x%08x read_data_left is zero!\n", cmd->init_task_tag); return (dr); } else { } pdu = iscsit_get_pdu_holder_for_seq(cmd, (struct iscsi_seq *)0); if ((unsigned long )pdu == (unsigned long )((struct iscsi_pdu *)0)) { return (dr); } else { } if (pdu->length + read_data_done == cmd->se_cmd.data_length) { pdu->flags = (u8 )((unsigned int )pdu->flags | 129U); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel != 0U) { pdu->flags = (u8 )((unsigned int )pdu->flags | 64U); } else { } next_burst_len = 0U; } else if ((conn->conn_ops)->MaxRecvDataSegmentLength + next_burst_len < ((conn->sess)->sess_ops)->MaxBurstLength) { next_burst_len = pdu->length + next_burst_len; } else { pdu->flags = (u8 )((unsigned int )pdu->flags | 128U); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel != 0U) { pdu->flags = (u8 )((unsigned int )pdu->flags | 64U); } else { } next_burst_len = 0U; } if ((unsigned int )dr->recovery == 0U) { tmp___0 = cmd->data_sn; cmd->data_sn = cmd->data_sn + 1U; pdu->data_sn = tmp___0; } else { tmp___1 = dr->data_sn; dr->data_sn = dr->data_sn + 1U; pdu->data_sn = tmp___1; } if ((unsigned int )dr->recovery == 0U) { cmd->next_burst_len = next_burst_len; cmd->read_data_done = cmd->read_data_done + pdu->length; } else { dr->next_burst_len = next_burst_len; dr->read_data_done = dr->read_data_done + pdu->length; } datain->flags = pdu->flags; datain->length = pdu->length; datain->offset = pdu->offset; datain->data_sn = pdu->data_sn; if ((unsigned int )dr->recovery == 0U) { if ((int )datain->flags & 1) { dr->dr_complete = 1; } else { } return (dr); } else { } if (dr->runlength == 0U) { if ((int )datain->flags & 1) { dr->dr_complete = (unsigned int )dr->recovery == 1U ? 2 : 3; } else { } } else if (dr->begrun + dr->runlength == dr->data_sn) { dr->dr_complete = (unsigned int )dr->recovery == 1U ? 2 : 3; } else { } return (dr); } } static struct iscsi_datain_req *iscsit_set_datain_values_no_and_no(struct iscsi_cmd *cmd , struct iscsi_datain *datain ) { u32 read_data_done ; u32 read_data_left ; u32 seq_send_order ; struct iscsi_conn *conn ; struct iscsi_datain_req *dr ; struct iscsi_pdu *pdu ; struct iscsi_seq *seq ; int tmp ; u32 tmp___0 ; u32 tmp___1 ; { conn = cmd->conn; seq = (struct iscsi_seq *)0; dr = iscsit_get_datain_req(cmd); if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { return ((struct iscsi_datain_req *)0); } else { } if ((unsigned int )dr->recovery != 0U && dr->generate_recovery_values != 0) { tmp = iscsit_create_recovery_datain_values_datasequenceinorder_no(cmd, dr); if (tmp < 0) { return ((struct iscsi_datain_req *)0); } else { } dr->generate_recovery_values = 0; } else { } read_data_done = (unsigned int )dr->recovery == 0U ? cmd->read_data_done : dr->read_data_done; seq_send_order = (unsigned int )dr->recovery == 0U ? cmd->seq_send_order : dr->seq_send_order; read_data_left = cmd->se_cmd.data_length - read_data_done; if (read_data_left == 0U) { printk("\vITT: 0x%08x read_data_left is zero!\n", cmd->init_task_tag); return ((struct iscsi_datain_req *)0); } else { } seq = iscsit_get_seq_holder_for_datain(cmd, seq_send_order); if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { return ((struct iscsi_datain_req *)0); } else { } seq->sent = 1; if ((unsigned int )dr->recovery == 0U && seq->next_burst_len == 0U) { seq->first_datasn = cmd->data_sn; } else { } pdu = iscsit_get_pdu_holder_for_seq(cmd, seq); if ((unsigned long )pdu == (unsigned long )((struct iscsi_pdu *)0)) { return ((struct iscsi_datain_req *)0); } else { } if (seq->pdu_send_order == seq->pdu_count) { pdu->flags = (u8 )((unsigned int )pdu->flags | 128U); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel != 0U) { pdu->flags = (u8 )((unsigned int )pdu->flags | 64U); } else { } seq->next_burst_len = 0U; seq_send_order = seq_send_order + 1U; } else { seq->next_burst_len = seq->next_burst_len + pdu->length; } if (pdu->length + read_data_done == cmd->se_cmd.data_length) { pdu->flags = (u8 )((unsigned int )pdu->flags | 1U); } else { } if ((unsigned int )dr->recovery == 0U) { tmp___0 = cmd->data_sn; cmd->data_sn = cmd->data_sn + 1U; pdu->data_sn = tmp___0; } else { tmp___1 = dr->data_sn; dr->data_sn = dr->data_sn + 1U; pdu->data_sn = tmp___1; } if ((unsigned int )dr->recovery == 0U) { cmd->seq_send_order = seq_send_order; cmd->read_data_done = cmd->read_data_done + pdu->length; } else { dr->seq_send_order = seq_send_order; dr->read_data_done = dr->read_data_done + pdu->length; } datain->flags = pdu->flags; datain->length = pdu->length; datain->offset = pdu->offset; datain->data_sn = pdu->data_sn; if ((unsigned int )dr->recovery == 0U) { if ((int )((signed char )datain->flags) < 0) { seq->last_datasn = datain->data_sn; } else { } if ((int )datain->flags & 1) { dr->dr_complete = 1; } else { } return (dr); } else { } if (dr->runlength == 0U) { if ((int )datain->flags & 1) { dr->dr_complete = (unsigned int )dr->recovery == 1U ? 2 : 3; } else { } } else if (dr->begrun + dr->runlength == dr->data_sn) { dr->dr_complete = (unsigned int )dr->recovery == 1U ? 2 : 3; } else { } return (dr); } } struct iscsi_datain_req *iscsit_get_datain_values(struct iscsi_cmd *cmd , struct iscsi_datain *datain ) { struct iscsi_conn *conn ; struct iscsi_datain_req *tmp ; struct iscsi_datain_req *tmp___0 ; struct iscsi_datain_req *tmp___1 ; struct iscsi_datain_req *tmp___2 ; { conn = cmd->conn; if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U && (unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { tmp = iscsit_set_datain_values_yes_and_yes(cmd, datain); return (tmp); } else if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder == 0U && (unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { tmp___0 = iscsit_set_datain_values_no_and_yes(cmd, datain); return (tmp___0); } else if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U && (unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { tmp___1 = iscsit_set_datain_values_yes_and_no(cmd, datain); return (tmp___1); } else if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder == 0U && (unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { tmp___2 = iscsit_set_datain_values_no_and_no(cmd, datain); return (tmp___2); } else { } return ((struct iscsi_datain_req *)0); } } bool ldv_queue_work_on_89(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_90(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_91(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_92(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_93(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_94(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_95(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_96(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_97(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_98(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_99(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_100(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; int ldv_mutex_trylock_125(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_123(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_126(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_127(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_130(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_122(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_124(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_128(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_129(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_cmdsn_mutex_of_iscsi_session(struct mutex *lock ) ; void ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session(struct mutex *lock ) ; bool ldv_queue_work_on_117(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_119(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_118(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_121(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_120(struct workqueue_struct *ldv_func_arg1 ) ; void iscsit_determine_maxcmdsn(struct iscsi_session *sess ) ; void iscsit_increment_maxcmdsn(struct iscsi_cmd *cmd , struct iscsi_session *sess ) ; void iscsit_determine_maxcmdsn(struct iscsi_session *sess ) { struct se_node_acl *se_nacl ; { if ((unsigned int )(sess->sess_ops)->SessionType != 0U) { return; } else { } se_nacl = (sess->se_sess)->se_node_acl; sess->cmdsn_window = se_nacl->queue_depth; sess->max_cmd_sn = (sess->max_cmd_sn + se_nacl->queue_depth) - 1U; return; } } void iscsit_increment_maxcmdsn(struct iscsi_cmd *cmd , struct iscsi_session *sess ) { struct _ddebug descriptor ; long tmp ; { if ((unsigned int )cmd->immediate_cmd != 0U || (unsigned int )cmd->maxcmdsn_inc != 0U) { return; } else { } cmd->maxcmdsn_inc = 1U; ldv_mutex_lock_129(& sess->cmdsn_mutex); sess->max_cmd_sn = sess->max_cmd_sn + 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_increment_maxcmdsn"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_device.c"; descriptor.format = "Updated MaxCmdSN to 0x%08x\n"; descriptor.lineno = 62U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Updated MaxCmdSN to 0x%08x\n", sess->max_cmd_sn); } else { } ldv_mutex_unlock_130(& sess->cmdsn_mutex); return; } } static char const __kstrtab_iscsit_increment_maxcmdsn[26U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'i', 'n', 'c', 'r', 'e', 'm', 'e', 'n', 't', '_', 'm', 'a', 'x', 'c', 'm', 'd', 's', 'n', '\000'}; struct kernel_symbol const __ksymtab_iscsit_increment_maxcmdsn ; struct kernel_symbol const __ksymtab_iscsit_increment_maxcmdsn = {(unsigned long )(& iscsit_increment_maxcmdsn), (char const *)(& __kstrtab_iscsit_increment_maxcmdsn)}; bool ldv_queue_work_on_117(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_118(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_119(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_120(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_121(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_122(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_123(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_124(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_125(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_126(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_127(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_128(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_129(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_130(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; __inline static __u32 __arch_swab32(__u32 val ) { { __asm__ ("bswapl %0": "=r" (val): "0" (val)); return (val); } } __inline static __u32 __fswab32(__u32 val ) { __u32 tmp ; { tmp = __arch_swab32(val); return (tmp); } } extern char *strcpy(char * , char const * ) ; __inline static int atomic_read(atomic_t const *v ) { int __var ; { __var = 0; return ((int )*((int const volatile *)(& v->counter))); } } __inline static void atomic_set(atomic_t *v , int i ) { { v->counter = i; return; } } __inline static void atomic64_inc(atomic64_t *v ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; incq %0": "=m" (v->counter): "m" (v->counter)); return; } } __inline static void atomic_long_inc(atomic_long_t *l ) { atomic64_t *v ; { v = l; atomic64_inc(v); return; } } int ldv_mutex_trylock_157(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_155(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_158(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_159(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_154(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_156(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_160(struct mutex *ldv_func_arg1 ) ; extern void _raw_spin_lock_bh(raw_spinlock_t * ) ; extern void _raw_spin_unlock_bh(raw_spinlock_t * ) ; __inline static void spin_lock_bh(spinlock_t *lock ) { { _raw_spin_lock_bh(& lock->__annonCompField17.rlock); return; } } __inline static void spin_unlock_bh(spinlock_t *lock ) { { _raw_spin_unlock_bh(& lock->__annonCompField17.rlock); return; } } extern unsigned long volatile jiffies ; __inline static u64 get_jiffies_64(void) { { return ((u64 )jiffies); } } extern void add_timer(struct timer_list * ) ; extern int del_timer_sync(struct timer_list * ) ; int ldv_del_timer_sync_161(struct timer_list *ldv_func_arg1 ) ; extern void wait_for_completion(struct completion * ) ; extern void complete(struct completion * ) ; bool ldv_queue_work_on_149(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_151(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_150(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_153(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_152(struct workqueue_struct *ldv_func_arg1 ) ; extern int send_sig(int , struct task_struct * , int ) ; struct timer_list *ldv_timer_list_3 ; void disable_suitable_timer_8(struct timer_list *timer ) ; int reg_timer_3(struct timer_list *timer ) ; void activate_pending_timer_3(struct timer_list *timer , unsigned long data , int pending_flag ) ; void disable_suitable_timer_3(struct timer_list *timer ) ; void choose_timer_3(struct timer_list *timer ) ; int reg_timer_8(struct timer_list *timer ) ; extern void target_put_session(struct se_session * ) ; extern int transport_send_check_condition_and_sense(struct se_cmd * , sense_reason_t , int ) ; void iscsit_set_dataout_sequence_values(struct iscsi_cmd *cmd ) ; int iscsit_check_pre_dataout(struct iscsi_cmd *cmd , unsigned char *buf ) ; int iscsit_check_post_dataout(struct iscsi_cmd *cmd , unsigned char *buf , u8 data_crc_failed ) ; void iscsit_start_time2retain_handler(struct iscsi_session *sess ) ; int iscsit_stop_time2retain_timer(struct iscsi_session *sess ) ; void iscsit_connection_reinstatement_rcfr(struct iscsi_conn *conn ) ; void iscsit_cause_connection_reinstatement(struct iscsi_conn *conn , int sleep ) ; void iscsit_fall_back_to_erl0(struct iscsi_session *sess ) ; void iscsit_take_action_for_connection_exit(struct iscsi_conn *conn ) ; int iscsit_dump_data_payload(struct iscsi_conn *conn , u32 buf_len , int dump_padding_digest ) ; int iscsit_dataout_datapduinorder_no_fbit(struct iscsi_cmd *cmd , struct iscsi_pdu *pdu ) ; int iscsit_recover_dataout_sequence(struct iscsi_cmd *cmd , u32 pdu_offset , u32 pdu_length ) ; int iscsit_connection_recovery_transport_reset(struct iscsi_conn *conn ) ; struct iscsi_r2t *iscsit_get_r2t_for_eos(struct iscsi_cmd *cmd , u32 offset , u32 length ) ; int iscsit_reject_cmd(struct iscsi_cmd *cmd , u8 reason , unsigned char *buf ) ; int iscsit_close_connection(struct iscsi_conn *conn ) ; void iscsit_set_dataout_sequence_values(struct iscsi_cmd *cmd ) { struct iscsi_conn *conn ; { conn = cmd->conn; if ((unsigned int )cmd->unsolicited_data != 0U) { cmd->seq_start_offset = cmd->write_data_done; cmd->seq_end_offset = cmd->write_data_done + (((conn->sess)->sess_ops)->FirstBurstLength < cmd->se_cmd.data_length ? ((conn->sess)->sess_ops)->FirstBurstLength : cmd->se_cmd.data_length); return; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder == 0U) { return; } else { } if (cmd->seq_start_offset == 0U && cmd->seq_end_offset == 0U) { cmd->seq_start_offset = cmd->write_data_done; cmd->seq_end_offset = cmd->se_cmd.data_length > ((conn->sess)->sess_ops)->MaxBurstLength ? cmd->write_data_done + ((conn->sess)->sess_ops)->MaxBurstLength : cmd->se_cmd.data_length; } else { cmd->seq_start_offset = cmd->seq_end_offset; cmd->seq_end_offset = cmd->seq_end_offset + ((conn->sess)->sess_ops)->MaxBurstLength < cmd->se_cmd.data_length ? cmd->seq_end_offset + ((conn->sess)->sess_ops)->MaxBurstLength : cmd->se_cmd.data_length; } return; } } static int iscsit_dataout_within_command_recovery_check(struct iscsi_cmd *cmd , unsigned char *buf ) { struct iscsi_conn *conn ; struct iscsi_data *hdr ; u32 payload_length ; __u32 tmp ; struct iscsi_seq *seq ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; int tmp___4 ; { conn = cmd->conn; hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { if (((unsigned int )cmd->cmd_flags & 16U) != 0U) { tmp = __fswab32(hdr->offset); if (cmd->write_data_done != tmp) { goto dump; } else { } } else { } cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags & 4294967279U); } else { tmp___0 = __fswab32(hdr->offset); seq = iscsit_get_seq_holder(cmd, tmp___0, payload_length); if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { return (-1); } else { } cmd->seq_ptr = seq; if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { if (seq->status == 2) { tmp___1 = __fswab32(hdr->offset); if (seq->offset != tmp___1) { goto dump; } else { tmp___2 = __fswab32(hdr->datasn); if (seq->data_sn != tmp___2) { goto dump; } else { } } } else { } } else if (seq->status == 2) { tmp___3 = __fswab32(hdr->datasn); if (seq->data_sn != tmp___3) { goto dump; } else { } } else { } if (seq->status == 3) { goto dump; } else { } if (seq->status != 3) { seq->status = 0; } else { } } return (0); dump: printk("\vDumping DataOUT PDU Offset: %u Length: %d DataSN: 0x%08x\n", hdr->offset, payload_length, hdr->datasn); tmp___4 = iscsit_dump_data_payload(conn, payload_length, 1); return (tmp___4); } } static int iscsit_dataout_check_unsolicited_sequence(struct iscsi_cmd *cmd , unsigned char *buf ) { u32 first_burst_len ; struct iscsi_conn *conn ; struct iscsi_data *hdr ; u32 payload_length ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; { conn = cmd->conn; hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); tmp___0 = __fswab32(hdr->offset); if (tmp___0 < cmd->seq_start_offset) { tmp = __fswab32(hdr->offset); printk("\vCommand ITT: 0x%08x with Offset: %u, Length: %u outside of Unsolicited Sequence %u:%u while DataSequenceInOrder=Yes.\n", cmd->init_task_tag, tmp, payload_length, cmd->seq_start_offset, cmd->seq_end_offset); return (-1); } else { tmp___1 = __fswab32(hdr->offset); if (tmp___1 + payload_length > cmd->seq_end_offset) { tmp = __fswab32(hdr->offset); printk("\vCommand ITT: 0x%08x with Offset: %u, Length: %u outside of Unsolicited Sequence %u:%u while DataSequenceInOrder=Yes.\n", cmd->init_task_tag, tmp, payload_length, cmd->seq_start_offset, cmd->seq_end_offset); return (-1); } else { } } first_burst_len = cmd->first_burst_len + payload_length; if (((conn->sess)->sess_ops)->FirstBurstLength < first_burst_len) { printk("\vTotal %u bytes exceeds FirstBurstLength: %u for this Unsolicited DataOut Burst.\n", first_burst_len, ((conn->sess)->sess_ops)->FirstBurstLength); transport_send_check_condition_and_sense(& cmd->se_cmd, 3U, 0); return (-1); } else { } if ((int )((signed char )hdr->flags) < 0) { if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { goto out; } else { } if (cmd->se_cmd.data_length != first_burst_len && ((conn->sess)->sess_ops)->FirstBurstLength != first_burst_len) { printk("\vUnsolicited non-immediate data received %u does not equal FirstBurstLength: %u, and does not equal ExpXferLen %u.\n", first_burst_len, ((conn->sess)->sess_ops)->FirstBurstLength, cmd->se_cmd.data_length); transport_send_check_condition_and_sense(& cmd->se_cmd, 3U, 0); return (-1); } else { } } else { if (((conn->sess)->sess_ops)->FirstBurstLength == first_burst_len) { printk("\vCommand ITT: 0x%08x reached FirstBurstLength: %u, but ISCSI_FLAG_CMD_FINAL is not set. protocol error.\n", cmd->init_task_tag, ((conn->sess)->sess_ops)->FirstBurstLength); return (-1); } else { } if (cmd->se_cmd.data_length == first_burst_len) { printk("\vCommand ITT: 0x%08x reached ExpXferLen: %u, but ISCSI_FLAG_CMD_FINAL is not set. protocol error.\n", cmd->init_task_tag, cmd->se_cmd.data_length); return (-1); } else { } } out: ; return (0); } } static int iscsit_dataout_check_sequence(struct iscsi_cmd *cmd , unsigned char *buf ) { u32 next_burst_len ; struct iscsi_conn *conn ; struct iscsi_seq *seq ; struct iscsi_data *hdr ; u32 payload_length ; __u32 tmp ; int tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; int tmp___4 ; { conn = cmd->conn; seq = (struct iscsi_seq *)0; hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { tmp___1 = __fswab32(hdr->offset); if (tmp___1 < cmd->seq_start_offset) { goto _L; } else { tmp___2 = __fswab32(hdr->offset); if (tmp___2 + payload_length > cmd->seq_end_offset) { _L: /* CIL Label */ tmp = __fswab32(hdr->offset); printk("\vCommand ITT: 0x%08x with Offset: %u, Length: %u outside of Sequence %u:%u while DataSequenceInOrder=Yes.\n", cmd->init_task_tag, tmp, payload_length, cmd->seq_start_offset, cmd->seq_end_offset); tmp___0 = iscsit_dump_data_payload(conn, payload_length, 1); if (tmp___0 < 0) { return (-1); } else { } return (3); } else { } } next_burst_len = cmd->next_burst_len + payload_length; } else { tmp___3 = __fswab32(hdr->offset); seq = iscsit_get_seq_holder(cmd, tmp___3, payload_length); if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { return (-1); } else { } cmd->seq_ptr = seq; if (seq->status == 3) { tmp___4 = iscsit_dump_data_payload(conn, payload_length, 1); if (tmp___4 < 0) { return (-1); } else { } return (3); } else { } next_burst_len = seq->next_burst_len + payload_length; } if (((conn->sess)->sess_ops)->MaxBurstLength < next_burst_len) { printk("\vCommand ITT: 0x%08x, NextBurstLength: %u and Length: %u exceeds MaxBurstLength: %u. protocol error.\n", cmd->init_task_tag, next_burst_len - payload_length, payload_length, ((conn->sess)->sess_ops)->MaxBurstLength); return (-1); } else { } if ((int )((signed char )hdr->flags) < 0) { if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { goto out; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { if (((conn->sess)->sess_ops)->MaxBurstLength > next_burst_len && cmd->write_data_done + payload_length < cmd->se_cmd.data_length) { printk("\vCommand ITT: 0x%08x set ISCSI_FLAG_CMD_FINAL before end of DataOUT sequence, protocol error.\n", cmd->init_task_tag); return (-1); } else { } } else if (seq->xfer_len > next_burst_len) { printk("\vCommand ITT: 0x%08x set ISCSI_FLAG_CMD_FINAL before end of DataOUT sequence, protocol error.\n", cmd->init_task_tag); return (-1); } else { } } else if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { if (((conn->sess)->sess_ops)->MaxBurstLength == next_burst_len) { printk("\vCommand ITT: 0x%08x reached MaxBurstLength: %u, but ISCSI_FLAG_CMD_FINAL is not set, protocol error.", cmd->init_task_tag, ((conn->sess)->sess_ops)->MaxBurstLength); return (-1); } else { } if (cmd->write_data_done + payload_length == cmd->se_cmd.data_length) { printk("\vCommand ITT: 0x%08x reached last DataOUT PDU in sequence but ISCSI_FLAG_CMD_FINAL is not set, protocol error.\n", cmd->init_task_tag); return (-1); } else { } } else if (seq->xfer_len == next_burst_len) { printk("\vCommand ITT: 0x%08x reached last DataOUT PDU in sequence but ISCSI_FLAG_CMD_FINAL is not set, protocol error.\n", cmd->init_task_tag); return (-1); } else { } out: ; return (0); } } static int iscsit_dataout_check_datasn(struct iscsi_cmd *cmd , unsigned char *buf ) { u32 data_sn ; struct iscsi_conn *conn ; struct iscsi_data *hdr ; u32 payload_length ; struct iscsi_seq *seq ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; int tmp___3 ; { data_sn = 0U; conn = cmd->conn; hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { data_sn = cmd->data_sn; } else { seq = cmd->seq_ptr; data_sn = seq->data_sn; } tmp___2 = __fswab32(hdr->datasn); if (tmp___2 > data_sn) { tmp = __fswab32(hdr->datasn); printk("\vCommand ITT: 0x%08x, received DataSN: 0x%08x higher than expected 0x%08x.\n", cmd->init_task_tag, tmp, data_sn); goto recover; } else { tmp___1 = __fswab32(hdr->datasn); if (tmp___1 < data_sn) { tmp___0 = __fswab32(hdr->datasn); printk("\vCommand ITT: 0x%08x, received DataSN: 0x%08x lower than expected 0x%08x, discarding payload.\n", cmd->init_task_tag, tmp___0, data_sn); goto dump; } else { } } return (0); recover: ; if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel == 0U) { printk("\vUnable to perform within-command recovery while ERL=0.\n"); return (-1); } else { } dump: tmp___3 = iscsit_dump_data_payload(conn, payload_length, 1); if (tmp___3 < 0) { return (-1); } else { } return (3); } } static int iscsit_dataout_pre_datapduinorder_yes(struct iscsi_cmd *cmd , unsigned char *buf ) { int dump ; int recovery ; struct iscsi_conn *conn ; struct iscsi_data *hdr ; u32 payload_length ; __u32 tmp ; __u32 tmp___0 ; struct iscsi_seq *seq ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; int tmp___5 ; __u32 tmp___6 ; int tmp___7 ; int tmp___8 ; { dump = 0; recovery = 0; conn = cmd->conn; hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { tmp___0 = __fswab32(hdr->offset); if (tmp___0 != cmd->write_data_done) { tmp = __fswab32(hdr->offset); printk("\vCommand ITT: 0x%08x, received offset %u different than expected %u.\n", cmd->init_task_tag, tmp, cmd->write_data_done); recovery = 1; goto recover; } else { } } else { seq = cmd->seq_ptr; tmp___4 = __fswab32(hdr->offset); if (tmp___4 > seq->offset) { tmp___1 = __fswab32(hdr->offset); printk("\vCommand ITT: 0x%08x, received offset %u greater than expected %u.\n", cmd->init_task_tag, tmp___1, seq->offset); recovery = 1; goto recover; } else { tmp___3 = __fswab32(hdr->offset); if (tmp___3 < seq->offset) { tmp___2 = __fswab32(hdr->offset); printk("\vCommand ITT: 0x%08x, received offset %u less than expected %u, discarding payload.\n", cmd->init_task_tag, tmp___2, seq->offset); dump = 1; goto dump; } else { } } } return (0); recover: ; if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel == 0U) { printk("\vUnable to perform within-command recovery while ERL=0.\n"); return (-1); } else { } dump: tmp___5 = iscsit_dump_data_payload(conn, payload_length, 1); if (tmp___5 < 0) { return (-1); } else { } if (recovery != 0) { tmp___6 = __fswab32(hdr->offset); tmp___7 = iscsit_recover_dataout_sequence(cmd, tmp___6, payload_length); tmp___8 = tmp___7; } else { tmp___8 = dump != 0 ? 3 : 0; } return (tmp___8); } } static int iscsit_dataout_pre_datapduinorder_no(struct iscsi_cmd *cmd , unsigned char *buf ) { struct iscsi_pdu *pdu ; struct iscsi_data *hdr ; u32 payload_length ; __u32 tmp ; __u32 tmp___0 ; int tmp___1 ; { hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); tmp = __fswab32(hdr->offset); pdu = iscsit_get_pdu_holder(cmd, tmp, payload_length); if ((unsigned long )pdu == (unsigned long )((struct iscsi_pdu *)0)) { return (-1); } else { } cmd->pdu_ptr = pdu; switch (pdu->status) { case 0: ; case 2: ; case 3: ; goto ldv_57782; case 1: tmp___0 = __fswab32(hdr->offset); printk("\vCommand ITT: 0x%08x received already gotten Offset: %u, Length: %u\n", cmd->init_task_tag, tmp___0, payload_length); tmp___1 = iscsit_dump_data_payload(cmd->conn, payload_length, 1); return (tmp___1); default: ; return (-1); } ldv_57782: ; return (0); } } static int iscsit_dataout_update_r2t(struct iscsi_cmd *cmd , u32 offset , u32 length ) { struct iscsi_r2t *r2t ; { if ((unsigned int )cmd->unsolicited_data != 0U) { return (0); } else { } r2t = iscsit_get_r2t_for_eos(cmd, offset, length); if ((unsigned long )r2t == (unsigned long )((struct iscsi_r2t *)0)) { return (-1); } else { } spin_lock_bh(& cmd->r2t_lock); r2t->seq_complete = 1; cmd->outstanding_r2ts = cmd->outstanding_r2ts - 1U; spin_unlock_bh(& cmd->r2t_lock); return (0); } } static int iscsit_dataout_update_datapduinorder_no(struct iscsi_cmd *cmd , u32 data_sn , int f_bit ) { int ret ; struct iscsi_pdu *pdu ; { ret = 0; pdu = cmd->pdu_ptr; pdu->data_sn = data_sn; switch (pdu->status) { case 0: pdu->status = 1; goto ldv_57799; case 2: pdu->status = 1; goto ldv_57799; case 3: pdu->status = 1; goto ldv_57799; default: ; return (-1); } ldv_57799: ; if (f_bit != 0) { ret = iscsit_dataout_datapduinorder_no_fbit(cmd, pdu); if (ret == -1) { return (ret); } else { } } else { } return (0); } } static int iscsit_dataout_post_crc_passed(struct iscsi_cmd *cmd , unsigned char *buf ) { int ret ; int send_r2t ; struct iscsi_conn *conn ; struct iscsi_seq *seq ; struct iscsi_data *hdr ; u32 payload_length ; __u32 tmp ; int tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; int tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; int tmp___6 ; __u32 tmp___7 ; { send_r2t = 0; conn = cmd->conn; seq = (struct iscsi_seq *)0; hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((unsigned int )cmd->unsolicited_data != 0U) { if (cmd->first_burst_len + payload_length == ((conn->sess)->sess_ops)->FirstBurstLength) { tmp = __fswab32(hdr->offset); tmp___0 = iscsit_dataout_update_r2t(cmd, tmp, payload_length); if (tmp___0 < 0) { return (-1); } else { } send_r2t = 1; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { tmp___1 = __fswab32(hdr->datasn); ret = iscsit_dataout_update_datapduinorder_no(cmd, tmp___1, (int )hdr->flags & 128); if (ret == -1) { return (ret); } else { } } else { } cmd->first_burst_len = cmd->first_burst_len + payload_length; if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { cmd->data_sn = cmd->data_sn + 1U; } else { seq = cmd->seq_ptr; seq->data_sn = seq->data_sn + 1U; seq->offset = seq->offset + payload_length; } if (send_r2t != 0) { if ((unsigned long )seq != (unsigned long )((struct iscsi_seq *)0)) { seq->status = 3; } else { } cmd->first_burst_len = 0U; cmd->unsolicited_data = 0U; } else { } } else if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { if (cmd->next_burst_len + payload_length == ((conn->sess)->sess_ops)->MaxBurstLength) { tmp___2 = __fswab32(hdr->offset); tmp___3 = iscsit_dataout_update_r2t(cmd, tmp___2, payload_length); if (tmp___3 < 0) { return (-1); } else { } send_r2t = 1; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { tmp___4 = __fswab32(hdr->datasn); ret = iscsit_dataout_update_datapduinorder_no(cmd, tmp___4, (int )hdr->flags & 128); if (ret == -1) { return (ret); } else { } } else { } cmd->next_burst_len = cmd->next_burst_len + payload_length; cmd->data_sn = cmd->data_sn + 1U; if (send_r2t != 0) { cmd->next_burst_len = 0U; } else { } } else { seq = cmd->seq_ptr; if (seq->next_burst_len + payload_length == seq->xfer_len) { tmp___5 = __fswab32(hdr->offset); tmp___6 = iscsit_dataout_update_r2t(cmd, tmp___5, payload_length); if (tmp___6 < 0) { return (-1); } else { } send_r2t = 1; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { tmp___7 = __fswab32(hdr->datasn); ret = iscsit_dataout_update_datapduinorder_no(cmd, tmp___7, (int )hdr->flags & 128); if (ret == -1) { return (ret); } else { } } else { } seq->data_sn = seq->data_sn + 1U; seq->offset = seq->offset + payload_length; seq->next_burst_len = seq->next_burst_len + payload_length; if (send_r2t != 0) { seq->next_burst_len = 0U; seq->status = 3; } else { } } if (send_r2t != 0 && (unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { cmd->data_sn = 0U; } else { } cmd->write_data_done = cmd->write_data_done + payload_length; if (cmd->write_data_done == cmd->se_cmd.data_length) { return (2); } else if (send_r2t != 0) { return (1); } else { return (0); } } } static int iscsit_dataout_post_crc_failed(struct iscsi_cmd *cmd , unsigned char *buf ) { struct iscsi_conn *conn ; struct iscsi_pdu *pdu ; struct iscsi_data *hdr ; u32 payload_length ; __u32 tmp ; int tmp___0 ; { conn = cmd->conn; hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { goto recover; } else { } pdu = cmd->pdu_ptr; switch (pdu->status) { case 0: pdu->status = 2; goto ldv_57823; case 2: ; goto ldv_57823; case 3: pdu->status = 2; goto ldv_57823; default: ; return (-1); } ldv_57823: ; recover: tmp = __fswab32(hdr->offset); tmp___0 = iscsit_recover_dataout_sequence(cmd, tmp, payload_length); return (tmp___0); } } int iscsit_check_pre_dataout(struct iscsi_cmd *cmd , unsigned char *buf ) { int ret ; struct iscsi_conn *conn ; int tmp ; int tmp___0 ; int tmp___1 ; { conn = cmd->conn; ret = iscsit_dataout_within_command_recovery_check(cmd, buf); if (ret == 3 || ret == -1) { return (ret); } else { } ret = iscsit_dataout_check_datasn(cmd, buf); if (ret == 3 || ret == -1) { return (ret); } else { } if ((unsigned int )cmd->unsolicited_data != 0U) { ret = iscsit_dataout_check_unsolicited_sequence(cmd, buf); if (ret == 3 || ret == -1) { return (ret); } else { } } else { ret = iscsit_dataout_check_sequence(cmd, buf); if (ret == 3 || ret == -1) { return (ret); } else { } } if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { tmp = iscsit_dataout_pre_datapduinorder_yes(cmd, buf); tmp___1 = tmp; } else { tmp___0 = iscsit_dataout_pre_datapduinorder_no(cmd, buf); tmp___1 = tmp___0; } return (tmp___1); } } int iscsit_check_post_dataout(struct iscsi_cmd *cmd , unsigned char *buf , u8 data_crc_failed ) { struct iscsi_conn *conn ; int tmp ; int tmp___0 ; { conn = cmd->conn; cmd->dataout_timeout_retries = 0U; if ((unsigned int )data_crc_failed == 0U) { tmp = iscsit_dataout_post_crc_passed(cmd, buf); return (tmp); } else { if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel == 0U) { printk("\vUnable to recover from DataOUT CRC failure while ERL=0, closing session.\n"); iscsit_reject_cmd(cmd, 2, buf); return (-1); } else { } iscsit_reject_cmd(cmd, 2, buf); tmp___0 = iscsit_dataout_post_crc_failed(cmd, buf); return (tmp___0); } } } static void iscsit_handle_time2retain_timeout(unsigned long data ) { struct iscsi_session *sess ; struct iscsi_portal_group *tpg ; struct se_portal_group *se_tpg ; int tmp ; struct iscsi_tiqn *tiqn ; { sess = (struct iscsi_session *)data; tpg = sess->tpg; se_tpg = & tpg->tpg_se_tpg; spin_lock_bh(& se_tpg->session_lock); if (((unsigned int )sess->time2retain_timer_flags & 2U) != 0U) { spin_unlock_bh(& se_tpg->session_lock); return; } else { } tmp = atomic_read((atomic_t const *)(& sess->session_reinstatement)); if (tmp != 0) { printk("\vExiting Time2Retain handler because session_reinstatement=1\n"); spin_unlock_bh(& se_tpg->session_lock); return; } else { } sess->time2retain_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )sess->time2retain_timer_flags | 4U); printk("\vTime2Retain timer expired for SID: %u, cleaning up iSCSI session.\n", sess->sid); tiqn = tpg->tpg_tiqn; if ((unsigned long )tiqn != (unsigned long )((struct iscsi_tiqn *)0)) { spin_lock(& tiqn->sess_err_stats.lock); strcpy((char *)(& tiqn->sess_err_stats.last_sess_fail_rem_name), (char const *)(& (sess->sess_ops)->InitiatorName)); tiqn->sess_err_stats.last_sess_failure_type = 2U; tiqn->sess_err_stats.cxn_timeout_errors = tiqn->sess_err_stats.cxn_timeout_errors + 1U; atomic_long_inc(& sess->conn_timeout_errors); spin_unlock(& tiqn->sess_err_stats.lock); } else { } spin_unlock_bh(& se_tpg->session_lock); target_put_session(sess->se_sess); return; } } void iscsit_start_time2retain_handler(struct iscsi_session *sess ) { int tpg_active ; struct _ddebug descriptor ; long tmp ; u64 tmp___0 ; { spin_lock(& (sess->tpg)->tpg_state_lock); tpg_active = (unsigned int )(sess->tpg)->tpg_state == 1U; spin_unlock(& (sess->tpg)->tpg_state_lock); if (tpg_active == 0) { return; } else { } if ((int )sess->time2retain_timer_flags & 1) { return; } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_start_time2retain_handler"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl0.c"; descriptor.format = "Starting Time2Retain timer for %u seconds on SID: %u\n"; descriptor.lineno = 810U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Starting Time2Retain timer for %u seconds on SID: %u\n", (int )(sess->sess_ops)->DefaultTime2Retain, sess->sid); } else { } reg_timer_8(& sess->time2retain_timer); tmp___0 = get_jiffies_64(); sess->time2retain_timer.expires = (unsigned long )(tmp___0 + (u64 )((int )(sess->sess_ops)->DefaultTime2Retain * 250)); sess->time2retain_timer.data = (unsigned long )sess; sess->time2retain_timer.function = & iscsit_handle_time2retain_timeout; sess->time2retain_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )sess->time2retain_timer_flags & 4294967293U); sess->time2retain_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )sess->time2retain_timer_flags | 1U); add_timer(& sess->time2retain_timer); return; } } int iscsit_stop_time2retain_timer(struct iscsi_session *sess ) { struct iscsi_portal_group *tpg ; struct se_portal_group *se_tpg ; struct _ddebug descriptor ; long tmp ; { tpg = sess->tpg; se_tpg = & tpg->tpg_se_tpg; if (((unsigned int )sess->time2retain_timer_flags & 4U) != 0U) { return (-1); } else { } if (((unsigned int )sess->time2retain_timer_flags & 1U) == 0U) { return (0); } else { } sess->time2retain_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )sess->time2retain_timer_flags | 2U); spin_unlock(& se_tpg->session_lock); ldv_del_timer_sync_161(& sess->time2retain_timer); spin_lock(& se_tpg->session_lock); sess->time2retain_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )sess->time2retain_timer_flags & 4294967294U); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_stop_time2retain_timer"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl0.c"; descriptor.format = "Stopped Time2Retain Timer for SID: %u\n"; descriptor.lineno = 844U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Stopped Time2Retain Timer for SID: %u\n", sess->sid); } else { } return (0); } } void iscsit_connection_reinstatement_rcfr(struct iscsi_conn *conn ) { int tmp ; int tmp___0 ; { spin_lock_bh(& conn->state_lock); tmp = atomic_read((atomic_t const *)(& conn->connection_exit)); if (tmp != 0) { spin_unlock_bh(& conn->state_lock); goto sleep; } else { } tmp___0 = atomic_read((atomic_t const *)(& conn->transport_failed)); if (tmp___0 != 0) { spin_unlock_bh(& conn->state_lock); goto sleep; } else { } spin_unlock_bh(& conn->state_lock); if ((unsigned long )conn->tx_thread != (unsigned long )((struct task_struct *)0) && conn->tx_thread_active != 0) { send_sig(2, conn->tx_thread, 1); } else { } if ((unsigned long )conn->rx_thread != (unsigned long )((struct task_struct *)0) && conn->rx_thread_active != 0) { send_sig(2, conn->rx_thread, 1); } else { } sleep: wait_for_completion(& conn->conn_wait_rcfr_comp); complete(& conn->conn_post_wait_comp); return; } } void iscsit_cause_connection_reinstatement(struct iscsi_conn *conn , int sleep ) { int tmp ; int tmp___0 ; int tmp___1 ; { spin_lock_bh(& conn->state_lock); tmp = atomic_read((atomic_t const *)(& conn->connection_exit)); if (tmp != 0) { spin_unlock_bh(& conn->state_lock); return; } else { } tmp___0 = atomic_read((atomic_t const *)(& conn->transport_failed)); if (tmp___0 != 0) { spin_unlock_bh(& conn->state_lock); return; } else { } tmp___1 = atomic_read((atomic_t const *)(& conn->connection_reinstatement)); if (tmp___1 != 0) { spin_unlock_bh(& conn->state_lock); return; } else { } if ((unsigned long )conn->tx_thread != (unsigned long )((struct task_struct *)0) && conn->tx_thread_active != 0) { send_sig(2, conn->tx_thread, 1); } else { } if ((unsigned long )conn->rx_thread != (unsigned long )((struct task_struct *)0) && conn->rx_thread_active != 0) { send_sig(2, conn->rx_thread, 1); } else { } atomic_set(& conn->connection_reinstatement, 1); if (sleep == 0) { spin_unlock_bh(& conn->state_lock); return; } else { } atomic_set(& conn->sleep_on_conn_wait_comp, 1); spin_unlock_bh(& conn->state_lock); wait_for_completion(& conn->conn_wait_comp); complete(& conn->conn_post_wait_comp); return; } } static char const __kstrtab_iscsit_cause_connection_reinstatement[38U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'c', 'a', 'u', 's', 'e', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'r', 'e', 'i', 'n', 's', 't', 'a', 't', 'e', 'm', 'e', 'n', 't', '\000'}; struct kernel_symbol const __ksymtab_iscsit_cause_connection_reinstatement ; struct kernel_symbol const __ksymtab_iscsit_cause_connection_reinstatement = {(unsigned long )(& iscsit_cause_connection_reinstatement), (char const *)(& __kstrtab_iscsit_cause_connection_reinstatement)}; void iscsit_fall_back_to_erl0(struct iscsi_session *sess ) { struct _ddebug descriptor ; long tmp ; { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_fall_back_to_erl0"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl0.c"; descriptor.format = "Falling back to ErrorRecoveryLevel=0 for SID: %u\n"; descriptor.lineno = 912U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Falling back to ErrorRecoveryLevel=0 for SID: %u\n", sess->sid); } else { } atomic_set(& sess->session_fall_back_to_erl0, 1); return; } } static void iscsit_handle_connection_cleanup(struct iscsi_conn *conn ) { struct iscsi_session *sess ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; int tmp___1 ; { sess = conn->sess; if ((unsigned int )(sess->sess_ops)->ErrorRecoveryLevel == 2U) { tmp___0 = atomic_read((atomic_t const *)(& sess->session_reinstatement)); if (tmp___0 == 0) { tmp___1 = atomic_read((atomic_t const *)(& sess->session_fall_back_to_erl0)); if (tmp___1 == 0) { iscsit_connection_recovery_transport_reset(conn); } else { goto _L___0; } } else { goto _L___0; } } else { _L___0: /* CIL Label */ descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_connection_cleanup"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl0.c"; descriptor.format = "Performing cleanup for failed iSCSI Connection ID: %hu from %s\n"; descriptor.lineno = 928U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Performing cleanup for failed iSCSI Connection ID: %hu from %s\n", (int )conn->cid, (char *)(& (sess->sess_ops)->InitiatorName)); } else { } iscsit_close_connection(conn); } return; } } void iscsit_take_action_for_connection_exit(struct iscsi_conn *conn ) { int tmp ; struct _ddebug descriptor ; long tmp___0 ; { spin_lock_bh(& conn->state_lock); tmp = atomic_read((atomic_t const *)(& conn->connection_exit)); if (tmp != 0) { spin_unlock_bh(& conn->state_lock); return; } else { } atomic_set(& conn->connection_exit, 1); if ((unsigned int )conn->conn_state == 6U) { spin_unlock_bh(& conn->state_lock); iscsit_close_connection(conn); return; } else { } if ((unsigned int )conn->conn_state == 8U) { spin_unlock_bh(& conn->state_lock); return; } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_take_action_for_connection_exit"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl0.c"; descriptor.format = "Moving to TARG_CONN_STATE_CLEANUP_WAIT.\n"; descriptor.lineno = 953U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Moving to TARG_CONN_STATE_CLEANUP_WAIT.\n"); } else { } conn->conn_state = 8U; spin_unlock_bh(& conn->state_lock); iscsit_handle_connection_cleanup(conn); return; } } int reg_timer_3(struct timer_list *timer ) { { ldv_timer_list_3 = timer; ldv_timer_state_3 = 1; return (0); } } void activate_pending_timer_3(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_3 == (unsigned long )timer) { if (ldv_timer_state_3 == 2 || pending_flag != 0) { ldv_timer_list_3 = timer; ldv_timer_list_3->data = data; ldv_timer_state_3 = 1; } else { } return; } else { } reg_timer_3(timer); ldv_timer_list_3->data = data; return; } } void disable_suitable_timer_3(struct timer_list *timer ) { { if ((unsigned long )timer == (unsigned long )ldv_timer_list_3) { ldv_timer_state_3 = 0; return; } else { } return; } } void choose_timer_3(struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; (*(timer->function))(timer->data); LDV_IN_INTERRUPT = 1; ldv_timer_state_3 = 2; return; } } bool ldv_queue_work_on_149(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_150(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_151(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_152(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_153(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_154(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_155(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_156(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_157(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_158(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_159(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_160(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_del_timer_sync_161(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; disable_suitable_timer_8(ldv_func_arg1); return (ldv_func_res); } } __inline static long ldv__builtin_expect(long exp , long c ) ; __inline static void list_add(struct list_head *new , struct list_head *head ) { { __list_add(new, head, head->next); return; } } int ldv_mutex_trylock_187(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_185(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_188(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_189(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_192(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_194(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_184(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_186(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_190(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_191(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_193(struct mutex *ldv_func_arg1 ) ; extern int mod_timer(struct timer_list * , unsigned long ) ; int ldv_mod_timer_195(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; int ldv_del_timer_sync_196(struct timer_list *ldv_func_arg1 ) ; bool ldv_queue_work_on_179(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_181(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_180(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_183(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_182(struct workqueue_struct *ldv_func_arg1 ) ; struct timer_list *ldv_timer_list_4 ; void activate_pending_timer_4(struct timer_list *timer , unsigned long data , int pending_flag ) ; void activate_pending_timer_8(struct timer_list *timer , unsigned long data , int pending_flag ) ; void disable_suitable_timer_4(struct timer_list *timer ) ; void choose_timer_4(struct timer_list *timer ) ; int reg_timer_4(struct timer_list *timer ) ; __inline static int iscsi_sna_lt(u32 n1 , u32 n2 ) { { return ((int )(n1 - n2) < 0); } } extern int transport_handle_cdb_direct(struct se_cmd * ) ; extern void target_execute_cmd(struct se_cmd * ) ; extern int transport_check_aborted_status(struct se_cmd * , int ) ; extern int transport_generic_handle_tmr(struct se_cmd * ) ; struct iscsi_cmd *iscsit_find_cmd_from_itt(struct iscsi_conn *conn , itt_t init_task_tag ) ; void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *cmd ) ; void iscsit_stop_dataout_timer(struct iscsi_cmd *cmd ) ; int iscsit_add_r2t_to_list(struct iscsi_cmd *cmd , u32 offset , u32 xfer_len , int recovery , u32 r2t_sn ) ; struct iscsi_r2t *iscsit_get_holder_for_r2tsn(struct iscsi_cmd *cmd , u32 r2t_sn ) ; struct iscsi_cmd *iscsit_find_cmd_from_ttt(struct iscsi_conn *conn , u32 targ_xfer_tag ) ; void iscsit_add_cmd_to_immediate_queue(struct iscsi_cmd *cmd , struct iscsi_conn *conn , u8 state ) ; void iscsit_add_cmd_to_response_queue(struct iscsi_cmd *cmd , struct iscsi_conn *conn , u8 state ) ; void iscsit_dec_conn_usage_count(struct iscsi_conn *conn ) ; void iscsit_inc_conn_usage_count(struct iscsi_conn *conn ) ; int iscsit_handle_recovery_datain_or_r2t(struct iscsi_conn *conn , unsigned char *buf , itt_t init_task_tag , u32 targ_xfer_tag , u32 begrun , u32 runlength ) ; int iscsit_handle_status_snack(struct iscsi_conn *conn , itt_t init_task_tag , u32 targ_xfer_tag , u32 begrun , u32 runlength ) ; int iscsit_handle_data_ack(struct iscsi_conn *conn , u32 targ_xfer_tag , u32 begrun , u32 runlength ) ; void iscsit_clear_ooo_cmdsns_for_conn(struct iscsi_conn *conn ) ; void iscsit_free_all_ooo_cmdsns(struct iscsi_session *sess ) ; int iscsit_execute_ooo_cmdsns(struct iscsi_session *sess ) ; int iscsit_execute_cmd(struct iscsi_cmd *cmd , int ooo ) ; int iscsit_handle_ooo_cmdsn(struct iscsi_session *sess , struct iscsi_cmd *cmd , u32 cmdsn ) ; void iscsit_remove_ooo_cmdsn(struct iscsi_session *sess , struct iscsi_ooo_cmdsn *ooo_cmdsn ) ; void iscsit_mod_dataout_timer(struct iscsi_cmd *cmd ) ; void iscsit_start_dataout_timer(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) ; int iscsit_logout_closesession(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) ; int iscsit_logout_closeconnection(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) ; int iscsit_logout_removeconnforrecovery(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) ; struct kmem_cache *lio_ooo_cache ; int iscsit_dump_data_payload(struct iscsi_conn *conn , u32 buf_len , int dump_padding_digest ) { char *buf ; char pad_bytes[4U] ; int ret ; int rx_got ; u32 length ; u32 padding ; u32 offset ; u32 size ; struct kvec iov ; void *tmp ; u32 data_crc ; { ret = 3; offset = 0U; if ((unsigned int )((conn->sess)->sess_ops)->RDMAExtensions != 0U) { return (0); } else { } length = 32768U < buf_len ? 32768U : buf_len; tmp = kzalloc((size_t )length, 32U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { printk("\vUnable to allocate %u bytes for offload buffer.\n", length); return (-1); } else { } memset((void *)(& iov), 0, 16UL); goto ldv_58914; ldv_58913: size = offset + length > buf_len ? buf_len - offset : length; iov.iov_len = (size_t )size; iov.iov_base = (void *)buf; rx_got = rx_data(conn, & iov, 1, (int )size); if ((u32 )rx_got != size) { ret = -1; goto out; } else { } offset = offset + size; ldv_58914: ; if (offset < buf_len) { goto ldv_58913; } else { } if (dump_padding_digest == 0) { goto out; } else { } padding = - buf_len & 3U; if (padding != 0U) { iov.iov_len = (size_t )padding; iov.iov_base = (void *)(& pad_bytes); rx_got = rx_data(conn, & iov, 1, (int )padding); if ((u32 )rx_got != padding) { ret = -1; goto out; } else { } } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iov.iov_len = 4UL; iov.iov_base = (void *)(& data_crc); rx_got = rx_data(conn, & iov, 1, 4); if (rx_got != 4) { ret = -1; goto out; } else { } } else { } out: kfree((void const *)buf); return (ret); } } static int iscsit_send_recovery_r2t_for_snack(struct iscsi_cmd *cmd , struct iscsi_r2t *r2t ) { { spin_lock_bh(& cmd->r2t_lock); if (r2t->sent_r2t == 0) { spin_unlock_bh(& cmd->r2t_lock); return (0); } else { } r2t->sent_r2t = 0; spin_unlock_bh(& cmd->r2t_lock); iscsit_add_cmd_to_immediate_queue(cmd, cmd->conn, 21); return (0); } } static int iscsit_handle_r2t_snack(struct iscsi_cmd *cmd , unsigned char *buf , u32 begrun , u32 runlength ) { u32 last_r2tsn ; struct iscsi_r2t *r2t ; int tmp ; int tmp___0 ; int tmp___1 ; { if (((unsigned int )cmd->cmd_flags & 2U) != 0U && cmd->acked_data_sn >= begrun) { printk("\vITT: 0x%08x, R2T SNACK requesting retransmission of R2TSN: 0x%08x to 0x%08x but already acked to R2TSN: 0x%08x by TMR TASK_REASSIGN, protocol error.\n", cmd->init_task_tag, begrun, begrun + runlength, cmd->acked_data_sn); tmp = iscsit_reject_cmd(cmd, 4, buf); return (tmp); } else { } if (runlength != 0U) { if (begrun + runlength > cmd->r2t_sn) { printk("\vCommand ITT: 0x%08x received R2T SNACK with BegRun: 0x%08x, RunLength: 0x%08x, exceeds current R2TSN: 0x%08x, protocol error.\n", cmd->init_task_tag, begrun, runlength, cmd->r2t_sn); tmp___0 = iscsit_reject_cmd(cmd, 9, buf); return (tmp___0); } else { } last_r2tsn = begrun + runlength; } else { last_r2tsn = cmd->r2t_sn; } goto ldv_58930; ldv_58929: r2t = iscsit_get_holder_for_r2tsn(cmd, begrun); if ((unsigned long )r2t == (unsigned long )((struct iscsi_r2t *)0)) { return (-1); } else { } tmp___1 = iscsit_send_recovery_r2t_for_snack(cmd, r2t); if (tmp___1 < 0) { return (-1); } else { } begrun = begrun + 1U; ldv_58930: ; if (begrun < last_r2tsn) { goto ldv_58929; } else { } return (0); } } int iscsit_create_recovery_datain_values_datasequenceinorder_yes(struct iscsi_cmd *cmd , struct iscsi_datain_req *dr ) { u32 data_sn ; u32 data_sn_count ; u32 pdu_start ; u32 seq_no ; u32 begrun ; struct iscsi_conn *conn ; u32 tmp ; { data_sn = 0U; data_sn_count = 0U; pdu_start = 0U; seq_no = 0U; begrun = dr->begrun; conn = cmd->conn; goto ldv_58943; ldv_58942: data_sn_count = data_sn_count + 1U; if (dr->next_burst_len + (conn->conn_ops)->MaxRecvDataSegmentLength < ((conn->sess)->sess_ops)->MaxBurstLength) { dr->read_data_done = dr->read_data_done + (conn->conn_ops)->MaxRecvDataSegmentLength; dr->next_burst_len = dr->next_burst_len + (conn->conn_ops)->MaxRecvDataSegmentLength; } else { dr->read_data_done = dr->read_data_done + (((conn->sess)->sess_ops)->MaxBurstLength - dr->next_burst_len); dr->next_burst_len = 0U; pdu_start = pdu_start + data_sn_count; data_sn_count = 0U; seq_no = seq_no + 1U; } ldv_58943: tmp = data_sn; data_sn = data_sn + 1U; if (tmp < begrun) { goto ldv_58942; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder == 0U) { cmd->seq_no = seq_no; cmd->pdu_start = pdu_start; cmd->pdu_send_order = data_sn_count; } else { } return (0); } } int iscsit_create_recovery_datain_values_datasequenceinorder_no(struct iscsi_cmd *cmd , struct iscsi_datain_req *dr ) { int found_seq ; int i ; u32 data_sn ; u32 read_data_done ; u32 seq_send_order ; u32 begrun ; u32 runlength ; struct iscsi_conn *conn ; struct iscsi_seq *first_seq ; struct iscsi_seq *seq ; u32 tmp ; u32 tmp___0 ; int j ; struct iscsi_pdu *pdu ; u32 tmp___1 ; u32 tmp___2 ; { found_seq = 0; read_data_done = 0U; seq_send_order = 0U; begrun = dr->begrun; runlength = dr->runlength; conn = cmd->conn; first_seq = (struct iscsi_seq *)0; seq = (struct iscsi_seq *)0; if ((unsigned long )cmd->seq_list == (unsigned long )((struct iscsi_seq *)0)) { printk("\vstruct iscsi_cmd->seq_list is NULL!\n"); return (-1); } else { } i = 0; goto ldv_58972; ldv_58971: seq = cmd->seq_list + (unsigned long )i; if (seq->seq_send_order == 0U) { first_seq = seq; } else { } if (seq->sent == 0) { printk("\vIgnoring non-sent sequence 0x%08x -> 0x%08x\n\n", seq->first_datasn, seq->last_datasn); goto ldv_58959; } else { } if (seq->first_datasn < begrun && seq->last_datasn < begrun) { printk("\vPre BegRun sequence 0x%08x -> 0x%08x\n", seq->first_datasn, seq->last_datasn); read_data_done = (cmd->seq_list + (unsigned long )i)->xfer_len + read_data_done; tmp = 0U; seq->pdu_send_order = tmp; seq->next_burst_len = tmp; goto ldv_58959; } else { } if (seq->first_datasn <= begrun && seq->last_datasn >= begrun) { printk("\vFound sequence begrun: 0x%08x in 0x%08x -> 0x%08x\n", begrun, seq->first_datasn, seq->last_datasn); seq_send_order = seq->seq_send_order; data_sn = seq->first_datasn; tmp___0 = 0U; seq->pdu_send_order = tmp___0; seq->next_burst_len = tmp___0; found_seq = 1; if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { goto ldv_58961; ldv_58960: seq->pdu_send_order = seq->pdu_send_order + 1U; read_data_done = (conn->conn_ops)->MaxRecvDataSegmentLength + read_data_done; seq->next_burst_len = seq->next_burst_len + (conn->conn_ops)->MaxRecvDataSegmentLength; data_sn = data_sn + 1U; ldv_58961: ; if (data_sn < begrun) { goto ldv_58960; } else { } } else { goto ldv_58969; ldv_58968: seq->pdu_send_order = seq->pdu_send_order + 1U; j = 0; goto ldv_58966; ldv_58965: pdu = cmd->pdu_list + (unsigned long )(seq->pdu_start + (u32 )j); if (pdu->data_sn == data_sn) { read_data_done = pdu->length + read_data_done; seq->next_burst_len = seq->next_burst_len + pdu->length; } else { } j = j + 1; ldv_58966: ; if ((u32 )j < seq->pdu_count) { goto ldv_58965; } else { } data_sn = data_sn + 1U; ldv_58969: ; if (data_sn < begrun) { goto ldv_58968; } else { } } goto ldv_58959; } else { } if (seq->first_datasn > begrun || seq->last_datasn > begrun) { printk("\vPost BegRun sequence 0x%08x -> 0x%08x\n", seq->first_datasn, seq->last_datasn); tmp___1 = 0U; seq->pdu_send_order = tmp___1; seq->next_burst_len = tmp___1; goto ldv_58959; } else { } ldv_58959: i = i + 1; ldv_58972: ; if ((u32 )i < cmd->seq_count) { goto ldv_58971; } else { } if (found_seq == 0) { if (begrun == 0U) { if ((unsigned long )first_seq == (unsigned long )((struct iscsi_seq *)0)) { printk("\vITT: 0x%08x, Begrun: 0x%08x but first_seq is NULL\n", cmd->init_task_tag, begrun); return (-1); } else { } seq_send_order = first_seq->seq_send_order; tmp___2 = 0U; seq->pdu_send_order = tmp___2; seq->next_burst_len = tmp___2; goto done; } else { } printk("\vUnable to locate struct iscsi_seq for ITT: 0x%08x, BegRun: 0x%08x, RunLength: 0x%08x while DataSequenceInOrder=No and DataPDUInOrder=%s.\n", cmd->init_task_tag, begrun, runlength, (unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U ? (char *)"Yes" : (char *)"No"); return (-1); } else { } done: dr->read_data_done = read_data_done; dr->seq_send_order = seq_send_order; return (0); } } static int iscsit_handle_recovery_datain(struct iscsi_cmd *cmd , unsigned char *buf , u32 begrun , u32 runlength ) { struct iscsi_conn *conn ; struct iscsi_datain_req *dr ; struct se_cmd *se_cmd ; int tmp ; int tmp___0 ; int tmp___1 ; u32 tmp___2 ; { conn = cmd->conn; se_cmd = & cmd->se_cmd; if ((se_cmd->transport_state & 4U) == 0U) { printk("\vIgnoring ITT: 0x%08x Data SNACK\n", cmd->init_task_tag); return (0); } else { } if (((unsigned int )cmd->cmd_flags & 2U) != 0U && cmd->acked_data_sn >= begrun) { printk("\vITT: 0x%08x, Data SNACK requesting retransmission of DataSN: 0x%08x to 0x%08x but already acked to DataSN: 0x%08x by Data ACK SNACK, protocol error.\n", cmd->init_task_tag, begrun, begrun + runlength, cmd->acked_data_sn); tmp = iscsit_reject_cmd(cmd, 4, buf); return (tmp); } else { } if (begrun + runlength > cmd->data_sn - 1U) { printk("\vInitiator requesting BegRun: 0x%08x, RunLength: 0x%08x greater than maximum DataSN: 0x%08x.\n", begrun, runlength, cmd->data_sn - 1U); tmp___0 = iscsit_reject_cmd(cmd, 9, buf); return (tmp___0); } else { } dr = iscsit_allocate_datain_req(); if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { tmp___1 = iscsit_reject_cmd(cmd, 10, buf); return (tmp___1); } else { } tmp___2 = begrun; dr->begrun = tmp___2; dr->data_sn = tmp___2; dr->runlength = runlength; dr->generate_recovery_values = 1; dr->recovery = 1; iscsit_attach_datain_req(cmd, dr); cmd->i_state = 12; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } } int iscsit_handle_recovery_datain_or_r2t(struct iscsi_conn *conn , unsigned char *buf , itt_t init_task_tag , u32 targ_xfer_tag , u32 begrun , u32 runlength ) { struct iscsi_cmd *cmd ; int tmp ; int tmp___0 ; { cmd = iscsit_find_cmd_from_itt(conn, init_task_tag); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { return (0); } else { } switch ((unsigned int )cmd->data_direction) { case 1U: tmp = iscsit_handle_r2t_snack(cmd, buf, begrun, runlength); return (tmp); case 2U: tmp___0 = iscsit_handle_recovery_datain(cmd, buf, begrun, runlength); return (tmp___0); default: printk("\vUnknown cmd->data_direction: 0x%02x\n", (unsigned int )cmd->data_direction); return (-1); } return (0); } } int iscsit_handle_status_snack(struct iscsi_conn *conn , itt_t init_task_tag , u32 targ_xfer_tag , u32 begrun , u32 runlength ) { struct iscsi_cmd *cmd ; u32 last_statsn ; int found_cmd ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { cmd = (struct iscsi_cmd *)0; if (begrun == 0U) { begrun = conn->exp_statsn; } else if (conn->exp_statsn > begrun) { printk("\vGot Status SNACK Begrun: 0x%08x, RunLength: 0x%08x but already got ExpStatSN: 0x%08x on CID: %hu.\n", begrun, runlength, conn->exp_statsn, (int )conn->cid); return (0); } else { } last_statsn = runlength == 0U ? conn->stat_sn : begrun + runlength; goto ldv_59013; ldv_59014: found_cmd = 0; spin_lock_bh(& conn->cmd_lock); __mptr = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; goto ldv_59012; ldv_59011: ; if (cmd->stat_sn == begrun) { found_cmd = 1; goto ldv_59010; } else { } __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; ldv_59012: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_59011; } else { } ldv_59010: spin_unlock_bh(& conn->cmd_lock); if (found_cmd == 0) { printk("\vUnable to find StatSN: 0x%08x for a Status SNACK, assuming this was a protactic SNACK for an untransmitted StatSN, ignoring.\n", begrun); begrun = begrun + 1U; goto ldv_59013; } else { } spin_lock_bh(& cmd->istate_lock); if ((unsigned int )cmd->i_state == 12U) { spin_unlock_bh(& cmd->istate_lock); printk("\vIgnoring Status SNACK for BegRun: 0x%08x, RunLength: 0x%08x, assuming this was a protactic SNACK for an untransmitted StatSN\n", begrun, runlength); begrun = begrun + 1U; goto ldv_59013; } else { } spin_unlock_bh(& cmd->istate_lock); cmd->i_state = 32; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); begrun = begrun + 1U; ldv_59013: ; if (begrun < last_statsn) { goto ldv_59014; } else { } return (0); } } int iscsit_handle_data_ack(struct iscsi_conn *conn , u32 targ_xfer_tag , u32 begrun , u32 runlength ) { struct iscsi_cmd *cmd ; struct _ddebug descriptor ; long tmp ; { cmd = (struct iscsi_cmd *)0; cmd = iscsit_find_cmd_from_ttt(conn, targ_xfer_tag); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { printk("\vData ACK SNACK for TTT: 0x%08x is invalid.\n", targ_xfer_tag); return (-1); } else { } if (cmd->acked_data_sn >= begrun) { printk("\vITT: 0x%08x Data ACK SNACK BegRUN: 0x%08x is less than the already acked DataSN: 0x%08x.\n", cmd->init_task_tag, begrun, cmd->acked_data_sn); return (-1); } else { } cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 2U); cmd->acked_data_sn = begrun - 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_data_ack"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl1.c"; descriptor.format = "Received Data ACK SNACK for ITT: 0x%08x, updated acked DataSN to 0x%08x.\n"; descriptor.lineno = 594U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Received Data ACK SNACK for ITT: 0x%08x, updated acked DataSN to 0x%08x.\n", cmd->init_task_tag, cmd->acked_data_sn); } else { } return (0); } } static int iscsit_send_recovery_r2t(struct iscsi_cmd *cmd , u32 offset , u32 xfer_len ) { int ret ; { spin_lock_bh(& cmd->r2t_lock); ret = iscsit_add_r2t_to_list(cmd, offset, xfer_len, 1, 0U); spin_unlock_bh(& cmd->r2t_lock); return (ret); } } int iscsit_dataout_datapduinorder_no_fbit(struct iscsi_cmd *cmd , struct iscsi_pdu *pdu ) { int i ; int send_recovery_r2t ; int recovery ; u32 length ; u32 offset ; u32 pdu_count ; u32 xfer_len ; struct iscsi_conn *conn ; struct iscsi_pdu *first_pdu ; struct iscsi_seq *seq ; int tmp ; int tmp___0 ; { send_recovery_r2t = 0; recovery = 0; length = 0U; offset = 0U; pdu_count = 0U; xfer_len = 0U; conn = cmd->conn; first_pdu = (struct iscsi_pdu *)0; if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { i = 0; goto ldv_59046; ldv_59045: ; if ((cmd->pdu_list + (unsigned long )i)->seq_no == pdu->seq_no) { if ((unsigned long )first_pdu == (unsigned long )((struct iscsi_pdu *)0)) { first_pdu = cmd->pdu_list + (unsigned long )i; } else { } xfer_len = (cmd->pdu_list + (unsigned long )i)->length + xfer_len; pdu_count = pdu_count + 1U; } else if (pdu_count != 0U) { goto ldv_59044; } else { } i = i + 1; ldv_59046: ; if ((u32 )i < cmd->pdu_count) { goto ldv_59045; } else { } ldv_59044: ; } else { seq = cmd->seq_ptr; first_pdu = cmd->pdu_list + (unsigned long )seq->pdu_start; pdu_count = seq->pdu_count; } if ((unsigned long )first_pdu == (unsigned long )((struct iscsi_pdu *)0) || pdu_count == 0U) { return (-1); } else { } i = 0; goto ldv_59050; ldv_59049: ; if ((first_pdu + (unsigned long )i)->status == 1) { if (send_recovery_r2t == 0) { goto ldv_59048; } else { } tmp = iscsit_send_recovery_r2t(cmd, offset, length); if (tmp < 0) { return (-1); } else { } offset = 0U; length = offset; send_recovery_r2t = (int )length; goto ldv_59048; } else { } recovery = 1; if ((first_pdu + (unsigned long )i)->status != 0) { goto ldv_59048; } else { } if (offset == 0U) { offset = (first_pdu + (unsigned long )i)->offset; } else { } length = (first_pdu + (unsigned long )i)->length + length; send_recovery_r2t = 1; ldv_59048: i = i + 1; ldv_59050: ; if ((u32 )i < pdu_count) { goto ldv_59049; } else { } if (send_recovery_r2t != 0) { tmp___0 = iscsit_send_recovery_r2t(cmd, offset, length); if (tmp___0 < 0) { return (-1); } else { } } else { } return (recovery == 0 ? 0 : 3); } } static int iscsit_recalculate_dataout_values(struct iscsi_cmd *cmd , u32 pdu_offset , u32 pdu_length , u32 *r2t_offset , u32 *r2t_length ) { int i ; struct iscsi_conn *conn ; struct iscsi_pdu *pdu ; struct iscsi_seq *seq ; { conn = cmd->conn; pdu = (struct iscsi_pdu *)0; if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { cmd->data_sn = 0U; if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { *r2t_offset = cmd->write_data_done; *r2t_length = cmd->seq_end_offset - cmd->write_data_done; return (0); } else { } *r2t_offset = cmd->seq_start_offset; *r2t_length = cmd->seq_end_offset - cmd->seq_start_offset; i = 0; goto ldv_59064; ldv_59063: pdu = cmd->pdu_list + (unsigned long )i; if (pdu->status != 1) { goto ldv_59062; } else { } if (pdu->offset >= cmd->seq_start_offset && pdu->offset + pdu->length <= cmd->seq_end_offset) { if ((unsigned int )cmd->unsolicited_data == 0U) { cmd->next_burst_len = cmd->next_burst_len - pdu->length; } else { cmd->first_burst_len = cmd->first_burst_len - pdu->length; } cmd->write_data_done = cmd->write_data_done - pdu->length; pdu->status = 0; } else { } ldv_59062: i = i + 1; ldv_59064: ; if ((u32 )i < cmd->pdu_count) { goto ldv_59063; } else { } } else { seq = (struct iscsi_seq *)0; seq = iscsit_get_seq_holder(cmd, pdu_offset, pdu_length); if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { return (-1); } else { } *r2t_offset = seq->orig_offset; *r2t_length = seq->xfer_len; cmd->write_data_done = cmd->write_data_done + (seq->orig_offset - seq->offset); if ((unsigned int )cmd->immediate_data != 0U) { cmd->first_burst_len = cmd->write_data_done; } else { } seq->data_sn = 0U; seq->offset = seq->orig_offset; seq->next_burst_len = 0U; seq->status = 2; if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { return (0); } else { } i = 0; goto ldv_59069; ldv_59068: pdu = cmd->pdu_list + (unsigned long )(seq->pdu_start + (u32 )i); if (pdu->status != 1) { goto ldv_59067; } else { } pdu->status = 0; ldv_59067: i = i + 1; ldv_59069: ; if ((u32 )i < seq->pdu_count) { goto ldv_59068; } else { } } return (0); } } int iscsit_recover_dataout_sequence(struct iscsi_cmd *cmd , u32 pdu_offset , u32 pdu_length ) { u32 r2t_length ; u32 r2t_offset ; int tmp ; { r2t_length = 0U; r2t_offset = 0U; spin_lock_bh(& cmd->istate_lock); cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 16U); spin_unlock_bh(& cmd->istate_lock); tmp = iscsit_recalculate_dataout_values(cmd, pdu_offset, pdu_length, & r2t_offset, & r2t_length); if (tmp < 0) { return (-1); } else { } iscsit_send_recovery_r2t(cmd, r2t_offset, r2t_length); return (3); } } static struct iscsi_ooo_cmdsn *iscsit_allocate_ooo_cmdsn(void) { struct iscsi_ooo_cmdsn *ooo_cmdsn ; void *tmp ; { ooo_cmdsn = (struct iscsi_ooo_cmdsn *)0; tmp = kmem_cache_zalloc(lio_ooo_cache, 32U); ooo_cmdsn = (struct iscsi_ooo_cmdsn *)tmp; if ((unsigned long )ooo_cmdsn == (unsigned long )((struct iscsi_ooo_cmdsn *)0)) { printk("\vUnable to allocate memory for struct iscsi_ooo_cmdsn.\n"); return ((struct iscsi_ooo_cmdsn *)0); } else { } INIT_LIST_HEAD(& ooo_cmdsn->ooo_list); return (ooo_cmdsn); } } static int iscsit_attach_ooo_cmdsn(struct iscsi_session *sess , struct iscsi_ooo_cmdsn *ooo_cmdsn ) { struct iscsi_ooo_cmdsn *ooo_tail ; struct iscsi_ooo_cmdsn *ooo_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; int tmp ; struct list_head const *__mptr___1 ; int tmp___0 ; int tmp___1 ; { tmp___1 = list_empty((struct list_head const *)(& sess->sess_ooo_cmdsn_list)); if (tmp___1 != 0) { list_add_tail(& ooo_cmdsn->ooo_list, & sess->sess_ooo_cmdsn_list); } else { __mptr = (struct list_head const *)sess->sess_ooo_cmdsn_list.prev; ooo_tail = (struct iscsi_ooo_cmdsn *)__mptr + 0xffffffffffffffe8UL; tmp___0 = iscsi_sna_lt(ooo_tail->cmdsn, ooo_cmdsn->cmdsn); if (tmp___0 != 0) { list_add_tail(& ooo_cmdsn->ooo_list, & sess->sess_ooo_cmdsn_list); } else { __mptr___0 = (struct list_head const *)sess->sess_ooo_cmdsn_list.next; ooo_tmp = (struct iscsi_ooo_cmdsn *)__mptr___0 + 0xffffffffffffffe8UL; goto ldv_59097; ldv_59096: tmp = iscsi_sna_lt(ooo_tmp->cmdsn, ooo_cmdsn->cmdsn); if (tmp != 0) { goto ldv_59094; } else { } list_add(& ooo_cmdsn->ooo_list, ooo_tmp->ooo_list.prev); goto ldv_59095; ldv_59094: __mptr___1 = (struct list_head const *)ooo_tmp->ooo_list.next; ooo_tmp = (struct iscsi_ooo_cmdsn *)__mptr___1 + 0xffffffffffffffe8UL; ldv_59097: ; if ((unsigned long )(& ooo_tmp->ooo_list) != (unsigned long )(& sess->sess_ooo_cmdsn_list)) { goto ldv_59096; } else { } ldv_59095: ; } } return (0); } } void iscsit_remove_ooo_cmdsn(struct iscsi_session *sess , struct iscsi_ooo_cmdsn *ooo_cmdsn ) { { list_del(& ooo_cmdsn->ooo_list); kmem_cache_free(lio_ooo_cache, (void *)ooo_cmdsn); return; } } void iscsit_clear_ooo_cmdsns_for_conn(struct iscsi_conn *conn ) { struct iscsi_ooo_cmdsn *ooo_cmdsn ; struct iscsi_session *sess ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { sess = conn->sess; ldv_mutex_lock_191(& sess->cmdsn_mutex); __mptr = (struct list_head const *)sess->sess_ooo_cmdsn_list.next; ooo_cmdsn = (struct iscsi_ooo_cmdsn *)__mptr + 0xffffffffffffffe8UL; goto ldv_59113; ldv_59112: ; if ((int )ooo_cmdsn->cid != (int )conn->cid) { goto ldv_59111; } else { } ooo_cmdsn->cmd = (struct iscsi_cmd *)0; ldv_59111: __mptr___0 = (struct list_head const *)ooo_cmdsn->ooo_list.next; ooo_cmdsn = (struct iscsi_ooo_cmdsn *)__mptr___0 + 0xffffffffffffffe8UL; ldv_59113: ; if ((unsigned long )(& ooo_cmdsn->ooo_list) != (unsigned long )(& sess->sess_ooo_cmdsn_list)) { goto ldv_59112; } else { } ldv_mutex_unlock_192(& sess->cmdsn_mutex); return; } } int iscsit_execute_ooo_cmdsns(struct iscsi_session *sess ) { int ooo_count ; struct iscsi_cmd *cmd ; struct iscsi_ooo_cmdsn *ooo_cmdsn ; struct iscsi_ooo_cmdsn *ooo_cmdsn_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; struct list_head const *__mptr___1 ; { ooo_count = 0; cmd = (struct iscsi_cmd *)0; __mptr = (struct list_head const *)sess->sess_ooo_cmdsn_list.next; ooo_cmdsn = (struct iscsi_ooo_cmdsn *)__mptr + 0xffffffffffffffe8UL; __mptr___0 = (struct list_head const *)ooo_cmdsn->ooo_list.next; ooo_cmdsn_tmp = (struct iscsi_ooo_cmdsn *)__mptr___0 + 0xffffffffffffffe8UL; goto ldv_59132; ldv_59131: ; if (ooo_cmdsn->cmdsn != sess->exp_cmd_sn) { goto ldv_59128; } else { } if ((unsigned long )ooo_cmdsn->cmd == (unsigned long )((struct iscsi_cmd *)0)) { sess->exp_cmd_sn = sess->exp_cmd_sn + 1U; iscsit_remove_ooo_cmdsn(sess, ooo_cmdsn); goto ldv_59128; } else { } cmd = ooo_cmdsn->cmd; cmd->i_state = cmd->deferred_i_state; ooo_count = ooo_count + 1; sess->exp_cmd_sn = sess->exp_cmd_sn + 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_execute_ooo_cmdsns"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl1.c"; descriptor.format = "Executing out of order CmdSN: 0x%08x, incremented ExpCmdSN to 0x%08x.\n"; descriptor.lineno = 901U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Executing out of order CmdSN: 0x%08x, incremented ExpCmdSN to 0x%08x.\n", cmd->cmd_sn, sess->exp_cmd_sn); } else { } iscsit_remove_ooo_cmdsn(sess, ooo_cmdsn); tmp___0 = iscsit_execute_cmd(cmd, 1); if (tmp___0 < 0) { return (-1); } else { } goto ldv_59128; ldv_59128: ooo_cmdsn = ooo_cmdsn_tmp; __mptr___1 = (struct list_head const *)ooo_cmdsn_tmp->ooo_list.next; ooo_cmdsn_tmp = (struct iscsi_ooo_cmdsn *)__mptr___1 + 0xffffffffffffffe8UL; ldv_59132: ; if ((unsigned long )(& ooo_cmdsn->ooo_list) != (unsigned long )(& sess->sess_ooo_cmdsn_list)) { goto ldv_59131; } else { } return (ooo_count); } } int iscsit_execute_cmd(struct iscsi_cmd *cmd , int ooo ) { struct se_cmd *se_cmd ; struct iscsi_conn *conn ; int lr ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; { se_cmd = & cmd->se_cmd; conn = cmd->conn; lr = 0; spin_lock_bh(& cmd->istate_lock); if (ooo != 0) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags & 4294967167U); } else { } switch ((int )cmd->iscsi_opcode) { case 1: ; if (cmd->sense_reason != 0U) { if (cmd->sense_reason == 16U) { cmd->i_state = 29; spin_unlock_bh(& cmd->istate_lock); iscsit_add_cmd_to_response_queue(cmd, cmd->conn, (int )((u8 )cmd->i_state)); return (0); } else { } spin_unlock_bh(& cmd->istate_lock); tmp = transport_check_aborted_status(se_cmd, (unsigned int )cmd->unsolicited_data == 0U); if (tmp != 0) { return (0); } else { } tmp___0 = transport_send_check_condition_and_sense(se_cmd, cmd->sense_reason, 0); return (tmp___0); } else { } if ((unsigned int )cmd->immediate_data != 0U) { if ((int )cmd->cmd_flags & 1) { spin_unlock_bh(& cmd->istate_lock); target_execute_cmd(& cmd->se_cmd); return (0); } else { } spin_unlock_bh(& cmd->istate_lock); if (((unsigned int )cmd->cmd_flags & 4U) == 0U) { tmp___1 = transport_check_aborted_status(se_cmd, 1); if (tmp___1 != 0) { return (0); } else { } iscsit_set_dataout_sequence_values(cmd); (*((conn->conn_transport)->iscsit_get_dataout))(conn, cmd, 0); } else { } return (0); } else { } spin_unlock_bh(& cmd->istate_lock); if ((unsigned int )cmd->data_direction == 1U && ((unsigned int )cmd->cmd_flags & 4U) == 0U) { tmp___2 = transport_check_aborted_status(se_cmd, 1); if (tmp___2 != 0) { return (0); } else { } iscsit_set_unsoliticed_dataout(cmd); } else { } tmp___3 = transport_handle_cdb_direct(& cmd->se_cmd); return (tmp___3); case 0: ; case 4: spin_unlock_bh(& cmd->istate_lock); iscsit_add_cmd_to_response_queue(cmd, cmd->conn, (int )((u8 )cmd->i_state)); goto ldv_59144; case 2: ; if ((unsigned int )(cmd->se_cmd.se_tmr_req)->response != 0U) { spin_unlock_bh(& cmd->istate_lock); iscsit_add_cmd_to_response_queue(cmd, cmd->conn, (int )((u8 )cmd->i_state)); return (0); } else { } spin_unlock_bh(& cmd->istate_lock); tmp___4 = transport_generic_handle_tmr(& cmd->se_cmd); return (tmp___4); case 6: spin_unlock_bh(& cmd->istate_lock); switch ((int )cmd->logout_reason) { case 0: lr = iscsit_logout_closesession(cmd, cmd->conn); goto ldv_59148; case 1: lr = iscsit_logout_closeconnection(cmd, cmd->conn); goto ldv_59148; case 2: lr = iscsit_logout_removeconnforrecovery(cmd, cmd->conn); goto ldv_59148; default: printk("\vUnknown iSCSI Logout Request Code: 0x%02x\n", (int )cmd->logout_reason); return (-1); } ldv_59148: ; return (lr); default: spin_unlock_bh(& cmd->istate_lock); printk("\vCannot perform out of order execution for unknown iSCSI Opcode: 0x%02x\n", (int )cmd->iscsi_opcode); return (-1); } ldv_59144: ; return (0); } } void iscsit_free_all_ooo_cmdsns(struct iscsi_session *sess ) { struct iscsi_ooo_cmdsn *ooo_cmdsn ; struct iscsi_ooo_cmdsn *ooo_cmdsn_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { ldv_mutex_lock_193(& sess->cmdsn_mutex); __mptr = (struct list_head const *)sess->sess_ooo_cmdsn_list.next; ooo_cmdsn = (struct iscsi_ooo_cmdsn *)__mptr + 0xffffffffffffffe8UL; __mptr___0 = (struct list_head const *)ooo_cmdsn->ooo_list.next; ooo_cmdsn_tmp = (struct iscsi_ooo_cmdsn *)__mptr___0 + 0xffffffffffffffe8UL; goto ldv_59165; ldv_59164: list_del(& ooo_cmdsn->ooo_list); kmem_cache_free(lio_ooo_cache, (void *)ooo_cmdsn); ooo_cmdsn = ooo_cmdsn_tmp; __mptr___1 = (struct list_head const *)ooo_cmdsn_tmp->ooo_list.next; ooo_cmdsn_tmp = (struct iscsi_ooo_cmdsn *)__mptr___1 + 0xffffffffffffffe8UL; ldv_59165: ; if ((unsigned long )(& ooo_cmdsn->ooo_list) != (unsigned long )(& sess->sess_ooo_cmdsn_list)) { goto ldv_59164; } else { } ldv_mutex_unlock_194(& sess->cmdsn_mutex); return; } } int iscsit_handle_ooo_cmdsn(struct iscsi_session *sess , struct iscsi_cmd *cmd , u32 cmdsn ) { int batch ; struct iscsi_ooo_cmdsn *ooo_cmdsn ; struct iscsi_ooo_cmdsn *ooo_tail ; struct list_head const *__mptr ; int tmp ; int tmp___0 ; { batch = 0; ooo_cmdsn = (struct iscsi_ooo_cmdsn *)0; ooo_tail = (struct iscsi_ooo_cmdsn *)0; cmd->deferred_i_state = cmd->i_state; cmd->i_state = 2; cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 128U); tmp = list_empty((struct list_head const *)(& sess->sess_ooo_cmdsn_list)); if (tmp != 0) { batch = 1; } else { __mptr = (struct list_head const *)sess->sess_ooo_cmdsn_list.prev; ooo_tail = (struct iscsi_ooo_cmdsn *)__mptr + 0xffffffffffffffe8UL; if (ooo_tail->cmdsn != cmdsn - 1U) { batch = 1; } else { } } ooo_cmdsn = iscsit_allocate_ooo_cmdsn(); if ((unsigned long )ooo_cmdsn == (unsigned long )((struct iscsi_ooo_cmdsn *)0)) { return (-12); } else { } ooo_cmdsn->cmd = cmd; ooo_cmdsn->batch_count = batch != 0 ? cmdsn - sess->exp_cmd_sn : 1U; ooo_cmdsn->cid = (cmd->conn)->cid; ooo_cmdsn->exp_cmdsn = sess->exp_cmd_sn; ooo_cmdsn->cmdsn = cmdsn; tmp___0 = iscsit_attach_ooo_cmdsn(sess, ooo_cmdsn); if (tmp___0 < 0) { kmem_cache_free(lio_ooo_cache, (void *)ooo_cmdsn); return (-12); } else { } return (0); } } static int iscsit_set_dataout_timeout_values(struct iscsi_cmd *cmd , u32 *offset , u32 *length ) { struct iscsi_conn *conn ; struct iscsi_r2t *r2t ; int tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { conn = cmd->conn; if ((unsigned int )cmd->unsolicited_data != 0U) { *offset = 0U; *length = cmd->se_cmd.data_length < ((conn->sess)->sess_ops)->FirstBurstLength ? cmd->se_cmd.data_length : ((conn->sess)->sess_ops)->FirstBurstLength; return (0); } else { } spin_lock_bh(& cmd->r2t_lock); tmp = list_empty((struct list_head const *)(& cmd->cmd_r2t_list)); if (tmp != 0) { printk("\vcmd->cmd_r2t_list is empty!\n"); spin_unlock_bh(& cmd->r2t_lock); return (-1); } else { } __mptr = (struct list_head const *)cmd->cmd_r2t_list.next; r2t = (struct iscsi_r2t *)__mptr + 0xffffffffffffffe0UL; goto ldv_59189; ldv_59188: ; if ((r2t->sent_r2t != 0 && r2t->recovery_r2t == 0) && r2t->seq_complete == 0) { *offset = r2t->offset; *length = r2t->xfer_len; spin_unlock_bh(& cmd->r2t_lock); return (0); } else { } __mptr___0 = (struct list_head const *)r2t->r2t_list.next; r2t = (struct iscsi_r2t *)__mptr___0 + 0xffffffffffffffe0UL; ldv_59189: ; if ((unsigned long )(& r2t->r2t_list) != (unsigned long )(& cmd->cmd_r2t_list)) { goto ldv_59188; } else { } spin_unlock_bh(& cmd->r2t_lock); printk("\vUnable to locate any incomplete DataOUT sequences for ITT: 0x%08x.\n", cmd->init_task_tag); return (-1); } } static void iscsit_handle_dataout_timeout(unsigned long data ) { u32 pdu_length ; u32 pdu_offset ; u32 r2t_length ; u32 r2t_offset ; struct iscsi_cmd *cmd ; struct iscsi_conn *conn ; struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; int tmp___1 ; int tmp___2 ; struct _ddebug descriptor___1 ; long tmp___3 ; int tmp___4 ; { pdu_length = 0U; pdu_offset = 0U; r2t_length = 0U; r2t_offset = 0U; cmd = (struct iscsi_cmd *)data; conn = cmd->conn; sess = (struct iscsi_session *)0; iscsit_inc_conn_usage_count(conn); spin_lock_bh(& cmd->dataout_timeout_lock); if (((unsigned int )cmd->dataout_timer_flags & 2U) != 0U) { spin_unlock_bh(& cmd->dataout_timeout_lock); iscsit_dec_conn_usage_count(conn); return; } else { } cmd->dataout_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )cmd->dataout_timer_flags & 4294967294U); sess = conn->sess; na = iscsit_tpg_get_node_attrib(sess); if ((unsigned int )(sess->sess_ops)->ErrorRecoveryLevel == 0U) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_dataout_timeout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl1.c"; descriptor.format = "Unable to recover from DataOut timeout while in ERL=0.\n"; descriptor.lineno = 1174U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Unable to recover from DataOut timeout while in ERL=0.\n"); } else { } goto failure; } else { } cmd->dataout_timeout_retries = (u8 )((int )cmd->dataout_timeout_retries + 1); if ((u32 )cmd->dataout_timeout_retries == na->dataout_timeout_retries) { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_handle_dataout_timeout"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl1.c"; descriptor___0.format = "Command ITT: 0x%08x exceeded max retries for DataOUT timeout %u, closing iSCSI connection.\n"; descriptor___0.lineno = 1181U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Command ITT: 0x%08x exceeded max retries for DataOUT timeout %u, closing iSCSI connection.\n", cmd->init_task_tag, na->dataout_timeout_retries); } else { } goto failure; } else { } cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 16U); if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { pdu_offset = cmd->write_data_done; if ((((conn->sess)->sess_ops)->MaxBurstLength - cmd->next_burst_len) + pdu_offset > cmd->se_cmd.data_length) { pdu_length = cmd->se_cmd.data_length - cmd->write_data_done; } else { pdu_length = ((conn->sess)->sess_ops)->MaxBurstLength - cmd->next_burst_len; } } else { pdu_offset = cmd->seq_start_offset; pdu_length = cmd->seq_end_offset - cmd->seq_start_offset; } } else { tmp___1 = iscsit_set_dataout_timeout_values(cmd, & pdu_offset, & pdu_length); if (tmp___1 < 0) { goto failure; } else { } } tmp___2 = iscsit_recalculate_dataout_values(cmd, pdu_offset, pdu_length, & r2t_offset, & r2t_length); if (tmp___2 < 0) { goto failure; } else { } descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_handle_dataout_timeout"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl1.c"; descriptor___1.format = "Command ITT: 0x%08x timed out waiting for completion of %sDataOUT Sequence Offset: %u, Length: %u\n"; descriptor___1.lineno = 1215U; descriptor___1.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___1, "Command ITT: 0x%08x timed out waiting for completion of %sDataOUT Sequence Offset: %u, Length: %u\n", cmd->init_task_tag, (unsigned int )cmd->unsolicited_data != 0U ? (char *)"Unsolicited " : (char *)"", r2t_offset, r2t_length); } else { } tmp___4 = iscsit_send_recovery_r2t(cmd, r2t_offset, r2t_length); if (tmp___4 < 0) { goto failure; } else { } iscsit_start_dataout_timer(cmd, conn); spin_unlock_bh(& cmd->dataout_timeout_lock); iscsit_dec_conn_usage_count(conn); return; failure: spin_unlock_bh(& cmd->dataout_timeout_lock); iscsit_cause_connection_reinstatement(conn, 0); iscsit_dec_conn_usage_count(conn); return; } } void iscsit_mod_dataout_timer(struct iscsi_cmd *cmd ) { struct iscsi_conn *conn ; struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct iscsi_node_attrib *tmp ; u64 tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; { conn = cmd->conn; sess = conn->sess; tmp = iscsit_tpg_get_node_attrib(sess); na = tmp; spin_lock_bh(& cmd->dataout_timeout_lock); if (((unsigned int )cmd->dataout_timer_flags & 1U) == 0U) { spin_unlock_bh(& cmd->dataout_timeout_lock); return; } else { } tmp___0 = get_jiffies_64(); ldv_mod_timer_195(& cmd->dataout_timer, (unsigned long )(tmp___0 + (u64 )(na->dataout_timeout * 250U))); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_mod_dataout_timer"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl1.c"; descriptor.format = "Updated DataOUT timer for ITT: 0x%08x"; descriptor.lineno = 1247U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Updated DataOUT timer for ITT: 0x%08x", cmd->init_task_tag); } else { } spin_unlock_bh(& cmd->dataout_timeout_lock); return; } } void iscsit_start_dataout_timer(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct iscsi_node_attrib *tmp ; struct _ddebug descriptor ; long tmp___0 ; u64 tmp___1 ; { sess = conn->sess; tmp = iscsit_tpg_get_node_attrib(sess); na = tmp; if ((int )cmd->dataout_timer_flags & 1) { return; } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_start_dataout_timer"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl1.c"; descriptor.format = "Starting DataOUT timer for ITT: 0x%08x on CID: %hu.\n"; descriptor.lineno = 1265U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Starting DataOUT timer for ITT: 0x%08x on CID: %hu.\n", cmd->init_task_tag, (int )conn->cid); } else { } reg_timer_8(& cmd->dataout_timer); tmp___1 = get_jiffies_64(); cmd->dataout_timer.expires = (unsigned long )(tmp___1 + (u64 )(na->dataout_timeout * 250U)); cmd->dataout_timer.data = (unsigned long )cmd; cmd->dataout_timer.function = & iscsit_handle_dataout_timeout; cmd->dataout_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )cmd->dataout_timer_flags & 4294967293U); cmd->dataout_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )cmd->dataout_timer_flags | 1U); add_timer(& cmd->dataout_timer); return; } } void iscsit_stop_dataout_timer(struct iscsi_cmd *cmd ) { struct _ddebug descriptor ; long tmp ; { spin_lock_bh(& cmd->dataout_timeout_lock); if (((unsigned int )cmd->dataout_timer_flags & 1U) == 0U) { spin_unlock_bh(& cmd->dataout_timeout_lock); return; } else { } cmd->dataout_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )cmd->dataout_timer_flags | 2U); spin_unlock_bh(& cmd->dataout_timeout_lock); ldv_del_timer_sync_196(& cmd->dataout_timer); spin_lock_bh(& cmd->dataout_timeout_lock); cmd->dataout_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )cmd->dataout_timer_flags & 4294967294U); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_stop_dataout_timer"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl1.c"; descriptor.format = "Stopped DataOUT Timer for ITT: 0x%08x\n"; descriptor.lineno = 1291U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Stopped DataOUT Timer for ITT: 0x%08x\n", cmd->init_task_tag); } else { } spin_unlock_bh(& cmd->dataout_timeout_lock); return; } } static char const __kstrtab_iscsit_stop_dataout_timer[26U] = { 'i', 's', 'c', 's', 'i', 't', '_', 's', 't', 'o', 'p', '_', 'd', 'a', 't', 'a', 'o', 'u', 't', '_', 't', 'i', 'm', 'e', 'r', '\000'}; struct kernel_symbol const __ksymtab_iscsit_stop_dataout_timer ; struct kernel_symbol const __ksymtab_iscsit_stop_dataout_timer = {(unsigned long )(& iscsit_stop_dataout_timer), (char const *)(& __kstrtab_iscsit_stop_dataout_timer)}; void activate_pending_timer_4(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_4 == (unsigned long )timer) { if (ldv_timer_state_4 == 2 || pending_flag != 0) { ldv_timer_list_4 = timer; ldv_timer_list_4->data = data; ldv_timer_state_4 = 1; } else { } return; } else { } reg_timer_4(timer); ldv_timer_list_4->data = data; return; } } void disable_suitable_timer_4(struct timer_list *timer ) { { if ((unsigned long )timer == (unsigned long )ldv_timer_list_4) { ldv_timer_state_4 = 0; return; } else { } return; } } void choose_timer_4(struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; (*(timer->function))(timer->data); LDV_IN_INTERRUPT = 1; ldv_timer_state_4 = 2; return; } } int reg_timer_4(struct timer_list *timer ) { { ldv_timer_list_4 = timer; ldv_timer_state_4 = 1; return (0); } } bool ldv_queue_work_on_179(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_180(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_181(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_182(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_183(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_184(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_185(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_186(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_187(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_188(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_189(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_190(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_191(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_192(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_193(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_194(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } int ldv_mod_timer_195(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; activate_pending_timer_8(ldv_func_arg1, ldv_func_arg2, 1); return (ldv_func_res); } } int ldv_del_timer_sync_196(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___5 ldv_func_res ; int tmp ; { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; disable_suitable_timer_8(ldv_func_arg1); return (ldv_func_res); } } __inline static long ldv__builtin_expect(long exp , long c ) ; extern void __list_del_entry(struct list_head * ) ; __inline static void list_del_init(struct list_head *entry ) { { __list_del_entry(entry); INIT_LIST_HEAD(entry); return; } } int ldv_mutex_trylock_227(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_225(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_228(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_229(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_232(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_224(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_226(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_230(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_231(struct mutex *ldv_func_arg1 ) ; extern void __raw_spin_lock_init(raw_spinlock_t * , char const * , struct lock_class_key * ) ; __inline static raw_spinlock_t *spinlock_check(spinlock_t *lock ) { { return (& lock->__annonCompField17.rlock); } } bool ldv_queue_work_on_219(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_221(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_220(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_223(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_222(struct workqueue_struct *ldv_func_arg1 ) ; __inline static int iscsi_sna_gte(u32 n1 , u32 n2 ) { { return ((int )(n1 - n2) >= 0); } } extern bool transport_wait_for_tasks(struct se_cmd * ) ; void iscsit_free_cmd(struct iscsi_cmd *cmd , bool shutdown ) ; void iscsit_create_conn_recovery_datain_values(struct iscsi_cmd *cmd , __be32 exp_data_sn ) ; void iscsit_create_conn_recovery_dataout_values(struct iscsi_cmd *cmd ) ; struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry(struct iscsi_session *sess , u16 cid ) ; void iscsit_free_connection_recovery_entires(struct iscsi_session *sess ) ; int iscsit_remove_active_connection_recovery_entry(struct iscsi_conn_recovery *cr , struct iscsi_session *sess ) ; int iscsit_remove_cmd_from_connection_recovery(struct iscsi_cmd *cmd , struct iscsi_session *sess ) ; void iscsit_discard_cr_cmds_by_expstatsn(struct iscsi_conn_recovery *cr , u32 exp_statsn ) ; int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsi_conn *conn ) ; int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn ) ; void iscsit_create_conn_recovery_datain_values(struct iscsi_cmd *cmd , __be32 exp_data_sn ) { u32 data_sn ; struct iscsi_conn *conn ; __u32 tmp ; { data_sn = 0U; conn = cmd->conn; cmd->next_burst_len = 0U; cmd->read_data_done = 0U; goto ldv_57700; ldv_57699: ; if (cmd->next_burst_len + (conn->conn_ops)->MaxRecvDataSegmentLength < ((conn->sess)->sess_ops)->MaxBurstLength) { cmd->read_data_done = cmd->read_data_done + (conn->conn_ops)->MaxRecvDataSegmentLength; cmd->next_burst_len = cmd->next_burst_len + (conn->conn_ops)->MaxRecvDataSegmentLength; } else { cmd->read_data_done = cmd->read_data_done + (((conn->sess)->sess_ops)->MaxBurstLength - cmd->next_burst_len); cmd->next_burst_len = 0U; } data_sn = data_sn + 1U; ldv_57700: tmp = __fswab32(exp_data_sn); if (tmp > data_sn) { goto ldv_57699; } else { } return; } } void iscsit_create_conn_recovery_dataout_values(struct iscsi_cmd *cmd ) { u32 write_data_done ; struct iscsi_conn *conn ; { write_data_done = 0U; conn = cmd->conn; cmd->data_sn = 0U; cmd->next_burst_len = 0U; goto ldv_57709; ldv_57708: ; if (((conn->sess)->sess_ops)->MaxBurstLength + write_data_done <= cmd->write_data_done) { write_data_done = ((conn->sess)->sess_ops)->MaxBurstLength + write_data_done; } else { goto ldv_57707; } ldv_57709: ; if (cmd->write_data_done > write_data_done) { goto ldv_57708; } else { } ldv_57707: cmd->write_data_done = write_data_done; return; } } static int iscsit_attach_active_connection_recovery_entry(struct iscsi_session *sess , struct iscsi_conn_recovery *cr ) { { spin_lock(& sess->cr_a_lock); list_add_tail(& cr->cr_list, & sess->cr_active_list); spin_unlock(& sess->cr_a_lock); return (0); } } static int iscsit_attach_inactive_connection_recovery_entry(struct iscsi_session *sess , struct iscsi_conn_recovery *cr ) { struct _ddebug descriptor ; long tmp ; { spin_lock(& sess->cr_i_lock); list_add_tail(& cr->cr_list, & sess->cr_inactive_list); sess->conn_recovery_count = (u16 )((int )sess->conn_recovery_count + 1); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_attach_inactive_connection_recovery_entry"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor.format = "Incremented connection recovery count to %u for SID: %u\n"; descriptor.lineno = 103U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Incremented connection recovery count to %u for SID: %u\n", (int )sess->conn_recovery_count, sess->sid); } else { } spin_unlock(& sess->cr_i_lock); return (0); } } struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry(struct iscsi_session *sess , u16 cid ) { struct iscsi_conn_recovery *cr ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock(& sess->cr_i_lock); __mptr = (struct list_head const *)sess->cr_inactive_list.next; cr = (struct iscsi_conn_recovery *)__mptr + 0xffffffffffffff08UL; goto ldv_57730; ldv_57729: ; if ((int )cr->cid == (int )cid) { spin_unlock(& sess->cr_i_lock); return (cr); } else { } __mptr___0 = (struct list_head const *)cr->cr_list.next; cr = (struct iscsi_conn_recovery *)__mptr___0 + 0xffffffffffffff08UL; ldv_57730: ; if ((unsigned long )(& cr->cr_list) != (unsigned long )(& sess->cr_inactive_list)) { goto ldv_57729; } else { } spin_unlock(& sess->cr_i_lock); return ((struct iscsi_conn_recovery *)0); } } void iscsit_free_connection_recovery_entires(struct iscsi_session *sess ) { struct iscsi_cmd *cmd ; struct iscsi_cmd *cmd_tmp ; struct iscsi_conn_recovery *cr ; struct iscsi_conn_recovery *cr_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; struct list_head const *__mptr___4 ; struct list_head const *__mptr___5 ; struct list_head const *__mptr___6 ; struct list_head const *__mptr___7 ; struct list_head const *__mptr___8 ; struct list_head const *__mptr___9 ; struct list_head const *__mptr___10 ; { spin_lock(& sess->cr_a_lock); __mptr = (struct list_head const *)sess->cr_active_list.next; cr = (struct iscsi_conn_recovery *)__mptr + 0xffffffffffffff08UL; __mptr___0 = (struct list_head const *)cr->cr_list.next; cr_tmp = (struct iscsi_conn_recovery *)__mptr___0 + 0xffffffffffffff08UL; goto ldv_57755; ldv_57754: list_del(& cr->cr_list); spin_unlock(& sess->cr_a_lock); spin_lock(& cr->conn_recovery_cmd_lock); __mptr___1 = (struct list_head const *)cr->conn_recovery_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr___1 + 0xfffffffffffffc80UL; __mptr___2 = (struct list_head const *)cmd->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___2 + 0xfffffffffffffc80UL; goto ldv_57752; ldv_57751: list_del_init(& cmd->i_conn_node); cmd->conn = (struct iscsi_conn *)0; spin_unlock(& cr->conn_recovery_cmd_lock); iscsit_free_cmd(cmd, 1); spin_lock(& cr->conn_recovery_cmd_lock); cmd = cmd_tmp; __mptr___3 = (struct list_head const *)cmd_tmp->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___3 + 0xfffffffffffffc80UL; ldv_57752: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& cr->conn_recovery_cmd_list)) { goto ldv_57751; } else { } spin_unlock(& cr->conn_recovery_cmd_lock); spin_lock(& sess->cr_a_lock); kfree((void const *)cr); cr = cr_tmp; __mptr___4 = (struct list_head const *)cr_tmp->cr_list.next; cr_tmp = (struct iscsi_conn_recovery *)__mptr___4 + 0xffffffffffffff08UL; ldv_57755: ; if ((unsigned long )(& cr->cr_list) != (unsigned long )(& sess->cr_active_list)) { goto ldv_57754; } else { } spin_unlock(& sess->cr_a_lock); spin_lock(& sess->cr_i_lock); __mptr___5 = (struct list_head const *)sess->cr_inactive_list.next; cr = (struct iscsi_conn_recovery *)__mptr___5 + 0xffffffffffffff08UL; __mptr___6 = (struct list_head const *)cr->cr_list.next; cr_tmp = (struct iscsi_conn_recovery *)__mptr___6 + 0xffffffffffffff08UL; goto ldv_57773; ldv_57772: list_del(& cr->cr_list); spin_unlock(& sess->cr_i_lock); spin_lock(& cr->conn_recovery_cmd_lock); __mptr___7 = (struct list_head const *)cr->conn_recovery_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr___7 + 0xfffffffffffffc80UL; __mptr___8 = (struct list_head const *)cmd->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___8 + 0xfffffffffffffc80UL; goto ldv_57770; ldv_57769: list_del_init(& cmd->i_conn_node); cmd->conn = (struct iscsi_conn *)0; spin_unlock(& cr->conn_recovery_cmd_lock); iscsit_free_cmd(cmd, 1); spin_lock(& cr->conn_recovery_cmd_lock); cmd = cmd_tmp; __mptr___9 = (struct list_head const *)cmd_tmp->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___9 + 0xfffffffffffffc80UL; ldv_57770: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& cr->conn_recovery_cmd_list)) { goto ldv_57769; } else { } spin_unlock(& cr->conn_recovery_cmd_lock); spin_lock(& sess->cr_i_lock); kfree((void const *)cr); cr = cr_tmp; __mptr___10 = (struct list_head const *)cr_tmp->cr_list.next; cr_tmp = (struct iscsi_conn_recovery *)__mptr___10 + 0xffffffffffffff08UL; ldv_57773: ; if ((unsigned long )(& cr->cr_list) != (unsigned long )(& sess->cr_inactive_list)) { goto ldv_57772; } else { } spin_unlock(& sess->cr_i_lock); return; } } int iscsit_remove_active_connection_recovery_entry(struct iscsi_conn_recovery *cr , struct iscsi_session *sess ) { struct _ddebug descriptor ; long tmp ; { spin_lock(& sess->cr_a_lock); list_del(& cr->cr_list); sess->conn_recovery_count = (u16 )((int )sess->conn_recovery_count - 1); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_remove_active_connection_recovery_entry"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor.format = "Decremented connection recovery count to %u for SID: %u\n"; descriptor.lineno = 186U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Decremented connection recovery count to %u for SID: %u\n", (int )sess->conn_recovery_count, sess->sid); } else { } spin_unlock(& sess->cr_a_lock); kfree((void const *)cr); return (0); } } static void iscsit_remove_inactive_connection_recovery_entry(struct iscsi_conn_recovery *cr , struct iscsi_session *sess ) { { spin_lock(& sess->cr_i_lock); list_del(& cr->cr_list); spin_unlock(& sess->cr_i_lock); return; } } int iscsit_remove_cmd_from_connection_recovery(struct iscsi_cmd *cmd , struct iscsi_session *sess ) { struct iscsi_conn_recovery *cr ; { if ((unsigned long )cmd->cr == (unsigned long )((struct iscsi_conn_recovery *)0)) { printk("\vstruct iscsi_conn_recovery pointer for ITT: 0x%08x is NULL!\n", cmd->init_task_tag); __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"), "i" (215), "i" (12UL)); ldv_57790: ; goto ldv_57790; } else { } cr = cmd->cr; list_del_init(& cmd->i_conn_node); cr->cmd_count = cr->cmd_count - 1U; return ((int )cr->cmd_count); } } void iscsit_discard_cr_cmds_by_expstatsn(struct iscsi_conn_recovery *cr , u32 exp_statsn ) { u32 dropped_count ; struct iscsi_cmd *cmd ; struct iscsi_cmd *cmd_tmp ; struct iscsi_session *sess ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr___1 ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; long tmp___2 ; { dropped_count = 0U; sess = cr->sess; spin_lock(& cr->conn_recovery_cmd_lock); __mptr = (struct list_head const *)cr->conn_recovery_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; goto ldv_57809; ldv_57808: ; if (((unsigned int )cmd->deferred_i_state != 31U && (unsigned int )cmd->deferred_i_state != 41U) || cmd->stat_sn >= exp_statsn) { goto ldv_57805; } else { } dropped_count = dropped_count + 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_discard_cr_cmds_by_expstatsn"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor.format = "Dropping Acknowledged ITT: 0x%08x, StatSN: 0x%08x, CID: %hu.\n"; descriptor.lineno = 244U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Dropping Acknowledged ITT: 0x%08x, StatSN: 0x%08x, CID: %hu.\n", cmd->init_task_tag, cmd->stat_sn, (int )cr->cid); } else { } iscsit_remove_cmd_from_connection_recovery(cmd, sess); spin_unlock(& cr->conn_recovery_cmd_lock); iscsit_free_cmd(cmd, 1); spin_lock(& cr->conn_recovery_cmd_lock); ldv_57805: cmd = cmd_tmp; __mptr___1 = (struct list_head const *)cmd_tmp->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___1 + 0xfffffffffffffc80UL; ldv_57809: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& cr->conn_recovery_cmd_list)) { goto ldv_57808; } else { } spin_unlock(& cr->conn_recovery_cmd_lock); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_discard_cr_cmds_by_expstatsn"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor___0.format = "Dropped %u total acknowledged commands on CID: %hu less than old ExpStatSN: 0x%08x\n"; descriptor___0.lineno = 256U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Dropped %u total acknowledged commands on CID: %hu less than old ExpStatSN: 0x%08x\n", dropped_count, (int )cr->cid, exp_statsn); } else { } if (cr->cmd_count == 0U) { descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_discard_cr_cmds_by_expstatsn"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor___1.format = "No commands to be reassigned for failed connection CID: %hu on SID: %u\n"; descriptor___1.lineno = 261U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___1, "No commands to be reassigned for failed connection CID: %hu on SID: %u\n", (int )cr->cid, sess->sid); } else { } iscsit_remove_inactive_connection_recovery_entry(cr, sess); iscsit_attach_active_connection_recovery_entry(sess, cr); descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsit_discard_cr_cmds_by_expstatsn"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor___2.format = "iSCSI connection recovery successful for CID: %hu on SID: %u\n"; descriptor___2.lineno = 265U; descriptor___2.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___2, "iSCSI connection recovery successful for CID: %hu on SID: %u\n", (int )cr->cid, sess->sid); } else { } iscsit_remove_active_connection_recovery_entry(cr, sess); } else { iscsit_remove_inactive_connection_recovery_entry(cr, sess); iscsit_attach_active_connection_recovery_entry(sess, cr); } return; } } int iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(struct iscsi_conn *conn ) { u32 dropped_count ; struct iscsi_cmd *cmd ; struct iscsi_cmd *cmd_tmp ; struct iscsi_ooo_cmdsn *ooo_cmdsn ; struct iscsi_ooo_cmdsn *ooo_cmdsn_tmp ; struct iscsi_session *sess ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; struct list_head const *__mptr___4 ; struct _ddebug descriptor___0 ; long tmp___0 ; { dropped_count = 0U; sess = conn->sess; ldv_mutex_lock_231(& sess->cmdsn_mutex); __mptr = (struct list_head const *)sess->sess_ooo_cmdsn_list.next; ooo_cmdsn = (struct iscsi_ooo_cmdsn *)__mptr + 0xffffffffffffffe8UL; __mptr___0 = (struct list_head const *)ooo_cmdsn->ooo_list.next; ooo_cmdsn_tmp = (struct iscsi_ooo_cmdsn *)__mptr___0 + 0xffffffffffffffe8UL; goto ldv_57833; ldv_57832: ; if ((int )ooo_cmdsn->cid != (int )conn->cid) { goto ldv_57829; } else { } dropped_count = dropped_count + 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_discard_unacknowledged_ooo_cmdsns_for_conn"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor.format = "Dropping unacknowledged CmdSN: 0x%08x during connection recovery on CID: %hu\n"; descriptor.lineno = 290U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Dropping unacknowledged CmdSN: 0x%08x during connection recovery on CID: %hu\n", ooo_cmdsn->cmdsn, (int )conn->cid); } else { } iscsit_remove_ooo_cmdsn(sess, ooo_cmdsn); ldv_57829: ooo_cmdsn = ooo_cmdsn_tmp; __mptr___1 = (struct list_head const *)ooo_cmdsn_tmp->ooo_list.next; ooo_cmdsn_tmp = (struct iscsi_ooo_cmdsn *)__mptr___1 + 0xffffffffffffffe8UL; ldv_57833: ; if ((unsigned long )(& ooo_cmdsn->ooo_list) != (unsigned long )(& sess->sess_ooo_cmdsn_list)) { goto ldv_57832; } else { } ldv_mutex_unlock_232(& sess->cmdsn_mutex); spin_lock_bh(& conn->cmd_lock); __mptr___2 = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr___2 + 0xfffffffffffffc80UL; __mptr___3 = (struct list_head const *)cmd->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___3 + 0xfffffffffffffc80UL; goto ldv_57843; ldv_57842: ; if (((unsigned int )cmd->cmd_flags & 128U) == 0U) { goto ldv_57841; } else { } list_del_init(& cmd->i_conn_node); spin_unlock_bh(& conn->cmd_lock); iscsit_free_cmd(cmd, 1); spin_lock_bh(& conn->cmd_lock); ldv_57841: cmd = cmd_tmp; __mptr___4 = (struct list_head const *)cmd_tmp->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___4 + 0xfffffffffffffc80UL; ldv_57843: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_57842; } else { } spin_unlock_bh(& conn->cmd_lock); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_discard_unacknowledged_ooo_cmdsns_for_conn"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor___0.format = "Dropped %u total unacknowledged commands on CID: %hu for ExpCmdSN: 0x%08x.\n"; descriptor___0.lineno = 310U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Dropped %u total unacknowledged commands on CID: %hu for ExpCmdSN: 0x%08x.\n", dropped_count, (int )conn->cid, sess->exp_cmd_sn); } else { } return (0); } } int iscsit_prepare_cmds_for_realligance(struct iscsi_conn *conn ) { u32 cmd_count ; struct iscsi_cmd *cmd ; struct iscsi_cmd *cmd_tmp ; struct iscsi_conn_recovery *cr ; void *tmp ; struct lock_class_key __key ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct _ddebug descriptor ; long tmp___0 ; int tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; struct list_head const *__mptr___1 ; { cmd_count = 0U; tmp = kzalloc(320UL, 208U); cr = (struct iscsi_conn_recovery *)tmp; if ((unsigned long )cr == (unsigned long )((struct iscsi_conn_recovery *)0)) { printk("\vUnable to allocate memory for struct iscsi_conn_recovery.\n"); return (-1); } else { } INIT_LIST_HEAD(& cr->cr_list); INIT_LIST_HEAD(& cr->conn_recovery_cmd_list); spinlock_check(& cr->conn_recovery_cmd_lock); __raw_spin_lock_init(& cr->conn_recovery_cmd_lock.__annonCompField17.rlock, "&(&cr->conn_recovery_cmd_lock)->rlock", & __key); spin_lock_bh(& conn->cmd_lock); __mptr = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; goto ldv_57865; ldv_57864: ; if ((unsigned int )cmd->iscsi_opcode != 1U && (unsigned int )cmd->iscsi_opcode != 0U) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_prepare_cmds_for_realligance"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor.format = "Not performing realligence on Opcode: 0x%02x, ITT: 0x%08x, CmdSN: 0x%08x, CID: %hu\n"; descriptor.lineno = 352U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Not performing realligence on Opcode: 0x%02x, ITT: 0x%08x, CmdSN: 0x%08x, CID: %hu\n", (int )cmd->iscsi_opcode, cmd->init_task_tag, cmd->cmd_sn, (int )conn->cid); } else { } list_del_init(& cmd->i_conn_node); spin_unlock_bh(& conn->cmd_lock); iscsit_free_cmd(cmd, 1); spin_lock_bh(& conn->cmd_lock); goto ldv_57862; } else { } if (((unsigned int )cmd->cmd_flags & 128U) == 0U && (unsigned int )cmd->immediate_cmd == 0U) { tmp___1 = iscsi_sna_gte(cmd->cmd_sn, (conn->sess)->exp_cmd_sn); if (tmp___1 != 0) { list_del_init(& cmd->i_conn_node); spin_unlock_bh(& conn->cmd_lock); iscsit_free_cmd(cmd, 1); spin_lock_bh(& conn->cmd_lock); goto ldv_57862; } else { } } else { } cmd_count = cmd_count + 1U; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_prepare_cmds_for_realligance"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_erl2.c"; descriptor___0.format = "Preparing Opcode: 0x%02x, ITT: 0x%08x, CmdSN: 0x%08x, StatSN: 0x%08x, CID: %hu for realligence.\n"; descriptor___0.lineno = 386U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___0, "Preparing Opcode: 0x%02x, ITT: 0x%08x, CmdSN: 0x%08x, StatSN: 0x%08x, CID: %hu for realligence.\n", (int )cmd->iscsi_opcode, cmd->init_task_tag, cmd->cmd_sn, cmd->stat_sn, (int )conn->cid); } else { } cmd->deferred_i_state = cmd->i_state; cmd->i_state = 8; if ((unsigned int )cmd->data_direction == 1U) { iscsit_stop_dataout_timer(cmd); } else { } cmd->sess = conn->sess; list_del_init(& cmd->i_conn_node); spin_unlock_bh(& conn->cmd_lock); iscsit_free_all_datain_reqs(cmd); transport_wait_for_tasks(& cmd->se_cmd); spin_lock(& cr->conn_recovery_cmd_lock); list_add_tail(& cmd->i_conn_node, & cr->conn_recovery_cmd_list); spin_unlock(& cr->conn_recovery_cmd_lock); spin_lock_bh(& conn->cmd_lock); cmd->cr = cr; cmd->conn = (struct iscsi_conn *)0; ldv_57862: cmd = cmd_tmp; __mptr___1 = (struct list_head const *)cmd_tmp->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___1 + 0xfffffffffffffc80UL; ldv_57865: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_57864; } else { } spin_unlock_bh(& conn->cmd_lock); cr->cid = conn->cid; cr->cmd_count = cmd_count; cr->maxrecvdatasegmentlength = (conn->conn_ops)->MaxRecvDataSegmentLength; cr->maxxmitdatasegmentlength = (conn->conn_ops)->MaxXmitDataSegmentLength; cr->sess = conn->sess; iscsit_attach_inactive_connection_recovery_entry(conn->sess, cr); return (0); } } int iscsit_connection_recovery_transport_reset(struct iscsi_conn *conn ) { int tmp ; { atomic_set(& conn->connection_recovery, 1); tmp = iscsit_close_connection(conn); if (tmp < 0) { return (-1); } else { } return (0); } } bool ldv_queue_work_on_219(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_220(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_221(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_222(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_223(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_224(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_225(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_226(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_227(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_228(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_229(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_230(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_231(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_232(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv__builtin_va_end(__builtin_va_list * ) ; __inline static long ldv__builtin_expect(long exp , long c ) ; void ldv__builtin_va_start(__builtin_va_list * ) ; __inline static int variable_test_bit(long nr , unsigned long const volatile *addr ) { int oldbit ; { __asm__ volatile ("bt %2,%1\n\tsbb %0,%0": "=r" (oldbit): "m" (*((unsigned long *)addr)), "Ir" (nr)); return (oldbit); } } __inline static __u16 __fswab16(__u16 val ) { { return ((__u16 )((int )((short )((int )val << 8)) | (int )((short )((int )val >> 8)))); } } extern int vsnprintf(char * , size_t , char const * , va_list * ) ; long ldv_ptr_err(void const *ptr ) ; extern void __bad_percpu_size(void) ; extern struct task_struct *current_task ; __inline static struct task_struct *get_current(void) { struct task_struct *pfo_ret__ ; { switch (8UL) { case 1UL: __asm__ ("movb %%gs:%P1,%0": "=q" (pfo_ret__): "p" (& current_task)); goto ldv_2696; case 2UL: __asm__ ("movw %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_2696; case 4UL: __asm__ ("movl %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_2696; case 8UL: __asm__ ("movq %%gs:%P1,%0": "=r" (pfo_ret__): "p" (& current_task)); goto ldv_2696; default: __bad_percpu_size(); } ldv_2696: ; return (pfo_ret__); } } extern int bitmap_find_free_region(unsigned long * , unsigned int , int ) ; extern void bitmap_release_region(unsigned long * , unsigned int , int ) ; extern bool zalloc_cpumask_var(cpumask_var_t ** , gfp_t ) ; extern void free_cpumask_var(cpumask_var_t ) ; __inline static long PTR_ERR(void const *ptr ) ; __inline static bool IS_ERR(void const *ptr ) ; __inline static void atomic_inc(atomic_t *v ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; incl %0": "+m" (v->counter)); return; } } extern void __mutex_init(struct mutex * , char const * , struct lock_class_key * ) ; int ldv_mutex_trylock_259(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_257(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_260(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_261(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_264(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_256(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_258(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_262(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_263(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_auth_id_lock(struct mutex *lock ) ; void ldv_mutex_unlock_auth_id_lock(struct mutex *lock ) ; __inline static int test_ti_thread_flag(struct thread_info *ti , int flag ) { int tmp ; { tmp = variable_test_bit((long )flag, (unsigned long const volatile *)(& ti->flags)); return (tmp); } } extern int __preempt_count ; __inline static void __preempt_count_sub(int val ) { int pao_ID__ ; { pao_ID__ = 0; switch (4UL) { case 1UL: ; if (pao_ID__ == 1) { __asm__ ("incb %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decb %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addb %1, %%gs:%0": "+m" (__preempt_count): "qi" (- val)); } goto ldv_6681; case 2UL: ; if (pao_ID__ == 1) { __asm__ ("incw %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decw %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addw %1, %%gs:%0": "+m" (__preempt_count): "ri" (- val)); } goto ldv_6681; case 4UL: ; if (pao_ID__ == 1) { __asm__ ("incl %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decl %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addl %1, %%gs:%0": "+m" (__preempt_count): "ri" (- val)); } goto ldv_6681; case 8UL: ; if (pao_ID__ == 1) { __asm__ ("incq %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decq %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addq %1, %%gs:%0": "+m" (__preempt_count): "re" (- val)); } goto ldv_6681; default: __bad_percpu_size(); } ldv_6681: ; return; } } int ldv_del_timer_sync_265(struct timer_list *ldv_func_arg1 ) ; extern void __init_waitqueue_head(wait_queue_head_t * , char const * , struct lock_class_key * ) ; __inline static void init_completion(struct completion *x ) { struct lock_class_key __key ; { x->done = 0U; __init_waitqueue_head(& x->wait, "&x->wait", & __key); return; } } bool ldv_queue_work_on_251(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_253(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_252(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_255(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_254(struct workqueue_struct *ldv_func_arg1 ) ; extern void kernel_sigaction(int , __sighandler_t ) ; __inline static void allow_signal(int sig ) { { kernel_sigaction(sig, (__signalfn_t *)2); return; } } extern void idr_preload(gfp_t ) ; extern int idr_alloc(struct idr * , void * , int , int , gfp_t ) ; extern void idr_remove(struct idr * , int ) ; __inline static void idr_preload_end(void) { { __asm__ volatile ("": : : "memory"); __preempt_count_sub(1); return; } } extern int wake_up_process(struct task_struct * ) ; extern void flush_signals(struct task_struct * ) ; __inline static int test_tsk_thread_flag(struct task_struct *tsk , int flag ) { int tmp ; { tmp = test_ti_thread_flag((struct thread_info *)tsk->stack, flag); return (tmp); } } __inline static int signal_pending(struct task_struct *p ) { int tmp ; long tmp___0 ; { tmp = test_tsk_thread_flag(p, 2); tmp___0 = ldv__builtin_expect(tmp != 0, 0L); return ((int )tmp___0); } } struct timer_list *ldv_timer_list_5 ; void choose_timer_5(struct timer_list *timer ) ; void disable_suitable_timer_5(struct timer_list *timer ) ; void activate_pending_timer_5(struct timer_list *timer , unsigned long data , int pending_flag ) ; int reg_timer_5(struct timer_list *timer ) ; extern struct task_struct *kthread_create_on_node(int (*)(void * ) , void * , int , char const * , ...) ; extern int kthread_stop(struct task_struct * ) ; extern int sock_create(int , int , int , struct socket ** ) ; extern void sock_release(struct socket * ) ; extern int kernel_bind(struct socket * , struct sockaddr * , int ) ; extern int kernel_listen(struct socket * , int ) ; extern int kernel_accept(struct socket * , struct socket ** , int ) ; extern int kernel_setsockopt(struct socket * , int , int , char * , unsigned int ) ; __inline static bool ipv6_addr_v4mapped(struct in6_addr const *a ) { { return ((*((unsigned long *)a) | (unsigned long )(a->in6_u.u6_addr32[2] ^ 4294901760U)) == 0UL); } } extern struct se_session *transport_init_session(enum target_prot_op ) ; extern void __transport_register_session(struct se_portal_group * , struct se_node_acl * , struct se_session * , void * ) ; extern void transport_free_session(struct se_session * ) ; int iscsi_target_check_login_request(struct iscsi_conn *conn , struct iscsi_login *login ) ; int iscsi_target_locate_portal(struct iscsi_np *np , struct iscsi_conn *conn , struct iscsi_login *login ) ; int iscsi_target_start_negotiation(struct iscsi_login *login , struct iscsi_conn *conn ) ; void iscsi_target_nego_release(struct iscsi_conn *conn ) ; int iscsi_login_setup_crypto(struct iscsi_conn *conn ) ; int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn ) ; int iscsi_login_post_auth_non_zero_tsih(struct iscsi_conn *conn , u16 cid , u32 exp_statsn ) ; int iscsit_setup_np(struct iscsi_np *np , struct __kernel_sockaddr_storage *sockaddr ) ; int iscsi_target_setup_login_socket(struct iscsi_np *np , struct __kernel_sockaddr_storage *sockaddr ) ; int iscsit_accept_np(struct iscsi_np *np , struct iscsi_conn *conn ) ; int iscsit_get_login_rx(struct iscsi_conn *conn , struct iscsi_login *login ) ; int iscsit_put_login_tx(struct iscsi_conn *conn , struct iscsi_login *login , u32 length ) ; int iscsi_post_login_handler(struct iscsi_np *np , struct iscsi_conn *conn , u8 zero_tsih ) ; void iscsi_target_login_sess_out(struct iscsi_conn *conn , struct iscsi_np *np , bool zero_tsih , bool new_sess ) ; int iscsi_target_login_thread(void *arg ) ; void iscsit_dec_session_usage_count(struct iscsi_session *sess ) ; void iscsit_inc_session_usage_count(struct iscsi_session *sess ) ; struct iscsi_conn *iscsit_get_conn_from_cid_rcfr(struct iscsi_session *sess , u16 cid ) ; void iscsit_start_nopin_timer(struct iscsi_conn *conn ) ; int iscsit_tx_login_rsp(struct iscsi_conn *conn , u8 status_class , u8 status_detail ) ; void iscsit_collect_login_stats(struct iscsi_conn *conn , u8 status_class , u8 status_detail ) ; int iscsit_deaccess_np(struct iscsi_np *np , struct iscsi_portal_group *tpg , struct iscsi_tpg_np *tpg_np ) ; void iscsit_thread_get_cpumask(struct iscsi_conn *conn ) ; int iscsi_target_tx_thread(void *arg ) ; int iscsi_target_rx_thread(void *arg ) ; void iscsit_stop_session(struct iscsi_session *sess , int session_sleep , int connection_sleep ) ; struct iscsit_global *iscsit_global ; struct idr sess_idr ; struct mutex auth_id_lock ; spinlock_t sess_idr_lock ; extern bool try_module_get(struct module * ) ; struct iscsit_transport *iscsit_get_transport(int type ) ; void iscsit_put_transport(struct iscsit_transport *t ) ; static struct iscsi_login *iscsi_login_init_conn(struct iscsi_conn *conn ) { struct iscsi_login *login ; void *tmp ; void *tmp___0 ; void *tmp___1 ; void *tmp___2 ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; struct lock_class_key __key___2 ; struct lock_class_key __key___3 ; struct lock_class_key __key___4 ; struct lock_class_key __key___5 ; bool tmp___3 ; int tmp___4 ; { tmp = kzalloc(192UL, 208U); login = (struct iscsi_login *)tmp; if ((unsigned long )login == (unsigned long )((struct iscsi_login *)0)) { printk("\vUnable to allocate memory for struct iscsi_login.\n"); return ((struct iscsi_login *)0); } else { } conn->login = login; login->conn = conn; login->first_request = 1U; tmp___0 = kzalloc(8192UL, 208U); login->req_buf = (char *)tmp___0; if ((unsigned long )login->req_buf == (unsigned long )((char *)0)) { printk("\vUnable to allocate memory for response buffer.\n"); goto out_login; } else { } tmp___1 = kzalloc(8192UL, 208U); login->rsp_buf = (char *)tmp___1; if ((unsigned long )login->rsp_buf == (unsigned long )((char *)0)) { printk("\vUnable to allocate memory for request buffer.\n"); goto out_req_buf; } else { } tmp___2 = kzalloc(20UL, 208U); conn->conn_ops = (struct iscsi_conn_ops *)tmp___2; if ((unsigned long )conn->conn_ops == (unsigned long )((struct iscsi_conn_ops *)0)) { printk("\vUnable to allocate memory for struct iscsi_conn_ops.\n"); goto out_rsp_buf; } else { } __init_waitqueue_head(& conn->queues_wq, "&conn->queues_wq", & __key); INIT_LIST_HEAD(& conn->conn_list); INIT_LIST_HEAD(& conn->conn_cmd_list); INIT_LIST_HEAD(& conn->immed_queue_list); INIT_LIST_HEAD(& conn->response_queue_list); init_completion(& conn->conn_post_wait_comp); init_completion(& conn->conn_wait_comp); init_completion(& conn->conn_wait_rcfr_comp); init_completion(& conn->conn_waiting_on_uc_comp); init_completion(& conn->conn_logout_comp); init_completion(& conn->rx_half_close_comp); init_completion(& conn->tx_half_close_comp); spinlock_check(& conn->cmd_lock); __raw_spin_lock_init(& conn->cmd_lock.__annonCompField17.rlock, "&(&conn->cmd_lock)->rlock", & __key___0); spinlock_check(& conn->conn_usage_lock); __raw_spin_lock_init(& conn->conn_usage_lock.__annonCompField17.rlock, "&(&conn->conn_usage_lock)->rlock", & __key___1); spinlock_check(& conn->immed_queue_lock); __raw_spin_lock_init(& conn->immed_queue_lock.__annonCompField17.rlock, "&(&conn->immed_queue_lock)->rlock", & __key___2); spinlock_check(& conn->nopin_timer_lock); __raw_spin_lock_init(& conn->nopin_timer_lock.__annonCompField17.rlock, "&(&conn->nopin_timer_lock)->rlock", & __key___3); spinlock_check(& conn->response_queue_lock); __raw_spin_lock_init(& conn->response_queue_lock.__annonCompField17.rlock, "&(&conn->response_queue_lock)->rlock", & __key___4); spinlock_check(& conn->state_lock); __raw_spin_lock_init(& conn->state_lock.__annonCompField17.rlock, "&(&conn->state_lock)->rlock", & __key___5); tmp___3 = zalloc_cpumask_var(& conn->conn_cpumask, 208U); if (tmp___3) { tmp___4 = 0; } else { tmp___4 = 1; } if (tmp___4) { printk("\vUnable to allocate conn->conn_cpumask\n"); goto out_conn_ops; } else { } conn->conn_login = login; return (login); out_conn_ops: kfree((void const *)conn->conn_ops); out_rsp_buf: kfree((void const *)login->rsp_buf); out_req_buf: kfree((void const *)login->req_buf); out_login: kfree((void const *)login); return ((struct iscsi_login *)0); } } int iscsi_login_setup_crypto(struct iscsi_conn *conn ) { bool tmp ; bool tmp___0 ; { conn->conn_rx_hash.flags = 0U; conn->conn_rx_hash.tfm = crypto_alloc_hash("crc32c", 0U, 128U); tmp = IS_ERR((void const *)conn->conn_rx_hash.tfm); if ((int )tmp) { printk("\vcrypto_alloc_hash() failed for conn_rx_tfm\n"); return (-12); } else { } conn->conn_tx_hash.flags = 0U; conn->conn_tx_hash.tfm = crypto_alloc_hash("crc32c", 0U, 128U); tmp___0 = IS_ERR((void const *)conn->conn_tx_hash.tfm); if ((int )tmp___0) { printk("\vcrypto_alloc_hash() failed for conn_tx_tfm\n"); crypto_free_hash(conn->conn_rx_hash.tfm); return (-12); } else { } return (0); } } static int iscsi_login_check_initiator_version(struct iscsi_conn *conn , u8 version_max , u8 version_min ) { { if ((unsigned int )version_max != 0U || (unsigned int )version_min != 0U) { printk("\vUnsupported iSCSI IETF Pre-RFC Revision, version Min/Max 0x%02x/0x%02x, rejecting login.\n", (int )version_min, (int )version_max); iscsit_tx_login_rsp(conn, 2, 5); return (-1); } else { } return (0); } } int iscsi_check_for_session_reinstatement(struct iscsi_conn *conn ) { int sessiontype ; struct iscsi_param *initiatorname_param ; struct iscsi_param *sessiontype_param ; struct iscsi_portal_group *tpg ; struct iscsi_session *sess ; struct iscsi_session *sess_p ; struct se_portal_group *se_tpg ; struct se_session *se_sess ; struct se_session *se_sess_tmp ; int tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; struct list_head const *__mptr___1 ; struct _ddebug descriptor ; long tmp___4 ; { initiatorname_param = (struct iscsi_param *)0; sessiontype_param = (struct iscsi_param *)0; tpg = conn->tpg; sess = (struct iscsi_session *)0; sess_p = (struct iscsi_session *)0; se_tpg = & tpg->tpg_se_tpg; initiatorname_param = iscsi_find_param_from_key((char *)"InitiatorName", conn->param_list); sessiontype_param = iscsi_find_param_from_key((char *)"SessionType", conn->param_list); if ((unsigned long )initiatorname_param == (unsigned long )((struct iscsi_param *)0) || (unsigned long )sessiontype_param == (unsigned long )((struct iscsi_param *)0)) { iscsit_tx_login_rsp(conn, 2, 7); return (-1); } else { } tmp = strncmp((char const *)sessiontype_param->value, "Normal", 6UL); sessiontype = tmp != 0; spin_lock_bh(& se_tpg->session_lock); __mptr = (struct list_head const *)se_tpg->tpg_sess_list.next; se_sess = (struct se_session *)__mptr + 0xffffffffffffffd0UL; __mptr___0 = (struct list_head const *)se_sess->sess_list.next; se_sess_tmp = (struct se_session *)__mptr___0 + 0xffffffffffffffd0UL; goto ldv_59015; ldv_59014: sess_p = (struct iscsi_session *)se_sess->fabric_sess_ptr; spin_lock(& sess_p->conn_lock); tmp___0 = atomic_read((atomic_t const *)(& sess_p->session_fall_back_to_erl0)); if (tmp___0 != 0) { spin_unlock(& sess_p->conn_lock); goto ldv_59012; } else { tmp___1 = atomic_read((atomic_t const *)(& sess_p->session_logout)); if (tmp___1 != 0) { spin_unlock(& sess_p->conn_lock); goto ldv_59012; } else if (((unsigned int )sess_p->time2retain_timer_flags & 4U) != 0U) { spin_unlock(& sess_p->conn_lock); goto ldv_59012; } else { } } tmp___2 = memcmp((void const *)(& sess_p->isid), (void const *)(& (conn->sess)->isid), 6UL); if (tmp___2 == 0) { tmp___3 = strcmp((char const *)(& (sess_p->sess_ops)->InitiatorName), (char const *)initiatorname_param->value); if (tmp___3 == 0 && (int )(sess_p->sess_ops)->SessionType == sessiontype) { atomic_set(& sess_p->session_reinstatement, 1); spin_unlock(& sess_p->conn_lock); iscsit_inc_session_usage_count(sess_p); iscsit_stop_time2retain_timer(sess_p); sess = sess_p; goto ldv_59013; } else { } } else { } spin_unlock(& sess_p->conn_lock); ldv_59012: se_sess = se_sess_tmp; __mptr___1 = (struct list_head const *)se_sess_tmp->sess_list.next; se_sess_tmp = (struct se_session *)__mptr___1 + 0xffffffffffffffd0UL; ldv_59015: ; if ((unsigned long )(& se_sess->sess_list) != (unsigned long )(& se_tpg->tpg_sess_list)) { goto ldv_59014; } else { } ldv_59013: spin_unlock_bh(& se_tpg->session_lock); if ((unsigned long )sess == (unsigned long )((struct iscsi_session *)0)) { return (0); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_check_for_session_reinstatement"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor.format = "%s iSCSI Session SID %u is still active for %s, preforming session reinstatement.\n"; descriptor.lineno = 215U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor, "%s iSCSI Session SID %u is still active for %s, preforming session reinstatement.\n", sessiontype != 0 ? (char *)"Discovery" : (char *)"Normal", sess->sid, (char *)(& (sess->sess_ops)->InitiatorName)); } else { } spin_lock_bh(& sess->conn_lock); if (sess->session_state == 4U) { spin_unlock_bh(& sess->conn_lock); iscsit_dec_session_usage_count(sess); target_put_session(sess->se_sess); return (0); } else { } spin_unlock_bh(& sess->conn_lock); iscsit_stop_session(sess, 1, 1); iscsit_dec_session_usage_count(sess); target_put_session(sess->se_sess); return (0); } } static void iscsi_login_set_conn_values(struct iscsi_session *sess , struct iscsi_conn *conn , __be16 cid ) { __u16 tmp ; u32 tmp___0 ; { conn->sess = sess; tmp = __fswab16((int )cid); conn->cid = tmp; get_random_bytes((void *)(& conn->stat_sn), 4); ldv_mutex_lock_263(& auth_id_lock); tmp___0 = iscsit_global->auth_id; iscsit_global->auth_id = iscsit_global->auth_id + 1U; conn->auth_id = tmp___0; ldv_mutex_unlock_264(& auth_id_lock); return; } } static int iscsi_change_param_sprintf(struct iscsi_conn *conn , char const *fmt , ...) { va_list args ; unsigned char buf[64U] ; int tmp ; { memset((void *)(& buf), 0, 64UL); ldv__builtin_va_start((va_list *)(& args)); vsnprintf((char *)(& buf), 64UL, fmt, (va_list *)(& args)); ldv__builtin_va_end((va_list *)(& args)); tmp = iscsi_change_param_value((char *)(& buf), conn->param_list, 0); if (tmp < 0) { iscsit_tx_login_rsp(conn, 3, 2); return (-1); } else { } return (0); } } static int iscsi_login_zero_tsih_s1(struct iscsi_conn *conn , unsigned char *buf ) { struct iscsi_session *sess ; struct iscsi_login_req *pdu ; int ret ; void *tmp ; __u32 tmp___0 ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; struct lock_class_key __key___2 ; struct lock_class_key __key___3 ; struct lock_class_key __key___4 ; __u32 tmp___1 ; void *tmp___2 ; bool tmp___3 ; { sess = (struct iscsi_session *)0; pdu = (struct iscsi_login_req *)buf; tmp = kzalloc(1280UL, 208U); sess = (struct iscsi_session *)tmp; if ((unsigned long )sess == (unsigned long )((struct iscsi_session *)0)) { iscsit_tx_login_rsp(conn, 3, 2); printk("\vCould not allocate memory for session\n"); return (-12); } else { } iscsi_login_set_conn_values(sess, conn, (int )pdu->cid); sess->init_task_tag = pdu->itt; memcpy((void *)(& sess->isid), (void const *)(& pdu->isid), 6UL); tmp___0 = __fswab32(pdu->cmdsn); sess->exp_cmd_sn = tmp___0; INIT_LIST_HEAD(& sess->sess_conn_list); INIT_LIST_HEAD(& sess->sess_ooo_cmdsn_list); INIT_LIST_HEAD(& sess->cr_active_list); INIT_LIST_HEAD(& sess->cr_inactive_list); init_completion(& sess->async_msg_comp); init_completion(& sess->reinstatement_comp); init_completion(& sess->session_wait_comp); init_completion(& sess->session_waiting_on_uc_comp); __mutex_init(& sess->cmdsn_mutex, "&sess->cmdsn_mutex", & __key); spinlock_check(& sess->conn_lock); __raw_spin_lock_init(& sess->conn_lock.__annonCompField17.rlock, "&(&sess->conn_lock)->rlock", & __key___0); spinlock_check(& sess->cr_a_lock); __raw_spin_lock_init(& sess->cr_a_lock.__annonCompField17.rlock, "&(&sess->cr_a_lock)->rlock", & __key___1); spinlock_check(& sess->cr_i_lock); __raw_spin_lock_init(& sess->cr_i_lock.__annonCompField17.rlock, "&(&sess->cr_i_lock)->rlock", & __key___2); spinlock_check(& sess->session_usage_lock); __raw_spin_lock_init(& sess->session_usage_lock.__annonCompField17.rlock, "&(&sess->session_usage_lock)->rlock", & __key___3); spinlock_check(& sess->ttt_lock); __raw_spin_lock_init(& sess->ttt_lock.__annonCompField17.rlock, "&(&sess->ttt_lock)->rlock", & __key___4); idr_preload(208U); spin_lock_bh(& sess_idr_lock); ret = idr_alloc(& sess_idr, (void *)0, 0, 0, 0U); if (ret >= 0) { sess->session_index = ret; } else { } spin_unlock_bh(& sess_idr_lock); idr_preload_end(); if (ret < 0) { printk("\vidr_alloc() for sess_idr failed\n"); iscsit_tx_login_rsp(conn, 3, 2); kfree((void const *)sess); return (-12); } else { } sess->creation_time = get_jiffies_64(); tmp___1 = __fswab32(pdu->cmdsn); sess->max_cmd_sn = tmp___1; tmp___2 = kzalloc(1244UL, 208U); sess->sess_ops = (struct iscsi_sess_ops *)tmp___2; if ((unsigned long )sess->sess_ops == (unsigned long )((struct iscsi_sess_ops *)0)) { iscsit_tx_login_rsp(conn, 3, 2); printk("\vUnable to allocate memory for struct iscsi_sess_ops.\n"); kfree((void const *)sess); return (-12); } else { } sess->se_sess = transport_init_session(0); tmp___3 = IS_ERR((void const *)sess->se_sess); if ((int )tmp___3) { iscsit_tx_login_rsp(conn, 3, 2); kfree((void const *)sess->sess_ops); kfree((void const *)sess); return (-12); } else { } return (0); } } static int iscsi_login_zero_tsih_s2(struct iscsi_conn *conn ) { struct iscsi_node_attrib *na ; struct iscsi_session *sess ; bool iser ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; struct iscsi_param *param ; unsigned long mrdsl ; unsigned long off ; int rc ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; struct _ddebug descriptor ; long tmp___7 ; { sess = conn->sess; iser = 0; sess->tpg = conn->tpg; (sess->tpg)->ntsih = (u16 )((int )(sess->tpg)->ntsih + 1); sess->tsih = (sess->tpg)->ntsih; if ((unsigned int )sess->tsih == 0U) { (sess->tpg)->ntsih = (u16 )((int )(sess->tpg)->ntsih + 1); sess->tsih = (sess->tpg)->ntsih; } else { } tmp = iscsi_copy_param_list(& conn->param_list, (conn->tpg)->param_list, 1); if (tmp < 0) { iscsit_tx_login_rsp(conn, 3, 2); return (-1); } else { } if ((conn->conn_transport)->transport_type == 5) { iser = 1; } else { } iscsi_set_keys_to_negotiate(conn->param_list, (int )iser); if ((unsigned int )(sess->sess_ops)->SessionType != 0U) { tmp___0 = iscsi_set_keys_irrelevant_for_discovery(conn->param_list); return (tmp___0); } else { } na = iscsit_tpg_get_node_attrib(sess); tmp___1 = iscsi_change_param_sprintf(conn, "TargetPortalGroupTag=%hu", (int )(sess->tpg)->tpgt); if (tmp___1 != 0) { return (-1); } else { } tmp___2 = iscsi_change_param_sprintf(conn, "ErrorRecoveryLevel=%d", na->default_erl); if (tmp___2 != 0) { return (-1); } else { } if ((int )iser) { tmp___3 = iscsi_change_param_sprintf(conn, "RDMAExtensions=Yes"); if (tmp___3 != 0) { return (-1); } else { } param = iscsi_find_param_from_key((char *)"MaxRecvDataSegmentLength", conn->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_tx_login_rsp(conn, 3, 2); return (-1); } else { } rc = kstrtoul((char const *)param->value, 0U, & mrdsl); if (rc < 0) { iscsit_tx_login_rsp(conn, 3, 2); return (-1); } else { } off = mrdsl & 4095UL; if (off == 0UL) { goto check_prot; } else { } if (mrdsl <= 4095UL) { mrdsl = 4096UL; } else { mrdsl = mrdsl - off; } printk("\fAligning ISER MaxRecvDataSegmentLength: %lu down to PAGE_SIZE\n", mrdsl); tmp___4 = iscsi_change_param_sprintf(conn, "MaxRecvDataSegmentLength=%lu\n", mrdsl); if (tmp___4 != 0) { return (-1); } else { } check_prot: ; if (((unsigned int )(sess->se_sess)->sup_prot_ops & 42U) != 0U) { tmp___5 = iscsi_change_param_sprintf(conn, "ImmediateData=No"); if (tmp___5 != 0) { return (-1); } else { } tmp___6 = iscsi_change_param_sprintf(conn, "InitialR2T=Yes"); if (tmp___6 != 0) { return (-1); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_login_zero_tsih_s2"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor.format = "Forcing ImmediateData=No + InitialR2T=Yes for T10-PI enabled ISER session\n"; descriptor.lineno = 471U; descriptor.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___7 != 0L) { __dynamic_pr_debug(& descriptor, "Forcing ImmediateData=No + InitialR2T=Yes for T10-PI enabled ISER session\n"); } else { } } else { } } else { } return (0); } } static int iscsi_login_non_zero_tsih_s1(struct iscsi_conn *conn , unsigned char *buf ) { struct iscsi_login_req *pdu ; { pdu = (struct iscsi_login_req *)buf; iscsi_login_set_conn_values((struct iscsi_session *)0, conn, (int )pdu->cid); return (0); } } static int iscsi_login_non_zero_tsih_s2(struct iscsi_conn *conn , unsigned char *buf ) { struct iscsi_portal_group *tpg ; struct iscsi_session *sess ; struct iscsi_session *sess_p ; struct se_portal_group *se_tpg ; struct se_session *se_sess ; struct se_session *se_sess_tmp ; struct iscsi_login_req *pdu ; bool iser ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; int tmp ; int tmp___0 ; int tmp___1 ; __u16 tmp___2 ; struct list_head const *__mptr___1 ; int tmp___3 ; int tmp___4 ; { tpg = conn->tpg; sess = (struct iscsi_session *)0; sess_p = (struct iscsi_session *)0; se_tpg = & tpg->tpg_se_tpg; pdu = (struct iscsi_login_req *)buf; iser = 0; spin_lock_bh(& se_tpg->session_lock); __mptr = (struct list_head const *)se_tpg->tpg_sess_list.next; se_sess = (struct se_session *)__mptr + 0xffffffffffffffd0UL; __mptr___0 = (struct list_head const *)se_sess->sess_list.next; se_sess_tmp = (struct se_session *)__mptr___0 + 0xffffffffffffffd0UL; goto ldv_59081; ldv_59080: sess_p = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp = atomic_read((atomic_t const *)(& sess_p->session_fall_back_to_erl0)); if (tmp != 0) { goto ldv_59078; } else { tmp___0 = atomic_read((atomic_t const *)(& sess_p->session_logout)); if (tmp___0 != 0) { goto ldv_59078; } else if (((unsigned int )sess_p->time2retain_timer_flags & 4U) != 0U) { goto ldv_59078; } else { } } tmp___1 = memcmp((void const *)(& sess_p->isid), (void const *)(& pdu->isid), 6UL); if (tmp___1 == 0) { tmp___2 = __fswab16((int )pdu->tsih); if ((int )sess_p->tsih == (int )tmp___2) { iscsit_inc_session_usage_count(sess_p); iscsit_stop_time2retain_timer(sess_p); sess = sess_p; goto ldv_59079; } else { } } else { } ldv_59078: se_sess = se_sess_tmp; __mptr___1 = (struct list_head const *)se_sess_tmp->sess_list.next; se_sess_tmp = (struct se_session *)__mptr___1 + 0xffffffffffffffd0UL; ldv_59081: ; if ((unsigned long )(& se_sess->sess_list) != (unsigned long )(& se_tpg->tpg_sess_list)) { goto ldv_59080; } else { } ldv_59079: spin_unlock_bh(& se_tpg->session_lock); if ((unsigned long )sess == (unsigned long )((struct iscsi_session *)0)) { printk("\vInitiator attempting to add a connection to a non-existent session, rejecting iSCSI Login.\n"); iscsit_tx_login_rsp(conn, 2, 10); return (-1); } else { } spin_lock_bh(& sess->conn_lock); if (sess->session_state == 4U) { atomic_set(& sess->session_continuation, 1); } else { } spin_unlock_bh(& sess->conn_lock); iscsi_login_set_conn_values(sess, conn, (int )pdu->cid); tmp___3 = iscsi_copy_param_list(& conn->param_list, (conn->tpg)->param_list, 0); if (tmp___3 < 0) { iscsit_tx_login_rsp(conn, 3, 2); return (-1); } else { } if ((conn->conn_transport)->transport_type == 5) { iser = 1; } else { } iscsi_set_keys_to_negotiate(conn->param_list, (int )iser); tmp___4 = iscsi_change_param_sprintf(conn, "TargetPortalGroupTag=%hu", (int )(sess->tpg)->tpgt); if (tmp___4 != 0) { return (-1); } else { } return (0); } } int iscsi_login_post_auth_non_zero_tsih(struct iscsi_conn *conn , u16 cid , u32 exp_statsn ) { struct iscsi_conn *conn_ptr ; struct iscsi_conn_recovery *cr ; struct iscsi_session *sess ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; int tmp___1 ; { conn_ptr = (struct iscsi_conn *)0; cr = (struct iscsi_conn_recovery *)0; sess = conn->sess; conn_ptr = iscsit_get_conn_from_cid_rcfr(sess, (int )cid); if ((unsigned long )conn_ptr != (unsigned long )((struct iscsi_conn *)0)) { printk("\vConnection exists with CID %hu for %s, performing connection reinstatement.\n", (int )conn_ptr->cid, (char *)(& (sess->sess_ops)->InitiatorName)); iscsit_connection_reinstatement_rcfr(conn_ptr); iscsit_dec_conn_usage_count(conn_ptr); } else { } if ((unsigned int )(sess->sess_ops)->ErrorRecoveryLevel == 2U) { cr = iscsit_get_inactive_connection_recovery_entry(sess, (int )cid); if ((unsigned long )cr != (unsigned long )((struct iscsi_conn_recovery *)0)) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_login_post_auth_non_zero_tsih"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor.format = "Performing implicit logout for connection recovery on CID: %hu\n"; descriptor.lineno = 608U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Performing implicit logout for connection recovery on CID: %hu\n", (int )conn->cid); } else { } iscsit_discard_cr_cmds_by_expstatsn(cr, exp_statsn); } else { } } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_login_post_auth_non_zero_tsih"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___0.format = "Adding CID %hu to existing session for %s.\n"; descriptor___0.lineno = 620U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Adding CID %hu to existing session for %s.\n", (int )cid, (char *)(& (sess->sess_ops)->InitiatorName)); } else { } tmp___1 = atomic_read((atomic_t const *)(& sess->nconn)); if (tmp___1 + 1 > (int )(sess->sess_ops)->MaxConnections) { printk("\vAdding additional connection to this session would exceed MaxConnections %d, login failed.\n", (int )(sess->sess_ops)->MaxConnections); iscsit_tx_login_rsp(conn, 2, 6); return (-1); } else { } return (0); } } static void iscsi_post_login_start_timers(struct iscsi_conn *conn ) { struct iscsi_session *sess ; { sess = conn->sess; if ((conn->conn_transport)->transport_type == 5) { return; } else { } if ((unsigned int )(sess->sess_ops)->SessionType == 0U) { iscsit_start_nopin_timer(conn); } else { } return; } } static int iscsit_start_kthreads(struct iscsi_conn *conn ) { int ret ; struct task_struct *__k ; struct task_struct *tmp ; bool tmp___0 ; int tmp___1 ; long tmp___2 ; bool tmp___3 ; struct task_struct *__k___0 ; struct task_struct *tmp___4 ; bool tmp___5 ; int tmp___6 ; long tmp___7 ; bool tmp___8 ; { ret = 0; spin_lock(& iscsit_global->ts_bitmap_lock); conn->bitmap_id = bitmap_find_free_region(iscsit_global->ts_bitmap, 262144U, 0); spin_unlock(& iscsit_global->ts_bitmap_lock); if (conn->bitmap_id < 0) { printk("\vbitmap_find_free_region() failed for iscsit_start_kthreads()\n"); return (-12); } else { } tmp = kthread_create_on_node(& iscsi_target_tx_thread, (void *)conn, -1, "%s", (char *)"iscsi_ttx"); __k = tmp; tmp___0 = IS_ERR((void const *)__k); if (tmp___0) { tmp___1 = 0; } else { tmp___1 = 1; } if (tmp___1) { wake_up_process(__k); } else { } conn->tx_thread = __k; tmp___3 = IS_ERR((void const *)conn->tx_thread); if ((int )tmp___3) { printk("\vUnable to start iscsi_target_tx_thread\n"); tmp___2 = PTR_ERR((void const *)conn->tx_thread); ret = (int )tmp___2; goto out_bitmap; } else { } conn->tx_thread_active = 1; tmp___4 = kthread_create_on_node(& iscsi_target_rx_thread, (void *)conn, -1, "%s", (char *)"iscsi_trx"); __k___0 = tmp___4; tmp___5 = IS_ERR((void const *)__k___0); if (tmp___5) { tmp___6 = 0; } else { tmp___6 = 1; } if (tmp___6) { wake_up_process(__k___0); } else { } conn->rx_thread = __k___0; tmp___8 = IS_ERR((void const *)conn->rx_thread); if ((int )tmp___8) { printk("\vUnable to start iscsi_target_rx_thread\n"); tmp___7 = PTR_ERR((void const *)conn->rx_thread); ret = (int )tmp___7; goto out_tx; } else { } conn->rx_thread_active = 1; return (0); out_tx: kthread_stop(conn->tx_thread); conn->tx_thread_active = 0; out_bitmap: spin_lock(& iscsit_global->ts_bitmap_lock); bitmap_release_region(iscsit_global->ts_bitmap, (unsigned int )conn->bitmap_id, 0); spin_unlock(& iscsit_global->ts_bitmap_lock); return (ret); } } int iscsi_post_login_handler(struct iscsi_np *np , struct iscsi_conn *conn , u8 zero_tsih ) { int stop_timer ; struct iscsi_session *sess ; struct se_session *se_sess ; struct iscsi_portal_group *tpg ; struct se_portal_group *se_tpg ; int rc ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; struct _ddebug descriptor___2 ; int tmp___2 ; long tmp___3 ; struct _ddebug descriptor___3 ; long tmp___4 ; struct _ddebug descriptor___4 ; long tmp___5 ; struct _ddebug descriptor___5 ; int tmp___6 ; long tmp___7 ; u32 tmp___8 ; u32 tmp___9 ; struct _ddebug descriptor___6 ; long tmp___10 ; struct _ddebug descriptor___7 ; long tmp___11 ; { stop_timer = 0; sess = conn->sess; se_sess = sess->se_sess; tpg = sess->tpg; se_tpg = & tpg->tpg_se_tpg; iscsit_inc_conn_usage_count(conn); iscsit_collect_login_stats(conn, 0, 0); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_post_login_handler"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor.format = "Moving to TARG_CONN_STATE_LOGGED_IN.\n"; descriptor.lineno = 709U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Moving to TARG_CONN_STATE_LOGGED_IN.\n"); } else { } conn->conn_state = 5U; iscsi_set_connection_parameters(conn->conn_ops, conn->param_list); if ((unsigned int )zero_tsih == 0U) { iscsi_set_session_parameters(sess->sess_ops, conn->param_list, 0); iscsi_release_param_list(conn->param_list); conn->param_list = (struct iscsi_param_list *)0; spin_lock_bh(& sess->conn_lock); atomic_set(& sess->session_continuation, 0); if (sess->session_state == 4U) { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_post_login_handler"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___0.format = "Moving to TARG_SESS_STATE_LOGGED_IN.\n"; descriptor___0.lineno = 726U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Moving to TARG_SESS_STATE_LOGGED_IN.\n"); } else { } sess->session_state = 3U; stop_timer = 1; } else { } descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_post_login_handler"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___1.format = "iSCSI Login successful on CID: %hu from %s to %s:%hu,%hu\n"; descriptor___1.lineno = 733U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___1, "iSCSI Login successful on CID: %hu from %s to %s:%hu,%hu\n", (int )conn->cid, (unsigned char *)(& conn->login_ip), (unsigned char *)(& conn->local_ip), (int )conn->local_port, (int )tpg->tpgt); } else { } list_add_tail(& conn->conn_list, & sess->sess_conn_list); atomic_inc(& sess->nconn); descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsi_post_login_handler"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___2.format = "Incremented iSCSI Connection count to %hu from node: %s\n"; descriptor___2.lineno = 739U; descriptor___2.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___3 != 0L) { tmp___2 = atomic_read((atomic_t const *)(& sess->nconn)); __dynamic_pr_debug(& descriptor___2, "Incremented iSCSI Connection count to %hu from node: %s\n", tmp___2, (char *)(& (sess->sess_ops)->InitiatorName)); } else { } spin_unlock_bh(& sess->conn_lock); rc = iscsit_start_kthreads(conn); if (rc != 0) { return (rc); } else { } iscsi_post_login_start_timers(conn); iscsit_thread_get_cpumask(conn); conn->conn_rx_reset_cpumask = 1U; conn->conn_tx_reset_cpumask = 1U; iscsit_dec_conn_usage_count(conn); if (stop_timer != 0) { spin_lock_bh(& se_tpg->session_lock); iscsit_stop_time2retain_timer(sess); spin_unlock_bh(& se_tpg->session_lock); } else { } iscsit_dec_session_usage_count(sess); return (0); } else { } iscsi_set_session_parameters(sess->sess_ops, conn->param_list, 1); iscsi_release_param_list(conn->param_list); conn->param_list = (struct iscsi_param_list *)0; iscsit_determine_maxcmdsn(sess); spin_lock_bh(& se_tpg->session_lock); __transport_register_session(& (sess->tpg)->tpg_se_tpg, se_sess->se_node_acl, se_sess, (void *)sess); descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsi_post_login_handler"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___3.format = "Moving to TARG_SESS_STATE_LOGGED_IN.\n"; descriptor___3.lineno = 774U; descriptor___3.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___3, "Moving to TARG_SESS_STATE_LOGGED_IN.\n"); } else { } sess->session_state = 3U; descriptor___4.modname = "iscsi_target_mod"; descriptor___4.function = "iscsi_post_login_handler"; descriptor___4.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___4.format = "iSCSI Login successful on CID: %hu from %s to %s:%hu,%hu\n"; descriptor___4.lineno = 779U; descriptor___4.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___4, "iSCSI Login successful on CID: %hu from %s to %s:%hu,%hu\n", (int )conn->cid, (unsigned char *)(& conn->login_ip), (unsigned char *)(& conn->local_ip), (int )conn->local_port, (int )tpg->tpgt); } else { } spin_lock_bh(& sess->conn_lock); list_add_tail(& conn->conn_list, & sess->sess_conn_list); atomic_inc(& sess->nconn); descriptor___5.modname = "iscsi_target_mod"; descriptor___5.function = "iscsi_post_login_handler"; descriptor___5.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___5.format = "Incremented iSCSI Connection count to %hu from node: %s\n"; descriptor___5.lineno = 786U; descriptor___5.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___5.flags & 1L, 0L); if (tmp___7 != 0L) { tmp___6 = atomic_read((atomic_t const *)(& sess->nconn)); __dynamic_pr_debug(& descriptor___5, "Incremented iSCSI Connection count to %hu from node: %s\n", tmp___6, (char *)(& (sess->sess_ops)->InitiatorName)); } else { } spin_unlock_bh(& sess->conn_lock); tmp___8 = tpg->sid; tpg->sid = tpg->sid + 1U; sess->sid = tmp___8; if (sess->sid == 0U) { tmp___9 = tpg->sid; tpg->sid = tpg->sid + 1U; sess->sid = tmp___9; } else { } descriptor___6.modname = "iscsi_target_mod"; descriptor___6.function = "iscsi_post_login_handler"; descriptor___6.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___6.format = "Established iSCSI session from node: %s\n"; descriptor___6.lineno = 793U; descriptor___6.flags = 0U; tmp___10 = ldv__builtin_expect((long )descriptor___6.flags & 1L, 0L); if (tmp___10 != 0L) { __dynamic_pr_debug(& descriptor___6, "Established iSCSI session from node: %s\n", (char *)(& (sess->sess_ops)->InitiatorName)); } else { } tpg->nsessions = tpg->nsessions + 1U; if ((unsigned long )tpg->tpg_tiqn != (unsigned long )((struct iscsi_tiqn *)0)) { (tpg->tpg_tiqn)->tiqn_nsessions = (tpg->tpg_tiqn)->tiqn_nsessions + 1U; } else { } descriptor___7.modname = "iscsi_target_mod"; descriptor___7.function = "iscsi_post_login_handler"; descriptor___7.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___7.format = "Incremented number of active iSCSI sessions to %u on iSCSI Target Portal Group: %hu\n"; descriptor___7.lineno = 800U; descriptor___7.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___7.flags & 1L, 0L); if (tmp___11 != 0L) { __dynamic_pr_debug(& descriptor___7, "Incremented number of active iSCSI sessions to %u on iSCSI Target Portal Group: %hu\n", tpg->nsessions, (int )tpg->tpgt); } else { } spin_unlock_bh(& se_tpg->session_lock); rc = iscsit_start_kthreads(conn); if (rc != 0) { return (rc); } else { } iscsi_post_login_start_timers(conn); iscsit_thread_get_cpumask(conn); conn->conn_rx_reset_cpumask = 1U; conn->conn_tx_reset_cpumask = 1U; iscsit_dec_conn_usage_count(conn); return (0); } } static void iscsi_handle_login_thread_timeout(unsigned long data ) { struct iscsi_np *np ; { np = (struct iscsi_np *)data; spin_lock_bh(& np->np_thread_lock); printk("\viSCSI Login timeout on Network Portal %s:%hu\n", (unsigned char *)(& np->np_ip), (int )np->np_port); if (((unsigned int )np->np_login_timer_flags & 2U) != 0U) { spin_unlock_bh(& np->np_thread_lock); return; } else { } if ((unsigned long )np->np_thread != (unsigned long )((struct task_struct *)0)) { send_sig(2, np->np_thread, 1); } else { } np->np_login_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )np->np_login_timer_flags & 4294967294U); spin_unlock_bh(& np->np_thread_lock); return; } } static void iscsi_start_login_thread_timer(struct iscsi_np *np ) { u64 tmp ; struct _ddebug descriptor ; long tmp___0 ; { spin_lock_bh(& np->np_thread_lock); reg_timer_8(& np->np_login_timer); tmp = get_jiffies_64(); np->np_login_timer.expires = (unsigned long )(tmp + 3750ULL); np->np_login_timer.data = (unsigned long )np; np->np_login_timer.function = & iscsi_handle_login_thread_timeout; np->np_login_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )np->np_login_timer_flags & 4294967293U); np->np_login_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )np->np_login_timer_flags | 1U); add_timer(& np->np_login_timer); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_start_login_thread_timer"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor.format = "Added timeout timer to iSCSI login request for %u seconds.\n"; descriptor.lineno = 857U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Added timeout timer to iSCSI login request for %u seconds.\n", 15); } else { } spin_unlock_bh(& np->np_thread_lock); return; } } static void iscsi_stop_login_thread_timer(struct iscsi_np *np ) { { spin_lock_bh(& np->np_thread_lock); if (((unsigned int )np->np_login_timer_flags & 1U) == 0U) { spin_unlock_bh(& np->np_thread_lock); return; } else { } np->np_login_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )np->np_login_timer_flags | 2U); spin_unlock_bh(& np->np_thread_lock); ldv_del_timer_sync_265(& np->np_login_timer); spin_lock_bh(& np->np_thread_lock); np->np_login_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )np->np_login_timer_flags & 4294967294U); spin_unlock_bh(& np->np_thread_lock); return; } } int iscsit_setup_np(struct iscsi_np *np , struct __kernel_sockaddr_storage *sockaddr ) { struct socket *sock ; int backlog ; int ret ; int opt ; int len ; { sock = (struct socket *)0; backlog = 256; opt = 0; switch (np->np_network_transport) { case 0: np->np_ip_proto = 6; np->np_sock_type = 1; goto ldv_59150; case 1: np->np_ip_proto = 132; np->np_sock_type = 1; goto ldv_59150; case 2: np->np_ip_proto = 132; np->np_sock_type = 5; goto ldv_59150; default: printk("\vUnsupported network_transport: %d\n", np->np_network_transport); return (-22); } ldv_59150: np->np_ip_proto = 6; np->np_sock_type = 1; ret = sock_create((int )sockaddr->ss_family, np->np_sock_type, np->np_ip_proto, & sock); if (ret < 0) { printk("\vsock_create() failed.\n"); return (ret); } else { } np->np_socket = sock; memcpy((void *)(& np->np_sockaddr), (void const *)sockaddr, 128UL); if ((unsigned int )sockaddr->ss_family == 10U) { len = 28; } else { len = 16; } opt = 1; if (np->np_network_transport == 0) { ret = kernel_setsockopt(sock, 6, 1, (char *)(& opt), 4U); if (ret < 0) { printk("\vkernel_setsockopt() for TCP_NODELAY failed: %d\n", ret); goto fail; } else { } } else { } ret = kernel_setsockopt(sock, 1, 2, (char *)(& opt), 4U); if (ret < 0) { printk("\vkernel_setsockopt() for SO_REUSEADDR failed\n"); goto fail; } else { } ret = kernel_setsockopt(sock, 0, 15, (char *)(& opt), 4U); if (ret < 0) { printk("\vkernel_setsockopt() for IP_FREEBIND failed\n"); goto fail; } else { } ret = kernel_bind(sock, (struct sockaddr *)(& np->np_sockaddr), len); if (ret < 0) { printk("\vkernel_bind() failed: %d\n", ret); goto fail; } else { } ret = kernel_listen(sock, backlog); if (ret != 0) { printk("\vkernel_listen() failed: %d\n", ret); goto fail; } else { } return (0); fail: np->np_socket = (struct socket *)0; sock_release(sock); return (ret); } } int iscsi_target_setup_login_socket(struct iscsi_np *np , struct __kernel_sockaddr_storage *sockaddr ) { struct iscsit_transport *t ; int rc ; { t = iscsit_get_transport(np->np_network_transport); if ((unsigned long )t == (unsigned long )((struct iscsit_transport *)0)) { return (-22); } else { } rc = (*(t->iscsit_setup_np))(np, sockaddr); if (rc < 0) { iscsit_put_transport(t); return (rc); } else { } np->np_transport = t; np->enabled = 1; return (0); } } int iscsit_accept_np(struct iscsi_np *np , struct iscsi_conn *conn ) { struct socket *new_sock ; struct socket *sock ; struct sockaddr_in sock_in ; struct sockaddr_in6 sock_in6 ; int rc ; int err ; bool tmp ; int tmp___0 ; __u16 tmp___1 ; bool tmp___2 ; int tmp___3 ; __u16 tmp___4 ; __u16 tmp___5 ; __u16 tmp___6 ; { sock = np->np_socket; rc = kernel_accept(sock, & new_sock, 0); if (rc < 0) { return (rc); } else { } conn->sock = new_sock; conn->login_family = (int )np->np_sockaddr.ss_family; if ((unsigned int )np->np_sockaddr.ss_family == 10U) { memset((void *)(& sock_in6), 0, 28UL); rc = (*(((conn->sock)->ops)->getname))(conn->sock, (struct sockaddr *)(& sock_in6), & err, 1); if (rc == 0) { tmp = ipv6_addr_v4mapped((struct in6_addr const *)(& sock_in6.sin6_addr)); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { snprintf((char *)(& conn->login_ip), 48UL, "[%pI6c]", & sock_in6.sin6_addr.in6_u); } else { snprintf((char *)(& conn->login_ip), 48UL, "%pI4", (__be32 *)(& sock_in6.sin6_addr.in6_u.u6_addr32) + 3UL); } tmp___1 = __fswab16((int )sock_in6.sin6_port); conn->login_port = tmp___1; } else { } rc = (*(((conn->sock)->ops)->getname))(conn->sock, (struct sockaddr *)(& sock_in6), & err, 0); if (rc == 0) { tmp___2 = ipv6_addr_v4mapped((struct in6_addr const *)(& sock_in6.sin6_addr)); if (tmp___2) { tmp___3 = 0; } else { tmp___3 = 1; } if (tmp___3) { snprintf((char *)(& conn->local_ip), 48UL, "[%pI6c]", & sock_in6.sin6_addr.in6_u); } else { snprintf((char *)(& conn->local_ip), 48UL, "%pI4", (__be32 *)(& sock_in6.sin6_addr.in6_u.u6_addr32) + 3UL); } tmp___4 = __fswab16((int )sock_in6.sin6_port); conn->local_port = tmp___4; } else { } } else { memset((void *)(& sock_in), 0, 16UL); rc = (*(((conn->sock)->ops)->getname))(conn->sock, (struct sockaddr *)(& sock_in), & err, 1); if (rc == 0) { sprintf((char *)(& conn->login_ip), "%pI4", & sock_in.sin_addr.s_addr); tmp___5 = __fswab16((int )sock_in.sin_port); conn->login_port = tmp___5; } else { } rc = (*(((conn->sock)->ops)->getname))(conn->sock, (struct sockaddr *)(& sock_in), & err, 0); if (rc == 0) { sprintf((char *)(& conn->local_ip), "%pI4", & sock_in.sin_addr.s_addr); tmp___6 = __fswab16((int )sock_in.sin_port); conn->local_port = tmp___6; } else { } } return (0); } } int iscsit_get_login_rx(struct iscsi_conn *conn , struct iscsi_login *login ) { struct iscsi_login_req *login_req ; u32 padding ; u32 payload_length ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u16 tmp___3 ; __u16 tmp___4 ; int tmp___5 ; int tmp___6 ; { padding = 0U; tmp = iscsi_login_rx_data(conn, (char *)(& login->req), 48); if (tmp < 0) { return (-1); } else { } login_req = (struct iscsi_login_req *)(& login->req); payload_length = (u32 )((((int )login_req->dlength[0] << 16) | ((int )login_req->dlength[1] << 8)) | (int )login_req->dlength[2]); padding = - payload_length & 3U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_get_login_rx"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor.format = "Got Login Command, Flags 0x%02x, ITT: 0x%08x, CmdSN: 0x%08x, ExpStatSN: 0x%08x, CID: %hu, Length: %u\n"; descriptor.lineno = 1076U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Got Login Command, Flags 0x%02x, ITT: 0x%08x, CmdSN: 0x%08x, ExpStatSN: 0x%08x, CID: %hu, Length: %u\n", (int )login_req->flags, login_req->itt, login_req->cmdsn, login_req->exp_statsn, (int )login_req->cid, payload_length); } else { } if ((unsigned int )login->first_request != 0U) { login_req = (struct iscsi_login_req *)(& login->req); login->leading_connection = (unsigned int )login_req->tsih == 0U; login->current_stage = (u8 )(((int )login_req->flags & 12) >> 2); login->version_min = login_req->min_version; login->version_max = login_req->max_version; memcpy((void *)(& login->isid), (void const *)(& login_req->isid), 6UL); tmp___1 = __fswab32(login_req->cmdsn); login->cmd_sn = tmp___1; login->init_task_tag = login_req->itt; tmp___2 = __fswab32(login_req->exp_statsn); login->initial_exp_statsn = tmp___2; tmp___3 = __fswab16((int )login_req->cid); login->cid = tmp___3; tmp___4 = __fswab16((int )login_req->tsih); login->tsih = tmp___4; } else { } tmp___5 = iscsi_target_check_login_request(conn, login); if (tmp___5 < 0) { return (-1); } else { } memset((void *)login->req_buf, 0, 8192UL); tmp___6 = iscsi_login_rx_data(conn, login->req_buf, (int )(payload_length + padding)); if (tmp___6 < 0) { return (-1); } else { } return (0); } } int iscsit_put_login_tx(struct iscsi_conn *conn , struct iscsi_login *login , u32 length ) { int tmp ; { tmp = iscsi_login_tx_data(conn, (char *)(& login->rsp), login->rsp_buf, (int )length); if (tmp < 0) { return (-1); } else { } return (0); } } static int iscsit_conn_set_transport(struct iscsi_conn *conn , struct iscsit_transport *t ) { int rc ; bool tmp ; { if ((unsigned long )t->owner == (unsigned long )((struct module *)0)) { conn->conn_transport = t; return (0); } else { } tmp = try_module_get(t->owner); rc = (int )tmp; if (rc == 0) { printk("\vtry_module_get() failed for %s\n", (char *)(& t->name)); return (-22); } else { } conn->conn_transport = t; return (0); } } void iscsi_target_login_sess_out(struct iscsi_conn *conn , struct iscsi_np *np , bool zero_tsih , bool new_sess ) { struct se_portal_group *se_tpg ; bool tmp ; int tmp___0 ; bool tmp___1 ; int tmp___2 ; { if (! new_sess) { goto old_sess_out; } else { } printk("\viSCSI Login negotiation failed.\n"); iscsit_collect_login_stats(conn, 2, 0); if (! zero_tsih || (unsigned long )conn->sess == (unsigned long )((struct iscsi_session *)0)) { goto old_sess_out; } else { } if ((unsigned long )(conn->sess)->se_sess != (unsigned long )((struct se_session *)0)) { transport_free_session((conn->sess)->se_sess); } else { } if ((conn->sess)->session_index != 0) { spin_lock_bh(& sess_idr_lock); idr_remove(& sess_idr, (conn->sess)->session_index); spin_unlock_bh(& sess_idr_lock); } else { } kfree((void const *)(conn->sess)->sess_ops); kfree((void const *)conn->sess); conn->sess = (struct iscsi_session *)0; old_sess_out: iscsi_stop_login_thread_timer(np); if (! zero_tsih && (unsigned long )conn->sess != (unsigned long )((struct iscsi_session *)0)) { spin_lock_bh(& (conn->sess)->conn_lock); if ((conn->sess)->session_state == 4U) { se_tpg = & (conn->tpg)->tpg_se_tpg; atomic_set(& (conn->sess)->session_continuation, 0); spin_unlock_bh(& (conn->sess)->conn_lock); spin_lock_bh(& se_tpg->session_lock); iscsit_start_time2retain_handler(conn->sess); spin_unlock_bh(& se_tpg->session_lock); } else { spin_unlock_bh(& (conn->sess)->conn_lock); } iscsit_dec_session_usage_count(conn->sess); } else { } tmp = IS_ERR((void const *)conn->conn_rx_hash.tfm); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { crypto_free_hash(conn->conn_rx_hash.tfm); } else { } tmp___1 = IS_ERR((void const *)conn->conn_tx_hash.tfm); if (tmp___1) { tmp___2 = 0; } else { tmp___2 = 1; } if (tmp___2) { crypto_free_hash(conn->conn_tx_hash.tfm); } else { } free_cpumask_var(conn->conn_cpumask); kfree((void const *)conn->conn_ops); if ((unsigned long )conn->param_list != (unsigned long )((struct iscsi_param_list *)0)) { iscsi_release_param_list(conn->param_list); conn->param_list = (struct iscsi_param_list *)0; } else { } iscsi_target_nego_release(conn); if ((unsigned long )conn->sock != (unsigned long )((struct socket *)0)) { sock_release(conn->sock); conn->sock = (struct socket *)0; } else { } if ((unsigned long )(conn->conn_transport)->iscsit_wait_conn != (unsigned long )((void (*)(struct iscsi_conn * ))0)) { (*((conn->conn_transport)->iscsit_wait_conn))(conn); } else { } if ((unsigned long )(conn->conn_transport)->iscsit_free_conn != (unsigned long )((void (*)(struct iscsi_conn * ))0)) { (*((conn->conn_transport)->iscsit_free_conn))(conn); } else { } iscsit_put_transport(conn->conn_transport); kfree((void const *)conn); return; } } static int __iscsi_target_login_thread(struct iscsi_np *np ) { u8 *buffer ; u8 zero_tsih ; int ret ; int rc ; struct iscsi_conn *conn ; struct iscsi_login *login ; struct iscsi_portal_group *tpg ; struct iscsi_login_req *pdu ; struct iscsi_tpg_np *tpg_np ; bool new_sess ; struct task_struct *tmp ; void *tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; struct _ddebug descriptor___0 ; long tmp___3 ; struct _ddebug descriptor___1 ; long tmp___4 ; struct _ddebug descriptor___2 ; long tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; struct task_struct *tmp___11 ; int tmp___12 ; { zero_tsih = 0U; ret = 0; conn = (struct iscsi_conn *)0; tpg = (struct iscsi_portal_group *)0; new_sess = 0; tmp = get_current(); flush_signals(tmp); spin_lock_bh(& np->np_thread_lock); if ((unsigned int )np->np_thread_state == 3U) { np->np_thread_state = 1; complete(& np->np_restart_comp); } else if ((unsigned int )np->np_thread_state == 4U) { spin_unlock_bh(& np->np_thread_lock); goto exit; } else { np->np_thread_state = 1; } spin_unlock_bh(& np->np_thread_lock); tmp___0 = kzalloc(2496UL, 208U); conn = (struct iscsi_conn *)tmp___0; if ((unsigned long )conn == (unsigned long )((struct iscsi_conn *)0)) { printk("\vCould not allocate memory for new connection\n"); return (1); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "__iscsi_target_login_thread"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor.format = "Moving to TARG_CONN_STATE_FREE.\n"; descriptor.lineno = 1241U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Moving to TARG_CONN_STATE_FREE.\n"); } else { } conn->conn_state = 1U; tmp___2 = iscsit_conn_set_transport(conn, np->np_transport); if (tmp___2 < 0) { kfree((void const *)conn); return (1); } else { } rc = (*((np->np_transport)->iscsit_accept_np))(np, conn); if (rc == -38) { complete(& np->np_restart_comp); iscsit_put_transport(conn->conn_transport); kfree((void const *)conn); conn = (struct iscsi_conn *)0; goto exit; } else if (rc < 0) { spin_lock_bh(& np->np_thread_lock); if ((unsigned int )np->np_thread_state == 3U) { spin_unlock_bh(& np->np_thread_lock); complete(& np->np_restart_comp); iscsit_put_transport(conn->conn_transport); kfree((void const *)conn); conn = (struct iscsi_conn *)0; return (1); } else { } spin_unlock_bh(& np->np_thread_lock); iscsit_put_transport(conn->conn_transport); kfree((void const *)conn); conn = (struct iscsi_conn *)0; goto out; } else { } login = iscsi_login_init_conn(conn); if ((unsigned long )login == (unsigned long )((struct iscsi_login *)0)) { goto new_sess_out; } else { } iscsi_start_login_thread_timer(np); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "__iscsi_target_login_thread"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___0.format = "Moving to TARG_CONN_STATE_XPT_UP.\n"; descriptor___0.lineno = 1283U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___0, "Moving to TARG_CONN_STATE_XPT_UP.\n"); } else { } conn->conn_state = 3U; rc = (*((np->np_transport)->iscsit_get_login_rx))(conn, login); if (rc == 1) { return (1); } else if (rc < 0) { goto new_sess_out; } else { } buffer = (u8 *)(& login->req); pdu = (struct iscsi_login_req *)buffer; conn->login_itt = pdu->itt; spin_lock_bh(& np->np_thread_lock); if ((unsigned int )np->np_thread_state != 1U) { spin_unlock_bh(& np->np_thread_lock); printk("\viSCSI Network Portal on %s:%hu currently not active.\n", (unsigned char *)(& np->np_ip), (int )np->np_port); iscsit_tx_login_rsp(conn, 3, 1); goto new_sess_out; } else { } spin_unlock_bh(& np->np_thread_lock); conn->network_transport = (u8 )np->np_network_transport; descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "__iscsi_target_login_thread"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___1.format = "Received iSCSI login request from %s on %s Network Portal %s:%hu\n"; descriptor___1.lineno = 1317U; descriptor___1.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___1, "Received iSCSI login request from %s on %s Network Portal %s:%hu\n", (unsigned char *)(& conn->login_ip), (char *)(& (np->np_transport)->name), (unsigned char *)(& conn->local_ip), (int )conn->local_port); } else { } descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "__iscsi_target_login_thread"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_login.c"; descriptor___2.format = "Moving to TARG_CONN_STATE_IN_LOGIN.\n"; descriptor___2.lineno = 1319U; descriptor___2.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___2, "Moving to TARG_CONN_STATE_IN_LOGIN.\n"); } else { } conn->conn_state = 4U; tmp___6 = iscsi_login_check_initiator_version(conn, (int )pdu->max_version, (int )pdu->min_version); if (tmp___6 < 0) { goto new_sess_out; } else { } zero_tsih = (unsigned int )pdu->tsih == 0U; if ((unsigned int )zero_tsih != 0U) { tmp___7 = iscsi_login_zero_tsih_s1(conn, buffer); if (tmp___7 < 0) { goto new_sess_out; } else { } } else { tmp___8 = iscsi_login_non_zero_tsih_s1(conn, buffer); if (tmp___8 < 0) { goto new_sess_out; } else { } } rc = iscsi_target_locate_portal(np, conn, login); if (rc < 0) { tpg = conn->tpg; goto new_sess_out; } else { } login->zero_tsih = (unsigned int )zero_tsih != 0U; ((conn->sess)->se_sess)->sup_prot_ops = (*((conn->conn_transport)->iscsit_get_sup_prot_ops))(conn); tpg = conn->tpg; if ((unsigned long )tpg == (unsigned long )((struct iscsi_portal_group *)0)) { printk("\vUnable to locate struct iscsi_conn->tpg\n"); goto new_sess_out; } else { } if ((unsigned int )zero_tsih != 0U) { tmp___9 = iscsi_login_zero_tsih_s2(conn); if (tmp___9 < 0) { goto new_sess_out; } else { } } else { tmp___10 = iscsi_login_non_zero_tsih_s2(conn, buffer); if (tmp___10 < 0) { goto old_sess_out; } else { } } ret = iscsi_target_start_negotiation(login, conn); if (ret < 0) { goto new_sess_out; } else { } if ((unsigned long )conn->sess == (unsigned long )((struct iscsi_session *)0)) { printk("\vstruct iscsi_conn session pointer is NULL!\n"); goto new_sess_out; } else { } iscsi_stop_login_thread_timer(np); tmp___11 = get_current(); tmp___12 = signal_pending(tmp___11); if (tmp___12 != 0) { goto new_sess_out; } else { } if (ret == 1) { tpg_np = conn->tpg_np; ret = iscsi_post_login_handler(np, conn, (int )zero_tsih); if (ret < 0) { goto new_sess_out; } else { } iscsit_deaccess_np(np, tpg, tpg_np); } else { } tpg = (struct iscsi_portal_group *)0; tpg_np = (struct iscsi_tpg_np *)0; return (1); new_sess_out: new_sess = 1; old_sess_out: tpg_np = conn->tpg_np; iscsi_target_login_sess_out(conn, np, (unsigned int )zero_tsih != 0U, (int )new_sess); new_sess = 0; if ((unsigned long )tpg != (unsigned long )((struct iscsi_portal_group *)0)) { iscsit_deaccess_np(np, tpg, tpg_np); tpg = (struct iscsi_portal_group *)0; tpg_np = (struct iscsi_tpg_np *)0; } else { } out: ; return (1); exit: iscsi_stop_login_thread_timer(np); spin_lock_bh(& np->np_thread_lock); np->np_thread_state = 5; spin_unlock_bh(& np->np_thread_lock); return (0); } } int iscsi_target_login_thread(void *arg ) { struct iscsi_np *np ; int ret ; { np = (struct iscsi_np *)arg; allow_signal(2); ldv_59226: ret = __iscsi_target_login_thread(np); if (ret != 1) { goto ldv_59225; } else { } goto ldv_59226; ldv_59225: ; return (0); } } void choose_timer_5(struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; (*(timer->function))(timer->data); LDV_IN_INTERRUPT = 1; ldv_timer_state_5 = 2; return; } } void disable_suitable_timer_5(struct timer_list *timer ) { { if ((unsigned long )timer == (unsigned long )ldv_timer_list_5) { ldv_timer_state_5 = 0; return; } else { } return; } } void activate_pending_timer_5(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_5 == (unsigned long )timer) { if (ldv_timer_state_5 == 2 || pending_flag != 0) { ldv_timer_list_5 = timer; ldv_timer_list_5->data = data; ldv_timer_state_5 = 1; } else { } return; } else { } reg_timer_5(timer); ldv_timer_list_5->data = data; return; } } int reg_timer_5(struct timer_list *timer ) { { ldv_timer_list_5 = timer; ldv_timer_state_5 = 1; return (0); } } __inline static long PTR_ERR(void const *ptr ) { long tmp ; { tmp = ldv_ptr_err(ptr); return (tmp); } } bool ldv_queue_work_on_251(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_252(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_253(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_254(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_255(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_256(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_257(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_258(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_259(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_260(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_261(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_262(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_263(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_auth_id_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_264(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_auth_id_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } int ldv_del_timer_sync_265(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; disable_suitable_timer_8(ldv_func_arg1); return (ldv_func_res); } } __inline static long ldv__builtin_expect(long exp , long c ) ; __inline static void set_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; bts %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr): "memory"); return; } } __inline static void clear_bit(long nr , unsigned long volatile *addr ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; btr %1,%0": "+m" (*((long volatile *)addr)): "Ir" (nr)); return; } } __inline static int test_and_set_bit(long nr , unsigned long volatile *addr ) { char c ; { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; bts %2, %0; setc %1": "+m" (*addr), "=qm" (c): "Ir" (nr): "memory"); return ((int )((signed char )c) != 0); } } __inline static int constant_test_bit(long nr , unsigned long const volatile *addr ) { { return ((int )((unsigned long )*(addr + (unsigned long )(nr >> 6)) >> ((int )nr & 63)) & 1); } } extern char *strstr(char const * , char const * ) ; extern void warn_slowpath_null(char const * , int const ) ; __inline static int atomic_sub_and_test(int i , atomic_t *v ) { char c ; { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; subl %2, %0; sete %1": "+m" (v->counter), "=qm" (c): "er" (i): "memory"); return ((int )((signed char )c) != 0); } } extern void lockdep_init_map(struct lockdep_map * , char const * , struct lock_class_key * , int ) ; int ldv_mutex_trylock_293(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_291(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_294(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_295(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_298(struct mutex *ldv_func_arg1 ) ; __inline static void ldv_stop(void) { { LDV_STOP: ; goto LDV_STOP; } } void ldv_mutex_lock_290(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_292(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_296(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_297(struct mutex *ldv_func_arg1 ) ; extern void _raw_read_lock_bh(rwlock_t * ) ; extern void _raw_write_lock_bh(rwlock_t * ) ; extern void _raw_read_unlock_bh(rwlock_t * ) ; extern void _raw_write_unlock_bh(rwlock_t * ) ; extern void init_timer_key(struct timer_list * , unsigned int , char const * , struct lock_class_key * ) ; int ldv_del_timer_sync_299(struct timer_list *ldv_func_arg1 ) ; extern void delayed_work_timer_fn(unsigned long ) ; extern void __init_work(struct work_struct * , int ) ; extern struct workqueue_struct *system_wq ; bool ldv_queue_work_on_285(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_287(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_286(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_289(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_288(struct workqueue_struct *ldv_func_arg1 ) ; extern bool cancel_delayed_work_sync(struct delayed_work * ) ; bool ldv_cancel_delayed_work_sync_300(struct delayed_work *ldv_func_arg1 ) ; bool ldv_cancel_delayed_work_sync_301(struct delayed_work *ldv_func_arg1 ) ; bool ldv_cancel_delayed_work_sync_302(struct delayed_work *ldv_func_arg1 ) ; __inline static bool queue_delayed_work(struct workqueue_struct *wq , struct delayed_work *dwork , unsigned long delay ) { bool tmp ; { tmp = ldv_queue_delayed_work_on_286(8192, wq, dwork, delay); return (tmp); } } __inline static bool schedule_delayed_work(struct delayed_work *dwork , unsigned long delay ) { bool tmp ; { tmp = queue_delayed_work(system_wq, dwork, delay); return (tmp); } } int ldv_work_1_1 ; struct work_struct *ldv_work_struct_2_2 ; int ldv_work_1_3 ; struct work_struct *ldv_work_struct_2_1 ; struct timer_list *ldv_timer_list_6 ; int ldv_work_2_1 ; struct work_struct *ldv_work_struct_1_3 ; struct work_struct *ldv_work_struct_1_0 ; int ldv_work_2_0 ; int ldv_work_1_2 ; int ldv_work_2_2 ; struct work_struct *ldv_work_struct_2_0 ; struct work_struct *ldv_work_struct_1_1 ; int ldv_work_1_0 ; struct work_struct *ldv_work_struct_2_3 ; struct work_struct *ldv_work_struct_1_2 ; int ldv_work_2_3 ; void activate_work_1(struct work_struct *work , int state ) ; void work_init_1(void) ; void choose_timer_6(struct timer_list *timer ) ; int reg_timer_6(struct timer_list *timer ) ; void invoke_work_1(void) ; void call_and_disable_work_1(struct work_struct *work ) ; void disable_work_1(struct work_struct *work ) ; void disable_suitable_timer_6(struct timer_list *timer ) ; void activate_pending_timer_6(struct timer_list *timer , unsigned long data , int pending_flag ) ; void invoke_work_2(void) ; void work_init_2(void) ; void call_and_disable_all_1(int state ) ; void disable_work_2(struct work_struct *work ) ; void call_and_disable_work_2(struct work_struct *work ) ; extern unsigned char const _ctype[] ; __inline static unsigned char __tolower(unsigned char c ) { { if ((int )_ctype[(int )c] & 1) { c = (unsigned int )c + 32U; } else { } return (c); } } __inline static int kref_sub(struct kref *kref , unsigned int count , void (*release)(struct kref * ) ) { int __ret_warn_on ; long tmp ; int tmp___0 ; { __ret_warn_on = (unsigned long )release == (unsigned long )((void (*)(struct kref * ))0); tmp = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp != 0L) { warn_slowpath_null("include/linux/kref.h", 71); } else { } ldv__builtin_expect(__ret_warn_on != 0, 0L); tmp___0 = atomic_sub_and_test((int )count, & kref->refcount); if (tmp___0 != 0) { (*release)(kref); return (1); } else { } return (0); } } __inline static int kref_put(struct kref *kref , void (*release)(struct kref * ) ) { int tmp ; { tmp = kref_sub(kref, 1U, release); return (tmp); } } extern int transport_alloc_session_tags(struct se_session * , unsigned int , unsigned int ) ; extern struct se_node_acl *core_tpg_check_initiator_node_acl(struct se_portal_group * , unsigned char * ) ; struct iscsi_portal_group *iscsit_get_tpg_from_np(struct iscsi_tiqn *tiqn , struct iscsi_np *np , struct iscsi_tpg_np **tpg_np_out ) ; struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *buf ) ; void iscsit_put_tiqn_for_login(struct iscsi_tiqn *tiqn ) ; int iscsit_access_np(struct iscsi_np *np , struct iscsi_portal_group *tpg ) ; void iscsit_login_kref_put(struct kref *kref ) ; void convert_null_to_semi(char *buf , int len ) { int i ; { i = 0; goto ldv_58901; ldv_58900: ; if ((int )((signed char )*(buf + (unsigned long )i)) == 0) { *(buf + (unsigned long )i) = 59; } else { } i = i + 1; ldv_58901: ; if (i < len) { goto ldv_58900; } else { } return; } } static int strlen_semi(char *buf ) { int i ; { i = 0; goto ldv_58908; ldv_58907: ; if ((int )((signed char )*(buf + (unsigned long )i)) == 59) { return (i); } else { } i = i + 1; ldv_58908: ; if ((int )((signed char )*(buf + (unsigned long )i)) != 0) { goto ldv_58907; } else { } return (-1); } } int extract_param(char const *in_buf , char const *pattern , unsigned int max_length , char *out_buf , unsigned char *type ) { char *ptr ; int len ; { if ((((unsigned long )in_buf == (unsigned long )((char const *)0) || (unsigned long )pattern == (unsigned long )((char const *)0)) || (unsigned long )out_buf == (unsigned long )((char *)0)) || (unsigned long )type == (unsigned long )((unsigned char *)0U)) { return (-1); } else { } ptr = strstr(in_buf, pattern); if ((unsigned long )ptr == (unsigned long )((char *)0)) { return (-1); } else { } ptr = strstr((char const *)ptr, "="); if ((unsigned long )ptr == (unsigned long )((char *)0)) { return (-1); } else { } ptr = ptr + 1UL; if ((int )((signed char )*ptr) == 48 && ((int )((signed char )*(ptr + 1UL)) == 120 || (int )((signed char )*(ptr + 1UL)) == 88)) { ptr = ptr + 2UL; *type = 1U; } else { *type = 0U; } len = strlen_semi(ptr); if (len < 0) { return (-1); } else { } if ((unsigned int )len >= max_length) { printk("\vLength of input: %d exceeds max_length: %d\n", len, max_length); return (-1); } else { } memcpy((void *)out_buf, (void const *)ptr, (size_t )len); *(out_buf + (unsigned long )len) = 0; return (0); } } static u32 iscsi_handle_authentication(struct iscsi_conn *conn , char *in_buf , char *out_buf , int in_length , int *out_length , unsigned char *authtype ) { struct iscsi_session *sess ; struct iscsi_node_auth *auth ; struct iscsi_node_acl *iscsi_nacl ; struct iscsi_portal_group *iscsi_tpg___0 ; struct se_node_acl *se_nacl ; struct se_node_acl const *__mptr ; struct se_portal_group const *__mptr___0 ; struct se_node_acl const *__mptr___1 ; char *tmp ; u32 tmp___0 ; char *tmp___1 ; char *tmp___2 ; char *tmp___3 ; char *tmp___4 ; char *tmp___5 ; { sess = conn->sess; if ((unsigned int )(sess->sess_ops)->SessionType == 0U) { se_nacl = ((conn->sess)->se_sess)->se_node_acl; if ((unsigned long )se_nacl == (unsigned long )((struct se_node_acl *)0)) { printk("\vUnable to locate struct se_node_acl for CHAP auth\n"); return (4294967295U); } else { } __mptr = (struct se_node_acl const *)se_nacl; iscsi_nacl = (struct iscsi_node_acl *)__mptr; if ((unsigned long )iscsi_nacl == (unsigned long )((struct iscsi_node_acl *)0)) { printk("\vUnable to locate struct iscsi_node_acl for CHAP auth\n"); return (4294967295U); } else { } if ((int )se_nacl->dynamic_node_acl) { __mptr___0 = (struct se_portal_group const *)se_nacl->se_tpg; iscsi_tpg___0 = (struct iscsi_portal_group *)__mptr___0 + 0xffffffffffffff58UL; auth = & iscsi_tpg___0->tpg_demo_auth; } else { __mptr___1 = (struct se_node_acl const *)se_nacl; iscsi_nacl = (struct iscsi_node_acl *)__mptr___1; auth = & iscsi_nacl->node_auth; } } else { auth = & iscsit_global->discovery_acl.node_auth; } tmp = strstr("CHAP", (char const *)authtype); if ((unsigned long )tmp != (unsigned long )((char *)0)) { strcpy((char *)(& (conn->sess)->auth_type), "CHAP"); } else { strcpy((char *)(& (conn->sess)->auth_type), "None"); } tmp___5 = strstr("None", (char const *)authtype); if ((unsigned long )tmp___5 != (unsigned long )((char *)0)) { return (1U); } else { tmp___4 = strstr("CHAP", (char const *)authtype); if ((unsigned long )tmp___4 != (unsigned long )((char *)0)) { tmp___0 = chap_main_loop(conn, auth, in_buf, out_buf, & in_length, out_length); return (tmp___0); } else { tmp___3 = strstr("SPKM1", (char const *)authtype); if ((unsigned long )tmp___3 != (unsigned long )((char *)0)) { return (2U); } else { tmp___2 = strstr("SPKM2", (char const *)authtype); if ((unsigned long )tmp___2 != (unsigned long )((char *)0)) { return (2U); } else { tmp___1 = strstr("KRB5", (char const *)authtype); if ((unsigned long )tmp___1 != (unsigned long )((char *)0)) { return (2U); } else { return (2U); } } } } } } } static void iscsi_remove_failed_auth_entry(struct iscsi_conn *conn ) { { kfree((void const *)conn->auth_protocol); return; } } int iscsi_target_check_login_request(struct iscsi_conn *conn , struct iscsi_login *login ) { int req_csg ; int req_nsg ; u32 payload_length ; struct iscsi_login_req *login_req ; int tmp ; { login_req = (struct iscsi_login_req *)(& login->req); payload_length = (u32 )((((int )login_req->dlength[0] << 16) | ((int )login_req->dlength[1] << 8)) | (int )login_req->dlength[2]); switch ((int )login_req->opcode & 63) { case 3: ; goto ldv_58950; default: printk("\vReceived unknown opcode 0x%02x.\n", (int )login_req->opcode & 63); iscsit_tx_login_rsp(conn, 2, 0); return (-1); } ldv_58950: ; if (((int )login_req->flags & 64) != 0 && (int )((signed char )login_req->flags) < 0) { printk("\vLogin request has both ISCSI_FLAG_LOGIN_CONTINUE and ISCSI_FLAG_LOGIN_TRANSIT set, protocol error.\n"); iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } req_csg = ((int )login_req->flags & 12) >> 2; req_nsg = (int )login_req->flags & 3; if ((int )login->current_stage != req_csg) { printk("\vInitiator unexpectedly changed login stage from %d to %d, login failed.\n", (int )login->current_stage, req_csg); iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } if ((req_nsg == 2 || req_csg > 1) || ((int )((signed char )login_req->flags) < 0 && req_nsg <= req_csg)) { printk("\vIllegal login_req->flags Combination, CSG: %d, NSG: %d, ISCSI_FLAG_LOGIN_TRANSIT: %d.\n", req_csg, req_nsg, (int )login_req->flags & 128); iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } if ((int )login_req->max_version != (int )login->version_max || (int )login_req->min_version != (int )login->version_min) { printk("\vLogin request changed Version Max/Nin unexpectedly to 0x%02x/0x%02x, protocol error\n", (int )login_req->max_version, (int )login_req->min_version); iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } tmp = memcmp((void const *)(& login_req->isid), (void const *)(& login->isid), 6UL); if (tmp != 0) { printk("\vLogin request changed ISID unexpectedly, protocol error.\n"); iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } if (login_req->itt != login->init_task_tag) { printk("\vLogin request changed ITT unexpectedly to 0x%08x, protocol error.\n", login_req->itt); iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } if (payload_length > 8192U) { printk("\vLogin request payload exceeds default MaxRecvDataSegmentLength: %u, protocol error.\n", 8192); return (-1); } else { } return (0); } } static int iscsi_target_check_first_request(struct iscsi_conn *conn , struct iscsi_login *login ) { struct iscsi_param *param ; struct se_node_acl *se_nacl ; struct list_head const *__mptr ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; struct list_head const *__mptr___0 ; { param = (struct iscsi_param *)0; login->first_request = 0U; __mptr = (struct list_head const *)(conn->param_list)->param_list.next; param = (struct iscsi_param *)__mptr + 0xffffffffffffffe0UL; goto ldv_58964; ldv_58963: tmp___0 = strncmp((char const *)param->name, "SessionType", 11UL); if (tmp___0 == 0) { if ((param->state & 1U) == 0U) { printk("\vSessionType key not received in first login request.\n"); iscsit_tx_login_rsp(conn, 2, 7); return (-1); } else { } tmp = strncmp((char const *)param->value, "Discovery", 9UL); if (tmp == 0) { return (0); } else { } } else { } tmp___2 = strncmp((char const *)param->name, "InitiatorName", 13UL); if (tmp___2 == 0) { if ((param->state & 1U) == 0U) { if ((unsigned int )login->leading_connection == 0U) { goto ldv_58962; } else { } printk("\vInitiatorName key not received in first login request.\n"); iscsit_tx_login_rsp(conn, 2, 7); return (-1); } else { } if ((unsigned int )login->leading_connection == 0U) { se_nacl = ((conn->sess)->se_sess)->se_node_acl; if ((unsigned long )se_nacl == (unsigned long )((struct se_node_acl *)0)) { printk("\vUnable to locate struct se_node_acl\n"); iscsit_tx_login_rsp(conn, 2, 3); return (-1); } else { } tmp___1 = strcmp((char const *)param->value, (char const *)(& se_nacl->initiatorname)); if (tmp___1 != 0) { printk("\vIncorrect InitiatorName: %s for this iSCSI Initiator Node.\n", param->value); iscsit_tx_login_rsp(conn, 2, 3); return (-1); } else { } } else { } } else { } ldv_58962: __mptr___0 = (struct list_head const *)param->p_list.next; param = (struct iscsi_param *)__mptr___0 + 0xffffffffffffffe0UL; ldv_58964: ; if ((unsigned long )(& param->p_list) != (unsigned long )(& (conn->param_list)->param_list)) { goto ldv_58963; } else { } return (0); } } static int iscsi_target_do_tx_login_io(struct iscsi_conn *conn , struct iscsi_login *login ) { u32 padding ; struct iscsi_session *sess ; struct iscsi_login_rsp *login_rsp ; __u16 tmp ; u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; struct _ddebug descriptor ; __u32 tmp___4 ; __u32 tmp___5 ; __u32 tmp___6 ; long tmp___7 ; int tmp___8 ; __u32 tmp___9 ; __u32 tmp___10 ; { padding = 0U; sess = conn->sess; login_rsp = (struct iscsi_login_rsp *)(& login->rsp); login_rsp->opcode = 35U; login_rsp->dlength[0] = (uint8_t )(login->rsp_length >> 16); login_rsp->dlength[1] = (uint8_t )(login->rsp_length >> 8); login_rsp->dlength[2] = (uint8_t )login->rsp_length; memcpy((void *)(& login_rsp->isid), (void const *)(& login->isid), 6UL); tmp = __fswab16((int )login->tsih); login_rsp->tsih = tmp; login_rsp->itt = login->init_task_tag; tmp___0 = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; tmp___1 = __fswab32(tmp___0); login_rsp->statsn = tmp___1; tmp___2 = __fswab32((conn->sess)->exp_cmd_sn); login_rsp->exp_cmdsn = tmp___2; tmp___3 = __fswab32((conn->sess)->max_cmd_sn); login_rsp->max_cmdsn = tmp___3; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_do_tx_login_io"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Sending Login Response, Flags: 0x%02x, ITT: 0x%08x, ExpCmdSN; 0x%08x, MaxCmdSN: 0x%08x, StatSN: 0x%08x, Length: %u\n"; descriptor.lineno = 361U; descriptor.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___7 != 0L) { tmp___4 = __fswab32(login_rsp->statsn); tmp___5 = __fswab32(login_rsp->max_cmdsn); tmp___6 = __fswab32(login_rsp->exp_cmdsn); __dynamic_pr_debug(& descriptor, "Sending Login Response, Flags: 0x%02x, ITT: 0x%08x, ExpCmdSN; 0x%08x, MaxCmdSN: 0x%08x, StatSN: 0x%08x, Length: %u\n", (int )login_rsp->flags, login_rsp->itt, tmp___6, tmp___5, tmp___4, login->rsp_length); } else { } padding = - login->rsp_length & 3U; tmp___8 = (*((conn->conn_transport)->iscsit_put_login_tx))(conn, login, login->rsp_length + padding); if (tmp___8 < 0) { return (-1); } else { } login->rsp_length = 0U; ldv_mutex_lock_297(& sess->cmdsn_mutex); tmp___9 = __fswab32(sess->exp_cmd_sn); login_rsp->exp_cmdsn = tmp___9; tmp___10 = __fswab32(sess->max_cmd_sn); login_rsp->max_cmdsn = tmp___10; ldv_mutex_unlock_298(& sess->cmdsn_mutex); return (0); } } static void iscsi_target_sk_data_ready(struct sock *sk ) { struct iscsi_conn *conn ; bool rc ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; int tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; int tmp___3 ; struct _ddebug descriptor___2 ; long tmp___4 ; int tmp___5 ; struct _ddebug descriptor___3 ; long tmp___6 ; { conn = (struct iscsi_conn *)sk->sk_user_data; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_sk_data_ready"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Entering iscsi_target_sk_data_ready: conn: %p\n"; descriptor.lineno = 383U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Entering iscsi_target_sk_data_ready: conn: %p\n", conn); } else { } _raw_write_lock_bh(& sk->sk_callback_lock); if ((unsigned long )sk->sk_user_data == (unsigned long )((void *)0)) { _raw_write_unlock_bh(& sk->sk_callback_lock); return; } else { } tmp___1 = constant_test_bit(4L, (unsigned long const volatile *)(& conn->login_flags)); if (tmp___1 == 0) { _raw_write_unlock_bh(& sk->sk_callback_lock); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_target_sk_data_ready"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___0.format = "Got LOGIN_FLAGS_READY=0, conn: %p >>>>\n"; descriptor___0.lineno = 392U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Got LOGIN_FLAGS_READY=0, conn: %p >>>>\n", conn); } else { } return; } else { } tmp___3 = constant_test_bit(2L, (unsigned long const volatile *)(& conn->login_flags)); if (tmp___3 != 0) { _raw_write_unlock_bh(& sk->sk_callback_lock); descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_target_sk_data_ready"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___1.format = "Got LOGIN_FLAGS_CLOSED=1, conn: %p >>>>\n"; descriptor___1.lineno = 397U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___1, "Got LOGIN_FLAGS_CLOSED=1, conn: %p >>>>\n", conn); } else { } return; } else { } tmp___5 = test_and_set_bit(1L, (unsigned long volatile *)(& conn->login_flags)); if (tmp___5 != 0) { _raw_write_unlock_bh(& sk->sk_callback_lock); descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsi_target_sk_data_ready"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___2.format = "Got LOGIN_FLAGS_READ_ACTIVE=1, conn: %p >>>>\n"; descriptor___2.lineno = 402U; descriptor___2.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___2, "Got LOGIN_FLAGS_READ_ACTIVE=1, conn: %p >>>>\n", conn); } else { } return; } else { } rc = schedule_delayed_work(& conn->login_work, 0UL); if (! rc) { descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsi_target_sk_data_ready"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___3.format = "iscsi_target_sk_data_ready, schedule_delayed_work got false\n"; descriptor___3.lineno = 409U; descriptor___3.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___3, "iscsi_target_sk_data_ready, schedule_delayed_work got false\n"); } else { } } else { } _raw_write_unlock_bh(& sk->sk_callback_lock); return; } } static void iscsi_target_sk_state_change(struct sock *sk ) ; static void iscsi_target_set_sock_callbacks(struct iscsi_conn *conn ) { struct sock *sk ; struct _ddebug descriptor ; long tmp ; { if ((unsigned long )conn->sock == (unsigned long )((struct socket *)0)) { return; } else { } sk = (conn->sock)->sk; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_set_sock_callbacks"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Entering iscsi_target_set_sock_callbacks: conn: %p\n"; descriptor.lineno = 424U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Entering iscsi_target_set_sock_callbacks: conn: %p\n", conn); } else { } _raw_write_lock_bh(& sk->sk_callback_lock); sk->sk_user_data = (void *)conn; conn->orig_data_ready = sk->sk_data_ready; conn->orig_state_change = sk->sk_state_change; sk->sk_data_ready = & iscsi_target_sk_data_ready; sk->sk_state_change = & iscsi_target_sk_state_change; _raw_write_unlock_bh(& sk->sk_callback_lock); sk->sk_sndtimeo = 3750L; sk->sk_rcvtimeo = 3750L; return; } } static void iscsi_target_restore_sock_callbacks(struct iscsi_conn *conn ) { struct sock *sk ; struct _ddebug descriptor ; long tmp ; { if ((unsigned long )conn->sock == (unsigned long )((struct socket *)0)) { return; } else { } sk = (conn->sock)->sk; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_restore_sock_callbacks"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Entering iscsi_target_restore_sock_callbacks: conn: %p\n"; descriptor.lineno = 446U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Entering iscsi_target_restore_sock_callbacks: conn: %p\n", conn); } else { } _raw_write_lock_bh(& sk->sk_callback_lock); if ((unsigned long )sk->sk_user_data == (unsigned long )((void *)0)) { _raw_write_unlock_bh(& sk->sk_callback_lock); return; } else { } sk->sk_user_data = (void *)0; sk->sk_data_ready = conn->orig_data_ready; sk->sk_state_change = conn->orig_state_change; _raw_write_unlock_bh(& sk->sk_callback_lock); sk->sk_sndtimeo = 9223372036854775807L; sk->sk_rcvtimeo = 9223372036854775807L; return; } } static int iscsi_target_do_login(struct iscsi_conn *conn , struct iscsi_login *login ) ; static bool iscsi_target_sk_state_check(struct sock *sk ) { struct _ddebug descriptor ; long tmp ; { if ((unsigned int )((unsigned char )sk->__sk_common.skc_state) == 8U || (unsigned int )((unsigned char )sk->__sk_common.skc_state) == 7U) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_sk_state_check"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "iscsi_target_sk_state_check: TCP_CLOSE_WAIT|TCP_CLOSE,returning FALSE\n"; descriptor.lineno = 468U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iscsi_target_sk_state_check: TCP_CLOSE_WAIT|TCP_CLOSE,returning FALSE\n"); } else { } return (0); } else { } return (1); } } static void iscsi_target_login_drop(struct iscsi_conn *conn , struct iscsi_login *login ) { struct iscsi_np *np ; bool zero_tsih ; { np = login->np; zero_tsih = login->zero_tsih; iscsi_remove_failed_auth_entry(conn); iscsi_target_nego_release(conn); iscsi_target_login_sess_out(conn, np, (int )zero_tsih, 1); return; } } static void iscsi_target_login_timeout(unsigned long data ) { struct iscsi_conn *conn ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { conn = (struct iscsi_conn *)data; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_login_timeout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Entering iscsi_target_login_timeout >>>>>>>>>>>>>>>>>>>\n"; descriptor.lineno = 488U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Entering iscsi_target_login_timeout >>>>>>>>>>>>>>>>>>>\n"); } else { } if ((unsigned long )conn->login_kworker != (unsigned long )((struct task_struct *)0)) { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_target_login_timeout"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___0.format = "Sending SIGINT to conn->login_kworker %s/%d\n"; descriptor___0.lineno = 492U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Sending SIGINT to conn->login_kworker %s/%d\n", (char *)(& (conn->login_kworker)->comm), (conn->login_kworker)->pid); } else { } send_sig(2, conn->login_kworker, 1); } else { } return; } } static void iscsi_target_do_login_rx(struct work_struct *work ) { struct iscsi_conn *conn ; struct work_struct const *__mptr ; struct iscsi_login *login ; struct iscsi_np *np ; struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; struct timer_list login_timer ; int rc ; int zero_tsih ; bool state ; struct _ddebug descriptor ; struct task_struct *tmp ; struct task_struct *tmp___0 ; long tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; struct sock *sk ; struct _ddebug descriptor___1 ; long tmp___3 ; u64 tmp___4 ; struct _ddebug descriptor___2 ; struct task_struct *tmp___5 ; struct task_struct *tmp___6 ; long tmp___7 ; struct task_struct *tmp___8 ; struct _ddebug descriptor___3 ; struct task_struct *tmp___9 ; struct task_struct *tmp___10 ; long tmp___11 ; struct sock *sk___0 ; { __mptr = (struct work_struct const *)work; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffffc30UL; login = conn->login; np = login->np; tpg = conn->tpg; tpg_np = conn->tpg_np; zero_tsih = (int )login->zero_tsih; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_do_login_rx"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "entering iscsi_target_do_login_rx, conn: %p, %s:%d\n"; descriptor.lineno = 510U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { tmp = get_current(); tmp___0 = get_current(); __dynamic_pr_debug(& descriptor, "entering iscsi_target_do_login_rx, conn: %p, %s:%d\n", conn, (char *)(& tmp___0->comm), tmp->pid); } else { } spin_lock(& tpg->tpg_state_lock); state = (unsigned int )tpg->tpg_state == 1U; spin_unlock(& tpg->tpg_state_lock); if (! state) { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_target_do_login_rx"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___0.format = "iscsi_target_do_login_rx: tpg_state != TPG_STATE_ACTIVE\n"; descriptor___0.lineno = 517U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___0, "iscsi_target_do_login_rx: tpg_state != TPG_STATE_ACTIVE\n"); } else { } iscsi_target_restore_sock_callbacks(conn); iscsi_target_login_drop(conn, login); iscsit_deaccess_np(np, tpg, tpg_np); return; } else { } if ((unsigned long )conn->sock != (unsigned long )((struct socket *)0)) { sk = (conn->sock)->sk; _raw_read_lock_bh(& sk->sk_callback_lock); state = iscsi_target_sk_state_check(sk); _raw_read_unlock_bh(& sk->sk_callback_lock); if (! state) { descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_target_do_login_rx"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___1.format = "iscsi_target_do_login_rx, TCP state CLOSE\n"; descriptor___1.lineno = 532U; descriptor___1.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___1, "iscsi_target_do_login_rx, TCP state CLOSE\n"); } else { } iscsi_target_restore_sock_callbacks(conn); iscsi_target_login_drop(conn, login); iscsit_deaccess_np(np, tpg, tpg_np); return; } else { } } else { } conn->login_kworker = get_current(); allow_signal(2); reg_timer_8(& login_timer); tmp___4 = get_jiffies_64(); login_timer.expires = (unsigned long )(tmp___4 + 3750ULL); login_timer.data = (unsigned long )conn; login_timer.function = & iscsi_target_login_timeout; add_timer(& login_timer); descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsi_target_do_login_rx"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___2.format = "Starting login_timer for %s/%d\n"; descriptor___2.lineno = 548U; descriptor___2.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___7 != 0L) { tmp___5 = get_current(); tmp___6 = get_current(); __dynamic_pr_debug(& descriptor___2, "Starting login_timer for %s/%d\n", (char *)(& tmp___6->comm), tmp___5->pid); } else { } rc = (*((conn->conn_transport)->iscsit_get_login_rx))(conn, login); ldv_del_timer_sync_299(& login_timer); tmp___8 = get_current(); flush_signals(tmp___8); conn->login_kworker = (struct task_struct *)0; if (rc < 0) { iscsi_target_restore_sock_callbacks(conn); iscsi_target_login_drop(conn, login); iscsit_deaccess_np(np, tpg, tpg_np); return; } else { } descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsi_target_do_login_rx"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___3.format = "iscsi_target_do_login_rx after rx_login_io, %p, %s:%d\n"; descriptor___3.lineno = 563U; descriptor___3.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___11 != 0L) { tmp___9 = get_current(); tmp___10 = get_current(); __dynamic_pr_debug(& descriptor___3, "iscsi_target_do_login_rx after rx_login_io, %p, %s:%d\n", conn, (char *)(& tmp___10->comm), tmp___9->pid); } else { } rc = iscsi_target_do_login(conn, login); if (rc < 0) { iscsi_target_restore_sock_callbacks(conn); iscsi_target_login_drop(conn, login); iscsit_deaccess_np(np, tpg, tpg_np); } else if (rc == 0) { if ((unsigned long )conn->sock != (unsigned long )((struct socket *)0)) { sk___0 = (conn->sock)->sk; _raw_write_lock_bh(& sk___0->sk_callback_lock); clear_bit(1L, (unsigned long volatile *)(& conn->login_flags)); _raw_write_unlock_bh(& sk___0->sk_callback_lock); } else { } } else if (rc == 1) { iscsi_target_nego_release(conn); iscsi_post_login_handler(np, conn, (int )((u8 )zero_tsih)); iscsit_deaccess_np(np, tpg, tpg_np); } else { } return; } } static void iscsi_target_do_cleanup(struct work_struct *work ) { struct iscsi_conn *conn ; struct work_struct const *__mptr ; struct sock *sk ; struct iscsi_login *login ; struct iscsi_np *np ; struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { __mptr = (struct work_struct const *)work; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffffb50UL; sk = (conn->sock)->sk; login = conn->login; np = login->np; tpg = conn->tpg; tpg_np = conn->tpg_np; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_do_cleanup"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Entering iscsi_target_do_cleanup\n"; descriptor.lineno = 595U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Entering iscsi_target_do_cleanup\n"); } else { } ldv_cancel_delayed_work_sync_300(& conn->login_work); (*(conn->orig_state_change))(sk); iscsi_target_restore_sock_callbacks(conn); iscsi_target_login_drop(conn, login); iscsit_deaccess_np(np, tpg, tpg_np); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_target_do_cleanup"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___0.format = "iscsi_target_do_cleanup done()\n"; descriptor___0.lineno = 604U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "iscsi_target_do_cleanup done()\n"); } else { } return; } } static void iscsi_target_sk_state_change(struct sock *sk ) { struct iscsi_conn *conn ; void (*orig_state_change)(struct sock * ) ; bool state ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; int tmp___1 ; struct _ddebug descriptor___1 ; long tmp___2 ; int tmp___3 ; struct _ddebug descriptor___2 ; long tmp___4 ; int tmp___5 ; struct _ddebug descriptor___3 ; long tmp___6 ; struct _ddebug descriptor___4 ; long tmp___7 ; { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_sk_state_change"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Entering iscsi_target_sk_state_change\n"; descriptor.lineno = 613U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Entering iscsi_target_sk_state_change\n"); } else { } _raw_write_lock_bh(& sk->sk_callback_lock); conn = (struct iscsi_conn *)sk->sk_user_data; if ((unsigned long )conn == (unsigned long )((struct iscsi_conn *)0)) { _raw_write_unlock_bh(& sk->sk_callback_lock); return; } else { } orig_state_change = conn->orig_state_change; tmp___1 = constant_test_bit(4L, (unsigned long const volatile *)(& conn->login_flags)); if (tmp___1 == 0) { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_target_sk_state_change"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___0.format = "Got LOGIN_FLAGS_READY=0 sk_state_change conn: %p\n"; descriptor___0.lineno = 625U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Got LOGIN_FLAGS_READY=0 sk_state_change conn: %p\n", conn); } else { } _raw_write_unlock_bh(& sk->sk_callback_lock); (*orig_state_change)(sk); return; } else { } tmp___3 = constant_test_bit(1L, (unsigned long const volatile *)(& conn->login_flags)); if (tmp___3 != 0) { descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsi_target_sk_state_change"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___1.format = "Got LOGIN_FLAGS_READ_ACTIVE=1 sk_state_change conn: %p\n"; descriptor___1.lineno = 632U; descriptor___1.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___1, "Got LOGIN_FLAGS_READ_ACTIVE=1 sk_state_change conn: %p\n", conn); } else { } _raw_write_unlock_bh(& sk->sk_callback_lock); (*orig_state_change)(sk); return; } else { } tmp___5 = test_and_set_bit(2L, (unsigned long volatile *)(& conn->login_flags)); if (tmp___5 != 0) { descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsi_target_sk_state_change"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___2.format = "Got LOGIN_FLAGS_CLOSED=1 sk_state_change conn: %p\n"; descriptor___2.lineno = 639U; descriptor___2.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___2, "Got LOGIN_FLAGS_CLOSED=1 sk_state_change conn: %p\n", conn); } else { } _raw_write_unlock_bh(& sk->sk_callback_lock); (*orig_state_change)(sk); return; } else { } state = iscsi_target_sk_state_check(sk); _raw_write_unlock_bh(& sk->sk_callback_lock); descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsi_target_sk_state_change"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___3.format = "iscsi_target_sk_state_change: state: %d\n"; descriptor___3.lineno = 648U; descriptor___3.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___3, "iscsi_target_sk_state_change: state: %d\n", (int )state); } else { } if (! state) { descriptor___4.modname = "iscsi_target_mod"; descriptor___4.function = "iscsi_target_sk_state_change"; descriptor___4.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___4.format = "iscsi_target_sk_state_change got failed state\n"; descriptor___4.lineno = 651U; descriptor___4.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___4.flags & 1L, 0L); if (tmp___7 != 0L) { __dynamic_pr_debug(& descriptor___4, "iscsi_target_sk_state_change got failed state\n"); } else { } schedule_delayed_work(& conn->login_cleanup_work, 0UL); return; } else { } (*orig_state_change)(sk); return; } } static int iscsi_target_check_for_existing_instances(struct iscsi_conn *conn , struct iscsi_login *login ) { int tmp ; int tmp___0 ; { if ((unsigned int )login->checked_for_existing != 0U) { return (0); } else { } login->checked_for_existing = 1U; if ((unsigned int )login->tsih == 0U) { tmp = iscsi_check_for_session_reinstatement(conn); return (tmp); } else { tmp___0 = iscsi_login_post_auth_non_zero_tsih(conn, (int )login->cid, login->initial_exp_statsn); return (tmp___0); } } } static int iscsi_target_do_authentication(struct iscsi_conn *conn , struct iscsi_login *login ) { int authret ; u32 payload_length ; struct iscsi_param *param ; struct iscsi_login_req *login_req ; struct iscsi_login_rsp *login_rsp ; u32 tmp ; struct _ddebug descriptor ; long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; int tmp___2 ; { login_req = (struct iscsi_login_req *)(& login->req); login_rsp = (struct iscsi_login_rsp *)(& login->rsp); payload_length = (u32 )((((int )login_req->dlength[0] << 16) | ((int )login_req->dlength[1] << 8)) | (int )login_req->dlength[2]); param = iscsi_find_param_from_key((char *)"AuthMethod", conn->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { return (-1); } else { } tmp = iscsi_handle_authentication(conn, login->req_buf, login->rsp_buf, (int )payload_length, (int *)(& login->rsp_length), (unsigned char *)param->value); authret = (int )tmp; switch (authret) { case 0: descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_do_authentication"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Received OK response from LIO Authentication, continuing.\n"; descriptor.lineno = 707U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Received OK response from LIO Authentication, continuing.\n"); } else { } goto ldv_59087; case 1: descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_target_do_authentication"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___0.format = "iSCSI security negotiation completed successfully.\n"; descriptor___0.lineno = 711U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___0, "iSCSI security negotiation completed successfully.\n"); } else { } login->auth_complete = 1U; if ((int )login_req->flags & 1 && (int )((signed char )login_req->flags) < 0) { login_rsp->flags = (uint8_t )((unsigned int )login_rsp->flags | 129U); login->current_stage = 1U; } else { } tmp___2 = iscsi_target_check_for_existing_instances(conn, login); return (tmp___2); case 2: printk("\vSecurity negotiation failed.\n"); iscsit_tx_login_rsp(conn, 2, 1); return (-1); default: printk("\vReceived unknown error %d from LIO Authentication\n", authret); iscsit_tx_login_rsp(conn, 3, 0); return (-1); } ldv_59087: ; return (0); } } static int iscsi_target_handle_csg_zero(struct iscsi_conn *conn , struct iscsi_login *login ) { int ret ; u32 payload_length ; struct iscsi_param *param ; struct iscsi_login_req *login_req ; struct iscsi_login_rsp *login_rsp ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; { login_req = (struct iscsi_login_req *)(& login->req); login_rsp = (struct iscsi_login_rsp *)(& login->rsp); payload_length = (u32 )((((int )login_req->dlength[0] << 16) | ((int )login_req->dlength[1] << 8)) | (int )login_req->dlength[2]); param = iscsi_find_param_from_key((char *)"AuthMethod", conn->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { return (-1); } else { } ret = iscsi_decode_text_input(5, 5, login->req_buf, payload_length, conn); if (ret < 0) { return (-1); } else { } if (ret > 0) { if ((unsigned int )login->auth_complete != 0U) { printk("\vInitiator has already been successfully authenticated, but is still sending %s keys.\n", param->value); iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } goto do_auth; } else if (payload_length == 0U) { printk("\vInitiator sent zero length security payload, login failed\n"); iscsit_tx_login_rsp(conn, 2, 1); return (-1); } else { } if ((unsigned int )login->first_request != 0U) { tmp = iscsi_target_check_first_request(conn, login); if (tmp < 0) { return (-1); } else { } } else { } ret = iscsi_encode_text_output(5, 2, login->rsp_buf, & login->rsp_length, conn->param_list); if (ret < 0) { return (-1); } else { } tmp___2 = iscsi_check_negotiated_keys(conn->param_list); if (tmp___2 == 0) { if ((conn->tpg)->tpg_attrib.authentication != 0U) { tmp___0 = strncmp((char const *)param->value, "None", 4UL); if (tmp___0 == 0) { printk("\vInitiator sent AuthMethod=None but Target is enforcing iSCSI Authentication, login failed.\n"); iscsit_tx_login_rsp(conn, 2, 1); return (-1); } else { } } else { } if ((conn->tpg)->tpg_attrib.authentication != 0U && (unsigned int )login->auth_complete == 0U) { return (0); } else { } tmp___1 = strncmp((char const *)param->value, "None", 4UL); if (tmp___1 != 0 && (unsigned int )login->auth_complete == 0U) { return (0); } else { } if ((int )login_req->flags & 1 && (int )((signed char )login_req->flags) < 0) { login_rsp->flags = (uint8_t )((unsigned int )login_rsp->flags | 129U); login->current_stage = 1U; } else { } } else { } return (0); do_auth: tmp___3 = iscsi_target_do_authentication(conn, login); return (tmp___3); } } static int iscsi_target_handle_csg_one(struct iscsi_conn *conn , struct iscsi_login *login ) { int ret ; u32 payload_length ; struct iscsi_login_req *login_req ; struct iscsi_login_rsp *login_rsp ; int tmp ; int tmp___0 ; int tmp___1 ; { login_req = (struct iscsi_login_req *)(& login->req); login_rsp = (struct iscsi_login_rsp *)(& login->rsp); payload_length = (u32 )((((int )login_req->dlength[0] << 16) | ((int )login_req->dlength[1] << 8)) | (int )login_req->dlength[2]); ret = iscsi_decode_text_input(6, 5, login->req_buf, payload_length, conn); if (ret < 0) { iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } if ((unsigned int )login->first_request != 0U) { tmp = iscsi_target_check_first_request(conn, login); if (tmp < 0) { return (-1); } else { } } else { } tmp___0 = iscsi_target_check_for_existing_instances(conn, login); if (tmp___0 < 0) { return (-1); } else { } ret = iscsi_encode_text_output(6, 2, login->rsp_buf, & login->rsp_length, conn->param_list); if (ret < 0) { iscsit_tx_login_rsp(conn, 2, 0); return (-1); } else { } if ((unsigned int )login->auth_complete == 0U && (conn->tpg)->tpg_attrib.authentication != 0U) { printk("\vInitiator is requesting CSG: 1, has not been successfully authenticated, and the Target is enforcing iSCSI Authentication, login failed.\n"); iscsit_tx_login_rsp(conn, 2, 1); return (-1); } else { } tmp___1 = iscsi_check_negotiated_keys(conn->param_list); if (tmp___1 == 0) { if (((int )login_req->flags & 3) != 0 && (int )((signed char )login_req->flags) < 0) { login_rsp->flags = (uint8_t )((unsigned int )login_rsp->flags | 131U); } else { } } else { } return (0); } } static int iscsi_target_do_login(struct iscsi_conn *conn , struct iscsi_login *login ) { int pdu_count ; struct iscsi_login_req *login_req ; struct iscsi_login_rsp *login_rsp ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; struct sock *sk ; bool state ; struct _ddebug descriptor ; long tmp___3 ; { pdu_count = 0; login_req = (struct iscsi_login_req *)(& login->req); login_rsp = (struct iscsi_login_rsp *)(& login->rsp); ldv_59122: pdu_count = pdu_count + 1; if (pdu_count > 7) { printk("\vMAX_LOGIN_PDUS count reached.\n"); iscsit_tx_login_rsp(conn, 3, 0); return (-1); } else { } switch (((int )login_req->flags & 12) >> 2) { case 0: login_rsp->flags = (unsigned int )login_rsp->flags & 243U; tmp = iscsi_target_handle_csg_zero(conn, login); if (tmp < 0) { return (-1); } else { } goto ldv_59118; case 1: login_rsp->flags = (uint8_t )((unsigned int )login_rsp->flags | 4U); tmp___0 = iscsi_target_handle_csg_one(conn, login); if (tmp___0 < 0) { return (-1); } else { } if ((int )((signed char )login_rsp->flags) < 0) { login->tsih = (conn->sess)->tsih; login->login_complete = 1U; iscsi_target_restore_sock_callbacks(conn); tmp___1 = iscsi_target_do_tx_login_io(conn, login); if (tmp___1 < 0) { return (-1); } else { } return (1); } else { } goto ldv_59118; default: printk("\vIllegal CSG: %d received from Initiator, protocol error.\n", ((int )login_req->flags & 12) >> 2); goto ldv_59118; } ldv_59118: tmp___2 = iscsi_target_do_tx_login_io(conn, login); if (tmp___2 < 0) { return (-1); } else { } if ((int )((signed char )login_rsp->flags) < 0) { login_rsp->flags = (unsigned int )login_rsp->flags & 127U; login_rsp->flags = (unsigned int )login_rsp->flags & 252U; } else { } goto ldv_59121; goto ldv_59122; ldv_59121: ; if ((unsigned long )conn->sock != (unsigned long )((struct socket *)0)) { sk = (conn->sock)->sk; _raw_read_lock_bh(& sk->sk_callback_lock); state = iscsi_target_sk_state_check(sk); _raw_read_unlock_bh(& sk->sk_callback_lock); if (! state) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_do_login"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "iscsi_target_do_login() failed state for conn: %p\n"; descriptor.lineno = 953U; descriptor.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor, "iscsi_target_do_login() failed state for conn: %p\n", conn); } else { } return (-1); } else { } } else { } return (0); } } static void iscsi_initiatorname_tolower(char *param_buf ) { char *c ; u32 iqn_size ; size_t tmp ; u32 i ; unsigned char tmp___0 ; { tmp = strlen((char const *)param_buf); iqn_size = (u32 )tmp; i = 0U; goto ldv_59135; ldv_59134: c = param_buf + (unsigned long )i; if (((int )_ctype[(int )((unsigned char )*c)] & 1) == 0) { goto ldv_59133; } else { } tmp___0 = __tolower((int )((unsigned char )*c)); *c = (char )tmp___0; ldv_59133: i = i + 1U; ldv_59135: ; if (i < iqn_size) { goto ldv_59134; } else { } return; } } int iscsi_target_locate_portal(struct iscsi_np *np , struct iscsi_conn *conn , struct iscsi_login *login ) { char *i_buf ; char *s_buf ; char *t_buf ; char *tmpbuf ; char *start ; char *end ; char *key ; char *value ; struct iscsi_session *sess ; struct iscsi_tiqn *tiqn ; struct iscsi_tpg_np *tpg_np ; struct iscsi_login_req *login_req ; struct se_node_acl *se_nacl ; u32 payload_length ; u32 queue_depth ; int sessiontype ; int ret ; int tag_num ; int tag_size ; struct lock_class_key __key ; atomic_long_t __constr_expr_0 ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; atomic_long_t __constr_expr_1 ; struct lock_class_key __key___2 ; void *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; size_t tmp___4 ; size_t tmp___5 ; int tmp___6 ; int tmp___7 ; struct _ddebug descriptor ; long tmp___8 ; struct _ddebug descriptor___0 ; long tmp___9 ; int tmp___10 ; int tmp___11 ; u32 __max1 ; u32 __max2 ; { i_buf = (char *)0; s_buf = (char *)0; t_buf = (char *)0; start = (char *)0; end = (char *)0; sess = conn->sess; tpg_np = (struct iscsi_tpg_np *)0; queue_depth = 0U; sessiontype = 0; ret = 0; __init_work(& conn->login_work.work, 0); __constr_expr_0.counter = 137438953408L; conn->login_work.work.data = __constr_expr_0; lockdep_init_map(& conn->login_work.work.lockdep_map, "(&(&conn->login_work)->work)", & __key, 0); INIT_LIST_HEAD(& conn->login_work.work.entry); conn->login_work.work.func = & iscsi_target_do_login_rx; init_timer_key(& conn->login_work.timer, 2097152U, "(&(&conn->login_work)->timer)", & __key___0); conn->login_work.timer.function = & delayed_work_timer_fn; conn->login_work.timer.data = (unsigned long )(& conn->login_work); __init_work(& conn->login_cleanup_work.work, 0); __constr_expr_1.counter = 137438953408L; conn->login_cleanup_work.work.data = __constr_expr_1; lockdep_init_map(& conn->login_cleanup_work.work.lockdep_map, "(&(&conn->login_cleanup_work)->work)", & __key___1, 0); INIT_LIST_HEAD(& conn->login_cleanup_work.work.entry); conn->login_cleanup_work.work.func = & iscsi_target_do_cleanup; init_timer_key(& conn->login_cleanup_work.timer, 2097152U, "(&(&conn->login_cleanup_work)->timer)", & __key___2); conn->login_cleanup_work.timer.function = & delayed_work_timer_fn; conn->login_cleanup_work.timer.data = (unsigned long )(& conn->login_cleanup_work); iscsi_target_set_sock_callbacks(conn); login->np = np; login_req = (struct iscsi_login_req *)(& login->req); payload_length = (u32 )((((int )login_req->dlength[0] << 16) | ((int )login_req->dlength[1] << 8)) | (int )login_req->dlength[2]); tmp = kzalloc((size_t )(payload_length + 1U), 208U); tmpbuf = (char *)tmp; if ((unsigned long )tmpbuf == (unsigned long )((char *)0)) { printk("\vUnable to allocate memory for tmpbuf.\n"); return (-1); } else { } memcpy((void *)tmpbuf, (void const *)login->req_buf, (size_t )payload_length); *(tmpbuf + (unsigned long )payload_length) = 0; start = tmpbuf; end = start + (unsigned long )payload_length; goto ldv_59169; ldv_59168: tmp___0 = iscsi_extract_key_value(start, & key, & value); if (tmp___0 < 0) { ret = -1; goto out; } else { } tmp___3 = strncmp((char const *)key, "InitiatorName", 13UL); if (tmp___3 == 0) { i_buf = value; } else { tmp___2 = strncmp((char const *)key, "SessionType", 11UL); if (tmp___2 == 0) { s_buf = value; } else { tmp___1 = strncmp((char const *)key, "TargetName", 10UL); if (tmp___1 == 0) { t_buf = value; } else { } } } tmp___4 = strlen((char const *)key); tmp___5 = strlen((char const *)value); start = start + ((tmp___4 + tmp___5) + 2UL); ldv_59169: ; if ((unsigned long )start < (unsigned long )end) { goto ldv_59168; } else { } if ((unsigned long )i_buf == (unsigned long )((char *)0)) { printk("\vInitiatorName key not received in first login request.\n"); iscsit_tx_login_rsp(conn, 2, 7); ret = -1; goto out; } else { } iscsi_initiatorname_tolower(i_buf); if ((unsigned long )s_buf == (unsigned long )((char *)0)) { if ((unsigned int )login->leading_connection == 0U) { goto get_target; } else { } printk("\vSessionType key not received in first login request.\n"); iscsit_tx_login_rsp(conn, 2, 7); ret = -1; goto out; } else { } sessiontype = strncmp((char const *)s_buf, "Discovery", 9UL); if (sessiontype == 0) { conn->tpg = iscsit_global->discovery_tpg; if ((unsigned int )login->leading_connection == 0U) { goto get_target; } else { } (sess->sess_ops)->SessionType = 1U; tmp___6 = iscsi_login_setup_crypto(conn); if (tmp___6 < 0) { printk("\viscsi_login_setup_crypto() failed\n"); ret = -1; goto out; } else { } tmp___7 = iscsit_access_np(np, conn->tpg); if (tmp___7 < 0) { iscsit_tx_login_rsp(conn, 3, 1); ret = -1; goto out; } else { } ret = 0; goto alloc_tags; } else { } get_target: ; if ((unsigned long )t_buf == (unsigned long )((char *)0)) { printk("\vTargetName key not received in first login request while SessionType=Normal.\n"); iscsit_tx_login_rsp(conn, 2, 7); ret = -1; goto out; } else { } tiqn = iscsit_get_tiqn_for_login((unsigned char *)t_buf); if ((unsigned long )tiqn == (unsigned long )((struct iscsi_tiqn *)0)) { printk("\vUnable to locate Target IQN: %s in Storage Node\n", t_buf); iscsit_tx_login_rsp(conn, 3, 1); ret = -1; goto out; } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_locate_portal"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor.format = "Located Storage Object: %s\n"; descriptor.lineno = 1118U; descriptor.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___8 != 0L) { __dynamic_pr_debug(& descriptor, "Located Storage Object: %s\n", (unsigned char *)(& tiqn->tiqn)); } else { } conn->tpg = iscsit_get_tpg_from_np(tiqn, np, & tpg_np); if ((unsigned long )conn->tpg == (unsigned long )((struct iscsi_portal_group *)0)) { printk("\vUnable to locate Target Portal Group on %s\n", (unsigned char *)(& tiqn->tiqn)); iscsit_put_tiqn_for_login(tiqn); iscsit_tx_login_rsp(conn, 3, 1); ret = -1; goto out; } else { } conn->tpg_np = tpg_np; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_target_locate_portal"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nego.c"; descriptor___0.format = "Located Portal Group Object: %hu\n"; descriptor___0.lineno = 1134U; descriptor___0.flags = 0U; tmp___9 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___9 != 0L) { __dynamic_pr_debug(& descriptor___0, "Located Portal Group Object: %hu\n", (int )(conn->tpg)->tpgt); } else { } tmp___10 = iscsi_login_setup_crypto(conn); if (tmp___10 < 0) { printk("\viscsi_login_setup_crypto() failed\n"); kref_put(& tpg_np->tpg_np_kref, & iscsit_login_kref_put); iscsit_put_tiqn_for_login(tiqn); conn->tpg = (struct iscsi_portal_group *)0; ret = -1; goto out; } else { } tmp___11 = iscsit_access_np(np, conn->tpg); if (tmp___11 < 0) { kref_put(& tpg_np->tpg_np_kref, & iscsit_login_kref_put); iscsit_put_tiqn_for_login(tiqn); iscsit_tx_login_rsp(conn, 3, 1); conn->tpg = (struct iscsi_portal_group *)0; ret = -1; goto out; } else { } if ((unsigned int )login->leading_connection == 0U) { ret = 0; goto out; } else { } (sess->sess_ops)->SessionType = 0U; (sess->se_sess)->se_node_acl = core_tpg_check_initiator_node_acl(& (conn->tpg)->tpg_se_tpg, (unsigned char *)i_buf); if ((unsigned long )(sess->se_sess)->se_node_acl == (unsigned long )((struct se_node_acl *)0)) { printk("\viSCSI Initiator Node: %s is not authorized to access iSCSI target portal group: %hu.\n", i_buf, (int )(conn->tpg)->tpgt); iscsit_tx_login_rsp(conn, 2, 2); ret = -1; goto out; } else { } se_nacl = (sess->se_sess)->se_node_acl; queue_depth = se_nacl->queue_depth; alloc_tags: __max1 = 16U; __max2 = queue_depth; tag_num = (int )(__max1 > __max2 ? __max1 : __max2); tag_num = (tag_num + 4) * 2; tag_size = (int )((unsigned int )(conn->conn_transport)->priv_size + 1920U); ret = transport_alloc_session_tags(sess->se_sess, (unsigned int )tag_num, (unsigned int )tag_size); if (ret < 0) { iscsit_tx_login_rsp(conn, 3, 2); ret = -1; } else { } out: kfree((void const *)tmpbuf); return (ret); } } int iscsi_target_start_negotiation(struct iscsi_login *login , struct iscsi_conn *conn ) { int ret ; struct sock *sk ; { ret = iscsi_target_do_login(conn, login); if (ret == 0) { if ((unsigned long )conn->sock != (unsigned long )((struct socket *)0)) { sk = (conn->sock)->sk; _raw_write_lock_bh(& sk->sk_callback_lock); set_bit(4L, (unsigned long volatile *)(& conn->login_flags)); _raw_write_unlock_bh(& sk->sk_callback_lock); } else { } } else if (ret < 0) { ldv_cancel_delayed_work_sync_301(& conn->login_work); ldv_cancel_delayed_work_sync_302(& conn->login_cleanup_work); iscsi_target_restore_sock_callbacks(conn); iscsi_remove_failed_auth_entry(conn); } else { } if (ret != 0) { iscsi_target_nego_release(conn); } else { } return (ret); } } void iscsi_target_nego_release(struct iscsi_conn *conn ) { struct iscsi_login *login ; { login = conn->conn_login; if ((unsigned long )login == (unsigned long )((struct iscsi_login *)0)) { return; } else { } kfree((void const *)login->req_buf); kfree((void const *)login->rsp_buf); kfree((void const *)login); conn->conn_login = (struct iscsi_login *)0; return; } } void activate_work_1(struct work_struct *work , int state ) { { if (ldv_work_1_0 == 0) { ldv_work_struct_1_0 = work; ldv_work_1_0 = state; return; } else { } if (ldv_work_1_1 == 0) { ldv_work_struct_1_1 = work; ldv_work_1_1 = state; return; } else { } if (ldv_work_1_2 == 0) { ldv_work_struct_1_2 = work; ldv_work_1_2 = state; return; } else { } if (ldv_work_1_3 == 0) { ldv_work_struct_1_3 = work; ldv_work_1_3 = state; return; } else { } return; } } void work_init_1(void) { { ldv_work_1_0 = 0; ldv_work_1_1 = 0; ldv_work_1_2 = 0; ldv_work_1_3 = 0; return; } } void choose_timer_6(struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; (*(timer->function))(timer->data); LDV_IN_INTERRUPT = 1; ldv_timer_state_6 = 2; return; } } void activate_work_2(struct work_struct *work , int state ) { { if (ldv_work_2_0 == 0) { ldv_work_struct_2_0 = work; ldv_work_2_0 = state; return; } else { } if (ldv_work_2_1 == 0) { ldv_work_struct_2_1 = work; ldv_work_2_1 = state; return; } else { } if (ldv_work_2_2 == 0) { ldv_work_struct_2_2 = work; ldv_work_2_2 = state; return; } else { } if (ldv_work_2_3 == 0) { ldv_work_struct_2_3 = work; ldv_work_2_3 = state; return; } else { } return; } } int reg_timer_6(struct timer_list *timer ) { { ldv_timer_list_6 = timer; ldv_timer_state_6 = 1; return (0); } } void invoke_work_1(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_work_1_0 == 2 || ldv_work_1_0 == 3) { ldv_work_1_0 = 4; iscsi_target_do_login_rx(ldv_work_struct_1_0); ldv_work_1_0 = 1; } else { } goto ldv_59212; case 1: ; if (ldv_work_1_1 == 2 || ldv_work_1_1 == 3) { ldv_work_1_1 = 4; iscsi_target_do_login_rx(ldv_work_struct_1_0); ldv_work_1_1 = 1; } else { } goto ldv_59212; case 2: ; if (ldv_work_1_2 == 2 || ldv_work_1_2 == 3) { ldv_work_1_2 = 4; iscsi_target_do_login_rx(ldv_work_struct_1_0); ldv_work_1_2 = 1; } else { } goto ldv_59212; case 3: ; if (ldv_work_1_3 == 2 || ldv_work_1_3 == 3) { ldv_work_1_3 = 4; iscsi_target_do_login_rx(ldv_work_struct_1_0); ldv_work_1_3 = 1; } else { } goto ldv_59212; default: ldv_stop(); } ldv_59212: ; return; } } void call_and_disable_work_1(struct work_struct *work ) { { if ((ldv_work_1_0 == 2 || ldv_work_1_0 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_1_0) { iscsi_target_do_login_rx(work); ldv_work_1_0 = 1; return; } else { } if ((ldv_work_1_1 == 2 || ldv_work_1_1 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_1_1) { iscsi_target_do_login_rx(work); ldv_work_1_1 = 1; return; } else { } if ((ldv_work_1_2 == 2 || ldv_work_1_2 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_1_2) { iscsi_target_do_login_rx(work); ldv_work_1_2 = 1; return; } else { } if ((ldv_work_1_3 == 2 || ldv_work_1_3 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_1_3) { iscsi_target_do_login_rx(work); ldv_work_1_3 = 1; return; } else { } return; } } void call_and_disable_all_2(int state ) { { if (ldv_work_2_0 == state) { call_and_disable_work_2(ldv_work_struct_2_0); } else { } if (ldv_work_2_1 == state) { call_and_disable_work_2(ldv_work_struct_2_1); } else { } if (ldv_work_2_2 == state) { call_and_disable_work_2(ldv_work_struct_2_2); } else { } if (ldv_work_2_3 == state) { call_and_disable_work_2(ldv_work_struct_2_3); } else { } return; } } void disable_work_1(struct work_struct *work ) { { if ((ldv_work_1_0 == 3 || ldv_work_1_0 == 2) && (unsigned long )ldv_work_struct_1_0 == (unsigned long )work) { ldv_work_1_0 = 1; } else { } if ((ldv_work_1_1 == 3 || ldv_work_1_1 == 2) && (unsigned long )ldv_work_struct_1_1 == (unsigned long )work) { ldv_work_1_1 = 1; } else { } if ((ldv_work_1_2 == 3 || ldv_work_1_2 == 2) && (unsigned long )ldv_work_struct_1_2 == (unsigned long )work) { ldv_work_1_2 = 1; } else { } if ((ldv_work_1_3 == 3 || ldv_work_1_3 == 2) && (unsigned long )ldv_work_struct_1_3 == (unsigned long )work) { ldv_work_1_3 = 1; } else { } return; } } void disable_suitable_timer_6(struct timer_list *timer ) { { if ((unsigned long )timer == (unsigned long )ldv_timer_list_6) { ldv_timer_state_6 = 0; return; } else { } return; } } void activate_pending_timer_6(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_6 == (unsigned long )timer) { if (ldv_timer_state_6 == 2 || pending_flag != 0) { ldv_timer_list_6 = timer; ldv_timer_list_6->data = data; ldv_timer_state_6 = 1; } else { } return; } else { } reg_timer_6(timer); ldv_timer_list_6->data = data; return; } } void invoke_work_2(void) { int tmp ; { tmp = __VERIFIER_nondet_int(); switch (tmp) { case 0: ; if (ldv_work_2_0 == 2 || ldv_work_2_0 == 3) { ldv_work_2_0 = 4; iscsi_target_do_cleanup(ldv_work_struct_2_0); ldv_work_2_0 = 1; } else { } goto ldv_59242; case 1: ; if (ldv_work_2_1 == 2 || ldv_work_2_1 == 3) { ldv_work_2_1 = 4; iscsi_target_do_cleanup(ldv_work_struct_2_0); ldv_work_2_1 = 1; } else { } goto ldv_59242; case 2: ; if (ldv_work_2_2 == 2 || ldv_work_2_2 == 3) { ldv_work_2_2 = 4; iscsi_target_do_cleanup(ldv_work_struct_2_0); ldv_work_2_2 = 1; } else { } goto ldv_59242; case 3: ; if (ldv_work_2_3 == 2 || ldv_work_2_3 == 3) { ldv_work_2_3 = 4; iscsi_target_do_cleanup(ldv_work_struct_2_0); ldv_work_2_3 = 1; } else { } goto ldv_59242; default: ldv_stop(); } ldv_59242: ; return; } } void work_init_2(void) { { ldv_work_2_0 = 0; ldv_work_2_1 = 0; ldv_work_2_2 = 0; ldv_work_2_3 = 0; return; } } void call_and_disable_all_1(int state ) { { if (ldv_work_1_0 == state) { call_and_disable_work_1(ldv_work_struct_1_0); } else { } if (ldv_work_1_1 == state) { call_and_disable_work_1(ldv_work_struct_1_1); } else { } if (ldv_work_1_2 == state) { call_and_disable_work_1(ldv_work_struct_1_2); } else { } if (ldv_work_1_3 == state) { call_and_disable_work_1(ldv_work_struct_1_3); } else { } return; } } void disable_work_2(struct work_struct *work ) { { if ((ldv_work_2_0 == 3 || ldv_work_2_0 == 2) && (unsigned long )ldv_work_struct_2_0 == (unsigned long )work) { ldv_work_2_0 = 1; } else { } if ((ldv_work_2_1 == 3 || ldv_work_2_1 == 2) && (unsigned long )ldv_work_struct_2_1 == (unsigned long )work) { ldv_work_2_1 = 1; } else { } if ((ldv_work_2_2 == 3 || ldv_work_2_2 == 2) && (unsigned long )ldv_work_struct_2_2 == (unsigned long )work) { ldv_work_2_2 = 1; } else { } if ((ldv_work_2_3 == 3 || ldv_work_2_3 == 2) && (unsigned long )ldv_work_struct_2_3 == (unsigned long )work) { ldv_work_2_3 = 1; } else { } return; } } void call_and_disable_work_2(struct work_struct *work ) { { if ((ldv_work_2_0 == 2 || ldv_work_2_0 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_2_0) { iscsi_target_do_cleanup(work); ldv_work_2_0 = 1; return; } else { } if ((ldv_work_2_1 == 2 || ldv_work_2_1 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_2_1) { iscsi_target_do_cleanup(work); ldv_work_2_1 = 1; return; } else { } if ((ldv_work_2_2 == 2 || ldv_work_2_2 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_2_2) { iscsi_target_do_cleanup(work); ldv_work_2_2 = 1; return; } else { } if ((ldv_work_2_3 == 2 || ldv_work_2_3 == 3) && (unsigned long )work == (unsigned long )ldv_work_struct_2_3) { iscsi_target_do_cleanup(work); ldv_work_2_3 = 1; return; } else { } return; } } bool ldv_queue_work_on_285(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_286(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_287(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_288(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_289(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_290(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_291(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_292(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_293(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_294(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_295(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_296(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_297(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_298(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } int ldv_del_timer_sync_299(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; disable_suitable_timer_8(ldv_func_arg1); return (ldv_func_res); } } bool ldv_cancel_delayed_work_sync_300(struct delayed_work *ldv_func_arg1 ) { ldv_func_ret_type___6 ldv_func_res ; bool tmp ; { tmp = cancel_delayed_work_sync(ldv_func_arg1); ldv_func_res = tmp; disable_work_2(& ldv_func_arg1->work); return (ldv_func_res); } } bool ldv_cancel_delayed_work_sync_301(struct delayed_work *ldv_func_arg1 ) { ldv_func_ret_type___7 ldv_func_res ; bool tmp ; { tmp = cancel_delayed_work_sync(ldv_func_arg1); ldv_func_res = tmp; disable_work_2(& ldv_func_arg1->work); return (ldv_func_res); } } bool ldv_cancel_delayed_work_sync_302(struct delayed_work *ldv_func_arg1 ) { ldv_func_ret_type___8 ldv_func_res ; bool tmp ; { tmp = cancel_delayed_work_sync(ldv_func_arg1); ldv_func_res = tmp; disable_work_2(& ldv_func_arg1->work); return (ldv_func_res); } } __inline static long ldv__builtin_expect(long exp , long c ) ; int ldv_mutex_trylock_333(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_331(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_334(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_335(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_330(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_332(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_336(struct mutex *ldv_func_arg1 ) ; bool ldv_queue_work_on_325(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_327(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_326(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_329(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_328(struct workqueue_struct *ldv_func_arg1 ) ; void __iscsit_start_nopin_timer(struct iscsi_conn *conn ) ; void iscsit_set_default_node_attribues(struct iscsi_node_acl *acl , struct iscsi_portal_group *tpg ) ; int iscsit_na_dataout_timeout(struct iscsi_node_acl *acl , u32 dataout_timeout ) ; int iscsit_na_dataout_timeout_retries(struct iscsi_node_acl *acl , u32 dataout_timeout_retries ) ; int iscsit_na_nopin_timeout(struct iscsi_node_acl *acl , u32 nopin_timeout ) ; int iscsit_na_nopin_response_timeout(struct iscsi_node_acl *acl , u32 nopin_response_timeout ) ; int iscsit_na_random_datain_pdu_offsets(struct iscsi_node_acl *acl , u32 random_datain_pdu_offsets ) ; int iscsit_na_random_datain_seq_offsets(struct iscsi_node_acl *acl , u32 random_datain_seq_offsets ) ; int iscsit_na_random_r2t_offsets(struct iscsi_node_acl *acl , u32 random_r2t_offsets ) ; int iscsit_na_default_erl(struct iscsi_node_acl *acl , u32 default_erl ) ; __inline static char *iscsit_na_get_initiatorname(struct iscsi_node_acl *nacl ) { struct se_node_acl *se_nacl ; { se_nacl = & nacl->se_node_acl; return ((char *)(& se_nacl->initiatorname)); } } void iscsit_set_default_node_attribues(struct iscsi_node_acl *acl , struct iscsi_portal_group *tpg ) { struct iscsi_node_attrib *a ; { a = & acl->node_attrib; a->dataout_timeout = 3U; a->dataout_timeout_retries = 5U; a->nopin_timeout = 15U; a->nopin_response_timeout = 30U; a->random_datain_pdu_offsets = 0U; a->random_datain_seq_offsets = 0U; a->random_r2t_offsets = 0U; a->default_erl = tpg->tpg_attrib.default_erl; return; } } int iscsit_na_dataout_timeout(struct iscsi_node_acl *acl , u32 dataout_timeout ) { struct iscsi_node_attrib *a ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; { a = & acl->node_attrib; if (dataout_timeout > 60U) { printk("\vRequested DataOut Timeout %u larger than maximum %u\n", dataout_timeout, 60); return (-22); } else if (dataout_timeout <= 1U) { printk("\vRequested DataOut Timeout %u smaller than minimum %u\n", dataout_timeout, 2); return (-22); } else { } a->dataout_timeout = dataout_timeout; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_na_dataout_timeout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nodeattrib.c"; descriptor.format = "Set DataOut Timeout to %u for Initiator Node %s\n"; descriptor.lineno = 71U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = iscsit_na_get_initiatorname(acl); __dynamic_pr_debug(& descriptor, "Set DataOut Timeout to %u for Initiator Node %s\n", a->dataout_timeout, tmp); } else { } return (0); } } int iscsit_na_dataout_timeout_retries(struct iscsi_node_acl *acl , u32 dataout_timeout_retries ) { struct iscsi_node_attrib *a ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; { a = & acl->node_attrib; if (dataout_timeout_retries > 15U) { printk("\vRequested DataOut Timeout Retries %u larger than maximum %u", dataout_timeout_retries, 15); return (-22); } else if (dataout_timeout_retries == 0U) { printk("\vRequested DataOut Timeout Retries %u smaller than minimum %u", dataout_timeout_retries, 1); return (-22); } else { } a->dataout_timeout_retries = dataout_timeout_retries; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_na_dataout_timeout_retries"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nodeattrib.c"; descriptor.format = "Set DataOut Timeout Retries to %u for Initiator Node %s\n"; descriptor.lineno = 97U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = iscsit_na_get_initiatorname(acl); __dynamic_pr_debug(& descriptor, "Set DataOut Timeout Retries to %u for Initiator Node %s\n", a->dataout_timeout_retries, tmp); } else { } return (0); } } int iscsit_na_nopin_timeout(struct iscsi_node_acl *acl , u32 nopin_timeout ) { struct iscsi_node_attrib *a ; struct iscsi_session *sess ; struct iscsi_conn *conn ; struct se_node_acl *se_nacl ; struct se_session *se_sess ; u32 orig_nopin_timeout ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { a = & acl->node_attrib; se_nacl = & (a->nacl)->se_node_acl; orig_nopin_timeout = a->nopin_timeout; if (nopin_timeout > 60U) { printk("\vRequested NopIn Timeout %u larger than maximum %u\n", nopin_timeout, 60); return (-22); } else if (nopin_timeout <= 2U && nopin_timeout != 0U) { printk("\vRequested NopIn Timeout %u smaller than minimum %u and not 0\n", nopin_timeout, 3); return (-22); } else { } a->nopin_timeout = nopin_timeout; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_na_nopin_timeout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nodeattrib.c"; descriptor.format = "Set NopIn Timeout to %u for Initiator Node %s\n"; descriptor.lineno = 128U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = iscsit_na_get_initiatorname(acl); __dynamic_pr_debug(& descriptor, "Set NopIn Timeout to %u for Initiator Node %s\n", a->nopin_timeout, tmp); } else { } if (orig_nopin_timeout == 0U) { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; spin_lock(& sess->conn_lock); __mptr = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_57380; ldv_57379: ; if ((unsigned int )conn->conn_state != 5U) { goto ldv_57378; } else { } spin_lock(& conn->nopin_timer_lock); __iscsit_start_nopin_timer(conn); spin_unlock(& conn->nopin_timer_lock); ldv_57378: __mptr___0 = (struct list_head const *)conn->conn_list.next; conn = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_57380: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_57379; } else { } spin_unlock(& sess->conn_lock); } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); } else { } return (0); } } int iscsit_na_nopin_response_timeout(struct iscsi_node_acl *acl , u32 nopin_response_timeout ) { struct iscsi_node_attrib *a ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; { a = & acl->node_attrib; if (nopin_response_timeout > 60U) { printk("\vRequested NopIn Response Timeout %u larger than maximum %u\n", nopin_response_timeout, 60); return (-22); } else if (nopin_response_timeout <= 2U) { printk("\vRequested NopIn Response Timeout %u smaller than minimum %u\n", nopin_response_timeout, 3); return (-22); } else { } a->nopin_response_timeout = nopin_response_timeout; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_na_nopin_response_timeout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nodeattrib.c"; descriptor.format = "Set NopIn Response Timeout to %u for Initiator Node %s\n"; descriptor.lineno = 178U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = iscsit_na_get_initiatorname(acl); __dynamic_pr_debug(& descriptor, "Set NopIn Response Timeout to %u for Initiator Node %s\n", a->nopin_timeout, tmp); } else { } return (0); } } int iscsit_na_random_datain_pdu_offsets(struct iscsi_node_acl *acl , u32 random_datain_pdu_offsets ) { struct iscsi_node_attrib *a ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; { a = & acl->node_attrib; if (random_datain_pdu_offsets != 0U && random_datain_pdu_offsets != 1U) { printk("\vRequested Random DataIN PDU Offsets: %u not 0 or 1\n", random_datain_pdu_offsets); return (-22); } else { } a->random_datain_pdu_offsets = random_datain_pdu_offsets; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_na_random_datain_pdu_offsets"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nodeattrib.c"; descriptor.format = "Set Random DataIN PDU Offsets to %u for Initiator Node %s\n"; descriptor.lineno = 198U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = iscsit_na_get_initiatorname(acl); __dynamic_pr_debug(& descriptor, "Set Random DataIN PDU Offsets to %u for Initiator Node %s\n", a->random_datain_pdu_offsets, tmp); } else { } return (0); } } int iscsit_na_random_datain_seq_offsets(struct iscsi_node_acl *acl , u32 random_datain_seq_offsets ) { struct iscsi_node_attrib *a ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; { a = & acl->node_attrib; if (random_datain_seq_offsets != 0U && random_datain_seq_offsets != 1U) { printk("\vRequested Random DataIN Sequence Offsets: %u not 0 or 1\n", random_datain_seq_offsets); return (-22); } else { } a->random_datain_seq_offsets = random_datain_seq_offsets; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_na_random_datain_seq_offsets"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nodeattrib.c"; descriptor.format = "Set Random DataIN Sequence Offsets to %u for Initiator Node %s\n"; descriptor.lineno = 218U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = iscsit_na_get_initiatorname(acl); __dynamic_pr_debug(& descriptor, "Set Random DataIN Sequence Offsets to %u for Initiator Node %s\n", a->random_datain_seq_offsets, tmp); } else { } return (0); } } int iscsit_na_random_r2t_offsets(struct iscsi_node_acl *acl , u32 random_r2t_offsets ) { struct iscsi_node_attrib *a ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; { a = & acl->node_attrib; if (random_r2t_offsets != 0U && random_r2t_offsets != 1U) { printk("\vRequested Random R2T Offsets: %u not 0 or 1\n", random_r2t_offsets); return (-22); } else { } a->random_r2t_offsets = random_r2t_offsets; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_na_random_r2t_offsets"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nodeattrib.c"; descriptor.format = "Set Random R2T Offsets to %u for Initiator Node %s\n"; descriptor.lineno = 238U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = iscsit_na_get_initiatorname(acl); __dynamic_pr_debug(& descriptor, "Set Random R2T Offsets to %u for Initiator Node %s\n", a->random_r2t_offsets, tmp); } else { } return (0); } } int iscsit_na_default_erl(struct iscsi_node_acl *acl , u32 default_erl ) { struct iscsi_node_attrib *a ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; { a = & acl->node_attrib; if ((default_erl != 0U && default_erl != 1U) && default_erl != 2U) { printk("\vRequested default ERL: %u not 0, 1, or 2\n", default_erl); return (-22); } else { } a->default_erl = default_erl; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_na_default_erl"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_nodeattrib.c"; descriptor.format = "Set use ERL0 flag to %u for Initiator Node %s\n"; descriptor.lineno = 258U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = iscsit_na_get_initiatorname(acl); __dynamic_pr_debug(& descriptor, "Set use ERL0 flag to %u for Initiator Node %s\n", a->default_erl, tmp); } else { } return (0); } } bool ldv_queue_work_on_325(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_326(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_327(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_328(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_329(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_330(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_331(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_332(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_333(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_334(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_335(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_336(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; int ldv_mutex_trylock_361(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_359(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_362(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_363(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_358(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_360(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_364(struct mutex *ldv_func_arg1 ) ; bool ldv_queue_work_on_353(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_355(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_354(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_357(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_356(struct workqueue_struct *ldv_func_arg1 ) ; extern u64 scsilun_to_int(struct scsi_lun * ) ; __inline static int iscsi_sna_lte(u32 n1 , u32 n2 ) { { return ((int )(n1 - n2) <= 0); } } int iscsit_tmr_post_handler(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) ; u8 iscsit_tmr_abort_task(struct iscsi_cmd *cmd , unsigned char *buf ) ; int iscsit_tmr_task_warm_reset(struct iscsi_conn *conn , struct iscsi_tmr_req *tmr_req , unsigned char *buf ) ; int iscsit_tmr_task_cold_reset(struct iscsi_conn *conn , struct iscsi_tmr_req *tmr_req , unsigned char *buf ) ; u8 iscsit_tmr_task_reassign(struct iscsi_cmd *cmd , unsigned char *buf ) ; int iscsit_check_task_reassign_expdatasn(struct iscsi_tmr_req *tmr_req , struct iscsi_conn *conn ) ; void iscsit_free_r2t(struct iscsi_r2t *r2t , struct iscsi_cmd *cmd ) ; int iscsit_find_cmd_for_recovery(struct iscsi_session *sess , struct iscsi_cmd **cmd_ptr , struct iscsi_conn_recovery **cr_ptr , itt_t init_task_tag ) ; u8 iscsit_tmr_abort_task(struct iscsi_cmd *cmd , unsigned char *buf ) { struct iscsi_cmd *ref_cmd ; struct iscsi_conn *conn ; struct iscsi_tmr_req *tmr_req ; struct se_tmr_req *se_tmr ; struct iscsi_tm *hdr ; __u32 tmp ; int tmp___0 ; __u32 tmp___1 ; int tmp___2 ; int tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; { conn = cmd->conn; tmr_req = cmd->tmr_req; se_tmr = cmd->se_cmd.se_tmr_req; hdr = (struct iscsi_tm *)buf; ref_cmd = iscsit_find_cmd_from_itt(conn, hdr->rtt); if ((unsigned long )ref_cmd == (unsigned long )((struct iscsi_cmd *)0)) { printk("\vUnable to locate RefTaskTag: 0x%08x on CID: %hu.\n", hdr->rtt, (int )conn->cid); tmp = __fswab32(hdr->refcmdsn); tmp___0 = iscsi_sna_gte(tmp, (conn->sess)->exp_cmd_sn); if (tmp___0 == 0) { tmp___3 = 1; } else { tmp___1 = __fswab32(hdr->refcmdsn); tmp___2 = iscsi_sna_lte(tmp___1, (conn->sess)->max_cmd_sn); if (tmp___2 == 0) { tmp___3 = 1; } else { tmp___3 = 0; } } return ((u8 )tmp___3); } else { } tmp___4 = __fswab32(hdr->refcmdsn); if (ref_cmd->cmd_sn != tmp___4) { printk("\vRefCmdSN 0x%08x does not equal task\'s CmdSN 0x%08x. Rejecting ABORT_TASK.\n", hdr->refcmdsn, ref_cmd->cmd_sn); return (255U); } else { } se_tmr->ref_task_tag = (u64 )hdr->rtt; tmr_req->ref_cmd = ref_cmd; tmp___5 = __fswab32(hdr->exp_datasn); tmr_req->exp_data_sn = tmp___5; return (0U); } } int iscsit_tmr_task_warm_reset(struct iscsi_conn *conn , struct iscsi_tmr_req *tmr_req , unsigned char *buf ) { struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct iscsi_node_attrib *tmp ; { sess = conn->sess; tmp = iscsit_tpg_get_node_attrib(sess); na = tmp; if (na->tmr_warm_reset == 0U) { printk("\vTMR Opcode TARGET_WARM_RESET authorization failed for Initiator Node: %s\n", (char *)(& ((sess->se_sess)->se_node_acl)->initiatorname)); return (-1); } else { } return (0); } } int iscsit_tmr_task_cold_reset(struct iscsi_conn *conn , struct iscsi_tmr_req *tmr_req , unsigned char *buf ) { struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct iscsi_node_attrib *tmp ; { sess = conn->sess; tmp = iscsit_tpg_get_node_attrib(sess); na = tmp; if (na->tmr_cold_reset == 0U) { printk("\vTMR Opcode TARGET_COLD_RESET authorization failed for Initiator Node: %s\n", (char *)(& ((sess->se_sess)->se_node_acl)->initiatorname)); return (-1); } else { } return (0); } } u8 iscsit_tmr_task_reassign(struct iscsi_cmd *cmd , unsigned char *buf ) { struct iscsi_cmd *ref_cmd ; struct iscsi_conn *conn ; struct iscsi_conn_recovery *cr ; struct iscsi_tmr_req *tmr_req ; struct se_tmr_req *se_tmr ; struct iscsi_tm *hdr ; u64 ret ; u64 ref_lun ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; __u32 tmp___1 ; { ref_cmd = (struct iscsi_cmd *)0; conn = cmd->conn; cr = (struct iscsi_conn_recovery *)0; tmr_req = cmd->tmr_req; se_tmr = cmd->se_cmd.se_tmr_req; hdr = (struct iscsi_tm *)buf; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_tmr_task_reassign"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tmr.c"; descriptor.format = "Got TASK_REASSIGN TMR ITT: 0x%08x, RefTaskTag: 0x%08x, ExpDataSN: 0x%08x, CID: %hu\n"; descriptor.lineno = 127U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Got TASK_REASSIGN TMR ITT: 0x%08x, RefTaskTag: 0x%08x, ExpDataSN: 0x%08x, CID: %hu\n", hdr->itt, hdr->rtt, hdr->exp_datasn, (int )conn->cid); } else { } if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel != 2U) { printk("\vTMR TASK_REASSIGN not supported in ERL<2, ignoring request.\n"); return (5U); } else { } tmp___0 = iscsit_find_cmd_for_recovery(conn->sess, & ref_cmd, & cr, hdr->rtt); ret = (u64 )tmp___0; if (ret == 0xfffffffffffffffeULL) { printk("\vCommand ITT: 0x%08x is still alligent to CID: %hu\n", ref_cmd->init_task_tag, (int )cr->cid); return (3U); } else if (ret == 0xffffffffffffffffULL) { printk("\vUnable to locate RefTaskTag: 0x%08x in connection recovery command list.\n", hdr->rtt); return (1U); } else { } if (cr->maxrecvdatasegmentlength != (conn->conn_ops)->MaxRecvDataSegmentLength) { printk("\vUnable to perform connection recovery for differing MaxRecvDataSegmentLength, rejecting TMR TASK_REASSIGN.\n"); return (255U); } else { } if (cr->maxxmitdatasegmentlength != (conn->conn_ops)->MaxXmitDataSegmentLength) { printk("\vUnable to perform connection recovery for differing MaxXmitDataSegmentLength, rejecting TMR TASK_REASSIGN.\n"); return (255U); } else { } ref_lun = scsilun_to_int(& hdr->lun); if (ref_cmd->se_cmd.orig_fe_lun != ref_lun) { printk("\vUnable to perform connection recovery for differing ref_lun: %llu ref_cmd orig_fe_lun: %llu\n", ref_lun, ref_cmd->se_cmd.orig_fe_lun); return (255U); } else { } se_tmr->ref_task_tag = (u64 )hdr->rtt; tmr_req->ref_cmd = ref_cmd; tmp___1 = __fswab32(hdr->exp_datasn); tmr_req->exp_data_sn = tmp___1; tmr_req->conn_recovery = cr; tmr_req->task_reassign = 1; return (0U); } } static void iscsit_task_reassign_remove_cmd(struct iscsi_cmd *cmd , struct iscsi_conn_recovery *cr , struct iscsi_session *sess ) { int ret ; struct _ddebug descriptor ; long tmp ; { spin_lock(& cr->conn_recovery_cmd_lock); ret = iscsit_remove_cmd_from_connection_recovery(cmd, sess); spin_unlock(& cr->conn_recovery_cmd_lock); if (ret == 0) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_task_reassign_remove_cmd"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tmr.c"; descriptor.format = "iSCSI connection recovery successful for CID: %hu on SID: %u\n"; descriptor.lineno = 197U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI connection recovery successful for CID: %hu on SID: %u\n", (int )cr->cid, sess->sid); } else { } iscsit_remove_active_connection_recovery_entry(cr, sess); } else { } return; } } static int iscsit_task_reassign_complete_nop_out(struct iscsi_tmr_req *tmr_req , struct iscsi_conn *conn ) { struct iscsi_cmd *cmd ; struct iscsi_conn_recovery *cr ; u32 tmp ; { cmd = tmr_req->ref_cmd; if ((unsigned long )cmd->cr == (unsigned long )((struct iscsi_conn_recovery *)0)) { printk("\vstruct iscsi_conn_recovery pointer for ITT: 0x%08x is NULL!\n", cmd->init_task_tag); return (-1); } else { } cr = cmd->cr; tmp = 0U; cmd->exp_stat_sn = tmp; cmd->stat_sn = tmp; iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess); spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); cmd->i_state = 17; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } } static int iscsit_task_reassign_complete_write(struct iscsi_cmd *cmd , struct iscsi_tmr_req *tmr_req ) { int no_build_r2ts ; u32 length ; u32 offset ; struct iscsi_conn *conn ; struct se_cmd *se_cmd ; struct _ddebug descriptor ; long tmp ; u32 tmp___0 ; int tmp___1 ; int tmp___2 ; { no_build_r2ts = 0; length = 0U; offset = 0U; conn = cmd->conn; se_cmd = & cmd->se_cmd; if (tmr_req->exp_data_sn == 0U) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags & 4294967293U); cmd->acked_data_sn = 0U; } else { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 2U); cmd->acked_data_sn = tmr_req->exp_data_sn - 1U; } if ((int )cmd->cmd_flags & 1) { if ((cmd->se_cmd.transport_state & 16U) == 0U) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_task_reassign_complete_write"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tmr.c"; descriptor.format = "WRITE ITT: 0x%08x: t_state: %d never sent to transport\n"; descriptor.lineno = 263U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "WRITE ITT: 0x%08x: t_state: %d never sent to transport\n", cmd->init_task_tag, (unsigned int )cmd->se_cmd.t_state); } else { } target_execute_cmd(se_cmd); return (0); } else { } cmd->i_state = 29; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } else { } if ((unsigned int )cmd->unsolicited_data != 0U) { cmd->unsolicited_data = 0U; tmp___0 = cmd->write_data_done; cmd->next_burst_len = tmp___0; offset = tmp___0; if (((conn->sess)->sess_ops)->FirstBurstLength - offset >= cmd->se_cmd.data_length) { no_build_r2ts = 1; length = cmd->se_cmd.data_length - offset; } else { length = ((conn->sess)->sess_ops)->FirstBurstLength - offset; } spin_lock_bh(& cmd->r2t_lock); tmp___1 = iscsit_add_r2t_to_list(cmd, offset, length, 0, 0U); if (tmp___1 < 0) { spin_unlock_bh(& cmd->r2t_lock); return (-1); } else { } cmd->outstanding_r2ts = cmd->outstanding_r2ts + 1U; spin_unlock_bh(& cmd->r2t_lock); if (no_build_r2ts != 0) { return (0); } else { } } else { } tmp___2 = (*((conn->conn_transport)->iscsit_get_dataout))(conn, cmd, 1); return (tmp___2); } } static int iscsit_task_reassign_complete_read(struct iscsi_cmd *cmd , struct iscsi_tmr_req *tmr_req ) { struct iscsi_conn *conn ; struct iscsi_datain_req *dr ; struct se_cmd *se_cmd ; struct _ddebug descriptor ; long tmp ; u32 tmp___0 ; { conn = cmd->conn; se_cmd = & cmd->se_cmd; if (tmr_req->exp_data_sn == 0U) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags & 4294967293U); cmd->acked_data_sn = 0U; } else { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 2U); cmd->acked_data_sn = tmr_req->exp_data_sn - 1U; } if ((cmd->se_cmd.transport_state & 16U) == 0U) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_task_reassign_complete_read"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tmr.c"; descriptor.format = "READ ITT: 0x%08x: t_state: %d never sent to transport\n"; descriptor.lineno = 328U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "READ ITT: 0x%08x: t_state: %d never sent to transport\n", cmd->init_task_tag, (unsigned int )cmd->se_cmd.t_state); } else { } transport_handle_cdb_direct(se_cmd); return (0); } else { } if ((se_cmd->transport_state & 4U) == 0U) { printk("\vREAD ITT: 0x%08x: t_state: %d, never returned from transport\n", cmd->init_task_tag, (unsigned int )cmd->se_cmd.t_state); return (-1); } else { } dr = iscsit_allocate_datain_req(); if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { return (-1); } else { } tmp___0 = tmr_req->exp_data_sn; dr->begrun = tmp___0; dr->data_sn = tmp___0; dr->runlength = 0U; dr->generate_recovery_values = 1; dr->recovery = 2; iscsit_attach_datain_req(cmd, dr); cmd->i_state = 12; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } } static int iscsit_task_reassign_complete_none(struct iscsi_cmd *cmd , struct iscsi_tmr_req *tmr_req ) { struct iscsi_conn *conn ; { conn = cmd->conn; cmd->i_state = 29; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } } static int iscsit_task_reassign_complete_scsi_cmnd(struct iscsi_tmr_req *tmr_req , struct iscsi_conn *conn ) { struct iscsi_cmd *cmd ; struct iscsi_conn_recovery *cr ; u32 tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { cmd = tmr_req->ref_cmd; if ((unsigned long )cmd->cr == (unsigned long )((struct iscsi_conn_recovery *)0)) { printk("\vstruct iscsi_conn_recovery pointer for ITT: 0x%08x is NULL!\n", cmd->init_task_tag); return (-1); } else { } cr = cmd->cr; tmp = 0U; cmd->exp_stat_sn = tmp; cmd->stat_sn = tmp; iscsit_task_reassign_remove_cmd(cmd, cr, conn->sess); spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); if ((cmd->se_cmd.se_cmd_flags & 2048U) != 0U) { cmd->i_state = 29; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } else { } switch ((unsigned int )cmd->data_direction) { case 1U: tmp___0 = iscsit_task_reassign_complete_write(cmd, tmr_req); return (tmp___0); case 2U: tmp___1 = iscsit_task_reassign_complete_read(cmd, tmr_req); return (tmp___1); case 3U: tmp___2 = iscsit_task_reassign_complete_none(cmd, tmr_req); return (tmp___2); default: printk("\vUnknown cmd->data_direction: 0x%02x\n", (unsigned int )cmd->data_direction); return (-1); } return (0); } } static int iscsit_task_reassign_complete(struct iscsi_tmr_req *tmr_req , struct iscsi_conn *conn ) { struct iscsi_cmd *cmd ; int ret ; struct _ddebug descriptor ; long tmp ; { ret = 0; if ((unsigned long )tmr_req->ref_cmd == (unsigned long )((struct iscsi_cmd *)0)) { printk("\vTMR Request is missing a RefCmd struct iscsi_cmd.\n"); return (-1); } else { } cmd = tmr_req->ref_cmd; cmd->conn = conn; switch ((int )cmd->iscsi_opcode) { case 0: ret = iscsit_task_reassign_complete_nop_out(tmr_req, conn); goto ldv_59029; case 1: ret = iscsit_task_reassign_complete_scsi_cmnd(tmr_req, conn); goto ldv_59029; default: printk("\vIllegal iSCSI Opcode 0x%02x during command realligence\n", (int )cmd->iscsi_opcode); return (-1); } ldv_59029: ; if (ret != 0) { return (ret); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_task_reassign_complete"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tmr.c"; descriptor.format = "Completed connection realligence for Opcode: 0x%02x, ITT: 0x%08x to CID: %hu.\n"; descriptor.lineno = 452U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Completed connection realligence for Opcode: 0x%02x, ITT: 0x%08x to CID: %hu.\n", (int )cmd->iscsi_opcode, cmd->init_task_tag, (int )conn->cid); } else { } return (0); } } int iscsit_tmr_post_handler(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_tmr_req *tmr_req ; struct se_tmr_req *se_tmr ; int tmp ; { tmr_req = cmd->tmr_req; se_tmr = cmd->se_cmd.se_tmr_req; if ((int )tmr_req->task_reassign && (unsigned int )se_tmr->response == 0U) { tmp = iscsit_task_reassign_complete(tmr_req, conn); return (tmp); } else { } return (0); } } static char const __kstrtab_iscsit_tmr_post_handler[24U] = { 'i', 's', 'c', 's', 'i', 't', '_', 't', 'm', 'r', '_', 'p', 'o', 's', 't', '_', 'h', 'a', 'n', 'd', 'l', 'e', 'r', '\000'}; struct kernel_symbol const __ksymtab_iscsit_tmr_post_handler ; struct kernel_symbol const __ksymtab_iscsit_tmr_post_handler = {(unsigned long )(& iscsit_tmr_post_handler), (char const *)(& __kstrtab_iscsit_tmr_post_handler)}; static int iscsit_task_reassign_prepare_read(struct iscsi_tmr_req *tmr_req , struct iscsi_conn *conn ) { { return (0); } } static void iscsit_task_reassign_prepare_unsolicited_dataout(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { int i ; int j ; struct iscsi_pdu *pdu ; struct iscsi_seq *seq ; { pdu = (struct iscsi_pdu *)0; seq = (struct iscsi_seq *)0; if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { cmd->data_sn = 0U; if ((unsigned int )cmd->immediate_data != 0U) { cmd->r2t_offset = cmd->r2t_offset + (cmd->first_burst_len - cmd->seq_start_offset); } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { cmd->write_data_done = cmd->write_data_done - ((unsigned int )cmd->immediate_data != 0U ? cmd->first_burst_len - cmd->seq_start_offset : cmd->first_burst_len); cmd->first_burst_len = 0U; return; } else { } i = 0; goto ldv_59062; ldv_59061: pdu = cmd->pdu_list + (unsigned long )i; if (pdu->status != 1) { goto ldv_59060; } else { } if (pdu->offset >= cmd->seq_start_offset && pdu->offset + pdu->length <= cmd->seq_end_offset) { cmd->first_burst_len = cmd->first_burst_len - pdu->length; cmd->write_data_done = cmd->write_data_done - pdu->length; pdu->status = 0; } else { } ldv_59060: i = i + 1; ldv_59062: ; if ((u32 )i < cmd->pdu_count) { goto ldv_59061; } else { } } else { i = 0; goto ldv_59070; ldv_59069: seq = cmd->seq_list + (unsigned long )i; if (seq->type != 2) { goto ldv_59064; } else { } cmd->write_data_done = cmd->write_data_done + (seq->orig_offset - seq->offset); cmd->first_burst_len = 0U; seq->data_sn = 0U; seq->offset = seq->orig_offset; seq->next_burst_len = 0U; seq->status = 2; if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { goto ldv_59064; } else { } j = 0; goto ldv_59067; ldv_59066: pdu = cmd->pdu_list + (unsigned long )(seq->pdu_start + (u32 )j); if (pdu->status != 1) { goto ldv_59065; } else { } pdu->status = 0; ldv_59065: j = j + 1; ldv_59067: ; if ((u32 )j < seq->pdu_count) { goto ldv_59066; } else { } ldv_59064: i = i + 1; ldv_59070: ; if ((u32 )i < cmd->seq_count) { goto ldv_59069; } else { } } return; } } static int iscsit_task_reassign_prepare_write(struct iscsi_tmr_req *tmr_req , struct iscsi_conn *conn ) { struct iscsi_cmd *cmd ; struct iscsi_pdu *pdu ; struct iscsi_r2t *r2t ; struct iscsi_r2t *r2t_tmp ; int first_incomplete_r2t ; int i ; int tmp ; struct list_head const *__mptr ; struct iscsi_seq *seq ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; { cmd = tmr_req->ref_cmd; pdu = (struct iscsi_pdu *)0; r2t = (struct iscsi_r2t *)0; first_incomplete_r2t = 1; i = 0; if ((unsigned int )cmd->unsolicited_data != 0U) { iscsit_task_reassign_prepare_unsolicited_dataout(cmd, conn); } else { } if (tmr_req->exp_data_sn == 0U) { goto drop_unacknowledged_r2ts; } else { } spin_lock_bh(& cmd->r2t_lock); tmp = list_empty((struct list_head const *)(& cmd->cmd_r2t_list)); if (tmp != 0) { spin_unlock_bh(& cmd->r2t_lock); return (-1); } else { } __mptr = (struct list_head const *)cmd->cmd_r2t_list.next; r2t = (struct iscsi_r2t *)__mptr + 0xffffffffffffffe0UL; goto ldv_59099; ldv_59098: ; if (r2t->r2t_sn >= tmr_req->exp_data_sn) { goto ldv_59087; } else { } if (r2t->seq_complete != 0) { goto ldv_59087; } else { } if (r2t->recovery_r2t != 0) { goto ldv_59087; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { if (first_incomplete_r2t == 0) { cmd->r2t_offset = cmd->r2t_offset - r2t->xfer_len; goto next; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { cmd->data_sn = 0U; cmd->r2t_offset = cmd->r2t_offset + (cmd->next_burst_len - r2t->xfer_len); first_incomplete_r2t = 0; goto next; } else { } cmd->data_sn = 0U; cmd->r2t_offset = cmd->r2t_offset - r2t->xfer_len; i = 0; goto ldv_59091; ldv_59090: pdu = cmd->pdu_list + (unsigned long )i; if (pdu->status != 1) { goto ldv_59089; } else { } if (pdu->offset >= r2t->offset && pdu->offset < r2t->offset + r2t->xfer_len) { cmd->next_burst_len = cmd->next_burst_len - pdu->length; cmd->write_data_done = cmd->write_data_done - pdu->length; pdu->status = 0; } else { } ldv_59089: i = i + 1; ldv_59091: ; if ((u32 )i < cmd->pdu_count) { goto ldv_59090; } else { } first_incomplete_r2t = 0; } else { seq = iscsit_get_seq_holder(cmd, r2t->offset, r2t->xfer_len); if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { spin_unlock_bh(& cmd->r2t_lock); return (-1); } else { } cmd->write_data_done = cmd->write_data_done + (seq->orig_offset - seq->offset); seq->data_sn = 0U; seq->offset = seq->orig_offset; seq->next_burst_len = 0U; seq->status = 2; cmd->seq_send_order = cmd->seq_send_order - 1U; if ((unsigned int )((conn->sess)->sess_ops)->DataPDUInOrder != 0U) { goto next; } else { } i = 0; goto ldv_59096; ldv_59095: pdu = cmd->pdu_list + (unsigned long )(seq->pdu_start + (u32 )i); if (pdu->status != 1) { goto ldv_59094; } else { } pdu->status = 0; ldv_59094: i = i + 1; ldv_59096: ; if ((u32 )i < seq->pdu_count) { goto ldv_59095; } else { } } next: cmd->outstanding_r2ts = cmd->outstanding_r2ts - 1U; ldv_59087: __mptr___0 = (struct list_head const *)r2t->r2t_list.next; r2t = (struct iscsi_r2t *)__mptr___0 + 0xffffffffffffffe0UL; ldv_59099: ; if ((unsigned long )(& r2t->r2t_list) != (unsigned long )(& cmd->cmd_r2t_list)) { goto ldv_59098; } else { } spin_unlock_bh(& cmd->r2t_lock); drop_unacknowledged_r2ts: cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags & 4294967287U); cmd->r2t_sn = tmr_req->exp_data_sn; spin_lock_bh(& cmd->r2t_lock); __mptr___1 = (struct list_head const *)cmd->cmd_r2t_list.next; r2t = (struct iscsi_r2t *)__mptr___1 + 0xffffffffffffffe0UL; __mptr___2 = (struct list_head const *)r2t->r2t_list.next; r2t_tmp = (struct iscsi_r2t *)__mptr___2 + 0xffffffffffffffe0UL; goto ldv_59109; ldv_59108: ; if (r2t->r2t_sn < tmr_req->exp_data_sn) { goto ldv_59107; } else { } if (r2t->seq_complete != 0) { printk("\vInitiator is requesting R2Ts from R2TSN: 0x%08x, but R2TSN: 0x%08x, Offset: %u, Length: %u is already complete. BAD INITIATOR ERL=2 IMPLEMENTATION!\n", tmr_req->exp_data_sn, r2t->r2t_sn, r2t->offset, r2t->xfer_len); spin_unlock_bh(& cmd->r2t_lock); return (-1); } else { } if (r2t->recovery_r2t != 0) { iscsit_free_r2t(r2t, cmd); goto ldv_59107; } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { cmd->r2t_offset = cmd->r2t_offset - r2t->xfer_len; } else { cmd->seq_send_order = cmd->seq_send_order - 1U; } cmd->outstanding_r2ts = cmd->outstanding_r2ts - 1U; iscsit_free_r2t(r2t, cmd); ldv_59107: r2t = r2t_tmp; __mptr___3 = (struct list_head const *)r2t_tmp->r2t_list.next; r2t_tmp = (struct iscsi_r2t *)__mptr___3 + 0xffffffffffffffe0UL; ldv_59109: ; if ((unsigned long )(& r2t->r2t_list) != (unsigned long )(& cmd->cmd_r2t_list)) { goto ldv_59108; } else { } spin_unlock_bh(& cmd->r2t_lock); return (0); } } int iscsit_check_task_reassign_expdatasn(struct iscsi_tmr_req *tmr_req , struct iscsi_conn *conn ) { struct iscsi_cmd *ref_cmd ; int tmp ; int tmp___0 ; { ref_cmd = tmr_req->ref_cmd; if ((unsigned int )ref_cmd->iscsi_opcode != 1U) { return (0); } else { } if ((ref_cmd->se_cmd.se_cmd_flags & 2048U) != 0U) { return (0); } else { } if ((unsigned int )ref_cmd->data_direction == 3U) { return (0); } else { } if ((unsigned int )ref_cmd->data_direction == 2U) { if (tmr_req->exp_data_sn > ref_cmd->data_sn) { printk("\vReceived ExpDataSN: 0x%08x for READ in TMR TASK_REASSIGN greater than command\'s DataSN: 0x%08x.\n", tmr_req->exp_data_sn, ref_cmd->data_sn); return (-1); } else { } if (((unsigned int )ref_cmd->cmd_flags & 2U) != 0U && tmr_req->exp_data_sn <= ref_cmd->acked_data_sn) { printk("\vReceived ExpDataSN: 0x%08x for READ in TMR TASK_REASSIGN for previously acknowledged DataIN: 0x%08x, protocol error\n", tmr_req->exp_data_sn, ref_cmd->acked_data_sn); return (-1); } else { } tmp = iscsit_task_reassign_prepare_read(tmr_req, conn); return (tmp); } else { } if ((unsigned int )ref_cmd->data_direction == 1U) { if (tmr_req->exp_data_sn > ref_cmd->r2t_sn) { printk("\vReceived ExpDataSN: 0x%08x for WRITE in TMR TASK_REASSIGN greater than command\'s R2TSN: 0x%08x.\n", tmr_req->exp_data_sn, ref_cmd->r2t_sn); return (-1); } else { } tmp___0 = iscsit_task_reassign_prepare_write(tmr_req, conn); return (tmp___0); } else { } printk("\vUnknown iSCSI data_direction: 0x%02x\n", (unsigned int )ref_cmd->data_direction); return (-1); } } bool ldv_queue_work_on_353(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_354(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_355(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_356(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_357(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_358(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_359(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_360(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_361(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_362(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_363(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_364(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; void *ldv_err_ptr(long error ) ; extern char *strncat(char * , char const * , __kernel_size_t ) ; __inline static void *ERR_PTR(long error ) ; __inline static bool IS_ERR(void const *ptr ) ; __inline static void *ERR_CAST(void const *ptr ) { { return ((void *)ptr); } } extern void __xadd_wrong_size(void) ; __inline static int atomic_add_return(int i , atomic_t *v ) { int __ret ; { __ret = i; switch (4UL) { case 1UL: __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; xaddb %b0, %1\n": "+q" (__ret), "+m" (v->counter): : "memory", "cc"); goto ldv_5596; case 2UL: __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; xaddw %w0, %1\n": "+r" (__ret), "+m" (v->counter): : "memory", "cc"); goto ldv_5596; case 4UL: __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; xaddl %0, %1\n": "+r" (__ret), "+m" (v->counter): : "memory", "cc"); goto ldv_5596; case 8UL: __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; xaddq %q0, %1\n": "+r" (__ret), "+m" (v->counter): : "memory", "cc"); goto ldv_5596; default: __xadd_wrong_size(); } ldv_5596: ; return (__ret + i); } } int ldv_mutex_trylock_389(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_387(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_390(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_391(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_394(struct mutex *ldv_func_arg1 ) ; extern int mutex_lock_interruptible(struct mutex * ) ; int ldv_mutex_lock_interruptible_393(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_386(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_388(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_392(struct mutex *ldv_func_arg1 ) ; int ldv_mutex_lock_interruptible_tpg_access_lock_of_iscsi_portal_group(struct mutex *lock ) ; void ldv_mutex_unlock_tpg_access_lock_of_iscsi_portal_group(struct mutex *lock ) ; bool ldv_queue_work_on_381(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_383(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_382(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_385(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_384(struct workqueue_struct *ldv_func_arg1 ) ; __inline static void kref_init(struct kref *kref ) { { atomic_set(& kref->refcount, 1); return; } } __inline static void kref_get(struct kref *kref ) { bool __warned ; int __ret_warn_once ; int tmp ; int __ret_warn_on ; long tmp___0 ; long tmp___1 ; long tmp___2 ; { tmp = atomic_add_return(1, & kref->refcount); __ret_warn_once = tmp <= 1; tmp___2 = ldv__builtin_expect(__ret_warn_once != 0, 0L); if (tmp___2 != 0L) { __ret_warn_on = ! __warned; tmp___0 = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp___0 != 0L) { warn_slowpath_null("include/linux/kref.h", 47); } else { } tmp___1 = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp___1 != 0L) { __warned = 1; } else { } } else { } ldv__builtin_expect(__ret_warn_once != 0, 0L); return; } } __inline static void sema_init(struct semaphore *sem , int val ) { struct lock_class_key __key ; struct semaphore __constr_expr_0 ; { __constr_expr_0.lock.raw_lock.val.counter = 0; __constr_expr_0.lock.magic = 3735899821U; __constr_expr_0.lock.owner_cpu = 4294967295U; __constr_expr_0.lock.owner = (void *)-1; __constr_expr_0.lock.dep_map.key = 0; __constr_expr_0.lock.dep_map.class_cache[0] = 0; __constr_expr_0.lock.dep_map.class_cache[1] = 0; __constr_expr_0.lock.dep_map.name = "(*sem).lock"; __constr_expr_0.lock.dep_map.cpu = 0; __constr_expr_0.lock.dep_map.ip = 0UL; __constr_expr_0.count = (unsigned int )val; __constr_expr_0.wait_list.next = & sem->wait_list; __constr_expr_0.wait_list.prev = & sem->wait_list; *sem = __constr_expr_0; lockdep_init_map(& sem->lock.dep_map, "semaphore->lock", & __key, 0); return; } } extern int core_tpg_set_initiator_node_queue_depth(struct se_portal_group * , unsigned char * , u32 , int ) ; extern int core_tpg_register(struct se_wwn * , struct se_portal_group * , int ) ; extern int core_tpg_deregister(struct se_portal_group * ) ; struct iscsi_portal_group *iscsit_alloc_portal_group(struct iscsi_tiqn *tiqn , u16 tpgt ) ; int iscsit_load_discovery_tpg(void) ; void iscsit_release_discovery_tpg(void) ; int iscsit_get_tpg(struct iscsi_portal_group *tpg ) ; void iscsit_put_tpg(struct iscsi_portal_group *tpg ) ; void iscsit_tpg_dump_params(struct iscsi_portal_group *tpg ) ; int iscsit_tpg_add_portal_group(struct iscsi_tiqn *tiqn , struct iscsi_portal_group *tpg ) ; int iscsit_tpg_del_portal_group(struct iscsi_tiqn *tiqn , struct iscsi_portal_group *tpg , int force ) ; int iscsit_tpg_enable_portal_group(struct iscsi_portal_group *tpg ) ; int iscsit_tpg_disable_portal_group(struct iscsi_portal_group *tpg , int force ) ; struct iscsi_tpg_np *iscsit_tpg_locate_child_np(struct iscsi_tpg_np *tpg_np , int network_transport ) ; struct iscsi_tpg_np *iscsit_tpg_add_network_portal(struct iscsi_portal_group *tpg , struct __kernel_sockaddr_storage *sockaddr , char *ip_str , struct iscsi_tpg_np *tpg_np_parent , int network_transport ) ; int iscsit_tpg_del_network_portal(struct iscsi_portal_group *tpg , struct iscsi_tpg_np *tpg_np ) ; int iscsit_tpg_set_initiator_node_queue_depth(struct iscsi_portal_group *tpg , unsigned char *initiatorname , u32 queue_depth , int force ) ; int iscsit_ta_authentication(struct iscsi_portal_group *tpg , u32 authentication ) ; int iscsit_ta_login_timeout(struct iscsi_portal_group *tpg , u32 login_timeout ) ; int iscsit_ta_netif_timeout(struct iscsi_portal_group *tpg , u32 netif_timeout ) ; int iscsit_ta_generate_node_acls(struct iscsi_portal_group *tpg , u32 flag ) ; int iscsit_ta_default_cmdsn_depth(struct iscsi_portal_group *tpg , u32 tcq_depth ) ; int iscsit_ta_cache_dynamic_acls(struct iscsi_portal_group *tpg , u32 flag ) ; int iscsit_ta_demo_mode_write_protect(struct iscsi_portal_group *tpg , u32 flag ) ; int iscsit_ta_prod_mode_write_protect(struct iscsi_portal_group *tpg , u32 flag ) ; int iscsit_ta_demo_mode_discovery(struct iscsi_portal_group *tpg , u32 flag ) ; int iscsit_ta_default_erl(struct iscsi_portal_group *tpg , u32 default_erl ) ; int iscsit_ta_t10_pi(struct iscsi_portal_group *tpg , u32 flag ) ; int iscsit_ta_fabric_prot_type(struct iscsi_portal_group *tpg , u32 prot_type ) ; bool iscsit_check_np_match(struct __kernel_sockaddr_storage *sockaddr , struct iscsi_np *np , int network_transport ) ; struct iscsi_np *iscsit_add_np(struct __kernel_sockaddr_storage *sockaddr , char *ip_str , int network_transport ) ; int iscsit_reset_np_thread(struct iscsi_np *np , struct iscsi_tpg_np *tpg_np , struct iscsi_portal_group *tpg , bool shutdown ) ; int iscsit_del_np(struct iscsi_np *np ) ; int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg , int force ) ; struct target_core_fabric_ops const iscsi_ops ; struct iscsi_portal_group *iscsit_alloc_portal_group(struct iscsi_tiqn *tiqn , u16 tpgt ) { struct iscsi_portal_group *tpg ; void *tmp ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; { tmp = kzalloc(2944UL, 208U); tpg = (struct iscsi_portal_group *)tmp; if ((unsigned long )tpg == (unsigned long )((struct iscsi_portal_group *)0)) { printk("\vUnable to allocate struct iscsi_portal_group\n"); return ((struct iscsi_portal_group *)0); } else { } tpg->tpgt = tpgt; tpg->tpg_state = 0; tpg->tpg_tiqn = tiqn; INIT_LIST_HEAD(& tpg->tpg_gnp_list); INIT_LIST_HEAD(& tpg->tpg_list); __mutex_init(& tpg->tpg_access_lock, "&tpg->tpg_access_lock", & __key); sema_init(& tpg->np_login_sem, 1); spinlock_check(& tpg->tpg_state_lock); __raw_spin_lock_init(& tpg->tpg_state_lock.__annonCompField17.rlock, "&(&tpg->tpg_state_lock)->rlock", & __key___0); spinlock_check(& tpg->tpg_np_lock); __raw_spin_lock_init(& tpg->tpg_np_lock.__annonCompField17.rlock, "&(&tpg->tpg_np_lock)->rlock", & __key___1); return (tpg); } } static void iscsit_set_default_tpg_attribs(struct iscsi_portal_group *tpg ) ; int iscsit_load_discovery_tpg(void) { struct iscsi_param *param ; struct iscsi_portal_group *tpg ; int ret ; int tmp ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; { tpg = iscsit_alloc_portal_group((struct iscsi_tiqn *)0, 1); if ((unsigned long )tpg == (unsigned long )((struct iscsi_portal_group *)0)) { printk("\vUnable to allocate struct iscsi_portal_group\n"); return (-1); } else { } tpg->tpg_se_tpg.se_tpg_tfo = & iscsi_ops; ret = core_tpg_register((struct se_wwn *)0, & tpg->tpg_se_tpg, -1); if (ret < 0) { kfree((void const *)tpg); return (-1); } else { } tpg->sid = 1U; iscsit_set_default_tpg_attribs(tpg); tmp = iscsi_create_default_params(& tpg->param_list); if (tmp < 0) { goto out; } else { } param = iscsi_find_param_from_key((char *)"AuthMethod", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { goto out; } else { } tmp___0 = iscsi_update_param_value(param, (char *)"CHAP,None"); if (tmp___0 < 0) { goto out; } else { } tpg->tpg_attrib.authentication = 0U; spin_lock(& tpg->tpg_state_lock); tpg->tpg_state = 1; spin_unlock(& tpg->tpg_state_lock); iscsit_global->discovery_tpg = tpg; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_load_discovery_tpg"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "CORE[0] - Allocated Discovery TPG\n"; descriptor.lineno = 105U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "CORE[0] - Allocated Discovery TPG\n"); } else { } return (0); out: ; if (tpg->sid == 1U) { core_tpg_deregister(& tpg->tpg_se_tpg); } else { } kfree((void const *)tpg); return (-1); } } void iscsit_release_discovery_tpg(void) { struct iscsi_portal_group *tpg ; { tpg = iscsit_global->discovery_tpg; if ((unsigned long )tpg == (unsigned long )((struct iscsi_portal_group *)0)) { return; } else { } core_tpg_deregister(& tpg->tpg_se_tpg); kfree((void const *)tpg); iscsit_global->discovery_tpg = (struct iscsi_portal_group *)0; return; } } struct iscsi_portal_group *iscsit_get_tpg_from_np(struct iscsi_tiqn *tiqn , struct iscsi_np *np , struct iscsi_tpg_np **tpg_np_out ) { struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; { tpg = (struct iscsi_portal_group *)0; spin_lock(& tiqn->tiqn_tpg_lock); __mptr = (struct list_head const *)tiqn->tiqn_tpg_list.next; tpg = (struct iscsi_portal_group *)__mptr + 0xfffffffffffff4c0UL; goto ldv_58921; ldv_58920: spin_lock(& tpg->tpg_state_lock); if ((unsigned int )tpg->tpg_state != 1U) { spin_unlock(& tpg->tpg_state_lock); goto ldv_58912; } else { } spin_unlock(& tpg->tpg_state_lock); spin_lock(& tpg->tpg_np_lock); __mptr___0 = (struct list_head const *)tpg->tpg_gnp_list.next; tpg_np = (struct iscsi_tpg_np *)__mptr___0 + 0xffffffffffffffe8UL; goto ldv_58918; ldv_58917: ; if ((unsigned long )tpg_np->tpg_np == (unsigned long )np) { *tpg_np_out = tpg_np; kref_get(& tpg_np->tpg_np_kref); spin_unlock(& tpg->tpg_np_lock); spin_unlock(& tiqn->tiqn_tpg_lock); return (tpg); } else { } __mptr___1 = (struct list_head const *)tpg_np->tpg_np_list.next; tpg_np = (struct iscsi_tpg_np *)__mptr___1 + 0xffffffffffffffe8UL; ldv_58918: ; if ((unsigned long )(& tpg_np->tpg_np_list) != (unsigned long )(& tpg->tpg_gnp_list)) { goto ldv_58917; } else { } spin_unlock(& tpg->tpg_np_lock); ldv_58912: __mptr___2 = (struct list_head const *)tpg->tpg_list.next; tpg = (struct iscsi_portal_group *)__mptr___2 + 0xfffffffffffff4c0UL; ldv_58921: ; if ((unsigned long )(& tpg->tpg_list) != (unsigned long )(& tiqn->tiqn_tpg_list)) { goto ldv_58920; } else { } spin_unlock(& tiqn->tiqn_tpg_lock); return ((struct iscsi_portal_group *)0); } } int iscsit_get_tpg(struct iscsi_portal_group *tpg ) { int tmp ; { tmp = ldv_mutex_lock_interruptible_393(& tpg->tpg_access_lock); return (tmp); } } void iscsit_put_tpg(struct iscsi_portal_group *tpg ) { { ldv_mutex_unlock_394(& tpg->tpg_access_lock); return; } } static void iscsit_clear_tpg_np_login_thread(struct iscsi_tpg_np *tpg_np , struct iscsi_portal_group *tpg , bool shutdown ) { { if ((unsigned long )tpg_np->tpg_np == (unsigned long )((struct iscsi_np *)0)) { printk("\vstruct iscsi_tpg_np->tpg_np is NULL!\n"); return; } else { } if ((int )shutdown) { (tpg_np->tpg_np)->enabled = 0; } else { } iscsit_reset_np_thread(tpg_np->tpg_np, tpg_np, tpg, (int )shutdown); return; } } static void iscsit_clear_tpg_np_login_threads(struct iscsi_portal_group *tpg , bool shutdown ) { struct iscsi_tpg_np *tpg_np ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock(& tpg->tpg_np_lock); __mptr = (struct list_head const *)tpg->tpg_gnp_list.next; tpg_np = (struct iscsi_tpg_np *)__mptr + 0xffffffffffffffe8UL; goto ldv_58945; ldv_58944: ; if ((unsigned long )tpg_np->tpg_np == (unsigned long )((struct iscsi_np *)0)) { printk("\vstruct iscsi_tpg_np->tpg_np is NULL!\n"); goto ldv_58943; } else { } spin_unlock(& tpg->tpg_np_lock); iscsit_clear_tpg_np_login_thread(tpg_np, tpg, (int )shutdown); spin_lock(& tpg->tpg_np_lock); ldv_58943: __mptr___0 = (struct list_head const *)tpg_np->tpg_np_list.next; tpg_np = (struct iscsi_tpg_np *)__mptr___0 + 0xffffffffffffffe8UL; ldv_58945: ; if ((unsigned long )(& tpg_np->tpg_np_list) != (unsigned long )(& tpg->tpg_gnp_list)) { goto ldv_58944; } else { } spin_unlock(& tpg->tpg_np_lock); return; } } void iscsit_tpg_dump_params(struct iscsi_portal_group *tpg ) { { iscsi_print_params(tpg->param_list); return; } } static void iscsit_set_default_tpg_attribs(struct iscsi_portal_group *tpg ) { struct iscsi_tpg_attrib *a ; { a = & tpg->tpg_attrib; a->authentication = 1U; a->login_timeout = 15U; a->netif_timeout = 2U; a->default_cmdsn_depth = 64U; a->generate_node_acls = 0U; a->cache_dynamic_acls = 0U; a->demo_mode_write_protect = 1U; a->prod_mode_write_protect = 0U; a->demo_mode_discovery = 1U; a->default_erl = 0U; a->t10_pi = 0U; a->fabric_prot_type = 0U; return; } } int iscsit_tpg_add_portal_group(struct iscsi_tiqn *tiqn , struct iscsi_portal_group *tpg ) { int tmp ; struct _ddebug descriptor ; long tmp___0 ; { if ((unsigned int )tpg->tpg_state != 0U) { printk("\vUnable to add iSCSI Target Portal Group: %d while not in TPG_STATE_FREE state.\n", (int )tpg->tpgt); return (-17); } else { } iscsit_set_default_tpg_attribs(tpg); tmp = iscsi_create_default_params(& tpg->param_list); if (tmp < 0) { goto err_out; } else { } tpg->tpg_attrib.tpg = tpg; spin_lock(& tpg->tpg_state_lock); tpg->tpg_state = 2; spin_unlock(& tpg->tpg_state_lock); spin_lock(& tiqn->tiqn_tpg_lock); list_add_tail(& tpg->tpg_list, & tiqn->tiqn_tpg_list); tiqn->tiqn_ntpgs = tiqn->tiqn_ntpgs + 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_tpg_add_portal_group"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "CORE[%s]_TPG[%hu] - Added iSCSI Target Portal Group\n"; descriptor.lineno = 253U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "CORE[%s]_TPG[%hu] - Added iSCSI Target Portal Group\n", (unsigned char *)(& tiqn->tiqn), (int )tpg->tpgt); } else { } spin_unlock(& tiqn->tiqn_tpg_lock); return (0); err_out: ; if ((unsigned long )tpg->param_list != (unsigned long )((struct iscsi_param_list *)0)) { iscsi_release_param_list(tpg->param_list); tpg->param_list = (struct iscsi_param_list *)0; } else { } kfree((void const *)tpg); return (-12); } } int iscsit_tpg_del_portal_group(struct iscsi_tiqn *tiqn , struct iscsi_portal_group *tpg , int force ) { u8 old_state ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; { old_state = (u8 )tpg->tpg_state; spin_lock(& tpg->tpg_state_lock); tpg->tpg_state = 2; spin_unlock(& tpg->tpg_state_lock); tmp = iscsit_release_sessions_for_tpg(tpg, force); if (tmp < 0) { printk("\vUnable to delete iSCSI Target Portal Group: %hu while active sessions exist, and force=0\n", (int )tpg->tpgt); tpg->tpg_state = (enum tpg_state_table )old_state; return (-1); } else { } if ((unsigned long )tpg->param_list != (unsigned long )((struct iscsi_param_list *)0)) { iscsi_release_param_list(tpg->param_list); tpg->param_list = (struct iscsi_param_list *)0; } else { } core_tpg_deregister(& tpg->tpg_se_tpg); spin_lock(& tpg->tpg_state_lock); tpg->tpg_state = 0; spin_unlock(& tpg->tpg_state_lock); spin_lock(& tiqn->tiqn_tpg_lock); tiqn->tiqn_ntpgs = tiqn->tiqn_ntpgs - 1U; list_del(& tpg->tpg_list); spin_unlock(& tiqn->tiqn_tpg_lock); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_tpg_del_portal_group"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "CORE[%s]_TPG[%hu] - Deleted iSCSI Target Portal Group\n"; descriptor.lineno = 302U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "CORE[%s]_TPG[%hu] - Deleted iSCSI Target Portal Group\n", (unsigned char *)(& tiqn->tiqn), (int )tpg->tpgt); } else { } kfree((void const *)tpg); return (0); } } int iscsit_tpg_enable_portal_group(struct iscsi_portal_group *tpg ) { struct iscsi_param *param ; struct iscsi_tiqn *tiqn ; int ret ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; { tiqn = tpg->tpg_tiqn; spin_lock(& tpg->tpg_state_lock); if ((unsigned int )tpg->tpg_state == 1U) { printk("\viSCSI target portal group: %hu is already active, ignoring request.\n", (int )tpg->tpgt); spin_unlock(& tpg->tpg_state_lock); return (-22); } else { } param = iscsi_find_param_from_key((char *)"AuthMethod", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { spin_unlock(& tpg->tpg_state_lock); return (-22); } else { } if (tpg->tpg_attrib.authentication != 0U) { tmp = strcmp((char const *)param->value, "None"); if (tmp == 0) { ret = iscsi_update_param_value(param, (char *)"CHAP"); if (ret != 0) { goto err; } else { } } else { } ret = iscsit_ta_authentication(tpg, 1U); if (ret < 0) { goto err; } else { } } else { } tpg->tpg_state = 1; spin_unlock(& tpg->tpg_state_lock); spin_lock(& tiqn->tiqn_tpg_lock); tiqn->tiqn_active_tpgs = tiqn->tiqn_active_tpgs + 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_tpg_enable_portal_group"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - Enabled iSCSI Target Portal Group\n"; descriptor.lineno = 350U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - Enabled iSCSI Target Portal Group\n", (int )tpg->tpgt); } else { } spin_unlock(& tiqn->tiqn_tpg_lock); return (0); err: spin_unlock(& tpg->tpg_state_lock); return (ret); } } int iscsit_tpg_disable_portal_group(struct iscsi_portal_group *tpg , int force ) { struct iscsi_tiqn *tiqn ; u8 old_state ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; { old_state = (u8 )tpg->tpg_state; spin_lock(& tpg->tpg_state_lock); if ((unsigned int )tpg->tpg_state == 2U) { printk("\viSCSI Target Portal Group: %hu is already inactive, ignoring request.\n", (int )tpg->tpgt); spin_unlock(& tpg->tpg_state_lock); return (-22); } else { } tpg->tpg_state = 2; spin_unlock(& tpg->tpg_state_lock); iscsit_clear_tpg_np_login_threads(tpg, 0); tmp = iscsit_release_sessions_for_tpg(tpg, force); if (tmp < 0) { spin_lock(& tpg->tpg_state_lock); tpg->tpg_state = (enum tpg_state_table )old_state; spin_unlock(& tpg->tpg_state_lock); printk("\vUnable to disable iSCSI Target Portal Group: %hu while active sessions exist, and force=0\n", (int )tpg->tpgt); return (-1); } else { } tiqn = tpg->tpg_tiqn; if ((unsigned long )tiqn == (unsigned long )((struct iscsi_tiqn *)0) || (unsigned long )iscsit_global->discovery_tpg == (unsigned long )tpg) { return (0); } else { } spin_lock(& tiqn->tiqn_tpg_lock); tiqn->tiqn_active_tpgs = tiqn->tiqn_active_tpgs - 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_tpg_disable_portal_group"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - Disabled iSCSI Target Portal Group\n"; descriptor.lineno = 394U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - Disabled iSCSI Target Portal Group\n", (int )tpg->tpgt); } else { } spin_unlock(& tiqn->tiqn_tpg_lock); return (0); } } struct iscsi_node_attrib *iscsit_tpg_get_node_attrib(struct iscsi_session *sess ) { struct se_session *se_sess ; struct se_node_acl *se_nacl ; struct iscsi_node_acl *acl ; struct se_node_acl const *__mptr ; { se_sess = sess->se_sess; se_nacl = se_sess->se_node_acl; __mptr = (struct se_node_acl const *)se_nacl; acl = (struct iscsi_node_acl *)__mptr; return (& acl->node_attrib); } } struct iscsi_tpg_np *iscsit_tpg_locate_child_np(struct iscsi_tpg_np *tpg_np , int network_transport ) { struct iscsi_tpg_np *tpg_np_child ; struct iscsi_tpg_np *tpg_np_child_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { spin_lock(& tpg_np->tpg_np_parent_lock); __mptr = (struct list_head const *)tpg_np->tpg_np_parent_list.next; tpg_np_child = (struct iscsi_tpg_np *)__mptr + 0xffffffffffffffd8UL; __mptr___0 = (struct list_head const *)tpg_np_child->tpg_np_child_list.next; tpg_np_child_tmp = (struct iscsi_tpg_np *)__mptr___0 + 0xffffffffffffffd8UL; goto ldv_59007; ldv_59006: ; if ((tpg_np_child->tpg_np)->np_network_transport == network_transport) { spin_unlock(& tpg_np->tpg_np_parent_lock); return (tpg_np_child); } else { } tpg_np_child = tpg_np_child_tmp; __mptr___1 = (struct list_head const *)tpg_np_child_tmp->tpg_np_child_list.next; tpg_np_child_tmp = (struct iscsi_tpg_np *)__mptr___1 + 0xffffffffffffffd8UL; ldv_59007: ; if ((unsigned long )(& tpg_np_child->tpg_np_child_list) != (unsigned long )(& tpg_np->tpg_np_parent_list)) { goto ldv_59006; } else { } spin_unlock(& tpg_np->tpg_np_parent_lock); return ((struct iscsi_tpg_np *)0); } } static bool iscsit_tpg_check_network_portal(struct iscsi_tiqn *tiqn , struct __kernel_sockaddr_storage *sockaddr , int network_transport ) { struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; struct iscsi_np *np ; bool match ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; { match = 0; spin_lock(& tiqn->tiqn_tpg_lock); __mptr = (struct list_head const *)tiqn->tiqn_tpg_list.next; tpg = (struct iscsi_portal_group *)__mptr + 0xfffffffffffff4c0UL; goto ldv_59030; ldv_59029: spin_lock(& tpg->tpg_np_lock); __mptr___0 = (struct list_head const *)tpg->tpg_gnp_list.next; tpg_np = (struct iscsi_tpg_np *)__mptr___0 + 0xffffffffffffffe8UL; goto ldv_59028; ldv_59027: np = tpg_np->tpg_np; match = iscsit_check_np_match(sockaddr, np, network_transport); if ((int )match) { goto ldv_59026; } else { } __mptr___1 = (struct list_head const *)tpg_np->tpg_np_list.next; tpg_np = (struct iscsi_tpg_np *)__mptr___1 + 0xffffffffffffffe8UL; ldv_59028: ; if ((unsigned long )(& tpg_np->tpg_np_list) != (unsigned long )(& tpg->tpg_gnp_list)) { goto ldv_59027; } else { } ldv_59026: spin_unlock(& tpg->tpg_np_lock); __mptr___2 = (struct list_head const *)tpg->tpg_list.next; tpg = (struct iscsi_portal_group *)__mptr___2 + 0xfffffffffffff4c0UL; ldv_59030: ; if ((unsigned long )(& tpg->tpg_list) != (unsigned long )(& tiqn->tiqn_tpg_list)) { goto ldv_59029; } else { } spin_unlock(& tiqn->tiqn_tpg_lock); return (match); } } struct iscsi_tpg_np *iscsit_tpg_add_network_portal(struct iscsi_portal_group *tpg , struct __kernel_sockaddr_storage *sockaddr , char *ip_str , struct iscsi_tpg_np *tpg_np_parent , int network_transport ) { struct iscsi_np *np ; struct iscsi_tpg_np *tpg_np ; void *tmp ; bool tmp___0 ; void *tmp___1 ; void *tmp___2 ; void *tmp___3 ; bool tmp___4 ; struct lock_class_key __key ; struct _ddebug descriptor ; long tmp___5 ; { if ((unsigned long )tpg_np_parent == (unsigned long )((struct iscsi_tpg_np *)0)) { tmp___0 = iscsit_tpg_check_network_portal(tpg->tpg_tiqn, sockaddr, network_transport); if ((int )tmp___0) { printk("\vNetwork Portal: %s already exists on a different TPG on %s\n", ip_str, (unsigned char *)(& (tpg->tpg_tiqn)->tiqn)); tmp = ERR_PTR(-17L); return ((struct iscsi_tpg_np *)tmp); } else { } } else { } tmp___1 = kzalloc(368UL, 208U); tpg_np = (struct iscsi_tpg_np *)tmp___1; if ((unsigned long )tpg_np == (unsigned long )((struct iscsi_tpg_np *)0)) { printk("\vUnable to allocate memory for struct iscsi_tpg_np.\n"); tmp___2 = ERR_PTR(-12L); return ((struct iscsi_tpg_np *)tmp___2); } else { } np = iscsit_add_np(sockaddr, ip_str, network_transport); tmp___4 = IS_ERR((void const *)np); if ((int )tmp___4) { kfree((void const *)tpg_np); tmp___3 = ERR_CAST((void const *)np); return ((struct iscsi_tpg_np *)tmp___3); } else { } INIT_LIST_HEAD(& tpg_np->tpg_np_list); INIT_LIST_HEAD(& tpg_np->tpg_np_child_list); INIT_LIST_HEAD(& tpg_np->tpg_np_parent_list); spinlock_check(& tpg_np->tpg_np_parent_lock); __raw_spin_lock_init(& tpg_np->tpg_np_parent_lock.__annonCompField17.rlock, "&(&tpg_np->tpg_np_parent_lock)->rlock", & __key); init_completion(& tpg_np->tpg_np_comp); kref_init(& tpg_np->tpg_np_kref); tpg_np->tpg_np = np; tpg_np->tpg = tpg; spin_lock(& tpg->tpg_np_lock); list_add_tail(& tpg_np->tpg_np_list, & tpg->tpg_gnp_list); tpg->num_tpg_nps = tpg->num_tpg_nps + 1U; if ((unsigned long )tpg->tpg_tiqn != (unsigned long )((struct iscsi_tiqn *)0)) { (tpg->tpg_tiqn)->tiqn_num_tpg_nps = (tpg->tpg_tiqn)->tiqn_num_tpg_nps + 1U; } else { } spin_unlock(& tpg->tpg_np_lock); if ((unsigned long )tpg_np_parent != (unsigned long )((struct iscsi_tpg_np *)0)) { tpg_np->tpg_np_parent = tpg_np_parent; spin_lock(& tpg_np_parent->tpg_np_parent_lock); list_add_tail(& tpg_np->tpg_np_child_list, & tpg_np_parent->tpg_np_parent_list); spin_unlock(& tpg_np_parent->tpg_np_parent_lock); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_tpg_add_network_portal"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "CORE[%s] - Added Network Portal: %s:%hu,%hu on %s\n"; descriptor.lineno = 519U; descriptor.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor, "CORE[%s] - Added Network Portal: %s:%hu,%hu on %s\n", (unsigned char *)(& (tpg->tpg_tiqn)->tiqn), (unsigned char *)(& np->np_ip), (int )np->np_port, (int )tpg->tpgt, (char *)(& (np->np_transport)->name)); } else { } return (tpg_np); } } static int iscsit_tpg_release_np(struct iscsi_tpg_np *tpg_np , struct iscsi_portal_group *tpg , struct iscsi_np *np ) { struct _ddebug descriptor ; long tmp ; int tmp___0 ; { iscsit_clear_tpg_np_login_thread(tpg_np, tpg, 1); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_tpg_release_np"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "CORE[%s] - Removed Network Portal: %s:%hu,%hu on %s\n"; descriptor.lineno = 533U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "CORE[%s] - Removed Network Portal: %s:%hu,%hu on %s\n", (unsigned char *)(& (tpg->tpg_tiqn)->tiqn), (unsigned char *)(& np->np_ip), (int )np->np_port, (int )tpg->tpgt, (char *)(& (np->np_transport)->name)); } else { } tpg_np->tpg_np = (struct iscsi_np *)0; tpg_np->tpg = (struct iscsi_portal_group *)0; kfree((void const *)tpg_np); tmp___0 = iscsit_del_np(np); return (tmp___0); } } int iscsit_tpg_del_network_portal(struct iscsi_portal_group *tpg , struct iscsi_tpg_np *tpg_np ) { struct iscsi_np *np ; struct iscsi_tpg_np *tpg_np_child ; struct iscsi_tpg_np *tpg_np_child_tmp ; int ret ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; int tmp ; { ret = 0; np = tpg_np->tpg_np; if ((unsigned long )np == (unsigned long )((struct iscsi_np *)0)) { printk("\vUnable to locate struct iscsi_np from struct iscsi_tpg_np\n"); return (-22); } else { } if ((unsigned long )tpg_np->tpg_np_parent == (unsigned long )((struct iscsi_tpg_np *)0)) { __mptr = (struct list_head const *)tpg_np->tpg_np_parent_list.next; tpg_np_child = (struct iscsi_tpg_np *)__mptr + 0xffffffffffffffd8UL; __mptr___0 = (struct list_head const *)tpg_np_child->tpg_np_child_list.next; tpg_np_child_tmp = (struct iscsi_tpg_np *)__mptr___0 + 0xffffffffffffffd8UL; goto ldv_59066; ldv_59065: ret = iscsit_tpg_del_network_portal(tpg, tpg_np_child); if (ret < 0) { printk("\viscsit_tpg_del_network_portal() failed: %d\n", ret); } else { } tpg_np_child = tpg_np_child_tmp; __mptr___1 = (struct list_head const *)tpg_np_child_tmp->tpg_np_child_list.next; tpg_np_child_tmp = (struct iscsi_tpg_np *)__mptr___1 + 0xffffffffffffffd8UL; ldv_59066: ; if ((unsigned long )(& tpg_np_child->tpg_np_child_list) != (unsigned long )(& tpg_np->tpg_np_parent_list)) { goto ldv_59065; } else { } } else { spin_lock(& (tpg_np->tpg_np_parent)->tpg_np_parent_lock); list_del(& tpg_np->tpg_np_child_list); spin_unlock(& (tpg_np->tpg_np_parent)->tpg_np_parent_lock); } spin_lock(& tpg->tpg_np_lock); list_del(& tpg_np->tpg_np_list); tpg->num_tpg_nps = tpg->num_tpg_nps - 1U; if ((unsigned long )tpg->tpg_tiqn != (unsigned long )((struct iscsi_tiqn *)0)) { (tpg->tpg_tiqn)->tiqn_num_tpg_nps = (tpg->tpg_tiqn)->tiqn_num_tpg_nps - 1U; } else { } spin_unlock(& tpg->tpg_np_lock); tmp = iscsit_tpg_release_np(tpg_np, tpg, np); return (tmp); } } int iscsit_tpg_set_initiator_node_queue_depth(struct iscsi_portal_group *tpg , unsigned char *initiatorname , u32 queue_depth , int force ) { int tmp ; { tmp = core_tpg_set_initiator_node_queue_depth(& tpg->tpg_se_tpg, initiatorname, queue_depth, force); return (tmp); } } int iscsit_ta_authentication(struct iscsi_portal_group *tpg , u32 authentication ) { unsigned char buf1[256U] ; unsigned char buf2[256U] ; unsigned char *none ; int len ; struct iscsi_param *param ; struct iscsi_tpg_attrib *a ; char *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; char *tmp___3 ; size_t tmp___4 ; size_t tmp___5 ; int tmp___6 ; struct _ddebug descriptor ; long tmp___7 ; { none = (unsigned char *)0U; a = & tpg->tpg_attrib; if (authentication != 1U && authentication != 0U) { printk("\vIllegal value for authentication parameter: %u, ignoring request.\n", authentication); return (-22); } else { } memset((void *)(& buf1), 0, 256UL); memset((void *)(& buf2), 0, 256UL); param = iscsi_find_param_from_key((char *)"AuthMethod", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { return (-22); } else { } if (authentication != 0U) { snprintf((char *)(& buf1), 256UL, "%s", param->value); tmp = strstr((char const *)(& buf1), "None"); none = (unsigned char *)tmp; if ((unsigned long )none == (unsigned long )((unsigned char *)0U)) { goto out; } else { } tmp___1 = strncmp((char const *)none + 4U, ",", 1UL); if (tmp___1 == 0) { tmp___0 = strcmp((char const *)(& buf1), (char const *)none); if (tmp___0 == 0) { sprintf((char *)(& buf2), "%s", none + 5UL); } else { none = none - 1; *none = 0U; len = sprintf((char *)(& buf2), "%s", (unsigned char *)(& buf1)); none = none + 5UL; sprintf((char *)(& buf2) + (unsigned long )len, "%s", none); } } else { none = none - 1; *none = 0U; sprintf((char *)(& buf2), "%s", (unsigned char *)(& buf1)); } tmp___2 = iscsi_update_param_value(param, (char *)(& buf2)); if (tmp___2 < 0) { return (-22); } else { } } else { snprintf((char *)(& buf1), 256UL, "%s", param->value); tmp___3 = strstr((char const *)(& buf1), "None"); none = (unsigned char *)tmp___3; if ((unsigned long )none != (unsigned long )((unsigned char *)0U)) { goto out; } else { } tmp___4 = strlen(","); strncat((char *)(& buf1), ",", tmp___4); tmp___5 = strlen("None"); strncat((char *)(& buf1), "None", tmp___5); tmp___6 = iscsi_update_param_value(param, (char *)(& buf1)); if (tmp___6 < 0) { return (-22); } else { } } out: a->authentication = authentication; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_authentication"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "%s iSCSI Authentication Methods for TPG: %hu.\n"; descriptor.lineno = 659U; descriptor.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___7 != 0L) { __dynamic_pr_debug(& descriptor, "%s iSCSI Authentication Methods for TPG: %hu.\n", a->authentication != 0U ? (char *)"Enforcing" : (char *)"Disabling", (int )tpg->tpgt); } else { } return (0); } } int iscsit_ta_login_timeout(struct iscsi_portal_group *tpg , u32 login_timeout ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if (login_timeout > 30U) { printk("\vRequested Login Timeout %u larger than maximum %u\n", login_timeout, 30); return (-22); } else if (login_timeout <= 4U) { printk("\vRequested Logout Timeout %u smaller than minimum %u\n", login_timeout, 5); return (-22); } else { } a->login_timeout = login_timeout; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_login_timeout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "Set Logout Timeout to %u for Target Portal Group %hu\n"; descriptor.lineno = 682U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Set Logout Timeout to %u for Target Portal Group %hu\n", a->login_timeout, (int )tpg->tpgt); } else { } return (0); } } int iscsit_ta_netif_timeout(struct iscsi_portal_group *tpg , u32 netif_timeout ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if (netif_timeout > 15U) { printk("\vRequested Network Interface Timeout %u larger than maximum %u\n", netif_timeout, 15); return (-22); } else if (netif_timeout <= 1U) { printk("\vRequested Network Interface Timeout %u smaller than minimum %u\n", netif_timeout, 2); return (-22); } else { } a->netif_timeout = netif_timeout; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_netif_timeout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "Set Network Interface Timeout to %u for Target Portal Group %hu\n"; descriptor.lineno = 707U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Set Network Interface Timeout to %u for Target Portal Group %hu\n", a->netif_timeout, (int )tpg->tpgt); } else { } return (0); } } int iscsit_ta_generate_node_acls(struct iscsi_portal_group *tpg , u32 flag ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { a = & tpg->tpg_attrib; if (flag != 0U && flag != 1U) { printk("\vIllegal value %d\n", flag); return (-22); } else { } a->generate_node_acls = flag; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_generate_node_acls"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - Generate Initiator Portal Group ACLs: %s\n"; descriptor.lineno = 725U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - Generate Initiator Portal Group ACLs: %s\n", (int )tpg->tpgt, a->generate_node_acls != 0U ? (char *)"Enabled" : (char *)"Disabled"); } else { } if (flag == 1U && a->cache_dynamic_acls == 0U) { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_ta_generate_node_acls"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor___0.format = "Explicitly setting cache_dynamic_acls=1 when generate_node_acls=1\n"; descriptor___0.lineno = 729U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Explicitly setting cache_dynamic_acls=1 when generate_node_acls=1\n"); } else { } a->cache_dynamic_acls = 1U; } else { } return (0); } } int iscsit_ta_default_cmdsn_depth(struct iscsi_portal_group *tpg , u32 tcq_depth ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if (tcq_depth > 512U) { printk("\vRequested Default Queue Depth: %u larger than maximum %u\n", tcq_depth, 512); return (-22); } else if (tcq_depth == 0U) { printk("\vRequested Default Queue Depth: %u smaller than minimum %u\n", tcq_depth, 1); return (-22); } else { } a->default_cmdsn_depth = tcq_depth; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_default_cmdsn_depth"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - Set Default CmdSN TCQ Depth to %u\n"; descriptor.lineno = 756U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - Set Default CmdSN TCQ Depth to %u\n", (int )tpg->tpgt, a->default_cmdsn_depth); } else { } return (0); } } int iscsit_ta_cache_dynamic_acls(struct iscsi_portal_group *tpg , u32 flag ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { a = & tpg->tpg_attrib; if (flag != 0U && flag != 1U) { printk("\vIllegal value %d\n", flag); return (-22); } else { } if (a->generate_node_acls == 1U && flag == 0U) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_cache_dynamic_acls"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "Skipping cache_dynamic_acls=0 when generate_node_acls=1\n"; descriptor.lineno = 774U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Skipping cache_dynamic_acls=0 when generate_node_acls=1\n"); } else { } return (0); } else { } a->cache_dynamic_acls = flag; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_ta_cache_dynamic_acls"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor___0.format = "iSCSI_TPG[%hu] - Cache Dynamic Initiator Portal Group ACLs %s\n"; descriptor___0.lineno = 781U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "iSCSI_TPG[%hu] - Cache Dynamic Initiator Portal Group ACLs %s\n", (int )tpg->tpgt, a->cache_dynamic_acls != 0U ? (char *)"Enabled" : (char *)"Disabled"); } else { } return (0); } } int iscsit_ta_demo_mode_write_protect(struct iscsi_portal_group *tpg , u32 flag ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if (flag != 0U && flag != 1U) { printk("\vIllegal value %d\n", flag); return (-22); } else { } a->demo_mode_write_protect = flag; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_demo_mode_write_protect"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - Demo Mode Write Protect bit: %s\n"; descriptor.lineno = 799U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - Demo Mode Write Protect bit: %s\n", (int )tpg->tpgt, a->demo_mode_write_protect != 0U ? (char *)"ON" : (char *)"OFF"); } else { } return (0); } } int iscsit_ta_prod_mode_write_protect(struct iscsi_portal_group *tpg , u32 flag ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if (flag != 0U && flag != 1U) { printk("\vIllegal value %d\n", flag); return (-22); } else { } a->prod_mode_write_protect = flag; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_prod_mode_write_protect"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - Production Mode Write Protect bit: %s\n"; descriptor.lineno = 818U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - Production Mode Write Protect bit: %s\n", (int )tpg->tpgt, a->prod_mode_write_protect != 0U ? (char *)"ON" : (char *)"OFF"); } else { } return (0); } } int iscsit_ta_demo_mode_discovery(struct iscsi_portal_group *tpg , u32 flag ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if (flag != 0U && flag != 1U) { printk("\vIllegal value %d\n", flag); return (-22); } else { } a->demo_mode_discovery = flag; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_demo_mode_discovery"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - Demo Mode Discovery bit: %s\n"; descriptor.lineno = 837U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - Demo Mode Discovery bit: %s\n", (int )tpg->tpgt, a->demo_mode_discovery != 0U ? (char *)"ON" : (char *)"OFF"); } else { } return (0); } } int iscsit_ta_default_erl(struct iscsi_portal_group *tpg , u32 default_erl ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if ((default_erl != 0U && default_erl != 1U) && default_erl != 2U) { printk("\vIllegal value for default_erl: %u\n", default_erl); return (-22); } else { } a->default_erl = default_erl; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_default_erl"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - DefaultERL: %u\n"; descriptor.lineno = 854U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - DefaultERL: %u\n", (int )tpg->tpgt, a->default_erl); } else { } return (0); } } int iscsit_ta_t10_pi(struct iscsi_portal_group *tpg , u32 flag ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if (flag != 0U && flag != 1U) { printk("\vIllegal value %d\n", flag); return (-22); } else { } a->t10_pi = (u8 )flag; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_t10_pi"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - T10 Protection information bit: %s\n"; descriptor.lineno = 873U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - T10 Protection information bit: %s\n", (int )tpg->tpgt, (unsigned int )a->t10_pi != 0U ? (char *)"ON" : (char *)"OFF"); } else { } return (0); } } int iscsit_ta_fabric_prot_type(struct iscsi_portal_group *tpg , u32 prot_type ) { struct iscsi_tpg_attrib *a ; struct _ddebug descriptor ; long tmp ; { a = & tpg->tpg_attrib; if ((prot_type != 0U && prot_type != 1U) && prot_type != 3U) { printk("\vIllegal value for fabric_prot_type: %u\n", prot_type); return (-22); } else { } a->fabric_prot_type = prot_type; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_ta_fabric_prot_type"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_tpg.c"; descriptor.format = "iSCSI_TPG[%hu] - T10 Fabric Protection Type: %u\n"; descriptor.lineno = 891U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI_TPG[%hu] - T10 Fabric Protection Type: %u\n", (int )tpg->tpgt, prot_type); } else { } return (0); } } __inline static void *ERR_PTR(long error ) { void *tmp ; { tmp = ldv_err_ptr(error); return (tmp); } } bool ldv_queue_work_on_381(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_382(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_383(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_384(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_385(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_386(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_387(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_388(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_389(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_390(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_391(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_392(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_lock_interruptible_393(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_lock_interruptible(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_lock_interruptible_tpg_access_lock_of_iscsi_portal_group(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_394(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_tpg_access_lock_of_iscsi_portal_group(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; __inline static void atomic_dec(atomic_t *v ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; decl %0": "+m" (v->counter)); return; } } int ldv_mutex_trylock_421(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_419(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_422(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_423(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_426(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_418(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_420(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_424(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_425(struct mutex *ldv_func_arg1 ) ; __inline static int preempt_count(void) { int pfo_ret__ ; { switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret__): "m" (__preempt_count)); goto ldv_6612; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6612; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6612; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6612; default: __bad_percpu_size(); } ldv_6612: ; return (pfo_ret__ & 2147483647); } } int ldv_mod_timer_427(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) ; int ldv_del_timer_sync_428(struct timer_list *ldv_func_arg1 ) ; int ldv_del_timer_sync_429(struct timer_list *ldv_func_arg1 ) ; extern void __wake_up(wait_queue_head_t * , unsigned int , int , void * ) ; bool ldv_queue_work_on_413(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_415(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_414(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_417(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_416(struct workqueue_struct *ldv_func_arg1 ) ; struct timer_list *ldv_timer_list_9 ; struct timer_list *ldv_timer_list_8 ; struct timer_list *ldv_timer_list_7 ; int reg_timer_7(struct timer_list *timer ) ; void activate_pending_timer_9(struct timer_list *timer , unsigned long data , int pending_flag ) ; void choose_timer_8(struct timer_list *timer ) ; void disable_suitable_timer_7(struct timer_list *timer ) ; int reg_timer_9(struct timer_list *timer ) ; void choose_timer_9(struct timer_list *timer ) ; void activate_pending_timer_7(struct timer_list *timer , unsigned long data , int pending_flag ) ; void disable_suitable_timer_9(struct timer_list *timer ) ; void choose_timer_7(struct timer_list *timer ) ; extern int percpu_ida_alloc(struct percpu_ida * , int ) ; extern void percpu_ida_free(struct percpu_ida * , unsigned int ) ; __inline static struct page *sg_page(struct scatterlist *sg ) { long tmp ; long tmp___0 ; { tmp = ldv__builtin_expect(sg->sg_magic != 2271560481UL, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (123), "i" (12UL)); ldv_30867: ; goto ldv_30867; } else { } tmp___0 = ldv__builtin_expect((long )((int )sg->page_link) & 1L, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (124), "i" (12UL)); ldv_30868: ; goto ldv_30868; } else { } return ((struct page *)(sg->page_link & 0xfffffffffffffffcUL)); } } extern struct scatterlist *sg_next(struct scatterlist * ) ; __inline static int iscsi_sna_gt(u32 n1 , u32 n2 ) { { return ((int )(n1 - n2) > 0); } } extern void iov_iter_kvec(struct iov_iter * , int , struct kvec const * , unsigned long , size_t ) ; extern int sock_recvmsg(struct socket * , struct msghdr * , size_t , int ) ; extern int kernel_sendmsg(struct socket * , struct msghdr * , struct kvec * , size_t , size_t ) ; extern int transport_generic_free_cmd(struct se_cmd * , int ) ; extern int target_put_sess_cmd(struct se_cmd * ) ; __inline static u32 session_get_next_ttt(struct iscsi_session *session ) { u32 ttt ; u32 tmp ; u32 tmp___0 ; { spin_lock_bh(& session->ttt_lock); tmp = session->targ_xfer_tag; session->targ_xfer_tag = session->targ_xfer_tag + 1U; ttt = tmp; if (ttt == 4294967295U) { tmp___0 = session->targ_xfer_tag; session->targ_xfer_tag = session->targ_xfer_tag + 1U; ttt = tmp___0; } else { } spin_unlock_bh(& session->ttt_lock); return (ttt); } } struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn , int state ) ; int iscsit_sequence_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf , __be32 cmdsn ) ; void iscsit_release_cmd(struct iscsi_cmd *cmd ) ; struct iscsi_r2t *iscsit_get_r2t_from_list(struct iscsi_cmd *cmd ) ; void iscsit_free_r2ts_from_list(struct iscsi_cmd *cmd ) ; struct iscsi_seq *iscsit_get_seq_holder_for_r2t(struct iscsi_cmd *cmd ) ; int iscsit_check_unsolicited_dataout(struct iscsi_cmd *cmd , unsigned char *buf ) ; struct iscsi_cmd *iscsit_find_cmd_from_itt_or_dump(struct iscsi_conn *conn , itt_t init_task_tag , u32 length ) ; struct iscsi_queue_req *iscsit_get_cmd_from_immediate_queue(struct iscsi_conn *conn ) ; struct iscsi_queue_req *iscsit_get_cmd_from_response_queue(struct iscsi_conn *conn ) ; bool iscsit_conn_all_queues_empty(struct iscsi_conn *conn ) ; void iscsit_free_queue_reqs_for_conn(struct iscsi_conn *conn ) ; void __iscsit_free_cmd(struct iscsi_cmd *cmd , bool scsi_cmd , bool check_queues ) ; int iscsit_check_session_usage_count(struct iscsi_session *sess ) ; struct iscsi_conn *iscsit_get_conn_from_cid(struct iscsi_session *sess , u16 cid ) ; void iscsit_check_conn_usage_count(struct iscsi_conn *conn ) ; void iscsit_mod_nopin_response_timer(struct iscsi_conn *conn ) ; void iscsit_start_nopin_response_timer(struct iscsi_conn *conn ) ; void iscsit_stop_nopin_response_timer(struct iscsi_conn *conn ) ; void iscsit_stop_nopin_timer(struct iscsi_conn *conn ) ; int iscsit_send_tx_data(struct iscsi_cmd *cmd , struct iscsi_conn *conn , int use_misc ) ; int iscsit_fe_sendpage_sg(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) ; void iscsit_print_session_params(struct iscsi_session *sess ) ; struct iscsi_tiqn *iscsit_snmp_get_tiqn(struct iscsi_conn *conn ) ; struct kmem_cache *lio_qr_cache ; struct kmem_cache *lio_r2t_cache ; int iscsit_add_r2t_to_list(struct iscsi_cmd *cmd , u32 offset , u32 xfer_len , int recovery , u32 r2t_sn ) { struct iscsi_r2t *r2t ; void *tmp ; u32 tmp___0 ; { tmp = kmem_cache_zalloc(lio_r2t_cache, 32U); r2t = (struct iscsi_r2t *)tmp; if ((unsigned long )r2t == (unsigned long )((struct iscsi_r2t *)0)) { printk("\vUnable to allocate memory for struct iscsi_r2t.\n"); return (-1); } else { } INIT_LIST_HEAD(& r2t->r2t_list); r2t->recovery_r2t = recovery; if (r2t_sn == 0U) { tmp___0 = cmd->r2t_sn; cmd->r2t_sn = cmd->r2t_sn + 1U; r2t->r2t_sn = tmp___0; } else { r2t->r2t_sn = r2t_sn; } r2t->offset = offset; r2t->xfer_len = xfer_len; list_add_tail(& r2t->r2t_list, & cmd->cmd_r2t_list); spin_unlock_bh(& cmd->r2t_lock); iscsit_add_cmd_to_immediate_queue(cmd, cmd->conn, 21); spin_lock_bh(& cmd->r2t_lock); return (0); } } struct iscsi_r2t *iscsit_get_r2t_for_eos(struct iscsi_cmd *cmd , u32 offset , u32 length ) { struct iscsi_r2t *r2t ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock_bh(& cmd->r2t_lock); __mptr = (struct list_head const *)cmd->cmd_r2t_list.next; r2t = (struct iscsi_r2t *)__mptr + 0xffffffffffffffe0UL; goto ldv_60140; ldv_60139: ; if (r2t->offset <= offset && r2t->offset + r2t->xfer_len >= offset + length) { spin_unlock_bh(& cmd->r2t_lock); return (r2t); } else { } __mptr___0 = (struct list_head const *)r2t->r2t_list.next; r2t = (struct iscsi_r2t *)__mptr___0 + 0xffffffffffffffe0UL; ldv_60140: ; if ((unsigned long )(& r2t->r2t_list) != (unsigned long )(& cmd->cmd_r2t_list)) { goto ldv_60139; } else { } spin_unlock_bh(& cmd->r2t_lock); printk("\vUnable to locate R2T for Offset: %u, Length: %u\n", offset, length); return ((struct iscsi_r2t *)0); } } struct iscsi_r2t *iscsit_get_r2t_from_list(struct iscsi_cmd *cmd ) { struct iscsi_r2t *r2t ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock_bh(& cmd->r2t_lock); __mptr = (struct list_head const *)cmd->cmd_r2t_list.next; r2t = (struct iscsi_r2t *)__mptr + 0xffffffffffffffe0UL; goto ldv_60151; ldv_60150: ; if (r2t->sent_r2t == 0) { spin_unlock_bh(& cmd->r2t_lock); return (r2t); } else { } __mptr___0 = (struct list_head const *)r2t->r2t_list.next; r2t = (struct iscsi_r2t *)__mptr___0 + 0xffffffffffffffe0UL; ldv_60151: ; if ((unsigned long )(& r2t->r2t_list) != (unsigned long )(& cmd->cmd_r2t_list)) { goto ldv_60150; } else { } spin_unlock_bh(& cmd->r2t_lock); printk("\vUnable to locate next R2T to send for ITT: 0x%08x.\n", cmd->init_task_tag); return ((struct iscsi_r2t *)0); } } void iscsit_free_r2t(struct iscsi_r2t *r2t , struct iscsi_cmd *cmd ) { { list_del(& r2t->r2t_list); kmem_cache_free(lio_r2t_cache, (void *)r2t); return; } } void iscsit_free_r2ts_from_list(struct iscsi_cmd *cmd ) { struct iscsi_r2t *r2t ; struct iscsi_r2t *r2t_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { spin_lock_bh(& cmd->r2t_lock); __mptr = (struct list_head const *)cmd->cmd_r2t_list.next; r2t = (struct iscsi_r2t *)__mptr + 0xffffffffffffffe0UL; __mptr___0 = (struct list_head const *)r2t->r2t_list.next; r2t_tmp = (struct iscsi_r2t *)__mptr___0 + 0xffffffffffffffe0UL; goto ldv_60169; ldv_60168: iscsit_free_r2t(r2t, cmd); r2t = r2t_tmp; __mptr___1 = (struct list_head const *)r2t_tmp->r2t_list.next; r2t_tmp = (struct iscsi_r2t *)__mptr___1 + 0xffffffffffffffe0UL; ldv_60169: ; if ((unsigned long )(& r2t->r2t_list) != (unsigned long )(& cmd->cmd_r2t_list)) { goto ldv_60168; } else { } spin_unlock_bh(& cmd->r2t_lock); return; } } struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *conn , int state ) { struct iscsi_cmd *cmd ; struct se_session *se_sess ; int size ; int tag ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; struct lock_class_key __key___2 ; struct lock_class_key __key___3 ; { se_sess = (conn->sess)->se_sess; tag = percpu_ida_alloc(& se_sess->sess_tag_pool, state); if (tag < 0) { return ((struct iscsi_cmd *)0); } else { } size = (int )((unsigned int )(conn->conn_transport)->priv_size + 1920U); cmd = (struct iscsi_cmd *)se_sess->sess_cmd_map + (unsigned long )(tag * size); memset((void *)cmd, 0, (size_t )size); cmd->se_cmd.map_tag = (unsigned int )tag; cmd->conn = conn; INIT_LIST_HEAD(& cmd->i_conn_node); INIT_LIST_HEAD(& cmd->datain_list); INIT_LIST_HEAD(& cmd->cmd_r2t_list); spinlock_check(& cmd->datain_lock); __raw_spin_lock_init(& cmd->datain_lock.__annonCompField17.rlock, "&(&cmd->datain_lock)->rlock", & __key); spinlock_check(& cmd->dataout_timeout_lock); __raw_spin_lock_init(& cmd->dataout_timeout_lock.__annonCompField17.rlock, "&(&cmd->dataout_timeout_lock)->rlock", & __key___0); spinlock_check(& cmd->istate_lock); __raw_spin_lock_init(& cmd->istate_lock.__annonCompField17.rlock, "&(&cmd->istate_lock)->rlock", & __key___1); spinlock_check(& cmd->error_lock); __raw_spin_lock_init(& cmd->error_lock.__annonCompField17.rlock, "&(&cmd->error_lock)->rlock", & __key___2); spinlock_check(& cmd->r2t_lock); __raw_spin_lock_init(& cmd->r2t_lock.__annonCompField17.rlock, "&(&cmd->r2t_lock)->rlock", & __key___3); return (cmd); } } static char const __kstrtab_iscsit_allocate_cmd[20U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'a', 'l', 'l', 'o', 'c', 'a', 't', 'e', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_allocate_cmd ; struct kernel_symbol const __ksymtab_iscsit_allocate_cmd = {(unsigned long )(& iscsit_allocate_cmd), (char const *)(& __kstrtab_iscsit_allocate_cmd)}; struct iscsi_seq *iscsit_get_seq_holder_for_datain(struct iscsi_cmd *cmd , u32 seq_send_order ) { u32 i ; { i = 0U; goto ldv_60198; ldv_60197: ; if ((cmd->seq_list + (unsigned long )i)->seq_send_order == seq_send_order) { return (cmd->seq_list + (unsigned long )i); } else { } i = i + 1U; ldv_60198: ; if (cmd->seq_count > i) { goto ldv_60197; } else { } return ((struct iscsi_seq *)0); } } struct iscsi_seq *iscsit_get_seq_holder_for_r2t(struct iscsi_cmd *cmd ) { u32 i ; { if ((unsigned long )cmd->seq_list == (unsigned long )((struct iscsi_seq *)0)) { printk("\vstruct iscsi_cmd->seq_list is NULL!\n"); return ((struct iscsi_seq *)0); } else { } i = 0U; goto ldv_60206; ldv_60205: ; if ((cmd->seq_list + (unsigned long )i)->type != 3) { goto ldv_60204; } else { } if ((cmd->seq_list + (unsigned long )i)->seq_send_order == cmd->seq_send_order) { cmd->seq_send_order = cmd->seq_send_order + 1U; return (cmd->seq_list + (unsigned long )i); } else { } ldv_60204: i = i + 1U; ldv_60206: ; if (cmd->seq_count > i) { goto ldv_60205; } else { } return ((struct iscsi_seq *)0); } } struct iscsi_r2t *iscsit_get_holder_for_r2tsn(struct iscsi_cmd *cmd , u32 r2t_sn ) { struct iscsi_r2t *r2t ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock_bh(& cmd->r2t_lock); __mptr = (struct list_head const *)cmd->cmd_r2t_list.next; r2t = (struct iscsi_r2t *)__mptr + 0xffffffffffffffe0UL; goto ldv_60218; ldv_60217: ; if (r2t->r2t_sn == r2t_sn) { spin_unlock_bh(& cmd->r2t_lock); return (r2t); } else { } __mptr___0 = (struct list_head const *)r2t->r2t_list.next; r2t = (struct iscsi_r2t *)__mptr___0 + 0xffffffffffffffe0UL; ldv_60218: ; if ((unsigned long )(& r2t->r2t_list) != (unsigned long )(& cmd->cmd_r2t_list)) { goto ldv_60217; } else { } spin_unlock_bh(& cmd->r2t_lock); return ((struct iscsi_r2t *)0); } } __inline static int iscsit_check_received_cmdsn(struct iscsi_session *sess , u32 cmdsn ) { int ret ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; int tmp___1 ; int tmp___2 ; { tmp___2 = iscsi_sna_gt(cmdsn, sess->max_cmd_sn); if (tmp___2 != 0) { printk("\vReceived CmdSN: 0x%08x is greater than MaxCmdSN: 0x%08x, ignoring.\n", cmdsn, sess->max_cmd_sn); ret = 3; } else if (sess->exp_cmd_sn == cmdsn) { sess->exp_cmd_sn = sess->exp_cmd_sn + 1U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_check_received_cmdsn"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor.format = "Received CmdSN matches ExpCmdSN, incremented ExpCmdSN to: 0x%08x\n"; descriptor.lineno = 254U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Received CmdSN matches ExpCmdSN, incremented ExpCmdSN to: 0x%08x\n", sess->exp_cmd_sn); } else { } ret = 0; } else { tmp___1 = iscsi_sna_gt(cmdsn, sess->exp_cmd_sn); if (tmp___1 != 0) { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_check_received_cmdsn"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor___0.format = "Received CmdSN: 0x%08x is greater than ExpCmdSN: 0x%08x, not acknowledging.\n"; descriptor___0.lineno = 260U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Received CmdSN: 0x%08x is greater than ExpCmdSN: 0x%08x, not acknowledging.\n", cmdsn, sess->exp_cmd_sn); } else { } ret = 2; } else { printk("\vReceived CmdSN: 0x%08x is less than ExpCmdSN: 0x%08x, ignoring.\n", cmdsn, sess->exp_cmd_sn); ret = 1; } } return (ret); } } int iscsit_sequence_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf , __be32 cmdsn ) { int ret ; int cmdsn_ret ; bool reject ; u8 reason ; __u32 tmp ; int tmp___0 ; __u32 tmp___1 ; { reject = 0; reason = 10U; ldv_mutex_lock_425(& (conn->sess)->cmdsn_mutex); tmp = __fswab32(cmdsn); cmdsn_ret = iscsit_check_received_cmdsn(conn->sess, tmp); switch (cmdsn_ret) { case 0: ret = iscsit_execute_cmd(cmd, 0); if (ret >= 0) { tmp___0 = list_empty((struct list_head const *)(& (conn->sess)->sess_ooo_cmdsn_list)); if (tmp___0 == 0) { iscsit_execute_ooo_cmdsns(conn->sess); } else { goto _L; } } else _L: /* CIL Label */ if (ret < 0) { reject = 1; ret = -1; } else { } goto ldv_60239; case 2: tmp___1 = __fswab32(cmdsn); ret = iscsit_handle_ooo_cmdsn(conn->sess, cmd, tmp___1); if (ret < 0) { reject = 1; ret = -1; goto ldv_60239; } else { } ret = 2; goto ldv_60239; case 1: ; case 3: ; default: cmd->i_state = 41; iscsit_add_cmd_to_immediate_queue(cmd, conn, (int )((u8 )cmd->i_state)); ret = 1; goto ldv_60239; } ldv_60239: ldv_mutex_unlock_426(& (conn->sess)->cmdsn_mutex); if ((int )reject) { iscsit_reject_cmd(cmd, (int )reason, buf); } else { } return (ret); } } static char const __kstrtab_iscsit_sequence_cmd[20U] = { 'i', 's', 'c', 's', 'i', 't', '_', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_sequence_cmd ; struct kernel_symbol const __ksymtab_iscsit_sequence_cmd = {(unsigned long )(& iscsit_sequence_cmd), (char const *)(& __kstrtab_iscsit_sequence_cmd)}; int iscsit_check_unsolicited_dataout(struct iscsi_cmd *cmd , unsigned char *buf ) { struct iscsi_conn *conn ; struct se_cmd *se_cmd ; struct iscsi_data *hdr ; u32 payload_length ; { conn = cmd->conn; se_cmd = & cmd->se_cmd; hdr = (struct iscsi_data *)buf; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((unsigned int )((conn->sess)->sess_ops)->InitialR2T != 0U) { printk("\vReceived unexpected unsolicited data while InitialR2T=Yes, protocol error.\n"); transport_send_check_condition_and_sense(se_cmd, 4U, 0); return (-1); } else { } if (cmd->first_burst_len + payload_length > ((conn->sess)->sess_ops)->FirstBurstLength) { printk("\vTotal %u bytes exceeds FirstBurstLength: %u for this Unsolicited DataOut Burst.\n", cmd->first_burst_len + payload_length, ((conn->sess)->sess_ops)->FirstBurstLength); transport_send_check_condition_and_sense(se_cmd, 3U, 0); return (-1); } else { } if ((int )((signed char )hdr->flags) >= 0) { return (0); } else { } if (cmd->first_burst_len + payload_length != cmd->se_cmd.data_length && cmd->first_burst_len + payload_length != ((conn->sess)->sess_ops)->FirstBurstLength) { printk("\vUnsolicited non-immediate data received %u does not equal FirstBurstLength: %u, and does not equal ExpXferLen %u.\n", cmd->first_burst_len + payload_length, ((conn->sess)->sess_ops)->FirstBurstLength, cmd->se_cmd.data_length); transport_send_check_condition_and_sense(se_cmd, 3U, 0); return (-1); } else { } return (0); } } struct iscsi_cmd *iscsit_find_cmd_from_itt(struct iscsi_conn *conn , itt_t init_task_tag ) { struct iscsi_cmd *cmd ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock_bh(& conn->cmd_lock); __mptr = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; goto ldv_60272; ldv_60271: ; if (cmd->init_task_tag == init_task_tag) { spin_unlock_bh(& conn->cmd_lock); return (cmd); } else { } __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; ldv_60272: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_60271; } else { } spin_unlock_bh(& conn->cmd_lock); printk("\vUnable to locate ITT: 0x%08x on CID: %hu", init_task_tag, (int )conn->cid); return ((struct iscsi_cmd *)0); } } static char const __kstrtab_iscsit_find_cmd_from_itt[25U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'f', 'i', 'n', 'd', '_', 'c', 'm', 'd', '_', 'f', 'r', 'o', 'm', '_', 'i', 't', 't', '\000'}; struct kernel_symbol const __ksymtab_iscsit_find_cmd_from_itt ; struct kernel_symbol const __ksymtab_iscsit_find_cmd_from_itt = {(unsigned long )(& iscsit_find_cmd_from_itt), (char const *)(& __kstrtab_iscsit_find_cmd_from_itt)}; struct iscsi_cmd *iscsit_find_cmd_from_itt_or_dump(struct iscsi_conn *conn , itt_t init_task_tag , u32 length ) { struct iscsi_cmd *cmd ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock_bh(& conn->cmd_lock); __mptr = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; goto ldv_60294; ldv_60293: ; if ((int )cmd->cmd_flags & 1) { goto ldv_60292; } else { } if (cmd->init_task_tag == init_task_tag) { spin_unlock_bh(& conn->cmd_lock); return (cmd); } else { } ldv_60292: __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; ldv_60294: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_60293; } else { } spin_unlock_bh(& conn->cmd_lock); printk("\vUnable to locate ITT: 0x%08x on CID: %hu, dumping payload\n", init_task_tag, (int )conn->cid); if (length != 0U) { iscsit_dump_data_payload(conn, length, 1); } else { } return ((struct iscsi_cmd *)0); } } struct iscsi_cmd *iscsit_find_cmd_from_ttt(struct iscsi_conn *conn , u32 targ_xfer_tag ) { struct iscsi_cmd *cmd ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { cmd = (struct iscsi_cmd *)0; spin_lock_bh(& conn->cmd_lock); __mptr = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; goto ldv_60306; ldv_60305: ; if (cmd->targ_xfer_tag == targ_xfer_tag) { spin_unlock_bh(& conn->cmd_lock); return (cmd); } else { } __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; ldv_60306: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_60305; } else { } spin_unlock_bh(& conn->cmd_lock); printk("\vUnable to locate TTT: 0x%08x on CID: %hu\n", targ_xfer_tag, (int )conn->cid); return ((struct iscsi_cmd *)0); } } int iscsit_find_cmd_for_recovery(struct iscsi_session *sess , struct iscsi_cmd **cmd_ptr , struct iscsi_conn_recovery **cr_ptr , itt_t init_task_tag ) { struct iscsi_cmd *cmd ; struct iscsi_conn_recovery *cr ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; struct list_head const *__mptr___4 ; struct list_head const *__mptr___5 ; struct list_head const *__mptr___6 ; { cmd = (struct iscsi_cmd *)0; spin_lock(& sess->cr_i_lock); __mptr = (struct list_head const *)sess->cr_inactive_list.next; cr = (struct iscsi_conn_recovery *)__mptr + 0xffffffffffffff08UL; goto ldv_60328; ldv_60327: spin_lock(& cr->conn_recovery_cmd_lock); __mptr___0 = (struct list_head const *)cr->conn_recovery_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; goto ldv_60325; ldv_60324: ; if (cmd->init_task_tag == init_task_tag) { spin_unlock(& cr->conn_recovery_cmd_lock); spin_unlock(& sess->cr_i_lock); *cr_ptr = cr; *cmd_ptr = cmd; return (-2); } else { } __mptr___1 = (struct list_head const *)cmd->i_conn_node.next; cmd = (struct iscsi_cmd *)__mptr___1 + 0xfffffffffffffc80UL; ldv_60325: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& cr->conn_recovery_cmd_list)) { goto ldv_60324; } else { } spin_unlock(& cr->conn_recovery_cmd_lock); __mptr___2 = (struct list_head const *)cr->cr_list.next; cr = (struct iscsi_conn_recovery *)__mptr___2 + 0xffffffffffffff08UL; ldv_60328: ; if ((unsigned long )(& cr->cr_list) != (unsigned long )(& sess->cr_inactive_list)) { goto ldv_60327; } else { } spin_unlock(& sess->cr_i_lock); spin_lock(& sess->cr_a_lock); __mptr___3 = (struct list_head const *)sess->cr_active_list.next; cr = (struct iscsi_conn_recovery *)__mptr___3 + 0xffffffffffffff08UL; goto ldv_60342; ldv_60341: spin_lock(& cr->conn_recovery_cmd_lock); __mptr___4 = (struct list_head const *)cr->conn_recovery_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr___4 + 0xfffffffffffffc80UL; goto ldv_60339; ldv_60338: ; if (cmd->init_task_tag == init_task_tag) { spin_unlock(& cr->conn_recovery_cmd_lock); spin_unlock(& sess->cr_a_lock); *cr_ptr = cr; *cmd_ptr = cmd; return (0); } else { } __mptr___5 = (struct list_head const *)cmd->i_conn_node.next; cmd = (struct iscsi_cmd *)__mptr___5 + 0xfffffffffffffc80UL; ldv_60339: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& cr->conn_recovery_cmd_list)) { goto ldv_60338; } else { } spin_unlock(& cr->conn_recovery_cmd_lock); __mptr___6 = (struct list_head const *)cr->cr_list.next; cr = (struct iscsi_conn_recovery *)__mptr___6 + 0xffffffffffffff08UL; ldv_60342: ; if ((unsigned long )(& cr->cr_list) != (unsigned long )(& sess->cr_active_list)) { goto ldv_60341; } else { } spin_unlock(& sess->cr_a_lock); return (-1); } } void iscsit_add_cmd_to_immediate_queue(struct iscsi_cmd *cmd , struct iscsi_conn *conn , u8 state ) { struct iscsi_queue_req *qr ; void *tmp ; { tmp = kmem_cache_zalloc(lio_qr_cache, 32U); qr = (struct iscsi_queue_req *)tmp; if ((unsigned long )qr == (unsigned long )((struct iscsi_queue_req *)0)) { printk("\vUnable to allocate memory for struct iscsi_queue_req\n"); return; } else { } INIT_LIST_HEAD(& qr->qr_list); qr->cmd = cmd; qr->state = (int )state; spin_lock_bh(& conn->immed_queue_lock); list_add_tail(& qr->qr_list, & conn->immed_queue_list); atomic_inc(& cmd->immed_queue_count); atomic_set(& conn->check_immediate_queue, 1); spin_unlock_bh(& conn->immed_queue_lock); __wake_up(& conn->queues_wq, 3U, 1, (void *)0); return; } } struct iscsi_queue_req *iscsit_get_cmd_from_immediate_queue(struct iscsi_conn *conn ) { struct iscsi_queue_req *qr ; int tmp ; struct list_head const *__mptr ; { spin_lock_bh(& conn->immed_queue_lock); tmp = list_empty((struct list_head const *)(& conn->immed_queue_list)); if (tmp != 0) { spin_unlock_bh(& conn->immed_queue_lock); return ((struct iscsi_queue_req *)0); } else { } __mptr = (struct list_head const *)conn->immed_queue_list.next; qr = (struct iscsi_queue_req *)__mptr + 0xfffffffffffffff0UL; list_del(& qr->qr_list); if ((unsigned long )qr->cmd != (unsigned long )((struct iscsi_cmd *)0)) { atomic_dec(& (qr->cmd)->immed_queue_count); } else { } spin_unlock_bh(& conn->immed_queue_lock); return (qr); } } static void iscsit_remove_cmd_from_immediate_queue(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_queue_req *qr ; struct iscsi_queue_req *qr_tmp ; int tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; int tmp___0 ; int tmp___1 ; { spin_lock_bh(& conn->immed_queue_lock); tmp = atomic_read((atomic_t const *)(& cmd->immed_queue_count)); if (tmp == 0) { spin_unlock_bh(& conn->immed_queue_lock); return; } else { } __mptr = (struct list_head const *)conn->immed_queue_list.next; qr = (struct iscsi_queue_req *)__mptr + 0xfffffffffffffff0UL; __mptr___0 = (struct list_head const *)qr->qr_list.next; qr_tmp = (struct iscsi_queue_req *)__mptr___0 + 0xfffffffffffffff0UL; goto ldv_60370; ldv_60369: ; if ((unsigned long )qr->cmd != (unsigned long )cmd) { goto ldv_60368; } else { } atomic_dec(& (qr->cmd)->immed_queue_count); list_del(& qr->qr_list); kmem_cache_free(lio_qr_cache, (void *)qr); ldv_60368: qr = qr_tmp; __mptr___1 = (struct list_head const *)qr_tmp->qr_list.next; qr_tmp = (struct iscsi_queue_req *)__mptr___1 + 0xfffffffffffffff0UL; ldv_60370: ; if ((unsigned long )(& qr->qr_list) != (unsigned long )(& conn->immed_queue_list)) { goto ldv_60369; } else { } spin_unlock_bh(& conn->immed_queue_lock); tmp___1 = atomic_read((atomic_t const *)(& cmd->immed_queue_count)); if (tmp___1 != 0) { tmp___0 = atomic_read((atomic_t const *)(& cmd->immed_queue_count)); printk("\vITT: 0x%08x immed_queue_count: %d\n", cmd->init_task_tag, tmp___0); } else { } return; } } void iscsit_add_cmd_to_response_queue(struct iscsi_cmd *cmd , struct iscsi_conn *conn , u8 state ) { struct iscsi_queue_req *qr ; void *tmp ; { tmp = kmem_cache_zalloc(lio_qr_cache, 32U); qr = (struct iscsi_queue_req *)tmp; if ((unsigned long )qr == (unsigned long )((struct iscsi_queue_req *)0)) { printk("\vUnable to allocate memory for struct iscsi_queue_req\n"); return; } else { } INIT_LIST_HEAD(& qr->qr_list); qr->cmd = cmd; qr->state = (int )state; spin_lock_bh(& conn->response_queue_lock); list_add_tail(& qr->qr_list, & conn->response_queue_list); atomic_inc(& cmd->response_queue_count); spin_unlock_bh(& conn->response_queue_lock); __wake_up(& conn->queues_wq, 3U, 1, (void *)0); return; } } struct iscsi_queue_req *iscsit_get_cmd_from_response_queue(struct iscsi_conn *conn ) { struct iscsi_queue_req *qr ; int tmp ; struct list_head const *__mptr ; { spin_lock_bh(& conn->response_queue_lock); tmp = list_empty((struct list_head const *)(& conn->response_queue_list)); if (tmp != 0) { spin_unlock_bh(& conn->response_queue_lock); return ((struct iscsi_queue_req *)0); } else { } __mptr = (struct list_head const *)conn->response_queue_list.next; qr = (struct iscsi_queue_req *)__mptr + 0xfffffffffffffff0UL; list_del(& qr->qr_list); if ((unsigned long )qr->cmd != (unsigned long )((struct iscsi_cmd *)0)) { atomic_dec(& (qr->cmd)->response_queue_count); } else { } spin_unlock_bh(& conn->response_queue_lock); return (qr); } } static void iscsit_remove_cmd_from_response_queue(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_queue_req *qr ; struct iscsi_queue_req *qr_tmp ; int tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; int tmp___0 ; int tmp___1 ; { spin_lock_bh(& conn->response_queue_lock); tmp = atomic_read((atomic_t const *)(& cmd->response_queue_count)); if (tmp == 0) { spin_unlock_bh(& conn->response_queue_lock); return; } else { } __mptr = (struct list_head const *)conn->response_queue_list.next; qr = (struct iscsi_queue_req *)__mptr + 0xfffffffffffffff0UL; __mptr___0 = (struct list_head const *)qr->qr_list.next; qr_tmp = (struct iscsi_queue_req *)__mptr___0 + 0xfffffffffffffff0UL; goto ldv_60398; ldv_60397: ; if ((unsigned long )qr->cmd != (unsigned long )cmd) { goto ldv_60396; } else { } atomic_dec(& (qr->cmd)->response_queue_count); list_del(& qr->qr_list); kmem_cache_free(lio_qr_cache, (void *)qr); ldv_60396: qr = qr_tmp; __mptr___1 = (struct list_head const *)qr_tmp->qr_list.next; qr_tmp = (struct iscsi_queue_req *)__mptr___1 + 0xfffffffffffffff0UL; ldv_60398: ; if ((unsigned long )(& qr->qr_list) != (unsigned long )(& conn->response_queue_list)) { goto ldv_60397; } else { } spin_unlock_bh(& conn->response_queue_lock); tmp___1 = atomic_read((atomic_t const *)(& cmd->response_queue_count)); if (tmp___1 != 0) { tmp___0 = atomic_read((atomic_t const *)(& cmd->response_queue_count)); printk("\vITT: 0x%08x response_queue_count: %d\n", cmd->init_task_tag, tmp___0); } else { } return; } } bool iscsit_conn_all_queues_empty(struct iscsi_conn *conn ) { bool empty ; int tmp ; int tmp___0 ; { spin_lock_bh(& conn->immed_queue_lock); tmp = list_empty((struct list_head const *)(& conn->immed_queue_list)); empty = tmp != 0; spin_unlock_bh(& conn->immed_queue_lock); if (! empty) { return (empty); } else { } spin_lock_bh(& conn->response_queue_lock); tmp___0 = list_empty((struct list_head const *)(& conn->response_queue_list)); empty = tmp___0 != 0; spin_unlock_bh(& conn->response_queue_lock); return (empty); } } void iscsit_free_queue_reqs_for_conn(struct iscsi_conn *conn ) { struct iscsi_queue_req *qr ; struct iscsi_queue_req *qr_tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; struct list_head const *__mptr___4 ; { spin_lock_bh(& conn->immed_queue_lock); __mptr = (struct list_head const *)conn->immed_queue_list.next; qr = (struct iscsi_queue_req *)__mptr + 0xfffffffffffffff0UL; __mptr___0 = (struct list_head const *)qr->qr_list.next; qr_tmp = (struct iscsi_queue_req *)__mptr___0 + 0xfffffffffffffff0UL; goto ldv_60416; ldv_60415: list_del(& qr->qr_list); if ((unsigned long )qr->cmd != (unsigned long )((struct iscsi_cmd *)0)) { atomic_dec(& (qr->cmd)->immed_queue_count); } else { } kmem_cache_free(lio_qr_cache, (void *)qr); qr = qr_tmp; __mptr___1 = (struct list_head const *)qr_tmp->qr_list.next; qr_tmp = (struct iscsi_queue_req *)__mptr___1 + 0xfffffffffffffff0UL; ldv_60416: ; if ((unsigned long )(& qr->qr_list) != (unsigned long )(& conn->immed_queue_list)) { goto ldv_60415; } else { } spin_unlock_bh(& conn->immed_queue_lock); spin_lock_bh(& conn->response_queue_lock); __mptr___2 = (struct list_head const *)conn->response_queue_list.next; qr = (struct iscsi_queue_req *)__mptr___2 + 0xfffffffffffffff0UL; __mptr___3 = (struct list_head const *)qr->qr_list.next; qr_tmp = (struct iscsi_queue_req *)__mptr___3 + 0xfffffffffffffff0UL; goto ldv_60425; ldv_60424: list_del(& qr->qr_list); if ((unsigned long )qr->cmd != (unsigned long )((struct iscsi_cmd *)0)) { atomic_dec(& (qr->cmd)->response_queue_count); } else { } kmem_cache_free(lio_qr_cache, (void *)qr); qr = qr_tmp; __mptr___4 = (struct list_head const *)qr_tmp->qr_list.next; qr_tmp = (struct iscsi_queue_req *)__mptr___4 + 0xfffffffffffffff0UL; ldv_60425: ; if ((unsigned long )(& qr->qr_list) != (unsigned long )(& conn->response_queue_list)) { goto ldv_60424; } else { } spin_unlock_bh(& conn->response_queue_lock); return; } } void iscsit_release_cmd(struct iscsi_cmd *cmd ) { struct iscsi_session *sess ; struct se_cmd *se_cmd ; long tmp ; { se_cmd = & cmd->se_cmd; if ((unsigned long )cmd->conn != (unsigned long )((struct iscsi_conn *)0)) { sess = (cmd->conn)->sess; } else { sess = cmd->sess; } tmp = ldv__builtin_expect((long )((unsigned long )sess == (unsigned long )((struct iscsi_session *)0) || (unsigned long )sess->se_sess == (unsigned long )((struct se_session *)0)), 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"), "i" (696), "i" (12UL)); ldv_60432: ; goto ldv_60432; } else { } kfree((void const *)cmd->buf_ptr); kfree((void const *)cmd->pdu_list); kfree((void const *)cmd->seq_list); kfree((void const *)cmd->tmr_req); kfree((void const *)cmd->iov_data); kfree((void const *)cmd->text_in_ptr); percpu_ida_free(& (sess->se_sess)->sess_tag_pool, se_cmd->map_tag); return; } } static char const __kstrtab_iscsit_release_cmd[19U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'r', 'e', 'l', 'e', 'a', 's', 'e', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_release_cmd ; struct kernel_symbol const __ksymtab_iscsit_release_cmd = {(unsigned long )(& iscsit_release_cmd), (char const *)(& __kstrtab_iscsit_release_cmd)}; void __iscsit_free_cmd(struct iscsi_cmd *cmd , bool scsi_cmd , bool check_queues ) { struct iscsi_conn *conn ; { conn = cmd->conn; if ((int )scsi_cmd) { if ((unsigned int )cmd->data_direction == 1U) { iscsit_stop_dataout_timer(cmd); iscsit_free_r2ts_from_list(cmd); } else { } if ((unsigned int )cmd->data_direction == 2U) { iscsit_free_all_datain_reqs(cmd); } else { } } else { } if ((unsigned long )conn != (unsigned long )((struct iscsi_conn *)0) && (int )check_queues) { iscsit_remove_cmd_from_immediate_queue(cmd, conn); iscsit_remove_cmd_from_response_queue(cmd, conn); } else { } return; } } void iscsit_free_cmd(struct iscsi_cmd *cmd , bool shutdown ) { struct se_cmd *se_cmd ; int rc ; { se_cmd = (struct se_cmd *)0; switch ((int )cmd->iscsi_opcode) { case 1: se_cmd = & cmd->se_cmd; __iscsit_free_cmd(cmd, 1, (int )shutdown); case 2: rc = transport_generic_free_cmd(& cmd->se_cmd, (int )shutdown); if (((rc == 0 && (int )shutdown) && (unsigned long )se_cmd != (unsigned long )((struct se_cmd *)0)) && (unsigned long )se_cmd->se_sess != (unsigned long )((struct se_session *)0)) { __iscsit_free_cmd(cmd, 1, (int )shutdown); target_put_sess_cmd(se_cmd); } else { } goto ldv_60454; case 63: ; if ((unsigned long )cmd->se_cmd.se_tfo != (unsigned long )((struct target_core_fabric_ops const *)0)) { se_cmd = & cmd->se_cmd; __iscsit_free_cmd(cmd, 1, (int )shutdown); rc = transport_generic_free_cmd(& cmd->se_cmd, (int )shutdown); if ((rc == 0 && (int )shutdown) && (unsigned long )se_cmd->se_sess != (unsigned long )((struct se_session *)0)) { __iscsit_free_cmd(cmd, 1, (int )shutdown); target_put_sess_cmd(se_cmd); } else { } goto ldv_60454; } else { } default: __iscsit_free_cmd(cmd, 0, (int )shutdown); iscsit_release_cmd(cmd); goto ldv_60454; } ldv_60454: ; return; } } int iscsit_check_session_usage_count(struct iscsi_session *sess ) { int tmp ; { spin_lock_bh(& sess->session_usage_lock); if (sess->session_usage_count != 0) { sess->session_waiting_on_uc = 1; spin_unlock_bh(& sess->session_usage_lock); tmp = preempt_count(); if (((unsigned long )tmp & 2096896UL) != 0UL) { return (2); } else { } wait_for_completion(& sess->session_waiting_on_uc_comp); return (1); } else { } spin_unlock_bh(& sess->session_usage_lock); return (0); } } void iscsit_dec_session_usage_count(struct iscsi_session *sess ) { { spin_lock_bh(& sess->session_usage_lock); sess->session_usage_count = sess->session_usage_count - 1; if (sess->session_usage_count == 0 && sess->session_waiting_on_uc != 0) { complete(& sess->session_waiting_on_uc_comp); } else { } spin_unlock_bh(& sess->session_usage_lock); return; } } void iscsit_inc_session_usage_count(struct iscsi_session *sess ) { { spin_lock_bh(& sess->session_usage_lock); sess->session_usage_count = sess->session_usage_count + 1; spin_unlock_bh(& sess->session_usage_lock); return; } } struct iscsi_conn *iscsit_get_conn_from_cid(struct iscsi_session *sess , u16 cid ) { struct iscsi_conn *conn ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock_bh(& sess->conn_lock); __mptr = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_60476; ldv_60475: ; if ((int )conn->cid == (int )cid && (unsigned int )conn->conn_state == 5U) { iscsit_inc_conn_usage_count(conn); spin_unlock_bh(& sess->conn_lock); return (conn); } else { } __mptr___0 = (struct list_head const *)conn->conn_list.next; conn = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_60476: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_60475; } else { } spin_unlock_bh(& sess->conn_lock); return ((struct iscsi_conn *)0); } } struct iscsi_conn *iscsit_get_conn_from_cid_rcfr(struct iscsi_session *sess , u16 cid ) { struct iscsi_conn *conn ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock_bh(& sess->conn_lock); __mptr = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_60488; ldv_60487: ; if ((int )conn->cid == (int )cid) { iscsit_inc_conn_usage_count(conn); spin_lock(& conn->state_lock); atomic_set(& conn->connection_wait_rcfr, 1); spin_unlock(& conn->state_lock); spin_unlock_bh(& sess->conn_lock); return (conn); } else { } __mptr___0 = (struct list_head const *)conn->conn_list.next; conn = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_60488: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_60487; } else { } spin_unlock_bh(& sess->conn_lock); return ((struct iscsi_conn *)0); } } void iscsit_check_conn_usage_count(struct iscsi_conn *conn ) { { spin_lock_bh(& conn->conn_usage_lock); if (conn->conn_usage_count != 0) { conn->conn_waiting_on_uc = 1; spin_unlock_bh(& conn->conn_usage_lock); wait_for_completion(& conn->conn_waiting_on_uc_comp); return; } else { } spin_unlock_bh(& conn->conn_usage_lock); return; } } void iscsit_dec_conn_usage_count(struct iscsi_conn *conn ) { { spin_lock_bh(& conn->conn_usage_lock); conn->conn_usage_count = conn->conn_usage_count - 1; if (conn->conn_usage_count == 0 && conn->conn_waiting_on_uc != 0) { complete(& conn->conn_waiting_on_uc_comp); } else { } spin_unlock_bh(& conn->conn_usage_lock); return; } } void iscsit_inc_conn_usage_count(struct iscsi_conn *conn ) { { spin_lock_bh(& conn->conn_usage_lock); conn->conn_usage_count = conn->conn_usage_count + 1; spin_unlock_bh(& conn->conn_usage_lock); return; } } static int iscsit_add_nopin(struct iscsi_conn *conn , int want_response ) { u8 state ; struct iscsi_cmd *cmd ; u32 tmp ; { cmd = iscsit_allocate_cmd(conn, 0); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { return (-1); } else { } cmd->iscsi_opcode = 32U; state = want_response != 0 ? 38U : 40U; cmd->init_task_tag = 4294967295U; if (want_response != 0) { tmp = session_get_next_ttt(conn->sess); cmd->targ_xfer_tag = tmp; } else { cmd->targ_xfer_tag = 4294967295U; } spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); if (want_response != 0) { iscsit_start_nopin_response_timer(conn); } else { } iscsit_add_cmd_to_immediate_queue(cmd, conn, (int )state); return (0); } } static void iscsit_handle_nopin_response_timeout(unsigned long data ) { struct iscsi_conn *conn ; struct _ddebug descriptor ; long tmp ; struct iscsi_portal_group *tpg ; struct iscsi_tiqn *tiqn ; { conn = (struct iscsi_conn *)data; iscsit_inc_conn_usage_count(conn); spin_lock_bh(& conn->nopin_timer_lock); if (((unsigned int )conn->nopin_response_timer_flags & 2U) != 0U) { spin_unlock_bh(& conn->nopin_timer_lock); iscsit_dec_conn_usage_count(conn); return; } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_nopin_response_timeout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor.format = "Did not receive response to NOPIN on CID: %hu on SID: %u, failing connection.\n"; descriptor.lineno = 921U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Did not receive response to NOPIN on CID: %hu on SID: %u, failing connection.\n", (int )conn->cid, (conn->sess)->sid); } else { } conn->nopin_response_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_response_timer_flags & 4294967294U); spin_unlock_bh(& conn->nopin_timer_lock); tpg = (conn->sess)->tpg; tiqn = tpg->tpg_tiqn; if ((unsigned long )tiqn != (unsigned long )((struct iscsi_tiqn *)0)) { spin_lock_bh(& tiqn->sess_err_stats.lock); strcpy((char *)(& tiqn->sess_err_stats.last_sess_fail_rem_name), (char const *)(& ((conn->sess)->sess_ops)->InitiatorName)); tiqn->sess_err_stats.last_sess_failure_type = 2U; tiqn->sess_err_stats.cxn_timeout_errors = tiqn->sess_err_stats.cxn_timeout_errors + 1U; atomic_long_inc(& (conn->sess)->conn_timeout_errors); spin_unlock_bh(& tiqn->sess_err_stats.lock); } else { } iscsit_cause_connection_reinstatement(conn, 0); iscsit_dec_conn_usage_count(conn); return; } } void iscsit_mod_nopin_response_timer(struct iscsi_conn *conn ) { struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct iscsi_node_attrib *tmp ; u64 tmp___0 ; { sess = conn->sess; tmp = iscsit_tpg_get_node_attrib(sess); na = tmp; spin_lock_bh(& conn->nopin_timer_lock); if (((unsigned int )conn->nopin_response_timer_flags & 1U) == 0U) { spin_unlock_bh(& conn->nopin_timer_lock); return; } else { } tmp___0 = get_jiffies_64(); ldv_mod_timer_427(& conn->nopin_response_timer, (unsigned long )(tmp___0 + (u64 )(na->nopin_response_timeout * 250U))); spin_unlock_bh(& conn->nopin_timer_lock); return; } } void iscsit_start_nopin_response_timer(struct iscsi_conn *conn ) { struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct iscsi_node_attrib *tmp ; u64 tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; { sess = conn->sess; tmp = iscsit_tpg_get_node_attrib(sess); na = tmp; spin_lock_bh(& conn->nopin_timer_lock); if ((int )conn->nopin_response_timer_flags & 1) { spin_unlock_bh(& conn->nopin_timer_lock); return; } else { } reg_timer_8(& conn->nopin_response_timer); tmp___0 = get_jiffies_64(); conn->nopin_response_timer.expires = (unsigned long )(tmp___0 + (u64 )(na->nopin_response_timeout * 250U)); conn->nopin_response_timer.data = (unsigned long )conn; conn->nopin_response_timer.function = & iscsit_handle_nopin_response_timeout; conn->nopin_response_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_response_timer_flags & 4294967293U); conn->nopin_response_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_response_timer_flags | 1U); add_timer(& conn->nopin_response_timer); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_start_nopin_response_timer"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor.format = "Started NOPIN Response Timer on CID: %d to %u seconds\n"; descriptor.lineno = 985U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Started NOPIN Response Timer on CID: %d to %u seconds\n", (int )conn->cid, na->nopin_response_timeout); } else { } spin_unlock_bh(& conn->nopin_timer_lock); return; } } void iscsit_stop_nopin_response_timer(struct iscsi_conn *conn ) { { spin_lock_bh(& conn->nopin_timer_lock); if (((unsigned int )conn->nopin_response_timer_flags & 1U) == 0U) { spin_unlock_bh(& conn->nopin_timer_lock); return; } else { } conn->nopin_response_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_response_timer_flags | 2U); spin_unlock_bh(& conn->nopin_timer_lock); ldv_del_timer_sync_428(& conn->nopin_response_timer); spin_lock_bh(& conn->nopin_timer_lock); conn->nopin_response_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_response_timer_flags & 4294967294U); spin_unlock_bh(& conn->nopin_timer_lock); return; } } static void iscsit_handle_nopin_timeout(unsigned long data ) { struct iscsi_conn *conn ; { conn = (struct iscsi_conn *)data; iscsit_inc_conn_usage_count(conn); spin_lock_bh(& conn->nopin_timer_lock); if (((unsigned int )conn->nopin_timer_flags & 2U) != 0U) { spin_unlock_bh(& conn->nopin_timer_lock); iscsit_dec_conn_usage_count(conn); return; } else { } conn->nopin_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_timer_flags & 4294967294U); spin_unlock_bh(& conn->nopin_timer_lock); iscsit_add_nopin(conn, 1); iscsit_dec_conn_usage_count(conn); return; } } void __iscsit_start_nopin_timer(struct iscsi_conn *conn ) { struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct iscsi_node_attrib *tmp ; u64 tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; { sess = conn->sess; tmp = iscsit_tpg_get_node_attrib(sess); na = tmp; if (na->nopin_timeout == 0U) { return; } else { } if ((int )conn->nopin_timer_flags & 1) { return; } else { } reg_timer_8(& conn->nopin_timer); tmp___0 = get_jiffies_64(); conn->nopin_timer.expires = (unsigned long )(tmp___0 + (u64 )(na->nopin_timeout * 250U)); conn->nopin_timer.data = (unsigned long )conn; conn->nopin_timer.function = & iscsit_handle_nopin_timeout; conn->nopin_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_timer_flags & 4294967293U); conn->nopin_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_timer_flags | 1U); add_timer(& conn->nopin_timer); descriptor.modname = "iscsi_target_mod"; descriptor.function = "__iscsit_start_nopin_timer"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor.format = "Started NOPIN Timer on CID: %d at %u second interval\n"; descriptor.lineno = 1050U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Started NOPIN Timer on CID: %d at %u second interval\n", (int )conn->cid, na->nopin_timeout); } else { } return; } } void iscsit_start_nopin_timer(struct iscsi_conn *conn ) { struct iscsi_session *sess ; struct iscsi_node_attrib *na ; struct iscsi_node_attrib *tmp ; u64 tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; { sess = conn->sess; tmp = iscsit_tpg_get_node_attrib(sess); na = tmp; if (na->nopin_timeout == 0U) { return; } else { } spin_lock_bh(& conn->nopin_timer_lock); if ((int )conn->nopin_timer_flags & 1) { spin_unlock_bh(& conn->nopin_timer_lock); return; } else { } reg_timer_8(& conn->nopin_timer); tmp___0 = get_jiffies_64(); conn->nopin_timer.expires = (unsigned long )(tmp___0 + (u64 )(na->nopin_timeout * 250U)); conn->nopin_timer.data = (unsigned long )conn; conn->nopin_timer.function = & iscsit_handle_nopin_timeout; conn->nopin_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_timer_flags & 4294967293U); conn->nopin_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_timer_flags | 1U); add_timer(& conn->nopin_timer); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_start_nopin_timer"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor.format = "Started NOPIN Timer on CID: %d at %u second interval\n"; descriptor.lineno = 1078U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Started NOPIN Timer on CID: %d at %u second interval\n", (int )conn->cid, na->nopin_timeout); } else { } spin_unlock_bh(& conn->nopin_timer_lock); return; } } void iscsit_stop_nopin_timer(struct iscsi_conn *conn ) { { spin_lock_bh(& conn->nopin_timer_lock); if (((unsigned int )conn->nopin_timer_flags & 1U) == 0U) { spin_unlock_bh(& conn->nopin_timer_lock); return; } else { } conn->nopin_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_timer_flags | 2U); spin_unlock_bh(& conn->nopin_timer_lock); ldv_del_timer_sync_429(& conn->nopin_timer); spin_lock_bh(& conn->nopin_timer_lock); conn->nopin_timer_flags = (enum iscsi_timer_flags_table )((unsigned int )conn->nopin_timer_flags & 4294967294U); spin_unlock_bh(& conn->nopin_timer_lock); return; } } int iscsit_send_tx_data(struct iscsi_cmd *cmd , struct iscsi_conn *conn , int use_misc ) { int tx_sent ; int tx_size ; u32 iov_count ; struct kvec *iov ; { send_data: tx_size = (int )cmd->tx_size; if (use_misc == 0) { iov = cmd->iov_data; iov_count = cmd->iov_data_count; } else { iov = (struct kvec *)(& cmd->iov_misc); iov_count = cmd->iov_misc_count; } tx_sent = tx_data(conn, iov, (int )iov_count, tx_size); if (tx_size != tx_sent) { if (tx_sent == -11) { printk("\vtx_data() returned -EAGAIN\n"); goto send_data; } else { return (-1); } } else { } cmd->tx_size = 0U; return (0); } } int iscsit_fe_sendpage_sg(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct scatterlist *sg ; struct kvec iov ; u32 tx_hdr_size ; u32 data_len ; u32 offset ; int tx_sent ; int iov_off ; u32 space ; u32 sub_len ; u32 __min1 ; u32 __min2 ; struct page *tmp ; ssize_t tmp___0 ; struct kvec *iov_p ; int tmp___1 ; struct kvec *iov_d ; { sg = cmd->first_data_sg; offset = cmd->first_data_sg_off; send_hdr: tx_hdr_size = 48U; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { tx_hdr_size = tx_hdr_size + 4U; } else { } iov.iov_base = (void *)(& cmd->pdu); iov.iov_len = (size_t )tx_hdr_size; tx_sent = tx_data(conn, & iov, 1, (int )tx_hdr_size); if ((u32 )tx_sent != tx_hdr_size) { if (tx_sent == -11) { printk("\vtx_data() returned -EAGAIN\n"); goto send_hdr; } else { } return (-1); } else { } data_len = (cmd->tx_size - tx_hdr_size) - cmd->padding; if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { data_len = data_len - 4U; if (cmd->padding != 0U) { iov_off = (int )(cmd->iov_data_count - 2U); } else { iov_off = (int )(cmd->iov_data_count - 1U); } } else { iov_off = (int )(cmd->iov_data_count - 1U); } goto ldv_60578; ldv_60577: space = sg->length - offset; __min1 = data_len; __min2 = space; sub_len = __min1 < __min2 ? __min1 : __min2; send_pg: tmp = sg_page(sg); tmp___0 = (*(((conn->sock)->ops)->sendpage))(conn->sock, tmp, (int )(sg->offset + offset), (size_t )sub_len, 0); tx_sent = (int )tmp___0; if ((u32 )tx_sent != sub_len) { if (tx_sent == -11) { printk("\vtcp_sendpage() returned -EAGAIN\n"); goto send_pg; } else { } printk("\vtcp_sendpage() failure: %d\n", tx_sent); return (-1); } else { } data_len = data_len - sub_len; offset = 0U; sg = sg_next(sg); ldv_60578: ; if (data_len != 0U) { goto ldv_60577; } else { } send_padding: ; if (cmd->padding != 0U) { tmp___1 = iov_off; iov_off = iov_off + 1; iov_p = cmd->iov_data + (unsigned long )tmp___1; tx_sent = tx_data(conn, iov_p, 1, (int )cmd->padding); if (cmd->padding != (u32 )tx_sent) { if (tx_sent == -11) { printk("\vtx_data() returned -EAGAIN\n"); goto send_padding; } else { } return (-1); } else { } } else { } send_datacrc: ; if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iov_d = cmd->iov_data + (unsigned long )iov_off; tx_sent = tx_data(conn, iov_d, 1, 4); if (tx_sent != 4) { if (tx_sent == -11) { printk("\vtx_data() returned -EAGAIN\n"); goto send_datacrc; } else { } return (-1); } else { } } else { } return (0); } } int iscsit_tx_login_rsp(struct iscsi_conn *conn , u8 status_class , u8 status_detail ) { struct iscsi_login_rsp *hdr ; struct iscsi_login *login ; int tmp ; { login = conn->conn_login; login->login_failed = 1U; iscsit_collect_login_stats(conn, (int )status_class, (int )status_detail); memset((void *)(& login->rsp), 0, 48UL); hdr = (struct iscsi_login_rsp *)(& login->rsp); hdr->opcode = 35U; hdr->status_class = status_class; hdr->status_detail = status_detail; hdr->itt = conn->login_itt; tmp = (*((conn->conn_transport)->iscsit_put_login_tx))(conn, login, 0U); return (tmp); } } void iscsit_print_session_params(struct iscsi_session *sess ) { struct iscsi_conn *conn ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_print_session_params"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor.format = "-----------------------------[Session Params for SID: %u]-----------------------------\n"; descriptor.lineno = 1262U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "-----------------------------[Session Params for SID: %u]-----------------------------\n", sess->sid); } else { } spin_lock_bh(& sess->conn_lock); __mptr = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_60602; ldv_60601: iscsi_dump_conn_ops(conn->conn_ops); __mptr___0 = (struct list_head const *)conn->conn_list.next; conn = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_60602: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_60601; } else { } spin_unlock_bh(& sess->conn_lock); iscsi_dump_sess_ops(sess->sess_ops); return; } } static int iscsit_do_rx_data(struct iscsi_conn *conn , struct iscsi_data_count *count ) { int data ; int rx_loop ; int total_rx ; struct msghdr msg ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { data = count->data_length; rx_loop = 0; total_rx = 0; if (((unsigned long )conn == (unsigned long )((struct iscsi_conn *)0) || (unsigned long )conn->sock == (unsigned long )((struct socket *)0)) || (unsigned long )conn->conn_ops == (unsigned long )((struct iscsi_conn_ops *)0)) { return (-1); } else { } memset((void *)(& msg), 0, 88UL); iov_iter_kvec(& msg.msg_iter, 2, (struct kvec const *)count->iov, (unsigned long )count->iov_count, (size_t )data); goto ldv_60616; ldv_60615: rx_loop = sock_recvmsg(conn->sock, & msg, (size_t )(data - total_rx), 256); if (rx_loop <= 0) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_do_rx_data"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor.format = "rx_loop: %d total_rx: %d\n"; descriptor.lineno = 1290U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "rx_loop: %d total_rx: %d\n", rx_loop, total_rx); } else { } return (rx_loop); } else { } total_rx = total_rx + rx_loop; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_do_rx_data"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor___0.format = "rx_loop: %d, total_rx: %d, data: %d\n"; descriptor___0.lineno = 1295U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "rx_loop: %d, total_rx: %d, data: %d\n", rx_loop, total_rx, data); } else { } ldv_60616: ; if (total_rx < data) { goto ldv_60615; } else { } return (total_rx); } } static int iscsit_do_tx_data(struct iscsi_conn *conn , struct iscsi_data_count *count ) { int ret ; int iov_len ; struct kvec *iov_p ; struct msghdr msg ; struct _ddebug descriptor ; long tmp ; { if (((unsigned long )conn == (unsigned long )((struct iscsi_conn *)0) || (unsigned long )conn->sock == (unsigned long )((struct socket *)0)) || (unsigned long )conn->conn_ops == (unsigned long )((struct iscsi_conn_ops *)0)) { return (-1); } else { } if (count->data_length <= 0) { printk("\vData length is: %d\n", count->data_length); return (-1); } else { } memset((void *)(& msg), 0, 88UL); iov_p = count->iov; iov_len = (int )count->iov_count; ret = kernel_sendmsg(conn->sock, & msg, iov_p, (size_t )iov_len, (size_t )count->data_length); if (count->data_length != ret) { printk("\vUnexpected ret: %d send data %d\n", ret, count->data_length); return (-32); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_do_tx_data"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_util.c"; descriptor.format = "ret: %d, sent data: %d\n"; descriptor.lineno = 1329U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "ret: %d, sent data: %d\n", ret, count->data_length); } else { } return (ret); } } int rx_data(struct iscsi_conn *conn , struct kvec *iov , int iov_count , int data ) { struct iscsi_data_count c ; int tmp ; { if (((unsigned long )conn == (unsigned long )((struct iscsi_conn *)0) || (unsigned long )conn->sock == (unsigned long )((struct socket *)0)) || (unsigned long )conn->conn_ops == (unsigned long )((struct iscsi_conn_ops *)0)) { return (-1); } else { } memset((void *)(& c), 0, 32UL); c.iov = iov; c.iov_count = (u32 )iov_count; c.data_length = data; c.type = 1; tmp = iscsit_do_rx_data(conn, & c); return (tmp); } } int tx_data(struct iscsi_conn *conn , struct kvec *iov , int iov_count , int data ) { struct iscsi_data_count c ; int tmp ; { if (((unsigned long )conn == (unsigned long )((struct iscsi_conn *)0) || (unsigned long )conn->sock == (unsigned long )((struct socket *)0)) || (unsigned long )conn->conn_ops == (unsigned long )((struct iscsi_conn_ops *)0)) { return (-1); } else { } memset((void *)(& c), 0, 32UL); c.iov = iov; c.iov_count = (u32 )iov_count; c.data_length = data; c.type = 2; tmp = iscsit_do_tx_data(conn, & c); return (tmp); } } void iscsit_collect_login_stats(struct iscsi_conn *conn , u8 status_class , u8 status_detail ) { struct iscsi_param *intrname ; struct iscsi_tiqn *tiqn ; struct iscsi_login_stats *ls ; int tmp ; u64 tmp___0 ; { intrname = (struct iscsi_param *)0; tiqn = iscsit_snmp_get_tiqn(conn); if ((unsigned long )tiqn == (unsigned long )((struct iscsi_tiqn *)0)) { return; } else { } ls = & tiqn->login_stats; spin_lock(& ls->lock); tmp = strcmp((char const *)(& conn->login_ip), (char const *)(& ls->last_intr_fail_ip_addr)); if (tmp == 0) { tmp___0 = get_jiffies_64(); if (tmp___0 - ls->last_fail_time <= 9ULL) { spin_unlock(& ls->lock); return; } else { } } else { } if ((unsigned int )status_class == 0U) { ls->accepts = ls->accepts + 1U; } else if ((unsigned int )status_class == 1U) { ls->redirects = ls->redirects + 1U; ls->last_fail_type = 3U; } else if ((unsigned int )status_class == 2U && (unsigned int )status_detail == 1U) { ls->authenticate_fails = ls->authenticate_fails + 1U; ls->last_fail_type = 5U; } else if ((unsigned int )status_class == 2U && (unsigned int )status_detail == 2U) { ls->authorize_fails = ls->authorize_fails + 1U; ls->last_fail_type = 4U; } else if ((unsigned int )status_class == 2U && (unsigned int )status_detail == 0U) { ls->negotiate_fails = ls->negotiate_fails + 1U; ls->last_fail_type = 6U; } else { ls->other_fails = ls->other_fails + 1U; ls->last_fail_type = 2U; } if ((unsigned int )status_class != 0U) { if ((unsigned long )conn->param_list != (unsigned long )((struct iscsi_param_list *)0)) { intrname = iscsi_find_param_from_key((char *)"InitiatorName", conn->param_list); } else { } strlcpy((char *)(& ls->last_intr_fail_name), (unsigned long )intrname != (unsigned long )((struct iscsi_param *)0) ? (char const *)intrname->value : "Unknown", 224UL); ls->last_intr_fail_ip_family = conn->login_family; snprintf((char *)(& ls->last_intr_fail_ip_addr), 48UL, "%s", (unsigned char *)(& conn->login_ip)); ls->last_fail_time = get_jiffies_64(); } else { } spin_unlock(& ls->lock); return; } } struct iscsi_tiqn *iscsit_snmp_get_tiqn(struct iscsi_conn *conn ) { struct iscsi_portal_group *tpg ; { if ((unsigned long )conn == (unsigned long )((struct iscsi_conn *)0) || (unsigned long )conn->sess == (unsigned long )((struct iscsi_session *)0)) { return ((struct iscsi_tiqn *)0); } else { } tpg = (conn->sess)->tpg; if ((unsigned long )tpg == (unsigned long )((struct iscsi_portal_group *)0)) { return ((struct iscsi_tiqn *)0); } else { } if ((unsigned long )tpg->tpg_tiqn == (unsigned long )((struct iscsi_tiqn *)0)) { return ((struct iscsi_tiqn *)0); } else { } return (tpg->tpg_tiqn); } } int reg_timer_7(struct timer_list *timer ) { { ldv_timer_list_7 = timer; ldv_timer_state_7 = 1; return (0); } } void activate_pending_timer_9(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_9 == (unsigned long )timer) { if (ldv_timer_state_9 == 2 || pending_flag != 0) { ldv_timer_list_9 = timer; ldv_timer_list_9->data = data; ldv_timer_state_9 = 1; } else { } return; } else { } reg_timer_9(timer); ldv_timer_list_9->data = data; return; } } void disable_suitable_timer_8(struct timer_list *timer ) { { if ((unsigned long )timer == (unsigned long )ldv_timer_list_8) { ldv_timer_state_8 = 0; return; } else { } return; } } void activate_pending_timer_8(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_8 == (unsigned long )timer) { if (ldv_timer_state_8 == 2 || pending_flag != 0) { ldv_timer_list_8 = timer; ldv_timer_list_8->data = data; ldv_timer_state_8 = 1; } else { } return; } else { } reg_timer_8(timer); ldv_timer_list_8->data = data; return; } } void choose_timer_8(struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; (*(timer->function))(timer->data); LDV_IN_INTERRUPT = 1; ldv_timer_state_8 = 2; return; } } void disable_suitable_timer_7(struct timer_list *timer ) { { if ((unsigned long )timer == (unsigned long )ldv_timer_list_7) { ldv_timer_state_7 = 0; return; } else { } return; } } int reg_timer_9(struct timer_list *timer ) { { ldv_timer_list_9 = timer; ldv_timer_state_9 = 1; return (0); } } void choose_timer_9(struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; (*(timer->function))(timer->data); LDV_IN_INTERRUPT = 1; ldv_timer_state_9 = 2; return; } } void activate_pending_timer_7(struct timer_list *timer , unsigned long data , int pending_flag ) { { if ((unsigned long )ldv_timer_list_7 == (unsigned long )timer) { if (ldv_timer_state_7 == 2 || pending_flag != 0) { ldv_timer_list_7 = timer; ldv_timer_list_7->data = data; ldv_timer_state_7 = 1; } else { } return; } else { } reg_timer_7(timer); ldv_timer_list_7->data = data; return; } } int reg_timer_8(struct timer_list *timer ) { { ldv_timer_list_8 = timer; ldv_timer_state_8 = 1; return (0); } } void disable_suitable_timer_9(struct timer_list *timer ) { { if ((unsigned long )timer == (unsigned long )ldv_timer_list_9) { ldv_timer_state_9 = 0; return; } else { } return; } } void choose_timer_7(struct timer_list *timer ) { { LDV_IN_INTERRUPT = 2; (*(timer->function))(timer->data); LDV_IN_INTERRUPT = 1; ldv_timer_state_7 = 2; return; } } bool ldv_queue_work_on_413(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_414(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_415(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_416(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_417(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_418(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_419(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_420(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_421(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_422(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_423(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_424(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_425(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_426(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } int ldv_mod_timer_427(struct timer_list *ldv_func_arg1 , unsigned long ldv_func_arg2 ) { ldv_func_ret_type___4 ldv_func_res ; int tmp ; { tmp = mod_timer(ldv_func_arg1, ldv_func_arg2); ldv_func_res = tmp; activate_pending_timer_8(ldv_func_arg1, ldv_func_arg2, 1); return (ldv_func_res); } } int ldv_del_timer_sync_428(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___5 ldv_func_res ; int tmp ; { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; disable_suitable_timer_8(ldv_func_arg1); return (ldv_func_res); } } int ldv_del_timer_sync_429(struct timer_list *ldv_func_arg1 ) { ldv_func_ret_type___9 ldv_func_res ; int tmp ; { tmp = del_timer_sync(ldv_func_arg1); ldv_func_res = tmp; disable_suitable_timer_8(ldv_func_arg1); return (ldv_func_res); } } __inline static long ldv__builtin_expect(long exp , long c ) ; extern unsigned long find_next_bit(unsigned long const * , unsigned long , unsigned long ) ; __inline static __u64 __arch_swab64(__u64 val ) { { __asm__ ("bswapq %0": "=r" (val): "0" (val)); return (val); } } __inline static __u64 __fswab64(__u64 val ) { __u64 tmp ; { tmp = __arch_swab64(val); return (tmp); } } extern void dump_stack(void) ; extern void __might_sleep(char const * , int , int ) ; __inline static void list_move_tail(struct list_head *list , struct list_head *head ) { { __list_del_entry(list); list_add_tail(list, head); return; } } __inline static int list_is_last(struct list_head const *list , struct list_head const *head ) { { return ((unsigned long )((struct list_head const *)list->next) == (unsigned long )head); } } extern void *kmemdup(void const * , size_t , gfp_t ) ; extern int __bitmap_weight(unsigned long const * , unsigned int ) ; __inline static void bitmap_fill(unsigned long *dst , unsigned int nbits ) { unsigned int nlongs ; unsigned int len ; { nlongs = (unsigned int )(((unsigned long )nbits + 63UL) / 64UL); len = (nlongs + 536870911U) * 8U; memset((void *)dst, 255, (size_t )len); *(dst + (unsigned long )(nlongs - 1U)) = 0xffffffffffffffffUL >> ((int )(- nbits) & 63); return; } } __inline static int bitmap_weight(unsigned long const *src , unsigned int nbits ) { int tmp___0 ; { tmp___0 = __bitmap_weight(src, nbits); return (tmp___0); } } extern int nr_cpu_ids ; extern struct cpumask const * const cpu_online_mask ; __inline static unsigned int cpumask_check(unsigned int cpu ) { bool __warned ; int __ret_warn_once ; int __ret_warn_on ; long tmp ; long tmp___0 ; long tmp___1 ; { __ret_warn_once = (unsigned int )nr_cpu_ids <= cpu; tmp___1 = ldv__builtin_expect(__ret_warn_once != 0, 0L); if (tmp___1 != 0L) { __ret_warn_on = ! __warned; tmp = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp != 0L) { warn_slowpath_null("include/linux/cpumask.h", 117); } else { } tmp___0 = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp___0 != 0L) { __warned = 1; } else { } } else { } ldv__builtin_expect(__ret_warn_once != 0, 0L); return (cpu); } } __inline static unsigned int cpumask_next(int n , struct cpumask const *srcp ) { unsigned long tmp ; { if (n != -1) { cpumask_check((unsigned int )n); } else { } tmp = find_next_bit((unsigned long const *)(& srcp->bits), (unsigned long )nr_cpu_ids, (unsigned long )(n + 1)); return ((unsigned int )tmp); } } __inline static void cpumask_set_cpu(unsigned int cpu , struct cpumask *dstp ) { unsigned int tmp ; { tmp = cpumask_check(cpu); set_bit((long )tmp, (unsigned long volatile *)(& dstp->bits)); return; } } __inline static void cpumask_setall(struct cpumask *dstp ) { { bitmap_fill((unsigned long *)(& dstp->bits), (unsigned int )nr_cpu_ids); return; } } __inline static unsigned int cpumask_weight(struct cpumask const *srcp ) { int tmp ; { tmp = bitmap_weight((unsigned long const *)(& srcp->bits), (unsigned int )nr_cpu_ids); return ((unsigned int )tmp); } } __inline static void *ERR_PTR(long error ) ; __inline static long PTR_ERR(void const *ptr ) ; __inline static bool IS_ERR(void const *ptr ) ; extern void __cmpxchg_wrong_size(void) ; __inline static void atomic64_add(long i , atomic64_t *v ) { { __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; addq %1,%0": "=m" (v->counter): "er" (i), "m" (v->counter)); return; } } __inline static void atomic_long_add(long i , atomic_long_t *l ) { atomic64_t *v ; { v = l; atomic64_add(i, v); return; } } int ldv_mutex_trylock_459(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_457(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_460(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_461(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_464(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_465(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_466(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_467(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_468(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_470(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_456(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_458(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_462(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_463(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_469(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_np_lock(struct mutex *lock ) ; void ldv_mutex_unlock_np_lock(struct mutex *lock ) ; __inline static int preempt_count___0(void) { int pfo_ret__ ; { switch (4UL) { case 1UL: __asm__ ("movb %%gs:%1,%0": "=q" (pfo_ret__): "m" (__preempt_count)); goto ldv_6636; case 2UL: __asm__ ("movw %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6636; case 4UL: __asm__ ("movl %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6636; case 8UL: __asm__ ("movq %%gs:%1,%0": "=r" (pfo_ret__): "m" (__preempt_count)); goto ldv_6636; default: __bad_percpu_size(); } ldv_6636: ; return (pfo_ret__ & 2147483647); } } __inline static void __preempt_count_sub___0(int val ) { int pao_ID__ ; { pao_ID__ = 0; switch (4UL) { case 1UL: ; if (pao_ID__ == 1) { __asm__ ("incb %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decb %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addb %1, %%gs:%0": "+m" (__preempt_count): "qi" (- val)); } goto ldv_6705; case 2UL: ; if (pao_ID__ == 1) { __asm__ ("incw %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decw %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addw %1, %%gs:%0": "+m" (__preempt_count): "ri" (- val)); } goto ldv_6705; case 4UL: ; if (pao_ID__ == 1) { __asm__ ("incl %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decl %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addl %1, %%gs:%0": "+m" (__preempt_count): "ri" (- val)); } goto ldv_6705; case 8UL: ; if (pao_ID__ == 1) { __asm__ ("incq %%gs:%0": "+m" (__preempt_count)); } else if (pao_ID__ == -1) { __asm__ ("decq %%gs:%0": "+m" (__preempt_count)); } else { __asm__ ("addq %1, %%gs:%0": "+m" (__preempt_count): "re" (- val)); } goto ldv_6705; default: __bad_percpu_size(); } ldv_6705: ; return; } } extern long prepare_to_wait_event(wait_queue_head_t * , wait_queue_t * , int ) ; extern void finish_wait(wait_queue_head_t * , wait_queue_t * ) ; extern int wait_for_completion_interruptible(struct completion * ) ; extern unsigned long wait_for_completion_timeout(struct completion * , unsigned long ) ; extern long wait_for_completion_interruptible_timeout(struct completion * , unsigned long ) ; bool ldv_queue_work_on_451(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_453(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_452(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_455(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_454(struct workqueue_struct *ldv_func_arg1 ) ; extern void idr_init(struct idr * ) ; __inline static void idr_preload_end___0(void) { { __asm__ volatile ("": : : "memory"); __preempt_count_sub___0(1); return; } } extern void schedule(void) ; extern int set_cpus_allowed_ptr(struct task_struct * , struct cpumask const * ) ; extern struct kmem_cache *kmem_cache_create(char const * , size_t , size_t , unsigned long , void (*)(void * ) ) ; extern void kmem_cache_destroy(struct kmem_cache * ) ; int ldv_state_variable_99 ; struct se_node_acl *iscsi_nacl_auth_password_mutual_group0 ; int ldv_state_variable_47 ; int ldv_state_variable_20 ; int ldv_state_variable_106 ; int ldv_state_variable_125 ; int ldv_work_1_1 ; int ldv_state_variable_111 ; struct se_portal_group *iscsi_tpg_param_OFMarker_group0 ; int ldv_state_variable_109 ; int ldv_state_variable_54 ; int ldv_state_variable_14 ; struct se_tpg_np *lio_target_np_iser_group0 ; int ldv_state_variable_37 ; struct se_node_acl *iscsi_nacl_attrib_nopin_timeout_group0 ; struct se_node_acl *iscsi_ops_group5 ; int ldv_state_variable_17 ; int ldv_state_variable_51 ; struct se_node_acl *iscsi_nacl_attrib_default_erl_group0 ; int ldv_state_variable_66 ; int ldv_state_variable_19 ; int ldv_state_variable_27 ; int ldv_state_variable_9 ; struct work_struct *ldv_work_struct_2_2 ; int ldv_state_variable_100 ; struct se_portal_group *iscsi_tpg_param_MaxOutstandingR2T_group0 ; struct se_portal_group *iscsi_tpg_param_DataSequenceInOrder_group0 ; int ldv_state_variable_42 ; int ldv_state_variable_83 ; struct se_session *iscsi_ops_group0 ; int ldv_state_variable_7 ; int ldv_state_variable_119 ; int ldv_state_variable_55 ; struct se_portal_group *iscsi_tpg_attrib_demo_mode_discovery_group0 ; int ldv_work_1_3 ; struct work_struct *ldv_work_struct_2_1 ; struct timer_list *ldv_timer_list_6 ; struct se_portal_group *iscsi_tpg_attrib_prod_mode_write_protect_group0 ; struct configfs_attribute *iscsi_stat_instance_item_ops_group0 ; int ldv_state_variable_80 ; int ldv_state_variable_64 ; int ldv_state_variable_26 ; int ldv_state_variable_28 ; struct se_node_acl *iscsi_nacl_auth_userid_group0 ; struct iscsi_cmd *iscsi_target_transport_group3 ; int ldv_state_variable_58 ; int ldv_state_variable_93 ; int ldv_state_variable_78 ; int ldv_state_variable_76 ; struct se_portal_group *iscsi_tpg_attrib_generate_node_acls_group0 ; int ldv_state_variable_31 ; int ldv_state_variable_96 ; int ldv_state_variable_137 ; int ldv_state_variable_89 ; struct se_portal_group *lio_target_tpg_enable_group0 ; int ldv_state_variable_68 ; int ldv_work_2_1 ; struct configfs_attribute *iscsi_stat_login_stats_item_ops_group0 ; struct se_portal_group *iscsi_tpg_param_FirstBurstLength_group0 ; int ldv_state_variable_124 ; struct timer_list *ldv_timer_list_5 ; int ldv_state_variable_8 ; int ldv_state_variable_46 ; int ldv_state_variable_15 ; struct se_portal_group *iscsi_tpg_param_DefaultTime2Wait_group0 ; struct work_struct *ldv_work_struct_1_3 ; struct se_portal_group *iscsi_tpg_auth_password_group0 ; int ldv_state_variable_75 ; int ldv_state_variable_74 ; int ldv_state_variable_21 ; int ldv_state_variable_33 ; int ldv_state_variable_123 ; int ldv_state_variable_69 ; struct se_portal_group *iscsi_tpg_attrib_t10_pi_group0 ; struct se_portal_group *iscsi_tpg_attrib_default_erl_group0 ; int ldv_state_variable_88 ; int ldv_state_variable_65 ; int ldv_state_variable_98 ; int ldv_state_variable_139 ; int ldv_state_variable_94 ; struct iscsi_login *iscsi_target_transport_group2 ; int ldv_state_variable_110 ; struct se_cmd *iscsi_ops_group1 ; int ldv_state_variable_70 ; int ldv_state_variable_62 ; int ldv_state_variable_41 ; int ldv_state_variable_40 ; struct se_wwn *iscsi_ops_group2 ; struct work_struct *ldv_work_struct_1_0 ; struct se_portal_group *iscsi_tpg_auth_userid_group0 ; struct se_portal_group *iscsi_tpg_attrib_netif_timeout_group0 ; int ldv_state_variable_10 ; struct se_portal_group *iscsi_tpg_param_ImmediateData_group0 ; int ldv_state_variable_133 ; struct se_portal_group *iscsi_tpg_param_IFMarkInt_group0 ; struct se_portal_group *iscsi_tpg_param_ErrorRecoveryLevel_group0 ; int ldv_state_variable_63 ; int ldv_state_variable_105 ; int ldv_state_variable_2 ; int ldv_state_variable_25 ; struct config_item *iscsi_stat_sess_stats_item_ops_group1 ; struct se_tpg_np *lio_target_np_sctp_group0 ; int ldv_work_2_0 ; struct timer_list *ldv_timer_list_9 ; struct config_item *iscsi_stat_instance_item_ops_group1 ; struct se_portal_group *iscsi_tpg_attrib_default_cmdsn_depth_group0 ; int ldv_state_variable_11 ; int ldv_state_variable_113 ; int ldv_work_1_2 ; int ldv_state_variable_79 ; int ldv_state_variable_127 ; int ldv_state_variable_18 ; struct se_node_acl *lio_target_nacl_tag_group0 ; struct se_node_acl *iscsi_nacl_attrib_random_datain_seq_offsets_group0 ; struct se_node_acl *iscsi_nacl_attrib_dataout_timeout_group0 ; struct se_portal_group *iscsi_tpg_param_DefaultTime2Retain_group0 ; struct se_portal_group *iscsi_tpg_attrib_cache_dynamic_acls_group0 ; struct target_fabric_configfs *iscsi_disc_password_mutual_group0 ; struct se_portal_group *iscsi_tpg_param_DataPDUInOrder_group0 ; struct configfs_attribute *iscsi_stat_tgt_attr_item_ops_group0 ; int ldv_work_2_2 ; int ldv_state_variable_108 ; struct se_portal_group *iscsi_tpg_param_DataDigest_group0 ; int ldv_state_variable_32 ; struct se_node_acl *iscsi_nacl_auth_password_group0 ; struct se_portal_group *iscsi_tpg_param_MaxXmitDataSegmentLength_group0 ; struct se_portal_group *iscsi_tpg_auth_userid_mutual_group0 ; int ldv_state_variable_90 ; struct configfs_attribute *iscsi_stat_logout_stats_item_ops_group0 ; int ldv_state_variable_97 ; struct timer_list *ldv_timer_list_4 ; int ldv_state_variable_30 ; int ldv_state_variable_0 ; int ldv_state_variable_81 ; int ldv_state_variable_45 ; struct config_item *iscsi_stat_login_stats_item_ops_group1 ; int ldv_state_variable_12 ; int ldv_state_variable_102 ; int ldv_state_variable_87 ; int ldv_state_variable_95 ; int ldv_state_variable_122 ; int ldv_state_variable_136 ; int ldv_state_variable_22 ; struct iscsi_conn *iscsi_target_transport_group0 ; int ldv_state_variable_73 ; int ldv_state_variable_29 ; struct config_item *iscsi_stat_sess_err_item_ops_group1 ; int ldv_state_variable_115 ; struct se_node_acl *iscsi_nacl_attrib_random_datain_pdu_offsets_group0 ; struct target_fabric_configfs *iscsi_disc_password_group0 ; struct work_struct *ldv_work_struct_2_0 ; struct se_node_acl *lio_target_nacl_cmdsn_depth_group0 ; int ldv_state_variable_61 ; struct target_fabric_configfs *iscsi_disc_userid_group0 ; int ldv_state_variable_91 ; struct se_portal_group *iscsi_tpg_param_MaxBurstLength_group0 ; struct timer_list *ldv_timer_list_8 ; int ref_cnt ; struct config_item *iscsi_stat_tgt_attr_item_ops_group1 ; struct target_fabric_configfs *iscsi_disc_userid_mutual_group0 ; struct iscsi_np *iscsi_target_transport_group1 ; int ldv_state_variable_23 ; struct se_portal_group *iscsi_tpg_param_InitialR2T_group0 ; int ldv_state_variable_72 ; struct se_portal_group *iscsi_tpg_param_HeaderDigest_group0 ; struct work_struct *ldv_work_struct_1_1 ; int ldv_state_variable_59 ; int ldv_state_variable_132 ; int ldv_state_variable_6 ; int ldv_state_variable_120 ; struct se_portal_group *iscsi_tpg_attrib_authentication_group0 ; struct se_portal_group *iscsi_tpg_attrib_fabric_prot_type_group0 ; int ldv_state_variable_50 ; int ldv_state_variable_84 ; int ldv_state_variable_86 ; struct se_portal_group *iscsi_tpg_attrib_login_timeout_group0 ; int ldv_state_variable_44 ; struct config_item *iscsi_stat_logout_stats_item_ops_group1 ; int ldv_state_variable_38 ; int ldv_state_variable_116 ; int ldv_state_variable_128 ; int ldv_state_variable_39 ; int ldv_state_variable_101 ; struct se_node_acl *iscsi_nacl_auth_userid_mutual_group0 ; int ldv_state_variable_56 ; int ldv_state_variable_104 ; int ldv_state_variable_112 ; int ldv_state_variable_126 ; int ldv_state_variable_3 ; int ldv_state_variable_52 ; int ldv_state_variable_135 ; int ldv_work_1_0 ; int ldv_state_variable_4 ; struct se_portal_group *iscsi_ops_group3 ; int ldv_state_variable_36 ; int ldv_state_variable_60 ; int ldv_state_variable_103 ; int ldv_state_variable_118 ; struct se_node_acl *iscsi_nacl_attrib_random_r2t_offsets_group0 ; int ldv_state_variable_117 ; struct target_fabric_configfs *iscsi_disc_enforce_discovery_auth_group0 ; int ldv_state_variable_48 ; int ldv_state_variable_107 ; struct se_portal_group *iscsi_tpg_param_AuthMethod_group0 ; struct timer_list *ldv_timer_list_3 ; int ldv_state_variable_5 ; int ldv_state_variable_13 ; struct se_node_acl *iscsi_nacl_attrib_dataout_timeout_retries_group0 ; int ldv_state_variable_138 ; int ldv_state_variable_82 ; struct work_struct *ldv_work_struct_2_3 ; struct configfs_attribute *iscsi_stat_sess_stats_item_ops_group0 ; int ldv_state_variable_49 ; int ldv_state_variable_24 ; struct se_portal_group *iscsi_tpg_param_TargetAlias_group0 ; struct se_portal_group *iscsi_tpg_attrib_demo_mode_write_protect_group0 ; int ldv_state_variable_1 ; struct config_group *iscsi_ops_group4 ; struct timer_list *ldv_timer_list_7 ; int ldv_state_variable_85 ; int ldv_state_variable_114 ; int ldv_state_variable_71 ; int ldv_state_variable_77 ; struct se_portal_group *iscsi_tpg_param_MaxRecvDataSegmentLength_group0 ; struct se_portal_group *iscsi_tpg_param_OFMarkInt_group0 ; int ldv_state_variable_16 ; int ldv_state_variable_43 ; int ldv_state_variable_121 ; int ldv_state_variable_57 ; int ldv_state_variable_131 ; int ldv_state_variable_53 ; int ldv_state_variable_67 ; int ldv_state_variable_134 ; struct se_portal_group *iscsi_tpg_param_MaxConnections_group0 ; struct se_node_acl *iscsi_nacl_attrib_nopin_response_timeout_group0 ; struct work_struct *ldv_work_struct_1_2 ; int ldv_state_variable_129 ; struct configfs_attribute *iscsi_stat_sess_err_item_ops_group0 ; int ldv_state_variable_34 ; int ldv_state_variable_92 ; int ldv_work_2_3 ; int ldv_state_variable_130 ; struct se_portal_group *iscsi_tpg_param_IFMarker_group0 ; struct se_portal_group *iscsi_tpg_auth_password_mutual_group0 ; int ldv_state_variable_35 ; void ldv_initialize_target_fabric_nacl_auth_attribute_128(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_77(void) ; void ldv_initialize_target_core_fabric_ops_62(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_73(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_91(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_89(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_72(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_83(void) ; void ldv_initialize_target_fabric_discovery_attribute_68(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_109(void) ; void ldv_initialize_target_fabric_tpg_auth_attribute_96(void) ; void ldv_initialize_target_fabric_nacl_attrib_attribute_132(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_102(void) ; void ldv_initialize_configfs_item_operations_48(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_85(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_99(void) ; void ldv_initialize_target_fabric_discovery_attribute_67(void) ; void ldv_initialize_configfs_item_operations_20(void) ; void ldv_initialize_target_fabric_nacl_base_attribute_111(void) ; void ldv_initialize_target_fabric_nacl_auth_attribute_127(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_92(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_74(void) ; void ldv_initialize_target_fabric_discovery_attribute_64(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_84(void) ; void ldv_initialize_iscsit_transport_139(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_105(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_78(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_106(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_86(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_101(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_80(void) ; void ldv_initialize_target_fabric_nacl_attrib_attribute_134(void) ; void ldv_initialize_target_fabric_nacl_attrib_attribute_131(void) ; void ldv_initialize_configfs_item_operations_34(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_75(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_79(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_98(void) ; void ldv_initialize_target_fabric_tpg_auth_attribute_94(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_104(void) ; void ldv_initialize_target_fabric_nacl_attrib_attribute_129(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_100(void) ; void ldv_initialize_target_fabric_np_base_attribute_138(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_81(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_87(void) ; void ldv_initialize_target_fabric_np_base_attribute_137(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_107(void) ; void ldv_initialize_target_fabric_tpg_auth_attribute_93(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_103(void) ; void ldv_initialize_target_fabric_nacl_auth_attribute_124(void) ; void ldv_initialize_configfs_item_operations_43(void) ; void ldv_initialize_target_fabric_nacl_auth_attribute_125(void) ; void ldv_initialize_target_fabric_tpg_attrib_attribute_108(void) ; void ldv_initialize_target_fabric_nacl_attrib_attribute_130(void) ; void ldv_initialize_target_fabric_nacl_attrib_attribute_135(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_90(void) ; void ldv_initialize_target_fabric_discovery_attribute_63(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_76(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_82(void) ; void ldv_initialize_target_fabric_discovery_attribute_65(void) ; void ldv_initialize_configfs_item_operations_10(void) ; void ldv_initialize_target_fabric_tpg_auth_attribute_97(void) ; void ldv_initialize_target_fabric_nacl_attrib_attribute_133(void) ; void ldv_initialize_target_fabric_nacl_base_attribute_110(void) ; void ldv_initialize_configfs_item_operations_25(void) ; void ldv_initialize_target_fabric_tpg_param_attribute_88(void) ; void ldv_initialize_target_fabric_nacl_attrib_attribute_136(void) ; void ldv_initialize_target_fabric_tpg_attribute_71(void) ; extern bool kthread_should_stop(void) ; extern void *vzalloc(unsigned long ) ; extern void vfree(void const * ) ; __inline static void put_unaligned_le64(u64 val , void *p ) { { *((__le64 *)p) = val; return; } } __inline static void put_unaligned_be16(u16 val , void *p ) { __u16 tmp ; { tmp = __fswab16((int )val); *((__be16 *)p) = tmp; return; } } __inline static void put_unaligned_be64(u64 val , void *p ) { __u64 tmp ; { tmp = __fswab64(val); *((__be64 *)p) = tmp; return; } } __inline static void *lowmem_page_address(struct page const *page ) { { return ((void *)((unsigned long )((unsigned long long )(((long )page + 24189255811072L) / 64L) << 12) + 0xffff880000000000UL)); } } __inline static struct page *sg_page___0(struct scatterlist *sg ) { long tmp ; long tmp___0 ; { tmp = ldv__builtin_expect(sg->sg_magic != 2271560481UL, 0L); if (tmp != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (123), "i" (12UL)); ldv_24833: ; goto ldv_24833; } else { } tmp___0 = ldv__builtin_expect((long )((int )sg->page_link) & 1L, 0L); if (tmp___0 != 0L) { __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"include/linux/scatterlist.h"), "i" (124), "i" (12UL)); ldv_24834: ; goto ldv_24834; } else { } return ((struct page *)(sg->page_link & 0xfffffffffffffffcUL)); } } extern void int_to_scsilun(u64 , struct scsi_lun * ) ; extern int down_interruptible(struct semaphore * ) ; extern void up(struct semaphore * ) ; __inline static void *kmap(struct page *page ) { void *tmp ; { __might_sleep("include/linux/highmem.h", 58, 0); tmp = lowmem_page_address((struct page const *)page); return (tmp); } } __inline static void kunmap(struct page *page ) { { return; } } extern void msleep(unsigned int ) ; extern int target_register_template(struct target_core_fabric_ops const * ) ; extern void target_unregister_template(struct target_core_fabric_ops const * ) ; extern void transport_deregister_session_configfs(struct se_session * ) ; extern void transport_deregister_session(struct se_session * ) ; extern void transport_init_se_cmd(struct se_cmd * , struct target_core_fabric_ops const * , struct se_session * , u32 , int , int , unsigned char * ) ; extern sense_reason_t transport_lookup_cmd_lun(struct se_cmd * , u64 ) ; extern sense_reason_t target_setup_cmd_from_cdb(struct se_cmd * , unsigned char * ) ; extern sense_reason_t transport_generic_new_cmd(struct se_cmd * ) ; extern int target_get_sess_cmd(struct se_cmd * , bool ) ; extern int core_alua_check_nonop_delay(struct se_cmd * ) ; extern int core_tmr_alloc_req(struct se_cmd * , void * , u8 , gfp_t ) ; extern int transport_lookup_tmr_lun(struct se_cmd * , u64 ) ; extern struct se_node_acl *core_tpg_get_initiator_node_acl(struct se_portal_group * , unsigned char * ) ; struct iscsi_tiqn *iscsit_add_tiqn(unsigned char *buf ) ; void iscsit_del_tiqn(struct iscsi_tiqn *tiqn ) ; int iscsit_build_r2ts_for_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , bool recovery ) ; int iscsit_close_session(struct iscsi_session *sess ) ; void iscsit_fail_session(struct iscsi_session *sess ) ; int iscsit_free_session(struct iscsi_session *sess ) ; struct iscsit_global *iscsit_global ; struct kmem_cache *lio_dr_cache ; struct kmem_cache *lio_ooo_cache ; struct kmem_cache *lio_qr_cache ; struct kmem_cache *lio_r2t_cache ; struct idr sess_idr ; struct mutex auth_id_lock ; spinlock_t sess_idr_lock ; int iscsit_register_transport(struct iscsit_transport *t ) ; void iscsit_unregister_transport(struct iscsit_transport *t ) ; int iscsit_setup_scsi_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) ; int iscsit_process_scsi_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_scsi_req *hdr ) ; int iscsit_check_dataout_hdr(struct iscsi_conn *conn , unsigned char *buf , struct iscsi_cmd **out_cmd ) ; int iscsit_check_dataout_payload(struct iscsi_cmd *cmd , struct iscsi_data *hdr , bool data_crc_failed ) ; int iscsit_setup_nop_out(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_nopout *hdr ) ; int iscsit_process_nop_out(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_nopout *hdr ) ; int iscsit_handle_logout_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) ; int iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) ; int iscsit_setup_text_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_text *hdr ) ; int iscsit_process_text_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_text *hdr ) ; void iscsit_build_rsp_pdu(struct iscsi_cmd *cmd , struct iscsi_conn *conn , bool inc_stat_sn , struct iscsi_scsi_rsp *hdr ) ; void iscsit_build_nopin_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_nopin *hdr , bool nopout_response ) ; void iscsit_build_task_mgt_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_tm_rsp *hdr ) ; int iscsit_build_text_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_text_rsp *hdr , enum iscsit_transport_type network_transport ) ; void iscsit_build_reject(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_reject *hdr ) ; int iscsit_build_logout_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_logout_rsp *hdr ) ; int iscsit_logout_post_handler(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) ; static struct list_head g_tiqn_list = {& g_tiqn_list, & g_tiqn_list}; static struct list_head g_np_list = {& g_np_list, & g_np_list}; static spinlock_t tiqn_lock = {{{{{0}}, 3735899821U, 4294967295U, (void *)-1, {0, {0, 0}, "tiqn_lock", 0, 0UL}}}}; static struct mutex np_lock = {{1}, {{{{{0}}, 3735899821U, 4294967295U, (void *)-1, {0, {0, 0}, "np_lock.wait_lock", 0, 0UL}}}}, {& np_lock.wait_list, & np_lock.wait_list}, 0, (void *)(& np_lock), {0, {0, 0}, "np_lock", 0, 0UL}}; static struct idr tiqn_idr ; static int iscsit_handle_immediate_data(struct iscsi_cmd *cmd , struct iscsi_scsi_req *hdr , u32 length ) ; struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *buf ) { struct iscsi_tiqn *tiqn ; struct list_head const *__mptr ; int tmp ; struct list_head const *__mptr___0 ; { tiqn = (struct iscsi_tiqn *)0; spin_lock(& tiqn_lock); __mptr = (struct list_head const *)g_tiqn_list.next; tiqn = (struct iscsi_tiqn *)__mptr + 0xffffffffffffff08UL; goto ldv_60481; ldv_60480: tmp = strcmp((char const *)(& tiqn->tiqn), (char const *)buf); if (tmp == 0) { spin_lock(& tiqn->tiqn_state_lock); if ((unsigned int )tiqn->tiqn_state == 1U) { tiqn->tiqn_access_count = tiqn->tiqn_access_count + 1; spin_unlock(& tiqn->tiqn_state_lock); spin_unlock(& tiqn_lock); return (tiqn); } else { } spin_unlock(& tiqn->tiqn_state_lock); } else { } __mptr___0 = (struct list_head const *)tiqn->tiqn_list.next; tiqn = (struct iscsi_tiqn *)__mptr___0 + 0xffffffffffffff08UL; ldv_60481: ; if ((unsigned long )(& tiqn->tiqn_list) != (unsigned long )(& g_tiqn_list)) { goto ldv_60480; } else { } spin_unlock(& tiqn_lock); return ((struct iscsi_tiqn *)0); } } static int iscsit_set_tiqn_shutdown(struct iscsi_tiqn *tiqn ) { { spin_lock(& tiqn->tiqn_state_lock); if ((unsigned int )tiqn->tiqn_state == 1U) { tiqn->tiqn_state = 2; spin_unlock(& tiqn->tiqn_state_lock); return (0); } else { } spin_unlock(& tiqn->tiqn_state_lock); return (-1); } } void iscsit_put_tiqn_for_login(struct iscsi_tiqn *tiqn ) { { spin_lock(& tiqn->tiqn_state_lock); tiqn->tiqn_access_count = tiqn->tiqn_access_count - 1; spin_unlock(& tiqn->tiqn_state_lock); return; } } struct iscsi_tiqn *iscsit_add_tiqn(unsigned char *buf ) { struct iscsi_tiqn *tiqn ; int ret ; void *tmp ; size_t tmp___0 ; void *tmp___1 ; void *tmp___2 ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; struct lock_class_key __key___2 ; struct lock_class_key __key___3 ; void *tmp___3 ; struct _ddebug descriptor ; long tmp___4 ; { tiqn = (struct iscsi_tiqn *)0; tmp___0 = strlen((char const *)buf); if (tmp___0 > 223UL) { printk("\vTarget IQN exceeds %d bytes\n", 224); tmp = ERR_PTR(-22L); return ((struct iscsi_tiqn *)tmp); } else { } tmp___1 = kzalloc(2240UL, 208U); tiqn = (struct iscsi_tiqn *)tmp___1; if ((unsigned long )tiqn == (unsigned long )((struct iscsi_tiqn *)0)) { printk("\vUnable to allocate struct iscsi_tiqn\n"); tmp___2 = ERR_PTR(-12L); return ((struct iscsi_tiqn *)tmp___2); } else { } sprintf((char *)(& tiqn->tiqn), "%s", buf); INIT_LIST_HEAD(& tiqn->tiqn_list); INIT_LIST_HEAD(& tiqn->tiqn_tpg_list); spinlock_check(& tiqn->tiqn_state_lock); __raw_spin_lock_init(& tiqn->tiqn_state_lock.__annonCompField17.rlock, "&(&tiqn->tiqn_state_lock)->rlock", & __key); spinlock_check(& tiqn->tiqn_tpg_lock); __raw_spin_lock_init(& tiqn->tiqn_tpg_lock.__annonCompField17.rlock, "&(&tiqn->tiqn_tpg_lock)->rlock", & __key___0); spinlock_check(& tiqn->sess_err_stats.lock); __raw_spin_lock_init(& tiqn->sess_err_stats.lock.__annonCompField17.rlock, "&(&tiqn->sess_err_stats.lock)->rlock", & __key___1); spinlock_check(& tiqn->login_stats.lock); __raw_spin_lock_init(& tiqn->login_stats.lock.__annonCompField17.rlock, "&(&tiqn->login_stats.lock)->rlock", & __key___2); spinlock_check(& tiqn->logout_stats.lock); __raw_spin_lock_init(& tiqn->logout_stats.lock.__annonCompField17.rlock, "&(&tiqn->logout_stats.lock)->rlock", & __key___3); tiqn->tiqn_state = 1; idr_preload(208U); spin_lock(& tiqn_lock); ret = idr_alloc(& tiqn_idr, (void *)0, 0, 0, 0U); if (ret < 0) { printk("\vidr_alloc() failed for tiqn->tiqn_index\n"); spin_unlock(& tiqn_lock); idr_preload_end___0(); kfree((void const *)tiqn); tmp___3 = ERR_PTR((long )ret); return ((struct iscsi_tiqn *)tmp___3); } else { } tiqn->tiqn_index = ret; list_add_tail(& tiqn->tiqn_list, & g_tiqn_list); spin_unlock(& tiqn_lock); idr_preload_end___0(); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_add_tiqn"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "CORE[0] - Added iSCSI Target IQN: %s\n"; descriptor.lineno = 162U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor, "CORE[0] - Added iSCSI Target IQN: %s\n", (unsigned char *)(& tiqn->tiqn)); } else { } return (tiqn); } } static void iscsit_wait_for_tiqn(struct iscsi_tiqn *tiqn ) { { spin_lock(& tiqn->tiqn_state_lock); goto ldv_60505; ldv_60504: spin_unlock(& tiqn->tiqn_state_lock); msleep(10U); spin_lock(& tiqn->tiqn_state_lock); ldv_60505: ; if (tiqn->tiqn_access_count != 0) { goto ldv_60504; } else { } spin_unlock(& tiqn->tiqn_state_lock); return; } } void iscsit_del_tiqn(struct iscsi_tiqn *tiqn ) { int tmp ; struct _ddebug descriptor ; long tmp___0 ; { tmp = iscsit_set_tiqn_shutdown(tiqn); if (tmp < 0) { printk("\viscsit_set_tiqn_shutdown() failed\n"); return; } else { } iscsit_wait_for_tiqn(tiqn); spin_lock(& tiqn_lock); list_del(& tiqn->tiqn_list); idr_remove(& tiqn_idr, tiqn->tiqn_index); spin_unlock(& tiqn_lock); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_del_tiqn"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "CORE[0] - Deleted iSCSI Target IQN: %s\n"; descriptor.lineno = 203U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "CORE[0] - Deleted iSCSI Target IQN: %s\n", (unsigned char *)(& tiqn->tiqn)); } else { } kfree((void const *)tiqn); return; } } int iscsit_access_np(struct iscsi_np *np , struct iscsi_portal_group *tpg ) { int ret ; { spin_lock_bh(& np->np_thread_lock); if ((unsigned int )np->np_thread_state != 1U) { spin_unlock_bh(& np->np_thread_lock); return (-1); } else { } spin_unlock_bh(& np->np_thread_lock); spin_lock_bh(& tpg->tpg_state_lock); if ((unsigned int )tpg->tpg_state != 1U) { spin_unlock_bh(& tpg->tpg_state_lock); return (-1); } else { } spin_unlock_bh(& tpg->tpg_state_lock); ret = down_interruptible(& tpg->np_login_sem); if (ret != 0) { return (-1); } else { } spin_lock_bh(& tpg->tpg_state_lock); if ((unsigned int )tpg->tpg_state != 1U) { spin_unlock_bh(& tpg->tpg_state_lock); up(& tpg->np_login_sem); return (-1); } else { } spin_unlock_bh(& tpg->tpg_state_lock); return (0); } } void iscsit_login_kref_put(struct kref *kref ) { struct iscsi_tpg_np *tpg_np ; struct kref const *__mptr ; { __mptr = (struct kref const *)kref; tpg_np = (struct iscsi_tpg_np *)__mptr + 0xfffffffffffffe98UL; complete(& tpg_np->tpg_np_comp); return; } } int iscsit_deaccess_np(struct iscsi_np *np , struct iscsi_portal_group *tpg , struct iscsi_tpg_np *tpg_np ) { struct iscsi_tiqn *tiqn ; { tiqn = tpg->tpg_tiqn; up(& tpg->np_login_sem); if ((unsigned long )tpg_np != (unsigned long )((struct iscsi_tpg_np *)0)) { kref_put(& tpg_np->tpg_np_kref, & iscsit_login_kref_put); } else { } if ((unsigned long )tiqn != (unsigned long )((struct iscsi_tiqn *)0)) { iscsit_put_tiqn_for_login(tiqn); } else { } return (0); } } bool iscsit_check_np_match(struct __kernel_sockaddr_storage *sockaddr , struct iscsi_np *np , int network_transport ) { struct sockaddr_in *sock_in ; struct sockaddr_in *sock_in_e ; struct sockaddr_in6 *sock_in6 ; struct sockaddr_in6 *sock_in6_e ; bool ip_match ; u16 port ; int tmp ; __u16 tmp___0 ; __u16 tmp___1 ; { ip_match = 0; if ((unsigned int )sockaddr->ss_family == 10U) { sock_in6 = (struct sockaddr_in6 *)sockaddr; sock_in6_e = (struct sockaddr_in6 *)(& np->np_sockaddr); tmp = memcmp((void const *)(& sock_in6->sin6_addr.in6_u), (void const *)(& sock_in6_e->sin6_addr.in6_u), 16UL); if (tmp == 0) { ip_match = 1; } else { } tmp___0 = __fswab16((int )sock_in6->sin6_port); port = tmp___0; } else { sock_in = (struct sockaddr_in *)sockaddr; sock_in_e = (struct sockaddr_in *)(& np->np_sockaddr); if (sock_in->sin_addr.s_addr == sock_in_e->sin_addr.s_addr) { ip_match = 1; } else { } tmp___1 = __fswab16((int )sock_in->sin_port); port = tmp___1; } if (((int )ip_match && (int )np->np_port == (int )port) && np->np_network_transport == network_transport) { return (1); } else { } return (0); } } static struct iscsi_np *iscsit_get_np(struct __kernel_sockaddr_storage *sockaddr , int network_transport ) { struct iscsi_np *np ; bool match ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { __mptr = (struct list_head const *)g_np_list.next; np = (struct iscsi_np *)__mptr + 0xfffffffffffffde0UL; goto ldv_60552; ldv_60551: spin_lock_bh(& np->np_thread_lock); if ((unsigned int )np->np_thread_state != 1U) { spin_unlock_bh(& np->np_thread_lock); goto ldv_60550; } else { } match = iscsit_check_np_match(sockaddr, np, network_transport); if ((int )match) { np->np_exports = np->np_exports + 1U; spin_unlock_bh(& np->np_thread_lock); return (np); } else { } spin_unlock_bh(& np->np_thread_lock); ldv_60550: __mptr___0 = (struct list_head const *)np->np_list.next; np = (struct iscsi_np *)__mptr___0 + 0xfffffffffffffde0UL; ldv_60552: ; if ((unsigned long )(& np->np_list) != (unsigned long )(& g_np_list)) { goto ldv_60551; } else { } return ((struct iscsi_np *)0); } } struct iscsi_np *iscsit_add_np(struct __kernel_sockaddr_storage *sockaddr , char *ip_str , int network_transport ) { struct sockaddr_in *sock_in ; struct sockaddr_in6 *sock_in6 ; struct iscsi_np *np ; int ret ; void *tmp ; void *tmp___0 ; __u16 tmp___1 ; __u16 tmp___2 ; struct lock_class_key __key ; void *tmp___3 ; struct task_struct *__k ; struct task_struct *tmp___4 ; bool tmp___5 ; int tmp___6 ; long tmp___7 ; void *tmp___8 ; bool tmp___9 ; struct _ddebug descriptor ; long tmp___10 ; { ldv_mutex_lock_463(& np_lock); np = iscsit_get_np(sockaddr, network_transport); if ((unsigned long )np != (unsigned long )((struct iscsi_np *)0)) { ldv_mutex_unlock_464(& np_lock); return (np); } else { } tmp = kzalloc(576UL, 208U); np = (struct iscsi_np *)tmp; if ((unsigned long )np == (unsigned long )((struct iscsi_np *)0)) { printk("\vUnable to allocate memory for struct iscsi_np\n"); ldv_mutex_unlock_465(& np_lock); tmp___0 = ERR_PTR(-12L); return ((struct iscsi_np *)tmp___0); } else { } np->np_flags = np->np_flags; if ((unsigned int )sockaddr->ss_family == 10U) { sock_in6 = (struct sockaddr_in6 *)sockaddr; snprintf((char *)(& np->np_ip), 48UL, "%s", ip_str); tmp___1 = __fswab16((int )sock_in6->sin6_port); np->np_port = tmp___1; } else { sock_in = (struct sockaddr_in *)sockaddr; sprintf((char *)(& np->np_ip), "%s", ip_str); tmp___2 = __fswab16((int )sock_in->sin_port); np->np_port = tmp___2; } np->np_network_transport = network_transport; spinlock_check(& np->np_thread_lock); __raw_spin_lock_init(& np->np_thread_lock.__annonCompField17.rlock, "&(&np->np_thread_lock)->rlock", & __key); init_completion(& np->np_restart_comp); INIT_LIST_HEAD(& np->np_list); ret = iscsi_target_setup_login_socket(np, sockaddr); if (ret != 0) { kfree((void const *)np); ldv_mutex_unlock_466(& np_lock); tmp___3 = ERR_PTR((long )ret); return ((struct iscsi_np *)tmp___3); } else { } tmp___4 = kthread_create_on_node(& iscsi_target_login_thread, (void *)np, -1, "iscsi_np"); __k = tmp___4; tmp___5 = IS_ERR((void const *)__k); if (tmp___5) { tmp___6 = 0; } else { tmp___6 = 1; } if (tmp___6) { wake_up_process(__k); } else { } np->np_thread = __k; tmp___9 = IS_ERR((void const *)np->np_thread); if ((int )tmp___9) { printk("\vUnable to create kthread: iscsi_np\n"); tmp___7 = PTR_ERR((void const *)np->np_thread); ret = (int )tmp___7; kfree((void const *)np); ldv_mutex_unlock_467(& np_lock); tmp___8 = ERR_PTR((long )ret); return ((struct iscsi_np *)tmp___8); } else { } np->np_exports = 1U; np->np_thread_state = 1; list_add_tail(& np->np_list, & g_np_list); ldv_mutex_unlock_468(& np_lock); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_add_np"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "CORE[0] - Added Network Portal: %s:%hu on %s\n"; descriptor.lineno = 415U; descriptor.flags = 0U; tmp___10 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___10 != 0L) { __dynamic_pr_debug(& descriptor, "CORE[0] - Added Network Portal: %s:%hu on %s\n", (unsigned char *)(& np->np_ip), (int )np->np_port, (char *)(& (np->np_transport)->name)); } else { } return (np); } } int iscsit_reset_np_thread(struct iscsi_np *np , struct iscsi_tpg_np *tpg_np , struct iscsi_portal_group *tpg , bool shutdown ) { { spin_lock_bh(& np->np_thread_lock); if ((unsigned int )np->np_thread_state == 2U) { spin_unlock_bh(& np->np_thread_lock); return (0); } else { } np->np_thread_state = 3; if ((unsigned long )np->np_thread != (unsigned long )((struct task_struct *)0)) { spin_unlock_bh(& np->np_thread_lock); send_sig(2, np->np_thread, 1); wait_for_completion(& np->np_restart_comp); spin_lock_bh(& np->np_thread_lock); } else { } spin_unlock_bh(& np->np_thread_lock); if ((unsigned long )tpg_np != (unsigned long )((struct iscsi_tpg_np *)0) && (int )shutdown) { kref_put(& tpg_np->tpg_np_kref, & iscsit_login_kref_put); wait_for_completion(& tpg_np->tpg_np_comp); } else { } return (0); } } static void iscsit_free_np(struct iscsi_np *np ) { { if ((unsigned long )np->np_socket != (unsigned long )((struct socket *)0)) { sock_release(np->np_socket); } else { } return; } } int iscsit_del_np(struct iscsi_np *np ) { struct _ddebug descriptor ; long tmp ; { spin_lock_bh(& np->np_thread_lock); np->np_exports = np->np_exports - 1U; if (np->np_exports != 0U) { np->enabled = 1; spin_unlock_bh(& np->np_thread_lock); return (0); } else { } np->np_thread_state = 4; spin_unlock_bh(& np->np_thread_lock); if ((unsigned long )np->np_thread != (unsigned long )((struct task_struct *)0)) { send_sig(2, np->np_thread, 1); kthread_stop(np->np_thread); np->np_thread = (struct task_struct *)0; } else { } (*((np->np_transport)->iscsit_free_np))(np); ldv_mutex_lock_469(& np_lock); list_del(& np->np_list); ldv_mutex_unlock_470(& np_lock); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_del_np"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "CORE[0] - Removed Network Portal: %s:%hu on %s\n"; descriptor.lineno = 485U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "CORE[0] - Removed Network Portal: %s:%hu on %s\n", (unsigned char *)(& np->np_ip), (int )np->np_port, (char *)(& (np->np_transport)->name)); } else { } iscsit_put_transport(np->np_transport); kfree((void const *)np); return (0); } } static int iscsit_immediate_queue(struct iscsi_conn *conn , struct iscsi_cmd *cmd , int state ) ; static int iscsit_response_queue(struct iscsi_conn *conn , struct iscsi_cmd *cmd , int state ) ; static int iscsit_queue_rsp(struct iscsi_conn *conn , struct iscsi_cmd *cmd ) { { iscsit_add_cmd_to_response_queue(cmd, cmd->conn, (int )((u8 )cmd->i_state)); return (0); } } static void iscsit_aborted_task(struct iscsi_conn *conn , struct iscsi_cmd *cmd ) { bool scsi_cmd ; int tmp ; { scsi_cmd = (unsigned int )cmd->iscsi_opcode == 1U; spin_lock_bh(& conn->cmd_lock); tmp = list_empty((struct list_head const *)(& cmd->i_conn_node)); if (tmp == 0) { list_del_init(& cmd->i_conn_node); } else { } spin_unlock_bh(& conn->cmd_lock); __iscsit_free_cmd(cmd, (int )scsi_cmd, 1); return; } } static enum target_prot_op iscsit_get_sup_prot_ops(struct iscsi_conn *conn ) { { return (0); } } static struct iscsit_transport iscsi_target_transport = {{'i', 'S', 'C', 'S', 'I', '/', 'T', 'C', 'P', '\000'}, 0, 0, (struct module *)0, {0, 0}, & iscsit_setup_np, & iscsit_accept_np, & iscsit_free_np, 0, 0, & iscsit_get_login_rx, & iscsit_put_login_tx, & iscsit_immediate_queue, & iscsit_response_queue, & iscsit_build_r2ts_for_cmd, & iscsit_queue_rsp, & iscsit_queue_rsp, & iscsit_aborted_task, & iscsit_get_sup_prot_ops}; static int iscsi_target_init_module(void) { int ret ; int size ; struct _ddebug descriptor ; long tmp ; void *tmp___0 ; struct lock_class_key __key ; struct lock_class_key __key___0 ; struct lock_class_key __key___1 ; void *tmp___1 ; int tmp___2 ; { ret = 0; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_init_module"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "iSCSI-Target v4.1.0\n"; descriptor.lineno = 540U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI-Target v4.1.0\n"); } else { } tmp___0 = kzalloc(2720UL, 208U); iscsit_global = (struct iscsit_global *)tmp___0; if ((unsigned long )iscsit_global == (unsigned long )((struct iscsit_global *)0)) { printk("\vUnable to allocate memory for iscsit_global\n"); return (-1); } else { } spinlock_check(& iscsit_global->ts_bitmap_lock); __raw_spin_lock_init(& iscsit_global->ts_bitmap_lock.__annonCompField17.rlock, "&(&iscsit_global->ts_bitmap_lock)->rlock", & __key); __mutex_init(& auth_id_lock, "&auth_id_lock", & __key___0); spinlock_check(& sess_idr_lock); __raw_spin_lock_init(& sess_idr_lock.__annonCompField17.rlock, "&(&sess_idr_lock)->rlock", & __key___1); idr_init(& tiqn_idr); idr_init(& sess_idr); ret = target_register_template(& iscsi_ops); if (ret != 0) { goto out; } else { } size = 32768; tmp___1 = vzalloc((unsigned long )size); iscsit_global->ts_bitmap = (unsigned long *)tmp___1; if ((unsigned long )iscsit_global->ts_bitmap == (unsigned long )((unsigned long *)0UL)) { printk("\vUnable to allocate iscsit_global->ts_bitmap\n"); goto configfs_out; } else { } lio_qr_cache = kmem_cache_create("lio_qr_cache", 32UL, 8UL, 0UL, (void (*)(void * ))0); if ((unsigned long )lio_qr_cache == (unsigned long )((struct kmem_cache *)0)) { printk("\vnable to kmem_cache_create() for lio_qr_cache\n"); goto bitmap_out; } else { } lio_dr_cache = kmem_cache_create("lio_dr_cache", 64UL, 64UL, 0UL, (void (*)(void * ))0); if ((unsigned long )lio_dr_cache == (unsigned long )((struct kmem_cache *)0)) { printk("\vUnable to kmem_cache_create() for lio_dr_cache\n"); goto qr_out; } else { } lio_ooo_cache = kmem_cache_create("lio_ooo_cache", 64UL, 64UL, 0UL, (void (*)(void * ))0); if ((unsigned long )lio_ooo_cache == (unsigned long )((struct kmem_cache *)0)) { printk("\vUnable to kmem_cache_create() for lio_ooo_cache\n"); goto dr_out; } else { } lio_r2t_cache = kmem_cache_create("lio_r2t_cache", 64UL, 64UL, 0UL, (void (*)(void * ))0); if ((unsigned long )lio_r2t_cache == (unsigned long )((struct kmem_cache *)0)) { printk("\vUnable to kmem_cache_create() for lio_r2t_cache\n"); goto ooo_out; } else { } iscsit_register_transport(& iscsi_target_transport); tmp___2 = iscsit_load_discovery_tpg(); if (tmp___2 < 0) { goto r2t_out; } else { } return (ret); r2t_out: iscsit_unregister_transport(& iscsi_target_transport); kmem_cache_destroy(lio_r2t_cache); ooo_out: kmem_cache_destroy(lio_ooo_cache); dr_out: kmem_cache_destroy(lio_dr_cache); qr_out: kmem_cache_destroy(lio_qr_cache); bitmap_out: vfree((void const *)iscsit_global->ts_bitmap); configfs_out: ; if ((unsigned long )iscsit_global->discovery_tpg != (unsigned long )((struct iscsi_portal_group *)0)) { iscsit_tpg_disable_portal_group(iscsit_global->discovery_tpg, 1); } else { } target_unregister_template(& iscsi_ops); out: kfree((void const *)iscsit_global); return (-12); } } static void iscsi_target_cleanup_module(void) { { iscsit_release_discovery_tpg(); iscsit_unregister_transport(& iscsi_target_transport); kmem_cache_destroy(lio_qr_cache); kmem_cache_destroy(lio_dr_cache); kmem_cache_destroy(lio_ooo_cache); kmem_cache_destroy(lio_r2t_cache); if ((unsigned long )iscsit_global->discovery_tpg != (unsigned long )((struct iscsi_portal_group *)0)) { iscsit_tpg_disable_portal_group(iscsit_global->discovery_tpg, 1); } else { } target_unregister_template(& iscsi_ops); vfree((void const *)iscsit_global->ts_bitmap); kfree((void const *)iscsit_global); return; } } static int iscsit_add_reject(struct iscsi_conn *conn , u8 reason , unsigned char *buf ) { struct iscsi_cmd *cmd ; { cmd = iscsit_allocate_cmd(conn, 1); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { return (-1); } else { } cmd->iscsi_opcode = 63U; cmd->reject_reason = reason; cmd->buf_ptr = kmemdup((void const *)buf, 48UL, 208U); if ((unsigned long )cmd->buf_ptr == (unsigned long )((void *)0)) { printk("\vUnable to allocate memory for cmd->buf_ptr\n"); iscsit_free_cmd(cmd, 0); return (-1); } else { } spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); cmd->i_state = 19; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (-1); } } static int iscsit_add_reject_from_cmd(struct iscsi_cmd *cmd , u8 reason , bool add_to_conn , unsigned char *buf ) { struct iscsi_conn *conn ; struct _ddebug descriptor ; long tmp ; { if ((unsigned long )cmd->conn == (unsigned long )((struct iscsi_conn *)0)) { printk("\vcmd->conn is NULL for ITT: 0x%08x\n", cmd->init_task_tag); return (-1); } else { } conn = cmd->conn; cmd->iscsi_opcode = 63U; cmd->reject_reason = reason; cmd->buf_ptr = kmemdup((void const *)buf, 48UL, 208U); if ((unsigned long )cmd->buf_ptr == (unsigned long )((void *)0)) { printk("\vUnable to allocate memory for cmd->buf_ptr\n"); iscsit_free_cmd(cmd, 0); return (-1); } else { } if ((int )add_to_conn) { spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); } else { } cmd->i_state = 19; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); if ((unsigned long )cmd->se_cmd.se_tfo != (unsigned long )((struct target_core_fabric_ops const *)0)) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_add_reject_from_cmd"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "iscsi reject: calling target_put_sess_cmd >>>>>>\n"; descriptor.lineno = 717U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iscsi reject: calling target_put_sess_cmd >>>>>>\n"); } else { } target_put_sess_cmd(& cmd->se_cmd); } else { } return (-1); } } static int iscsit_add_reject_cmd(struct iscsi_cmd *cmd , u8 reason , unsigned char *buf ) { int tmp ; { tmp = iscsit_add_reject_from_cmd(cmd, (int )reason, 1, buf); return (tmp); } } int iscsit_reject_cmd(struct iscsi_cmd *cmd , u8 reason , unsigned char *buf ) { int tmp ; { tmp = iscsit_add_reject_from_cmd(cmd, (int )reason, 0, buf); return (tmp); } } static int iscsit_map_iovec(struct iscsi_cmd *cmd , struct kvec *iov , u32 data_offset , u32 data_length ) { u32 i ; struct scatterlist *sg ; unsigned int page_off ; u32 cur_len ; u32 __min1 ; u32 __min2 ; struct page *tmp ; void *tmp___0 ; { i = 0U; sg = cmd->se_cmd.t_data_sg + (unsigned long )(data_offset / 4096U); page_off = data_offset & 4095U; cmd->first_data_sg = sg; cmd->first_data_sg_off = page_off; goto ldv_60662; ldv_60661: __min1 = data_length; __min2 = sg->length - page_off; cur_len = __min1 < __min2 ? __min1 : __min2; tmp = sg_page___0(sg); tmp___0 = kmap(tmp); (iov + (unsigned long )i)->iov_base = tmp___0 + ((unsigned long )sg->offset + (unsigned long )page_off); (iov + (unsigned long )i)->iov_len = (size_t )cur_len; data_length = data_length - cur_len; page_off = 0U; sg = sg_next(sg); i = i + 1U; ldv_60662: ; if (data_length != 0U) { goto ldv_60661; } else { } cmd->kmapped_nents = i; return ((int )i); } } static void iscsit_unmap_iovec(struct iscsi_cmd *cmd ) { u32 i ; struct scatterlist *sg ; struct page *tmp ; { sg = cmd->first_data_sg; i = 0U; goto ldv_60670; ldv_60669: tmp = sg_page___0(sg + (unsigned long )i); kunmap(tmp); i = i + 1U; ldv_60670: ; if (cmd->kmapped_nents > i) { goto ldv_60669; } else { } return; } } static void iscsit_ack_from_expstatsn(struct iscsi_conn *conn , u32 exp_statsn ) { struct list_head ack_list ; struct iscsi_cmd *cmd ; struct iscsi_cmd *cmd_p ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; int tmp ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; struct list_head const *__mptr___4 ; { ack_list.next = & ack_list; ack_list.prev = & ack_list; conn->exp_statsn = exp_statsn; if ((unsigned int )((conn->sess)->sess_ops)->RDMAExtensions != 0U) { return; } else { } spin_lock_bh(& conn->cmd_lock); __mptr = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd_p = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; goto ldv_60687; ldv_60686: spin_lock(& cmd->istate_lock); if ((unsigned int )cmd->i_state == 31U) { tmp = iscsi_sna_lt(cmd->stat_sn, exp_statsn); if (tmp != 0) { cmd->i_state = 41; spin_unlock(& cmd->istate_lock); list_move_tail(& cmd->i_conn_node, & ack_list); goto ldv_60685; } else { } } else { } spin_unlock(& cmd->istate_lock); ldv_60685: cmd = cmd_p; __mptr___1 = (struct list_head const *)cmd_p->i_conn_node.next; cmd_p = (struct iscsi_cmd *)__mptr___1 + 0xfffffffffffffc80UL; ldv_60687: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_60686; } else { } spin_unlock_bh(& conn->cmd_lock); __mptr___2 = (struct list_head const *)ack_list.next; cmd = (struct iscsi_cmd *)__mptr___2 + 0xfffffffffffffc80UL; __mptr___3 = (struct list_head const *)cmd->i_conn_node.next; cmd_p = (struct iscsi_cmd *)__mptr___3 + 0xfffffffffffffc80UL; goto ldv_60696; ldv_60695: list_del_init(& cmd->i_conn_node); iscsit_free_cmd(cmd, 0); cmd = cmd_p; __mptr___4 = (struct list_head const *)cmd_p->i_conn_node.next; cmd_p = (struct iscsi_cmd *)__mptr___4 + 0xfffffffffffffc80UL; ldv_60696: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& ack_list)) { goto ldv_60695; } else { } return; } } static int iscsit_allocate_iovecs(struct iscsi_cmd *cmd ) { u32 iov_count ; unsigned long _max1 ; unsigned long _max2 ; void *tmp ; { _max1 = 1UL; _max2 = ((unsigned long )cmd->se_cmd.data_length + 4095UL) / 4096UL; iov_count = (u32 )(_max1 > _max2 ? _max1 : _max2); iov_count = iov_count + 5U; tmp = kzalloc((unsigned long )iov_count * 16UL, 208U); cmd->iov_data = (struct kvec *)tmp; if ((unsigned long )cmd->iov_data == (unsigned long )((struct kvec *)0)) { printk("\vUnable to allocate cmd->iov_data\n"); return (-12); } else { } cmd->orig_iov_data_count = iov_count; return (0); } } int iscsit_setup_scsi_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) { int data_direction ; int payload_length ; struct iscsi_scsi_req *hdr ; int iscsi_task_attr ; int sam_task_attr ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; __u32 tmp___5 ; int tmp___6 ; __u32 tmp___7 ; int tmp___8 ; int tmp___9 ; struct _ddebug descriptor ; long tmp___10 ; itt_t tmp___11 ; __u32 tmp___12 ; __u32 tmp___13 ; struct iscsi_datain_req *dr ; int tmp___14 ; __u32 tmp___15 ; struct _ddebug descriptor___0 ; __u32 tmp___16 ; long tmp___17 ; u64 tmp___18 ; int tmp___19 ; int tmp___20 ; int tmp___21 ; { atomic_long_inc(& (conn->sess)->cmd_pdus); hdr = (struct iscsi_scsi_req *)buf; payload_length = (((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]; if (((int )hdr->flags & 32) == 0 && (int )((signed char )hdr->flags) >= 0) { printk("\vISCSI_FLAG_CMD_WRITE & ISCSI_FLAG_CMD_FINAL not set. Bad iSCSI Initiator.\n"); tmp = iscsit_add_reject_cmd(cmd, 9, buf); return (tmp); } else { } if ((((int )hdr->flags & 64) != 0 || ((int )hdr->flags & 32) != 0) && hdr->data_length == 0U) { hdr->flags = (unsigned int )hdr->flags & 191U; hdr->flags = (unsigned int )hdr->flags & 223U; printk("\fISCSI_FLAG_CMD_READ or ISCSI_FLAG_CMD_WRITE set when Expected Data Transfer Length is 0 for CDB: 0x%02x, Fixing up flags\n", (int )hdr->cdb[0]); } else { } if ((((int )hdr->flags & 64) == 0 && ((int )hdr->flags & 32) == 0) && hdr->data_length != 0U) { printk("\vISCSI_FLAG_CMD_READ and/or ISCSI_FLAG_CMD_WRITE MUST be set if Expected Data Transfer Length is not 0. Bad iSCSI Initiator\n"); tmp___0 = iscsit_add_reject_cmd(cmd, 9, buf); return (tmp___0); } else { } if (((int )hdr->flags & 64) != 0 && ((int )hdr->flags & 32) != 0) { printk("\vBidirectional operations not supported!\n"); tmp___1 = iscsit_add_reject_cmd(cmd, 9, buf); return (tmp___1); } else { } if (((int )hdr->opcode & 64) != 0) { printk("\vIllegally set Immediate Bit in iSCSI Initiator Scsi Command PDU.\n"); tmp___2 = iscsit_add_reject_cmd(cmd, 9, buf); return (tmp___2); } else { } if (payload_length != 0 && (unsigned int )((conn->sess)->sess_ops)->ImmediateData == 0U) { printk("\vImmediateData=No but DataSegmentLength=%u, protocol error.\n", payload_length); tmp___3 = iscsit_add_reject_cmd(cmd, 4, buf); return (tmp___3); } else { } tmp___5 = __fswab32(hdr->data_length); if (tmp___5 == (unsigned int )payload_length && (int )((signed char )hdr->flags) >= 0) { printk("\vExpected Data Transfer Length and Length of Immediate Data are the same, but ISCSI_FLAG_CMD_FINAL bit is not set protocol error\n"); tmp___4 = iscsit_add_reject_cmd(cmd, 4, buf); return (tmp___4); } else { } tmp___7 = __fswab32(hdr->data_length); if ((unsigned int )payload_length > tmp___7) { printk("\vDataSegmentLength: %u is greater than EDTL: %u, protocol error.\n", payload_length, hdr->data_length); tmp___6 = iscsit_add_reject_cmd(cmd, 4, buf); return (tmp___6); } else { } if ((u32 )payload_length > (conn->conn_ops)->MaxXmitDataSegmentLength) { printk("\vDataSegmentLength: %u is greater than MaxXmitDataSegmentLength: %u, protocol error.\n", payload_length, (conn->conn_ops)->MaxXmitDataSegmentLength); tmp___8 = iscsit_add_reject_cmd(cmd, 4, buf); return (tmp___8); } else { } if ((u32 )payload_length > ((conn->sess)->sess_ops)->FirstBurstLength) { printk("\vDataSegmentLength: %u is greater than FirstBurstLength: %u, protocol error.\n", payload_length, ((conn->sess)->sess_ops)->FirstBurstLength); tmp___9 = iscsit_add_reject_cmd(cmd, 9, buf); return (tmp___9); } else { } data_direction = ((int )hdr->flags & 32) == 0 ? (((int )hdr->flags & 64) != 0 ? 2 : 3) : 1; cmd->data_direction = (enum dma_data_direction )data_direction; iscsi_task_attr = (int )hdr->flags & 7; if (iscsi_task_attr == 0 || iscsi_task_attr == 1) { sam_task_attr = 32; } else if (iscsi_task_attr == 2) { sam_task_attr = 34; } else if (iscsi_task_attr == 3) { sam_task_attr = 33; } else if (iscsi_task_attr == 4) { sam_task_attr = 36; } else { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_setup_scsi_cmd"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Unknown iSCSI Task Attribute: 0x%02x, using TCM_SIMPLE_TAG\n"; descriptor.lineno = 957U; descriptor.flags = 0U; tmp___10 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___10 != 0L) { __dynamic_pr_debug(& descriptor, "Unknown iSCSI Task Attribute: 0x%02x, using TCM_SIMPLE_TAG\n", iscsi_task_attr); } else { } sam_task_attr = 32; } cmd->iscsi_opcode = 1U; cmd->i_state = 1; cmd->immediate_cmd = ((int )hdr->opcode & 64) != 0; cmd->immediate_data = payload_length != 0; cmd->unsolicited_data = (u8 )((int )((signed char )hdr->flags) >= 0 && ((int )hdr->flags & 32) != 0); if ((unsigned int )cmd->unsolicited_data != 0U) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 4U); } else { } tmp___11 = hdr->itt; cmd->init_task_tag = tmp___11; (conn->sess)->init_task_tag = tmp___11; if (((int )hdr->flags & 64) != 0) { cmd->targ_xfer_tag = session_get_next_ttt(conn->sess); } else if (((int )hdr->flags & 32) != 0) { cmd->targ_xfer_tag = 4294967295U; } else { } tmp___12 = __fswab32(hdr->cmdsn); cmd->cmd_sn = tmp___12; tmp___13 = __fswab32(hdr->exp_statsn); cmd->exp_stat_sn = tmp___13; cmd->first_burst_len = (u32 )payload_length; if ((unsigned int )((conn->sess)->sess_ops)->RDMAExtensions == 0U && (unsigned int )cmd->data_direction == 2U) { dr = iscsit_allocate_datain_req(); if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { tmp___14 = iscsit_add_reject_cmd(cmd, 10, buf); return (tmp___14); } else { } iscsit_attach_datain_req(cmd, dr); } else { } tmp___15 = __fswab32(hdr->data_length); transport_init_se_cmd(& cmd->se_cmd, & iscsi_ops, (conn->sess)->se_sess, tmp___15, (int )cmd->data_direction, sam_task_attr, (unsigned char *)(& cmd->sense_buffer) + 2UL); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_setup_scsi_cmd"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Got SCSI Command, ITT: 0x%08x, CmdSN: 0x%08x, ExpXferLen: %u, Length: %u, CID: %hu\n"; descriptor___0.lineno = 1002U; descriptor___0.flags = 0U; tmp___17 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___17 != 0L) { tmp___16 = __fswab32(hdr->data_length); __dynamic_pr_debug(& descriptor___0, "Got SCSI Command, ITT: 0x%08x, CmdSN: 0x%08x, ExpXferLen: %u, Length: %u, CID: %hu\n", hdr->itt, hdr->cmdsn, tmp___16, payload_length, (int )conn->cid); } else { } target_get_sess_cmd(& cmd->se_cmd, 1); tmp___18 = scsilun_to_int(& hdr->lun); cmd->sense_reason = transport_lookup_cmd_lun(& cmd->se_cmd, tmp___18); if (cmd->sense_reason != 0U) { goto attach_cmd; } else { } cmd->se_cmd.tag = (u64 )cmd->init_task_tag; cmd->sense_reason = target_setup_cmd_from_cdb(& cmd->se_cmd, (unsigned char *)(& hdr->cdb)); if (cmd->sense_reason != 0U) { if (cmd->sense_reason == 18U) { tmp___19 = iscsit_add_reject_cmd(cmd, 10, buf); return (tmp___19); } else { } goto attach_cmd; } else { } tmp___21 = iscsit_build_pdu_and_seq_lists(cmd, (u32 )payload_length); if (tmp___21 < 0) { tmp___20 = iscsit_add_reject_cmd(cmd, 10, buf); return (tmp___20); } else { } attach_cmd: spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); core_alua_check_nonop_delay(& cmd->se_cmd); return (0); } } static char const __kstrtab_iscsit_setup_scsi_cmd[22U] = { 'i', 's', 'c', 's', 'i', 't', '_', 's', 'e', 't', 'u', 'p', '_', 's', 'c', 's', 'i', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_setup_scsi_cmd ; struct kernel_symbol const __ksymtab_iscsit_setup_scsi_cmd = {(unsigned long )(& iscsit_setup_scsi_cmd), (char const *)(& __kstrtab_iscsit_setup_scsi_cmd)}; void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *cmd ) { { iscsit_set_dataout_sequence_values(cmd); spin_lock_bh(& cmd->dataout_timeout_lock); iscsit_start_dataout_timer(cmd, cmd->conn); spin_unlock_bh(& cmd->dataout_timeout_lock); return; } } static char const __kstrtab_iscsit_set_unsoliticed_dataout[31U] = { 'i', 's', 'c', 's', 'i', 't', '_', 's', 'e', 't', '_', 'u', 'n', 's', 'o', 'l', 'i', 't', 'i', 'c', 'e', 'd', '_', 'd', 'a', 't', 'a', 'o', 'u', 't', '\000'}; struct kernel_symbol const __ksymtab_iscsit_set_unsoliticed_dataout ; struct kernel_symbol const __ksymtab_iscsit_set_unsoliticed_dataout = {(unsigned long )(& iscsit_set_unsoliticed_dataout), (char const *)(& __kstrtab_iscsit_set_unsoliticed_dataout)}; int iscsit_process_scsi_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_scsi_req *hdr ) { int cmdsn_ret ; __u32 tmp ; { cmdsn_ret = 0; if ((unsigned int )cmd->immediate_data == 0U) { cmdsn_ret = iscsit_sequence_cmd(conn, cmd, (unsigned char *)hdr, hdr->cmdsn); if (cmdsn_ret == -1) { return (-1); } else if (cmdsn_ret == 1) { target_put_sess_cmd(& cmd->se_cmd); return (0); } else { } } else { } tmp = __fswab32(hdr->exp_statsn); iscsit_ack_from_expstatsn(conn, tmp); if ((unsigned int )cmd->immediate_data == 0U) { if (cmd->sense_reason == 0U && (unsigned int )cmd->unsolicited_data != 0U) { iscsit_set_unsoliticed_dataout(cmd); } else { } if (cmd->sense_reason == 0U) { return (0); } else { } target_put_sess_cmd(& cmd->se_cmd); return (0); } else { } if (cmd->sense_reason != 0U) { if ((unsigned int )cmd->reject_reason != 0U) { return (0); } else { } return (1); } else { } cmd->sense_reason = transport_generic_new_cmd(& cmd->se_cmd); if (cmd->sense_reason != 0U) { return (1); } else { } return (0); } } static char const __kstrtab_iscsit_process_scsi_cmd[24U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 's', 'c', 's', 'i', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_process_scsi_cmd ; struct kernel_symbol const __ksymtab_iscsit_process_scsi_cmd = {(unsigned long )(& iscsit_process_scsi_cmd), (char const *)(& __kstrtab_iscsit_process_scsi_cmd)}; static int iscsit_get_immediate_data(struct iscsi_cmd *cmd , struct iscsi_scsi_req *hdr , bool dump_payload ) { int cmdsn_ret ; int immed_ret ; int rc ; { cmdsn_ret = 0; immed_ret = 0; if ((int )dump_payload) { goto after_immediate_data; } else { } immed_ret = iscsit_handle_immediate_data(cmd, hdr, cmd->first_burst_len); after_immediate_data: ; if (immed_ret == 0) { cmdsn_ret = iscsit_sequence_cmd(cmd->conn, cmd, (unsigned char *)hdr, hdr->cmdsn); if (cmdsn_ret == -1) { return (-1); } else { } if (cmd->sense_reason != 0U || cmdsn_ret == 1) { rc = iscsit_dump_data_payload(cmd->conn, cmd->first_burst_len, 1); target_put_sess_cmd(& cmd->se_cmd); return (rc); } else if ((unsigned int )cmd->unsolicited_data != 0U) { iscsit_set_unsoliticed_dataout(cmd); } else { } } else if (immed_ret == 1) { cmd->i_state = 41; iscsit_add_cmd_to_immediate_queue(cmd, cmd->conn, (int )((u8 )cmd->i_state)); } else { return (-1); } return (0); } } static int iscsit_handle_scsi_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) { struct iscsi_scsi_req *hdr ; int rc ; int immed_data ; bool dump_payload ; int tmp ; int tmp___0 ; int tmp___1 ; { hdr = (struct iscsi_scsi_req *)buf; dump_payload = 0; rc = iscsit_setup_scsi_cmd(conn, cmd, buf); if (rc < 0) { return (0); } else { } tmp___0 = iscsit_allocate_iovecs(cmd); if (tmp___0 < 0) { tmp = iscsit_reject_cmd(cmd, 10, buf); return (tmp); } else { } immed_data = (int )cmd->immediate_data; rc = iscsit_process_scsi_cmd(conn, cmd, hdr); if (rc < 0) { return (rc); } else if (rc > 0) { dump_payload = 1; } else { } if (immed_data == 0) { return (0); } else { } tmp___1 = iscsit_get_immediate_data(cmd, hdr, (int )dump_payload); return (tmp___1); } } static u32 iscsit_do_crypto_hash_sg(struct hash_desc *hash , struct iscsi_cmd *cmd , u32 data_offset , u32 data_length , u32 padding , u8 *pad_bytes ) { u32 data_crc ; u32 i ; struct scatterlist *sg ; unsigned int page_off ; u32 cur_len ; u32 __min1 ; u32 __min2 ; struct scatterlist pad_sg ; { crypto_hash_init(hash); sg = cmd->first_data_sg; page_off = cmd->first_data_sg_off; i = 0U; goto ldv_60789; ldv_60788: __min1 = data_length; __min2 = (sg + (unsigned long )i)->length - page_off; cur_len = __min1 < __min2 ? __min1 : __min2; crypto_hash_update(hash, sg + (unsigned long )i, cur_len); data_length = data_length - cur_len; page_off = 0U; i = i + 1U; ldv_60789: ; if (data_length != 0U) { goto ldv_60788; } else { } if (padding != 0U) { sg_init_one(& pad_sg, (void const *)pad_bytes, padding); crypto_hash_update(hash, & pad_sg, padding); } else { } crypto_hash_final(hash, (u8 *)(& data_crc)); return (data_crc); } } static void iscsit_do_crypto_hash_buf(struct hash_desc *hash , void const *buf , u32 payload_length , u32 padding , u8 *pad_bytes , u8 *data_crc ) { struct scatterlist sg ; { crypto_hash_init(hash); sg_init_one(& sg, buf, payload_length); crypto_hash_update(hash, & sg, payload_length); if (padding != 0U) { sg_init_one(& sg, (void const *)pad_bytes, padding); crypto_hash_update(hash, & sg, padding); } else { } crypto_hash_final(hash, data_crc); return; } } int iscsit_check_dataout_hdr(struct iscsi_conn *conn , unsigned char *buf , struct iscsi_cmd **out_cmd ) { struct iscsi_data *hdr ; struct iscsi_cmd *cmd ; struct se_cmd *se_cmd ; u32 payload_length ; int rc ; int tmp ; struct _ddebug descriptor ; __u32 tmp___0 ; long tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; __u32 tmp___5 ; int dump_unsolicited_data ; int __ret_warn_on ; long tmp___6 ; int tmp___7 ; int tmp___8 ; { hdr = (struct iscsi_data *)buf; cmd = (struct iscsi_cmd *)0; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if (payload_length == 0U) { printk("\fDataOUT payload is ZERO, ignoring.\n"); return (0); } else { } atomic_long_add((long )payload_length, & (conn->sess)->rx_data_octets); if ((conn->conn_ops)->MaxXmitDataSegmentLength < payload_length) { printk("\vDataSegmentLength: %u is greater than MaxXmitDataSegmentLength: %u\n", payload_length, (conn->conn_ops)->MaxXmitDataSegmentLength); tmp = iscsit_add_reject(conn, 4, buf); return (tmp); } else { } cmd = iscsit_find_cmd_from_itt_or_dump(conn, hdr->itt, payload_length); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { return (0); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_check_dataout_hdr"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Got DataOut ITT: 0x%08x, TTT: 0x%08x, DataSN: 0x%08x, Offset: %u, Length: %u, CID: %hu\n"; descriptor.lineno = 1299U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { tmp___0 = __fswab32(hdr->offset); __dynamic_pr_debug(& descriptor, "Got DataOut ITT: 0x%08x, TTT: 0x%08x, DataSN: 0x%08x, Offset: %u, Length: %u, CID: %hu\n", hdr->itt, hdr->ttt, hdr->datasn, tmp___0, payload_length, (int )conn->cid); } else { } if ((int )cmd->cmd_flags & 1) { printk("\vCommand ITT: 0x%08x received DataOUT after last DataOUT received, dumping payload\n", cmd->init_task_tag); tmp___2 = iscsit_dump_data_payload(conn, payload_length, 1); return (tmp___2); } else { } if ((unsigned int )cmd->data_direction != 1U) { printk("\vCommand ITT: 0x%08x received DataOUT for a NON-WRITE command.\n", cmd->init_task_tag); tmp___3 = iscsit_dump_data_payload(conn, payload_length, 1); return (tmp___3); } else { } se_cmd = & cmd->se_cmd; iscsit_mod_dataout_timer(cmd); tmp___5 = __fswab32(hdr->offset); if (tmp___5 + payload_length > cmd->se_cmd.data_length) { printk("\vDataOut Offset: %u, Length %u greater than iSCSI Command EDTL %u, protocol error.\n", hdr->offset, payload_length, cmd->se_cmd.data_length); tmp___4 = iscsit_reject_cmd(cmd, 9, buf); return (tmp___4); } else { } if ((unsigned int )cmd->unsolicited_data != 0U) { dump_unsolicited_data = 0; if ((unsigned int )((conn->sess)->sess_ops)->InitialR2T != 0U) { printk("\vReceived unexpected unsolicited data while InitialR2T=Yes, protocol error.\n"); transport_send_check_condition_and_sense(& cmd->se_cmd, 4U, 0); return (-1); } else { } __ret_warn_on = (unsigned int )se_cmd->t_state != 3U; tmp___6 = ldv__builtin_expect(__ret_warn_on != 0, 0L); if (tmp___6 != 0L) { warn_slowpath_null("/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c", 1340); } else { } ldv__builtin_expect(__ret_warn_on != 0, 0L); if ((se_cmd->se_cmd_flags & 1U) == 0U) { dump_unsolicited_data = 1; } else { } if (dump_unsolicited_data != 0) { if ((int )((signed char )hdr->flags) < 0) { iscsit_stop_dataout_timer(cmd); } else { } transport_check_aborted_status(se_cmd, (int )hdr->flags & 128); tmp___7 = iscsit_dump_data_payload(conn, payload_length, 1); return (tmp___7); } else { } } else if ((int )se_cmd->transport_state & 1) { if ((int )((signed char )hdr->flags) < 0) { cmd->outstanding_r2ts = cmd->outstanding_r2ts - 1U; if (cmd->outstanding_r2ts == 0U) { iscsit_stop_dataout_timer(cmd); transport_check_aborted_status(se_cmd, 1); } else { } } else { } tmp___8 = iscsit_dump_data_payload(conn, payload_length, 1); return (tmp___8); } else { } rc = iscsit_check_pre_dataout(cmd, buf); if (rc == 3) { return (0); } else if (rc == -1) { return (-1); } else { } *out_cmd = cmd; return (0); } } static char const __kstrtab_iscsit_check_dataout_hdr[25U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'c', 'h', 'e', 'c', 'k', '_', 'd', 'a', 't', 'a', 'o', 'u', 't', '_', 'h', 'd', 'r', '\000'}; struct kernel_symbol const __ksymtab_iscsit_check_dataout_hdr ; struct kernel_symbol const __ksymtab_iscsit_check_dataout_hdr = {(unsigned long )(& iscsit_check_dataout_hdr), (char const *)(& __kstrtab_iscsit_check_dataout_hdr)}; static int iscsit_get_dataout(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_data *hdr ) { struct kvec *iov ; u32 checksum ; u32 iov_count ; u32 padding ; u32 rx_got ; u32 rx_size ; u32 payload_length ; int iov_ret ; int data_crc_failed ; __u32 tmp ; u32 tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; u32 tmp___2 ; int tmp___3 ; u32 data_crc ; __u32 tmp___4 ; struct _ddebug descriptor___0 ; long tmp___5 ; { iov_count = 0U; padding = 0U; rx_got = 0U; rx_size = 0U; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); data_crc_failed = 0; rx_size = rx_size + payload_length; iov = cmd->iov_data; tmp = __fswab32(hdr->offset); iov_ret = iscsit_map_iovec(cmd, iov, tmp, payload_length); if (iov_ret < 0) { return (-1); } else { } iov_count = iov_count + (u32 )iov_ret; padding = - payload_length & 3U; if (padding != 0U) { (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->pad_bytes); tmp___0 = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp___0)->iov_len = (size_t )padding; rx_size = rx_size + padding; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_get_dataout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Receiving %u padding bytes.\n"; descriptor.lineno = 1418U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Receiving %u padding bytes.\n", padding); } else { } } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { (iov + (unsigned long )iov_count)->iov_base = (void *)(& checksum); tmp___2 = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp___2)->iov_len = 4UL; rx_size = rx_size + 4U; } else { } tmp___3 = rx_data(conn, cmd->iov_data, (int )iov_count, (int )rx_size); rx_got = (u32 )tmp___3; iscsit_unmap_iovec(cmd); if (rx_got != rx_size) { return (-1); } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { tmp___4 = __fswab32(hdr->offset); data_crc = iscsit_do_crypto_hash_sg(& conn->conn_rx_hash, cmd, tmp___4, payload_length, padding, (u8 *)(& cmd->pad_bytes)); if (checksum != data_crc) { printk("\vITT: 0x%08x, Offset: %u, Length: %u, DataSN: 0x%08x, CRC32C DataDigest 0x%08x does not match computed 0x%08x\n", hdr->itt, hdr->offset, payload_length, hdr->datasn, checksum, data_crc); data_crc_failed = 1; } else { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_get_dataout"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Got CRC32C DataDigest 0x%08x for %u bytes of Data Out\n"; descriptor___0.lineno = 1452U; descriptor___0.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___0, "Got CRC32C DataDigest 0x%08x for %u bytes of Data Out\n", checksum, payload_length); } else { } } } else { } return (data_crc_failed); } } int iscsit_check_dataout_payload(struct iscsi_cmd *cmd , struct iscsi_data *hdr , bool data_crc_failed ) { struct iscsi_conn *conn ; int rc ; int ooo_cmdsn ; { conn = cmd->conn; rc = iscsit_check_post_dataout(cmd, (unsigned char *)hdr, (int )data_crc_failed); if (rc == 0 || rc == 3) { return (0); } else if (rc == 1) { iscsit_set_dataout_sequence_values(cmd); (*((conn->conn_transport)->iscsit_get_dataout))(conn, cmd, 0); } else if (rc == 2) { spin_lock_bh(& cmd->istate_lock); ooo_cmdsn = (int )cmd->cmd_flags & 128; cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 1U); cmd->i_state = 6; spin_unlock_bh(& cmd->istate_lock); iscsit_stop_dataout_timer(cmd); if (ooo_cmdsn != 0) { return (0); } else { } target_execute_cmd(& cmd->se_cmd); return (0); } else { return (-1); } return (0); } } static char const __kstrtab_iscsit_check_dataout_payload[29U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'c', 'h', 'e', 'c', 'k', '_', 'd', 'a', 't', 'a', 'o', 'u', 't', '_', 'p', 'a', 'y', 'l', 'o', 'a', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_check_dataout_payload ; struct kernel_symbol const __ksymtab_iscsit_check_dataout_payload = {(unsigned long )(& iscsit_check_dataout_payload), (char const *)(& __kstrtab_iscsit_check_dataout_payload)}; static int iscsit_handle_data_out(struct iscsi_conn *conn , unsigned char *buf ) { struct iscsi_cmd *cmd ; struct iscsi_data *hdr ; int rc ; bool data_crc_failed ; int tmp ; { cmd = (struct iscsi_cmd *)0; hdr = (struct iscsi_data *)buf; data_crc_failed = 0; rc = iscsit_check_dataout_hdr(conn, buf, & cmd); if (rc < 0) { return (0); } else if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { return (0); } else { } rc = iscsit_get_dataout(conn, cmd, hdr); if (rc < 0) { return (rc); } else if (rc > 0) { data_crc_failed = 1; } else { } tmp = iscsit_check_dataout_payload(cmd, hdr, (int )data_crc_failed); return (tmp); } } int iscsit_setup_nop_out(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_nopout *hdr ) { u32 payload_length ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; struct _ddebug descriptor ; long tmp___5 ; itt_t tmp___6 ; __u32 tmp___7 ; __u32 tmp___8 ; { payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((int )((signed char )hdr->flags) >= 0) { printk("\vNopOUT Flag\'s, Left Most Bit not set, protocol error.\n"); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { tmp = iscsit_add_reject(conn, 4, (unsigned char *)hdr); return (tmp); } else { } tmp___0 = iscsit_reject_cmd(cmd, 4, (unsigned char *)hdr); return (tmp___0); } else { } if (hdr->itt == 4294967295U && ((int )hdr->opcode & 64) == 0) { printk("\vNOPOUT ITT is reserved, but Immediate Bit is not set, protocol error.\n"); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { tmp___1 = iscsit_add_reject(conn, 4, (unsigned char *)hdr); return (tmp___1); } else { } tmp___2 = iscsit_reject_cmd(cmd, 4, (unsigned char *)hdr); return (tmp___2); } else { } if ((conn->conn_ops)->MaxXmitDataSegmentLength < payload_length) { printk("\vNOPOUT Ping Data DataSegmentLength: %u is greater than MaxXmitDataSegmentLength: %u, protocol error.\n", payload_length, (conn->conn_ops)->MaxXmitDataSegmentLength); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { tmp___3 = iscsit_add_reject(conn, 4, (unsigned char *)hdr); return (tmp___3); } else { } tmp___4 = iscsit_reject_cmd(cmd, 4, (unsigned char *)hdr); return (tmp___4); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_setup_nop_out"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Got NOPOUT Ping %s ITT: 0x%08x, TTT: 0x%08x, CmdSN: 0x%08x, ExpStatSN: 0x%08x, Length: %u\n"; descriptor.lineno = 1563U; descriptor.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor, "Got NOPOUT Ping %s ITT: 0x%08x, TTT: 0x%08x, CmdSN: 0x%08x, ExpStatSN: 0x%08x, Length: %u\n", hdr->itt == 4294967295U ? (char *)"Response" : (char *)"Request", hdr->itt, hdr->ttt, hdr->cmdsn, hdr->exp_statsn, payload_length); } else { } if (hdr->ttt == 4294967295U) { cmd->iscsi_opcode = 0U; cmd->i_state = 17; cmd->immediate_cmd = ((int )hdr->opcode & 64) != 0; tmp___6 = hdr->itt; cmd->init_task_tag = tmp___6; (conn->sess)->init_task_tag = tmp___6; cmd->targ_xfer_tag = 4294967295U; tmp___7 = __fswab32(hdr->cmdsn); cmd->cmd_sn = tmp___7; tmp___8 = __fswab32(hdr->exp_statsn); cmd->exp_stat_sn = tmp___8; cmd->data_direction = 3; } else { } return (0); } } static char const __kstrtab_iscsit_setup_nop_out[21U] = { 'i', 's', 'c', 's', 'i', 't', '_', 's', 'e', 't', 'u', 'p', '_', 'n', 'o', 'p', '_', 'o', 'u', 't', '\000'}; struct kernel_symbol const __ksymtab_iscsit_setup_nop_out ; struct kernel_symbol const __ksymtab_iscsit_setup_nop_out = {(unsigned long )(& iscsit_setup_nop_out), (char const *)(& __kstrtab_iscsit_setup_nop_out)}; int iscsit_process_nop_out(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_nopout *hdr ) { struct iscsi_cmd *cmd_p ; int cmdsn_ret ; int tmp ; __u32 tmp___0 ; __u32 tmp___1 ; { cmd_p = (struct iscsi_cmd *)0; cmdsn_ret = 0; if (hdr->itt != 4294967295U) { if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { tmp = iscsit_add_reject(conn, 4, (unsigned char *)hdr); return (tmp); } else { } spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); tmp___0 = __fswab32(hdr->exp_statsn); iscsit_ack_from_expstatsn(conn, tmp___0); if (((int )hdr->opcode & 64) != 0) { iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } else { } cmdsn_ret = iscsit_sequence_cmd(conn, cmd, (unsigned char *)hdr, hdr->cmdsn); if (cmdsn_ret == 1) { return (0); } else { } if (cmdsn_ret == -1) { return (-1); } else { } return (0); } else { } if (hdr->ttt != 4294967295U) { tmp___1 = __fswab32(hdr->ttt); cmd_p = iscsit_find_cmd_from_ttt(conn, tmp___1); if ((unsigned long )cmd_p == (unsigned long )((struct iscsi_cmd *)0)) { return (-22); } else { } iscsit_stop_nopin_response_timer(conn); cmd_p->i_state = 41; iscsit_add_cmd_to_immediate_queue(cmd_p, conn, (int )((u8 )cmd_p->i_state)); iscsit_start_nopin_timer(conn); return (0); } else { } return (0); } } static char const __kstrtab_iscsit_process_nop_out[23U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 'n', 'o', 'p', '_', 'o', 'u', 't', '\000'}; struct kernel_symbol const __ksymtab_iscsit_process_nop_out ; struct kernel_symbol const __ksymtab_iscsit_process_nop_out = {(unsigned long )(& iscsit_process_nop_out), (char const *)(& __kstrtab_iscsit_process_nop_out)}; static int iscsit_handle_nop_out(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) { unsigned char *ping_data ; struct iscsi_nopout *hdr ; struct kvec *iov ; u32 payload_length ; int ret ; u32 checksum ; u32 data_crc ; u32 padding ; int niov ; int rx_got ; int rx_size ; void *tmp ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; int tmp___3 ; struct _ddebug descriptor___0 ; long tmp___4 ; struct _ddebug descriptor___1 ; long tmp___5 ; struct _ddebug descriptor___2 ; long tmp___6 ; struct _ddebug descriptor___3 ; long tmp___7 ; int tmp___8 ; { ping_data = (unsigned char *)0U; hdr = (struct iscsi_nopout *)buf; iov = (struct kvec *)0; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); ret = iscsit_setup_nop_out(conn, cmd, hdr); if (ret < 0) { return (0); } else { } if (payload_length != 0U && hdr->ttt == 4294967295U) { padding = 0U; niov = 0; rx_size = (int )payload_length; tmp = kzalloc((size_t )(payload_length + 1U), 208U); ping_data = (unsigned char *)tmp; if ((unsigned long )ping_data == (unsigned long )((unsigned char *)0U)) { printk("\vUnable to allocate memory for NOPOUT ping data.\n"); ret = -1; goto out; } else { } iov = (struct kvec *)(& cmd->iov_misc); (iov + (unsigned long )niov)->iov_base = (void *)ping_data; tmp___0 = niov; niov = niov + 1; (iov + (unsigned long )tmp___0)->iov_len = (size_t )payload_length; padding = - payload_length & 3U; if (padding != 0U) { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_nop_out"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Receiving %u additional bytes for padding.\n"; descriptor.lineno = 1679U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Receiving %u additional bytes for padding.\n", padding); } else { } (iov + (unsigned long )niov)->iov_base = (void *)(& cmd->pad_bytes); tmp___2 = niov; niov = niov + 1; (iov + (unsigned long )tmp___2)->iov_len = (size_t )padding; rx_size = (int )((u32 )rx_size + padding); } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { (iov + (unsigned long )niov)->iov_base = (void *)(& checksum); tmp___3 = niov; niov = niov + 1; (iov + (unsigned long )tmp___3)->iov_len = 4UL; rx_size = rx_size + 4; } else { } rx_got = rx_data(conn, (struct kvec *)(& cmd->iov_misc), niov, rx_size); if (rx_got != rx_size) { ret = -1; goto out; } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iscsit_do_crypto_hash_buf(& conn->conn_rx_hash, (void const *)ping_data, payload_length, padding, (u8 *)(& cmd->pad_bytes), (u8 *)(& data_crc)); if (checksum != data_crc) { printk("\vPing data CRC32C DataDigest 0x%08x does not match computed 0x%08x\n", checksum, data_crc); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel == 0U) { printk("\vUnable to recover from NOPOUT Ping DataCRC failure while in ERL=0.\n"); ret = -1; goto out; } else { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_handle_nop_out"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Dropping NOPOUT Command CmdSN: 0x%08x due to DataCRC error.\n"; descriptor___0.lineno = 1719U; descriptor___0.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___0, "Dropping NOPOUT Command CmdSN: 0x%08x due to DataCRC error.\n", hdr->cmdsn); } else { } ret = 0; goto out; } } else { descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_handle_nop_out"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "Got CRC32C DataDigest 0x%08x for %u bytes of ping data.\n"; descriptor___1.lineno = 1726U; descriptor___1.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___1, "Got CRC32C DataDigest 0x%08x for %u bytes of ping data.\n", checksum, payload_length); } else { } } } else { } *(ping_data + (unsigned long )payload_length) = 0U; cmd->buf_ptr = (void *)ping_data; cmd->buf_ptr_size = payload_length; descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsit_handle_nop_out"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___2.format = "Got %u bytes of NOPOUT ping data.\n"; descriptor___2.lineno = 1738U; descriptor___2.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___2, "Got %u bytes of NOPOUT ping data.\n", payload_length); } else { } descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsit_handle_nop_out"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___3.format = "Ping Data: \"%s\"\n"; descriptor___3.lineno = 1739U; descriptor___3.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___7 != 0L) { __dynamic_pr_debug(& descriptor___3, "Ping Data: \"%s\"\n", ping_data); } else { } } else { } tmp___8 = iscsit_process_nop_out(conn, cmd, hdr); return (tmp___8); out: ; if ((unsigned long )cmd != (unsigned long )((struct iscsi_cmd *)0)) { iscsit_free_cmd(cmd, 0); } else { } kfree((void const *)ping_data); return (ret); } } int iscsit_handle_task_mgt_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) { struct se_tmr_req *se_tmr ; struct iscsi_tmr_req *tmr_req ; struct iscsi_tm *hdr ; int out_of_order_cmdsn ; int ret ; bool sess_ref ; u8 function ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; __u32 tmp___1 ; void *tmp___2 ; int tmp___3 ; u8 tcm_function ; int ret___0 ; int tmp___4 ; int tmp___5 ; __u32 tmp___6 ; __u32 tmp___7 ; u64 tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int cmdsn_ret ; int tmp___13 ; __u32 tmp___14 ; int tmp___15 ; struct _ddebug descriptor___0 ; long tmp___16 ; { out_of_order_cmdsn = 0; sess_ref = 0; hdr = (struct iscsi_tm *)buf; hdr->flags = (unsigned int )hdr->flags & 127U; function = hdr->flags; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_task_mgt_cmd"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Got Task Management Request ITT: 0x%08x, CmdSN: 0x%08x, Function: 0x%02x, RefTaskTag: 0x%08x, RefCmdSN: 0x%08x, CID: %hu\n"; descriptor.lineno = 1769U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Got Task Management Request ITT: 0x%08x, CmdSN: 0x%08x, Function: 0x%02x, RefTaskTag: 0x%08x, RefCmdSN: 0x%08x, CID: %hu\n", hdr->itt, hdr->cmdsn, (int )function, hdr->rtt, hdr->refcmdsn, (int )conn->cid); } else { } if ((unsigned int )function != 1U && ((unsigned int )function != 8U && hdr->rtt != 4294967295U)) { printk("\vRefTaskTag should be set to 0xFFFFFFFF.\n"); hdr->rtt = 4294967295U; } else { } if ((unsigned int )function == 8U && ((int )hdr->opcode & 64) == 0) { printk("\vTask Management Request TASK_REASSIGN not issued as immediate command, bad iSCSI Initiatorimplementation\n"); tmp___0 = iscsit_add_reject_cmd(cmd, 4, buf); return (tmp___0); } else { } if ((unsigned int )function != 1U) { tmp___1 = __fswab32(hdr->refcmdsn); if (tmp___1 != 4294967295U) { hdr->refcmdsn = 4294967295U; } else { } } else { } cmd->data_direction = 3; tmp___2 = kzalloc(32UL, 208U); cmd->tmr_req = (struct iscsi_tmr_req *)tmp___2; if ((unsigned long )cmd->tmr_req == (unsigned long )((struct iscsi_tmr_req *)0)) { printk("\vUnable to allocate memory for Task Management command!\n"); tmp___3 = iscsit_add_reject_cmd(cmd, 10, buf); return (tmp___3); } else { } if ((unsigned int )function != 8U) { transport_init_se_cmd(& cmd->se_cmd, & iscsi_ops, (conn->sess)->se_sess, 0U, 3, 32, (unsigned char *)(& cmd->sense_buffer) + 2UL); target_get_sess_cmd(& cmd->se_cmd, 1); sess_ref = 1; switch ((int )function) { case 1: tcm_function = 1U; goto ldv_60941; case 2: tcm_function = 2U; goto ldv_60941; case 3: tcm_function = 3U; goto ldv_60941; case 4: tcm_function = 4U; goto ldv_60941; case 5: tcm_function = 5U; goto ldv_60941; case 6: tcm_function = 6U; goto ldv_60941; case 7: tcm_function = 7U; goto ldv_60941; default: printk("\vUnknown iSCSI TMR Function: 0x%02x\n", (int )function); tmp___4 = iscsit_add_reject_cmd(cmd, 10, buf); return (tmp___4); } ldv_60941: ret___0 = core_tmr_alloc_req(& cmd->se_cmd, (void *)cmd->tmr_req, (int )tcm_function, 208U); if (ret___0 < 0) { tmp___5 = iscsit_add_reject_cmd(cmd, 10, buf); return (tmp___5); } else { } (cmd->tmr_req)->se_tmr_req = cmd->se_cmd.se_tmr_req; } else { } cmd->iscsi_opcode = 2U; cmd->i_state = 34; cmd->immediate_cmd = ((int )hdr->opcode & 64) != 0; cmd->init_task_tag = hdr->itt; cmd->targ_xfer_tag = 4294967295U; tmp___6 = __fswab32(hdr->cmdsn); cmd->cmd_sn = tmp___6; tmp___7 = __fswab32(hdr->exp_statsn); cmd->exp_stat_sn = tmp___7; se_tmr = cmd->se_cmd.se_tmr_req; tmr_req = cmd->tmr_req; if ((unsigned int )function != 8U) { tmp___8 = scsilun_to_int(& hdr->lun); ret = transport_lookup_tmr_lun(& cmd->se_cmd, tmp___8); if (ret < 0) { se_tmr->response = 2U; goto attach; } else { } } else { } switch ((int )function) { case 1: se_tmr->response = iscsit_tmr_abort_task(cmd, buf); if ((unsigned int )se_tmr->response != 0U) { goto attach; } else { } goto ldv_60951; case 2: ; case 3: ; case 4: ; case 5: ; goto ldv_60951; case 6: tmp___9 = iscsit_tmr_task_warm_reset(conn, tmr_req, buf); if (tmp___9 < 0) { se_tmr->response = 6U; goto attach; } else { } goto ldv_60951; case 7: tmp___10 = iscsit_tmr_task_cold_reset(conn, tmr_req, buf); if (tmp___10 < 0) { se_tmr->response = 6U; goto attach; } else { } goto ldv_60951; case 8: se_tmr->response = iscsit_tmr_task_reassign(cmd, buf); if ((unsigned int )se_tmr->response != 0U) { goto ldv_60951; } else { } tmp___12 = iscsit_check_task_reassign_expdatasn(tmr_req, conn); if (tmp___12 < 0) { tmp___11 = iscsit_add_reject_cmd(cmd, 9, buf); return (tmp___11); } else { } goto ldv_60951; default: printk("\vUnknown TMR function: 0x%02x, protocol error.\n", (int )function); se_tmr->response = 5U; goto attach; } ldv_60951: ; if ((unsigned int )function != 8U && (unsigned int )se_tmr->response == 0U) { se_tmr->call_transport = 1; } else { } attach: spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); if (((int )hdr->opcode & 64) == 0) { tmp___13 = iscsit_sequence_cmd(conn, cmd, buf, hdr->cmdsn); cmdsn_ret = tmp___13; if (cmdsn_ret == 2) { out_of_order_cmdsn = 1; } else if (cmdsn_ret == 1) { return (0); } else if (cmdsn_ret == -1) { return (-1); } else { } } else { } tmp___14 = __fswab32(hdr->exp_statsn); iscsit_ack_from_expstatsn(conn, tmp___14); if (out_of_order_cmdsn != 0 || ((int )hdr->opcode & 64) == 0) { return (0); } else { } if (se_tmr->call_transport != 0) { tmp___15 = transport_generic_handle_tmr(& cmd->se_cmd); return (tmp___15); } else { } if ((int )sess_ref) { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_handle_task_mgt_cmd"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Handle TMR, using sess_ref=true check\n"; descriptor___0.lineno = 1955U; descriptor___0.flags = 0U; tmp___16 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___16 != 0L) { __dynamic_pr_debug(& descriptor___0, "Handle TMR, using sess_ref=true check\n"); } else { } target_put_sess_cmd(& cmd->se_cmd); } else { } iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } } static char const __kstrtab_iscsit_handle_task_mgt_cmd[27U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'h', 'a', 'n', 'd', 'l', 'e', '_', 't', 'a', 's', 'k', '_', 'm', 'g', 't', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_handle_task_mgt_cmd ; struct kernel_symbol const __ksymtab_iscsit_handle_task_mgt_cmd = {(unsigned long )(& iscsit_handle_task_mgt_cmd), (char const *)(& __kstrtab_iscsit_handle_task_mgt_cmd)}; int iscsit_setup_text_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_text *hdr ) { u32 payload_length ; int tmp ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; itt_t tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; { payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); if ((conn->conn_ops)->MaxXmitDataSegmentLength < payload_length) { printk("\vUnable to accept text parameter length: %ugreater than MaxXmitDataSegmentLength %u.\n", payload_length, (conn->conn_ops)->MaxXmitDataSegmentLength); tmp = iscsit_reject_cmd(cmd, 4, (unsigned char *)hdr); return (tmp); } else { } if ((int )((signed char )hdr->flags) >= 0 || ((int )hdr->flags & 64) != 0) { printk("\vMulti sequence text commands currently not supported\n"); tmp___0 = iscsit_reject_cmd(cmd, 5, (unsigned char *)hdr); return (tmp___0); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_setup_text_cmd"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Got Text Request: ITT: 0x%08x, CmdSN: 0x%08x, ExpStatSN: 0x%08x, Length: %u\n"; descriptor.lineno = 1988U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Got Text Request: ITT: 0x%08x, CmdSN: 0x%08x, ExpStatSN: 0x%08x, Length: %u\n", hdr->itt, hdr->cmdsn, hdr->exp_statsn, payload_length); } else { } cmd->iscsi_opcode = 4U; cmd->i_state = 36; cmd->immediate_cmd = ((int )hdr->opcode & 64) != 0; tmp___2 = hdr->itt; cmd->init_task_tag = tmp___2; (conn->sess)->init_task_tag = tmp___2; cmd->targ_xfer_tag = 4294967295U; tmp___3 = __fswab32(hdr->cmdsn); cmd->cmd_sn = tmp___3; tmp___4 = __fswab32(hdr->exp_statsn); cmd->exp_stat_sn = tmp___4; cmd->data_direction = 3; cmd->text_in_ptr = (void *)0; return (0); } } static char const __kstrtab_iscsit_setup_text_cmd[22U] = { 'i', 's', 'c', 's', 'i', 't', '_', 's', 'e', 't', 'u', 'p', '_', 't', 'e', 'x', 't', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_setup_text_cmd ; struct kernel_symbol const __ksymtab_iscsit_setup_text_cmd = {(unsigned long )(& iscsit_setup_text_cmd), (char const *)(& __kstrtab_iscsit_setup_text_cmd)}; int iscsit_process_text_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , struct iscsi_text *hdr ) { unsigned char *text_in ; unsigned char *text_ptr ; int cmdsn_ret ; __u32 tmp ; int tmp___0 ; char *tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; __u32 tmp___5 ; int tmp___6 ; int tmp___7 ; { text_in = (unsigned char *)cmd->text_in_ptr; if ((unsigned long )text_in == (unsigned long )((unsigned char *)0U)) { tmp = __fswab32(hdr->ttt); cmd->targ_xfer_tag = tmp; if (cmd->targ_xfer_tag == 4294967295U) { printk("\vUnable to locate text_in buffer for sendtargets discovery\n"); goto reject; } else { } goto empty_sendtargets; } else { } tmp___0 = strncmp("SendTargets", (char const *)text_in, 11UL); if (tmp___0 != 0) { printk("\vReceived Text Data that is not SendTargets, cannot continue.\n"); goto reject; } else { } tmp___1 = strchr((char const *)text_in, 61); text_ptr = (unsigned char *)tmp___1; if ((unsigned long )text_ptr == (unsigned long )((unsigned char *)0U)) { printk("\vNo \"=\" separator found in Text Data, cannot continue.\n"); goto reject; } else { } tmp___4 = strncmp("=All", (char const *)text_ptr, 4UL); if (tmp___4 == 0) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 256U); } else { tmp___2 = strncmp("=iqn.", (char const *)text_ptr, 5UL); if (tmp___2 == 0) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 512U); } else { tmp___3 = strncmp("=eui.", (char const *)text_ptr, 5UL); if (tmp___3 == 0) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 512U); } else { printk("\vUnable to locate valid SendTargets=%s value\n", text_ptr); goto reject; } } } spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); empty_sendtargets: tmp___5 = __fswab32(hdr->exp_statsn); iscsit_ack_from_expstatsn(conn, tmp___5); if (((int )hdr->opcode & 64) == 0) { cmdsn_ret = iscsit_sequence_cmd(conn, cmd, (unsigned char *)hdr, hdr->cmdsn); if (cmdsn_ret == -1) { return (-1); } else { } return (0); } else { } tmp___6 = iscsit_execute_cmd(cmd, 0); return (tmp___6); reject: tmp___7 = iscsit_reject_cmd(cmd, 4, (unsigned char *)hdr); return (tmp___7); } } static char const __kstrtab_iscsit_process_text_cmd[24U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'p', 'r', 'o', 'c', 'e', 's', 's', '_', 't', 'e', 'x', 't', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_process_text_cmd ; struct kernel_symbol const __ksymtab_iscsit_process_text_cmd = {(unsigned long )(& iscsit_process_text_cmd), (char const *)(& __kstrtab_iscsit_process_text_cmd)}; static int iscsit_handle_text_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) { struct iscsi_text *hdr ; char *text_in ; u32 payload_length ; int rx_size ; int rc ; u32 checksum ; u32 data_crc ; u32 padding ; u32 pad_bytes ; int niov ; int rx_got ; struct kvec iov[3U] ; void *tmp ; int tmp___0 ; int tmp___1 ; struct _ddebug descriptor ; long tmp___2 ; int tmp___3 ; struct _ddebug descriptor___0 ; long tmp___4 ; struct _ddebug descriptor___1 ; long tmp___5 ; struct _ddebug descriptor___2 ; long tmp___6 ; int tmp___7 ; int tmp___8 ; { hdr = (struct iscsi_text *)buf; text_in = (char *)0; payload_length = (u32 )((((int )hdr->dlength[0] << 16) | ((int )hdr->dlength[1] << 8)) | (int )hdr->dlength[2]); rc = iscsit_setup_text_cmd(conn, cmd, hdr); if (rc < 0) { return (0); } else { } rx_size = (int )payload_length; if (payload_length != 0U) { checksum = 0U; data_crc = 0U; padding = 0U; pad_bytes = 0U; niov = 0; tmp = kzalloc((size_t )payload_length, 208U); text_in = (char *)tmp; if ((unsigned long )text_in == (unsigned long )((char *)0)) { printk("\vUnable to allocate memory for incoming text parameters\n"); goto reject; } else { } cmd->text_in_ptr = (void *)text_in; memset((void *)(& iov), 0, 48UL); iov[niov].iov_base = (void *)text_in; tmp___0 = niov; niov = niov + 1; iov[tmp___0].iov_len = (size_t )payload_length; padding = - payload_length & 3U; if (padding != 0U) { iov[niov].iov_base = (void *)(& pad_bytes); tmp___1 = niov; niov = niov + 1; iov[tmp___1].iov_len = (size_t )padding; rx_size = (int )((u32 )rx_size + padding); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_text_cmd"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Receiving %u additional bytes for padding.\n"; descriptor.lineno = 2103U; descriptor.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor, "Receiving %u additional bytes for padding.\n", padding); } else { } } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iov[niov].iov_base = (void *)(& checksum); tmp___3 = niov; niov = niov + 1; iov[tmp___3].iov_len = 4UL; rx_size = rx_size + 4; } else { } rx_got = rx_data(conn, (struct kvec *)(& iov), niov, rx_size); if (rx_got != rx_size) { goto reject; } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iscsit_do_crypto_hash_buf(& conn->conn_rx_hash, (void const *)text_in, payload_length, padding, (u8 *)(& pad_bytes), (u8 *)(& data_crc)); if (checksum != data_crc) { printk("\vText data CRC32C DataDigest 0x%08x does not match computed 0x%08x\n", checksum, data_crc); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel == 0U) { printk("\vUnable to recover from Text Data digest failure while in ERL=0.\n"); goto reject; } else { descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_handle_text_cmd"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Dropping Text Command CmdSN: 0x%08x due to DataCRC error.\n"; descriptor___0.lineno = 2137U; descriptor___0.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___0, "Dropping Text Command CmdSN: 0x%08x due to DataCRC error.\n", hdr->cmdsn); } else { } kfree((void const *)text_in); return (0); } } else { descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_handle_text_cmd"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "Got CRC32C DataDigest 0x%08x for %u bytes of text data.\n"; descriptor___1.lineno = 2144U; descriptor___1.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___1, "Got CRC32C DataDigest 0x%08x for %u bytes of text data.\n", checksum, payload_length); } else { } } } else { } *(text_in + (unsigned long )(payload_length - 1U)) = 0; descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsit_handle_text_cmd"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___2.format = "Successfully read %d bytes of text data.\n"; descriptor___2.lineno = 2149U; descriptor___2.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___2, "Successfully read %d bytes of text data.\n", payload_length); } else { } } else { } tmp___7 = iscsit_process_text_cmd(conn, cmd, hdr); return (tmp___7); reject: kfree((void const *)cmd->text_in_ptr); cmd->text_in_ptr = (void *)0; tmp___8 = iscsit_reject_cmd(cmd, 4, buf); return (tmp___8); } } int iscsit_logout_closesession(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_conn *conn_p ; struct iscsi_session *sess ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr ; struct _ddebug descriptor___0 ; long tmp___0 ; struct list_head const *__mptr___0 ; { sess = conn->sess; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_logout_closesession"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Received logout request CLOSESESSION on CID: %hu for SID: %u.\n"; descriptor.lineno = 2166U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Received logout request CLOSESESSION on CID: %hu for SID: %u.\n", (int )conn->cid, (conn->sess)->sid); } else { } atomic_set(& sess->session_logout, 1); atomic_set(& conn->conn_logout_remove, 1); conn->conn_logout_reason = 0U; iscsit_inc_conn_usage_count(conn); iscsit_inc_session_usage_count(sess); spin_lock_bh(& sess->conn_lock); __mptr = (struct list_head const *)sess->sess_conn_list.next; conn_p = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_61045; ldv_61044: ; if ((unsigned int )conn_p->conn_state != 5U) { goto ldv_61042; } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_logout_closesession"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Moving to TARG_CONN_STATE_IN_LOGOUT.\n"; descriptor___0.lineno = 2180U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Moving to TARG_CONN_STATE_IN_LOGOUT.\n"); } else { } conn_p->conn_state = 6U; ldv_61042: __mptr___0 = (struct list_head const *)conn_p->conn_list.next; conn_p = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_61045: ; if ((unsigned long )(& conn_p->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_61044; } else { } spin_unlock_bh(& sess->conn_lock); iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } } int iscsit_logout_closeconnection(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_conn *l_conn ; struct iscsi_session *sess ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { sess = conn->sess; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_logout_closeconnection"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Received logout request CLOSECONNECTION for CID: %hu on CID: %hu.\n"; descriptor.lineno = 2196U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Received logout request CLOSECONNECTION for CID: %hu on CID: %hu.\n", (int )cmd->logout_cid, (int )conn->cid); } else { } if ((int )conn->cid == (int )cmd->logout_cid) { spin_lock_bh(& conn->state_lock); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_logout_closeconnection"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Moving to TARG_CONN_STATE_IN_LOGOUT.\n"; descriptor___0.lineno = 2204U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Moving to TARG_CONN_STATE_IN_LOGOUT.\n"); } else { } conn->conn_state = 6U; atomic_set(& conn->conn_logout_remove, 1); conn->conn_logout_reason = 1U; iscsit_inc_conn_usage_count(conn); spin_unlock_bh(& conn->state_lock); } else { l_conn = iscsit_get_conn_from_cid(sess, (int )cmd->logout_cid); if ((unsigned long )l_conn == (unsigned long )((struct iscsi_conn *)0)) { cmd->logout_response = 1U; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } else { } iscsit_dec_conn_usage_count(l_conn); } iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } } int iscsit_logout_removeconnforrecovery(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_session *sess ; struct _ddebug descriptor ; long tmp ; { sess = conn->sess; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_logout_removeconnforrecovery"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Received explicit REMOVECONNFORRECOVERY logout for CID: %hu on CID: %hu.\n"; descriptor.lineno = 2243U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Received explicit REMOVECONNFORRECOVERY logout for CID: %hu on CID: %hu.\n", (int )cmd->logout_cid, (int )conn->cid); } else { } if ((unsigned int )(sess->sess_ops)->ErrorRecoveryLevel != 2U) { printk("\vReceived Logout Request REMOVECONNFORRECOVERY while ERL!=2.\n"); cmd->logout_response = 2U; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } else { } if ((int )conn->cid == (int )cmd->logout_cid) { printk("\vReceived Logout Request REMOVECONNFORRECOVERY with CID: %hu on CID: %hu, implementation error.\n", (int )cmd->logout_cid, (int )conn->cid); cmd->logout_response = 3U; iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } else { } iscsit_add_cmd_to_response_queue(cmd, conn, (int )((u8 )cmd->i_state)); return (0); } } int iscsit_handle_logout_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , unsigned char *buf ) { int cmdsn_ret ; int logout_remove ; u8 reason_code ; struct iscsi_logout *hdr ; struct iscsi_tiqn *tiqn ; struct iscsi_tiqn *tmp ; struct _ddebug descriptor ; long tmp___0 ; itt_t tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u16 tmp___4 ; __u16 tmp___5 ; __u32 tmp___6 ; int ret ; int tmp___7 ; { logout_remove = 0; reason_code = 0U; tmp = iscsit_snmp_get_tiqn(conn); tiqn = tmp; hdr = (struct iscsi_logout *)buf; reason_code = (unsigned int )hdr->flags & 127U; if ((unsigned long )tiqn != (unsigned long )((struct iscsi_tiqn *)0)) { spin_lock(& tiqn->logout_stats.lock); if ((unsigned int )reason_code == 0U) { tiqn->logout_stats.normal_logouts = tiqn->logout_stats.normal_logouts + 1U; } else { tiqn->logout_stats.abnormal_logouts = tiqn->logout_stats.abnormal_logouts + 1U; } spin_unlock(& tiqn->logout_stats.lock); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_logout_cmd"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Got Logout Request ITT: 0x%08x CmdSN: 0x%08x ExpStatSN: 0x%08x Reason: 0x%02x CID: %hu on CID: %hu\n"; descriptor.lineno = 2291U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Got Logout Request ITT: 0x%08x CmdSN: 0x%08x ExpStatSN: 0x%08x Reason: 0x%02x CID: %hu on CID: %hu\n", hdr->itt, hdr->cmdsn, hdr->exp_statsn, (int )reason_code, (int )hdr->cid, (int )conn->cid); } else { } if ((unsigned int )conn->conn_state != 5U) { printk("\vReceived logout request on connection that is not in logged in state, ignoring request.\n"); iscsit_free_cmd(cmd, 0); return (0); } else { } cmd->iscsi_opcode = 6U; cmd->i_state = 15; cmd->immediate_cmd = ((int )hdr->opcode & 64) != 0; tmp___1 = hdr->itt; cmd->init_task_tag = tmp___1; (conn->sess)->init_task_tag = tmp___1; cmd->targ_xfer_tag = 4294967295U; tmp___2 = __fswab32(hdr->cmdsn); cmd->cmd_sn = tmp___2; tmp___3 = __fswab32(hdr->exp_statsn); cmd->exp_stat_sn = tmp___3; tmp___4 = __fswab16((int )hdr->cid); cmd->logout_cid = tmp___4; cmd->logout_reason = reason_code; cmd->data_direction = 3; if ((unsigned int )reason_code == 0U) { logout_remove = 1; } else if ((unsigned int )reason_code == 1U) { tmp___5 = __fswab16((int )hdr->cid); if ((int )tmp___5 == (int )conn->cid) { logout_remove = 1; } else { } } else { } spin_lock_bh(& conn->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn->conn_cmd_list); spin_unlock_bh(& conn->cmd_lock); if ((unsigned int )reason_code != 2U) { tmp___6 = __fswab32(hdr->exp_statsn); iscsit_ack_from_expstatsn(conn, tmp___6); } else { } if ((unsigned int )cmd->immediate_cmd != 0U) { tmp___7 = iscsit_execute_cmd(cmd, 0); ret = tmp___7; if (ret < 0) { return (ret); } else { } } else { cmdsn_ret = iscsit_sequence_cmd(conn, cmd, buf, hdr->cmdsn); if (cmdsn_ret == 1) { logout_remove = 0; } else if (cmdsn_ret == -1) { return (-1); } else { } } return (logout_remove); } } static char const __kstrtab_iscsit_handle_logout_cmd[25U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'h', 'a', 'n', 'd', 'l', 'e', '_', 'l', 'o', 'g', 'o', 'u', 't', '_', 'c', 'm', 'd', '\000'}; struct kernel_symbol const __ksymtab_iscsit_handle_logout_cmd ; struct kernel_symbol const __ksymtab_iscsit_handle_logout_cmd = {(unsigned long )(& iscsit_handle_logout_cmd), (char const *)(& __kstrtab_iscsit_handle_logout_cmd)}; static int iscsit_handle_snack(struct iscsi_conn *conn , unsigned char *buf ) { struct iscsi_snack *hdr ; struct _ddebug descriptor ; long tmp ; int tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; int tmp___4 ; __u32 tmp___5 ; __u32 tmp___6 ; __u32 tmp___7 ; int tmp___8 ; __u32 tmp___9 ; __u32 tmp___10 ; __u32 tmp___11 ; int tmp___12 ; int tmp___13 ; int tmp___14 ; { hdr = (struct iscsi_snack *)buf; hdr->flags = (unsigned int )hdr->flags & 127U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_snack"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Got ISCSI_INIT_SNACK, ITT: 0x%08x, ExpStatSN: 0x%08x, Type: 0x%02x, BegRun: 0x%08x, RunLength: 0x%08x, CID: %hu\n"; descriptor.lineno = 2360U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Got ISCSI_INIT_SNACK, ITT: 0x%08x, ExpStatSN: 0x%08x, Type: 0x%02x, BegRun: 0x%08x, RunLength: 0x%08x, CID: %hu\n", hdr->itt, hdr->exp_statsn, (int )hdr->flags, hdr->begrun, hdr->runlength, (int )conn->cid); } else { } if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel == 0U) { printk("\vInitiator sent SNACK request while in ErrorRecoveryLevel=0.\n"); tmp___0 = iscsit_add_reject(conn, 4, buf); return (tmp___0); } else { } switch ((int )hdr->flags & 15) { case 0: tmp___1 = __fswab32(hdr->runlength); tmp___2 = __fswab32(hdr->begrun); tmp___3 = __fswab32(hdr->ttt); tmp___4 = iscsit_handle_recovery_datain_or_r2t(conn, buf, hdr->itt, tmp___3, tmp___2, tmp___1); return (tmp___4); case 1: tmp___5 = __fswab32(hdr->runlength); tmp___6 = __fswab32(hdr->begrun); tmp___7 = __fswab32(hdr->ttt); tmp___8 = iscsit_handle_status_snack(conn, hdr->itt, tmp___7, tmp___6, tmp___5); return (tmp___8); case 2: tmp___9 = __fswab32(hdr->runlength); tmp___10 = __fswab32(hdr->begrun); tmp___11 = __fswab32(hdr->ttt); tmp___12 = iscsit_handle_data_ack(conn, tmp___11, tmp___10, tmp___9); return (tmp___12); case 3: printk("\vR-Data SNACK Not Supported.\n"); tmp___13 = iscsit_add_reject(conn, 4, buf); return (tmp___13); default: printk("\vUnknown SNACK type 0x%02x, protocol error.\n", (int )hdr->flags & 15); tmp___14 = iscsit_add_reject(conn, 4, buf); return (tmp___14); } return (0); } } static void iscsit_rx_thread_wait_for_tcp(struct iscsi_conn *conn ) { { if (((int )((conn->sock)->sk)->sk_shutdown & 2) != 0 || (int )((conn->sock)->sk)->sk_shutdown & 1) { wait_for_completion_interruptible_timeout(& conn->rx_half_close_comp, 500UL); } else { } return; } } static int iscsit_handle_immediate_data(struct iscsi_cmd *cmd , struct iscsi_scsi_req *hdr , u32 length ) { int iov_ret ; int rx_got ; int rx_size ; u32 checksum ; u32 iov_count ; u32 padding ; struct iscsi_conn *conn ; struct kvec *iov ; u32 tmp ; u32 tmp___0 ; u32 data_crc ; struct _ddebug descriptor ; long tmp___1 ; { rx_got = 0; rx_size = 0; iov_count = 0U; padding = 0U; conn = cmd->conn; iov_ret = iscsit_map_iovec(cmd, cmd->iov_data, cmd->write_data_done, length); if (iov_ret < 0) { return (-1); } else { } rx_size = (int )length; iov_count = (u32 )iov_ret; iov = cmd->iov_data; padding = - length & 3U; if (padding != 0U) { (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->pad_bytes); tmp = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp)->iov_len = (size_t )padding; rx_size = (int )((u32 )rx_size + padding); } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { (iov + (unsigned long )iov_count)->iov_base = (void *)(& checksum); tmp___0 = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp___0)->iov_len = 4UL; rx_size = rx_size + 4; } else { } rx_got = rx_data(conn, cmd->iov_data, (int )iov_count, rx_size); iscsit_unmap_iovec(cmd); if (rx_got != rx_size) { iscsit_rx_thread_wait_for_tcp(conn); return (-1); } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { data_crc = iscsit_do_crypto_hash_sg(& conn->conn_rx_hash, cmd, cmd->write_data_done, length, padding, (u8 *)(& cmd->pad_bytes)); if (checksum != data_crc) { printk("\vImmediateData CRC32C DataDigest 0x%08x does not match computed 0x%08x\n", checksum, data_crc); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel == 0U) { printk("\vUnable to recover from Immediate Data digest failure while in ERL=0.\n"); iscsit_reject_cmd(cmd, 2, (unsigned char *)hdr); return (-1); } else { iscsit_reject_cmd(cmd, 2, (unsigned char *)hdr); return (1); } } else { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_handle_immediate_data"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Got CRC32C DataDigest 0x%08x for %u bytes of Immediate Data\n"; descriptor.lineno = 2481U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Got CRC32C DataDigest 0x%08x for %u bytes of Immediate Data\n", checksum, length); } else { } } } else { } cmd->write_data_done = cmd->write_data_done + length; if (cmd->write_data_done == cmd->se_cmd.data_length) { spin_lock_bh(& cmd->istate_lock); cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 1U); cmd->i_state = 6; spin_unlock_bh(& cmd->istate_lock); } else { } return (0); } } static void iscsit_build_conn_drop_async_message(struct iscsi_conn *conn ) { struct iscsi_cmd *cmd ; struct iscsi_conn *conn_p ; bool found ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { found = 0; __mptr = (struct list_head const *)(conn->sess)->sess_conn_list.next; conn_p = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_61128; ldv_61127: ; if ((unsigned int )conn_p->conn_state == 5U) { iscsit_inc_conn_usage_count(conn_p); found = 1; goto ldv_61126; } else { } __mptr___0 = (struct list_head const *)conn_p->conn_list.next; conn_p = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_61128: ; if ((unsigned long )(& conn_p->conn_list) != (unsigned long )(& (conn->sess)->sess_conn_list)) { goto ldv_61127; } else { } ldv_61126: ; if (! found) { return; } else { } cmd = iscsit_allocate_cmd(conn_p, 0); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { iscsit_dec_conn_usage_count(conn_p); return; } else { } cmd->logout_cid = conn->cid; cmd->iscsi_opcode = 50U; cmd->i_state = 10; spin_lock_bh(& conn_p->cmd_lock); list_add_tail(& cmd->i_conn_node, & conn_p->conn_cmd_list); spin_unlock_bh(& conn_p->cmd_lock); iscsit_add_cmd_to_response_queue(cmd, conn_p, (int )((u8 )cmd->i_state)); iscsit_dec_conn_usage_count(conn_p); return; } } static int iscsit_send_conn_drop_async_message(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_async *hdr ; u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u16 tmp___3 ; __u16 tmp___4 ; __u16 tmp___5 ; u32 *header_digest ; struct _ddebug descriptor ; long tmp___6 ; struct _ddebug descriptor___0 ; long tmp___7 ; { cmd->tx_size = 48U; cmd->iscsi_opcode = 50U; hdr = (struct iscsi_async *)(& cmd->pdu); hdr->opcode = 50U; hdr->flags = 128U; cmd->init_task_tag = 4294967295U; cmd->targ_xfer_tag = 4294967295U; put_unaligned_be64(0xffffffffffffffffULL, (void *)(& hdr->rsvd4)); tmp = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; cmd->stat_sn = tmp; tmp___0 = __fswab32(cmd->stat_sn); hdr->statsn = tmp___0; tmp___1 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___1; tmp___2 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___2; hdr->async_event = 2U; tmp___3 = __fswab16((int )cmd->logout_cid); hdr->param1 = tmp___3; tmp___4 = __fswab16((int )((conn->sess)->sess_ops)->DefaultTime2Wait); hdr->param2 = tmp___4; tmp___5 = __fswab16((int )((conn->sess)->sess_ops)->DefaultTime2Retain); hdr->param3 = tmp___5; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)hdr, 48U, 0U, (u8 *)0U, (u8 *)header_digest); cmd->tx_size = cmd->tx_size + 4U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_conn_drop_async_message"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32C HeaderDigest to Async Message 0x%08x\n"; descriptor.lineno = 2573U; descriptor.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32C HeaderDigest to Async Message 0x%08x\n", *header_digest); } else { } } else { } cmd->iov_misc[0].iov_base = (void *)(& cmd->pdu); cmd->iov_misc[0].iov_len = (size_t )cmd->tx_size; cmd->iov_misc_count = 1U; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_send_conn_drop_async_message"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Sending Connection Dropped Async Message StatSN: 0x%08x, for CID: %hu on CID: %hu\n"; descriptor___0.lineno = 2582U; descriptor___0.flags = 0U; tmp___7 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___7 != 0L) { __dynamic_pr_debug(& descriptor___0, "Sending Connection Dropped Async Message StatSN: 0x%08x, for CID: %hu on CID: %hu\n", cmd->stat_sn, (int )cmd->logout_cid, (int )conn->cid); } else { } return (0); } } static void iscsit_tx_thread_wait_for_tcp(struct iscsi_conn *conn ) { { if (((int )((conn->sock)->sk)->sk_shutdown & 2) != 0 || (int )((conn->sock)->sk)->sk_shutdown & 1) { wait_for_completion_interruptible_timeout(& conn->tx_half_close_comp, 500UL); } else { } return; } } static void iscsit_build_datain_pdu(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_datain *datain , struct iscsi_data_rsp *hdr , bool set_statsn ) { __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; __u32 tmp___6 ; struct _ddebug descriptor ; __u32 tmp___7 ; __u32 tmp___8 ; __u32 tmp___9 ; long tmp___10 ; { hdr->opcode = 37U; hdr->flags = datain->flags; if ((int )hdr->flags & 1) { if ((cmd->se_cmd.se_cmd_flags & 4096U) != 0U) { hdr->flags = (uint8_t )((unsigned int )hdr->flags | 4U); tmp = __fswab32(cmd->se_cmd.residual_count); hdr->residual_count = tmp; } else if ((cmd->se_cmd.se_cmd_flags & 8192U) != 0U) { hdr->flags = (uint8_t )((unsigned int )hdr->flags | 2U); tmp___0 = __fswab32(cmd->se_cmd.residual_count); hdr->residual_count = tmp___0; } else { } } else { } hdr->dlength[0] = (uint8_t )(datain->length >> 16); hdr->dlength[1] = (uint8_t )(datain->length >> 8); hdr->dlength[2] = (uint8_t )datain->length; if (((int )hdr->flags & 64) != 0) { int_to_scsilun(cmd->se_cmd.orig_fe_lun, & hdr->lun); } else { put_unaligned_le64(0xffffffffffffffffULL, (void *)(& hdr->lun)); } hdr->itt = cmd->init_task_tag; if (((int )hdr->flags & 64) != 0) { tmp___1 = __fswab32(cmd->targ_xfer_tag); hdr->ttt = tmp___1; } else { hdr->ttt = 4294967295U; } if ((int )set_statsn) { tmp___2 = __fswab32(cmd->stat_sn); hdr->statsn = tmp___2; } else { hdr->statsn = 4294967295U; } tmp___3 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___3; tmp___4 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___4; tmp___5 = __fswab32(datain->data_sn); hdr->datasn = tmp___5; tmp___6 = __fswab32(datain->offset); hdr->offset = tmp___6; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_build_datain_pdu"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Built DataIN ITT: 0x%08x, StatSN: 0x%08x, DataSN: 0x%08x, Offset: %u, Length: %u, CID: %hu\n"; descriptor.lineno = 2638U; descriptor.flags = 0U; tmp___10 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___10 != 0L) { tmp___7 = __fswab32(hdr->offset); tmp___8 = __fswab32(hdr->datasn); tmp___9 = __fswab32(hdr->statsn); __dynamic_pr_debug(& descriptor, "Built DataIN ITT: 0x%08x, StatSN: 0x%08x, DataSN: 0x%08x, Offset: %u, Length: %u, CID: %hu\n", cmd->init_task_tag, tmp___9, tmp___8, tmp___7, datain->length, (int )conn->cid); } else { } return; } } static int iscsit_send_datain(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_data_rsp *hdr ; struct iscsi_datain datain ; struct iscsi_datain_req *dr ; struct kvec *iov ; u32 iov_count ; u32 tx_size ; int eodr ; int ret ; int iov_ret ; bool set_statsn ; u32 tmp ; u32 tmp___0 ; u32 *header_digest ; struct _ddebug descriptor ; long tmp___1 ; u32 tmp___2 ; struct _ddebug descriptor___0 ; long tmp___3 ; u32 tmp___4 ; struct _ddebug descriptor___1 ; long tmp___5 ; { hdr = (struct iscsi_data_rsp *)(& cmd->pdu); iov_count = 0U; tx_size = 0U; eodr = 0; set_statsn = 0; memset((void *)(& datain), 0, 64UL); dr = iscsit_get_datain_values(cmd, & datain); if ((unsigned long )dr == (unsigned long )((struct iscsi_datain_req *)0)) { printk("\viscsit_get_datain_values failed for ITT: 0x%08x\n", cmd->init_task_tag); return (-1); } else { } if (datain.offset + datain.length > cmd->se_cmd.data_length) { printk("\vCommand ITT: 0x%08x, datain.offset: %u and datain.length: %u exceeds cmd->data_length: %u\n", cmd->init_task_tag, datain.offset, datain.length, cmd->se_cmd.data_length); return (-1); } else { } atomic_long_add((long )datain.length, & (conn->sess)->tx_data_octets); if ((int )datain.flags & 1 && (cmd->se_cmd.se_cmd_flags & 2U) != 0U) { datain.flags = (unsigned int )datain.flags & 254U; } else if ((unsigned int )dr->dr_complete == 1U || (unsigned int )dr->dr_complete == 3U) { iscsit_increment_maxcmdsn(cmd, conn->sess); tmp = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; cmd->stat_sn = tmp; set_statsn = 1; } else if ((unsigned int )dr->dr_complete == 2U) { set_statsn = 1; } else { } iscsit_build_datain_pdu(cmd, conn, & datain, hdr, (int )set_statsn); iov = cmd->iov_data; (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->pdu); tmp___0 = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp___0)->iov_len = 48UL; tx_size = tx_size + 48U; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)(& cmd->pdu), 48U, 0U, (u8 *)0U, (u8 *)header_digest); iov->iov_len = iov->iov_len + 4UL; tx_size = tx_size + 4U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_datain"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32 HeaderDigest for DataIN PDU 0x%08x\n"; descriptor.lineno = 2705U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32 HeaderDigest for DataIN PDU 0x%08x\n", *header_digest); } else { } } else { } iov_ret = iscsit_map_iovec(cmd, cmd->iov_data + 1UL, datain.offset, datain.length); if (iov_ret < 0) { return (-1); } else { } iov_count = iov_count + (u32 )iov_ret; tx_size = datain.length + tx_size; cmd->padding = - datain.length & 3U; if (cmd->padding != 0U) { (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->pad_bytes); tmp___2 = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp___2)->iov_len = (size_t )cmd->padding; tx_size = cmd->padding + tx_size; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_send_datain"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Attaching %u padding bytes\n"; descriptor___0.lineno = 2723U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___0, "Attaching %u padding bytes\n", cmd->padding); } else { } } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { cmd->data_crc = iscsit_do_crypto_hash_sg(& conn->conn_tx_hash, cmd, datain.offset, datain.length, cmd->padding, (u8 *)(& cmd->pad_bytes)); (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->data_crc); tmp___4 = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp___4)->iov_len = 4UL; tx_size = tx_size + 4U; descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_send_datain"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "Attached CRC32C DataDigest %d bytes, crc 0x%08x\n"; descriptor___1.lineno = 2734U; descriptor___1.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___1, "Attached CRC32C DataDigest %d bytes, crc 0x%08x\n", datain.length + cmd->padding, cmd->data_crc); } else { } } else { } cmd->iov_data_count = iov_count; cmd->tx_size = tx_size; ret = iscsit_fe_sendpage_sg(cmd, conn); iscsit_unmap_iovec(cmd); if (ret < 0) { iscsit_tx_thread_wait_for_tcp(conn); return (ret); } else { } if ((unsigned int )dr->dr_complete != 0U) { eodr = (cmd->se_cmd.se_cmd_flags & 2U) != 0U ? 2 : 1; iscsit_free_datain_req(cmd, dr); } else { } return (eodr); } } int iscsit_build_logout_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_logout_rsp *hdr ) { struct iscsi_conn *logout_conn ; struct iscsi_conn_recovery *cr ; struct iscsi_session *sess ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; struct _ddebug descriptor___1 ; long tmp___1 ; u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; struct _ddebug descriptor___2 ; long tmp___6 ; { logout_conn = (struct iscsi_conn *)0; cr = (struct iscsi_conn_recovery *)0; sess = conn->sess; switch ((int )cmd->logout_reason) { case 0: descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_build_logout_rsp"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "iSCSI session logout successful, setting logout response to ISCSI_LOGOUT_SUCCESS.\n"; descriptor.lineno = 2773U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "iSCSI session logout successful, setting logout response to ISCSI_LOGOUT_SUCCESS.\n"); } else { } cmd->logout_response = 0U; goto ldv_61180; case 1: ; if ((unsigned int )cmd->logout_response == 1U) { goto ldv_61180; } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_build_logout_rsp"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "iSCSI CID: %hu logout on CID: %hu successful.\n"; descriptor___0.lineno = 2792U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "iSCSI CID: %hu logout on CID: %hu successful.\n", (int )cmd->logout_cid, (int )conn->cid); } else { } cmd->logout_response = 0U; goto ldv_61180; case 2: ; if ((unsigned int )cmd->logout_response == 2U || (unsigned int )cmd->logout_response == 3U) { goto ldv_61180; } else { } logout_conn = iscsit_get_conn_from_cid_rcfr(sess, (int )cmd->logout_cid); if ((unsigned long )logout_conn != (unsigned long )((struct iscsi_conn *)0)) { iscsit_connection_reinstatement_rcfr(logout_conn); iscsit_dec_conn_usage_count(logout_conn); } else { } cr = iscsit_get_inactive_connection_recovery_entry(conn->sess, (int )cmd->logout_cid); if ((unsigned long )cr == (unsigned long )((struct iscsi_conn_recovery *)0)) { printk("\vUnable to locate CID: %hu for REMOVECONNFORRECOVERY Logout Request.\n", (int )cmd->logout_cid); cmd->logout_response = 1U; goto ldv_61180; } else { } iscsit_discard_cr_cmds_by_expstatsn(cr, cmd->exp_stat_sn); descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_build_logout_rsp"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "iSCSI REMOVECONNFORRECOVERY logout for recovery for CID: %hu on CID: %hu successful.\n"; descriptor___1.lineno = 2824U; descriptor___1.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___1, "iSCSI REMOVECONNFORRECOVERY logout for recovery for CID: %hu on CID: %hu successful.\n", (int )cmd->logout_cid, (int )conn->cid); } else { } cmd->logout_response = 0U; goto ldv_61180; default: printk("\vUnknown cmd->logout_reason: 0x%02x\n", (int )cmd->logout_reason); return (-1); } ldv_61180: hdr->opcode = 38U; hdr->flags = (uint8_t )((unsigned int )hdr->flags | 128U); hdr->response = cmd->logout_response; hdr->itt = cmd->init_task_tag; tmp___2 = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; cmd->stat_sn = tmp___2; tmp___3 = __fswab32(cmd->stat_sn); hdr->statsn = tmp___3; iscsit_increment_maxcmdsn(cmd, conn->sess); tmp___4 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___4; tmp___5 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___5; descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsit_build_logout_rsp"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___2.format = "Built Logout Response ITT: 0x%08x StatSN: 0x%08x Response: 0x%02x CID: %hu on CID: %hu\n"; descriptor___2.lineno = 2847U; descriptor___2.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___2, "Built Logout Response ITT: 0x%08x StatSN: 0x%08x Response: 0x%02x CID: %hu on CID: %hu\n", cmd->init_task_tag, cmd->stat_sn, (int )hdr->response, (int )cmd->logout_cid, (int )conn->cid); } else { } return (0); } } static char const __kstrtab_iscsit_build_logout_rsp[24U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'b', 'u', 'i', 'l', 'd', '_', 'l', 'o', 'g', 'o', 'u', 't', '_', 'r', 's', 'p', '\000'}; struct kernel_symbol const __ksymtab_iscsit_build_logout_rsp ; struct kernel_symbol const __ksymtab_iscsit_build_logout_rsp = {(unsigned long )(& iscsit_build_logout_rsp), (char const *)(& __kstrtab_iscsit_build_logout_rsp)}; static int iscsit_send_logout(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct kvec *iov ; int niov ; int tx_size ; int rc ; int tmp ; u32 *header_digest ; struct _ddebug descriptor ; long tmp___0 ; { niov = 0; rc = iscsit_build_logout_rsp(cmd, conn, (struct iscsi_logout_rsp *)(& cmd->pdu)); if (rc < 0) { return (rc); } else { } tx_size = 48; iov = (struct kvec *)(& cmd->iov_misc); (iov + (unsigned long )niov)->iov_base = (void *)(& cmd->pdu); tmp = niov; niov = niov + 1; (iov + (unsigned long )tmp)->iov_len = 48UL; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)(& cmd->pdu), 48U, 0U, (u8 *)0U, (u8 *)header_digest); iov->iov_len = iov->iov_len + 4UL; tx_size = tx_size + 4; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_logout"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32C HeaderDigest to Logout Response 0x%08x\n"; descriptor.lineno = 2878U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32C HeaderDigest to Logout Response 0x%08x\n", *header_digest); } else { } } else { } cmd->iov_misc_count = (u32 )niov; cmd->tx_size = (u32 )tx_size; return (0); } } void iscsit_build_nopin_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_nopin *hdr , bool nopout_response ) { __u32 tmp ; u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; struct _ddebug descriptor ; long tmp___4 ; { hdr->opcode = 32U; hdr->flags = (uint8_t )((unsigned int )hdr->flags | 128U); hdr->dlength[0] = (uint8_t )(cmd->buf_ptr_size >> 16); hdr->dlength[1] = (uint8_t )(cmd->buf_ptr_size >> 8); hdr->dlength[2] = (uint8_t )cmd->buf_ptr_size; if ((int )nopout_response) { put_unaligned_le64(0xffffffffffffffffULL, (void *)(& hdr->lun)); } else { } hdr->itt = cmd->init_task_tag; tmp = __fswab32(cmd->targ_xfer_tag); hdr->ttt = tmp; if ((int )nopout_response) { tmp___0 = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; cmd->stat_sn = tmp___0; } else { cmd->stat_sn = conn->stat_sn; } tmp___1 = __fswab32(cmd->stat_sn); hdr->statsn = tmp___1; if ((int )nopout_response) { iscsit_increment_maxcmdsn(cmd, conn->sess); } else { } tmp___2 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___2; tmp___3 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___3; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_build_nopin_rsp"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Built NOPIN %s Response ITT: 0x%08x, TTT: 0x%08x, StatSN: 0x%08x, Length %u\n"; descriptor.lineno = 2910U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor, "Built NOPIN %s Response ITT: 0x%08x, TTT: 0x%08x, StatSN: 0x%08x, Length %u\n", (int )nopout_response ? (char *)"Solicitied" : (char *)"Unsolicitied", cmd->init_task_tag, cmd->targ_xfer_tag, cmd->stat_sn, cmd->buf_ptr_size); } else { } return; } } static char const __kstrtab_iscsit_build_nopin_rsp[23U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'b', 'u', 'i', 'l', 'd', '_', 'n', 'o', 'p', 'i', 'n', '_', 'r', 's', 'p', '\000'}; struct kernel_symbol const __ksymtab_iscsit_build_nopin_rsp ; struct kernel_symbol const __ksymtab_iscsit_build_nopin_rsp = {(unsigned long )(& iscsit_build_nopin_rsp), (char const *)(& __kstrtab_iscsit_build_nopin_rsp)}; static int iscsit_send_unsolicited_nopin(struct iscsi_cmd *cmd , struct iscsi_conn *conn , int want_response ) { struct iscsi_nopin *hdr ; int tx_size ; int ret ; u32 *header_digest ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { hdr = (struct iscsi_nopin *)(& cmd->pdu); tx_size = 48; iscsit_build_nopin_rsp(cmd, conn, hdr, 0); if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)hdr, 48U, 0U, (u8 *)0U, (u8 *)header_digest); tx_size = tx_size + 4; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_unsolicited_nopin"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32C HeaderDigest to NopIN 0x%08x\n"; descriptor.lineno = 2935U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32C HeaderDigest to NopIN 0x%08x\n", *header_digest); } else { } } else { } cmd->iov_misc[0].iov_base = (void *)(& cmd->pdu); cmd->iov_misc[0].iov_len = (size_t )tx_size; cmd->iov_misc_count = 1U; cmd->tx_size = (u32 )tx_size; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_send_unsolicited_nopin"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Sending Unsolicited NOPIN TTT: 0x%08x StatSN: 0x%08x CID: %hu\n"; descriptor___0.lineno = 2944U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Sending Unsolicited NOPIN TTT: 0x%08x StatSN: 0x%08x CID: %hu\n", hdr->ttt, cmd->stat_sn, (int )conn->cid); } else { } ret = iscsit_send_tx_data(cmd, conn, 1); if (ret < 0) { iscsit_tx_thread_wait_for_tcp(conn); return (ret); } else { } spin_lock_bh(& cmd->istate_lock); cmd->i_state = want_response != 0 ? 39 : 31; spin_unlock_bh(& cmd->istate_lock); return (0); } } static int iscsit_send_nopin(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_nopin *hdr ; struct kvec *iov ; u32 padding ; int niov ; int tx_size ; int tmp ; u32 *header_digest ; struct _ddebug descriptor ; long tmp___0 ; int tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; int tmp___3 ; struct _ddebug descriptor___1 ; long tmp___4 ; int tmp___5 ; struct _ddebug descriptor___2 ; long tmp___6 ; { hdr = (struct iscsi_nopin *)(& cmd->pdu); padding = 0U; niov = 0; iscsit_build_nopin_rsp(cmd, conn, hdr, 1); tx_size = 48; iov = (struct kvec *)(& cmd->iov_misc); (iov + (unsigned long )niov)->iov_base = (void *)(& cmd->pdu); tmp = niov; niov = niov + 1; (iov + (unsigned long )tmp)->iov_len = 48UL; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)hdr, 48U, 0U, (u8 *)0U, (u8 *)header_digest); iov->iov_len = iov->iov_len + 4UL; tx_size = tx_size + 4; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_nopin"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32C HeaderDigest to NopIn 0x%08x\n"; descriptor.lineno = 2984U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32C HeaderDigest to NopIn 0x%08x\n", *header_digest); } else { } } else { } if (cmd->buf_ptr_size != 0U) { (iov + (unsigned long )niov)->iov_base = cmd->buf_ptr; tmp___1 = niov; niov = niov + 1; (iov + (unsigned long )tmp___1)->iov_len = (size_t )cmd->buf_ptr_size; tx_size = (int )(cmd->buf_ptr_size + (u32 )tx_size); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_send_nopin"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Echoing back %u bytes of ping data.\n"; descriptor___0.lineno = 2997U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___0, "Echoing back %u bytes of ping data.\n", cmd->buf_ptr_size); } else { } padding = - cmd->buf_ptr_size & 3U; if (padding != 0U) { (iov + (unsigned long )niov)->iov_base = (void *)(& cmd->pad_bytes); tmp___3 = niov; niov = niov + 1; (iov + (unsigned long )tmp___3)->iov_len = (size_t )padding; tx_size = (int )((u32 )tx_size + padding); descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_send_nopin"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "Attaching %u additional padding bytes.\n"; descriptor___1.lineno = 3005U; descriptor___1.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___1, "Attaching %u additional padding bytes.\n", padding); } else { } } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)cmd->buf_ptr, cmd->buf_ptr_size, padding, (u8 *)(& cmd->pad_bytes), (u8 *)(& cmd->data_crc)); (iov + (unsigned long )niov)->iov_base = (void *)(& cmd->data_crc); tmp___5 = niov; niov = niov + 1; (iov + (unsigned long )tmp___5)->iov_len = 4UL; tx_size = tx_size + 4; descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsit_send_nopin"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___2.format = "Attached DataDigest for %u bytes of ping data, CRC 0x%08x\n"; descriptor___2.lineno = 3018U; descriptor___2.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___2, "Attached DataDigest for %u bytes of ping data, CRC 0x%08x\n", cmd->buf_ptr_size, cmd->data_crc); } else { } } else { } } else { } cmd->iov_misc_count = (u32 )niov; cmd->tx_size = (u32 )tx_size; return (0); } } static int iscsit_send_r2t(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { int tx_size ; struct iscsi_r2t *r2t ; struct iscsi_r2t_rsp *hdr ; int ret ; __u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; __u32 tmp___5 ; u32 *header_digest ; struct _ddebug descriptor ; long tmp___6 ; struct _ddebug descriptor___0 ; __u32 tmp___7 ; long tmp___8 ; { tx_size = 0; r2t = iscsit_get_r2t_from_list(cmd); if ((unsigned long )r2t == (unsigned long )((struct iscsi_r2t *)0)) { return (-1); } else { } hdr = (struct iscsi_r2t_rsp *)(& cmd->pdu); memset((void *)hdr, 0, 48UL); hdr->opcode = 49U; hdr->flags = (uint8_t )((unsigned int )hdr->flags | 128U); int_to_scsilun(cmd->se_cmd.orig_fe_lun, & hdr->lun); hdr->itt = cmd->init_task_tag; r2t->targ_xfer_tag = session_get_next_ttt(conn->sess); tmp = __fswab32(r2t->targ_xfer_tag); hdr->ttt = tmp; tmp___0 = __fswab32(conn->stat_sn); hdr->statsn = tmp___0; tmp___1 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___1; tmp___2 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___2; tmp___3 = __fswab32(r2t->r2t_sn); hdr->r2tsn = tmp___3; tmp___4 = __fswab32(r2t->offset); hdr->data_offset = tmp___4; tmp___5 = __fswab32(r2t->xfer_len); hdr->data_length = tmp___5; cmd->iov_misc[0].iov_base = (void *)(& cmd->pdu); cmd->iov_misc[0].iov_len = 48UL; tx_size = tx_size + 48; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)hdr, 48U, 0U, (u8 *)0U, (u8 *)header_digest); cmd->iov_misc[0].iov_len = cmd->iov_misc[0].iov_len + 4UL; tx_size = tx_size + 4; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_r2t"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32 HeaderDigest for R2T PDU 0x%08x\n"; descriptor.lineno = 3070U; descriptor.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32 HeaderDigest for R2T PDU 0x%08x\n", *header_digest); } else { } } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_send_r2t"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Built %sR2T, ITT: 0x%08x, TTT: 0x%08x, StatSN: 0x%08x, R2TSN: 0x%08x, Offset: %u, DDTL: %u, CID: %hu\n"; descriptor___0.lineno = 3077U; descriptor___0.flags = 0U; tmp___8 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___8 != 0L) { tmp___7 = __fswab32(hdr->statsn); __dynamic_pr_debug(& descriptor___0, "Built %sR2T, ITT: 0x%08x, TTT: 0x%08x, StatSN: 0x%08x, R2TSN: 0x%08x, Offset: %u, DDTL: %u, CID: %hu\n", r2t->recovery_r2t == 0 ? (char *)"" : (char *)"Recovery ", cmd->init_task_tag, r2t->targ_xfer_tag, tmp___7, r2t->r2t_sn, r2t->offset, r2t->xfer_len, (int )conn->cid); } else { } cmd->iov_misc_count = 1U; cmd->tx_size = (u32 )tx_size; spin_lock_bh(& cmd->r2t_lock); r2t->sent_r2t = 1; spin_unlock_bh(& cmd->r2t_lock); ret = iscsit_send_tx_data(cmd, conn, 1); if (ret < 0) { iscsit_tx_thread_wait_for_tcp(conn); return (ret); } else { } spin_lock_bh(& cmd->dataout_timeout_lock); iscsit_start_dataout_timer(cmd, conn); spin_unlock_bh(& cmd->dataout_timeout_lock); return (0); } } int iscsit_build_r2ts_for_cmd(struct iscsi_conn *conn , struct iscsi_cmd *cmd , bool recovery ) { int first_r2t ; u32 offset ; u32 xfer_len ; u32 _max1 ; u32 _max2 ; int new_data_end ; int new_data_end___0 ; struct iscsi_seq *seq ; int tmp ; { first_r2t = 1; offset = 0U; xfer_len = 0U; spin_lock_bh(& cmd->r2t_lock); if (((unsigned int )cmd->cmd_flags & 8U) != 0U) { spin_unlock_bh(& cmd->r2t_lock); return (0); } else { } if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U && ! recovery) { _max1 = cmd->r2t_offset; _max2 = cmd->write_data_done; cmd->r2t_offset = _max1 > _max2 ? _max1 : _max2; } else { } goto ldv_61280; ldv_61279: ; if ((unsigned int )((conn->sess)->sess_ops)->DataSequenceInOrder != 0U) { offset = cmd->r2t_offset; if (first_r2t != 0 && (int )recovery) { new_data_end = (int )((((conn->sess)->sess_ops)->MaxBurstLength + offset) - cmd->next_burst_len); if ((u32 )new_data_end > cmd->se_cmd.data_length) { xfer_len = cmd->se_cmd.data_length - offset; } else { xfer_len = ((conn->sess)->sess_ops)->MaxBurstLength - cmd->next_burst_len; } } else { new_data_end___0 = (int )(((conn->sess)->sess_ops)->MaxBurstLength + offset); if ((u32 )new_data_end___0 > cmd->se_cmd.data_length) { xfer_len = cmd->se_cmd.data_length - offset; } else { xfer_len = ((conn->sess)->sess_ops)->MaxBurstLength; } } cmd->r2t_offset = cmd->r2t_offset + xfer_len; if (cmd->r2t_offset == cmd->se_cmd.data_length) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 8U); } else { } } else { seq = iscsit_get_seq_holder_for_r2t(cmd); if ((unsigned long )seq == (unsigned long )((struct iscsi_seq *)0)) { spin_unlock_bh(& cmd->r2t_lock); return (-1); } else { } offset = seq->offset; xfer_len = seq->xfer_len; if (cmd->seq_send_order == cmd->seq_count) { cmd->cmd_flags = (enum cmd_flags_table )((unsigned int )cmd->cmd_flags | 8U); } else { } } cmd->outstanding_r2ts = cmd->outstanding_r2ts + 1U; first_r2t = 0; tmp = iscsit_add_r2t_to_list(cmd, offset, xfer_len, 0, 0U); if (tmp < 0) { spin_unlock_bh(& cmd->r2t_lock); return (-1); } else { } if (((unsigned int )cmd->cmd_flags & 8U) != 0U) { goto ldv_61278; } else { } ldv_61280: ; if (cmd->outstanding_r2ts < (u32 )((conn->sess)->sess_ops)->MaxOutstandingR2T) { goto ldv_61279; } else { } ldv_61278: spin_unlock_bh(& cmd->r2t_lock); return (0); } } void iscsit_build_rsp_pdu(struct iscsi_cmd *cmd , struct iscsi_conn *conn , bool inc_stat_sn , struct iscsi_scsi_rsp *hdr ) { u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; __u32 tmp___4 ; struct _ddebug descriptor ; long tmp___5 ; { if ((int )inc_stat_sn) { tmp = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; cmd->stat_sn = tmp; } else { } atomic_long_inc(& (conn->sess)->rsp_pdus); memset((void *)hdr, 0, 48UL); hdr->opcode = 33U; hdr->flags = (uint8_t )((unsigned int )hdr->flags | 128U); if ((cmd->se_cmd.se_cmd_flags & 4096U) != 0U) { hdr->flags = (uint8_t )((unsigned int )hdr->flags | 4U); tmp___0 = __fswab32(cmd->se_cmd.residual_count); hdr->residual_count = tmp___0; } else if ((cmd->se_cmd.se_cmd_flags & 8192U) != 0U) { hdr->flags = (uint8_t )((unsigned int )hdr->flags | 2U); tmp___1 = __fswab32(cmd->se_cmd.residual_count); hdr->residual_count = tmp___1; } else { } hdr->response = cmd->iscsi_response; hdr->cmd_status = cmd->se_cmd.scsi_status; hdr->itt = cmd->init_task_tag; tmp___2 = __fswab32(cmd->stat_sn); hdr->statsn = tmp___2; iscsit_increment_maxcmdsn(cmd, conn->sess); tmp___3 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___3; tmp___4 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___4; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_build_rsp_pdu"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Built SCSI Response, ITT: 0x%08x, StatSN: 0x%08x, Response: 0x%02x, SAM Status: 0x%02x, CID: %hu\n"; descriptor.lineno = 3210U; descriptor.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor, "Built SCSI Response, ITT: 0x%08x, StatSN: 0x%08x, Response: 0x%02x, SAM Status: 0x%02x, CID: %hu\n", cmd->init_task_tag, cmd->stat_sn, (int )cmd->se_cmd.scsi_status, (int )cmd->se_cmd.scsi_status, (int )conn->cid); } else { } return; } } static char const __kstrtab_iscsit_build_rsp_pdu[21U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'b', 'u', 'i', 'l', 'd', '_', 'r', 's', 'p', '_', 'p', 'd', 'u', '\000'}; struct kernel_symbol const __ksymtab_iscsit_build_rsp_pdu ; struct kernel_symbol const __ksymtab_iscsit_build_rsp_pdu = {(unsigned long )(& iscsit_build_rsp_pdu), (char const *)(& __kstrtab_iscsit_build_rsp_pdu)}; static int iscsit_send_response(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_scsi_rsp *hdr ; struct kvec *iov ; u32 padding ; u32 tx_size ; int iov_count ; bool inc_stat_sn ; int tmp ; int tmp___0 ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; struct _ddebug descriptor___0 ; long tmp___3 ; struct _ddebug descriptor___1 ; long tmp___4 ; u32 *header_digest ; struct _ddebug descriptor___2 ; long tmp___5 ; { hdr = (struct iscsi_scsi_rsp *)(& cmd->pdu); padding = 0U; tx_size = 0U; iov_count = 0; inc_stat_sn = (unsigned int )cmd->i_state == 29U; iscsit_build_rsp_pdu(cmd, conn, (int )inc_stat_sn, hdr); iov = (struct kvec *)(& cmd->iov_misc); (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->pdu); tmp = iov_count; iov_count = iov_count + 1; (iov + (unsigned long )tmp)->iov_len = 48UL; tx_size = tx_size + 48U; if ((unsigned long )cmd->se_cmd.sense_buffer != (unsigned long )((void *)0) && ((cmd->se_cmd.se_cmd_flags & 2U) != 0U || (cmd->se_cmd.se_cmd_flags & 4U) != 0U)) { put_unaligned_be16((int )cmd->se_cmd.scsi_sense_length, (void *)(& cmd->sense_buffer)); cmd->se_cmd.scsi_sense_length = (unsigned int )cmd->se_cmd.scsi_sense_length + 2U; padding = (u32 )(- ((int )cmd->se_cmd.scsi_sense_length)) & 3U; hdr->dlength[0] = 0U; hdr->dlength[1] = (uint8_t )((int )cmd->se_cmd.scsi_sense_length >> 8); hdr->dlength[2] = (uint8_t )cmd->se_cmd.scsi_sense_length; (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->sense_buffer); tmp___0 = iov_count; iov_count = iov_count + 1; (iov + (unsigned long )tmp___0)->iov_len = (size_t )((u32 )cmd->se_cmd.scsi_sense_length + padding); tx_size = (u32 )cmd->se_cmd.scsi_sense_length + tx_size; if (padding != 0U) { memset((void *)(& cmd->sense_buffer) + (unsigned long )cmd->se_cmd.scsi_sense_length, 0, (size_t )padding); tx_size = tx_size + padding; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_response"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Adding %u bytes of padding to SENSE.\n"; descriptor.lineno = 3250U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Adding %u bytes of padding to SENSE.\n", padding); } else { } } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)(& cmd->sense_buffer), (u32 )cmd->se_cmd.scsi_sense_length + padding, 0U, (u8 *)0U, (u8 *)(& cmd->data_crc)); (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->data_crc); tmp___2 = iov_count; iov_count = iov_count + 1; (iov + (unsigned long )tmp___2)->iov_len = 4UL; tx_size = tx_size + 4U; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_send_response"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Attaching CRC32 DataDigest for SENSE, %u bytes CRC 0x%08x\n"; descriptor___0.lineno = 3266U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___0, "Attaching CRC32 DataDigest for SENSE, %u bytes CRC 0x%08x\n", (u32 )cmd->se_cmd.scsi_sense_length + padding, cmd->data_crc); } else { } } else { } descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_send_response"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "Attaching SENSE DATA: %u bytes to iSCSI Response PDU\n"; descriptor___1.lineno = 3271U; descriptor___1.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___1, "Attaching SENSE DATA: %u bytes to iSCSI Response PDU\n", (int )cmd->se_cmd.scsi_sense_length); } else { } } else { } if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)(& cmd->pdu), 48U, 0U, (u8 *)0U, (u8 *)header_digest); iov->iov_len = iov->iov_len + 4UL; tx_size = tx_size + 4U; descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsit_send_response"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___2.format = "Attaching CRC32 HeaderDigest for Response PDU 0x%08x\n"; descriptor___2.lineno = 3283U; descriptor___2.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___2, "Attaching CRC32 HeaderDigest for Response PDU 0x%08x\n", *header_digest); } else { } } else { } cmd->iov_misc_count = (u32 )iov_count; cmd->tx_size = tx_size; return (0); } } static u8 iscsit_convert_tcm_tmr_rsp(struct se_tmr_req *se_tmr ) { { switch ((int )se_tmr->response) { case 1: ; return (0U); case 2: ; return (1U); case 3: ; return (2U); case 4: ; return (5U); case 5: ; default: ; return (255U); } } } void iscsit_build_task_mgt_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_tm_rsp *hdr ) { struct se_tmr_req *se_tmr ; u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; struct _ddebug descriptor ; long tmp___3 ; { se_tmr = cmd->se_cmd.se_tmr_req; hdr->opcode = 34U; hdr->flags = 128U; hdr->response = iscsit_convert_tcm_tmr_rsp(se_tmr); hdr->itt = cmd->init_task_tag; tmp = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; cmd->stat_sn = tmp; tmp___0 = __fswab32(cmd->stat_sn); hdr->statsn = tmp___0; iscsit_increment_maxcmdsn(cmd, conn->sess); tmp___1 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___1; tmp___2 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___2; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_build_task_mgt_rsp"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Built Task Management Response ITT: 0x%08x, StatSN: 0x%08x, Response: 0x%02x, CID: %hu\n"; descriptor.lineno = 3328U; descriptor.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor, "Built Task Management Response ITT: 0x%08x, StatSN: 0x%08x, Response: 0x%02x, CID: %hu\n", cmd->init_task_tag, cmd->stat_sn, (int )hdr->response, (int )conn->cid); } else { } return; } } static char const __kstrtab_iscsit_build_task_mgt_rsp[26U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'b', 'u', 'i', 'l', 'd', '_', 't', 'a', 's', 'k', '_', 'm', 'g', 't', '_', 'r', 's', 'p', '\000'}; struct kernel_symbol const __ksymtab_iscsit_build_task_mgt_rsp ; struct kernel_symbol const __ksymtab_iscsit_build_task_mgt_rsp = {(unsigned long )(& iscsit_build_task_mgt_rsp), (char const *)(& __kstrtab_iscsit_build_task_mgt_rsp)}; static int iscsit_send_task_mgt_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_tm_rsp *hdr ; u32 tx_size ; u32 *header_digest ; struct _ddebug descriptor ; long tmp ; { hdr = (struct iscsi_tm_rsp *)(& cmd->pdu); tx_size = 0U; iscsit_build_task_mgt_rsp(cmd, conn, hdr); cmd->iov_misc[0].iov_base = (void *)(& cmd->pdu); cmd->iov_misc[0].iov_len = 48UL; tx_size = tx_size + 48U; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)hdr, 48U, 0U, (u8 *)0U, (u8 *)header_digest); cmd->iov_misc[0].iov_len = cmd->iov_misc[0].iov_len + 4UL; tx_size = tx_size + 4U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_task_mgt_rsp"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32 HeaderDigest for Task Mgmt Response PDU 0x%08x\n"; descriptor.lineno = 3353U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32 HeaderDigest for Task Mgmt Response PDU 0x%08x\n", *header_digest); } else { } } else { } cmd->iov_misc_count = 1U; cmd->tx_size = tx_size; return (0); } } static bool iscsit_check_inaddr_any(struct iscsi_np *np ) { bool ret ; struct sockaddr_in6 sin6 ; struct sockaddr_in6 *sock_in6 ; int tmp ; struct sockaddr_in *sock_in ; { ret = 0; if ((unsigned int )np->np_sockaddr.ss_family == 10U) { sin6.sin6_family = (unsigned short)0; sin6.sin6_port = (unsigned short)0; sin6.sin6_flowinfo = 0U; sin6.sin6_addr.in6_u.u6_addr8[0] = 0U; sin6.sin6_addr.in6_u.u6_addr8[1] = 0U; sin6.sin6_addr.in6_u.u6_addr8[2] = 0U; sin6.sin6_addr.in6_u.u6_addr8[3] = 0U; sin6.sin6_addr.in6_u.u6_addr8[4] = 0U; sin6.sin6_addr.in6_u.u6_addr8[5] = 0U; sin6.sin6_addr.in6_u.u6_addr8[6] = 0U; sin6.sin6_addr.in6_u.u6_addr8[7] = 0U; sin6.sin6_addr.in6_u.u6_addr8[8] = 0U; sin6.sin6_addr.in6_u.u6_addr8[9] = 0U; sin6.sin6_addr.in6_u.u6_addr8[10] = 0U; sin6.sin6_addr.in6_u.u6_addr8[11] = 0U; sin6.sin6_addr.in6_u.u6_addr8[12] = 0U; sin6.sin6_addr.in6_u.u6_addr8[13] = 0U; sin6.sin6_addr.in6_u.u6_addr8[14] = 0U; sin6.sin6_addr.in6_u.u6_addr8[15] = 0U; sin6.sin6_scope_id = 0U; sock_in6 = (struct sockaddr_in6 *)(& np->np_sockaddr); tmp = memcmp((void const *)(& sock_in6->sin6_addr.in6_u.u6_addr8), (void const *)(& sin6.sin6_addr.in6_u.u6_addr8), 16UL); if (tmp == 0) { ret = 1; } else { } } else { sock_in = (struct sockaddr_in *)(& np->np_sockaddr); if (sock_in->sin_addr.s_addr == 0U) { ret = 1; } else { } } return (ret); } } static int iscsit_build_sendtargets_response(struct iscsi_cmd *cmd , enum iscsit_transport_type network_transport , int skip_bytes , bool *completed ) { char *payload ; struct iscsi_conn *conn ; struct iscsi_portal_group *tpg ; struct iscsi_tiqn *tiqn ; struct iscsi_tpg_np *tpg_np ; int buffer_len ; int end_of_buf ; int len ; int payload_len ; int target_name_printed ; unsigned char buf[236U] ; unsigned char *text_in ; unsigned char *text_ptr ; u32 _min1 ; unsigned int _min2 ; void *tmp ; char *tmp___0 ; struct list_head const *__mptr ; int tmp___1 ; struct list_head const *__mptr___0 ; struct se_node_acl *tmp___2 ; struct list_head const *__mptr___1 ; struct iscsi_np *np ; bool inaddr_any ; bool tmp___3 ; char *fmt_str ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; struct list_head const *__mptr___4 ; { payload = (char *)0; conn = cmd->conn; end_of_buf = 0; len = 0; payload_len = 0; text_in = (unsigned char *)cmd->text_in_ptr; text_ptr = (unsigned char *)0U; _min1 = (conn->conn_ops)->MaxRecvDataSegmentLength; _min2 = 32768U; buffer_len = (int )(_min1 < _min2 ? _min1 : _min2); tmp = kzalloc((size_t )buffer_len, 208U); payload = (char *)tmp; if ((unsigned long )payload == (unsigned long )((char *)0)) { printk("\vUnable to allocate memory for sendtargets response.\n"); return (-12); } else { } if (((unsigned int )cmd->cmd_flags & 512U) != 0U) { tmp___0 = strchr((char const *)text_in, 61); text_ptr = (unsigned char *)tmp___0; if ((unsigned long )text_ptr == (unsigned long )((unsigned char *)0U)) { printk("\vUnable to locate \'=\' string in text_in: %s\n", text_in); kfree((void const *)payload); return (-22); } else { } text_ptr = text_ptr + 1UL; } else { } spin_lock(& tiqn_lock); __mptr = (struct list_head const *)g_tiqn_list.next; tiqn = (struct iscsi_tiqn *)__mptr + 0xffffffffffffff08UL; goto ldv_61406; ldv_61405: ; if (((unsigned int )cmd->cmd_flags & 512U) != 0U) { tmp___1 = strcmp((char const *)(& tiqn->tiqn), (char const *)text_ptr); if (tmp___1 != 0) { goto ldv_61383; } else { } } else { } target_name_printed = 0; spin_lock(& tiqn->tiqn_tpg_lock); __mptr___0 = (struct list_head const *)tiqn->tiqn_tpg_list.next; tpg = (struct iscsi_portal_group *)__mptr___0 + 0xfffffffffffff4c0UL; goto ldv_61402; ldv_61401: ; if (tpg->tpg_attrib.generate_node_acls == 0U && tpg->tpg_attrib.demo_mode_discovery == 0U) { tmp___2 = core_tpg_get_initiator_node_acl(& tpg->tpg_se_tpg, (unsigned char *)(& (((cmd->conn)->sess)->sess_ops)->InitiatorName)); if ((unsigned long )tmp___2 == (unsigned long )((struct se_node_acl *)0)) { goto ldv_61388; } else { } } else { } spin_lock(& tpg->tpg_state_lock); if ((unsigned int )tpg->tpg_state == 0U || (unsigned int )tpg->tpg_state == 2U) { spin_unlock(& tpg->tpg_state_lock); goto ldv_61388; } else { } spin_unlock(& tpg->tpg_state_lock); spin_lock(& tpg->tpg_np_lock); __mptr___1 = (struct list_head const *)tpg->tpg_gnp_list.next; tpg_np = (struct iscsi_tpg_np *)__mptr___1 + 0xffffffffffffffe8UL; goto ldv_61399; ldv_61398: np = tpg_np->tpg_np; tmp___3 = iscsit_check_inaddr_any(np); inaddr_any = tmp___3; if ((unsigned int )np->np_network_transport != (unsigned int )network_transport) { goto ldv_61396; } else { } if (target_name_printed == 0) { len = sprintf((char *)(& buf), "TargetName=%s", (unsigned char *)(& tiqn->tiqn)); len = len + 1; if (len + payload_len > buffer_len) { spin_unlock(& tpg->tpg_np_lock); spin_unlock(& tiqn->tiqn_tpg_lock); end_of_buf = 1; goto eob; } else { } if (skip_bytes != 0 && len <= skip_bytes) { skip_bytes = skip_bytes - len; } else { memcpy((void *)payload + (unsigned long )payload_len, (void const *)(& buf), (size_t )len); payload_len = payload_len + len; target_name_printed = 1; if (len > skip_bytes) { skip_bytes = 0; } else { } } } else { } if ((unsigned int )np->np_sockaddr.ss_family == 10U) { fmt_str = (char *)"TargetAddress=[%s]:%hu,%hu"; } else { fmt_str = (char *)"TargetAddress=%s:%hu,%hu"; } len = sprintf((char *)(& buf), (char const *)fmt_str, (int )inaddr_any ? (unsigned char *)(& conn->local_ip) : (unsigned char *)(& np->np_ip), (int )np->np_port, (int )tpg->tpgt); len = len + 1; if (len + payload_len > buffer_len) { spin_unlock(& tpg->tpg_np_lock); spin_unlock(& tiqn->tiqn_tpg_lock); end_of_buf = 1; goto eob; } else { } if (skip_bytes != 0 && len <= skip_bytes) { skip_bytes = skip_bytes - len; } else { memcpy((void *)payload + (unsigned long )payload_len, (void const *)(& buf), (size_t )len); payload_len = payload_len + len; if (len > skip_bytes) { skip_bytes = 0; } else { } } ldv_61396: __mptr___2 = (struct list_head const *)tpg_np->tpg_np_list.next; tpg_np = (struct iscsi_tpg_np *)__mptr___2 + 0xffffffffffffffe8UL; ldv_61399: ; if ((unsigned long )(& tpg_np->tpg_np_list) != (unsigned long )(& tpg->tpg_gnp_list)) { goto ldv_61398; } else { } spin_unlock(& tpg->tpg_np_lock); ldv_61388: __mptr___3 = (struct list_head const *)tpg->tpg_list.next; tpg = (struct iscsi_portal_group *)__mptr___3 + 0xfffffffffffff4c0UL; ldv_61402: ; if ((unsigned long )(& tpg->tpg_list) != (unsigned long )(& tiqn->tiqn_tpg_list)) { goto ldv_61401; } else { } spin_unlock(& tiqn->tiqn_tpg_lock); eob: ; if (end_of_buf != 0) { *completed = 0; goto ldv_61404; } else { } if (((unsigned int )cmd->cmd_flags & 512U) != 0U) { goto ldv_61404; } else { } ldv_61383: __mptr___4 = (struct list_head const *)tiqn->tiqn_list.next; tiqn = (struct iscsi_tiqn *)__mptr___4 + 0xffffffffffffff08UL; ldv_61406: ; if ((unsigned long )(& tiqn->tiqn_list) != (unsigned long )(& g_tiqn_list)) { goto ldv_61405; } else { } ldv_61404: spin_unlock(& tiqn_lock); cmd->buf_ptr = (void *)payload; return (payload_len); } } int iscsit_build_text_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_text_rsp *hdr , enum iscsit_transport_type network_transport ) { int text_length ; int padding ; bool completed ; __u32 tmp ; u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; __u32 tmp___3 ; struct _ddebug descriptor ; long tmp___4 ; { completed = 1; text_length = iscsit_build_sendtargets_response(cmd, network_transport, (int )cmd->read_data_done, & completed); if (text_length < 0) { return (text_length); } else { } if ((int )completed) { hdr->flags = (uint8_t )((unsigned int )hdr->flags | 128U); } else { hdr->flags = (uint8_t )((unsigned int )hdr->flags | 64U); cmd->read_data_done = cmd->read_data_done + (u32 )text_length; if (cmd->targ_xfer_tag == 4294967295U) { cmd->targ_xfer_tag = session_get_next_ttt(conn->sess); } else { } } hdr->opcode = 36U; padding = - text_length & 3; hdr->dlength[0] = (uint8_t )(text_length >> 16); hdr->dlength[1] = (uint8_t )(text_length >> 8); hdr->dlength[2] = (uint8_t )text_length; hdr->itt = cmd->init_task_tag; tmp = __fswab32(cmd->targ_xfer_tag); hdr->ttt = tmp; tmp___0 = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; cmd->stat_sn = tmp___0; tmp___1 = __fswab32(cmd->stat_sn); hdr->statsn = tmp___1; iscsit_increment_maxcmdsn(cmd, conn->sess); cmd->maxcmdsn_inc = 0U; tmp___2 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___2; tmp___3 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___3; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_build_text_rsp"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Built Text Response: ITT: 0x%08x, TTT: 0x%08x, StatSN: 0x%08x, Length: %u, CID: %hu F: %d C: %d\n"; descriptor.lineno = 3585U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor, "Built Text Response: ITT: 0x%08x, TTT: 0x%08x, StatSN: 0x%08x, Length: %u, CID: %hu F: %d C: %d\n", cmd->init_task_tag, cmd->targ_xfer_tag, cmd->stat_sn, text_length, (int )conn->cid, (int )((signed char )hdr->flags) < 0, ((int )hdr->flags & 64) != 0); } else { } return (text_length + padding); } } static char const __kstrtab_iscsit_build_text_rsp[22U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'b', 'u', 'i', 'l', 'd', '_', 't', 'e', 'x', 't', '_', 'r', 's', 'p', '\000'}; struct kernel_symbol const __ksymtab_iscsit_build_text_rsp ; struct kernel_symbol const __ksymtab_iscsit_build_text_rsp = {(unsigned long )(& iscsit_build_text_rsp), (char const *)(& __kstrtab_iscsit_build_text_rsp)}; static int iscsit_send_text_rsp(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_text_rsp *hdr ; struct kvec *iov ; u32 tx_size ; int text_length ; int iov_count ; int rc ; int tmp ; int tmp___0 ; u32 *header_digest ; struct _ddebug descriptor ; long tmp___1 ; int tmp___2 ; struct _ddebug descriptor___0 ; long tmp___3 ; { hdr = (struct iscsi_text_rsp *)(& cmd->pdu); tx_size = 0U; iov_count = 0; rc = iscsit_build_text_rsp(cmd, conn, hdr, 0); if (rc < 0) { return (rc); } else { } text_length = rc; iov = (struct kvec *)(& cmd->iov_misc); (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->pdu); tmp = iov_count; iov_count = iov_count + 1; (iov + (unsigned long )tmp)->iov_len = 48UL; (iov + (unsigned long )iov_count)->iov_base = cmd->buf_ptr; tmp___0 = iov_count; iov_count = iov_count + 1; (iov + (unsigned long )tmp___0)->iov_len = (size_t )text_length; tx_size = ((u32 )text_length + tx_size) + 48U; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)hdr, 48U, 0U, (u8 *)0U, (u8 *)header_digest); iov->iov_len = iov->iov_len + 4UL; tx_size = tx_size + 4U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_text_rsp"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32 HeaderDigest for Text Response PDU 0x%08x\n"; descriptor.lineno = 3622U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32 HeaderDigest for Text Response PDU 0x%08x\n", *header_digest); } else { } } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)cmd->buf_ptr, (u32 )text_length, 0U, (u8 *)0U, (u8 *)(& cmd->data_crc)); (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->data_crc); tmp___2 = iov_count; iov_count = iov_count + 1; (iov + (unsigned long )tmp___2)->iov_len = 4UL; tx_size = tx_size + 4U; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_send_text_rsp"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Attaching DataDigest for %u bytes of text data, CRC 0x%08x\n"; descriptor___0.lineno = 3636U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___0, "Attaching DataDigest for %u bytes of text data, CRC 0x%08x\n", text_length, cmd->data_crc); } else { } } else { } cmd->iov_misc_count = (u32 )iov_count; cmd->tx_size = tx_size; return (0); } } void iscsit_build_reject(struct iscsi_cmd *cmd , struct iscsi_conn *conn , struct iscsi_reject *hdr ) { u32 tmp ; __u32 tmp___0 ; __u32 tmp___1 ; __u32 tmp___2 ; { hdr->opcode = 63U; hdr->reason = cmd->reject_reason; hdr->flags = (uint8_t )((unsigned int )hdr->flags | 128U); hdr->dlength[0] = 0U; hdr->dlength[1] = 0U; hdr->dlength[2] = 48U; hdr->ffffffff = 4294967295U; tmp = conn->stat_sn; conn->stat_sn = conn->stat_sn + 1U; cmd->stat_sn = tmp; tmp___0 = __fswab32(cmd->stat_sn); hdr->statsn = tmp___0; tmp___1 = __fswab32((conn->sess)->exp_cmd_sn); hdr->exp_cmdsn = tmp___1; tmp___2 = __fswab32((conn->sess)->max_cmd_sn); hdr->max_cmdsn = tmp___2; return; } } static char const __kstrtab_iscsit_build_reject[20U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'b', 'u', 'i', 'l', 'd', '_', 'r', 'e', 'j', 'e', 'c', 't', '\000'}; struct kernel_symbol const __ksymtab_iscsit_build_reject ; struct kernel_symbol const __ksymtab_iscsit_build_reject = {(unsigned long )(& iscsit_build_reject), (char const *)(& __kstrtab_iscsit_build_reject)}; static int iscsit_send_reject(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { struct iscsi_reject *hdr ; struct kvec *iov ; u32 iov_count ; u32 tx_size ; u32 tmp ; u32 tmp___0 ; u32 *header_digest ; struct _ddebug descriptor ; long tmp___1 ; u32 tmp___2 ; struct _ddebug descriptor___0 ; long tmp___3 ; struct _ddebug descriptor___1 ; __u32 tmp___4 ; long tmp___5 ; { hdr = (struct iscsi_reject *)(& cmd->pdu); iov_count = 0U; iscsit_build_reject(cmd, conn, hdr); iov = (struct kvec *)(& cmd->iov_misc); (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->pdu); tmp = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp)->iov_len = 48UL; (iov + (unsigned long )iov_count)->iov_base = cmd->buf_ptr; tmp___0 = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp___0)->iov_len = 48UL; tx_size = 96U; if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { header_digest = (u32 *)(& cmd->pdu) + 48U; iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)hdr, 48U, 0U, (u8 *)0U, (u8 *)header_digest); iov->iov_len = iov->iov_len + 4UL; tx_size = tx_size + 4U; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_send_reject"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Attaching CRC32 HeaderDigest for REJECT PDU 0x%08x\n"; descriptor.lineno = 3689U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Attaching CRC32 HeaderDigest for REJECT PDU 0x%08x\n", *header_digest); } else { } } else { } if ((unsigned int )(conn->conn_ops)->DataDigest != 0U) { iscsit_do_crypto_hash_buf(& conn->conn_tx_hash, (void const *)cmd->buf_ptr, 48U, 0U, (u8 *)0U, (u8 *)(& cmd->data_crc)); (iov + (unsigned long )iov_count)->iov_base = (void *)(& cmd->data_crc); tmp___2 = iov_count; iov_count = iov_count + 1U; (iov + (unsigned long )tmp___2)->iov_len = 4UL; tx_size = tx_size + 4U; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_send_reject"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Attaching CRC32 DataDigest for REJECT PDU 0x%08x\n"; descriptor___0.lineno = 3700U; descriptor___0.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor___0, "Attaching CRC32 DataDigest for REJECT PDU 0x%08x\n", cmd->data_crc); } else { } } else { } cmd->iov_misc_count = iov_count; cmd->tx_size = tx_size; descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_send_reject"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "Built Reject PDU StatSN: 0x%08x, Reason: 0x%02x, CID: %hu\n"; descriptor___1.lineno = 3707U; descriptor___1.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___5 != 0L) { tmp___4 = __fswab32(hdr->statsn); __dynamic_pr_debug(& descriptor___1, "Built Reject PDU StatSN: 0x%08x, Reason: 0x%02x, CID: %hu\n", tmp___4, (int )hdr->reason, (int )conn->cid); } else { } return (0); } } void iscsit_thread_get_cpumask(struct iscsi_conn *conn ) { int ord ; int cpu ; unsigned int tmp ; int tmp___0 ; unsigned int tmp___1 ; { tmp = cpumask_weight(cpu_online_mask); ord = (int )((unsigned int )conn->bitmap_id % tmp); cpu = -1; goto ldv_61475; ldv_61474: tmp___0 = ord; ord = ord - 1; if (tmp___0 == 0) { cpumask_set_cpu((unsigned int )cpu, conn->conn_cpumask); return; } else { } ldv_61475: tmp___1 = cpumask_next(cpu, cpu_online_mask); cpu = (int )tmp___1; if (cpu < nr_cpu_ids) { goto ldv_61474; } else { } dump_stack(); cpumask_setall(conn->conn_cpumask); return; } } __inline static void iscsit_thread_check_cpumask(struct iscsi_conn *conn , struct task_struct *p , int mode ) { { if (mode == 1) { if ((unsigned int )*((unsigned char *)conn + 2296UL) == 0U) { return; } else { } conn->conn_tx_reset_cpumask = 0U; } else { if ((unsigned int )*((unsigned char *)conn + 2296UL) == 0U) { return; } else { } conn->conn_rx_reset_cpumask = 0U; } set_cpus_allowed_ptr(p, (struct cpumask const *)conn->conn_cpumask); return; } } static int iscsit_immediate_queue(struct iscsi_conn *conn , struct iscsi_cmd *cmd , int state ) { int ret ; { switch (state) { case 21: ret = iscsit_send_r2t(cmd, conn); if (ret < 0) { goto err; } else { } goto ldv_61490; case 41: spin_lock_bh(& conn->cmd_lock); list_del_init(& cmd->i_conn_node); spin_unlock_bh(& conn->cmd_lock); iscsit_free_cmd(cmd, 0); goto ldv_61490; case 38: iscsit_mod_nopin_response_timer(conn); ret = iscsit_send_unsolicited_nopin(cmd, conn, 1); if (ret < 0) { goto err; } else { } goto ldv_61490; case 40: ret = iscsit_send_unsolicited_nopin(cmd, conn, 0); if (ret < 0) { goto err; } else { } goto ldv_61490; default: printk("\vUnknown Opcode: 0x%02x ITT: 0x%08x, i_state: %d on CID: %hu\n", (int )cmd->iscsi_opcode, cmd->init_task_tag, state, (int )conn->cid); goto err; } ldv_61490: ; return (0); err: ; return (-1); } } static int iscsit_handle_immediate_queue(struct iscsi_conn *conn ) { struct iscsit_transport *t ; struct iscsi_queue_req *qr ; struct iscsi_cmd *cmd ; u8 state ; int ret ; { t = conn->conn_transport; goto ldv_61504; ldv_61503: atomic_set(& conn->check_immediate_queue, 0); cmd = qr->cmd; state = (u8 )qr->state; kmem_cache_free(lio_qr_cache, (void *)qr); ret = (*(t->iscsit_immediate_queue))(conn, cmd, (int )state); if (ret < 0) { return (ret); } else { } ldv_61504: qr = iscsit_get_cmd_from_immediate_queue(conn); if ((unsigned long )qr != (unsigned long )((struct iscsi_queue_req *)0)) { goto ldv_61503; } else { } return (0); } } static int iscsit_response_queue(struct iscsi_conn *conn , struct iscsi_cmd *cmd , int state ) { int ret ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { check_rsp_state: ; switch (state) { case 12: ret = iscsit_send_datain(cmd, conn); if (ret < 0) { goto err; } else if (ret == 0) { goto check_rsp_state; } else if (ret == 1) { spin_lock_bh(& cmd->istate_lock); cmd->i_state = 31; spin_unlock_bh(& cmd->istate_lock); tmp = atomic_read((atomic_t const *)(& conn->check_immediate_queue)); if (tmp != 0) { return (1); } else { } return (0); } else if (ret == 2) { spin_lock_bh(& cmd->istate_lock); cmd->i_state = 29; spin_unlock_bh(& cmd->istate_lock); state = 29; goto check_rsp_state; } else { } goto ldv_61515; case 29: ; case 32: ret = iscsit_send_response(cmd, conn); goto ldv_61515; case 15: ret = iscsit_send_logout(cmd, conn); goto ldv_61515; case 10: ret = iscsit_send_conn_drop_async_message(cmd, conn); goto ldv_61515; case 17: ret = iscsit_send_nopin(cmd, conn); goto ldv_61515; case 19: ret = iscsit_send_reject(cmd, conn); goto ldv_61515; case 34: ret = iscsit_send_task_mgt_rsp(cmd, conn); if (ret != 0) { goto ldv_61515; } else { } ret = iscsit_tmr_post_handler(cmd, conn); if (ret != 0) { iscsit_fall_back_to_erl0(conn->sess); } else { } goto ldv_61515; case 36: ret = iscsit_send_text_rsp(cmd, conn); goto ldv_61515; default: printk("\vUnknown Opcode: 0x%02x ITT: 0x%08x, i_state: %d on CID: %hu\n", (int )cmd->iscsi_opcode, cmd->init_task_tag, state, (int )conn->cid); goto err; } ldv_61515: ; if (ret < 0) { goto err; } else { } tmp___0 = iscsit_send_tx_data(cmd, conn, 1); if (tmp___0 < 0) { iscsit_tx_thread_wait_for_tcp(conn); iscsit_unmap_iovec(cmd); goto err; } else { } iscsit_unmap_iovec(cmd); switch (state) { case 15: tmp___1 = iscsit_logout_post_handler(cmd, conn); if (tmp___1 == 0) { return (-104); } else { } case 29: ; case 10: ; case 17: ; case 32: ; case 36: ; case 34: ; case 19: spin_lock_bh(& cmd->istate_lock); cmd->i_state = 31; spin_unlock_bh(& cmd->istate_lock); goto ldv_61533; default: printk("\vUnknown Opcode: 0x%02x ITT: 0x%08x, i_state: %d on CID: %hu\n", (int )cmd->iscsi_opcode, cmd->init_task_tag, (unsigned int )cmd->i_state, (int )conn->cid); goto err; } ldv_61533: tmp___2 = atomic_read((atomic_t const *)(& conn->check_immediate_queue)); if (tmp___2 != 0) { return (1); } else { } return (0); err: ; return (-1); } } static int iscsit_handle_response_queue(struct iscsi_conn *conn ) { struct iscsit_transport *t ; struct iscsi_queue_req *qr ; struct iscsi_cmd *cmd ; u8 state ; int ret ; { t = conn->conn_transport; goto ldv_61544; ldv_61543: cmd = qr->cmd; state = (u8 )qr->state; kmem_cache_free(lio_qr_cache, (void *)qr); ret = (*(t->iscsit_response_queue))(conn, cmd, (int )state); if (ret == 1 || ret < 0) { return (ret); } else { } ldv_61544: qr = iscsit_get_cmd_from_response_queue(conn); if ((unsigned long )qr != (unsigned long )((struct iscsi_queue_req *)0)) { goto ldv_61543; } else { } return (0); } } int iscsi_target_tx_thread(void *arg ) { int ret ; struct iscsi_conn *conn ; struct task_struct *tmp ; int __ret ; wait_queue_t __wait ; long __ret___0 ; long __int ; long tmp___0 ; bool tmp___1 ; int tmp___2 ; bool tmp___3 ; struct task_struct *tmp___4 ; int tmp___5 ; bool tmp___6 ; int tmp___7 ; { ret = 0; conn = (struct iscsi_conn *)arg; allow_signal(2); goto ldv_61564; ldv_61563: tmp = get_current(); iscsit_thread_check_cpumask(conn, tmp, 1); __ret = 0; __might_sleep("/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c", 3981, 0); tmp___3 = iscsit_conn_all_queues_empty(conn); if ((int )tmp___3) { __ret___0 = 0L; INIT_LIST_HEAD(& __wait.task_list); __wait.flags = 0U; ldv_61557: tmp___0 = prepare_to_wait_event(& conn->queues_wq, & __wait, 1); __int = tmp___0; tmp___1 = iscsit_conn_all_queues_empty(conn); if (tmp___1) { tmp___2 = 0; } else { tmp___2 = 1; } if (tmp___2) { goto ldv_61556; } else { } if (__int != 0L) { __ret___0 = __int; goto ldv_61556; } else { } schedule(); goto ldv_61557; ldv_61556: finish_wait(& conn->queues_wq, & __wait); __ret = (int )__ret___0; } else { } tmp___4 = get_current(); tmp___5 = signal_pending(tmp___4); if (tmp___5 != 0) { goto transport_err; } else { } get_immediate: ret = iscsit_handle_immediate_queue(conn); if (ret < 0) { goto transport_err; } else { } ret = iscsit_handle_response_queue(conn); if (ret == 1) { goto get_immediate; } else if (ret == -104) { goto out; } else if (ret < 0) { goto transport_err; } else { } ldv_61564: tmp___6 = kthread_should_stop(); if (tmp___6) { tmp___7 = 0; } else { tmp___7 = 1; } if (tmp___7) { goto ldv_61563; } else { } transport_err: iscsit_take_action_for_connection_exit(conn); out: ; return (0); } } static int iscsi_target_rx_opcode(struct iscsi_conn *conn , unsigned char *buf ) { struct iscsi_hdr *hdr ; struct iscsi_cmd *cmd ; int ret ; int tmp ; { hdr = (struct iscsi_hdr *)buf; ret = 0; switch ((int )hdr->opcode & 63) { case 1: cmd = iscsit_allocate_cmd(conn, 1); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { goto reject; } else { } ret = iscsit_handle_scsi_cmd(conn, cmd, buf); goto ldv_61575; case 5: ret = iscsit_handle_data_out(conn, buf); goto ldv_61575; case 0: cmd = (struct iscsi_cmd *)0; if (hdr->ttt == 4294967295U) { cmd = iscsit_allocate_cmd(conn, 1); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { goto reject; } else { } } else { } ret = iscsit_handle_nop_out(conn, cmd, buf); goto ldv_61575; case 2: cmd = iscsit_allocate_cmd(conn, 1); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { goto reject; } else { } ret = iscsit_handle_task_mgt_cmd(conn, cmd, buf); goto ldv_61575; case 4: ; if (hdr->ttt != 4294967295U) { cmd = iscsit_find_cmd_from_itt(conn, hdr->itt); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { goto reject; } else { } } else { cmd = iscsit_allocate_cmd(conn, 1); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { goto reject; } else { } } ret = iscsit_handle_text_cmd(conn, cmd, buf); goto ldv_61575; case 6: cmd = iscsit_allocate_cmd(conn, 1); if ((unsigned long )cmd == (unsigned long )((struct iscsi_cmd *)0)) { goto reject; } else { } ret = iscsit_handle_logout_cmd(conn, cmd, buf); if (ret > 0) { wait_for_completion_timeout(& conn->conn_logout_comp, 3750UL); } else { } goto ldv_61575; case 16: ret = iscsit_handle_snack(conn, buf); goto ldv_61575; default: printk("\vGot unknown iSCSI OpCode: 0x%02x\n", (int )hdr->opcode); if ((unsigned int )((conn->sess)->sess_ops)->ErrorRecoveryLevel == 0U) { printk("\vCannot recover from unknown opcode while ERL=0, closing iSCSI connection.\n"); return (-1); } else { } printk("\vUnable to recover from unknown opcode while OFMarker=No, closing iSCSI connection.\n"); ret = -1; goto ldv_61575; } ldv_61575: ; return (ret); reject: tmp = iscsit_add_reject(conn, 10, buf); return (tmp); } } int iscsi_target_rx_thread(void *arg ) { int ret ; u8 buffer[48U] ; u8 opcode ; u32 checksum ; u32 digest ; struct iscsi_conn *conn ; struct kvec iov ; struct completion comp ; int rc ; struct task_struct *tmp ; struct _ddebug descriptor ; long tmp___0 ; bool tmp___1 ; int tmp___2 ; struct task_struct *tmp___3 ; int tmp___4 ; { checksum = 0U; digest = 0U; conn = (struct iscsi_conn *)arg; allow_signal(2); if ((conn->conn_transport)->transport_type == 5) { init_completion(& comp); rc = wait_for_completion_interruptible(& comp); if (rc < 0) { goto transport_err; } else { } goto transport_err; } else { } goto ldv_61599; ldv_61598: tmp = get_current(); iscsit_thread_check_cpumask(conn, tmp, 0); memset((void *)(& buffer), 0, 48UL); memset((void *)(& iov), 0, 16UL); iov.iov_base = (void *)(& buffer); iov.iov_len = 48UL; ret = rx_data(conn, & iov, 1, 48); if (ret != 48) { iscsit_rx_thread_wait_for_tcp(conn); goto transport_err; } else { } if ((unsigned int )(conn->conn_ops)->HeaderDigest != 0U) { iov.iov_base = (void *)(& digest); iov.iov_len = 4UL; ret = rx_data(conn, & iov, 1, 4); if (ret != 4) { iscsit_rx_thread_wait_for_tcp(conn); goto transport_err; } else { } iscsit_do_crypto_hash_buf(& conn->conn_rx_hash, (void const *)(& buffer), 48U, 0U, (u8 *)0U, (u8 *)(& checksum)); if (digest != checksum) { printk("\vHeaderDigest CRC32C failed, received 0x%08x, computed 0x%08x\n", digest, checksum); memset((void *)(& buffer), 255, 48UL); atomic_long_inc(& (conn->sess)->conn_digest_errors); } else { descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_target_rx_thread"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Got HeaderDigest CRC32C 0x%08x\n"; descriptor.lineno = 4153U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "Got HeaderDigest CRC32C 0x%08x\n", checksum); } else { } } } else { } if ((unsigned int )conn->conn_state == 6U) { goto transport_err; } else { } opcode = (unsigned int )buffer[0] & 63U; if ((unsigned int )((conn->sess)->sess_ops)->SessionType != 0U && (((int )opcode & 4) == 0 || ((int )opcode & 6) == 0)) { printk("\vReceived illegal iSCSI Opcode: 0x%02x while in Discovery Session, rejecting.\n", (int )opcode); iscsit_add_reject(conn, 4, (unsigned char *)(& buffer)); goto transport_err; } else { } ret = iscsi_target_rx_opcode(conn, (unsigned char *)(& buffer)); if (ret < 0) { goto transport_err; } else { } ldv_61599: tmp___1 = kthread_should_stop(); if (tmp___1) { tmp___2 = 0; } else { tmp___2 = 1; } if (tmp___2) { goto ldv_61598; } else { } transport_err: tmp___3 = get_current(); tmp___4 = signal_pending(tmp___3); if (tmp___4 == 0) { atomic_set(& conn->transport_failed, 1); } else { } iscsit_take_action_for_connection_exit(conn); return (0); } } static void iscsit_release_commands_from_conn(struct iscsi_conn *conn ) { struct iscsi_cmd *cmd ; struct iscsi_cmd *cmd_tmp ; struct iscsi_session *sess ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct list_head const *__mptr___1 ; { cmd = (struct iscsi_cmd *)0; cmd_tmp = (struct iscsi_cmd *)0; sess = conn->sess; spin_lock_bh(& conn->cmd_lock); __mptr = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; goto ldv_61614; ldv_61613: list_del_init(& cmd->i_conn_node); spin_unlock_bh(& conn->cmd_lock); iscsit_increment_maxcmdsn(cmd, sess); iscsit_free_cmd(cmd, 1); spin_lock_bh(& conn->cmd_lock); cmd = cmd_tmp; __mptr___1 = (struct list_head const *)cmd_tmp->i_conn_node.next; cmd_tmp = (struct iscsi_cmd *)__mptr___1 + 0xfffffffffffffc80UL; ldv_61614: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_61613; } else { } spin_unlock_bh(& conn->cmd_lock); return; } } static void iscsit_stop_timers_for_cmds(struct iscsi_conn *conn ) { struct iscsi_cmd *cmd ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; { spin_lock_bh(& conn->cmd_lock); __mptr = (struct list_head const *)conn->conn_cmd_list.next; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc80UL; goto ldv_61625; ldv_61624: ; if ((unsigned int )cmd->data_direction == 1U) { iscsit_stop_dataout_timer(cmd); } else { } __mptr___0 = (struct list_head const *)cmd->i_conn_node.next; cmd = (struct iscsi_cmd *)__mptr___0 + 0xfffffffffffffc80UL; ldv_61625: ; if ((unsigned long )(& cmd->i_conn_node) != (unsigned long )(& conn->conn_cmd_list)) { goto ldv_61624; } else { } spin_unlock_bh(& conn->cmd_lock); return; } } int iscsit_close_connection(struct iscsi_conn *conn ) { int conn_logout ; struct iscsi_session *sess ; struct _ddebug descriptor ; long tmp ; int __ret ; int __old ; int __new ; u8 volatile *__ptr ; u16 volatile *__ptr___0 ; u32 volatile *__ptr___1 ; u64 volatile *__ptr___2 ; int __ret___0 ; int __old___0 ; int __new___0 ; u8 volatile *__ptr___3 ; u16 volatile *__ptr___4 ; u32 volatile *__ptr___5 ; u64 volatile *__ptr___6 ; struct task_struct *tmp___0 ; int tmp___1 ; struct task_struct *tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; struct _ddebug descriptor___0 ; long tmp___9 ; struct _ddebug descriptor___1 ; int tmp___10 ; long tmp___11 ; int tmp___12 ; int tmp___13 ; int tmp___14 ; int tmp___15 ; int tmp___16 ; struct _ddebug descriptor___2 ; long tmp___17 ; int tmp___18 ; struct _ddebug descriptor___3 ; long tmp___19 ; int tmp___20 ; int tmp___21 ; int tmp___22 ; int tmp___23 ; int tmp___24 ; { conn_logout = (unsigned int )conn->conn_state == 6U; sess = conn->sess; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_close_connection"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Closing iSCSI connection CID %hu on SID: %u\n"; descriptor.lineno = 4228U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Closing iSCSI connection CID %hu on SID: %u\n", (int )conn->cid, sess->sid); } else { } if ((conn->conn_transport)->transport_type == 0) { complete(& conn->conn_logout_comp); } else { } tmp___2 = get_current(); tmp___3 = strcmp((char const *)(& tmp___2->comm), "iscsi_trx"); if (tmp___3 == 0) { if ((unsigned long )conn->tx_thread != (unsigned long )((struct task_struct *)0)) { __old = 1; __new = 0; switch (4UL) { case 1UL: __ptr = (u8 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgb %2,%1": "=a" (__ret), "+m" (*__ptr): "q" (__new), "0" (__old): "memory"); goto ldv_61639; case 2UL: __ptr___0 = (u16 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgw %2,%1": "=a" (__ret), "+m" (*__ptr___0): "r" (__new), "0" (__old): "memory"); goto ldv_61639; case 4UL: __ptr___1 = (u32 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgl %2,%1": "=a" (__ret), "+m" (*__ptr___1): "r" (__new), "0" (__old): "memory"); goto ldv_61639; case 8UL: __ptr___2 = (u64 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgq %2,%1": "=a" (__ret), "+m" (*__ptr___2): "r" (__new), "0" (__old): "memory"); goto ldv_61639; default: __cmpxchg_wrong_size(); } ldv_61639: ; if (__ret != 0) { send_sig(2, conn->tx_thread, 1); kthread_stop(conn->tx_thread); } else { } } else { } } else { tmp___0 = get_current(); tmp___1 = strcmp((char const *)(& tmp___0->comm), "iscsi_ttx"); if (tmp___1 == 0) { if ((unsigned long )conn->rx_thread != (unsigned long )((struct task_struct *)0)) { __old___0 = 1; __new___0 = 0; switch (4UL) { case 1UL: __ptr___3 = (u8 volatile *)(& conn->rx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgb %2,%1": "=a" (__ret___0), "+m" (*__ptr___3): "q" (__new___0), "0" (__old___0): "memory"); goto ldv_61653; case 2UL: __ptr___4 = (u16 volatile *)(& conn->rx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgw %2,%1": "=a" (__ret___0), "+m" (*__ptr___4): "r" (__new___0), "0" (__old___0): "memory"); goto ldv_61653; case 4UL: __ptr___5 = (u32 volatile *)(& conn->rx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgl %2,%1": "=a" (__ret___0), "+m" (*__ptr___5): "r" (__new___0), "0" (__old___0): "memory"); goto ldv_61653; case 8UL: __ptr___6 = (u64 volatile *)(& conn->rx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgq %2,%1": "=a" (__ret___0), "+m" (*__ptr___6): "r" (__new___0), "0" (__old___0): "memory"); goto ldv_61653; default: __cmpxchg_wrong_size(); } ldv_61653: ; if (__ret___0 != 0) { send_sig(2, conn->rx_thread, 1); kthread_stop(conn->rx_thread); } else { } } else { } } else { } } spin_lock(& iscsit_global->ts_bitmap_lock); bitmap_release_region(iscsit_global->ts_bitmap, (unsigned int )conn->bitmap_id, 0); spin_unlock(& iscsit_global->ts_bitmap_lock); iscsit_stop_timers_for_cmds(conn); iscsit_stop_nopin_response_timer(conn); iscsit_stop_nopin_timer(conn); if ((unsigned long )(conn->conn_transport)->iscsit_wait_conn != (unsigned long )((void (*)(struct iscsi_conn * ))0)) { (*((conn->conn_transport)->iscsit_wait_conn))(conn); } else { } tmp___4 = atomic_read((atomic_t const *)(& conn->connection_recovery)); if (tmp___4 != 0) { iscsit_discard_unacknowledged_ooo_cmdsns_for_conn(conn); iscsit_prepare_cmds_for_realligance(conn); } else { iscsit_clear_ooo_cmdsns_for_conn(conn); iscsit_release_commands_from_conn(conn); } iscsit_free_queue_reqs_for_conn(conn); tmp___5 = atomic_read((atomic_t const *)(& conn->conn_logout_remove)); if (tmp___5 != 0) { if ((unsigned int )conn->conn_logout_reason == 0U) { iscsit_dec_conn_usage_count(conn); iscsit_dec_session_usage_count(sess); } else { } if ((unsigned int )conn->conn_logout_reason == 1U) { iscsit_dec_conn_usage_count(conn); } else { } atomic_set(& conn->conn_logout_remove, 0); atomic_set(& sess->session_reinstatement, 0); atomic_set(& sess->session_fall_back_to_erl0, 1); } else { } spin_lock_bh(& sess->conn_lock); list_del(& conn->conn_list); tmp___6 = atomic_read((atomic_t const *)(& conn->connection_recovery)); if (tmp___6 != 0) { iscsit_build_conn_drop_async_message(conn); } else { } spin_unlock_bh(& sess->conn_lock); spin_lock_bh(& conn->state_lock); tmp___7 = atomic_read((atomic_t const *)(& conn->sleep_on_conn_wait_comp)); if (tmp___7 != 0) { spin_unlock_bh(& conn->state_lock); complete(& conn->conn_wait_comp); wait_for_completion(& conn->conn_post_wait_comp); spin_lock_bh(& conn->state_lock); } else { } tmp___8 = atomic_read((atomic_t const *)(& conn->connection_wait_rcfr)); if (tmp___8 != 0) { spin_unlock_bh(& conn->state_lock); complete(& conn->conn_wait_rcfr_comp); wait_for_completion(& conn->conn_post_wait_comp); spin_lock_bh(& conn->state_lock); } else { } atomic_set(& conn->connection_reinstatement, 1); spin_unlock_bh(& conn->state_lock); iscsit_check_conn_usage_count(conn); if ((unsigned long )conn->conn_rx_hash.tfm != (unsigned long )((struct crypto_hash *)0)) { crypto_free_hash(conn->conn_rx_hash.tfm); } else { } if ((unsigned long )conn->conn_tx_hash.tfm != (unsigned long )((struct crypto_hash *)0)) { crypto_free_hash(conn->conn_tx_hash.tfm); } else { } free_cpumask_var(conn->conn_cpumask); kfree((void const *)conn->conn_ops); conn->conn_ops = (struct iscsi_conn_ops *)0; if ((unsigned long )conn->sock != (unsigned long )((struct socket *)0)) { sock_release(conn->sock); } else { } if ((unsigned long )(conn->conn_transport)->iscsit_free_conn != (unsigned long )((void (*)(struct iscsi_conn * ))0)) { (*((conn->conn_transport)->iscsit_free_conn))(conn); } else { } iscsit_put_transport(conn->conn_transport); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_close_connection"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Moving to TARG_CONN_STATE_FREE.\n"; descriptor___0.lineno = 4369U; descriptor___0.flags = 0U; tmp___9 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___9 != 0L) { __dynamic_pr_debug(& descriptor___0, "Moving to TARG_CONN_STATE_FREE.\n"); } else { } conn->conn_state = 1U; kfree((void const *)conn); spin_lock_bh(& sess->conn_lock); atomic_dec(& sess->nconn); descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_close_connection"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "Decremented iSCSI connection count to %hu from node: %s\n"; descriptor___1.lineno = 4377U; descriptor___1.flags = 0U; tmp___11 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___11 != 0L) { tmp___10 = atomic_read((atomic_t const *)(& sess->nconn)); __dynamic_pr_debug(& descriptor___1, "Decremented iSCSI connection count to %hu from node: %s\n", tmp___10, (char *)(& (sess->sess_ops)->InitiatorName)); } else { } if ((unsigned int )(sess->sess_ops)->ErrorRecoveryLevel != 2U && conn_logout == 0) { tmp___12 = atomic_read((atomic_t const *)(& sess->session_logout)); if (tmp___12 == 0) { atomic_set(& sess->session_fall_back_to_erl0, 1); } else { } } else { } tmp___16 = atomic_read((atomic_t const *)(& sess->nconn)); if (tmp___16 != 0) { tmp___13 = atomic_read((atomic_t const *)(& sess->session_reinstatement)); if (tmp___13 == 0) { tmp___14 = atomic_read((atomic_t const *)(& sess->session_fall_back_to_erl0)); if (tmp___14 == 0) { spin_unlock_bh(& sess->conn_lock); return (0); } else { } } else { } tmp___15 = atomic_read((atomic_t const *)(& sess->session_stop_active)); if (tmp___15 == 0) { atomic_set(& sess->session_stop_active, 1); spin_unlock_bh(& sess->conn_lock); iscsit_stop_session(sess, 0, 0); return (0); } else { } spin_unlock_bh(& sess->conn_lock); return (0); } else { } tmp___23 = atomic_read((atomic_t const *)(& sess->session_reinstatement)); if (tmp___23 == 0) { tmp___24 = atomic_read((atomic_t const *)(& sess->session_fall_back_to_erl0)); if (tmp___24 != 0) { spin_unlock_bh(& sess->conn_lock); target_put_session(sess->se_sess); return (0); } else { goto _L; } } else { _L: /* CIL Label */ tmp___22 = atomic_read((atomic_t const *)(& sess->session_logout)); if (tmp___22 != 0) { descriptor___2.modname = "iscsi_target_mod"; descriptor___2.function = "iscsit_close_connection"; descriptor___2.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___2.format = "Moving to TARG_SESS_STATE_FREE.\n"; descriptor___2.lineno = 4428U; descriptor___2.flags = 0U; tmp___17 = ldv__builtin_expect((long )descriptor___2.flags & 1L, 0L); if (tmp___17 != 0L) { __dynamic_pr_debug(& descriptor___2, "Moving to TARG_SESS_STATE_FREE.\n"); } else { } sess->session_state = 1U; spin_unlock_bh(& sess->conn_lock); tmp___18 = atomic_read((atomic_t const *)(& sess->sleep_on_sess_wait_comp)); if (tmp___18 != 0) { complete(& sess->session_wait_comp); } else { } return (0); } else { descriptor___3.modname = "iscsi_target_mod"; descriptor___3.function = "iscsit_close_connection"; descriptor___3.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___3.format = "Moving to TARG_SESS_STATE_FAILED.\n"; descriptor___3.lineno = 4437U; descriptor___3.flags = 0U; tmp___19 = ldv__builtin_expect((long )descriptor___3.flags & 1L, 0L); if (tmp___19 != 0L) { __dynamic_pr_debug(& descriptor___3, "Moving to TARG_SESS_STATE_FAILED.\n"); } else { } sess->session_state = 4U; tmp___20 = atomic_read((atomic_t const *)(& sess->session_continuation)); if (tmp___20 == 0) { spin_unlock_bh(& sess->conn_lock); iscsit_start_time2retain_handler(sess); } else { spin_unlock_bh(& sess->conn_lock); } tmp___21 = atomic_read((atomic_t const *)(& sess->sleep_on_sess_wait_comp)); if (tmp___21 != 0) { complete(& sess->session_wait_comp); } else { } return (0); } } spin_unlock_bh(& sess->conn_lock); return (0); } } int iscsit_close_session(struct iscsi_session *sess ) { struct iscsi_portal_group *tpg ; struct se_portal_group *se_tpg ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; struct _ddebug descriptor ; long tmp___4 ; struct _ddebug descriptor___0 ; long tmp___5 ; struct _ddebug descriptor___1 ; long tmp___6 ; { tpg = sess->tpg; se_tpg = & tpg->tpg_se_tpg; tmp___0 = atomic_read((atomic_t const *)(& sess->nconn)); if (tmp___0 != 0) { tmp = atomic_read((atomic_t const *)(& sess->nconn)); printk("\v%d connection(s) still exist for iSCSI session to %s\n", tmp, (char *)(& (sess->sess_ops)->InitiatorName)); __asm__ volatile ("1:\tud2\n.pushsection __bug_table,\"a\"\n2:\t.long 1b - 2b, %c0 - 2b\n\t.word %c1, 0\n\t.org 2b+%c2\n.popsection": : "i" ((char *)"/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"), "i" (4465), "i" (12UL)); ldv_61671: ; goto ldv_61671; } else { } spin_lock_bh(& se_tpg->session_lock); atomic_set(& sess->session_logout, 1); atomic_set(& sess->session_reinstatement, 1); iscsit_stop_time2retain_timer(sess); spin_unlock_bh(& se_tpg->session_lock); transport_deregister_session_configfs(sess->se_sess); tmp___3 = preempt_count___0(); if (((unsigned long )tmp___3 & 2096896UL) == 0UL) { tmp___1 = iscsit_check_session_usage_count(sess); if (tmp___1 == 1) { iscsit_stop_session(sess, 1, 1); } else { } } else { tmp___2 = iscsit_check_session_usage_count(sess); if (tmp___2 == 2) { atomic_set(& sess->session_logout, 0); iscsit_start_time2retain_handler(sess); return (0); } else { } } transport_deregister_session(sess->se_sess); if ((unsigned int )(sess->sess_ops)->ErrorRecoveryLevel == 2U) { iscsit_free_connection_recovery_entires(sess); } else { } iscsit_free_all_ooo_cmdsns(sess); spin_lock_bh(& se_tpg->session_lock); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_close_session"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Moving to TARG_SESS_STATE_FREE.\n"; descriptor.lineno = 4508U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor, "Moving to TARG_SESS_STATE_FREE.\n"); } else { } sess->session_state = 1U; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_close_session"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Released iSCSI session from node: %s\n"; descriptor___0.lineno = 4511U; descriptor___0.flags = 0U; tmp___5 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___5 != 0L) { __dynamic_pr_debug(& descriptor___0, "Released iSCSI session from node: %s\n", (char *)(& (sess->sess_ops)->InitiatorName)); } else { } tpg->nsessions = tpg->nsessions - 1U; if ((unsigned long )tpg->tpg_tiqn != (unsigned long )((struct iscsi_tiqn *)0)) { (tpg->tpg_tiqn)->tiqn_nsessions = (tpg->tpg_tiqn)->tiqn_nsessions - 1U; } else { } descriptor___1.modname = "iscsi_target_mod"; descriptor___1.function = "iscsit_close_session"; descriptor___1.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___1.format = "Decremented number of active iSCSI Sessions on iSCSI TPG: %hu to %u\n"; descriptor___1.lineno = 4517U; descriptor___1.flags = 0U; tmp___6 = ldv__builtin_expect((long )descriptor___1.flags & 1L, 0L); if (tmp___6 != 0L) { __dynamic_pr_debug(& descriptor___1, "Decremented number of active iSCSI Sessions on iSCSI TPG: %hu to %u\n", (int )tpg->tpgt, tpg->nsessions); } else { } spin_lock(& sess_idr_lock); idr_remove(& sess_idr, sess->session_index); spin_unlock(& sess_idr_lock); kfree((void const *)sess->sess_ops); sess->sess_ops = (struct iscsi_sess_ops *)0; spin_unlock_bh(& se_tpg->session_lock); kfree((void const *)sess); return (0); } } static void iscsit_logout_post_handler_closesession(struct iscsi_conn *conn ) { struct iscsi_session *sess ; int sleep ; int __ret ; int __old ; int __new ; u8 volatile *__ptr ; u16 volatile *__ptr___0 ; u32 volatile *__ptr___1 ; u64 volatile *__ptr___2 ; { sess = conn->sess; __old = 1; __new = 0; switch (4UL) { case 1UL: __ptr = (u8 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgb %2,%1": "=a" (__ret), "+m" (*__ptr): "q" (__new), "0" (__old): "memory"); goto ldv_61686; case 2UL: __ptr___0 = (u16 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgw %2,%1": "=a" (__ret), "+m" (*__ptr___0): "r" (__new), "0" (__old): "memory"); goto ldv_61686; case 4UL: __ptr___1 = (u32 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgl %2,%1": "=a" (__ret), "+m" (*__ptr___1): "r" (__new), "0" (__old): "memory"); goto ldv_61686; case 8UL: __ptr___2 = (u64 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgq %2,%1": "=a" (__ret), "+m" (*__ptr___2): "r" (__new), "0" (__old): "memory"); goto ldv_61686; default: __cmpxchg_wrong_size(); } ldv_61686: sleep = __ret; atomic_set(& conn->conn_logout_remove, 0); complete(& conn->conn_logout_comp); iscsit_dec_conn_usage_count(conn); iscsit_stop_session(sess, sleep, sleep); iscsit_dec_session_usage_count(sess); target_put_session(sess->se_sess); return; } } static void iscsit_logout_post_handler_samecid(struct iscsi_conn *conn ) { int sleep ; int __ret ; int __old ; int __new ; u8 volatile *__ptr ; u16 volatile *__ptr___0 ; u32 volatile *__ptr___1 ; u64 volatile *__ptr___2 ; { __old = 1; __new = 0; switch (4UL) { case 1UL: __ptr = (u8 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgb %2,%1": "=a" (__ret), "+m" (*__ptr): "q" (__new), "0" (__old): "memory"); goto ldv_61704; case 2UL: __ptr___0 = (u16 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgw %2,%1": "=a" (__ret), "+m" (*__ptr___0): "r" (__new), "0" (__old): "memory"); goto ldv_61704; case 4UL: __ptr___1 = (u32 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgl %2,%1": "=a" (__ret), "+m" (*__ptr___1): "r" (__new), "0" (__old): "memory"); goto ldv_61704; case 8UL: __ptr___2 = (u64 volatile *)(& conn->tx_thread_active); __asm__ volatile (".pushsection .smp_locks,\"a\"\n.balign 4\n.long 671f - .\n.popsection\n671:\n\tlock; cmpxchgq %2,%1": "=a" (__ret), "+m" (*__ptr___2): "r" (__new), "0" (__old): "memory"); goto ldv_61704; default: __cmpxchg_wrong_size(); } ldv_61704: sleep = __ret; atomic_set(& conn->conn_logout_remove, 0); complete(& conn->conn_logout_comp); iscsit_cause_connection_reinstatement(conn, sleep); iscsit_dec_conn_usage_count(conn); return; } } static void iscsit_logout_post_handler_diffcid(struct iscsi_conn *conn , u16 cid ) { struct iscsi_conn *l_conn ; struct iscsi_session *sess ; bool conn_found ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; struct _ddebug descriptor ; long tmp ; { sess = conn->sess; conn_found = 0; if ((unsigned long )sess == (unsigned long )((struct iscsi_session *)0)) { return; } else { } spin_lock_bh(& sess->conn_lock); __mptr = (struct list_head const *)sess->sess_conn_list.next; l_conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_61726; ldv_61725: ; if ((int )l_conn->cid == (int )cid) { iscsit_inc_conn_usage_count(l_conn); conn_found = 1; goto ldv_61724; } else { } __mptr___0 = (struct list_head const *)l_conn->conn_list.next; l_conn = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_61726: ; if ((unsigned long )(& l_conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_61725; } else { } ldv_61724: spin_unlock_bh(& sess->conn_lock); if (! conn_found) { return; } else { } if ((unsigned long )l_conn->sock != (unsigned long )((struct socket *)0)) { (*(((l_conn->sock)->ops)->shutdown))(l_conn->sock, 1); } else { } spin_lock_bh(& l_conn->state_lock); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_logout_post_handler_diffcid"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Moving to TARG_CONN_STATE_IN_LOGOUT.\n"; descriptor.lineno = 4586U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Moving to TARG_CONN_STATE_IN_LOGOUT.\n"); } else { } l_conn->conn_state = 6U; spin_unlock_bh(& l_conn->state_lock); iscsit_cause_connection_reinstatement(l_conn, 1); iscsit_dec_conn_usage_count(l_conn); return; } } int iscsit_logout_post_handler(struct iscsi_cmd *cmd , struct iscsi_conn *conn ) { int ret ; { ret = 0; switch ((int )cmd->logout_reason) { case 0: ; switch ((int )cmd->logout_response) { case 0: ; case 3: ; default: iscsit_logout_post_handler_closesession(conn); goto ldv_61738; } ldv_61738: ret = 0; goto ldv_61739; case 1: ; if ((int )conn->cid == (int )cmd->logout_cid) { switch ((int )cmd->logout_response) { case 0: ; case 3: ; default: iscsit_logout_post_handler_samecid(conn); goto ldv_61744; } ldv_61744: ret = 0; } else { switch ((int )cmd->logout_response) { case 0: iscsit_logout_post_handler_diffcid(conn, (int )cmd->logout_cid); goto ldv_61746; case 1: ; case 3: ; default: ; goto ldv_61746; } ldv_61746: ret = 1; } goto ldv_61739; case 2: ; switch ((int )cmd->logout_response) { case 0: ; case 1: ; case 2: ; case 3: ; default: ; goto ldv_61756; } ldv_61756: ret = 1; goto ldv_61739; default: ; goto ldv_61739; } ldv_61739: ; return (ret); } } static char const __kstrtab_iscsit_logout_post_handler[27U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'l', 'o', 'g', 'o', 'u', 't', '_', 'p', 'o', 's', 't', '_', 'h', 'a', 'n', 'd', 'l', 'e', 'r', '\000'}; struct kernel_symbol const __ksymtab_iscsit_logout_post_handler ; struct kernel_symbol const __ksymtab_iscsit_logout_post_handler = {(unsigned long )(& iscsit_logout_post_handler), (char const *)(& __kstrtab_iscsit_logout_post_handler)}; void iscsit_fail_session(struct iscsi_session *sess ) { struct iscsi_conn *conn ; struct list_head const *__mptr ; struct _ddebug descriptor ; long tmp ; struct list_head const *__mptr___0 ; struct _ddebug descriptor___0 ; long tmp___0 ; { spin_lock_bh(& sess->conn_lock); __mptr = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_61777; ldv_61776: descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_fail_session"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Moving to TARG_CONN_STATE_CLEANUP_WAIT.\n"; descriptor.lineno = 4663U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Moving to TARG_CONN_STATE_CLEANUP_WAIT.\n"); } else { } conn->conn_state = 8U; __mptr___0 = (struct list_head const *)conn->conn_list.next; conn = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_61777: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_61776; } else { } spin_unlock_bh(& sess->conn_lock); descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsit_fail_session"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor___0.format = "Moving to TARG_SESS_STATE_FAILED.\n"; descriptor___0.lineno = 4668U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "Moving to TARG_SESS_STATE_FAILED.\n"); } else { } sess->session_state = 4U; return; } } int iscsit_free_session(struct iscsi_session *sess ) { u16 conn_count ; int tmp ; struct iscsi_conn *conn ; struct iscsi_conn *conn_tmp ; int is_last ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; int tmp___0 ; struct list_head const *__mptr___1 ; int tmp___1 ; { tmp = atomic_read((atomic_t const *)(& sess->nconn)); conn_count = (u16 )tmp; conn_tmp = (struct iscsi_conn *)0; spin_lock_bh(& sess->conn_lock); atomic_set(& sess->sleep_on_sess_wait_comp, 1); __mptr = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; __mptr___0 = (struct list_head const *)conn->conn_list.next; conn_tmp = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; goto ldv_61795; ldv_61794: ; if ((unsigned int )conn_count == 0U) { goto ldv_61793; } else { } tmp___0 = list_is_last((struct list_head const *)(& conn->conn_list), (struct list_head const *)(& sess->sess_conn_list)); if (tmp___0 != 0) { is_last = 1; } else { iscsit_inc_conn_usage_count(conn_tmp); is_last = 0; } iscsit_inc_conn_usage_count(conn); spin_unlock_bh(& sess->conn_lock); iscsit_cause_connection_reinstatement(conn, 1); spin_lock_bh(& sess->conn_lock); iscsit_dec_conn_usage_count(conn); if (is_last == 0) { iscsit_dec_conn_usage_count(conn_tmp); } else { } conn_count = (u16 )((int )conn_count - 1); conn = conn_tmp; __mptr___1 = (struct list_head const *)conn_tmp->conn_list.next; conn_tmp = (struct iscsi_conn *)__mptr___1 + 0xfffffffffffff660UL; ldv_61795: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_61794; } else { } ldv_61793: tmp___1 = atomic_read((atomic_t const *)(& sess->nconn)); if (tmp___1 != 0) { spin_unlock_bh(& sess->conn_lock); wait_for_completion(& sess->session_wait_comp); } else { spin_unlock_bh(& sess->conn_lock); } target_put_session(sess->se_sess); return (0); } } void iscsit_stop_session(struct iscsi_session *sess , int session_sleep , int connection_sleep ) { u16 conn_count ; int tmp ; struct iscsi_conn *conn ; struct iscsi_conn *conn_tmp ; int is_last ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; int tmp___0 ; struct list_head const *__mptr___1 ; struct list_head const *__mptr___2 ; struct list_head const *__mptr___3 ; int tmp___1 ; { tmp = atomic_read((atomic_t const *)(& sess->nconn)); conn_count = (u16 )tmp; conn_tmp = (struct iscsi_conn *)0; spin_lock_bh(& sess->conn_lock); if (session_sleep != 0) { atomic_set(& sess->sleep_on_sess_wait_comp, 1); } else { } if (connection_sleep != 0) { __mptr = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; __mptr___0 = (struct list_head const *)conn->conn_list.next; conn_tmp = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; goto ldv_61813; ldv_61812: ; if ((unsigned int )conn_count == 0U) { goto ldv_61811; } else { } tmp___0 = list_is_last((struct list_head const *)(& conn->conn_list), (struct list_head const *)(& sess->sess_conn_list)); if (tmp___0 != 0) { is_last = 1; } else { iscsit_inc_conn_usage_count(conn_tmp); is_last = 0; } iscsit_inc_conn_usage_count(conn); spin_unlock_bh(& sess->conn_lock); iscsit_cause_connection_reinstatement(conn, 1); spin_lock_bh(& sess->conn_lock); iscsit_dec_conn_usage_count(conn); if (is_last == 0) { iscsit_dec_conn_usage_count(conn_tmp); } else { } conn_count = (u16 )((int )conn_count - 1); conn = conn_tmp; __mptr___1 = (struct list_head const *)conn_tmp->conn_list.next; conn_tmp = (struct iscsi_conn *)__mptr___1 + 0xfffffffffffff660UL; ldv_61813: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_61812; } else { } ldv_61811: ; } else { __mptr___2 = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr___2 + 0xfffffffffffff660UL; goto ldv_61819; ldv_61818: iscsit_cause_connection_reinstatement(conn, 0); __mptr___3 = (struct list_head const *)conn->conn_list.next; conn = (struct iscsi_conn *)__mptr___3 + 0xfffffffffffff660UL; ldv_61819: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_61818; } else { } } if (session_sleep != 0) { tmp___1 = atomic_read((atomic_t const *)(& sess->nconn)); if (tmp___1 != 0) { spin_unlock_bh(& sess->conn_lock); wait_for_completion(& sess->session_wait_comp); } else { spin_unlock_bh(& sess->conn_lock); } } else { spin_unlock_bh(& sess->conn_lock); } return; } } int iscsit_release_sessions_for_tpg(struct iscsi_portal_group *tpg , int force ) { struct iscsi_session *sess ; struct se_portal_group *se_tpg ; struct se_session *se_sess ; struct se_session *se_sess_tmp ; int session_count ; struct list_head const *__mptr ; struct list_head const *__mptr___0 ; int tmp ; int tmp___0 ; struct list_head const *__mptr___1 ; struct _ddebug descriptor ; long tmp___1 ; { se_tpg = & tpg->tpg_se_tpg; session_count = 0; spin_lock_bh(& se_tpg->session_lock); if (tpg->nsessions != 0U && force == 0) { spin_unlock_bh(& se_tpg->session_lock); return (-1); } else { } __mptr = (struct list_head const *)se_tpg->tpg_sess_list.next; se_sess = (struct se_session *)__mptr + 0xffffffffffffffd0UL; __mptr___0 = (struct list_head const *)se_sess->sess_list.next; se_sess_tmp = (struct se_session *)__mptr___0 + 0xffffffffffffffd0UL; goto ldv_61838; ldv_61837: sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; spin_lock(& sess->conn_lock); tmp = atomic_read((atomic_t const *)(& sess->session_fall_back_to_erl0)); if (tmp != 0) { spin_unlock(& sess->conn_lock); goto ldv_61836; } else { tmp___0 = atomic_read((atomic_t const *)(& sess->session_logout)); if (tmp___0 != 0) { spin_unlock(& sess->conn_lock); goto ldv_61836; } else if (((unsigned int )sess->time2retain_timer_flags & 4U) != 0U) { spin_unlock(& sess->conn_lock); goto ldv_61836; } else { } } atomic_set(& sess->session_reinstatement, 1); spin_unlock(& sess->conn_lock); spin_unlock_bh(& se_tpg->session_lock); iscsit_free_session(sess); spin_lock_bh(& se_tpg->session_lock); session_count = session_count + 1; ldv_61836: se_sess = se_sess_tmp; __mptr___1 = (struct list_head const *)se_sess_tmp->sess_list.next; se_sess_tmp = (struct se_session *)__mptr___1 + 0xffffffffffffffd0UL; ldv_61838: ; if ((unsigned long )(& se_sess->sess_list) != (unsigned long )(& se_tpg->tpg_sess_list)) { goto ldv_61837; } else { } spin_unlock_bh(& se_tpg->session_lock); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_release_sessions_for_tpg"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target.c"; descriptor.format = "Released %d iSCSI Session(s) from Target Portal Group: %hu\n"; descriptor.lineno = 4799U; descriptor.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor, "Released %d iSCSI Session(s) from Target Portal Group: %hu\n", session_count, (int )tpg->tpgt); } else { } return (0); } } int ldv_retval_0 ; extern void ldv_initialize(void) ; void ldv_check_final_state(void) ; void ldv_initialize_iscsit_transport_139(void) { void *tmp ; void *tmp___0 ; void *tmp___1 ; void *tmp___2 ; { tmp = ldv_init_zalloc(2496UL); iscsi_target_transport_group0 = (struct iscsi_conn *)tmp; tmp___0 = ldv_init_zalloc(576UL); iscsi_target_transport_group1 = (struct iscsi_np *)tmp___0; tmp___1 = ldv_init_zalloc(192UL); iscsi_target_transport_group2 = (struct iscsi_login *)tmp___1; tmp___2 = ldv_init_zalloc(1920UL); iscsi_target_transport_group3 = (struct iscsi_cmd *)tmp___2; return; } } void ldv_main_exported_33(void) ; void ldv_main_exported_32(void) ; void ldv_main_exported_21(void) ; void ldv_main_exported_26(void) ; void ldv_main_exported_17(void) ; void ldv_main_exported_18(void) ; void ldv_main_exported_30(void) ; void ldv_main_exported_16(void) ; void ldv_main_exported_44(void) ; void ldv_main_exported_55(void) ; void ldv_main_exported_27(void) ; void ldv_main_exported_25(void) ; void ldv_main_exported_28(void) ; void ldv_main_exported_57(void) ; void ldv_main_exported_40(void) ; void ldv_main_exported_61(void) ; void ldv_main_exported_14(void) ; void ldv_main_exported_20(void) ; void ldv_main_exported_59(void) ; void ldv_main_exported_49(void) ; void ldv_main_exported_24(void) ; void ldv_main_exported_10(void) ; void ldv_main_exported_31(void) ; void ldv_main_exported_35(void) ; void ldv_main_exported_11(void) ; void ldv_main_exported_53(void) ; void ldv_main_exported_48(void) ; void ldv_main_exported_42(void) ; void ldv_main_exported_22(void) ; void ldv_main_exported_46(void) ; void ldv_main_exported_13(void) ; void ldv_main_exported_23(void) ; void ldv_main_exported_29(void) ; void ldv_main_exported_50(void) ; void ldv_main_exported_39(void) ; void ldv_main_exported_36(void) ; void ldv_main_exported_51(void) ; void ldv_main_exported_58(void) ; void ldv_main_exported_12(void) ; void ldv_main_exported_41(void) ; void ldv_main_exported_47(void) ; void ldv_main_exported_15(void) ; void ldv_main_exported_52(void) ; void ldv_main_exported_38(void) ; void ldv_main_exported_60(void) ; void ldv_main_exported_34(void) ; void ldv_main_exported_56(void) ; void ldv_main_exported_45(void) ; void ldv_main_exported_37(void) ; void ldv_main_exported_43(void) ; void ldv_main_exported_19(void) ; void ldv_main_exported_54(void) ; void ldv_main_exported_127(void) ; void ldv_main_exported_90(void) ; void ldv_main_exported_63(void) ; void ldv_main_exported_118(void) ; void ldv_main_exported_71(void) ; void ldv_main_exported_102(void) ; void ldv_main_exported_80(void) ; void ldv_main_exported_119(void) ; void ldv_main_exported_99(void) ; void ldv_main_exported_72(void) ; void ldv_main_exported_125(void) ; void ldv_main_exported_84(void) ; void ldv_main_exported_74(void) ; void ldv_main_exported_95(void) ; void ldv_main_exported_108(void) ; void ldv_main_exported_115(void) ; void ldv_main_exported_109(void) ; void ldv_main_exported_92(void) ; void ldv_main_exported_103(void) ; void ldv_main_exported_89(void) ; void ldv_main_exported_113(void) ; void ldv_main_exported_91(void) ; void ldv_main_exported_78(void) ; void ldv_main_exported_107(void) ; void ldv_main_exported_87(void) ; void ldv_main_exported_77(void) ; void ldv_main_exported_93(void) ; void ldv_main_exported_106(void) ; void ldv_main_exported_133(void) ; void ldv_main_exported_65(void) ; void ldv_main_exported_123(void) ; void ldv_main_exported_64(void) ; void ldv_main_exported_138(void) ; void ldv_main_exported_97(void) ; void ldv_main_exported_114(void) ; void ldv_main_exported_137(void) ; void ldv_main_exported_81(void) ; void ldv_main_exported_101(void) ; void ldv_main_exported_73(void) ; void ldv_main_exported_66(void) ; void ldv_main_exported_76(void) ; void ldv_main_exported_86(void) ; void ldv_main_exported_62(void) ; void ldv_main_exported_67(void) ; void ldv_main_exported_70(void) ; void ldv_main_exported_129(void) ; void ldv_main_exported_68(void) ; void ldv_main_exported_136(void) ; void ldv_main_exported_88(void) ; void ldv_main_exported_116(void) ; void ldv_main_exported_100(void) ; void ldv_main_exported_82(void) ; void ldv_main_exported_110(void) ; void ldv_main_exported_128(void) ; void ldv_main_exported_120(void) ; void ldv_main_exported_134(void) ; void ldv_main_exported_75(void) ; void ldv_main_exported_83(void) ; void ldv_main_exported_135(void) ; void ldv_main_exported_69(void) ; void ldv_main_exported_112(void) ; void ldv_main_exported_104(void) ; void ldv_main_exported_124(void) ; void ldv_main_exported_131(void) ; void ldv_main_exported_130(void) ; void ldv_main_exported_122(void) ; void ldv_main_exported_79(void) ; void ldv_main_exported_121(void) ; void ldv_main_exported_96(void) ; void ldv_main_exported_105(void) ; void ldv_main_exported_126(void) ; void ldv_main_exported_85(void) ; void ldv_main_exported_94(void) ; void ldv_main_exported_111(void) ; void ldv_main_exported_98(void) ; void ldv_main_exported_132(void) ; void ldv_main_exported_117(void) ; int main(void) { int ldvarg108 ; u32 ldvarg106 ; bool ldvarg105 ; int ldvarg107 ; struct __kernel_sockaddr_storage *ldvarg109 ; void *tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; { tmp = ldv_init_zalloc(128UL); ldvarg109 = (struct __kernel_sockaddr_storage *)tmp; ldv_initialize(); ldv_memset((void *)(& ldvarg108), 0, 4UL); ldv_memset((void *)(& ldvarg106), 0, 4UL); ldv_memset((void *)(& ldvarg105), 0, 1UL); ldv_memset((void *)(& ldvarg107), 0, 4UL); ldv_state_variable_127 = 0; ldv_state_variable_32 = 0; ldv_state_variable_90 = 0; ldv_state_variable_118 = 0; ldv_state_variable_71 = 0; ldv_state_variable_102 = 0; ldv_state_variable_18 = 0; ldv_state_variable_125 = 0; ldv_state_variable_16 = 0; ldv_state_variable_44 = 0; ldv_state_variable_55 = 0; ldv_state_variable_84 = 0; ldv_state_variable_27 = 0; ldv_state_variable_95 = 0; ldv_state_variable_57 = 0; ldv_state_variable_20 = 0; ldv_state_variable_109 = 0; ldv_state_variable_89 = 0; ldv_state_variable_31 = 0; ldv_state_variable_35 = 0; ldv_state_variable_11 = 0; ldv_state_variable_78 = 0; ldv_state_variable_93 = 0; ldv_state_variable_106 = 0; ldv_state_variable_65 = 0; ldv_state_variable_29 = 0; ldv_state_variable_138 = 0; ldv_state_variable_114 = 0; ldv_state_variable_58 = 0; ldv_state_variable_15 = 0; ldv_state_variable_137 = 0; ldv_state_variable_81 = 0; ldv_state_variable_60 = 0; ldv_state_variable_101 = 0; ldv_state_variable_73 = 0; ldv_state_variable_86 = 0; ldv_state_variable_76 = 0; ldv_state_variable_62 = 0; ldv_state_variable_67 = 0; ldv_state_variable_139 = 0; ldv_state_variable_129 = 0; work_init_2(); ldv_state_variable_2 = 1; ldv_state_variable_17 = 0; ldv_state_variable_110 = 0; ldv_state_variable_82 = 0; ldv_state_variable_135 = 0; ldv_state_variable_14 = 0; ldv_state_variable_112 = 0; ldv_state_variable_69 = 0; ldv_state_variable_49 = 0; ldv_state_variable_24 = 0; ldv_state_variable_124 = 0; ldv_state_variable_104 = 0; ldv_state_variable_131 = 0; ldv_state_variable_121 = 0; ldv_state_variable_79 = 0; ref_cnt = 0; ldv_state_variable_0 = 1; ldv_state_variable_23 = 0; ldv_state_variable_96 = 0; ldv_state_variable_126 = 0; ldv_state_variable_47 = 0; ldv_state_variable_8 = 1; ldv_state_variable_98 = 0; ldv_state_variable_37 = 0; ldv_state_variable_117 = 0; ldv_state_variable_43 = 0; ldv_state_variable_5 = 1; ldv_state_variable_33 = 0; ldv_state_variable_21 = 0; ldv_state_variable_63 = 0; ldv_state_variable_7 = 1; ldv_state_variable_26 = 0; ldv_state_variable_80 = 0; ldv_state_variable_119 = 0; ldv_state_variable_99 = 0; ldv_state_variable_72 = 0; ldv_state_variable_74 = 0; ldv_state_variable_61 = 0; ldv_state_variable_108 = 0; ldv_state_variable_115 = 0; ldv_state_variable_92 = 0; ldv_state_variable_103 = 0; ldv_state_variable_10 = 0; ldv_state_variable_113 = 0; ldv_state_variable_91 = 0; ldv_state_variable_48 = 0; ldv_state_variable_107 = 0; ldv_state_variable_87 = 0; ldv_state_variable_77 = 0; ldv_state_variable_133 = 0; ldv_state_variable_123 = 0; ldv_state_variable_50 = 0; ldv_state_variable_39 = 0; ldv_state_variable_64 = 0; ldv_state_variable_97 = 0; ldv_state_variable_12 = 0; ldv_state_variable_41 = 0; ldv_state_variable_52 = 0; ldv_state_variable_56 = 0; ldv_state_variable_45 = 0; ldv_state_variable_66 = 0; ldv_state_variable_19 = 0; ldv_state_variable_54 = 0; ldv_state_variable_70 = 0; ldv_state_variable_68 = 0; work_init_1(); ldv_state_variable_1 = 1; ldv_state_variable_136 = 0; ldv_state_variable_88 = 0; ldv_state_variable_116 = 0; ldv_state_variable_30 = 0; ldv_state_variable_100 = 0; ldv_state_variable_25 = 0; ldv_state_variable_128 = 0; ldv_state_variable_28 = 0; ldv_state_variable_120 = 0; ldv_state_variable_134 = 0; ldv_state_variable_40 = 0; ldv_state_variable_75 = 0; ldv_state_variable_83 = 0; ldv_state_variable_59 = 0; ldv_state_variable_130 = 0; ldv_state_variable_53 = 0; ldv_state_variable_122 = 0; ldv_state_variable_42 = 0; ldv_state_variable_22 = 0; ldv_state_variable_46 = 0; ldv_state_variable_13 = 0; ldv_state_variable_105 = 0; ldv_state_variable_6 = 1; ldv_state_variable_85 = 0; ldv_state_variable_36 = 0; ldv_state_variable_3 = 1; ldv_state_variable_94 = 0; ldv_state_variable_51 = 0; ldv_state_variable_9 = 1; ldv_state_variable_111 = 0; ldv_state_variable_38 = 0; ldv_state_variable_4 = 1; ldv_state_variable_34 = 0; ldv_state_variable_132 = 0; ldv_62297: tmp___0 = __VERIFIER_nondet_int(); switch (tmp___0) { case 0: ; if (ldv_state_variable_127 != 0) { ldv_main_exported_127(); } else { } goto ldv_62137; case 1: ; if (ldv_state_variable_32 != 0) { ldv_main_exported_32(); } else { } goto ldv_62137; case 2: ; if (ldv_state_variable_90 != 0) { ldv_main_exported_90(); } else { } goto ldv_62137; case 3: ; if (ldv_state_variable_118 != 0) { ldv_main_exported_118(); } else { } goto ldv_62137; case 4: ; if (ldv_state_variable_71 != 0) { ldv_main_exported_71(); } else { } goto ldv_62137; case 5: ; if (ldv_state_variable_102 != 0) { ldv_main_exported_102(); } else { } goto ldv_62137; case 6: ; if (ldv_state_variable_18 != 0) { ldv_main_exported_18(); } else { } goto ldv_62137; case 7: ; if (ldv_state_variable_125 != 0) { ldv_main_exported_125(); } else { } goto ldv_62137; case 8: ; if (ldv_state_variable_16 != 0) { ldv_main_exported_16(); } else { } goto ldv_62137; case 9: ; if (ldv_state_variable_44 != 0) { ldv_main_exported_44(); } else { } goto ldv_62137; case 10: ; if (ldv_state_variable_55 != 0) { ldv_main_exported_55(); } else { } goto ldv_62137; case 11: ; if (ldv_state_variable_84 != 0) { ldv_main_exported_84(); } else { } goto ldv_62137; case 12: ; if (ldv_state_variable_27 != 0) { ldv_main_exported_27(); } else { } goto ldv_62137; case 13: ; if (ldv_state_variable_95 != 0) { ldv_main_exported_95(); } else { } goto ldv_62137; case 14: ; if (ldv_state_variable_57 != 0) { ldv_main_exported_57(); } else { } goto ldv_62137; case 15: ; if (ldv_state_variable_20 != 0) { ldv_main_exported_20(); } else { } goto ldv_62137; case 16: ; if (ldv_state_variable_109 != 0) { ldv_main_exported_109(); } else { } goto ldv_62137; case 17: ; if (ldv_state_variable_89 != 0) { ldv_main_exported_89(); } else { } goto ldv_62137; case 18: ; if (ldv_state_variable_31 != 0) { ldv_main_exported_31(); } else { } goto ldv_62137; case 19: ; if (ldv_state_variable_35 != 0) { ldv_main_exported_35(); } else { } goto ldv_62137; case 20: ; if (ldv_state_variable_11 != 0) { ldv_main_exported_11(); } else { } goto ldv_62137; case 21: ; if (ldv_state_variable_78 != 0) { ldv_main_exported_78(); } else { } goto ldv_62137; case 22: ; if (ldv_state_variable_93 != 0) { ldv_main_exported_93(); } else { } goto ldv_62137; case 23: ; if (ldv_state_variable_106 != 0) { ldv_main_exported_106(); } else { } goto ldv_62137; case 24: ; if (ldv_state_variable_65 != 0) { ldv_main_exported_65(); } else { } goto ldv_62137; case 25: ; if (ldv_state_variable_29 != 0) { ldv_main_exported_29(); } else { } goto ldv_62137; case 26: ; if (ldv_state_variable_138 != 0) { ldv_main_exported_138(); } else { } goto ldv_62137; case 27: ; if (ldv_state_variable_114 != 0) { ldv_main_exported_114(); } else { } goto ldv_62137; case 28: ; if (ldv_state_variable_58 != 0) { ldv_main_exported_58(); } else { } goto ldv_62137; case 29: ; if (ldv_state_variable_15 != 0) { ldv_main_exported_15(); } else { } goto ldv_62137; case 30: ; if (ldv_state_variable_137 != 0) { ldv_main_exported_137(); } else { } goto ldv_62137; case 31: ; if (ldv_state_variable_81 != 0) { ldv_main_exported_81(); } else { } goto ldv_62137; case 32: ; if (ldv_state_variable_60 != 0) { ldv_main_exported_60(); } else { } goto ldv_62137; case 33: ; if (ldv_state_variable_101 != 0) { ldv_main_exported_101(); } else { } goto ldv_62137; case 34: ; if (ldv_state_variable_73 != 0) { ldv_main_exported_73(); } else { } goto ldv_62137; case 35: ; if (ldv_state_variable_86 != 0) { ldv_main_exported_86(); } else { } goto ldv_62137; case 36: ; if (ldv_state_variable_76 != 0) { ldv_main_exported_76(); } else { } goto ldv_62137; case 37: ; if (ldv_state_variable_62 != 0) { ldv_main_exported_62(); } else { } goto ldv_62137; case 38: ; if (ldv_state_variable_67 != 0) { ldv_main_exported_67(); } else { } goto ldv_62137; case 39: ; if (ldv_state_variable_139 != 0) { tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_139 == 1) { iscsit_setup_np(iscsi_target_transport_group1, ldvarg109); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 1: ; if (ldv_state_variable_139 == 1) { iscsit_response_queue(iscsi_target_transport_group0, iscsi_target_transport_group3, ldvarg108); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 2: ; if (ldv_state_variable_139 == 1) { iscsit_get_login_rx(iscsi_target_transport_group0, iscsi_target_transport_group2); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 3: ; if (ldv_state_variable_139 == 1) { iscsit_immediate_queue(iscsi_target_transport_group0, iscsi_target_transport_group3, ldvarg107); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 4: ; if (ldv_state_variable_139 == 1) { iscsit_put_login_tx(iscsi_target_transport_group0, iscsi_target_transport_group2, ldvarg106); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 5: ; if (ldv_state_variable_139 == 1) { iscsit_accept_np(iscsi_target_transport_group1, iscsi_target_transport_group0); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 6: ; if (ldv_state_variable_139 == 1) { iscsit_free_np(iscsi_target_transport_group1); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 7: ; if (ldv_state_variable_139 == 1) { iscsit_aborted_task(iscsi_target_transport_group0, iscsi_target_transport_group3); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 8: ; if (ldv_state_variable_139 == 1) { iscsit_queue_rsp(iscsi_target_transport_group0, iscsi_target_transport_group3); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 9: ; if (ldv_state_variable_139 == 1) { iscsit_build_r2ts_for_cmd(iscsi_target_transport_group0, iscsi_target_transport_group3, (int )ldvarg105); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 10: ; if (ldv_state_variable_139 == 1) { iscsit_get_sup_prot_ops(iscsi_target_transport_group0); ldv_state_variable_139 = 1; } else { } goto ldv_62178; case 11: ; if (ldv_state_variable_139 == 1) { iscsit_queue_rsp(iscsi_target_transport_group0, iscsi_target_transport_group3); ldv_state_variable_139 = 1; } else { } goto ldv_62178; default: ldv_stop(); } ldv_62178: ; } else { } goto ldv_62137; case 40: ; if (ldv_state_variable_129 != 0) { ldv_main_exported_129(); } else { } goto ldv_62137; case 41: ; goto ldv_62137; case 42: ; if (ldv_state_variable_17 != 0) { ldv_main_exported_17(); } else { } goto ldv_62137; case 43: ; if (ldv_state_variable_110 != 0) { ldv_main_exported_110(); } else { } goto ldv_62137; case 44: ; if (ldv_state_variable_82 != 0) { ldv_main_exported_82(); } else { } goto ldv_62137; case 45: ; if (ldv_state_variable_135 != 0) { ldv_main_exported_135(); } else { } goto ldv_62137; case 46: ; if (ldv_state_variable_14 != 0) { ldv_main_exported_14(); } else { } goto ldv_62137; case 47: ; if (ldv_state_variable_112 != 0) { ldv_main_exported_112(); } else { } goto ldv_62137; case 48: ; if (ldv_state_variable_69 != 0) { ldv_main_exported_69(); } else { } goto ldv_62137; case 49: ; if (ldv_state_variable_49 != 0) { ldv_main_exported_49(); } else { } goto ldv_62137; case 50: ; if (ldv_state_variable_24 != 0) { ldv_main_exported_24(); } else { } goto ldv_62137; case 51: ; if (ldv_state_variable_124 != 0) { ldv_main_exported_124(); } else { } goto ldv_62137; case 52: ; if (ldv_state_variable_104 != 0) { ldv_main_exported_104(); } else { } goto ldv_62137; case 53: ; if (ldv_state_variable_131 != 0) { ldv_main_exported_131(); } else { } goto ldv_62137; case 54: ; if (ldv_state_variable_121 != 0) { ldv_main_exported_121(); } else { } goto ldv_62137; case 55: ; if (ldv_state_variable_79 != 0) { ldv_main_exported_79(); } else { } goto ldv_62137; case 56: ; if (ldv_state_variable_0 != 0) { tmp___2 = __VERIFIER_nondet_int(); switch (tmp___2) { case 0: ; if (ldv_state_variable_0 == 3 && ref_cnt == 0) { iscsi_target_cleanup_module(); ldv_state_variable_0 = 2; goto ldv_final; } else { } goto ldv_62210; case 1: ; if (ldv_state_variable_0 == 1) { ldv_retval_0 = iscsi_target_init_module(); if (ldv_retval_0 == 0) { ldv_state_variable_0 = 3; ldv_state_variable_132 = 1; ldv_initialize_target_fabric_nacl_attrib_attribute_132(); ldv_state_variable_34 = 1; ldv_initialize_configfs_item_operations_34(); ldv_state_variable_38 = 1; ldv_state_variable_111 = 1; ldv_initialize_target_fabric_nacl_base_attribute_111(); ldv_state_variable_51 = 1; ldv_state_variable_94 = 1; ldv_initialize_target_fabric_tpg_auth_attribute_94(); ldv_state_variable_36 = 1; ldv_state_variable_85 = 1; ldv_initialize_target_fabric_tpg_param_attribute_85(); ldv_state_variable_105 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_105(); ldv_state_variable_13 = 1; ldv_state_variable_46 = 1; ldv_state_variable_22 = 1; ldv_state_variable_42 = 1; ldv_state_variable_122 = 1; ldv_state_variable_53 = 1; ldv_state_variable_130 = 1; ldv_initialize_target_fabric_nacl_attrib_attribute_130(); ldv_state_variable_59 = 1; ldv_state_variable_134 = 1; ldv_initialize_target_fabric_nacl_attrib_attribute_134(); ldv_state_variable_83 = 1; ldv_initialize_target_fabric_tpg_param_attribute_83(); ldv_state_variable_75 = 1; ldv_initialize_target_fabric_tpg_param_attribute_75(); ldv_state_variable_40 = 1; ldv_state_variable_120 = 1; ldv_state_variable_28 = 1; ldv_state_variable_128 = 1; ldv_initialize_target_fabric_nacl_auth_attribute_128(); ldv_state_variable_25 = 1; ldv_initialize_configfs_item_operations_25(); ldv_state_variable_100 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_100(); ldv_state_variable_30 = 1; ldv_state_variable_136 = 1; ldv_initialize_target_fabric_nacl_attrib_attribute_136(); ldv_state_variable_116 = 1; ldv_state_variable_88 = 1; ldv_initialize_target_fabric_tpg_param_attribute_88(); ldv_state_variable_68 = 1; ldv_initialize_target_fabric_discovery_attribute_68(); ldv_state_variable_70 = 1; ldv_state_variable_54 = 1; ldv_state_variable_19 = 1; ldv_state_variable_66 = 1; ldv_state_variable_45 = 1; ldv_state_variable_56 = 1; ldv_state_variable_52 = 1; ldv_state_variable_12 = 1; ldv_state_variable_41 = 1; ldv_state_variable_97 = 1; ldv_initialize_target_fabric_tpg_auth_attribute_97(); ldv_state_variable_64 = 1; ldv_initialize_target_fabric_discovery_attribute_64(); ldv_state_variable_39 = 1; ldv_state_variable_50 = 1; ldv_state_variable_123 = 1; ldv_state_variable_133 = 1; ldv_initialize_target_fabric_nacl_attrib_attribute_133(); ldv_state_variable_77 = 1; ldv_initialize_target_fabric_tpg_param_attribute_77(); ldv_state_variable_87 = 1; ldv_initialize_target_fabric_tpg_param_attribute_87(); ldv_state_variable_107 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_107(); ldv_state_variable_48 = 1; ldv_initialize_configfs_item_operations_48(); ldv_state_variable_91 = 1; ldv_initialize_target_fabric_tpg_param_attribute_91(); ldv_state_variable_113 = 1; ldv_state_variable_10 = 1; ldv_initialize_configfs_item_operations_10(); ldv_state_variable_103 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_103(); ldv_state_variable_92 = 1; ldv_initialize_target_fabric_tpg_param_attribute_92(); ldv_state_variable_115 = 1; ldv_state_variable_108 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_108(); ldv_state_variable_61 = 1; ldv_state_variable_74 = 1; ldv_initialize_target_fabric_tpg_param_attribute_74(); ldv_state_variable_72 = 1; ldv_initialize_target_fabric_tpg_param_attribute_72(); ldv_state_variable_99 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_99(); ldv_state_variable_119 = 1; ldv_state_variable_80 = 1; ldv_initialize_target_fabric_tpg_param_attribute_80(); ldv_state_variable_26 = 1; ldv_state_variable_63 = 1; ldv_initialize_target_fabric_discovery_attribute_63(); ldv_state_variable_21 = 1; ldv_state_variable_33 = 1; ldv_state_variable_43 = 1; ldv_initialize_configfs_item_operations_43(); ldv_state_variable_117 = 1; ldv_state_variable_37 = 1; ldv_state_variable_98 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_98(); ldv_state_variable_47 = 1; ldv_state_variable_126 = 1; ldv_state_variable_96 = 1; ldv_initialize_target_fabric_tpg_auth_attribute_96(); ldv_state_variable_23 = 1; ldv_state_variable_79 = 1; ldv_initialize_target_fabric_tpg_param_attribute_79(); ldv_state_variable_121 = 1; ldv_state_variable_131 = 1; ldv_initialize_target_fabric_nacl_attrib_attribute_131(); ldv_state_variable_104 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_104(); ldv_state_variable_124 = 1; ldv_initialize_target_fabric_nacl_auth_attribute_124(); ldv_state_variable_24 = 1; ldv_state_variable_49 = 1; ldv_state_variable_69 = 1; ldv_state_variable_112 = 1; ldv_state_variable_14 = 1; ldv_state_variable_135 = 1; ldv_initialize_target_fabric_nacl_attrib_attribute_135(); ldv_state_variable_82 = 1; ldv_initialize_target_fabric_tpg_param_attribute_82(); ldv_state_variable_110 = 1; ldv_initialize_target_fabric_nacl_base_attribute_110(); ldv_state_variable_17 = 1; ldv_state_variable_129 = 1; ldv_initialize_target_fabric_nacl_attrib_attribute_129(); ldv_state_variable_139 = 1; ldv_initialize_iscsit_transport_139(); ldv_state_variable_67 = 1; ldv_initialize_target_fabric_discovery_attribute_67(); ldv_state_variable_62 = 1; ldv_initialize_target_core_fabric_ops_62(); ldv_state_variable_76 = 1; ldv_initialize_target_fabric_tpg_param_attribute_76(); ldv_state_variable_86 = 1; ldv_initialize_target_fabric_tpg_param_attribute_86(); ldv_state_variable_73 = 1; ldv_initialize_target_fabric_tpg_param_attribute_73(); ldv_state_variable_101 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_101(); ldv_state_variable_60 = 1; ldv_state_variable_81 = 1; ldv_initialize_target_fabric_tpg_param_attribute_81(); ldv_state_variable_137 = 1; ldv_initialize_target_fabric_np_base_attribute_137(); ldv_state_variable_15 = 1; ldv_state_variable_58 = 1; ldv_state_variable_114 = 1; ldv_state_variable_138 = 1; ldv_initialize_target_fabric_np_base_attribute_138(); ldv_state_variable_29 = 1; ldv_state_variable_65 = 1; ldv_initialize_target_fabric_discovery_attribute_65(); ldv_state_variable_106 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_106(); ldv_state_variable_93 = 1; ldv_initialize_target_fabric_tpg_auth_attribute_93(); ldv_state_variable_78 = 1; ldv_initialize_target_fabric_tpg_param_attribute_78(); ldv_state_variable_11 = 1; ldv_state_variable_35 = 1; ldv_state_variable_31 = 1; ldv_state_variable_89 = 1; ldv_initialize_target_fabric_tpg_param_attribute_89(); ldv_state_variable_109 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_109(); ldv_state_variable_20 = 1; ldv_initialize_configfs_item_operations_20(); ldv_state_variable_57 = 1; ldv_state_variable_95 = 1; ldv_state_variable_27 = 1; ldv_state_variable_84 = 1; ldv_initialize_target_fabric_tpg_param_attribute_84(); ldv_state_variable_55 = 1; ldv_state_variable_44 = 1; ldv_state_variable_16 = 1; ldv_state_variable_125 = 1; ldv_initialize_target_fabric_nacl_auth_attribute_125(); ldv_state_variable_18 = 1; ldv_state_variable_102 = 1; ldv_initialize_target_fabric_tpg_attrib_attribute_102(); ldv_state_variable_71 = 1; ldv_initialize_target_fabric_tpg_attribute_71(); ldv_state_variable_118 = 1; ldv_state_variable_90 = 1; ldv_initialize_target_fabric_tpg_param_attribute_90(); ldv_state_variable_32 = 1; ldv_state_variable_127 = 1; ldv_initialize_target_fabric_nacl_auth_attribute_127(); } else { } if (ldv_retval_0 != 0) { ldv_state_variable_0 = 2; goto ldv_final; } else { } } else { } goto ldv_62210; default: ldv_stop(); } ldv_62210: ; } else { } goto ldv_62137; case 57: ; if (ldv_state_variable_23 != 0) { ldv_main_exported_23(); } else { } goto ldv_62137; case 58: ; if (ldv_state_variable_96 != 0) { ldv_main_exported_96(); } else { } goto ldv_62137; case 59: ; if (ldv_state_variable_126 != 0) { ldv_main_exported_126(); } else { } goto ldv_62137; case 60: ; if (ldv_state_variable_47 != 0) { ldv_main_exported_47(); } else { } goto ldv_62137; case 61: ; goto ldv_62137; case 62: ; if (ldv_state_variable_98 != 0) { ldv_main_exported_98(); } else { } goto ldv_62137; case 63: ; if (ldv_state_variable_37 != 0) { ldv_main_exported_37(); } else { } goto ldv_62137; case 64: ; if (ldv_state_variable_117 != 0) { ldv_main_exported_117(); } else { } goto ldv_62137; case 65: ; if (ldv_state_variable_43 != 0) { ldv_main_exported_43(); } else { } goto ldv_62137; case 66: ; goto ldv_62137; case 67: ; if (ldv_state_variable_33 != 0) { ldv_main_exported_33(); } else { } goto ldv_62137; case 68: ; if (ldv_state_variable_21 != 0) { ldv_main_exported_21(); } else { } goto ldv_62137; case 69: ; if (ldv_state_variable_63 != 0) { ldv_main_exported_63(); } else { } goto ldv_62137; case 70: ; goto ldv_62137; case 71: ; if (ldv_state_variable_26 != 0) { ldv_main_exported_26(); } else { } goto ldv_62137; case 72: ; if (ldv_state_variable_80 != 0) { ldv_main_exported_80(); } else { } goto ldv_62137; case 73: ; if (ldv_state_variable_119 != 0) { ldv_main_exported_119(); } else { } goto ldv_62137; case 74: ; if (ldv_state_variable_99 != 0) { ldv_main_exported_99(); } else { } goto ldv_62137; case 75: ; if (ldv_state_variable_72 != 0) { ldv_main_exported_72(); } else { } goto ldv_62137; case 76: ; if (ldv_state_variable_74 != 0) { ldv_main_exported_74(); } else { } goto ldv_62137; case 77: ; if (ldv_state_variable_61 != 0) { ldv_main_exported_61(); } else { } goto ldv_62137; case 78: ; if (ldv_state_variable_108 != 0) { ldv_main_exported_108(); } else { } goto ldv_62137; case 79: ; if (ldv_state_variable_115 != 0) { ldv_main_exported_115(); } else { } goto ldv_62137; case 80: ; if (ldv_state_variable_92 != 0) { ldv_main_exported_92(); } else { } goto ldv_62137; case 81: ; if (ldv_state_variable_103 != 0) { ldv_main_exported_103(); } else { } goto ldv_62137; case 82: ; if (ldv_state_variable_10 != 0) { ldv_main_exported_10(); } else { } goto ldv_62137; case 83: ; if (ldv_state_variable_113 != 0) { ldv_main_exported_113(); } else { } goto ldv_62137; case 84: ; if (ldv_state_variable_91 != 0) { ldv_main_exported_91(); } else { } goto ldv_62137; case 85: ; if (ldv_state_variable_48 != 0) { ldv_main_exported_48(); } else { } goto ldv_62137; case 86: ; if (ldv_state_variable_107 != 0) { ldv_main_exported_107(); } else { } goto ldv_62137; case 87: ; if (ldv_state_variable_87 != 0) { ldv_main_exported_87(); } else { } goto ldv_62137; case 88: ; if (ldv_state_variable_77 != 0) { ldv_main_exported_77(); } else { } goto ldv_62137; case 89: ; if (ldv_state_variable_133 != 0) { ldv_main_exported_133(); } else { } goto ldv_62137; case 90: ; if (ldv_state_variable_123 != 0) { ldv_main_exported_123(); } else { } goto ldv_62137; case 91: ; if (ldv_state_variable_50 != 0) { ldv_main_exported_50(); } else { } goto ldv_62137; case 92: ; if (ldv_state_variable_39 != 0) { ldv_main_exported_39(); } else { } goto ldv_62137; case 93: ; if (ldv_state_variable_64 != 0) { ldv_main_exported_64(); } else { } goto ldv_62137; case 94: ; if (ldv_state_variable_97 != 0) { ldv_main_exported_97(); } else { } goto ldv_62137; case 95: ; if (ldv_state_variable_12 != 0) { ldv_main_exported_12(); } else { } goto ldv_62137; case 96: ; if (ldv_state_variable_41 != 0) { ldv_main_exported_41(); } else { } goto ldv_62137; case 97: ; if (ldv_state_variable_52 != 0) { ldv_main_exported_52(); } else { } goto ldv_62137; case 98: ; if (ldv_state_variable_56 != 0) { ldv_main_exported_56(); } else { } goto ldv_62137; case 99: ; if (ldv_state_variable_45 != 0) { ldv_main_exported_45(); } else { } goto ldv_62137; case 100: ; if (ldv_state_variable_66 != 0) { ldv_main_exported_66(); } else { } goto ldv_62137; case 101: ; if (ldv_state_variable_19 != 0) { ldv_main_exported_19(); } else { } goto ldv_62137; case 102: ; if (ldv_state_variable_54 != 0) { ldv_main_exported_54(); } else { } goto ldv_62137; case 103: ; if (ldv_state_variable_70 != 0) { ldv_main_exported_70(); } else { } goto ldv_62137; case 104: ; if (ldv_state_variable_68 != 0) { ldv_main_exported_68(); } else { } goto ldv_62137; case 105: ; goto ldv_62137; case 106: ; if (ldv_state_variable_136 != 0) { ldv_main_exported_136(); } else { } goto ldv_62137; case 107: ; if (ldv_state_variable_88 != 0) { ldv_main_exported_88(); } else { } goto ldv_62137; case 108: ; if (ldv_state_variable_116 != 0) { ldv_main_exported_116(); } else { } goto ldv_62137; case 109: ; if (ldv_state_variable_30 != 0) { ldv_main_exported_30(); } else { } goto ldv_62137; case 110: ; if (ldv_state_variable_100 != 0) { ldv_main_exported_100(); } else { } goto ldv_62137; case 111: ; if (ldv_state_variable_25 != 0) { ldv_main_exported_25(); } else { } goto ldv_62137; case 112: ; if (ldv_state_variable_128 != 0) { ldv_main_exported_128(); } else { } goto ldv_62137; case 113: ; if (ldv_state_variable_28 != 0) { ldv_main_exported_28(); } else { } goto ldv_62137; case 114: ; if (ldv_state_variable_120 != 0) { ldv_main_exported_120(); } else { } goto ldv_62137; case 115: ; if (ldv_state_variable_134 != 0) { ldv_main_exported_134(); } else { } goto ldv_62137; case 116: ; if (ldv_state_variable_40 != 0) { ldv_main_exported_40(); } else { } goto ldv_62137; case 117: ; if (ldv_state_variable_75 != 0) { ldv_main_exported_75(); } else { } goto ldv_62137; case 118: ; if (ldv_state_variable_83 != 0) { ldv_main_exported_83(); } else { } goto ldv_62137; case 119: ; if (ldv_state_variable_59 != 0) { ldv_main_exported_59(); } else { } goto ldv_62137; case 120: ; if (ldv_state_variable_130 != 0) { ldv_main_exported_130(); } else { } goto ldv_62137; case 121: ; if (ldv_state_variable_53 != 0) { ldv_main_exported_53(); } else { } goto ldv_62137; case 122: ; if (ldv_state_variable_122 != 0) { ldv_main_exported_122(); } else { } goto ldv_62137; case 123: ; if (ldv_state_variable_42 != 0) { ldv_main_exported_42(); } else { } goto ldv_62137; case 124: ; if (ldv_state_variable_22 != 0) { ldv_main_exported_22(); } else { } goto ldv_62137; case 125: ; if (ldv_state_variable_46 != 0) { ldv_main_exported_46(); } else { } goto ldv_62137; case 126: ; if (ldv_state_variable_13 != 0) { ldv_main_exported_13(); } else { } goto ldv_62137; case 127: ; if (ldv_state_variable_105 != 0) { ldv_main_exported_105(); } else { } goto ldv_62137; case 128: ; goto ldv_62137; case 129: ; if (ldv_state_variable_85 != 0) { ldv_main_exported_85(); } else { } goto ldv_62137; case 130: ; if (ldv_state_variable_36 != 0) { ldv_main_exported_36(); } else { } goto ldv_62137; case 131: ; goto ldv_62137; case 132: ; if (ldv_state_variable_94 != 0) { ldv_main_exported_94(); } else { } goto ldv_62137; case 133: ; if (ldv_state_variable_51 != 0) { ldv_main_exported_51(); } else { } goto ldv_62137; case 134: ; goto ldv_62137; case 135: ; if (ldv_state_variable_111 != 0) { ldv_main_exported_111(); } else { } goto ldv_62137; case 136: ; if (ldv_state_variable_38 != 0) { ldv_main_exported_38(); } else { } goto ldv_62137; case 137: ; goto ldv_62137; case 138: ; if (ldv_state_variable_34 != 0) { ldv_main_exported_34(); } else { } goto ldv_62137; case 139: ; if (ldv_state_variable_132 != 0) { ldv_main_exported_132(); } else { } goto ldv_62137; default: ldv_stop(); } ldv_62137: ; goto ldv_62297; ldv_final: ldv_check_final_state(); return 0; } } bool ldv_queue_work_on_451(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_452(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_453(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_454(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_455(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_456(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_457(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_458(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_459(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_460(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_461(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_462(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_463(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_np_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_464(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_np_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_465(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_np_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_466(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_np_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_467(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_np_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_468(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_np_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_469(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_np_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_470(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_np_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; extern struct module __this_module ; extern int kstrtouint(char const * , unsigned int , unsigned int * ) ; __inline static int kstrtou32(char const *s , unsigned int base , u32 *res ) { int tmp ; { tmp = kstrtouint(s, base, res); return (tmp); } } extern int kstrtou16(char const * , unsigned int , u16 * ) ; __inline static void *ERR_PTR(long error ) ; __inline static long PTR_ERR(void const *ptr ) ; __inline static bool IS_ERR(void const *ptr ) ; int ldv_mutex_trylock_503(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_501(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_504(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_505(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_500(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_502(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_506(struct mutex *ldv_func_arg1 ) ; bool ldv_queue_work_on_495(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_497(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_496(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_499(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_498(struct workqueue_struct *ldv_func_arg1 ) ; extern bool capable(int ) ; __inline static char *config_item_name(struct config_item *item ) { { return (item->ci_name); } } extern void config_item_put(struct config_item * ) ; extern void config_group_init_type_name(struct config_group * , char const * , struct config_item_type * ) ; extern __be32 in_aton(char const * ) ; extern int in6_pton(char const * , int , u8 * , int , char const ** ) ; extern ssize_t target_show_dynamic_sessions(struct se_portal_group * , char * ) ; extern int core_tpg_set_initiator_node_tag(struct se_portal_group * , struct se_node_acl * , char const * ) ; extern int __request_module(bool , char const * , ...) ; struct config_item_type iscsi_stat_instance_cit ; struct config_item_type iscsi_stat_sess_err_cit ; struct config_item_type iscsi_stat_tgt_attr_cit ; struct config_item_type iscsi_stat_login_cit ; struct config_item_type iscsi_stat_logout_cit ; struct config_item_type iscsi_stat_sess_cit ; static ssize_t lio_target_np_show_sctp(struct se_tpg_np *se_tpg_np , char *page ) { struct iscsi_tpg_np *tpg_np ; struct se_tpg_np const *__mptr ; struct iscsi_tpg_np *tpg_np_sctp ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_tpg_np const *)se_tpg_np; tpg_np = (struct iscsi_tpg_np *)__mptr + 0xffffffffffffffb8UL; tpg_np_sctp = iscsit_tpg_locate_child_np(tpg_np, 1); if ((unsigned long )tpg_np_sctp != (unsigned long )((struct iscsi_tpg_np *)0)) { tmp = sprintf(page, "1\n"); rb = (ssize_t )tmp; } else { tmp___0 = sprintf(page, "0\n"); rb = (ssize_t )tmp___0; } return (rb); } } static ssize_t lio_target_np_store_sctp(struct se_tpg_np *se_tpg_np , char const *page , size_t count ) { struct iscsi_np *np ; struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; struct se_tpg_np const *__mptr ; struct iscsi_tpg_np *tpg_np_sctp ; u32 op ; int ret ; int tmp ; bool tmp___0 ; { __mptr = (struct se_tpg_np const *)se_tpg_np; tpg_np = (struct iscsi_tpg_np *)__mptr + 0xffffffffffffffb8UL; tpg_np_sctp = (struct iscsi_tpg_np *)0; ret = kstrtou32(page, 0U, & op); if (ret != 0) { return ((ssize_t )ret); } else { } if (op != 1U && op != 0U) { printk("\vIllegal value for tpg_enable: %u\n", op); return (-22L); } else { } np = tpg_np->tpg_np; if ((unsigned long )np == (unsigned long )((struct iscsi_np *)0)) { printk("\vUnable to locate struct iscsi_np from struct iscsi_tpg_np\n"); return (-22L); } else { } tpg = tpg_np->tpg; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } if (op != 0U) { tpg_np_sctp = iscsit_tpg_add_network_portal(tpg, & np->np_sockaddr, (char *)(& np->np_ip), tpg_np, 1); if ((unsigned long )tpg_np_sctp == (unsigned long )((struct iscsi_tpg_np *)0)) { goto out; } else { tmp___0 = IS_ERR((void const *)tpg_np_sctp); if ((int )tmp___0) { goto out; } else { } } } else { tpg_np_sctp = iscsit_tpg_locate_child_np(tpg_np, 1); if ((unsigned long )tpg_np_sctp == (unsigned long )((struct iscsi_tpg_np *)0)) { goto out; } else { } ret = iscsit_tpg_del_network_portal(tpg, tpg_np_sctp); if (ret < 0) { goto out; } else { } } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_np_base_attribute lio_target_np_sctp = {{"sctp", & __this_module, 420U}, & lio_target_np_show_sctp, & lio_target_np_store_sctp}; static ssize_t lio_target_np_show_iser(struct se_tpg_np *se_tpg_np , char *page ) { struct iscsi_tpg_np *tpg_np ; struct se_tpg_np const *__mptr ; struct iscsi_tpg_np *tpg_np_iser ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_tpg_np const *)se_tpg_np; tpg_np = (struct iscsi_tpg_np *)__mptr + 0xffffffffffffffb8UL; tpg_np_iser = iscsit_tpg_locate_child_np(tpg_np, 5); if ((unsigned long )tpg_np_iser != (unsigned long )((struct iscsi_tpg_np *)0)) { tmp = sprintf(page, "1\n"); rb = (ssize_t )tmp; } else { tmp___0 = sprintf(page, "0\n"); rb = (ssize_t )tmp___0; } return (rb); } } static ssize_t lio_target_np_store_iser(struct se_tpg_np *se_tpg_np , char const *page , size_t count ) { struct iscsi_np *np ; struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; struct se_tpg_np const *__mptr ; struct iscsi_tpg_np *tpg_np_iser ; char *endptr ; u32 op ; int rc ; unsigned long tmp ; int tmp___0 ; long tmp___1 ; bool tmp___2 ; { __mptr = (struct se_tpg_np const *)se_tpg_np; tpg_np = (struct iscsi_tpg_np *)__mptr + 0xffffffffffffffb8UL; tpg_np_iser = (struct iscsi_tpg_np *)0; rc = 0; tmp = simple_strtoul(page, & endptr, 0U); op = (u32 )tmp; if (op != 1U && op != 0U) { printk("\vIllegal value for tpg_enable: %u\n", op); return (-22L); } else { } np = tpg_np->tpg_np; if ((unsigned long )np == (unsigned long )((struct iscsi_np *)0)) { printk("\vUnable to locate struct iscsi_np from struct iscsi_tpg_np\n"); return (-22L); } else { } tpg = tpg_np->tpg; tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { return (-22L); } else { } if (op != 0U) { rc = __request_module(1, "ib_isert"); if (rc != 0) { printk("\fUnable to request_module for ib_isert\n"); rc = 0; } else { } tpg_np_iser = iscsit_tpg_add_network_portal(tpg, & np->np_sockaddr, (char *)(& np->np_ip), tpg_np, 5); tmp___2 = IS_ERR((void const *)tpg_np_iser); if ((int )tmp___2) { tmp___1 = PTR_ERR((void const *)tpg_np_iser); rc = (int )tmp___1; goto out; } else { } } else { tpg_np_iser = iscsit_tpg_locate_child_np(tpg_np, 5); if ((unsigned long )tpg_np_iser != (unsigned long )((struct iscsi_tpg_np *)0)) { rc = iscsit_tpg_del_network_portal(tpg, tpg_np_iser); if (rc < 0) { goto out; } else { } } else { } } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )rc); } } static struct target_fabric_np_base_attribute lio_target_np_iser = {{"iser", & __this_module, 420U}, & lio_target_np_show_iser, & lio_target_np_store_iser}; static struct configfs_attribute *lio_target_portal_attrs[3U] = { & lio_target_np_sctp.attr, & lio_target_np_iser.attr, (struct configfs_attribute *)0}; static struct se_tpg_np *lio_target_call_addnptotpg(struct se_portal_group *se_tpg , struct config_group *group , char const *name ) { struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; char *str ; char *str2 ; char *ip_str ; char *port_str ; struct __kernel_sockaddr_storage sockaddr ; struct sockaddr_in *sock_in ; struct sockaddr_in6 *sock_in6 ; unsigned long port ; int ret ; char buf[257U] ; size_t tmp ; void *tmp___0 ; size_t tmp___1 ; char const *end ; void *tmp___2 ; void *tmp___3 ; void *tmp___4 ; __u16 tmp___5 ; void *tmp___6 ; void *tmp___7 ; void *tmp___8 ; __u16 tmp___9 ; struct se_portal_group const *__mptr ; void *tmp___10 ; struct _ddebug descriptor ; char *tmp___11 ; long tmp___12 ; void *tmp___13 ; bool tmp___14 ; struct _ddebug descriptor___0 ; long tmp___15 ; { tmp___1 = strlen(name); if (tmp___1 > 256UL) { tmp = strlen(name); printk("\vstrlen(name): %d exceeds MAX_PORTAL_LEN: %d\n", (int )tmp, 256); tmp___0 = ERR_PTR(-75L); return ((struct se_tpg_np *)tmp___0); } else { } memset((void *)(& buf), 0, 257UL); snprintf((char *)(& buf), 257UL, "%s", name); memset((void *)(& sockaddr), 0, 128UL); str = strstr((char const *)(& buf), "["); if ((unsigned long )str != (unsigned long )((char *)0)) { str2 = strstr((char const *)str, "]"); if ((unsigned long )str2 == (unsigned long )((char *)0)) { printk("\vUnable to locate trailing \"]\" in IPv6 iSCSI network portal address\n"); tmp___2 = ERR_PTR(-22L); return ((struct se_tpg_np *)tmp___2); } else { } str = str + 1; *str2 = 0; str2 = str2 + 1; port_str = strstr((char const *)str2, ":"); if ((unsigned long )port_str == (unsigned long )((char *)0)) { printk("\vUnable to locate \":port\" in IPv6 iSCSI network portal address\n"); tmp___3 = ERR_PTR(-22L); return ((struct se_tpg_np *)tmp___3); } else { } *port_str = 0; port_str = port_str + 1; ret = kstrtoul((char const *)port_str, 0U, & port); if (ret < 0) { printk("\vkstrtoul() failed for port_str: %d\n", ret); tmp___4 = ERR_PTR((long )ret); return ((struct se_tpg_np *)tmp___4); } else { } sock_in6 = (struct sockaddr_in6 *)(& sockaddr); sock_in6->sin6_family = 10U; tmp___5 = __fswab16((int )((unsigned short )port)); sock_in6->sin6_port = tmp___5; ret = in6_pton((char const *)str, 48, (u8 *)(& sock_in6->sin6_addr.in6_u), -1, & end); if (ret <= 0) { printk("\vin6_pton returned: %d\n", ret); tmp___6 = ERR_PTR(-22L); return ((struct se_tpg_np *)tmp___6); } else { } } else { ip_str = (char *)(& buf); str = ip_str; port_str = strstr((char const *)ip_str, ":"); if ((unsigned long )port_str == (unsigned long )((char *)0)) { printk("\vUnable to locate \":port\" in IPv4 iSCSI network portal address\n"); tmp___7 = ERR_PTR(-22L); return ((struct se_tpg_np *)tmp___7); } else { } *port_str = 0; port_str = port_str + 1; ret = kstrtoul((char const *)port_str, 0U, & port); if (ret < 0) { printk("\vkstrtoul() failed for port_str: %d\n", ret); tmp___8 = ERR_PTR((long )ret); return ((struct se_tpg_np *)tmp___8); } else { } sock_in = (struct sockaddr_in *)(& sockaddr); sock_in->sin_family = 2U; tmp___9 = __fswab16((int )((unsigned short )port)); sock_in->sin_port = tmp___9; sock_in->sin_addr.s_addr = in_aton((char const *)ip_str); } __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; ret = iscsit_get_tpg(tpg); if (ret < 0) { tmp___10 = ERR_PTR(-22L); return ((struct se_tpg_np *)tmp___10); } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "lio_target_call_addnptotpg"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "LIO_Target_ConfigFS: REGISTER -> %s TPGT: %hu PORTAL: %s\n"; descriptor.lineno = 305U; descriptor.flags = 0U; tmp___12 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___12 != 0L) { tmp___11 = config_item_name(& (se_tpg->se_tpg_wwn)->wwn_group.cg_item); __dynamic_pr_debug(& descriptor, "LIO_Target_ConfigFS: REGISTER -> %s TPGT: %hu PORTAL: %s\n", tmp___11, (int )tpg->tpgt, name); } else { } tpg_np = iscsit_tpg_add_network_portal(tpg, & sockaddr, str, (struct iscsi_tpg_np *)0, 0); tmp___14 = IS_ERR((void const *)tpg_np); if ((int )tmp___14) { iscsit_put_tpg(tpg); tmp___13 = ERR_CAST((void const *)tpg_np); return ((struct se_tpg_np *)tmp___13); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "lio_target_call_addnptotpg"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor___0.format = "LIO_Target_ConfigFS: addnptotpg done!\n"; descriptor___0.lineno = 325U; descriptor___0.flags = 0U; tmp___15 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___15 != 0L) { __dynamic_pr_debug(& descriptor___0, "LIO_Target_ConfigFS: addnptotpg done!\n"); } else { } iscsit_put_tpg(tpg); return (& tpg_np->se_tpg_np); } } static void lio_target_call_delnpfromtpg(struct se_tpg_np *se_tpg_np ) { struct iscsi_portal_group *tpg ; struct iscsi_tpg_np *tpg_np ; struct se_portal_group *se_tpg ; int ret ; struct se_tpg_np const *__mptr ; struct _ddebug descriptor ; char *tmp ; long tmp___0 ; struct _ddebug descriptor___0 ; long tmp___1 ; { __mptr = (struct se_tpg_np const *)se_tpg_np; tpg_np = (struct iscsi_tpg_np *)__mptr + 0xffffffffffffffb8UL; tpg = tpg_np->tpg; ret = iscsit_get_tpg(tpg); if (ret < 0) { return; } else { } se_tpg = & tpg->tpg_se_tpg; descriptor.modname = "iscsi_target_mod"; descriptor.function = "lio_target_call_delnpfromtpg"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "LIO_Target_ConfigFS: DEREGISTER -> %s TPGT: %hu PORTAL: %s:%hu\n"; descriptor.lineno = 348U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { tmp = config_item_name(& (se_tpg->se_tpg_wwn)->wwn_group.cg_item); __dynamic_pr_debug(& descriptor, "LIO_Target_ConfigFS: DEREGISTER -> %s TPGT: %hu PORTAL: %s:%hu\n", tmp, (int )tpg->tpgt, (unsigned char *)(& (tpg_np->tpg_np)->np_ip), (int )(tpg_np->tpg_np)->np_port); } else { } ret = iscsit_tpg_del_network_portal(tpg, tpg_np); if (ret < 0) { goto out; } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "lio_target_call_delnpfromtpg"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor___0.format = "LIO_Target_ConfigFS: delnpfromtpg done!\n"; descriptor___0.lineno = 354U; descriptor___0.flags = 0U; tmp___1 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___1 != 0L) { __dynamic_pr_debug(& descriptor___0, "LIO_Target_ConfigFS: delnpfromtpg done!\n"); } else { } out: iscsit_put_tpg(tpg); return; } } static ssize_t iscsi_nacl_attrib_show_dataout_timeout(struct se_node_acl *se_nacl , char *page ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; int tmp ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; tmp = sprintf(page, "%u\n", nacl->node_attrib.dataout_timeout); return ((ssize_t )tmp); } } static ssize_t iscsi_nacl_attrib_store_dataout_timeout(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; u32 val ; int ret ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; ret = kstrtou32(page, 0U, & val); if (ret != 0) { return ((ssize_t )ret); } else { } ret = iscsit_na_dataout_timeout(nacl, val); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_attrib_attribute iscsi_nacl_attrib_dataout_timeout = {{"dataout_timeout", & __this_module, 420U}, & iscsi_nacl_attrib_show_dataout_timeout, & iscsi_nacl_attrib_store_dataout_timeout}; static ssize_t iscsi_nacl_attrib_show_dataout_timeout_retries(struct se_node_acl *se_nacl , char *page ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; int tmp ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; tmp = sprintf(page, "%u\n", nacl->node_attrib.dataout_timeout_retries); return ((ssize_t )tmp); } } static ssize_t iscsi_nacl_attrib_store_dataout_timeout_retries(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; u32 val ; int ret ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; ret = kstrtou32(page, 0U, & val); if (ret != 0) { return ((ssize_t )ret); } else { } ret = iscsit_na_dataout_timeout_retries(nacl, val); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_attrib_attribute iscsi_nacl_attrib_dataout_timeout_retries = {{"dataout_timeout_retries", & __this_module, 420U}, & iscsi_nacl_attrib_show_dataout_timeout_retries, & iscsi_nacl_attrib_store_dataout_timeout_retries}; static ssize_t iscsi_nacl_attrib_show_default_erl(struct se_node_acl *se_nacl , char *page ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; int tmp ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; tmp = sprintf(page, "%u\n", nacl->node_attrib.default_erl); return ((ssize_t )tmp); } } static ssize_t iscsi_nacl_attrib_store_default_erl(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; u32 val ; int ret ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; ret = kstrtou32(page, 0U, & val); if (ret != 0) { return ((ssize_t )ret); } else { } ret = iscsit_na_default_erl(nacl, val); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_attrib_attribute iscsi_nacl_attrib_default_erl = {{"default_erl", & __this_module, 420U}, & iscsi_nacl_attrib_show_default_erl, & iscsi_nacl_attrib_store_default_erl}; static ssize_t iscsi_nacl_attrib_show_nopin_timeout(struct se_node_acl *se_nacl , char *page ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; int tmp ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; tmp = sprintf(page, "%u\n", nacl->node_attrib.nopin_timeout); return ((ssize_t )tmp); } } static ssize_t iscsi_nacl_attrib_store_nopin_timeout(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; u32 val ; int ret ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; ret = kstrtou32(page, 0U, & val); if (ret != 0) { return ((ssize_t )ret); } else { } ret = iscsit_na_nopin_timeout(nacl, val); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_attrib_attribute iscsi_nacl_attrib_nopin_timeout = {{"nopin_timeout", & __this_module, 420U}, & iscsi_nacl_attrib_show_nopin_timeout, & iscsi_nacl_attrib_store_nopin_timeout}; static ssize_t iscsi_nacl_attrib_show_nopin_response_timeout(struct se_node_acl *se_nacl , char *page ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; int tmp ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; tmp = sprintf(page, "%u\n", nacl->node_attrib.nopin_response_timeout); return ((ssize_t )tmp); } } static ssize_t iscsi_nacl_attrib_store_nopin_response_timeout(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; u32 val ; int ret ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; ret = kstrtou32(page, 0U, & val); if (ret != 0) { return ((ssize_t )ret); } else { } ret = iscsit_na_nopin_response_timeout(nacl, val); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_attrib_attribute iscsi_nacl_attrib_nopin_response_timeout = {{"nopin_response_timeout", & __this_module, 420U}, & iscsi_nacl_attrib_show_nopin_response_timeout, & iscsi_nacl_attrib_store_nopin_response_timeout}; static ssize_t iscsi_nacl_attrib_show_random_datain_pdu_offsets(struct se_node_acl *se_nacl , char *page ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; int tmp ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; tmp = sprintf(page, "%u\n", nacl->node_attrib.random_datain_pdu_offsets); return ((ssize_t )tmp); } } static ssize_t iscsi_nacl_attrib_store_random_datain_pdu_offsets(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; u32 val ; int ret ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; ret = kstrtou32(page, 0U, & val); if (ret != 0) { return ((ssize_t )ret); } else { } ret = iscsit_na_random_datain_pdu_offsets(nacl, val); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_attrib_attribute iscsi_nacl_attrib_random_datain_pdu_offsets = {{"random_datain_pdu_offsets", & __this_module, 420U}, & iscsi_nacl_attrib_show_random_datain_pdu_offsets, & iscsi_nacl_attrib_store_random_datain_pdu_offsets}; static ssize_t iscsi_nacl_attrib_show_random_datain_seq_offsets(struct se_node_acl *se_nacl , char *page ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; int tmp ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; tmp = sprintf(page, "%u\n", nacl->node_attrib.random_datain_seq_offsets); return ((ssize_t )tmp); } } static ssize_t iscsi_nacl_attrib_store_random_datain_seq_offsets(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; u32 val ; int ret ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; ret = kstrtou32(page, 0U, & val); if (ret != 0) { return ((ssize_t )ret); } else { } ret = iscsit_na_random_datain_seq_offsets(nacl, val); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_attrib_attribute iscsi_nacl_attrib_random_datain_seq_offsets = {{"random_datain_seq_offsets", & __this_module, 420U}, & iscsi_nacl_attrib_show_random_datain_seq_offsets, & iscsi_nacl_attrib_store_random_datain_seq_offsets}; static ssize_t iscsi_nacl_attrib_show_random_r2t_offsets(struct se_node_acl *se_nacl , char *page ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; int tmp ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; tmp = sprintf(page, "%u\n", nacl->node_attrib.random_r2t_offsets); return ((ssize_t )tmp); } } static ssize_t iscsi_nacl_attrib_store_random_r2t_offsets(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct iscsi_node_acl *nacl ; struct se_node_acl const *__mptr ; u32 val ; int ret ; { __mptr = (struct se_node_acl const *)se_nacl; nacl = (struct iscsi_node_acl *)__mptr; ret = kstrtou32(page, 0U, & val); if (ret != 0) { return ((ssize_t )ret); } else { } ret = iscsit_na_random_r2t_offsets(nacl, val); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_attrib_attribute iscsi_nacl_attrib_random_r2t_offsets = {{"random_r2t_offsets", & __this_module, 420U}, & iscsi_nacl_attrib_show_random_r2t_offsets, & iscsi_nacl_attrib_store_random_r2t_offsets}; static struct configfs_attribute *lio_target_nacl_attrib_attrs[9U] = { & iscsi_nacl_attrib_dataout_timeout.attr, & iscsi_nacl_attrib_dataout_timeout_retries.attr, & iscsi_nacl_attrib_default_erl.attr, & iscsi_nacl_attrib_nopin_timeout.attr, & iscsi_nacl_attrib_nopin_response_timeout.attr, & iscsi_nacl_attrib_random_datain_pdu_offsets.attr, & iscsi_nacl_attrib_random_datain_seq_offsets.attr, & iscsi_nacl_attrib_random_r2t_offsets.attr, (struct configfs_attribute *)0}; static ssize_t __iscsi_nacl_auth_show_userid(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->userid)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_nacl_auth_store_userid(struct iscsi_node_acl *nacl , char const *page , size_t count ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } if (count > 255UL) { return (-22L); } else { } snprintf((char *)(& auth->userid), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->userid), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967294U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 1U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_nacl_auth_show_userid(struct se_node_acl *nacl , char *page ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_show_userid((struct iscsi_node_acl *)__mptr, page); return (tmp); } } static ssize_t iscsi_nacl_auth_store_userid(struct se_node_acl *nacl , char const *page , size_t count ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_store_userid((struct iscsi_node_acl *)__mptr, page, count); return (tmp); } } static struct target_fabric_nacl_auth_attribute iscsi_nacl_auth_userid = {{"userid", & __this_module, 420U}, & iscsi_nacl_auth_show_userid, & iscsi_nacl_auth_store_userid}; static ssize_t __iscsi_nacl_auth_show_password(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->password)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_nacl_auth_store_password(struct iscsi_node_acl *nacl , char const *page , size_t count ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } if (count > 255UL) { return (-22L); } else { } snprintf((char *)(& auth->password), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->password), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967293U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 2U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_nacl_auth_show_password(struct se_node_acl *nacl , char *page ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_show_password((struct iscsi_node_acl *)__mptr, page); return (tmp); } } static ssize_t iscsi_nacl_auth_store_password(struct se_node_acl *nacl , char const *page , size_t count ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_store_password((struct iscsi_node_acl *)__mptr, page, count); return (tmp); } } static struct target_fabric_nacl_auth_attribute iscsi_nacl_auth_password = {{"password", & __this_module, 420U}, & iscsi_nacl_auth_show_password, & iscsi_nacl_auth_store_password}; static ssize_t __iscsi_nacl_auth_show_authenticate_target(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%d\n", auth->authenticate_target); return ((ssize_t )tmp___1); } } static ssize_t iscsi_nacl_auth_show_authenticate_target(struct se_node_acl *nacl , char *page ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_show_authenticate_target((struct iscsi_node_acl *)__mptr, page); return (tmp); } } static struct target_fabric_nacl_auth_attribute iscsi_nacl_auth_authenticate_target = {{"authenticate_target", & __this_module, 292U}, & iscsi_nacl_auth_show_authenticate_target, 0}; static ssize_t __iscsi_nacl_auth_show_userid_mutual(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->userid_mutual)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_nacl_auth_store_userid_mutual(struct iscsi_node_acl *nacl , char const *page , size_t count ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } if (count > 255UL) { return (-22L); } else { } snprintf((char *)(& auth->userid_mutual), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->userid_mutual), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967291U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 4U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_nacl_auth_show_userid_mutual(struct se_node_acl *nacl , char *page ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_show_userid_mutual((struct iscsi_node_acl *)__mptr, page); return (tmp); } } static ssize_t iscsi_nacl_auth_store_userid_mutual(struct se_node_acl *nacl , char const *page , size_t count ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_store_userid_mutual((struct iscsi_node_acl *)__mptr, page, count); return (tmp); } } static struct target_fabric_nacl_auth_attribute iscsi_nacl_auth_userid_mutual = {{"userid_mutual", & __this_module, 420U}, & iscsi_nacl_auth_show_userid_mutual, & iscsi_nacl_auth_store_userid_mutual}; static ssize_t __iscsi_nacl_auth_show_password_mutual(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->password_mutual)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_nacl_auth_store_password_mutual(struct iscsi_node_acl *nacl , char const *page , size_t count ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } if (count > 255UL) { return (-22L); } else { } snprintf((char *)(& auth->password_mutual), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->password_mutual), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967287U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 8U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_nacl_auth_show_password_mutual(struct se_node_acl *nacl , char *page ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_show_password_mutual((struct iscsi_node_acl *)__mptr, page); return (tmp); } } static ssize_t iscsi_nacl_auth_store_password_mutual(struct se_node_acl *nacl , char const *page , size_t count ) { struct se_node_acl const *__mptr ; ssize_t tmp ; { __mptr = (struct se_node_acl const *)nacl; tmp = __iscsi_nacl_auth_store_password_mutual((struct iscsi_node_acl *)__mptr, page, count); return (tmp); } } static struct target_fabric_nacl_auth_attribute iscsi_nacl_auth_password_mutual = {{"password_mutual", & __this_module, 420U}, & iscsi_nacl_auth_show_password_mutual, & iscsi_nacl_auth_store_password_mutual}; static struct configfs_attribute *lio_target_nacl_auth_attrs[6U] = { & iscsi_nacl_auth_userid.attr, & iscsi_nacl_auth_password.attr, & iscsi_nacl_auth_authenticate_target.attr, & iscsi_nacl_auth_userid_mutual.attr, & iscsi_nacl_auth_password_mutual.attr, (struct configfs_attribute *)0}; static ssize_t iscsi_nacl_param_show_MaxConnections(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->MaxConnections); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_MaxConnections = {{"MaxConnections", & __this_module, 292U}, & iscsi_nacl_param_show_MaxConnections, 0}; static ssize_t iscsi_nacl_param_show_InitialR2T(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->InitialR2T); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_InitialR2T = {{"InitialR2T", & __this_module, 292U}, & iscsi_nacl_param_show_InitialR2T, 0}; static ssize_t iscsi_nacl_param_show_ImmediateData(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->ImmediateData); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_ImmediateData = {{"ImmediateData", & __this_module, 292U}, & iscsi_nacl_param_show_ImmediateData, 0}; static ssize_t iscsi_nacl_param_show_MaxBurstLength(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (sess->sess_ops)->MaxBurstLength); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_MaxBurstLength = {{"MaxBurstLength", & __this_module, 292U}, & iscsi_nacl_param_show_MaxBurstLength, 0}; static ssize_t iscsi_nacl_param_show_FirstBurstLength(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (sess->sess_ops)->FirstBurstLength); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_FirstBurstLength = {{"FirstBurstLength", & __this_module, 292U}, & iscsi_nacl_param_show_FirstBurstLength, 0}; static ssize_t iscsi_nacl_param_show_DefaultTime2Wait(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->DefaultTime2Wait); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_DefaultTime2Wait = {{"DefaultTime2Wait", & __this_module, 292U}, & iscsi_nacl_param_show_DefaultTime2Wait, 0}; static ssize_t iscsi_nacl_param_show_DefaultTime2Retain(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->DefaultTime2Retain); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_DefaultTime2Retain = {{"DefaultTime2Retain", & __this_module, 292U}, & iscsi_nacl_param_show_DefaultTime2Retain, 0}; static ssize_t iscsi_nacl_param_show_MaxOutstandingR2T(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->MaxOutstandingR2T); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_MaxOutstandingR2T = {{"MaxOutstandingR2T", & __this_module, 292U}, & iscsi_nacl_param_show_MaxOutstandingR2T, 0}; static ssize_t iscsi_nacl_param_show_DataPDUInOrder(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->DataPDUInOrder); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_DataPDUInOrder = {{"DataPDUInOrder", & __this_module, 292U}, & iscsi_nacl_param_show_DataPDUInOrder, 0}; static ssize_t iscsi_nacl_param_show_DataSequenceInOrder(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->DataSequenceInOrder); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_DataSequenceInOrder = {{"DataSequenceInOrder", & __this_module, 292U}, & iscsi_nacl_param_show_DataSequenceInOrder, 0}; static ssize_t iscsi_nacl_param_show_ErrorRecoveryLevel(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; { spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = snprintf(page, 4096UL, "No Active iSCSI Session\n"); rb = (ssize_t )tmp; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->ErrorRecoveryLevel); rb = (ssize_t )tmp___0; } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_param_attribute iscsi_nacl_param_ErrorRecoveryLevel = {{"ErrorRecoveryLevel", & __this_module, 292U}, & iscsi_nacl_param_show_ErrorRecoveryLevel, 0}; static struct configfs_attribute *lio_target_nacl_param_attrs[12U] = { & iscsi_nacl_param_MaxConnections.attr, & iscsi_nacl_param_InitialR2T.attr, & iscsi_nacl_param_ImmediateData.attr, & iscsi_nacl_param_MaxBurstLength.attr, & iscsi_nacl_param_FirstBurstLength.attr, & iscsi_nacl_param_DefaultTime2Wait.attr, & iscsi_nacl_param_DefaultTime2Retain.attr, & iscsi_nacl_param_MaxOutstandingR2T.attr, & iscsi_nacl_param_DataPDUInOrder.attr, & iscsi_nacl_param_DataSequenceInOrder.attr, & iscsi_nacl_param_ErrorRecoveryLevel.attr, (struct configfs_attribute *)0}; static ssize_t lio_target_nacl_show_info(struct se_node_acl *se_nacl , char *page ) { struct iscsi_session *sess ; struct iscsi_conn *conn ; struct se_session *se_sess ; ssize_t rb ; int tmp ; int tmp___0 ; int tmp___1 ; int tmp___2 ; int tmp___3 ; int tmp___4 ; int tmp___5 ; int tmp___6 ; int tmp___7 ; int tmp___8 ; int tmp___9 ; int tmp___10 ; int tmp___11 ; int tmp___12 ; int tmp___13 ; int tmp___14 ; struct list_head const *__mptr ; int tmp___15 ; int tmp___16 ; int tmp___17 ; int tmp___18 ; int tmp___19 ; int tmp___20 ; int tmp___21 ; int tmp___22 ; int tmp___23 ; int tmp___24 ; int tmp___25 ; struct list_head const *__mptr___0 ; { rb = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess == (unsigned long )((struct se_session *)0)) { tmp = sprintf(page + (unsigned long )rb, "No active iSCSI Session for Initiator Endpoint: %s\n", (char *)(& se_nacl->initiatorname)); rb = (ssize_t )tmp + rb; } else { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp___0 = sprintf(page + (unsigned long )rb, "InitiatorName: %s\n", (char *)(& (sess->sess_ops)->InitiatorName)); rb = (ssize_t )tmp___0 + rb; tmp___1 = sprintf(page + (unsigned long )rb, "InitiatorAlias: %s\n", (char *)(& (sess->sess_ops)->InitiatorAlias)); rb = (ssize_t )tmp___1 + rb; tmp___2 = sprintf(page + (unsigned long )rb, "LIO Session ID: %u ISID: 0x%6ph TSIH: %hu ", sess->sid, (u8 *)(& sess->isid), (int )sess->tsih); rb = (ssize_t )tmp___2 + rb; tmp___3 = sprintf(page + (unsigned long )rb, "SessionType: %s\n", (unsigned int )(sess->sess_ops)->SessionType != 0U ? (char *)"Discovery" : (char *)"Normal"); rb = (ssize_t )tmp___3 + rb; tmp___4 = sprintf(page + (unsigned long )rb, "Session State: "); rb = (ssize_t )tmp___4 + rb; switch (sess->session_state) { case 1U: tmp___5 = sprintf(page + (unsigned long )rb, "TARG_SESS_FREE\n"); rb = (ssize_t )tmp___5 + rb; goto ldv_59416; case 2U: tmp___6 = sprintf(page + (unsigned long )rb, "TARG_SESS_STATE_ACTIVE\n"); rb = (ssize_t )tmp___6 + rb; goto ldv_59416; case 3U: tmp___7 = sprintf(page + (unsigned long )rb, "TARG_SESS_STATE_LOGGED_IN\n"); rb = (ssize_t )tmp___7 + rb; goto ldv_59416; case 4U: tmp___8 = sprintf(page + (unsigned long )rb, "TARG_SESS_STATE_FAILED\n"); rb = (ssize_t )tmp___8 + rb; goto ldv_59416; case 5U: tmp___9 = sprintf(page + (unsigned long )rb, "TARG_SESS_STATE_IN_CONTINUE\n"); rb = (ssize_t )tmp___9 + rb; goto ldv_59416; default: tmp___10 = sprintf(page + (unsigned long )rb, "OLD_ERROR: Unknown Session State!\n"); rb = (ssize_t )tmp___10 + rb; goto ldv_59416; } ldv_59416: tmp___11 = sprintf(page + (unsigned long )rb, "---------------------[iSCSI Session Values]-----------------------\n"); rb = (ssize_t )tmp___11 + rb; tmp___12 = sprintf(page + (unsigned long )rb, " CmdSN/WR : CmdSN/WC : ExpCmdSN : MaxCmdSN : ITT : TTT\n"); rb = (ssize_t )tmp___12 + rb; tmp___13 = sprintf(page + (unsigned long )rb, " 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", sess->cmdsn_window, (sess->max_cmd_sn - sess->exp_cmd_sn) + 1U, sess->exp_cmd_sn, sess->max_cmd_sn, sess->init_task_tag, sess->targ_xfer_tag); rb = (ssize_t )tmp___13 + rb; tmp___14 = sprintf(page + (unsigned long )rb, "----------------------[iSCSI Connections]-------------------------\n"); rb = (ssize_t )tmp___14 + rb; spin_lock(& sess->conn_lock); __mptr = (struct list_head const *)sess->sess_conn_list.next; conn = (struct iscsi_conn *)__mptr + 0xfffffffffffff660UL; goto ldv_59436; ldv_59435: tmp___15 = sprintf(page + (unsigned long )rb, "CID: %hu Connection State: ", (int )conn->cid); rb = (ssize_t )tmp___15 + rb; switch ((int )conn->conn_state) { case 1: tmp___16 = sprintf(page + (unsigned long )rb, "TARG_CONN_STATE_FREE\n"); rb = (ssize_t )tmp___16 + rb; goto ldv_59427; case 3: tmp___17 = sprintf(page + (unsigned long )rb, "TARG_CONN_STATE_XPT_UP\n"); rb = (ssize_t )tmp___17 + rb; goto ldv_59427; case 4: tmp___18 = sprintf(page + (unsigned long )rb, "TARG_CONN_STATE_IN_LOGIN\n"); rb = (ssize_t )tmp___18 + rb; goto ldv_59427; case 5: tmp___19 = sprintf(page + (unsigned long )rb, "TARG_CONN_STATE_LOGGED_IN\n"); rb = (ssize_t )tmp___19 + rb; goto ldv_59427; case 6: tmp___20 = sprintf(page + (unsigned long )rb, "TARG_CONN_STATE_IN_LOGOUT\n"); rb = (ssize_t )tmp___20 + rb; goto ldv_59427; case 7: tmp___21 = sprintf(page + (unsigned long )rb, "TARG_CONN_STATE_LOGOUT_REQUESTED\n"); rb = (ssize_t )tmp___21 + rb; goto ldv_59427; case 8: tmp___22 = sprintf(page + (unsigned long )rb, "TARG_CONN_STATE_CLEANUP_WAIT\n"); rb = (ssize_t )tmp___22 + rb; goto ldv_59427; default: tmp___23 = sprintf(page + (unsigned long )rb, "OLD_ERROR: Unknown Connection State!\n"); rb = (ssize_t )tmp___23 + rb; goto ldv_59427; } ldv_59427: tmp___24 = sprintf(page + (unsigned long )rb, " Address %s %s", (unsigned char *)(& conn->login_ip), (unsigned int )conn->network_transport == 0U ? (char *)"TCP" : (char *)"SCTP"); rb = (ssize_t )tmp___24 + rb; tmp___25 = sprintf(page + (unsigned long )rb, " StatSN: 0x%08x\n", conn->stat_sn); rb = (ssize_t )tmp___25 + rb; __mptr___0 = (struct list_head const *)conn->conn_list.next; conn = (struct iscsi_conn *)__mptr___0 + 0xfffffffffffff660UL; ldv_59436: ; if ((unsigned long )(& conn->conn_list) != (unsigned long )(& sess->sess_conn_list)) { goto ldv_59435; } else { } spin_unlock(& sess->conn_lock); } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (rb); } } static struct target_fabric_nacl_base_attribute lio_target_nacl_info = {{"info", & __this_module, 292U}, & lio_target_nacl_show_info, 0}; static ssize_t lio_target_nacl_show_cmdsn_depth(struct se_node_acl *se_nacl , char *page ) { int tmp ; { tmp = sprintf(page, "%u\n", se_nacl->queue_depth); return ((ssize_t )tmp); } } static ssize_t lio_target_nacl_store_cmdsn_depth(struct se_node_acl *se_nacl , char const *page , size_t count ) { struct se_portal_group *se_tpg ; struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct config_item *acl_ci ; struct config_item *tpg_ci ; struct config_item *wwn_ci ; u32 cmdsn_depth ; int ret ; int tmp ; char *tmp___0 ; struct _ddebug descriptor ; char *tmp___1 ; char *tmp___2 ; char *tmp___3 ; long tmp___4 ; { se_tpg = se_nacl->se_tpg; __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; cmdsn_depth = 0U; ret = kstrtou32(page, 0U, & cmdsn_depth); if (ret != 0) { return ((ssize_t )ret); } else { } if (cmdsn_depth > 512U) { printk("\vPassed cmdsn_depth: %u exceeds TA_DEFAULT_CMDSN_DEPTH_MAX: %u\n", cmdsn_depth, 512); return (-22L); } else { } acl_ci = & se_nacl->acl_group.cg_item; if ((unsigned long )acl_ci == (unsigned long )((struct config_item *)0)) { printk("\vUnable to locatel acl_ci\n"); return (-22L); } else { } tpg_ci = & ((acl_ci->ci_parent)->ci_group)->cg_item; if ((unsigned long )tpg_ci == (unsigned long )((struct config_item *)0)) { printk("\vUnable to locate tpg_ci\n"); return (-22L); } else { } wwn_ci = & (tpg_ci->ci_group)->cg_item; if ((unsigned long )wwn_ci == (unsigned long )((struct config_item *)0)) { printk("\vUnable to locate config_item wwn_ci\n"); return (-22L); } else { } tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = config_item_name(acl_ci); ret = iscsit_tpg_set_initiator_node_queue_depth(tpg, (unsigned char *)tmp___0, cmdsn_depth, 1); descriptor.modname = "iscsi_target_mod"; descriptor.function = "lio_target_nacl_store_cmdsn_depth"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "LIO_Target_ConfigFS: %s/%s Set CmdSN Window: %u forInitiatorName: %s\n"; descriptor.lineno = 824U; descriptor.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___4 != 0L) { tmp___1 = config_item_name(acl_ci); tmp___2 = config_item_name(tpg_ci); tmp___3 = config_item_name(wwn_ci); __dynamic_pr_debug(& descriptor, "LIO_Target_ConfigFS: %s/%s Set CmdSN Window: %u forInitiatorName: %s\n", tmp___3, tmp___2, cmdsn_depth, tmp___1); } else { } iscsit_put_tpg(tpg); return (ret != 0 ? (ssize_t )((unsigned long )ret) : (ssize_t )count); } } static struct target_fabric_nacl_base_attribute lio_target_nacl_cmdsn_depth = {{"cmdsn_depth", & __this_module, 420U}, & lio_target_nacl_show_cmdsn_depth, & lio_target_nacl_store_cmdsn_depth}; static ssize_t lio_target_nacl_show_tag(struct se_node_acl *se_nacl , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%s", (char *)(& se_nacl->acl_tag)); return ((ssize_t )tmp); } } static ssize_t lio_target_nacl_store_tag(struct se_node_acl *se_nacl , char const *page , size_t count ) { int ret ; { ret = core_tpg_set_initiator_node_tag(se_nacl->se_tpg, se_nacl, page); if (ret < 0) { return ((ssize_t )ret); } else { } return ((ssize_t )count); } } static struct target_fabric_nacl_base_attribute lio_target_nacl_tag = {{"tag", & __this_module, 420U}, & lio_target_nacl_show_tag, & lio_target_nacl_store_tag}; static struct configfs_attribute *lio_target_initiator_attrs[4U] = { & lio_target_nacl_info.attr, & lio_target_nacl_cmdsn_depth.attr, & lio_target_nacl_tag.attr, (struct configfs_attribute *)0}; static int lio_target_init_nodeacl(struct se_node_acl *se_nacl , char const *name ) { struct iscsi_node_acl *acl ; struct se_node_acl const *__mptr ; struct config_group *stats_cg ; void *tmp ; { __mptr = (struct se_node_acl const *)se_nacl; acl = (struct iscsi_node_acl *)__mptr; stats_cg = & se_nacl->acl_fabric_stat_group; tmp = kmalloc(16UL, 208U); stats_cg->default_groups = (struct config_group **)tmp; if ((unsigned long )stats_cg->default_groups == (unsigned long )((struct config_group **)0)) { printk("\vUnable to allocate memory for stats_cg->default_groups\n"); return (-12); } else { } *(stats_cg->default_groups) = & acl->node_stat_grps.iscsi_sess_stats_group; *(stats_cg->default_groups + 1UL) = (struct config_group *)0; config_group_init_type_name(& acl->node_stat_grps.iscsi_sess_stats_group, "iscsi_sess_stats", & iscsi_stat_sess_cit); return (0); } } static void lio_target_cleanup_nodeacl(struct se_node_acl *se_nacl ) { struct iscsi_node_acl *acl ; struct se_node_acl const *__mptr ; struct config_item *df_item ; struct config_group *stats_cg ; int i ; { __mptr = (struct se_node_acl const *)se_nacl; acl = (struct iscsi_node_acl *)__mptr; stats_cg = & acl->se_node_acl.acl_fabric_stat_group; i = 0; goto ldv_59490; ldv_59489: df_item = & (*(stats_cg->default_groups + (unsigned long )i))->cg_item; *(stats_cg->default_groups + (unsigned long )i) = (struct config_group *)0; config_item_put(df_item); i = i + 1; ldv_59490: ; if ((unsigned long )*(stats_cg->default_groups + (unsigned long )i) != (unsigned long )((struct config_group *)0)) { goto ldv_59489; } else { } kfree((void const *)stats_cg->default_groups); return; } } static ssize_t iscsi_tpg_attrib_show_authentication(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.authentication); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_authentication(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_authentication(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_authentication = {{"authentication", & __this_module, 420U}, & iscsi_tpg_attrib_show_authentication, & iscsi_tpg_attrib_store_authentication}; static ssize_t iscsi_tpg_attrib_show_login_timeout(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.login_timeout); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_login_timeout(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_login_timeout(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_login_timeout = {{"login_timeout", & __this_module, 420U}, & iscsi_tpg_attrib_show_login_timeout, & iscsi_tpg_attrib_store_login_timeout}; static ssize_t iscsi_tpg_attrib_show_netif_timeout(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.netif_timeout); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_netif_timeout(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_netif_timeout(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_netif_timeout = {{"netif_timeout", & __this_module, 420U}, & iscsi_tpg_attrib_show_netif_timeout, & iscsi_tpg_attrib_store_netif_timeout}; static ssize_t iscsi_tpg_attrib_show_generate_node_acls(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.generate_node_acls); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_generate_node_acls(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_generate_node_acls(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_generate_node_acls = {{"generate_node_acls", & __this_module, 420U}, & iscsi_tpg_attrib_show_generate_node_acls, & iscsi_tpg_attrib_store_generate_node_acls}; static ssize_t iscsi_tpg_attrib_show_default_cmdsn_depth(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.default_cmdsn_depth); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_default_cmdsn_depth(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_default_cmdsn_depth(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_default_cmdsn_depth = {{"default_cmdsn_depth", & __this_module, 420U}, & iscsi_tpg_attrib_show_default_cmdsn_depth, & iscsi_tpg_attrib_store_default_cmdsn_depth}; static ssize_t iscsi_tpg_attrib_show_cache_dynamic_acls(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.cache_dynamic_acls); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_cache_dynamic_acls(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_cache_dynamic_acls(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_cache_dynamic_acls = {{"cache_dynamic_acls", & __this_module, 420U}, & iscsi_tpg_attrib_show_cache_dynamic_acls, & iscsi_tpg_attrib_store_cache_dynamic_acls}; static ssize_t iscsi_tpg_attrib_show_demo_mode_write_protect(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.demo_mode_write_protect); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_demo_mode_write_protect(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_demo_mode_write_protect(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_demo_mode_write_protect = {{"demo_mode_write_protect", & __this_module, 420U}, & iscsi_tpg_attrib_show_demo_mode_write_protect, & iscsi_tpg_attrib_store_demo_mode_write_protect}; static ssize_t iscsi_tpg_attrib_show_prod_mode_write_protect(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.prod_mode_write_protect); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_prod_mode_write_protect(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_prod_mode_write_protect(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_prod_mode_write_protect = {{"prod_mode_write_protect", & __this_module, 420U}, & iscsi_tpg_attrib_show_prod_mode_write_protect, & iscsi_tpg_attrib_store_prod_mode_write_protect}; static ssize_t iscsi_tpg_attrib_show_demo_mode_discovery(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.demo_mode_discovery); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_demo_mode_discovery(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_demo_mode_discovery(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_demo_mode_discovery = {{"demo_mode_discovery", & __this_module, 420U}, & iscsi_tpg_attrib_show_demo_mode_discovery, & iscsi_tpg_attrib_store_demo_mode_discovery}; static ssize_t iscsi_tpg_attrib_show_default_erl(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.default_erl); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_default_erl(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_default_erl(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_default_erl = {{"default_erl", & __this_module, 420U}, & iscsi_tpg_attrib_show_default_erl, & iscsi_tpg_attrib_store_default_erl}; static ssize_t iscsi_tpg_attrib_show_t10_pi(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", (int )tpg->tpg_attrib.t10_pi); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_t10_pi(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_t10_pi(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_t10_pi = {{"t10_pi", & __this_module, 420U}, & iscsi_tpg_attrib_show_t10_pi, & iscsi_tpg_attrib_store_t10_pi}; static ssize_t iscsi_tpg_attrib_show_fabric_prot_type(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } tmp___0 = sprintf(page, "%u\n", tpg->tpg_attrib.fabric_prot_type); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_attrib_store_fabric_prot_type(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 val ; int ret ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } ret = kstrtou32(page, 0U, & val); if (ret != 0) { goto out; } else { } ret = iscsit_ta_fabric_prot_type(tpg, val); if (ret < 0) { goto out; } else { } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return ((ssize_t )ret); } } static struct target_fabric_tpg_attrib_attribute iscsi_tpg_attrib_fabric_prot_type = {{"fabric_prot_type", & __this_module, 420U}, & iscsi_tpg_attrib_show_fabric_prot_type, & iscsi_tpg_attrib_store_fabric_prot_type}; static struct configfs_attribute *lio_target_tpg_attrib_attrs[13U] = { & iscsi_tpg_attrib_authentication.attr, & iscsi_tpg_attrib_login_timeout.attr, & iscsi_tpg_attrib_netif_timeout.attr, & iscsi_tpg_attrib_generate_node_acls.attr, & iscsi_tpg_attrib_default_cmdsn_depth.attr, & iscsi_tpg_attrib_cache_dynamic_acls.attr, & iscsi_tpg_attrib_demo_mode_write_protect.attr, & iscsi_tpg_attrib_prod_mode_write_protect.attr, & iscsi_tpg_attrib_demo_mode_discovery.attr, & iscsi_tpg_attrib_default_erl.attr, & iscsi_tpg_attrib_t10_pi.attr, & iscsi_tpg_attrib_fabric_prot_type.attr, (struct configfs_attribute *)0}; static ssize_t __iscsi_tpg_auth_show_userid(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->userid)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_tpg_auth_store_userid(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } snprintf((char *)(& auth->userid), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->userid), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967294U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 1U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_tpg_auth_show_userid(struct se_portal_group *se_tpg , char *page ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_show_userid(se_tpg, page); return (tmp); } } static ssize_t iscsi_tpg_auth_store_userid(struct se_portal_group *se_tpg , char const *page , size_t count ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_store_userid(se_tpg, page, count); return (tmp); } } static struct target_fabric_tpg_auth_attribute iscsi_tpg_auth_userid = {{"userid", & __this_module, 420U}, & iscsi_tpg_auth_show_userid, & iscsi_tpg_auth_store_userid}; static ssize_t __iscsi_tpg_auth_show_password(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->password)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_tpg_auth_store_password(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } snprintf((char *)(& auth->password), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->password), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967293U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 2U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_tpg_auth_show_password(struct se_portal_group *se_tpg , char *page ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_show_password(se_tpg, page); return (tmp); } } static ssize_t iscsi_tpg_auth_store_password(struct se_portal_group *se_tpg , char const *page , size_t count ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_store_password(se_tpg, page, count); return (tmp); } } static struct target_fabric_tpg_auth_attribute iscsi_tpg_auth_password = {{"password", & __this_module, 420U}, & iscsi_tpg_auth_show_password, & iscsi_tpg_auth_store_password}; static ssize_t __iscsi_tpg_auth_show_authenticate_target(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%d\n", auth->authenticate_target); return ((ssize_t )tmp___1); } } static ssize_t iscsi_tpg_auth_show_authenticate_target(struct se_portal_group *se_tpg , char *page ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_show_authenticate_target(se_tpg, page); return (tmp); } } static struct target_fabric_tpg_auth_attribute iscsi_tpg_auth_authenticate_target = {{"authenticate_target", & __this_module, 292U}, & iscsi_tpg_auth_show_authenticate_target, 0}; static ssize_t __iscsi_tpg_auth_show_userid_mutual(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->userid_mutual)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_tpg_auth_store_userid_mutual(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } snprintf((char *)(& auth->userid_mutual), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->userid_mutual), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967291U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 4U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_tpg_auth_show_userid_mutual(struct se_portal_group *se_tpg , char *page ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_show_userid_mutual(se_tpg, page); return (tmp); } } static ssize_t iscsi_tpg_auth_store_userid_mutual(struct se_portal_group *se_tpg , char const *page , size_t count ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_store_userid_mutual(se_tpg, page, count); return (tmp); } } static struct target_fabric_tpg_auth_attribute iscsi_tpg_auth_userid_mutual = {{"userid_mutual", & __this_module, 420U}, & iscsi_tpg_auth_show_userid_mutual, & iscsi_tpg_auth_store_userid_mutual}; static ssize_t __iscsi_tpg_auth_show_password_mutual(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->password_mutual)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_tpg_auth_store_password_mutual(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; auth = & tpg->tpg_demo_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } snprintf((char *)(& auth->password_mutual), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->password_mutual), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967287U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 8U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_tpg_auth_show_password_mutual(struct se_portal_group *se_tpg , char *page ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_show_password_mutual(se_tpg, page); return (tmp); } } static ssize_t iscsi_tpg_auth_store_password_mutual(struct se_portal_group *se_tpg , char const *page , size_t count ) { ssize_t tmp ; { tmp = __iscsi_tpg_auth_store_password_mutual(se_tpg, page, count); return (tmp); } } static struct target_fabric_tpg_auth_attribute iscsi_tpg_auth_password_mutual = {{"password_mutual", & __this_module, 420U}, & iscsi_tpg_auth_show_password_mutual, & iscsi_tpg_auth_store_password_mutual}; static struct configfs_attribute *lio_target_tpg_auth_attrs[6U] = { & iscsi_tpg_auth_userid.attr, & iscsi_tpg_auth_password.attr, & iscsi_tpg_auth_authenticate_target.attr, & iscsi_tpg_auth_userid_mutual.attr, & iscsi_tpg_auth_password_mutual.attr, (struct configfs_attribute *)0}; static ssize_t iscsi_tpg_param_show_AuthMethod(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"AuthMethod", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_AuthMethod(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"AuthMethod", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_AuthMethod = {{"AuthMethod", & __this_module, 420U}, & iscsi_tpg_param_show_AuthMethod, & iscsi_tpg_param_store_AuthMethod}; static ssize_t iscsi_tpg_param_show_HeaderDigest(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"HeaderDigest", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_HeaderDigest(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"HeaderDigest", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_HeaderDigest = {{"HeaderDigest", & __this_module, 420U}, & iscsi_tpg_param_show_HeaderDigest, & iscsi_tpg_param_store_HeaderDigest}; static ssize_t iscsi_tpg_param_show_DataDigest(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"DataDigest", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_DataDigest(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"DataDigest", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_DataDigest = {{"DataDigest", & __this_module, 420U}, & iscsi_tpg_param_show_DataDigest, & iscsi_tpg_param_store_DataDigest}; static ssize_t iscsi_tpg_param_show_MaxConnections(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"MaxConnections", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_MaxConnections(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"MaxConnections", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_MaxConnections = {{"MaxConnections", & __this_module, 420U}, & iscsi_tpg_param_show_MaxConnections, & iscsi_tpg_param_store_MaxConnections}; static ssize_t iscsi_tpg_param_show_TargetAlias(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"TargetAlias", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_TargetAlias(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"TargetAlias", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_TargetAlias = {{"TargetAlias", & __this_module, 420U}, & iscsi_tpg_param_show_TargetAlias, & iscsi_tpg_param_store_TargetAlias}; static ssize_t iscsi_tpg_param_show_InitialR2T(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"InitialR2T", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_InitialR2T(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"InitialR2T", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_InitialR2T = {{"InitialR2T", & __this_module, 420U}, & iscsi_tpg_param_show_InitialR2T, & iscsi_tpg_param_store_InitialR2T}; static ssize_t iscsi_tpg_param_show_ImmediateData(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"ImmediateData", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_ImmediateData(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"ImmediateData", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_ImmediateData = {{"ImmediateData", & __this_module, 420U}, & iscsi_tpg_param_show_ImmediateData, & iscsi_tpg_param_store_ImmediateData}; static ssize_t iscsi_tpg_param_show_MaxRecvDataSegmentLength(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"MaxRecvDataSegmentLength", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_MaxRecvDataSegmentLength(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"MaxRecvDataSegmentLength", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_MaxRecvDataSegmentLength = {{"MaxRecvDataSegmentLength", & __this_module, 420U}, & iscsi_tpg_param_show_MaxRecvDataSegmentLength, & iscsi_tpg_param_store_MaxRecvDataSegmentLength}; static ssize_t iscsi_tpg_param_show_MaxXmitDataSegmentLength(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"MaxXmitDataSegmentLength", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_MaxXmitDataSegmentLength(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"MaxXmitDataSegmentLength", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_MaxXmitDataSegmentLength = {{"MaxXmitDataSegmentLength", & __this_module, 420U}, & iscsi_tpg_param_show_MaxXmitDataSegmentLength, & iscsi_tpg_param_store_MaxXmitDataSegmentLength}; static ssize_t iscsi_tpg_param_show_MaxBurstLength(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"MaxBurstLength", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_MaxBurstLength(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"MaxBurstLength", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_MaxBurstLength = {{"MaxBurstLength", & __this_module, 420U}, & iscsi_tpg_param_show_MaxBurstLength, & iscsi_tpg_param_store_MaxBurstLength}; static ssize_t iscsi_tpg_param_show_FirstBurstLength(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"FirstBurstLength", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_FirstBurstLength(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"FirstBurstLength", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_FirstBurstLength = {{"FirstBurstLength", & __this_module, 420U}, & iscsi_tpg_param_show_FirstBurstLength, & iscsi_tpg_param_store_FirstBurstLength}; static ssize_t iscsi_tpg_param_show_DefaultTime2Wait(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"DefaultTime2Wait", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_DefaultTime2Wait(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"DefaultTime2Wait", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_DefaultTime2Wait = {{"DefaultTime2Wait", & __this_module, 420U}, & iscsi_tpg_param_show_DefaultTime2Wait, & iscsi_tpg_param_store_DefaultTime2Wait}; static ssize_t iscsi_tpg_param_show_DefaultTime2Retain(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"DefaultTime2Retain", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_DefaultTime2Retain(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"DefaultTime2Retain", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_DefaultTime2Retain = {{"DefaultTime2Retain", & __this_module, 420U}, & iscsi_tpg_param_show_DefaultTime2Retain, & iscsi_tpg_param_store_DefaultTime2Retain}; static ssize_t iscsi_tpg_param_show_MaxOutstandingR2T(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"MaxOutstandingR2T", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_MaxOutstandingR2T(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"MaxOutstandingR2T", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_MaxOutstandingR2T = {{"MaxOutstandingR2T", & __this_module, 420U}, & iscsi_tpg_param_show_MaxOutstandingR2T, & iscsi_tpg_param_store_MaxOutstandingR2T}; static ssize_t iscsi_tpg_param_show_DataPDUInOrder(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"DataPDUInOrder", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_DataPDUInOrder(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"DataPDUInOrder", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_DataPDUInOrder = {{"DataPDUInOrder", & __this_module, 420U}, & iscsi_tpg_param_show_DataPDUInOrder, & iscsi_tpg_param_store_DataPDUInOrder}; static ssize_t iscsi_tpg_param_show_DataSequenceInOrder(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"DataSequenceInOrder", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_DataSequenceInOrder(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"DataSequenceInOrder", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_DataSequenceInOrder = {{"DataSequenceInOrder", & __this_module, 420U}, & iscsi_tpg_param_show_DataSequenceInOrder, & iscsi_tpg_param_store_DataSequenceInOrder}; static ssize_t iscsi_tpg_param_show_ErrorRecoveryLevel(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"ErrorRecoveryLevel", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_ErrorRecoveryLevel(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"ErrorRecoveryLevel", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_ErrorRecoveryLevel = {{"ErrorRecoveryLevel", & __this_module, 420U}, & iscsi_tpg_param_show_ErrorRecoveryLevel, & iscsi_tpg_param_store_ErrorRecoveryLevel}; static ssize_t iscsi_tpg_param_show_IFMarker(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"IFMarker", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_IFMarker(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"IFMarker", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_IFMarker = {{"IFMarker", & __this_module, 420U}, & iscsi_tpg_param_show_IFMarker, & iscsi_tpg_param_store_IFMarker}; static ssize_t iscsi_tpg_param_show_OFMarker(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"OFMarker", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_OFMarker(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"OFMarker", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_OFMarker = {{"OFMarker", & __this_module, 420U}, & iscsi_tpg_param_show_OFMarker, & iscsi_tpg_param_store_OFMarker}; static ssize_t iscsi_tpg_param_show_IFMarkInt(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"IFMarkInt", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_IFMarkInt(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"IFMarkInt", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_IFMarkInt = {{"IFMarkInt", & __this_module, 420U}, & iscsi_tpg_param_show_IFMarkInt, & iscsi_tpg_param_store_IFMarkInt}; static ssize_t iscsi_tpg_param_show_OFMarkInt(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; struct iscsi_param *param ; ssize_t rb ; int tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = iscsit_get_tpg(tpg); if (tmp < 0) { return (-22L); } else { } param = iscsi_find_param_from_key((char *)"OFMarkInt", tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { iscsit_put_tpg(tpg); return (-22L); } else { } tmp___0 = snprintf(page, 4096UL, "%s\n", param->value); rb = (ssize_t )tmp___0; iscsit_put_tpg(tpg); return (rb); } } static ssize_t iscsi_tpg_param_store_OFMarkInt(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; char *buf ; int ret ; int len ; void *tmp ; int tmp___0 ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tmp = kzalloc(4096UL, 208U); buf = (char *)tmp; if ((unsigned long )buf == (unsigned long )((char *)0)) { return (-12L); } else { } len = snprintf(buf, 4096UL, "%s=%s", (char *)"OFMarkInt", page); if (((int )_ctype[(int )((unsigned char )*(buf + ((unsigned long )len + 0xffffffffffffffffUL)))] & 32) != 0) { *(buf + ((unsigned long )len + 0xffffffffffffffffUL)) = 0; } else { } tmp___0 = iscsit_get_tpg(tpg); if (tmp___0 < 0) { kfree((void const *)buf); return (-22L); } else { } ret = iscsi_change_param_value(buf, tpg->param_list, 1); if (ret < 0) { goto out; } else { } kfree((void const *)buf); iscsit_put_tpg(tpg); return ((ssize_t )count); out: kfree((void const *)buf); iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_param_attribute iscsi_tpg_param_OFMarkInt = {{"OFMarkInt", & __this_module, 420U}, & iscsi_tpg_param_show_OFMarkInt, & iscsi_tpg_param_store_OFMarkInt}; static struct configfs_attribute *lio_target_tpg_param_attrs[22U] = { & iscsi_tpg_param_AuthMethod.attr, & iscsi_tpg_param_HeaderDigest.attr, & iscsi_tpg_param_DataDigest.attr, & iscsi_tpg_param_MaxConnections.attr, & iscsi_tpg_param_TargetAlias.attr, & iscsi_tpg_param_InitialR2T.attr, & iscsi_tpg_param_ImmediateData.attr, & iscsi_tpg_param_MaxRecvDataSegmentLength.attr, & iscsi_tpg_param_MaxXmitDataSegmentLength.attr, & iscsi_tpg_param_MaxBurstLength.attr, & iscsi_tpg_param_FirstBurstLength.attr, & iscsi_tpg_param_DefaultTime2Wait.attr, & iscsi_tpg_param_DefaultTime2Retain.attr, & iscsi_tpg_param_MaxOutstandingR2T.attr, & iscsi_tpg_param_DataPDUInOrder.attr, & iscsi_tpg_param_DataSequenceInOrder.attr, & iscsi_tpg_param_ErrorRecoveryLevel.attr, & iscsi_tpg_param_IFMarker.attr, & iscsi_tpg_param_OFMarker.attr, & iscsi_tpg_param_IFMarkInt.attr, & iscsi_tpg_param_OFMarkInt.attr, (struct configfs_attribute *)0}; static ssize_t lio_target_tpg_show_enable(struct se_portal_group *se_tpg , char *page ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; ssize_t len ; int tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; spin_lock(& tpg->tpg_state_lock); tmp = sprintf(page, "%d\n", (unsigned int )tpg->tpg_state == 1U); len = (ssize_t )tmp; spin_unlock(& tpg->tpg_state_lock); return (len); } } static ssize_t lio_target_tpg_store_enable(struct se_portal_group *se_tpg , char const *page , size_t count ) { struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr ; u32 op ; int ret ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; ret = kstrtou32(page, 0U, & op); if (ret != 0) { return ((ssize_t )ret); } else { } if (op != 1U && op != 0U) { printk("\vIllegal value for tpg_enable: %u\n", op); return (-22L); } else { } ret = iscsit_get_tpg(tpg); if (ret < 0) { return (-22L); } else { } if (op != 0U) { ret = iscsit_tpg_enable_portal_group(tpg); if (ret < 0) { goto out; } else { } } else { ret = iscsit_tpg_disable_portal_group(tpg, 1); if (ret < 0) { goto out; } else { } } iscsit_put_tpg(tpg); return ((ssize_t )count); out: iscsit_put_tpg(tpg); return (-22L); } } static struct target_fabric_tpg_attribute lio_target_tpg_enable = {{"enable", & __this_module, 420U}, & lio_target_tpg_show_enable, & lio_target_tpg_store_enable}; static ssize_t lio_target_tpg_show_dynamic_sessions(struct se_portal_group *se_tpg , char *page ) { ssize_t tmp ; { tmp = target_show_dynamic_sessions(se_tpg, page); return (tmp); } } static struct target_fabric_tpg_attribute lio_target_tpg_dynamic_sessions = {{"dynamic_sessions", & __this_module, 292U}, & lio_target_tpg_show_dynamic_sessions, 0}; static struct configfs_attribute *lio_target_tpg_attrs[3U] = { & lio_target_tpg_enable.attr, & lio_target_tpg_dynamic_sessions.attr, (struct configfs_attribute *)0}; static struct se_portal_group *lio_target_tiqn_addtpg(struct se_wwn *wwn , struct config_group *group , char const *name ) { struct iscsi_portal_group *tpg ; struct iscsi_tiqn *tiqn ; char *tpgt_str ; int ret ; u16 tpgt ; struct se_wwn const *__mptr ; struct _ddebug descriptor ; long tmp ; struct _ddebug descriptor___0 ; long tmp___0 ; { __mptr = (struct se_wwn const *)wwn; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffe58UL; tpgt_str = strstr(name, "tpgt_"); if ((unsigned long )tpgt_str == (unsigned long )((char *)0)) { printk("\vUnable to locate \"tpgt_#\" directory group\n"); return ((struct se_portal_group *)0); } else { } tpgt_str = tpgt_str + 5UL; ret = kstrtou16((char const *)tpgt_str, 0U, & tpgt); if (ret != 0) { return ((struct se_portal_group *)0); } else { } tpg = iscsit_alloc_portal_group(tiqn, (int )tpgt); if ((unsigned long )tpg == (unsigned long )((struct iscsi_portal_group *)0)) { return ((struct se_portal_group *)0); } else { } ret = core_tpg_register(wwn, & tpg->tpg_se_tpg, 5); if (ret < 0) { return ((struct se_portal_group *)0); } else { } ret = iscsit_tpg_add_portal_group(tiqn, tpg); if (ret != 0) { goto out; } else { } descriptor.modname = "iscsi_target_mod"; descriptor.function = "lio_target_tiqn_addtpg"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "LIO_Target_ConfigFS: REGISTER -> %s\n"; descriptor.lineno = 1430U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "LIO_Target_ConfigFS: REGISTER -> %s\n", (unsigned char *)(& tiqn->tiqn)); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "lio_target_tiqn_addtpg"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor___0.format = "LIO_Target_ConfigFS: REGISTER -> Allocated TPG: %s\n"; descriptor___0.lineno = 1432U; descriptor___0.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor___0, "LIO_Target_ConfigFS: REGISTER -> Allocated TPG: %s\n", name); } else { } return (& tpg->tpg_se_tpg); out: core_tpg_deregister(& tpg->tpg_se_tpg); kfree((void const *)tpg); return ((struct se_portal_group *)0); } } static void lio_target_tiqn_deltpg(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tpg ; struct iscsi_tiqn *tiqn ; struct se_portal_group const *__mptr ; struct _ddebug descriptor ; long tmp ; { __mptr = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL; tiqn = tpg->tpg_tiqn; descriptor.modname = "iscsi_target_mod"; descriptor.function = "lio_target_tiqn_deltpg"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "LIO_Target_ConfigFS: DEREGISTER -> Releasing TPG\n"; descriptor.lineno = 1450U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "LIO_Target_ConfigFS: DEREGISTER -> Releasing TPG\n"); } else { } iscsit_tpg_del_portal_group(tiqn, tpg, 1); return; } } static ssize_t lio_target_wwn_show_attr_lio_version(struct target_fabric_configfs *tf , char *page ) { int tmp ; { tmp = sprintf(page, "Datera Inc. iSCSI Target v4.1.0\n"); return ((ssize_t )tmp); } } static struct target_fabric_wwn_attribute lio_target_wwn_lio_version = {{"lio_version", & __this_module, 292U}, & lio_target_wwn_show_attr_lio_version, 0}; static struct configfs_attribute *lio_target_wwn_attrs[2U] = { & lio_target_wwn_lio_version.attr, (struct configfs_attribute *)0}; static struct se_wwn *lio_target_call_coreaddtiqn(struct target_fabric_configfs *tf , struct config_group *group , char const *name ) { struct config_group *stats_cg ; struct iscsi_tiqn *tiqn ; void *tmp ; bool tmp___0 ; void *tmp___1 ; void *tmp___2 ; struct _ddebug descriptor ; long tmp___3 ; struct _ddebug descriptor___0 ; long tmp___4 ; { tiqn = iscsit_add_tiqn((unsigned char *)name); tmp___0 = IS_ERR((void const *)tiqn); if ((int )tmp___0) { tmp = ERR_CAST((void const *)tiqn); return ((struct se_wwn *)tmp); } else { } stats_cg = & tiqn->tiqn_wwn.fabric_stat_group; tmp___1 = kmalloc(48UL, 208U); stats_cg->default_groups = (struct config_group **)tmp___1; if ((unsigned long )stats_cg->default_groups == (unsigned long )((struct config_group **)0)) { printk("\vUnable to allocate memory for stats_cg->default_groups\n"); iscsit_del_tiqn(tiqn); tmp___2 = ERR_PTR(-12L); return ((struct se_wwn *)tmp___2); } else { } *(stats_cg->default_groups) = & tiqn->tiqn_stat_grps.iscsi_instance_group; *(stats_cg->default_groups + 1UL) = & tiqn->tiqn_stat_grps.iscsi_sess_err_group; *(stats_cg->default_groups + 2UL) = & tiqn->tiqn_stat_grps.iscsi_tgt_attr_group; *(stats_cg->default_groups + 3UL) = & tiqn->tiqn_stat_grps.iscsi_login_stats_group; *(stats_cg->default_groups + 4UL) = & tiqn->tiqn_stat_grps.iscsi_logout_stats_group; *(stats_cg->default_groups + 5UL) = (struct config_group *)0; config_group_init_type_name(& tiqn->tiqn_stat_grps.iscsi_instance_group, "iscsi_instance", & iscsi_stat_instance_cit); config_group_init_type_name(& tiqn->tiqn_stat_grps.iscsi_sess_err_group, "iscsi_sess_err", & iscsi_stat_sess_err_cit); config_group_init_type_name(& tiqn->tiqn_stat_grps.iscsi_tgt_attr_group, "iscsi_tgt_attr", & iscsi_stat_tgt_attr_cit); config_group_init_type_name(& tiqn->tiqn_stat_grps.iscsi_login_stats_group, "iscsi_login_stats", & iscsi_stat_login_cit); config_group_init_type_name(& tiqn->tiqn_stat_grps.iscsi_logout_stats_group, "iscsi_logout_stats", & iscsi_stat_logout_cit); descriptor.modname = "iscsi_target_mod"; descriptor.function = "lio_target_call_coreaddtiqn"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "LIO_Target_ConfigFS: REGISTER -> %s\n"; descriptor.lineno = 1514U; descriptor.flags = 0U; tmp___3 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___3 != 0L) { __dynamic_pr_debug(& descriptor, "LIO_Target_ConfigFS: REGISTER -> %s\n", (unsigned char *)(& tiqn->tiqn)); } else { } descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "lio_target_call_coreaddtiqn"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor___0.format = "LIO_Target_ConfigFS: REGISTER -> Allocated Node: %s\n"; descriptor___0.lineno = 1516U; descriptor___0.flags = 0U; tmp___4 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___4 != 0L) { __dynamic_pr_debug(& descriptor___0, "LIO_Target_ConfigFS: REGISTER -> Allocated Node: %s\n", name); } else { } return (& tiqn->tiqn_wwn); } } static void lio_target_call_coredeltiqn(struct se_wwn *wwn ) { struct iscsi_tiqn *tiqn ; struct se_wwn const *__mptr ; struct config_item *df_item ; struct config_group *stats_cg ; int i ; struct _ddebug descriptor ; long tmp ; { __mptr = (struct se_wwn const *)wwn; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffe58UL; stats_cg = & tiqn->tiqn_wwn.fabric_stat_group; i = 0; goto ldv_60395; ldv_60394: df_item = & (*(stats_cg->default_groups + (unsigned long )i))->cg_item; *(stats_cg->default_groups + (unsigned long )i) = (struct config_group *)0; config_item_put(df_item); i = i + 1; ldv_60395: ; if ((unsigned long )*(stats_cg->default_groups + (unsigned long )i) != (unsigned long )((struct config_group *)0)) { goto ldv_60394; } else { } kfree((void const *)stats_cg->default_groups); descriptor.modname = "iscsi_target_mod"; descriptor.function = "lio_target_call_coredeltiqn"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "LIO_Target_ConfigFS: DEREGISTER -> %s\n"; descriptor.lineno = 1537U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "LIO_Target_ConfigFS: DEREGISTER -> %s\n", (unsigned char *)(& tiqn->tiqn)); } else { } iscsit_del_tiqn(tiqn); return; } } static ssize_t __iscsi_disc_show_userid(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->userid)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_disc_store_userid(struct iscsi_node_acl *nacl , char const *page , size_t count ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } if (count > 255UL) { return (-22L); } else { } snprintf((char *)(& auth->userid), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->userid), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967294U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 1U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_disc_show_userid(struct target_fabric_configfs *tf , char *page ) { ssize_t tmp ; { tmp = __iscsi_disc_show_userid(& iscsit_global->discovery_acl, page); return (tmp); } } static ssize_t iscsi_disc_store_userid(struct target_fabric_configfs *tf , char const *page , size_t count ) { ssize_t tmp ; { tmp = __iscsi_disc_store_userid(& iscsit_global->discovery_acl, page, count); return (tmp); } } static struct target_fabric_discovery_attribute iscsi_disc_userid = {{"userid", & __this_module, 420U}, & iscsi_disc_show_userid, & iscsi_disc_store_userid}; static ssize_t __iscsi_disc_show_password(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->password)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_disc_store_password(struct iscsi_node_acl *nacl , char const *page , size_t count ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } if (count > 255UL) { return (-22L); } else { } snprintf((char *)(& auth->password), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->password), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967293U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 2U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_disc_show_password(struct target_fabric_configfs *tf , char *page ) { ssize_t tmp ; { tmp = __iscsi_disc_show_password(& iscsit_global->discovery_acl, page); return (tmp); } } static ssize_t iscsi_disc_store_password(struct target_fabric_configfs *tf , char const *page , size_t count ) { ssize_t tmp ; { tmp = __iscsi_disc_store_password(& iscsit_global->discovery_acl, page, count); return (tmp); } } static struct target_fabric_discovery_attribute iscsi_disc_password = {{"password", & __this_module, 420U}, & iscsi_disc_show_password, & iscsi_disc_store_password}; static ssize_t __iscsi_disc_show_authenticate_target(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%d\n", auth->authenticate_target); return ((ssize_t )tmp___1); } } static ssize_t iscsi_disc_show_authenticate_target(struct target_fabric_configfs *tf , char *page ) { ssize_t tmp ; { tmp = __iscsi_disc_show_authenticate_target(& iscsit_global->discovery_acl, page); return (tmp); } } static struct target_fabric_discovery_attribute iscsi_disc_authenticate_target = {{"authenticate_target", & __this_module, 292U}, & iscsi_disc_show_authenticate_target, 0}; static ssize_t __iscsi_disc_show_userid_mutual(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->userid_mutual)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_disc_store_userid_mutual(struct iscsi_node_acl *nacl , char const *page , size_t count ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } if (count > 255UL) { return (-22L); } else { } snprintf((char *)(& auth->userid_mutual), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->userid_mutual), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967291U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 4U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_disc_show_userid_mutual(struct target_fabric_configfs *tf , char *page ) { ssize_t tmp ; { tmp = __iscsi_disc_show_userid_mutual(& iscsit_global->discovery_acl, page); return (tmp); } } static ssize_t iscsi_disc_store_userid_mutual(struct target_fabric_configfs *tf , char const *page , size_t count ) { ssize_t tmp ; { tmp = __iscsi_disc_store_userid_mutual(& iscsit_global->discovery_acl, page, count); return (tmp); } } static struct target_fabric_discovery_attribute iscsi_disc_userid_mutual = {{"userid_mutual", & __this_module, 420U}, & iscsi_disc_show_userid_mutual, & iscsi_disc_store_userid_mutual}; static ssize_t __iscsi_disc_show_password_mutual(struct iscsi_node_acl *nacl , char *page ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } tmp___1 = snprintf(page, 4096UL, "%s\n", (char *)(& auth->password_mutual)); return ((ssize_t )tmp___1); } } static ssize_t __iscsi_disc_store_password_mutual(struct iscsi_node_acl *nacl , char const *page , size_t count ) { struct iscsi_node_auth *auth ; bool tmp ; int tmp___0 ; int tmp___1 ; { auth = & nacl->node_auth; tmp = capable(21); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { return (-1L); } else { } if (count > 255UL) { return (-22L); } else { } snprintf((char *)(& auth->password_mutual), 256UL, "%s", page); tmp___1 = strncmp("NULL", (char const *)(& auth->password_mutual), 4UL); if (tmp___1 == 0) { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags & 4294967287U); } else { auth->naf_flags = (enum naf_flags_table )((unsigned int )auth->naf_flags | 8U); } if (((unsigned int )auth->naf_flags & 4U) != 0U && ((unsigned int )auth->naf_flags & 8U) != 0U) { auth->authenticate_target = 1; } else { auth->authenticate_target = 0; } return ((ssize_t )count); } } static ssize_t iscsi_disc_show_password_mutual(struct target_fabric_configfs *tf , char *page ) { ssize_t tmp ; { tmp = __iscsi_disc_show_password_mutual(& iscsit_global->discovery_acl, page); return (tmp); } } static ssize_t iscsi_disc_store_password_mutual(struct target_fabric_configfs *tf , char const *page , size_t count ) { ssize_t tmp ; { tmp = __iscsi_disc_store_password_mutual(& iscsit_global->discovery_acl, page, count); return (tmp); } } static struct target_fabric_discovery_attribute iscsi_disc_password_mutual = {{"password_mutual", & __this_module, 420U}, & iscsi_disc_show_password_mutual, & iscsi_disc_store_password_mutual}; static ssize_t iscsi_disc_show_enforce_discovery_auth(struct target_fabric_configfs *tf , char *page ) { struct iscsi_node_auth *discovery_auth ; int tmp ; { discovery_auth = & iscsit_global->discovery_acl.node_auth; tmp = sprintf(page, "%d\n", discovery_auth->enforce_discovery_auth); return ((ssize_t )tmp); } } static ssize_t iscsi_disc_store_enforce_discovery_auth(struct target_fabric_configfs *tf , char const *page , size_t count ) { struct iscsi_param *param ; struct iscsi_portal_group *discovery_tpg ; u32 op ; int err ; int tmp ; struct _ddebug descriptor ; long tmp___0 ; int tmp___1 ; struct _ddebug descriptor___0 ; long tmp___2 ; { discovery_tpg = iscsit_global->discovery_tpg; err = kstrtou32(page, 0U, & op); if (err != 0) { return (-22L); } else { } if (op != 1U && op != 0U) { printk("\vIllegal value for enforce_discovery_auth: %u\n", op); return (-22L); } else { } if ((unsigned long )discovery_tpg == (unsigned long )((struct iscsi_portal_group *)0)) { printk("\viscsit_global->discovery_tpg is NULL\n"); return (-22L); } else { } param = iscsi_find_param_from_key((char *)"AuthMethod", discovery_tpg->param_list); if ((unsigned long )param == (unsigned long )((struct iscsi_param *)0)) { return (-22L); } else { } if (op != 0U) { tmp = iscsi_update_param_value(param, (char *)"CHAP"); if (tmp < 0) { return (-22L); } else { } discovery_tpg->tpg_attrib.authentication = 1U; iscsit_global->discovery_acl.node_auth.enforce_discovery_auth = 1; descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsi_disc_store_enforce_discovery_auth"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "LIO-CORE[0] Successfully enabled authentication enforcement for iSCSI Discovery TPG\n"; descriptor.lineno = 1654U; descriptor.flags = 0U; tmp___0 = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp___0 != 0L) { __dynamic_pr_debug(& descriptor, "LIO-CORE[0] Successfully enabled authentication enforcement for iSCSI Discovery TPG\n"); } else { } } else { tmp___1 = iscsi_update_param_value(param, (char *)"CHAP,None"); if (tmp___1 < 0) { return (-22L); } else { } discovery_tpg->tpg_attrib.authentication = 0U; iscsit_global->discovery_acl.node_auth.enforce_discovery_auth = 0; descriptor___0.modname = "iscsi_target_mod"; descriptor___0.function = "iscsi_disc_store_enforce_discovery_auth"; descriptor___0.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor___0.format = "LIO-CORE[0] Successfully disabled authentication enforcement for iSCSI Discovery TPG\n"; descriptor___0.lineno = 1666U; descriptor___0.flags = 0U; tmp___2 = ldv__builtin_expect((long )descriptor___0.flags & 1L, 0L); if (tmp___2 != 0L) { __dynamic_pr_debug(& descriptor___0, "LIO-CORE[0] Successfully disabled authentication enforcement for iSCSI Discovery TPG\n"); } else { } } return ((ssize_t )count); } } static struct target_fabric_discovery_attribute iscsi_disc_enforce_discovery_auth = {{"enforce_discovery_auth", & __this_module, 420U}, & iscsi_disc_show_enforce_discovery_auth, & iscsi_disc_store_enforce_discovery_auth}; static struct configfs_attribute *lio_target_discovery_auth_attrs[7U] = { & iscsi_disc_userid.attr, & iscsi_disc_password.attr, & iscsi_disc_authenticate_target.attr, & iscsi_disc_userid_mutual.attr, & iscsi_disc_password_mutual.attr, & iscsi_disc_enforce_discovery_auth.attr, (struct configfs_attribute *)0}; static char *iscsi_get_fabric_name(void) { { return ((char *)"iSCSI"); } } static int iscsi_get_cmd_state(struct se_cmd *se_cmd ) { struct iscsi_cmd *cmd ; struct se_cmd const *__mptr ; { __mptr = (struct se_cmd const *)se_cmd; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc70UL; return ((int )cmd->i_state); } } static u32 lio_sess_get_index(struct se_session *se_sess ) { struct iscsi_session *sess ; { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; return ((u32 )sess->session_index); } } static u32 lio_sess_get_initiator_sid(struct se_session *se_sess , unsigned char *buf , u32 size ) { struct iscsi_session *sess ; int tmp ; { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; tmp = snprintf((char *)buf, (size_t )size, "%6phN", (u8 *)(& sess->isid)); return ((u32 )tmp); } } static int lio_queue_data_in(struct se_cmd *se_cmd ) { struct iscsi_cmd *cmd ; struct se_cmd const *__mptr ; { __mptr = (struct se_cmd const *)se_cmd; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc70UL; cmd->i_state = 12; (*(((cmd->conn)->conn_transport)->iscsit_queue_data_in))(cmd->conn, cmd); return (0); } } static int lio_write_pending(struct se_cmd *se_cmd ) { struct iscsi_cmd *cmd ; struct se_cmd const *__mptr ; struct iscsi_conn *conn ; int tmp ; { __mptr = (struct se_cmd const *)se_cmd; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc70UL; conn = cmd->conn; if ((unsigned int )cmd->immediate_data == 0U && (unsigned int )cmd->unsolicited_data == 0U) { tmp = (*((conn->conn_transport)->iscsit_get_dataout))(conn, cmd, 0); return (tmp); } else { } return (0); } } static int lio_write_pending_status(struct se_cmd *se_cmd ) { struct iscsi_cmd *cmd ; struct se_cmd const *__mptr ; int ret ; { __mptr = (struct se_cmd const *)se_cmd; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc70UL; spin_lock_bh(& cmd->istate_lock); ret = ((unsigned int )cmd->cmd_flags & 1U) == 0U; spin_unlock_bh(& cmd->istate_lock); return (ret); } } static int lio_queue_status(struct se_cmd *se_cmd ) { struct iscsi_cmd *cmd ; struct se_cmd const *__mptr ; { __mptr = (struct se_cmd const *)se_cmd; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc70UL; cmd->i_state = 29; if ((unsigned int )cmd->se_cmd.scsi_status != 0U || cmd->sense_reason != 0U) { iscsit_add_cmd_to_response_queue(cmd, cmd->conn, (int )((u8 )cmd->i_state)); return (0); } else { } (*(((cmd->conn)->conn_transport)->iscsit_queue_status))(cmd->conn, cmd); return (0); } } static void lio_queue_tm_rsp(struct se_cmd *se_cmd ) { struct iscsi_cmd *cmd ; struct se_cmd const *__mptr ; { __mptr = (struct se_cmd const *)se_cmd; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc70UL; cmd->i_state = 34; iscsit_add_cmd_to_response_queue(cmd, cmd->conn, (int )((u8 )cmd->i_state)); return; } } static void lio_aborted_task(struct se_cmd *se_cmd ) { struct iscsi_cmd *cmd ; struct se_cmd const *__mptr ; { __mptr = (struct se_cmd const *)se_cmd; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc70UL; (*(((cmd->conn)->conn_transport)->iscsit_aborted_task))(cmd->conn, cmd); return; } } __inline static struct iscsi_portal_group *iscsi_tpg(struct se_portal_group *se_tpg ) { struct se_portal_group const *__mptr ; { __mptr = (struct se_portal_group const *)se_tpg; return ((struct iscsi_portal_group *)__mptr + 0xffffffffffffff58UL); } } static char *lio_tpg_get_endpoint_wwn(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; { tmp = iscsi_tpg(se_tpg); return ((char *)(& (tmp->tpg_tiqn)->tiqn)); } } static u16 lio_tpg_get_tag(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; { tmp = iscsi_tpg(se_tpg); return (tmp->tpgt); } } static u32 lio_tpg_get_default_depth(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; { tmp = iscsi_tpg(se_tpg); return (tmp->tpg_attrib.default_cmdsn_depth); } } static int lio_tpg_check_demo_mode(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; { tmp = iscsi_tpg(se_tpg); return ((int )tmp->tpg_attrib.generate_node_acls); } } static int lio_tpg_check_demo_mode_cache(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; { tmp = iscsi_tpg(se_tpg); return ((int )tmp->tpg_attrib.cache_dynamic_acls); } } static int lio_tpg_check_demo_mode_write_protect(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; { tmp = iscsi_tpg(se_tpg); return ((int )tmp->tpg_attrib.demo_mode_write_protect); } } static int lio_tpg_check_prod_mode_write_protect(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; { tmp = iscsi_tpg(se_tpg); return ((int )tmp->tpg_attrib.prod_mode_write_protect); } } static int lio_tpg_check_prot_fabric_only(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; struct iscsi_portal_group *tmp___0 ; { tmp = iscsi_tpg(se_tpg); if ((unsigned int )tmp->tpg_attrib.t10_pi == 0U) { return (0); } else { } tmp___0 = iscsi_tpg(se_tpg); return ((int )tmp___0->tpg_attrib.fabric_prot_type); } } static int lio_tpg_shutdown_session(struct se_session *se_sess ) { struct iscsi_session *sess ; int tmp ; int tmp___0 ; { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; spin_lock(& sess->conn_lock); tmp = atomic_read((atomic_t const *)(& sess->session_fall_back_to_erl0)); if (tmp != 0) { spin_unlock(& sess->conn_lock); return (0); } else { tmp___0 = atomic_read((atomic_t const *)(& sess->session_logout)); if (tmp___0 != 0) { spin_unlock(& sess->conn_lock); return (0); } else if (((unsigned int )sess->time2retain_timer_flags & 4U) != 0U) { spin_unlock(& sess->conn_lock); return (0); } else { } } atomic_set(& sess->session_reinstatement, 1); spin_unlock(& sess->conn_lock); iscsit_stop_time2retain_timer(sess); iscsit_stop_session(sess, 1, 1); return (1); } } static void lio_tpg_close_session(struct se_session *se_sess ) { struct iscsi_session *sess ; { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; iscsit_close_session(sess); return; } } static u32 lio_tpg_get_inst_index(struct se_portal_group *se_tpg ) { struct iscsi_portal_group *tmp ; { tmp = iscsi_tpg(se_tpg); return ((u32 )(tmp->tpg_tiqn)->tiqn_index); } } static void lio_set_default_node_attributes(struct se_node_acl *se_acl ) { struct iscsi_node_acl *acl ; struct se_node_acl const *__mptr ; struct se_portal_group *se_tpg ; struct iscsi_portal_group *tpg ; struct se_portal_group const *__mptr___0 ; { __mptr = (struct se_node_acl const *)se_acl; acl = (struct iscsi_node_acl *)__mptr; se_tpg = se_acl->se_tpg; __mptr___0 = (struct se_portal_group const *)se_tpg; tpg = (struct iscsi_portal_group *)__mptr___0 + 0xffffffffffffff58UL; acl->node_attrib.nacl = acl; iscsit_set_default_node_attribues(acl, tpg); return; } } static int lio_check_stop_free(struct se_cmd *se_cmd ) { int tmp ; { tmp = target_put_sess_cmd(se_cmd); return (tmp); } } static void lio_release_cmd(struct se_cmd *se_cmd ) { struct iscsi_cmd *cmd ; struct se_cmd const *__mptr ; struct _ddebug descriptor ; long tmp ; { __mptr = (struct se_cmd const *)se_cmd; cmd = (struct iscsi_cmd *)__mptr + 0xfffffffffffffc70UL; descriptor.modname = "iscsi_target_mod"; descriptor.function = "lio_release_cmd"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_configfs.c"; descriptor.format = "Entering lio_release_cmd for se_cmd: %p\n"; descriptor.lineno = 1902U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Entering lio_release_cmd for se_cmd: %p\n", se_cmd); } else { } iscsit_release_cmd(cmd); return; } } struct target_core_fabric_ops const iscsi_ops = {& __this_module, "iscsi", 2616UL, & iscsi_get_fabric_name, & lio_tpg_get_endpoint_wwn, & lio_tpg_get_tag, & lio_tpg_get_default_depth, & lio_tpg_check_demo_mode, & lio_tpg_check_demo_mode_cache, & lio_tpg_check_demo_mode_write_protect, & lio_tpg_check_prod_mode_write_protect, 0, & lio_tpg_check_prot_fabric_only, & lio_tpg_get_inst_index, & lio_check_stop_free, & lio_release_cmd, & lio_tpg_shutdown_session, & lio_tpg_close_session, & lio_sess_get_index, & lio_sess_get_initiator_sid, & lio_write_pending, & lio_write_pending_status, & lio_set_default_node_attributes, & iscsi_get_cmd_state, & lio_queue_data_in, & lio_queue_status, & lio_queue_tm_rsp, & lio_aborted_task, & lio_target_call_coreaddtiqn, & lio_target_call_coredeltiqn, & lio_target_tiqn_addtpg, & lio_target_tiqn_deltpg, 0, 0, & lio_target_call_addnptotpg, & lio_target_call_delnpfromtpg, & lio_target_init_nodeacl, & lio_target_cleanup_nodeacl, (struct configfs_attribute **)(& lio_target_discovery_auth_attrs), (struct configfs_attribute **)(& lio_target_wwn_attrs), (struct configfs_attribute **)(& lio_target_tpg_attrs), (struct configfs_attribute **)(& lio_target_portal_attrs), (struct configfs_attribute **)(& lio_target_tpg_attrib_attrs), (struct configfs_attribute **)(& lio_target_tpg_auth_attrs), (struct configfs_attribute **)(& lio_target_tpg_param_attrs), (struct configfs_attribute **)(& lio_target_initiator_attrs), (struct configfs_attribute **)(& lio_target_nacl_attrib_attrs), (struct configfs_attribute **)(& lio_target_nacl_auth_attrs), (struct configfs_attribute **)(& lio_target_nacl_param_attrs)}; extern int ldv_release_62(void) ; extern int ldv_probe_62(void) ; void ldv_initialize_target_fabric_nacl_auth_attribute_128(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_auth_userid_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_77(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_DataSequenceInOrder_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_core_fabric_ops_62(void) { void *tmp ; void *tmp___0 ; void *tmp___1 ; void *tmp___2 ; void *tmp___3 ; void *tmp___4 ; { tmp = ldv_init_zalloc(1328UL); iscsi_ops_group3 = (struct se_portal_group *)tmp; tmp___0 = ldv_init_zalloc(248UL); iscsi_ops_group2 = (struct se_wwn *)tmp___0; tmp___1 = ldv_init_zalloc(112UL); iscsi_ops_group4 = (struct config_group *)tmp___1; tmp___2 = ldv_init_zalloc(1304UL); iscsi_ops_group5 = (struct se_node_acl *)tmp___2; tmp___3 = ldv_init_zalloc(1536UL); iscsi_ops_group0 = (struct se_session *)tmp___3; tmp___4 = ldv_init_zalloc(832UL); iscsi_ops_group1 = (struct se_cmd *)tmp___4; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_73(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_IFMarkInt_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_91(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_HeaderDigest_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_89(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_MaxConnections_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_72(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_OFMarkInt_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_83(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_MaxBurstLength_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_discovery_attribute_68(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); iscsi_disc_userid_group0 = (struct target_fabric_configfs *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_109(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_authentication_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_auth_attribute_96(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_auth_password_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_nacl_attrib_attribute_132(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_attrib_nopin_response_timeout_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_102(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_prod_mode_write_protect_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_85(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_MaxRecvDataSegmentLength_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_99(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_t10_pi_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_discovery_attribute_67(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); iscsi_disc_password_group0 = (struct target_fabric_configfs *)tmp; return; } } void ldv_initialize_target_fabric_nacl_base_attribute_111(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); lio_target_nacl_cmdsn_depth_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_nacl_auth_attribute_127(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_auth_password_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_92(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_AuthMethod_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_74(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_OFMarker_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_discovery_attribute_64(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); iscsi_disc_password_mutual_group0 = (struct target_fabric_configfs *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_84(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_MaxXmitDataSegmentLength_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_105(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_default_cmdsn_depth_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_78(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_DataPDUInOrder_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_106(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_generate_node_acls_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_86(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_ImmediateData_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_101(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_demo_mode_discovery_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_80(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_DefaultTime2Retain_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_nacl_attrib_attribute_134(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_attrib_default_erl_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_nacl_attrib_attribute_131(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_attrib_random_datain_pdu_offsets_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_75(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_IFMarker_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_79(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_MaxOutstandingR2T_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_98(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_fabric_prot_type_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_auth_attribute_94(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_auth_userid_mutual_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_104(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_cache_dynamic_acls_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_nacl_attrib_attribute_129(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_attrib_random_r2t_offsets_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_100(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_default_erl_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_np_base_attribute_138(void) { void *tmp ; { tmp = ldv_init_zalloc(120UL); lio_target_np_sctp_group0 = (struct se_tpg_np *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_81(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_DefaultTime2Wait_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_87(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_InitialR2T_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_np_base_attribute_137(void) { void *tmp ; { tmp = ldv_init_zalloc(120UL); lio_target_np_iser_group0 = (struct se_tpg_np *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_107(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_netif_timeout_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_auth_attribute_93(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_auth_password_mutual_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_103(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_demo_mode_write_protect_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_nacl_auth_attribute_124(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_auth_password_mutual_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_nacl_auth_attribute_125(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_auth_userid_mutual_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attrib_attribute_108(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_attrib_login_timeout_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_nacl_attrib_attribute_130(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_attrib_random_datain_seq_offsets_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_nacl_attrib_attribute_135(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_attrib_dataout_timeout_retries_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_90(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_DataDigest_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_discovery_attribute_63(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); iscsi_disc_enforce_discovery_auth_group0 = (struct target_fabric_configfs *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_76(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_ErrorRecoveryLevel_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_82(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_FirstBurstLength_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_discovery_attribute_65(void) { void *tmp ; { tmp = __VERIFIER_nondet_pointer(); iscsi_disc_userid_mutual_group0 = (struct target_fabric_configfs *)tmp; return; } } void ldv_initialize_target_fabric_tpg_auth_attribute_97(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_auth_userid_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_nacl_attrib_attribute_133(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_attrib_nopin_timeout_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_nacl_base_attribute_110(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); lio_target_nacl_tag_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_param_attribute_88(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); iscsi_tpg_param_TargetAlias_group0 = (struct se_portal_group *)tmp; return; } } void ldv_initialize_target_fabric_nacl_attrib_attribute_136(void) { void *tmp ; { tmp = ldv_init_zalloc(1304UL); iscsi_nacl_attrib_dataout_timeout_group0 = (struct se_node_acl *)tmp; return; } } void ldv_initialize_target_fabric_tpg_attribute_71(void) { void *tmp ; { tmp = ldv_init_zalloc(1328UL); lio_target_tpg_enable_group0 = (struct se_portal_group *)tmp; return; } } void ldv_main_exported_127(void) { char *ldvarg2 ; void *tmp ; char *ldvarg0 ; void *tmp___0 ; size_t ldvarg1 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg2 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg0 = (char *)tmp___0; ldv_memset((void *)(& ldvarg1), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_127 == 1) { iscsi_nacl_auth_store_password(iscsi_nacl_auth_password_group0, (char const *)ldvarg2, ldvarg1); ldv_state_variable_127 = 1; } else { } goto ldv_60822; case 1: ; if (ldv_state_variable_127 == 1) { iscsi_nacl_auth_show_password(iscsi_nacl_auth_password_group0, ldvarg0); ldv_state_variable_127 = 1; } else { } goto ldv_60822; default: ldv_stop(); } ldv_60822: ; return; } } void ldv_main_exported_90(void) { size_t ldvarg6 ; char *ldvarg5 ; void *tmp ; char *ldvarg7 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg5 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg7 = (char *)tmp___0; ldv_memset((void *)(& ldvarg6), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_90 == 1) { iscsi_tpg_param_store_DataDigest(iscsi_tpg_param_DataDigest_group0, (char const *)ldvarg7, ldvarg6); ldv_state_variable_90 = 1; } else { } goto ldv_60832; case 1: ; if (ldv_state_variable_90 == 1) { iscsi_tpg_param_show_DataDigest(iscsi_tpg_param_DataDigest_group0, ldvarg5); ldv_state_variable_90 = 1; } else { } goto ldv_60832; default: ldv_stop(); } ldv_60832: ; return; } } void ldv_main_exported_63(void) { size_t ldvarg172 ; char *ldvarg173 ; void *tmp ; char *ldvarg171 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg173 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg171 = (char *)tmp___0; ldv_memset((void *)(& ldvarg172), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_63 == 1) { iscsi_disc_store_enforce_discovery_auth(iscsi_disc_enforce_discovery_auth_group0, (char const *)ldvarg173, ldvarg172); ldv_state_variable_63 = 1; } else { } goto ldv_60842; case 1: ; if (ldv_state_variable_63 == 1) { iscsi_disc_show_enforce_discovery_auth(iscsi_disc_enforce_discovery_auth_group0, ldvarg171); ldv_state_variable_63 = 1; } else { } goto ldv_60842; default: ldv_stop(); } ldv_60842: ; return; } } void ldv_main_exported_118(void) { char *ldvarg9 ; void *tmp ; struct se_node_acl *ldvarg8 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg9 = (char *)tmp; tmp___0 = ldv_init_zalloc(1304UL); ldvarg8 = (struct se_node_acl *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_118 == 1) { iscsi_nacl_param_show_DefaultTime2Wait(ldvarg8, ldvarg9); ldv_state_variable_118 = 1; } else { } goto ldv_60851; default: ldv_stop(); } ldv_60851: ; return; } } void ldv_main_exported_71(void) { char *ldvarg12 ; void *tmp ; char *ldvarg10 ; void *tmp___0 ; size_t ldvarg11 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg12 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg10 = (char *)tmp___0; ldv_memset((void *)(& ldvarg11), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_71 == 1) { lio_target_tpg_store_enable(lio_target_tpg_enable_group0, (char const *)ldvarg12, ldvarg11); ldv_state_variable_71 = 1; } else { } goto ldv_60860; case 1: ; if (ldv_state_variable_71 == 1) { lio_target_tpg_show_enable(lio_target_tpg_enable_group0, ldvarg10); ldv_state_variable_71 = 1; } else { } goto ldv_60860; default: ldv_stop(); } ldv_60860: ; return; } } void ldv_main_exported_102(void) { char *ldvarg15 ; void *tmp ; char *ldvarg13 ; void *tmp___0 ; size_t ldvarg14 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg15 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg13 = (char *)tmp___0; ldv_memset((void *)(& ldvarg14), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_102 == 1) { iscsi_tpg_attrib_store_prod_mode_write_protect(iscsi_tpg_attrib_prod_mode_write_protect_group0, (char const *)ldvarg15, ldvarg14); ldv_state_variable_102 = 1; } else { } goto ldv_60870; case 1: ; if (ldv_state_variable_102 == 1) { iscsi_tpg_attrib_show_prod_mode_write_protect(iscsi_tpg_attrib_prod_mode_write_protect_group0, ldvarg13); ldv_state_variable_102 = 1; } else { } goto ldv_60870; default: ldv_stop(); } ldv_60870: ; return; } } void ldv_main_exported_80(void) { char *ldvarg178 ; void *tmp ; char *ldvarg176 ; void *tmp___0 ; size_t ldvarg177 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg178 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg176 = (char *)tmp___0; ldv_memset((void *)(& ldvarg177), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_80 == 1) { iscsi_tpg_param_store_DefaultTime2Retain(iscsi_tpg_param_DefaultTime2Retain_group0, (char const *)ldvarg178, ldvarg177); ldv_state_variable_80 = 1; } else { } goto ldv_60880; case 1: ; if (ldv_state_variable_80 == 1) { iscsi_tpg_param_show_DefaultTime2Retain(iscsi_tpg_param_DefaultTime2Retain_group0, ldvarg176); ldv_state_variable_80 = 1; } else { } goto ldv_60880; default: ldv_stop(); } ldv_60880: ; return; } } void ldv_main_exported_119(void) { struct se_node_acl *ldvarg179 ; void *tmp ; char *ldvarg180 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1304UL); ldvarg179 = (struct se_node_acl *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg180 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_119 == 1) { iscsi_nacl_param_show_FirstBurstLength(ldvarg179, ldvarg180); ldv_state_variable_119 = 1; } else { } goto ldv_60889; default: ldv_stop(); } ldv_60889: ; return; } } void ldv_main_exported_99(void) { size_t ldvarg182 ; char *ldvarg181 ; void *tmp ; char *ldvarg183 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg181 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg183 = (char *)tmp___0; ldv_memset((void *)(& ldvarg182), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_99 == 1) { iscsi_tpg_attrib_store_t10_pi(iscsi_tpg_attrib_t10_pi_group0, (char const *)ldvarg183, ldvarg182); ldv_state_variable_99 = 1; } else { } goto ldv_60898; case 1: ; if (ldv_state_variable_99 == 1) { iscsi_tpg_attrib_show_t10_pi(iscsi_tpg_attrib_t10_pi_group0, ldvarg181); ldv_state_variable_99 = 1; } else { } goto ldv_60898; default: ldv_stop(); } ldv_60898: ; return; } } void ldv_main_exported_72(void) { char *ldvarg184 ; void *tmp ; char *ldvarg186 ; void *tmp___0 ; size_t ldvarg185 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg184 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg186 = (char *)tmp___0; ldv_memset((void *)(& ldvarg185), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_72 == 1) { iscsi_tpg_param_store_OFMarkInt(iscsi_tpg_param_OFMarkInt_group0, (char const *)ldvarg186, ldvarg185); ldv_state_variable_72 = 1; } else { } goto ldv_60908; case 1: ; if (ldv_state_variable_72 == 1) { iscsi_tpg_param_show_OFMarkInt(iscsi_tpg_param_OFMarkInt_group0, ldvarg184); ldv_state_variable_72 = 1; } else { } goto ldv_60908; default: ldv_stop(); } ldv_60908: ; return; } } void ldv_main_exported_125(void) { size_t ldvarg19 ; char *ldvarg20 ; void *tmp ; char *ldvarg18 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg20 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg18 = (char *)tmp___0; ldv_memset((void *)(& ldvarg19), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_125 == 1) { iscsi_nacl_auth_store_userid_mutual(iscsi_nacl_auth_userid_mutual_group0, (char const *)ldvarg20, ldvarg19); ldv_state_variable_125 = 1; } else { } goto ldv_60918; case 1: ; if (ldv_state_variable_125 == 1) { iscsi_nacl_auth_show_userid_mutual(iscsi_nacl_auth_userid_mutual_group0, ldvarg18); ldv_state_variable_125 = 1; } else { } goto ldv_60918; default: ldv_stop(); } ldv_60918: ; return; } } void ldv_main_exported_84(void) { size_t ldvarg28 ; char *ldvarg29 ; void *tmp ; char *ldvarg27 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg29 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg27 = (char *)tmp___0; ldv_memset((void *)(& ldvarg28), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_84 == 1) { iscsi_tpg_param_store_MaxXmitDataSegmentLength(iscsi_tpg_param_MaxXmitDataSegmentLength_group0, (char const *)ldvarg29, ldvarg28); ldv_state_variable_84 = 1; } else { } goto ldv_60928; case 1: ; if (ldv_state_variable_84 == 1) { iscsi_tpg_param_show_MaxXmitDataSegmentLength(iscsi_tpg_param_MaxXmitDataSegmentLength_group0, ldvarg27); ldv_state_variable_84 = 1; } else { } goto ldv_60928; default: ldv_stop(); } ldv_60928: ; return; } } void ldv_main_exported_74(void) { size_t ldvarg188 ; char *ldvarg187 ; void *tmp ; char *ldvarg189 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg187 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg189 = (char *)tmp___0; ldv_memset((void *)(& ldvarg188), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_74 == 1) { iscsi_tpg_param_store_OFMarker(iscsi_tpg_param_OFMarker_group0, (char const *)ldvarg189, ldvarg188); ldv_state_variable_74 = 1; } else { } goto ldv_60938; case 1: ; if (ldv_state_variable_74 == 1) { iscsi_tpg_param_show_OFMarker(iscsi_tpg_param_OFMarker_group0, ldvarg187); ldv_state_variable_74 = 1; } else { } goto ldv_60938; default: ldv_stop(); } ldv_60938: ; return; } } void ldv_main_exported_95(void) { char *ldvarg33 ; void *tmp ; struct se_portal_group *ldvarg32 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg33 = (char *)tmp; tmp___0 = ldv_init_zalloc(1328UL); ldvarg32 = (struct se_portal_group *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_95 == 1) { iscsi_tpg_auth_show_authenticate_target(ldvarg32, ldvarg33); ldv_state_variable_95 = 1; } else { } goto ldv_60947; default: ldv_stop(); } ldv_60947: ; return; } } void ldv_main_exported_108(void) { char *ldvarg194 ; void *tmp ; char *ldvarg192 ; void *tmp___0 ; size_t ldvarg193 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg194 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg192 = (char *)tmp___0; ldv_memset((void *)(& ldvarg193), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_108 == 1) { iscsi_tpg_attrib_store_login_timeout(iscsi_tpg_attrib_login_timeout_group0, (char const *)ldvarg194, ldvarg193); ldv_state_variable_108 = 1; } else { } goto ldv_60956; case 1: ; if (ldv_state_variable_108 == 1) { iscsi_tpg_attrib_show_login_timeout(iscsi_tpg_attrib_login_timeout_group0, ldvarg192); ldv_state_variable_108 = 1; } else { } goto ldv_60956; default: ldv_stop(); } ldv_60956: ; return; } } void ldv_main_exported_115(void) { char *ldvarg196 ; void *tmp ; struct se_node_acl *ldvarg195 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg196 = (char *)tmp; tmp___0 = ldv_init_zalloc(1304UL); ldvarg195 = (struct se_node_acl *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_115 == 1) { iscsi_nacl_param_show_DataPDUInOrder(ldvarg195, ldvarg196); ldv_state_variable_115 = 1; } else { } goto ldv_60965; default: ldv_stop(); } ldv_60965: ; return; } } void ldv_main_exported_109(void) { size_t ldvarg40 ; char *ldvarg41 ; void *tmp ; char *ldvarg39 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg41 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg39 = (char *)tmp___0; ldv_memset((void *)(& ldvarg40), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_109 == 1) { iscsi_tpg_attrib_store_authentication(iscsi_tpg_attrib_authentication_group0, (char const *)ldvarg41, ldvarg40); ldv_state_variable_109 = 1; } else { } goto ldv_60974; case 1: ; if (ldv_state_variable_109 == 1) { iscsi_tpg_attrib_show_authentication(iscsi_tpg_attrib_authentication_group0, ldvarg39); ldv_state_variable_109 = 1; } else { } goto ldv_60974; default: ldv_stop(); } ldv_60974: ; return; } } void ldv_main_exported_92(void) { char *ldvarg199 ; void *tmp ; size_t ldvarg198 ; char *ldvarg197 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg199 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg197 = (char *)tmp___0; ldv_memset((void *)(& ldvarg198), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_92 == 1) { iscsi_tpg_param_store_AuthMethod(iscsi_tpg_param_AuthMethod_group0, (char const *)ldvarg199, ldvarg198); ldv_state_variable_92 = 1; } else { } goto ldv_60984; case 1: ; if (ldv_state_variable_92 == 1) { iscsi_tpg_param_show_AuthMethod(iscsi_tpg_param_AuthMethod_group0, ldvarg197); ldv_state_variable_92 = 1; } else { } goto ldv_60984; default: ldv_stop(); } ldv_60984: ; return; } } void ldv_main_exported_103(void) { char *ldvarg202 ; void *tmp ; size_t ldvarg201 ; char *ldvarg200 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg202 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg200 = (char *)tmp___0; ldv_memset((void *)(& ldvarg201), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_103 == 1) { iscsi_tpg_attrib_store_demo_mode_write_protect(iscsi_tpg_attrib_demo_mode_write_protect_group0, (char const *)ldvarg202, ldvarg201); ldv_state_variable_103 = 1; } else { } goto ldv_60994; case 1: ; if (ldv_state_variable_103 == 1) { iscsi_tpg_attrib_show_demo_mode_write_protect(iscsi_tpg_attrib_demo_mode_write_protect_group0, ldvarg200); ldv_state_variable_103 = 1; } else { } goto ldv_60994; default: ldv_stop(); } ldv_60994: ; return; } } void ldv_main_exported_89(void) { char *ldvarg44 ; void *tmp ; char *ldvarg42 ; void *tmp___0 ; size_t ldvarg43 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg44 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg42 = (char *)tmp___0; ldv_memset((void *)(& ldvarg43), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_89 == 1) { iscsi_tpg_param_store_MaxConnections(iscsi_tpg_param_MaxConnections_group0, (char const *)ldvarg44, ldvarg43); ldv_state_variable_89 = 1; } else { } goto ldv_61004; case 1: ; if (ldv_state_variable_89 == 1) { iscsi_tpg_param_show_MaxConnections(iscsi_tpg_param_MaxConnections_group0, ldvarg42); ldv_state_variable_89 = 1; } else { } goto ldv_61004; default: ldv_stop(); } ldv_61004: ; return; } } void ldv_main_exported_113(void) { struct se_node_acl *ldvarg206 ; void *tmp ; char *ldvarg207 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1304UL); ldvarg206 = (struct se_node_acl *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg207 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_113 == 1) { iscsi_nacl_param_show_ErrorRecoveryLevel(ldvarg206, ldvarg207); ldv_state_variable_113 = 1; } else { } goto ldv_61013; default: ldv_stop(); } ldv_61013: ; return; } } void ldv_main_exported_91(void) { char *ldvarg210 ; void *tmp ; char *ldvarg208 ; void *tmp___0 ; size_t ldvarg209 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg210 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg208 = (char *)tmp___0; ldv_memset((void *)(& ldvarg209), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_91 == 1) { iscsi_tpg_param_store_HeaderDigest(iscsi_tpg_param_HeaderDigest_group0, (char const *)ldvarg210, ldvarg209); ldv_state_variable_91 = 1; } else { } goto ldv_61022; case 1: ; if (ldv_state_variable_91 == 1) { iscsi_tpg_param_show_HeaderDigest(iscsi_tpg_param_HeaderDigest_group0, ldvarg208); ldv_state_variable_91 = 1; } else { } goto ldv_61022; default: ldv_stop(); } ldv_61022: ; return; } } void ldv_main_exported_78(void) { size_t ldvarg52 ; char *ldvarg53 ; void *tmp ; char *ldvarg51 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg53 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg51 = (char *)tmp___0; ldv_memset((void *)(& ldvarg52), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_78 == 1) { iscsi_tpg_param_store_DataPDUInOrder(iscsi_tpg_param_DataPDUInOrder_group0, (char const *)ldvarg53, ldvarg52); ldv_state_variable_78 = 1; } else { } goto ldv_61032; case 1: ; if (ldv_state_variable_78 == 1) { iscsi_tpg_param_show_DataPDUInOrder(iscsi_tpg_param_DataPDUInOrder_group0, ldvarg51); ldv_state_variable_78 = 1; } else { } goto ldv_61032; default: ldv_stop(); } ldv_61032: ; return; } } void ldv_main_exported_107(void) { char *ldvarg216 ; void *tmp ; char *ldvarg214 ; void *tmp___0 ; size_t ldvarg215 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg216 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg214 = (char *)tmp___0; ldv_memset((void *)(& ldvarg215), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_107 == 1) { iscsi_tpg_attrib_store_netif_timeout(iscsi_tpg_attrib_netif_timeout_group0, (char const *)ldvarg216, ldvarg215); ldv_state_variable_107 = 1; } else { } goto ldv_61042; case 1: ; if (ldv_state_variable_107 == 1) { iscsi_tpg_attrib_show_netif_timeout(iscsi_tpg_attrib_netif_timeout_group0, ldvarg214); ldv_state_variable_107 = 1; } else { } goto ldv_61042; default: ldv_stop(); } ldv_61042: ; return; } } void ldv_main_exported_87(void) { char *ldvarg219 ; void *tmp ; char *ldvarg217 ; void *tmp___0 ; size_t ldvarg218 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg219 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg217 = (char *)tmp___0; ldv_memset((void *)(& ldvarg218), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_87 == 1) { iscsi_tpg_param_store_InitialR2T(iscsi_tpg_param_InitialR2T_group0, (char const *)ldvarg219, ldvarg218); ldv_state_variable_87 = 1; } else { } goto ldv_61052; case 1: ; if (ldv_state_variable_87 == 1) { iscsi_tpg_param_show_InitialR2T(iscsi_tpg_param_InitialR2T_group0, ldvarg217); ldv_state_variable_87 = 1; } else { } goto ldv_61052; default: ldv_stop(); } ldv_61052: ; return; } } void ldv_main_exported_77(void) { size_t ldvarg221 ; char *ldvarg222 ; void *tmp ; char *ldvarg220 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg222 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg220 = (char *)tmp___0; ldv_memset((void *)(& ldvarg221), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_77 == 1) { iscsi_tpg_param_store_DataSequenceInOrder(iscsi_tpg_param_DataSequenceInOrder_group0, (char const *)ldvarg222, ldvarg221); ldv_state_variable_77 = 1; } else { } goto ldv_61062; case 1: ; if (ldv_state_variable_77 == 1) { iscsi_tpg_param_show_DataSequenceInOrder(iscsi_tpg_param_DataSequenceInOrder_group0, ldvarg220); ldv_state_variable_77 = 1; } else { } goto ldv_61062; default: ldv_stop(); } ldv_61062: ; return; } } void ldv_main_exported_93(void) { char *ldvarg56 ; void *tmp ; size_t ldvarg55 ; char *ldvarg54 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg56 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg54 = (char *)tmp___0; ldv_memset((void *)(& ldvarg55), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_93 == 1) { iscsi_tpg_auth_store_password_mutual(iscsi_tpg_auth_password_mutual_group0, (char const *)ldvarg56, ldvarg55); ldv_state_variable_93 = 1; } else { } goto ldv_61072; case 1: ; if (ldv_state_variable_93 == 1) { iscsi_tpg_auth_show_password_mutual(iscsi_tpg_auth_password_mutual_group0, ldvarg54); ldv_state_variable_93 = 1; } else { } goto ldv_61072; default: ldv_stop(); } ldv_61072: ; return; } } void ldv_main_exported_106(void) { char *ldvarg59 ; void *tmp ; size_t ldvarg58 ; char *ldvarg57 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg59 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg57 = (char *)tmp___0; ldv_memset((void *)(& ldvarg58), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_106 == 1) { iscsi_tpg_attrib_store_generate_node_acls(iscsi_tpg_attrib_generate_node_acls_group0, (char const *)ldvarg59, ldvarg58); ldv_state_variable_106 = 1; } else { } goto ldv_61082; case 1: ; if (ldv_state_variable_106 == 1) { iscsi_tpg_attrib_show_generate_node_acls(iscsi_tpg_attrib_generate_node_acls_group0, ldvarg57); ldv_state_variable_106 = 1; } else { } goto ldv_61082; default: ldv_stop(); } ldv_61082: ; return; } } void ldv_main_exported_133(void) { char *ldvarg223 ; void *tmp ; size_t ldvarg224 ; char *ldvarg225 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg223 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg225 = (char *)tmp___0; ldv_memset((void *)(& ldvarg224), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_133 == 1) { iscsi_nacl_attrib_store_nopin_timeout(iscsi_nacl_attrib_nopin_timeout_group0, (char const *)ldvarg225, ldvarg224); ldv_state_variable_133 = 1; } else { } goto ldv_61092; case 1: ; if (ldv_state_variable_133 == 1) { iscsi_nacl_attrib_show_nopin_timeout(iscsi_nacl_attrib_nopin_timeout_group0, ldvarg223); ldv_state_variable_133 = 1; } else { } goto ldv_61092; default: ldv_stop(); } ldv_61092: ; return; } } void ldv_main_exported_65(void) { char *ldvarg62 ; void *tmp ; char *ldvarg60 ; void *tmp___0 ; size_t ldvarg61 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg62 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg60 = (char *)tmp___0; ldv_memset((void *)(& ldvarg61), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_65 == 1) { iscsi_disc_store_userid_mutual(iscsi_disc_userid_mutual_group0, (char const *)ldvarg62, ldvarg61); ldv_state_variable_65 = 1; } else { } goto ldv_61102; case 1: ; if (ldv_state_variable_65 == 1) { iscsi_disc_show_userid_mutual(iscsi_disc_userid_mutual_group0, ldvarg60); ldv_state_variable_65 = 1; } else { } goto ldv_61102; default: ldv_stop(); } ldv_61102: ; return; } } void ldv_main_exported_123(void) { struct se_node_acl *ldvarg226 ; void *tmp ; char *ldvarg227 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1304UL); ldvarg226 = (struct se_node_acl *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg227 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_123 == 1) { iscsi_nacl_param_show_MaxConnections(ldvarg226, ldvarg227); ldv_state_variable_123 = 1; } else { } goto ldv_61111; default: ldv_stop(); } ldv_61111: ; return; } } void ldv_main_exported_64(void) { char *ldvarg232 ; void *tmp ; size_t ldvarg233 ; char *ldvarg234 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg232 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg234 = (char *)tmp___0; ldv_memset((void *)(& ldvarg233), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_64 == 1) { iscsi_disc_store_password_mutual(iscsi_disc_password_mutual_group0, (char const *)ldvarg234, ldvarg233); ldv_state_variable_64 = 1; } else { } goto ldv_61120; case 1: ; if (ldv_state_variable_64 == 1) { iscsi_disc_show_password_mutual(iscsi_disc_password_mutual_group0, ldvarg232); ldv_state_variable_64 = 1; } else { } goto ldv_61120; default: ldv_stop(); } ldv_61120: ; return; } } void ldv_main_exported_138(void) { size_t ldvarg66 ; char *ldvarg67 ; void *tmp ; char *ldvarg65 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg67 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg65 = (char *)tmp___0; ldv_memset((void *)(& ldvarg66), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_138 == 1) { lio_target_np_store_sctp(lio_target_np_sctp_group0, (char const *)ldvarg67, ldvarg66); ldv_state_variable_138 = 1; } else { } goto ldv_61130; case 1: ; if (ldv_state_variable_138 == 1) { lio_target_np_show_sctp(lio_target_np_sctp_group0, ldvarg65); ldv_state_variable_138 = 1; } else { } goto ldv_61130; default: ldv_stop(); } ldv_61130: ; return; } } void ldv_main_exported_97(void) { char *ldvarg235 ; void *tmp ; size_t ldvarg236 ; char *ldvarg237 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg235 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg237 = (char *)tmp___0; ldv_memset((void *)(& ldvarg236), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_97 == 1) { iscsi_tpg_auth_store_userid(iscsi_tpg_auth_userid_group0, (char const *)ldvarg237, ldvarg236); ldv_state_variable_97 = 1; } else { } goto ldv_61140; case 1: ; if (ldv_state_variable_97 == 1) { iscsi_tpg_auth_show_userid(iscsi_tpg_auth_userid_group0, ldvarg235); ldv_state_variable_97 = 1; } else { } goto ldv_61140; default: ldv_stop(); } ldv_61140: ; return; } } void ldv_main_exported_114(void) { char *ldvarg69 ; void *tmp ; struct se_node_acl *ldvarg68 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg69 = (char *)tmp; tmp___0 = ldv_init_zalloc(1304UL); ldvarg68 = (struct se_node_acl *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_114 == 1) { iscsi_nacl_param_show_DataSequenceInOrder(ldvarg68, ldvarg69); ldv_state_variable_114 = 1; } else { } goto ldv_61149; default: ldv_stop(); } ldv_61149: ; return; } } void ldv_main_exported_137(void) { size_t ldvarg75 ; char *ldvarg74 ; void *tmp ; char *ldvarg76 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg74 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg76 = (char *)tmp___0; ldv_memset((void *)(& ldvarg75), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_137 == 1) { lio_target_np_store_iser(lio_target_np_iser_group0, (char const *)ldvarg76, ldvarg75); ldv_state_variable_137 = 1; } else { } goto ldv_61158; case 1: ; if (ldv_state_variable_137 == 1) { lio_target_np_show_iser(lio_target_np_iser_group0, ldvarg74); ldv_state_variable_137 = 1; } else { } goto ldv_61158; default: ldv_stop(); } ldv_61158: ; return; } } void ldv_main_exported_81(void) { size_t ldvarg78 ; char *ldvarg79 ; void *tmp ; char *ldvarg77 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg79 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg77 = (char *)tmp___0; ldv_memset((void *)(& ldvarg78), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_81 == 1) { iscsi_tpg_param_store_DefaultTime2Wait(iscsi_tpg_param_DefaultTime2Wait_group0, (char const *)ldvarg79, ldvarg78); ldv_state_variable_81 = 1; } else { } goto ldv_61168; case 1: ; if (ldv_state_variable_81 == 1) { iscsi_tpg_param_show_DefaultTime2Wait(iscsi_tpg_param_DefaultTime2Wait_group0, ldvarg77); ldv_state_variable_81 = 1; } else { } goto ldv_61168; default: ldv_stop(); } ldv_61168: ; return; } } void ldv_main_exported_101(void) { size_t ldvarg83 ; char *ldvarg82 ; void *tmp ; char *ldvarg84 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg82 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg84 = (char *)tmp___0; ldv_memset((void *)(& ldvarg83), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_101 == 1) { iscsi_tpg_attrib_store_demo_mode_discovery(iscsi_tpg_attrib_demo_mode_discovery_group0, (char const *)ldvarg84, ldvarg83); ldv_state_variable_101 = 1; } else { } goto ldv_61178; case 1: ; if (ldv_state_variable_101 == 1) { iscsi_tpg_attrib_show_demo_mode_discovery(iscsi_tpg_attrib_demo_mode_discovery_group0, ldvarg82); ldv_state_variable_101 = 1; } else { } goto ldv_61178; default: ldv_stop(); } ldv_61178: ; return; } } void ldv_main_exported_73(void) { size_t ldvarg86 ; char *ldvarg87 ; void *tmp ; char *ldvarg85 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg87 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg85 = (char *)tmp___0; ldv_memset((void *)(& ldvarg86), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_73 == 1) { iscsi_tpg_param_store_IFMarkInt(iscsi_tpg_param_IFMarkInt_group0, (char const *)ldvarg87, ldvarg86); ldv_state_variable_73 = 1; } else { } goto ldv_61188; case 1: ; if (ldv_state_variable_73 == 1) { iscsi_tpg_param_show_IFMarkInt(iscsi_tpg_param_IFMarkInt_group0, ldvarg85); ldv_state_variable_73 = 1; } else { } goto ldv_61188; default: ldv_stop(); } ldv_61188: ; return; } } void ldv_main_exported_66(void) { struct target_fabric_configfs *ldvarg248 ; void *tmp ; char *ldvarg249 ; void *tmp___0 ; int tmp___1 ; { tmp = __VERIFIER_nondet_pointer(); ldvarg248 = (struct target_fabric_configfs *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg249 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_66 == 1) { iscsi_disc_show_authenticate_target(ldvarg248, ldvarg249); ldv_state_variable_66 = 1; } else { } goto ldv_61197; default: ldv_stop(); } ldv_61197: ; return; } } void ldv_main_exported_76(void) { size_t ldvarg92 ; char *ldvarg91 ; void *tmp ; char *ldvarg93 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg91 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg93 = (char *)tmp___0; ldv_memset((void *)(& ldvarg92), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_76 == 1) { iscsi_tpg_param_store_ErrorRecoveryLevel(iscsi_tpg_param_ErrorRecoveryLevel_group0, (char const *)ldvarg93, ldvarg92); ldv_state_variable_76 = 1; } else { } goto ldv_61206; case 1: ; if (ldv_state_variable_76 == 1) { iscsi_tpg_param_show_ErrorRecoveryLevel(iscsi_tpg_param_ErrorRecoveryLevel_group0, ldvarg91); ldv_state_variable_76 = 1; } else { } goto ldv_61206; default: ldv_stop(); } ldv_61206: ; return; } } void ldv_main_exported_86(void) { char *ldvarg90 ; void *tmp ; size_t ldvarg89 ; char *ldvarg88 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg90 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg88 = (char *)tmp___0; ldv_memset((void *)(& ldvarg89), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_86 == 1) { iscsi_tpg_param_store_ImmediateData(iscsi_tpg_param_ImmediateData_group0, (char const *)ldvarg90, ldvarg89); ldv_state_variable_86 = 1; } else { } goto ldv_61216; case 1: ; if (ldv_state_variable_86 == 1) { iscsi_tpg_param_show_ImmediateData(iscsi_tpg_param_ImmediateData_group0, ldvarg88); ldv_state_variable_86 = 1; } else { } goto ldv_61216; default: ldv_stop(); } ldv_61216: ; return; } } void ldv_main_exported_62(void) { char *ldvarg99 ; void *tmp ; char *ldvarg96 ; void *tmp___0 ; u32 ldvarg97 ; unsigned char *ldvarg98 ; void *tmp___1 ; struct se_tpg_np *ldvarg100 ; void *tmp___2 ; struct target_fabric_configfs *ldvarg94 ; void *tmp___3 ; char *ldvarg101 ; void *tmp___4 ; char *ldvarg95 ; void *tmp___5 ; int tmp___6 ; { tmp = ldv_init_zalloc(1UL); ldvarg99 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg96 = (char *)tmp___0; tmp___1 = ldv_init_zalloc(1UL); ldvarg98 = (unsigned char *)tmp___1; tmp___2 = ldv_init_zalloc(120UL); ldvarg100 = (struct se_tpg_np *)tmp___2; tmp___3 = __VERIFIER_nondet_pointer(); ldvarg94 = (struct target_fabric_configfs *)tmp___3; tmp___4 = ldv_init_zalloc(1UL); ldvarg101 = (char *)tmp___4; tmp___5 = ldv_init_zalloc(1UL); ldvarg95 = (char *)tmp___5; ldv_memset((void *)(& ldvarg97), 0, 4UL); tmp___6 = __VERIFIER_nondet_int(); switch (tmp___6) { case 0: ; if (ldv_state_variable_62 == 1) { lio_queue_status(iscsi_ops_group1); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_queue_status(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 1: ; if (ldv_state_variable_62 == 2) { lio_write_pending(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 2: ; if (ldv_state_variable_62 == 1) { lio_queue_tm_rsp(iscsi_ops_group1); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_queue_tm_rsp(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 3: ; if (ldv_state_variable_62 == 1) { lio_queue_data_in(iscsi_ops_group1); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_queue_data_in(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 4: ; if (ldv_state_variable_62 == 1) { lio_tpg_check_demo_mode_write_protect(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_check_demo_mode_write_protect(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 5: ; if (ldv_state_variable_62 == 1) { lio_tpg_check_demo_mode_cache(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_check_demo_mode_cache(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 6: ; if (ldv_state_variable_62 == 1) { lio_set_default_node_attributes(iscsi_ops_group5); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_set_default_node_attributes(iscsi_ops_group5); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 7: ; if (ldv_state_variable_62 == 1) { lio_target_init_nodeacl(iscsi_ops_group5, (char const *)ldvarg101); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_target_init_nodeacl(iscsi_ops_group5, (char const *)ldvarg101); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 8: ; if (ldv_state_variable_62 == 1) { lio_tpg_check_prod_mode_write_protect(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_check_prod_mode_write_protect(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 9: ; if (ldv_state_variable_62 == 1) { lio_release_cmd(iscsi_ops_group1); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_release_cmd(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 10: ; if (ldv_state_variable_62 == 1) { lio_tpg_check_demo_mode(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_check_demo_mode(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 11: ; if (ldv_state_variable_62 == 1) { lio_sess_get_index(iscsi_ops_group0); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_sess_get_index(iscsi_ops_group0); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 12: ; if (ldv_state_variable_62 == 1) { lio_target_call_coredeltiqn(iscsi_ops_group2); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_target_call_coredeltiqn(iscsi_ops_group2); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 13: ; if (ldv_state_variable_62 == 1) { lio_target_call_delnpfromtpg(ldvarg100); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_target_call_delnpfromtpg(ldvarg100); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 14: ; if (ldv_state_variable_62 == 1) { lio_target_call_addnptotpg(iscsi_ops_group3, iscsi_ops_group4, (char const *)ldvarg99); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_target_call_addnptotpg(iscsi_ops_group3, iscsi_ops_group4, (char const *)ldvarg99); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 15: ; if (ldv_state_variable_62 == 1) { lio_tpg_get_default_depth(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_get_default_depth(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 16: ; if (ldv_state_variable_62 == 1) { lio_sess_get_initiator_sid(iscsi_ops_group0, ldvarg98, ldvarg97); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_sess_get_initiator_sid(iscsi_ops_group0, ldvarg98, ldvarg97); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 17: ; if (ldv_state_variable_62 == 1) { lio_write_pending_status(iscsi_ops_group1); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_write_pending_status(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 18: ; if (ldv_state_variable_62 == 1) { lio_check_stop_free(iscsi_ops_group1); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_check_stop_free(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 19: ; if (ldv_state_variable_62 == 1) { lio_tpg_check_prot_fabric_only(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_check_prot_fabric_only(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 20: ; if (ldv_state_variable_62 == 1) { lio_tpg_get_inst_index(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_get_inst_index(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 21: ; if (ldv_state_variable_62 == 1) { lio_tpg_get_tag(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_get_tag(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 22: ; if (ldv_state_variable_62 == 1) { lio_target_cleanup_nodeacl(iscsi_ops_group5); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_target_cleanup_nodeacl(iscsi_ops_group5); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 23: ; if (ldv_state_variable_62 == 1) { iscsi_get_fabric_name(); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { iscsi_get_fabric_name(); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 24: ; if (ldv_state_variable_62 == 1) { lio_aborted_task(iscsi_ops_group1); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_aborted_task(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 25: ; if (ldv_state_variable_62 == 1) { lio_tpg_get_endpoint_wwn(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_get_endpoint_wwn(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 26: ; if (ldv_state_variable_62 == 1) { lio_target_tiqn_deltpg(iscsi_ops_group3); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_target_tiqn_deltpg(iscsi_ops_group3); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 27: ; if (ldv_state_variable_62 == 1) { lio_tpg_close_session(iscsi_ops_group0); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_close_session(iscsi_ops_group0); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 28: ; if (ldv_state_variable_62 == 1) { iscsi_get_cmd_state(iscsi_ops_group1); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { iscsi_get_cmd_state(iscsi_ops_group1); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 29: ; if (ldv_state_variable_62 == 1) { lio_target_tiqn_addtpg(iscsi_ops_group2, iscsi_ops_group4, (char const *)ldvarg96); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_target_tiqn_addtpg(iscsi_ops_group2, iscsi_ops_group4, (char const *)ldvarg96); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 30: ; if (ldv_state_variable_62 == 1) { lio_target_call_coreaddtiqn(ldvarg94, iscsi_ops_group4, (char const *)ldvarg95); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_target_call_coreaddtiqn(ldvarg94, iscsi_ops_group4, (char const *)ldvarg95); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 31: ; if (ldv_state_variable_62 == 1) { lio_tpg_shutdown_session(iscsi_ops_group0); ldv_state_variable_62 = 1; } else { } if (ldv_state_variable_62 == 2) { lio_tpg_shutdown_session(iscsi_ops_group0); ldv_state_variable_62 = 2; } else { } goto ldv_61231; case 32: ; if (ldv_state_variable_62 == 2) { ldv_release_62(); ldv_state_variable_62 = 1; ref_cnt = ref_cnt - 1; } else { } goto ldv_61231; case 33: ; if (ldv_state_variable_62 == 1) { ldv_probe_62(); ldv_state_variable_62 = 2; ref_cnt = ref_cnt + 1; } else { } goto ldv_61231; default: ldv_stop(); } ldv_61231: ; return; } } void ldv_main_exported_67(void) { size_t ldvarg103 ; char *ldvarg102 ; void *tmp ; char *ldvarg104 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg102 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg104 = (char *)tmp___0; ldv_memset((void *)(& ldvarg103), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_67 == 1) { iscsi_disc_store_password(iscsi_disc_password_group0, (char const *)ldvarg104, ldvarg103); ldv_state_variable_67 = 1; } else { } goto ldv_61273; case 1: ; if (ldv_state_variable_67 == 1) { iscsi_disc_show_password(iscsi_disc_password_group0, ldvarg102); ldv_state_variable_67 = 1; } else { } goto ldv_61273; default: ldv_stop(); } ldv_61273: ; return; } } void ldv_main_exported_70(void) { char *ldvarg255 ; void *tmp ; struct se_portal_group *ldvarg254 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg255 = (char *)tmp; tmp___0 = ldv_init_zalloc(1328UL); ldvarg254 = (struct se_portal_group *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_70 == 1) { lio_target_tpg_show_dynamic_sessions(ldvarg254, ldvarg255); ldv_state_variable_70 = 1; } else { } goto ldv_61282; default: ldv_stop(); } ldv_61282: ; return; } } void ldv_main_exported_129(void) { char *ldvarg112 ; void *tmp ; char *ldvarg110 ; void *tmp___0 ; size_t ldvarg111 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg112 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg110 = (char *)tmp___0; ldv_memset((void *)(& ldvarg111), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_129 == 1) { iscsi_nacl_attrib_store_random_r2t_offsets(iscsi_nacl_attrib_random_r2t_offsets_group0, (char const *)ldvarg112, ldvarg111); ldv_state_variable_129 = 1; } else { } goto ldv_61291; case 1: ; if (ldv_state_variable_129 == 1) { iscsi_nacl_attrib_show_random_r2t_offsets(iscsi_nacl_attrib_random_r2t_offsets_group0, ldvarg110); ldv_state_variable_129 = 1; } else { } goto ldv_61291; default: ldv_stop(); } ldv_61291: ; return; } } void ldv_main_exported_68(void) { size_t ldvarg257 ; char *ldvarg258 ; void *tmp ; char *ldvarg256 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg258 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg256 = (char *)tmp___0; ldv_memset((void *)(& ldvarg257), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_68 == 1) { iscsi_disc_store_userid(iscsi_disc_userid_group0, (char const *)ldvarg258, ldvarg257); ldv_state_variable_68 = 1; } else { } goto ldv_61301; case 1: ; if (ldv_state_variable_68 == 1) { iscsi_disc_show_userid(iscsi_disc_userid_group0, ldvarg256); ldv_state_variable_68 = 1; } else { } goto ldv_61301; default: ldv_stop(); } ldv_61301: ; return; } } void ldv_main_exported_136(void) { size_t ldvarg260 ; char *ldvarg261 ; void *tmp ; char *ldvarg259 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg261 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg259 = (char *)tmp___0; ldv_memset((void *)(& ldvarg260), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_136 == 1) { iscsi_nacl_attrib_store_dataout_timeout(iscsi_nacl_attrib_dataout_timeout_group0, (char const *)ldvarg261, ldvarg260); ldv_state_variable_136 = 1; } else { } goto ldv_61311; case 1: ; if (ldv_state_variable_136 == 1) { iscsi_nacl_attrib_show_dataout_timeout(iscsi_nacl_attrib_dataout_timeout_group0, ldvarg259); ldv_state_variable_136 = 1; } else { } goto ldv_61311; default: ldv_stop(); } ldv_61311: ; return; } } void ldv_main_exported_88(void) { char *ldvarg262 ; void *tmp ; size_t ldvarg263 ; char *ldvarg264 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg262 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg264 = (char *)tmp___0; ldv_memset((void *)(& ldvarg263), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_88 == 1) { iscsi_tpg_param_store_TargetAlias(iscsi_tpg_param_TargetAlias_group0, (char const *)ldvarg264, ldvarg263); ldv_state_variable_88 = 1; } else { } goto ldv_61321; case 1: ; if (ldv_state_variable_88 == 1) { iscsi_tpg_param_show_TargetAlias(iscsi_tpg_param_TargetAlias_group0, ldvarg262); ldv_state_variable_88 = 1; } else { } goto ldv_61321; default: ldv_stop(); } ldv_61321: ; return; } } void ldv_main_exported_116(void) { struct se_node_acl *ldvarg265 ; void *tmp ; char *ldvarg266 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1304UL); ldvarg265 = (struct se_node_acl *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg266 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_116 == 1) { iscsi_nacl_param_show_MaxOutstandingR2T(ldvarg265, ldvarg266); ldv_state_variable_116 = 1; } else { } goto ldv_61330; default: ldv_stop(); } ldv_61330: ; return; } } void ldv_main_exported_100(void) { size_t ldvarg270 ; char *ldvarg269 ; void *tmp ; char *ldvarg271 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg269 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg271 = (char *)tmp___0; ldv_memset((void *)(& ldvarg270), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_100 == 1) { iscsi_tpg_attrib_store_default_erl(iscsi_tpg_attrib_default_erl_group0, (char const *)ldvarg271, ldvarg270); ldv_state_variable_100 = 1; } else { } goto ldv_61339; case 1: ; if (ldv_state_variable_100 == 1) { iscsi_tpg_attrib_show_default_erl(iscsi_tpg_attrib_default_erl_group0, ldvarg269); ldv_state_variable_100 = 1; } else { } goto ldv_61339; default: ldv_stop(); } ldv_61339: ; return; } } void ldv_main_exported_82(void) { char *ldvarg118 ; void *tmp ; size_t ldvarg119 ; char *ldvarg120 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg118 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg120 = (char *)tmp___0; ldv_memset((void *)(& ldvarg119), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_82 == 1) { iscsi_tpg_param_store_FirstBurstLength(iscsi_tpg_param_FirstBurstLength_group0, (char const *)ldvarg120, ldvarg119); ldv_state_variable_82 = 1; } else { } goto ldv_61349; case 1: ; if (ldv_state_variable_82 == 1) { iscsi_tpg_param_show_FirstBurstLength(iscsi_tpg_param_FirstBurstLength_group0, ldvarg118); ldv_state_variable_82 = 1; } else { } goto ldv_61349; default: ldv_stop(); } ldv_61349: ; return; } } void ldv_main_exported_110(void) { char *ldvarg115 ; void *tmp ; char *ldvarg117 ; void *tmp___0 ; size_t ldvarg116 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg115 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg117 = (char *)tmp___0; ldv_memset((void *)(& ldvarg116), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_110 == 1) { lio_target_nacl_store_tag(lio_target_nacl_tag_group0, (char const *)ldvarg117, ldvarg116); ldv_state_variable_110 = 1; } else { } goto ldv_61359; case 1: ; if (ldv_state_variable_110 == 1) { lio_target_nacl_show_tag(lio_target_nacl_tag_group0, ldvarg115); ldv_state_variable_110 = 1; } else { } goto ldv_61359; default: ldv_stop(); } ldv_61359: ; return; } } void ldv_main_exported_128(void) { size_t ldvarg276 ; char *ldvarg277 ; void *tmp ; char *ldvarg275 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg277 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg275 = (char *)tmp___0; ldv_memset((void *)(& ldvarg276), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_128 == 1) { iscsi_nacl_auth_store_userid(iscsi_nacl_auth_userid_group0, (char const *)ldvarg277, ldvarg276); ldv_state_variable_128 = 1; } else { } goto ldv_61369; case 1: ; if (ldv_state_variable_128 == 1) { iscsi_nacl_auth_show_userid(iscsi_nacl_auth_userid_group0, ldvarg275); ldv_state_variable_128 = 1; } else { } goto ldv_61369; default: ldv_stop(); } ldv_61369: ; return; } } void ldv_main_exported_120(void) { char *ldvarg281 ; void *tmp ; struct se_node_acl *ldvarg280 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg281 = (char *)tmp; tmp___0 = ldv_init_zalloc(1304UL); ldvarg280 = (struct se_node_acl *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_120 == 1) { iscsi_nacl_param_show_MaxBurstLength(ldvarg280, ldvarg281); ldv_state_variable_120 = 1; } else { } goto ldv_61378; default: ldv_stop(); } ldv_61378: ; return; } } void ldv_main_exported_134(void) { size_t ldvarg283 ; char *ldvarg282 ; void *tmp ; char *ldvarg284 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg282 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg284 = (char *)tmp___0; ldv_memset((void *)(& ldvarg283), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_134 == 1) { iscsi_nacl_attrib_store_default_erl(iscsi_nacl_attrib_default_erl_group0, (char const *)ldvarg284, ldvarg283); ldv_state_variable_134 = 1; } else { } goto ldv_61387; case 1: ; if (ldv_state_variable_134 == 1) { iscsi_nacl_attrib_show_default_erl(iscsi_nacl_attrib_default_erl_group0, ldvarg282); ldv_state_variable_134 = 1; } else { } goto ldv_61387; default: ldv_stop(); } ldv_61387: ; return; } } void ldv_main_exported_75(void) { char *ldvarg289 ; void *tmp ; char *ldvarg287 ; void *tmp___0 ; size_t ldvarg288 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg289 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg287 = (char *)tmp___0; ldv_memset((void *)(& ldvarg288), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_75 == 1) { iscsi_tpg_param_store_IFMarker(iscsi_tpg_param_IFMarker_group0, (char const *)ldvarg289, ldvarg288); ldv_state_variable_75 = 1; } else { } goto ldv_61397; case 1: ; if (ldv_state_variable_75 == 1) { iscsi_tpg_param_show_IFMarker(iscsi_tpg_param_IFMarker_group0, ldvarg287); ldv_state_variable_75 = 1; } else { } goto ldv_61397; default: ldv_stop(); } ldv_61397: ; return; } } void ldv_main_exported_83(void) { size_t ldvarg291 ; char *ldvarg292 ; void *tmp ; char *ldvarg290 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg292 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg290 = (char *)tmp___0; ldv_memset((void *)(& ldvarg291), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_83 == 1) { iscsi_tpg_param_store_MaxBurstLength(iscsi_tpg_param_MaxBurstLength_group0, (char const *)ldvarg292, ldvarg291); ldv_state_variable_83 = 1; } else { } goto ldv_61407; case 1: ; if (ldv_state_variable_83 == 1) { iscsi_tpg_param_show_MaxBurstLength(iscsi_tpg_param_MaxBurstLength_group0, ldvarg290); ldv_state_variable_83 = 1; } else { } goto ldv_61407; default: ldv_stop(); } ldv_61407: ; return; } } void ldv_main_exported_135(void) { size_t ldvarg122 ; char *ldvarg121 ; void *tmp ; char *ldvarg123 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg121 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg123 = (char *)tmp___0; ldv_memset((void *)(& ldvarg122), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_135 == 1) { iscsi_nacl_attrib_store_dataout_timeout_retries(iscsi_nacl_attrib_dataout_timeout_retries_group0, (char const *)ldvarg123, ldvarg122); ldv_state_variable_135 = 1; } else { } goto ldv_61417; case 1: ; if (ldv_state_variable_135 == 1) { iscsi_nacl_attrib_show_dataout_timeout_retries(iscsi_nacl_attrib_dataout_timeout_retries_group0, ldvarg121); ldv_state_variable_135 = 1; } else { } goto ldv_61417; default: ldv_stop(); } ldv_61417: ; return; } } void ldv_main_exported_69(void) { struct target_fabric_configfs *ldvarg128 ; void *tmp ; char *ldvarg129 ; void *tmp___0 ; int tmp___1 ; { tmp = __VERIFIER_nondet_pointer(); ldvarg128 = (struct target_fabric_configfs *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg129 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_69 == 1) { lio_target_wwn_show_attr_lio_version(ldvarg128, ldvarg129); ldv_state_variable_69 = 1; } else { } goto ldv_61426; default: ldv_stop(); } ldv_61426: ; return; } } void ldv_main_exported_112(void) { struct se_node_acl *ldvarg126 ; void *tmp ; char *ldvarg127 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1304UL); ldvarg126 = (struct se_node_acl *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg127 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_112 == 1) { lio_target_nacl_show_info(ldvarg126, ldvarg127); ldv_state_variable_112 = 1; } else { } goto ldv_61434; default: ldv_stop(); } ldv_61434: ; return; } } void ldv_main_exported_104(void) { char *ldvarg139 ; void *tmp ; char *ldvarg137 ; void *tmp___0 ; size_t ldvarg138 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg139 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg137 = (char *)tmp___0; ldv_memset((void *)(& ldvarg138), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_104 == 1) { iscsi_tpg_attrib_store_cache_dynamic_acls(iscsi_tpg_attrib_cache_dynamic_acls_group0, (char const *)ldvarg139, ldvarg138); ldv_state_variable_104 = 1; } else { } goto ldv_61443; case 1: ; if (ldv_state_variable_104 == 1) { iscsi_tpg_attrib_show_cache_dynamic_acls(iscsi_tpg_attrib_cache_dynamic_acls_group0, ldvarg137); ldv_state_variable_104 = 1; } else { } goto ldv_61443; default: ldv_stop(); } ldv_61443: ; return; } } void ldv_main_exported_124(void) { size_t ldvarg135 ; char *ldvarg134 ; void *tmp ; char *ldvarg136 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg134 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg136 = (char *)tmp___0; ldv_memset((void *)(& ldvarg135), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_124 == 1) { iscsi_nacl_auth_store_password_mutual(iscsi_nacl_auth_password_mutual_group0, (char const *)ldvarg136, ldvarg135); ldv_state_variable_124 = 1; } else { } goto ldv_61453; case 1: ; if (ldv_state_variable_124 == 1) { iscsi_nacl_auth_show_password_mutual(iscsi_nacl_auth_password_mutual_group0, ldvarg134); ldv_state_variable_124 = 1; } else { } goto ldv_61453; default: ldv_stop(); } ldv_61453: ; return; } } void ldv_main_exported_131(void) { size_t ldvarg141 ; char *ldvarg142 ; void *tmp ; char *ldvarg140 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg142 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg140 = (char *)tmp___0; ldv_memset((void *)(& ldvarg141), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_131 == 1) { iscsi_nacl_attrib_store_random_datain_pdu_offsets(iscsi_nacl_attrib_random_datain_pdu_offsets_group0, (char const *)ldvarg142, ldvarg141); ldv_state_variable_131 = 1; } else { } goto ldv_61463; case 1: ; if (ldv_state_variable_131 == 1) { iscsi_nacl_attrib_show_random_datain_pdu_offsets(iscsi_nacl_attrib_random_datain_pdu_offsets_group0, ldvarg140); ldv_state_variable_131 = 1; } else { } goto ldv_61463; default: ldv_stop(); } ldv_61463: ; return; } } void ldv_main_exported_130(void) { size_t ldvarg296 ; char *ldvarg295 ; void *tmp ; char *ldvarg297 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg295 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg297 = (char *)tmp___0; ldv_memset((void *)(& ldvarg296), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_130 == 1) { iscsi_nacl_attrib_store_random_datain_seq_offsets(iscsi_nacl_attrib_random_datain_seq_offsets_group0, (char const *)ldvarg297, ldvarg296); ldv_state_variable_130 = 1; } else { } goto ldv_61473; case 1: ; if (ldv_state_variable_130 == 1) { iscsi_nacl_attrib_show_random_datain_seq_offsets(iscsi_nacl_attrib_random_datain_seq_offsets_group0, ldvarg295); ldv_state_variable_130 = 1; } else { } goto ldv_61473; default: ldv_stop(); } ldv_61473: ; return; } } void ldv_main_exported_122(void) { char *ldvarg301 ; void *tmp ; struct se_node_acl *ldvarg300 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg301 = (char *)tmp; tmp___0 = ldv_init_zalloc(1304UL); ldvarg300 = (struct se_node_acl *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_122 == 1) { iscsi_nacl_param_show_InitialR2T(ldvarg300, ldvarg301); ldv_state_variable_122 = 1; } else { } goto ldv_61482; default: ldv_stop(); } ldv_61482: ; return; } } void ldv_main_exported_79(void) { size_t ldvarg146 ; char *ldvarg145 ; void *tmp ; char *ldvarg147 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg145 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg147 = (char *)tmp___0; ldv_memset((void *)(& ldvarg146), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_79 == 1) { iscsi_tpg_param_store_MaxOutstandingR2T(iscsi_tpg_param_MaxOutstandingR2T_group0, (char const *)ldvarg147, ldvarg146); ldv_state_variable_79 = 1; } else { } goto ldv_61491; case 1: ; if (ldv_state_variable_79 == 1) { iscsi_tpg_param_show_MaxOutstandingR2T(iscsi_tpg_param_MaxOutstandingR2T_group0, ldvarg145); ldv_state_variable_79 = 1; } else { } goto ldv_61491; default: ldv_stop(); } ldv_61491: ; return; } } void ldv_main_exported_121(void) { char *ldvarg144 ; void *tmp ; struct se_node_acl *ldvarg143 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg144 = (char *)tmp; tmp___0 = ldv_init_zalloc(1304UL); ldvarg143 = (struct se_node_acl *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_121 == 1) { iscsi_nacl_param_show_ImmediateData(ldvarg143, ldvarg144); ldv_state_variable_121 = 1; } else { } goto ldv_61500; default: ldv_stop(); } ldv_61500: ; return; } } void ldv_main_exported_96(void) { char *ldvarg152 ; void *tmp ; size_t ldvarg151 ; char *ldvarg150 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg152 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg150 = (char *)tmp___0; ldv_memset((void *)(& ldvarg151), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_96 == 1) { iscsi_tpg_auth_store_password(iscsi_tpg_auth_password_group0, (char const *)ldvarg152, ldvarg151); ldv_state_variable_96 = 1; } else { } goto ldv_61509; case 1: ; if (ldv_state_variable_96 == 1) { iscsi_tpg_auth_show_password(iscsi_tpg_auth_password_group0, ldvarg150); ldv_state_variable_96 = 1; } else { } goto ldv_61509; default: ldv_stop(); } ldv_61509: ; return; } } void ldv_main_exported_105(void) { size_t ldvarg311 ; char *ldvarg312 ; void *tmp ; char *ldvarg310 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg312 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg310 = (char *)tmp___0; ldv_memset((void *)(& ldvarg311), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_105 == 1) { iscsi_tpg_attrib_store_default_cmdsn_depth(iscsi_tpg_attrib_default_cmdsn_depth_group0, (char const *)ldvarg312, ldvarg311); ldv_state_variable_105 = 1; } else { } goto ldv_61519; case 1: ; if (ldv_state_variable_105 == 1) { iscsi_tpg_attrib_show_default_cmdsn_depth(iscsi_tpg_attrib_default_cmdsn_depth_group0, ldvarg310); ldv_state_variable_105 = 1; } else { } goto ldv_61519; default: ldv_stop(); } ldv_61519: ; return; } } void ldv_main_exported_126(void) { struct se_node_acl *ldvarg153 ; void *tmp ; char *ldvarg154 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1304UL); ldvarg153 = (struct se_node_acl *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg154 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_126 == 1) { iscsi_nacl_auth_show_authenticate_target(ldvarg153, ldvarg154); ldv_state_variable_126 = 1; } else { } goto ldv_61528; default: ldv_stop(); } ldv_61528: ; return; } } void ldv_main_exported_85(void) { char *ldvarg315 ; void *tmp ; char *ldvarg313 ; void *tmp___0 ; size_t ldvarg314 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg315 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg313 = (char *)tmp___0; ldv_memset((void *)(& ldvarg314), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_85 == 1) { iscsi_tpg_param_store_MaxRecvDataSegmentLength(iscsi_tpg_param_MaxRecvDataSegmentLength_group0, (char const *)ldvarg315, ldvarg314); ldv_state_variable_85 = 1; } else { } goto ldv_61537; case 1: ; if (ldv_state_variable_85 == 1) { iscsi_tpg_param_show_MaxRecvDataSegmentLength(iscsi_tpg_param_MaxRecvDataSegmentLength_group0, ldvarg313); ldv_state_variable_85 = 1; } else { } goto ldv_61537; default: ldv_stop(); } ldv_61537: ; return; } } void ldv_main_exported_94(void) { char *ldvarg318 ; void *tmp ; size_t ldvarg319 ; char *ldvarg320 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg318 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg320 = (char *)tmp___0; ldv_memset((void *)(& ldvarg319), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_94 == 1) { iscsi_tpg_auth_store_userid_mutual(iscsi_tpg_auth_userid_mutual_group0, (char const *)ldvarg320, ldvarg319); ldv_state_variable_94 = 1; } else { } goto ldv_61547; case 1: ; if (ldv_state_variable_94 == 1) { iscsi_tpg_auth_show_userid_mutual(iscsi_tpg_auth_userid_mutual_group0, ldvarg318); ldv_state_variable_94 = 1; } else { } goto ldv_61547; default: ldv_stop(); } ldv_61547: ; return; } } void ldv_main_exported_111(void) { size_t ldvarg324 ; char *ldvarg323 ; void *tmp ; char *ldvarg325 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg323 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg325 = (char *)tmp___0; ldv_memset((void *)(& ldvarg324), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_111 == 1) { lio_target_nacl_store_cmdsn_depth(lio_target_nacl_cmdsn_depth_group0, (char const *)ldvarg325, ldvarg324); ldv_state_variable_111 = 1; } else { } goto ldv_61557; case 1: ; if (ldv_state_variable_111 == 1) { lio_target_nacl_show_cmdsn_depth(lio_target_nacl_cmdsn_depth_group0, ldvarg323); ldv_state_variable_111 = 1; } else { } goto ldv_61557; default: ldv_stop(); } ldv_61557: ; return; } } void ldv_main_exported_98(void) { size_t ldvarg158 ; char *ldvarg157 ; void *tmp ; char *ldvarg159 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg157 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg159 = (char *)tmp___0; ldv_memset((void *)(& ldvarg158), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_98 == 1) { iscsi_tpg_attrib_store_fabric_prot_type(iscsi_tpg_attrib_fabric_prot_type_group0, (char const *)ldvarg159, ldvarg158); ldv_state_variable_98 = 1; } else { } goto ldv_61567; case 1: ; if (ldv_state_variable_98 == 1) { iscsi_tpg_attrib_show_fabric_prot_type(iscsi_tpg_attrib_fabric_prot_type_group0, ldvarg157); ldv_state_variable_98 = 1; } else { } goto ldv_61567; default: ldv_stop(); } ldv_61567: ; return; } } void ldv_main_exported_132(void) { size_t ldvarg332 ; char *ldvarg333 ; void *tmp ; char *ldvarg331 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg333 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg331 = (char *)tmp___0; ldv_memset((void *)(& ldvarg332), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_132 == 1) { iscsi_nacl_attrib_store_nopin_response_timeout(iscsi_nacl_attrib_nopin_response_timeout_group0, (char const *)ldvarg333, ldvarg332); ldv_state_variable_132 = 1; } else { } goto ldv_61577; case 1: ; if (ldv_state_variable_132 == 1) { iscsi_nacl_attrib_show_nopin_response_timeout(iscsi_nacl_attrib_nopin_response_timeout_group0, ldvarg331); ldv_state_variable_132 = 1; } else { } goto ldv_61577; default: ldv_stop(); } ldv_61577: ; return; } } void ldv_main_exported_117(void) { struct se_node_acl *ldvarg162 ; void *tmp ; char *ldvarg163 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1304UL); ldvarg162 = (struct se_node_acl *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg163 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_117 == 1) { iscsi_nacl_param_show_DefaultTime2Retain(ldvarg162, ldvarg163); ldv_state_variable_117 = 1; } else { } goto ldv_61586; default: ldv_stop(); } ldv_61586: ; return; } } bool ldv_queue_work_on_495(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_496(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_497(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_498(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_499(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_500(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_501(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_502(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_503(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_504(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_505(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_506(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } __inline static long atomic64_read(atomic64_t const *v ) { long __var ; { __var = 0L; return ((long )*((long const volatile *)(& v->counter))); } } __inline static long atomic_long_read(atomic_long_t *l ) { atomic64_t *v ; long tmp ; { v = l; tmp = atomic64_read((atomic64_t const *)v); return (tmp); } } int ldv_mutex_trylock_531(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_529(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_532(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_533(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_528(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_530(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_534(struct mutex *ldv_func_arg1 ) ; bool ldv_queue_work_on_523(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_525(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_524(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_527(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_526(struct workqueue_struct *ldv_func_arg1 ) ; __inline static struct config_group *to_config_group(struct config_item *item ) { struct config_item const *__mptr ; struct config_group *tmp ; { if ((unsigned long )item != (unsigned long )((struct config_item *)0)) { __mptr = (struct config_item const *)item; tmp = (struct config_group *)__mptr; } else { tmp = (struct config_group *)0; } return (tmp); } } static ssize_t iscsi_stat_instance_show_attr_inst(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; tmp = snprintf(page, 4096UL, "%u\n", tiqn->tiqn_index); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_inst = {{"inst", & __this_module, 292U}, & iscsi_stat_instance_show_attr_inst, 0}; static ssize_t iscsi_stat_instance_show_attr_min_ver(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%u\n", 0); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_min_ver = {{"min_ver", & __this_module, 292U}, & iscsi_stat_instance_show_attr_min_ver, 0}; static ssize_t iscsi_stat_instance_show_attr_max_ver(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%u\n", 0); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_max_ver = {{"max_ver", & __this_module, 292U}, & iscsi_stat_instance_show_attr_max_ver, 0}; static ssize_t iscsi_stat_instance_show_attr_portals(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; tmp = snprintf(page, 4096UL, "%u\n", tiqn->tiqn_num_tpg_nps); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_portals = {{"portals", & __this_module, 292U}, & iscsi_stat_instance_show_attr_portals, 0}; static ssize_t iscsi_stat_instance_show_attr_nodes(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%u\n", 1); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_nodes = {{"nodes", & __this_module, 292U}, & iscsi_stat_instance_show_attr_nodes, 0}; static ssize_t iscsi_stat_instance_show_attr_sessions(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; tmp = snprintf(page, 4096UL, "%u\n", tiqn->tiqn_nsessions); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_sessions = {{"sessions", & __this_module, 292U}, & iscsi_stat_instance_show_attr_sessions, 0}; static ssize_t iscsi_stat_instance_show_attr_fail_sess(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_sess_err_stats *sess_err ; u32 sess_err_count ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; sess_err = & tiqn->sess_err_stats; spin_lock_bh(& sess_err->lock); sess_err_count = (sess_err->digest_errors + sess_err->cxn_timeout_errors) + sess_err->pdu_format_errors; spin_unlock_bh(& sess_err->lock); tmp = snprintf(page, 4096UL, "%u\n", sess_err_count); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_fail_sess = {{"fail_sess", & __this_module, 292U}, & iscsi_stat_instance_show_attr_fail_sess, 0}; static ssize_t iscsi_stat_instance_show_attr_fail_type(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_sess_err_stats *sess_err ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; sess_err = & tiqn->sess_err_stats; tmp = snprintf(page, 4096UL, "%u\n", sess_err->last_sess_failure_type); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_fail_type = {{"fail_type", & __this_module, 292U}, & iscsi_stat_instance_show_attr_fail_type, 0}; static ssize_t iscsi_stat_instance_show_attr_fail_rem_name(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_sess_err_stats *sess_err ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; sess_err = & tiqn->sess_err_stats; tmp = snprintf(page, 4096UL, "%s\n", (int )((signed char )sess_err->last_sess_fail_rem_name[0]) != 0 ? (char *)(& sess_err->last_sess_fail_rem_name) : (char *)"None"); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_fail_rem_name = {{"fail_rem_name", & __this_module, 292U}, & iscsi_stat_instance_show_attr_fail_rem_name, 0}; static ssize_t iscsi_stat_instance_show_attr_disc_time(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%u\n", 0); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_disc_time = {{"disc_time", & __this_module, 292U}, & iscsi_stat_instance_show_attr_disc_time, 0}; static ssize_t iscsi_stat_instance_show_attr_description(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%s\n", (char *)"Storage Engine Target"); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_description = {{"description", & __this_module, 292U}, & iscsi_stat_instance_show_attr_description, 0}; static ssize_t iscsi_stat_instance_show_attr_vendor(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "Datera, Inc. iSCSI-Target\n"); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_vendor = {{"vendor", & __this_module, 292U}, & iscsi_stat_instance_show_attr_vendor, 0}; static ssize_t iscsi_stat_instance_show_attr_version(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%s\n", (char *)"v4.1.0"); return ((ssize_t )tmp); } } static struct iscsi_stat_instance_attribute iscsi_stat_instance_version = {{"version", & __this_module, 292U}, & iscsi_stat_instance_show_attr_version, 0}; static struct iscsi_wwn_stat_grps *to_iscsi_stat_instance(struct config_item *ci ) { struct config_group const *__mptr ; struct config_group *tmp ; struct iscsi_wwn_stat_grps *tmp___0 ; { if ((unsigned long )ci != (unsigned long )((struct config_item *)0)) { tmp = to_config_group(ci); __mptr = (struct config_group const *)tmp; tmp___0 = (struct iscsi_wwn_stat_grps *)__mptr + 0xffffffffffffff90UL; } else { tmp___0 = (struct iscsi_wwn_stat_grps *)0; } return (tmp___0); } } static ssize_t iscsi_stat_instance_attr_show(struct config_item *item , struct configfs_attribute *attr , char *page ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_instance_attribute *iscsi_stat_instance_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_instance(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_instance_attr = (struct iscsi_stat_instance_attribute *)__mptr; ret = 0L; if ((unsigned long )iscsi_stat_instance_attr->show != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char * ))0)) { ret = (*(iscsi_stat_instance_attr->show))(iscsi_wwn_stat_grps, page); } else { } return (ret); } } static ssize_t iscsi_stat_instance_attr_store(struct config_item *item , struct configfs_attribute *attr , char const *page , size_t count ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_instance_attribute *iscsi_stat_instance_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_instance(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_instance_attr = (struct iscsi_stat_instance_attribute *)__mptr; ret = -22L; if ((unsigned long )iscsi_stat_instance_attr->store != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char const * , size_t ))0)) { ret = (*(iscsi_stat_instance_attr->store))(iscsi_wwn_stat_grps, page, count); } else { } return (ret); } } static struct configfs_attribute *iscsi_stat_instance_attrs[14U] = { & iscsi_stat_instance_inst.attr, & iscsi_stat_instance_min_ver.attr, & iscsi_stat_instance_max_ver.attr, & iscsi_stat_instance_portals.attr, & iscsi_stat_instance_nodes.attr, & iscsi_stat_instance_sessions.attr, & iscsi_stat_instance_fail_sess.attr, & iscsi_stat_instance_fail_type.attr, & iscsi_stat_instance_fail_rem_name.attr, & iscsi_stat_instance_disc_time.attr, & iscsi_stat_instance_description.attr, & iscsi_stat_instance_vendor.attr, & iscsi_stat_instance_version.attr, (struct configfs_attribute *)0}; static struct configfs_item_operations iscsi_stat_instance_item_ops = {0, & iscsi_stat_instance_attr_show, & iscsi_stat_instance_attr_store, 0, 0}; struct config_item_type iscsi_stat_instance_cit = {& __this_module, & iscsi_stat_instance_item_ops, 0, (struct configfs_attribute **)(& iscsi_stat_instance_attrs)}; static ssize_t iscsi_stat_sess_err_show_attr_inst(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; tmp = snprintf(page, 4096UL, "%u\n", tiqn->tiqn_index); return ((ssize_t )tmp); } } static struct iscsi_stat_sess_err_attribute iscsi_stat_sess_err_inst = {{"inst", & __this_module, 292U}, & iscsi_stat_sess_err_show_attr_inst, 0}; static ssize_t iscsi_stat_sess_err_show_attr_digest_errors(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_sess_err_stats *sess_err ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; sess_err = & tiqn->sess_err_stats; tmp = snprintf(page, 4096UL, "%u\n", sess_err->digest_errors); return ((ssize_t )tmp); } } static struct iscsi_stat_sess_err_attribute iscsi_stat_sess_err_digest_errors = {{"digest_errors", & __this_module, 292U}, & iscsi_stat_sess_err_show_attr_digest_errors, 0}; static ssize_t iscsi_stat_sess_err_show_attr_cxn_errors(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_sess_err_stats *sess_err ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; sess_err = & tiqn->sess_err_stats; tmp = snprintf(page, 4096UL, "%u\n", sess_err->cxn_timeout_errors); return ((ssize_t )tmp); } } static struct iscsi_stat_sess_err_attribute iscsi_stat_sess_err_cxn_errors = {{"cxn_errors", & __this_module, 292U}, & iscsi_stat_sess_err_show_attr_cxn_errors, 0}; static ssize_t iscsi_stat_sess_err_show_attr_format_errors(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_sess_err_stats *sess_err ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; sess_err = & tiqn->sess_err_stats; tmp = snprintf(page, 4096UL, "%u\n", sess_err->pdu_format_errors); return ((ssize_t )tmp); } } static struct iscsi_stat_sess_err_attribute iscsi_stat_sess_err_format_errors = {{"format_errors", & __this_module, 292U}, & iscsi_stat_sess_err_show_attr_format_errors, 0}; static struct iscsi_wwn_stat_grps *to_iscsi_stat_sess_err(struct config_item *ci ) { struct config_group const *__mptr ; struct config_group *tmp ; struct iscsi_wwn_stat_grps *tmp___0 ; { if ((unsigned long )ci != (unsigned long )((struct config_item *)0)) { tmp = to_config_group(ci); __mptr = (struct config_group const *)tmp; tmp___0 = (struct iscsi_wwn_stat_grps *)__mptr + 0xffffffffffffff20UL; } else { tmp___0 = (struct iscsi_wwn_stat_grps *)0; } return (tmp___0); } } static ssize_t iscsi_stat_sess_err_attr_show(struct config_item *item , struct configfs_attribute *attr , char *page ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_sess_err_attribute *iscsi_stat_sess_err_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_sess_err(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_sess_err_attr = (struct iscsi_stat_sess_err_attribute *)__mptr; ret = 0L; if ((unsigned long )iscsi_stat_sess_err_attr->show != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char * ))0)) { ret = (*(iscsi_stat_sess_err_attr->show))(iscsi_wwn_stat_grps, page); } else { } return (ret); } } static ssize_t iscsi_stat_sess_err_attr_store(struct config_item *item , struct configfs_attribute *attr , char const *page , size_t count ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_sess_err_attribute *iscsi_stat_sess_err_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_sess_err(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_sess_err_attr = (struct iscsi_stat_sess_err_attribute *)__mptr; ret = -22L; if ((unsigned long )iscsi_stat_sess_err_attr->store != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char const * , size_t ))0)) { ret = (*(iscsi_stat_sess_err_attr->store))(iscsi_wwn_stat_grps, page, count); } else { } return (ret); } } static struct configfs_attribute *iscsi_stat_sess_err_attrs[5U] = { & iscsi_stat_sess_err_inst.attr, & iscsi_stat_sess_err_digest_errors.attr, & iscsi_stat_sess_err_cxn_errors.attr, & iscsi_stat_sess_err_format_errors.attr, (struct configfs_attribute *)0}; static struct configfs_item_operations iscsi_stat_sess_err_item_ops = {0, & iscsi_stat_sess_err_attr_show, & iscsi_stat_sess_err_attr_store, 0, 0}; struct config_item_type iscsi_stat_sess_err_cit = {& __this_module, & iscsi_stat_sess_err_item_ops, 0, (struct configfs_attribute **)(& iscsi_stat_sess_err_attrs)}; static ssize_t iscsi_stat_tgt_attr_show_attr_inst(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; tmp = snprintf(page, 4096UL, "%u\n", tiqn->tiqn_index); return ((ssize_t )tmp); } } static struct iscsi_stat_tgt_attr_attribute iscsi_stat_tgt_attr_inst = {{"inst", & __this_module, 292U}, & iscsi_stat_tgt_attr_show_attr_inst, 0}; static ssize_t iscsi_stat_tgt_attr_show_attr_indx(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%u\n", 1); return ((ssize_t )tmp); } } static struct iscsi_stat_tgt_attr_attribute iscsi_stat_tgt_attr_indx = {{"indx", & __this_module, 292U}, & iscsi_stat_tgt_attr_show_attr_indx, 0}; static ssize_t iscsi_stat_tgt_attr_show_attr_login_fails(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; u32 fail_count ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); fail_count = (((lstat->redirects + lstat->authorize_fails) + lstat->authenticate_fails) + lstat->negotiate_fails) + lstat->other_fails; spin_unlock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", fail_count); return ((ssize_t )tmp); } } static struct iscsi_stat_tgt_attr_attribute iscsi_stat_tgt_attr_login_fails = {{"login_fails", & __this_module, 292U}, & iscsi_stat_tgt_attr_show_attr_login_fails, 0}; static ssize_t iscsi_stat_tgt_attr_show_attr_last_fail_time(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; u32 last_fail_time ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); last_fail_time = lstat->last_fail_time != 0ULL ? (unsigned int )(((unsigned long )((unsigned int )lstat->last_fail_time) * 100UL + 0xffffff9c007270e0UL) / 250UL) : 0U; spin_unlock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", last_fail_time); return ((ssize_t )tmp); } } static struct iscsi_stat_tgt_attr_attribute iscsi_stat_tgt_attr_last_fail_time = {{"last_fail_time", & __this_module, 292U}, & iscsi_stat_tgt_attr_show_attr_last_fail_time, 0}; static ssize_t iscsi_stat_tgt_attr_show_attr_last_fail_type(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; u32 last_fail_type ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); last_fail_type = lstat->last_fail_type; spin_unlock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", last_fail_type); return ((ssize_t )tmp); } } static struct iscsi_stat_tgt_attr_attribute iscsi_stat_tgt_attr_last_fail_type = {{"last_fail_type", & __this_module, 292U}, & iscsi_stat_tgt_attr_show_attr_last_fail_type, 0}; static ssize_t iscsi_stat_tgt_attr_show_attr_fail_intr_name(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; unsigned char buf[224U] ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); snprintf((char *)(& buf), 224UL, "%s", (int )((signed char )lstat->last_intr_fail_name[0]) != 0 ? (char *)(& lstat->last_intr_fail_name) : (char *)"None"); spin_unlock(& lstat->lock); tmp = snprintf(page, 4096UL, "%s\n", (unsigned char *)(& buf)); return ((ssize_t )tmp); } } static struct iscsi_stat_tgt_attr_attribute iscsi_stat_tgt_attr_fail_intr_name = {{"fail_intr_name", & __this_module, 292U}, & iscsi_stat_tgt_attr_show_attr_fail_intr_name, 0}; static ssize_t iscsi_stat_tgt_attr_show_attr_fail_intr_addr_type(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; int ret ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); if (lstat->last_intr_fail_ip_family == 10) { ret = snprintf(page, 4096UL, "ipv6\n"); } else { ret = snprintf(page, 4096UL, "ipv4\n"); } spin_unlock(& lstat->lock); return ((ssize_t )ret); } } static struct iscsi_stat_tgt_attr_attribute iscsi_stat_tgt_attr_fail_intr_addr_type = {{"fail_intr_addr_type", & __this_module, 292U}, & iscsi_stat_tgt_attr_show_attr_fail_intr_addr_type, 0}; static ssize_t iscsi_stat_tgt_attr_show_attr_fail_intr_addr(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; int ret ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); ret = snprintf(page, 4096UL, "%s\n", (unsigned char *)(& lstat->last_intr_fail_ip_addr)); spin_unlock(& lstat->lock); return ((ssize_t )ret); } } static struct iscsi_stat_tgt_attr_attribute iscsi_stat_tgt_attr_fail_intr_addr = {{"fail_intr_addr", & __this_module, 292U}, & iscsi_stat_tgt_attr_show_attr_fail_intr_addr, 0}; static struct iscsi_wwn_stat_grps *to_iscsi_stat_tgt_attr(struct config_item *ci ) { struct config_group const *__mptr ; struct config_group *tmp ; struct iscsi_wwn_stat_grps *tmp___0 ; { if ((unsigned long )ci != (unsigned long )((struct config_item *)0)) { tmp = to_config_group(ci); __mptr = (struct config_group const *)tmp; tmp___0 = (struct iscsi_wwn_stat_grps *)__mptr + 0xfffffffffffffeb0UL; } else { tmp___0 = (struct iscsi_wwn_stat_grps *)0; } return (tmp___0); } } static ssize_t iscsi_stat_tgt_attr_attr_show(struct config_item *item , struct configfs_attribute *attr , char *page ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_tgt_attr_attribute *iscsi_stat_tgt_attr_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_tgt_attr(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_tgt_attr_attr = (struct iscsi_stat_tgt_attr_attribute *)__mptr; ret = 0L; if ((unsigned long )iscsi_stat_tgt_attr_attr->show != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char * ))0)) { ret = (*(iscsi_stat_tgt_attr_attr->show))(iscsi_wwn_stat_grps, page); } else { } return (ret); } } static ssize_t iscsi_stat_tgt_attr_attr_store(struct config_item *item , struct configfs_attribute *attr , char const *page , size_t count ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_tgt_attr_attribute *iscsi_stat_tgt_attr_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_tgt_attr(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_tgt_attr_attr = (struct iscsi_stat_tgt_attr_attribute *)__mptr; ret = -22L; if ((unsigned long )iscsi_stat_tgt_attr_attr->store != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char const * , size_t ))0)) { ret = (*(iscsi_stat_tgt_attr_attr->store))(iscsi_wwn_stat_grps, page, count); } else { } return (ret); } } static struct configfs_attribute *iscsi_stat_tgt_attr_attrs[9U] = { & iscsi_stat_tgt_attr_inst.attr, & iscsi_stat_tgt_attr_indx.attr, & iscsi_stat_tgt_attr_login_fails.attr, & iscsi_stat_tgt_attr_last_fail_time.attr, & iscsi_stat_tgt_attr_last_fail_type.attr, & iscsi_stat_tgt_attr_fail_intr_name.attr, & iscsi_stat_tgt_attr_fail_intr_addr_type.attr, & iscsi_stat_tgt_attr_fail_intr_addr.attr, (struct configfs_attribute *)0}; static struct configfs_item_operations iscsi_stat_tgt_attr_item_ops = {0, & iscsi_stat_tgt_attr_attr_show, & iscsi_stat_tgt_attr_attr_store, 0, 0}; struct config_item_type iscsi_stat_tgt_attr_cit = {& __this_module, & iscsi_stat_tgt_attr_item_ops, 0, (struct configfs_attribute **)(& iscsi_stat_tgt_attr_attrs)}; static ssize_t iscsi_stat_login_show_attr_inst(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; tmp = snprintf(page, 4096UL, "%u\n", tiqn->tiqn_index); return ((ssize_t )tmp); } } static struct iscsi_stat_login_attribute iscsi_stat_login_inst = {{"inst", & __this_module, 292U}, & iscsi_stat_login_show_attr_inst, 0}; static ssize_t iscsi_stat_login_show_attr_indx(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%u\n", 1); return ((ssize_t )tmp); } } static struct iscsi_stat_login_attribute iscsi_stat_login_indx = {{"indx", & __this_module, 292U}, & iscsi_stat_login_show_attr_indx, 0}; static ssize_t iscsi_stat_login_show_attr_accepts(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; ssize_t ret ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", lstat->accepts); ret = (ssize_t )tmp; spin_unlock(& lstat->lock); return (ret); } } static struct iscsi_stat_login_attribute iscsi_stat_login_accepts = {{"accepts", & __this_module, 292U}, & iscsi_stat_login_show_attr_accepts, 0}; static ssize_t iscsi_stat_login_show_attr_other_fails(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; ssize_t ret ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", lstat->other_fails); ret = (ssize_t )tmp; spin_unlock(& lstat->lock); return (ret); } } static struct iscsi_stat_login_attribute iscsi_stat_login_other_fails = {{"other_fails", & __this_module, 292U}, & iscsi_stat_login_show_attr_other_fails, 0}; static ssize_t iscsi_stat_login_show_attr_redirects(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; ssize_t ret ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", lstat->redirects); ret = (ssize_t )tmp; spin_unlock(& lstat->lock); return (ret); } } static struct iscsi_stat_login_attribute iscsi_stat_login_redirects = {{"redirects", & __this_module, 292U}, & iscsi_stat_login_show_attr_redirects, 0}; static ssize_t iscsi_stat_login_show_attr_authorize_fails(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; ssize_t ret ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", lstat->authorize_fails); ret = (ssize_t )tmp; spin_unlock(& lstat->lock); return (ret); } } static struct iscsi_stat_login_attribute iscsi_stat_login_authorize_fails = {{"authorize_fails", & __this_module, 292U}, & iscsi_stat_login_show_attr_authorize_fails, 0}; static ssize_t iscsi_stat_login_show_attr_authenticate_fails(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; ssize_t ret ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", lstat->authenticate_fails); ret = (ssize_t )tmp; spin_unlock(& lstat->lock); return (ret); } } static struct iscsi_stat_login_attribute iscsi_stat_login_authenticate_fails = {{"authenticate_fails", & __this_module, 292U}, & iscsi_stat_login_show_attr_authenticate_fails, 0}; static ssize_t iscsi_stat_login_show_attr_negotiate_fails(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_login_stats *lstat ; ssize_t ret ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstat = & tiqn->login_stats; spin_lock(& lstat->lock); tmp = snprintf(page, 4096UL, "%u\n", lstat->negotiate_fails); ret = (ssize_t )tmp; spin_unlock(& lstat->lock); return (ret); } } static struct iscsi_stat_login_attribute iscsi_stat_login_negotiate_fails = {{"negotiate_fails", & __this_module, 292U}, & iscsi_stat_login_show_attr_negotiate_fails, 0}; static struct iscsi_wwn_stat_grps *to_iscsi_stat_login(struct config_item *ci ) { struct config_group const *__mptr ; struct config_group *tmp ; struct iscsi_wwn_stat_grps *tmp___0 ; { if ((unsigned long )ci != (unsigned long )((struct config_item *)0)) { tmp = to_config_group(ci); __mptr = (struct config_group const *)tmp; tmp___0 = (struct iscsi_wwn_stat_grps *)__mptr + 0xfffffffffffffe40UL; } else { tmp___0 = (struct iscsi_wwn_stat_grps *)0; } return (tmp___0); } } static ssize_t iscsi_stat_login_attr_show(struct config_item *item , struct configfs_attribute *attr , char *page ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_login_attribute *iscsi_stat_login_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_login(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_login_attr = (struct iscsi_stat_login_attribute *)__mptr; ret = 0L; if ((unsigned long )iscsi_stat_login_attr->show != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char * ))0)) { ret = (*(iscsi_stat_login_attr->show))(iscsi_wwn_stat_grps, page); } else { } return (ret); } } static ssize_t iscsi_stat_login_attr_store(struct config_item *item , struct configfs_attribute *attr , char const *page , size_t count ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_login_attribute *iscsi_stat_login_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_login(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_login_attr = (struct iscsi_stat_login_attribute *)__mptr; ret = -22L; if ((unsigned long )iscsi_stat_login_attr->store != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char const * , size_t ))0)) { ret = (*(iscsi_stat_login_attr->store))(iscsi_wwn_stat_grps, page, count); } else { } return (ret); } } static struct configfs_attribute *iscsi_stat_login_stats_attrs[9U] = { & iscsi_stat_login_inst.attr, & iscsi_stat_login_indx.attr, & iscsi_stat_login_accepts.attr, & iscsi_stat_login_other_fails.attr, & iscsi_stat_login_redirects.attr, & iscsi_stat_login_authorize_fails.attr, & iscsi_stat_login_authenticate_fails.attr, & iscsi_stat_login_negotiate_fails.attr, (struct configfs_attribute *)0}; static struct configfs_item_operations iscsi_stat_login_stats_item_ops = {0, & iscsi_stat_login_attr_show, & iscsi_stat_login_attr_store, 0, 0}; struct config_item_type iscsi_stat_login_cit = {& __this_module, & iscsi_stat_login_stats_item_ops, 0, (struct configfs_attribute **)(& iscsi_stat_login_stats_attrs)}; static ssize_t iscsi_stat_logout_show_attr_inst(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; tmp = snprintf(page, 4096UL, "%u\n", tiqn->tiqn_index); return ((ssize_t )tmp); } } static struct iscsi_stat_logout_attribute iscsi_stat_logout_inst = {{"inst", & __this_module, 292U}, & iscsi_stat_logout_show_attr_inst, 0}; static ssize_t iscsi_stat_logout_show_attr_indx(struct iscsi_wwn_stat_grps *igrps , char *page ) { int tmp ; { tmp = snprintf(page, 4096UL, "%u\n", 1); return ((ssize_t )tmp); } } static struct iscsi_stat_logout_attribute iscsi_stat_logout_indx = {{"indx", & __this_module, 292U}, & iscsi_stat_logout_show_attr_indx, 0}; static ssize_t iscsi_stat_logout_show_attr_normal_logouts(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_logout_stats *lstats ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstats = & tiqn->logout_stats; tmp = snprintf(page, 4096UL, "%u\n", lstats->normal_logouts); return ((ssize_t )tmp); } } static struct iscsi_stat_logout_attribute iscsi_stat_logout_normal_logouts = {{"normal_logouts", & __this_module, 292U}, & iscsi_stat_logout_show_attr_normal_logouts, 0}; static ssize_t iscsi_stat_logout_show_attr_abnormal_logouts(struct iscsi_wwn_stat_grps *igrps , char *page ) { struct iscsi_tiqn *tiqn ; struct iscsi_wwn_stat_grps const *__mptr ; struct iscsi_logout_stats *lstats ; int tmp ; { __mptr = (struct iscsi_wwn_stat_grps const *)igrps; tiqn = (struct iscsi_tiqn *)__mptr + 0xfffffffffffffd60UL; lstats = & tiqn->logout_stats; tmp = snprintf(page, 4096UL, "%u\n", lstats->abnormal_logouts); return ((ssize_t )tmp); } } static struct iscsi_stat_logout_attribute iscsi_stat_logout_abnormal_logouts = {{"abnormal_logouts", & __this_module, 292U}, & iscsi_stat_logout_show_attr_abnormal_logouts, 0}; static struct iscsi_wwn_stat_grps *to_iscsi_stat_logout(struct config_item *ci ) { struct config_group const *__mptr ; struct config_group *tmp ; struct iscsi_wwn_stat_grps *tmp___0 ; { if ((unsigned long )ci != (unsigned long )((struct config_item *)0)) { tmp = to_config_group(ci); __mptr = (struct config_group const *)tmp; tmp___0 = (struct iscsi_wwn_stat_grps *)__mptr + 0xfffffffffffffdd0UL; } else { tmp___0 = (struct iscsi_wwn_stat_grps *)0; } return (tmp___0); } } static ssize_t iscsi_stat_logout_attr_show(struct config_item *item , struct configfs_attribute *attr , char *page ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_logout_attribute *iscsi_stat_logout_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_logout(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_logout_attr = (struct iscsi_stat_logout_attribute *)__mptr; ret = 0L; if ((unsigned long )iscsi_stat_logout_attr->show != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char * ))0)) { ret = (*(iscsi_stat_logout_attr->show))(iscsi_wwn_stat_grps, page); } else { } return (ret); } } static ssize_t iscsi_stat_logout_attr_store(struct config_item *item , struct configfs_attribute *attr , char const *page , size_t count ) { struct iscsi_wwn_stat_grps *iscsi_wwn_stat_grps ; struct iscsi_wwn_stat_grps *tmp ; struct iscsi_stat_logout_attribute *iscsi_stat_logout_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_logout(item); iscsi_wwn_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_logout_attr = (struct iscsi_stat_logout_attribute *)__mptr; ret = -22L; if ((unsigned long )iscsi_stat_logout_attr->store != (unsigned long )((ssize_t (*)(struct iscsi_wwn_stat_grps * , char const * , size_t ))0)) { ret = (*(iscsi_stat_logout_attr->store))(iscsi_wwn_stat_grps, page, count); } else { } return (ret); } } static struct configfs_attribute *iscsi_stat_logout_stats_attrs[5U] = { & iscsi_stat_logout_inst.attr, & iscsi_stat_logout_indx.attr, & iscsi_stat_logout_normal_logouts.attr, & iscsi_stat_logout_abnormal_logouts.attr, (struct configfs_attribute *)0}; static struct configfs_item_operations iscsi_stat_logout_stats_item_ops = {0, & iscsi_stat_logout_attr_show, & iscsi_stat_logout_attr_store, 0, 0}; struct config_item_type iscsi_stat_logout_cit = {& __this_module, & iscsi_stat_logout_stats_item_ops, 0, (struct configfs_attribute **)(& iscsi_stat_logout_stats_attrs)}; static ssize_t iscsi_stat_sess_show_attr_inst(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_wwn *wwn ; struct iscsi_tiqn *tiqn ; struct se_wwn const *__mptr___0 ; int tmp ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; wwn = (acl->se_node_acl.se_tpg)->se_tpg_wwn; __mptr___0 = (struct se_wwn const *)wwn; tiqn = (struct iscsi_tiqn *)__mptr___0 + 0xfffffffffffffe58UL; tmp = snprintf(page, 4096UL, "%u\n", tiqn->tiqn_index); return ((ssize_t )tmp); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_inst = {{"inst", & __this_module, 292U}, & iscsi_stat_sess_show_attr_inst, 0}; static ssize_t iscsi_stat_sess_show_attr_node(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_node_acl *se_nacl ; struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t ret ; int tmp ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; se_nacl = & acl->se_node_acl; ret = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; if ((unsigned long )sess != (unsigned long )((struct iscsi_session *)0)) { tmp = snprintf(page, 4096UL, "%u\n", (unsigned int )(sess->sess_ops)->SessionType == 0U); ret = (ssize_t )tmp; } else { } } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (ret); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_node = {{"node", & __this_module, 292U}, & iscsi_stat_sess_show_attr_node, 0}; static ssize_t iscsi_stat_sess_show_attr_indx(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_node_acl *se_nacl ; struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t ret ; int tmp ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; se_nacl = & acl->se_node_acl; ret = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; if ((unsigned long )sess != (unsigned long )((struct iscsi_session *)0)) { tmp = snprintf(page, 4096UL, "%u\n", sess->session_index); ret = (ssize_t )tmp; } else { } } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (ret); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_indx = {{"indx", & __this_module, 292U}, & iscsi_stat_sess_show_attr_indx, 0}; static ssize_t iscsi_stat_sess_show_attr_cmd_pdus(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_node_acl *se_nacl ; struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t ret ; long tmp ; int tmp___0 ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; se_nacl = & acl->se_node_acl; ret = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; if ((unsigned long )sess != (unsigned long )((struct iscsi_session *)0)) { tmp = atomic_long_read(& sess->cmd_pdus); tmp___0 = snprintf(page, 4096UL, "%lu\n", tmp); ret = (ssize_t )tmp___0; } else { } } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (ret); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_cmd_pdus = {{"cmd_pdus", & __this_module, 292U}, & iscsi_stat_sess_show_attr_cmd_pdus, 0}; static ssize_t iscsi_stat_sess_show_attr_rsp_pdus(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_node_acl *se_nacl ; struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t ret ; long tmp ; int tmp___0 ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; se_nacl = & acl->se_node_acl; ret = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; if ((unsigned long )sess != (unsigned long )((struct iscsi_session *)0)) { tmp = atomic_long_read(& sess->rsp_pdus); tmp___0 = snprintf(page, 4096UL, "%lu\n", tmp); ret = (ssize_t )tmp___0; } else { } } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (ret); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_rsp_pdus = {{"rsp_pdus", & __this_module, 292U}, & iscsi_stat_sess_show_attr_rsp_pdus, 0}; static ssize_t iscsi_stat_sess_show_attr_txdata_octs(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_node_acl *se_nacl ; struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t ret ; long tmp ; int tmp___0 ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; se_nacl = & acl->se_node_acl; ret = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; if ((unsigned long )sess != (unsigned long )((struct iscsi_session *)0)) { tmp = atomic_long_read(& sess->tx_data_octets); tmp___0 = snprintf(page, 4096UL, "%lu\n", tmp); ret = (ssize_t )tmp___0; } else { } } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (ret); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_txdata_octs = {{"txdata_octs", & __this_module, 292U}, & iscsi_stat_sess_show_attr_txdata_octs, 0}; static ssize_t iscsi_stat_sess_show_attr_rxdata_octs(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_node_acl *se_nacl ; struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t ret ; long tmp ; int tmp___0 ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; se_nacl = & acl->se_node_acl; ret = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; if ((unsigned long )sess != (unsigned long )((struct iscsi_session *)0)) { tmp = atomic_long_read(& sess->rx_data_octets); tmp___0 = snprintf(page, 4096UL, "%lu\n", tmp); ret = (ssize_t )tmp___0; } else { } } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (ret); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_rxdata_octs = {{"rxdata_octs", & __this_module, 292U}, & iscsi_stat_sess_show_attr_rxdata_octs, 0}; static ssize_t iscsi_stat_sess_show_attr_conn_digest_errors(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_node_acl *se_nacl ; struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t ret ; long tmp ; int tmp___0 ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; se_nacl = & acl->se_node_acl; ret = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; if ((unsigned long )sess != (unsigned long )((struct iscsi_session *)0)) { tmp = atomic_long_read(& sess->conn_digest_errors); tmp___0 = snprintf(page, 4096UL, "%lu\n", tmp); ret = (ssize_t )tmp___0; } else { } } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (ret); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_conn_digest_errors = {{"conn_digest_errors", & __this_module, 292U}, & iscsi_stat_sess_show_attr_conn_digest_errors, 0}; static ssize_t iscsi_stat_sess_show_attr_conn_timeout_errors(struct iscsi_node_stat_grps *igrps , char *page ) { struct iscsi_node_acl *acl ; struct iscsi_node_stat_grps const *__mptr ; struct se_node_acl *se_nacl ; struct iscsi_session *sess ; struct se_session *se_sess ; ssize_t ret ; long tmp ; int tmp___0 ; { __mptr = (struct iscsi_node_stat_grps const *)igrps; acl = (struct iscsi_node_acl *)__mptr + 0xfffffffffffff6a8UL; se_nacl = & acl->se_node_acl; ret = 0L; spin_lock_bh(& se_nacl->nacl_sess_lock); se_sess = se_nacl->nacl_sess; if ((unsigned long )se_sess != (unsigned long )((struct se_session *)0)) { sess = (struct iscsi_session *)se_sess->fabric_sess_ptr; if ((unsigned long )sess != (unsigned long )((struct iscsi_session *)0)) { tmp = atomic_long_read(& sess->conn_timeout_errors); tmp___0 = snprintf(page, 4096UL, "%lu\n", tmp); ret = (ssize_t )tmp___0; } else { } } else { } spin_unlock_bh(& se_nacl->nacl_sess_lock); return (ret); } } static struct iscsi_stat_sess_attribute iscsi_stat_sess_conn_timeout_errors = {{"conn_timeout_errors", & __this_module, 292U}, & iscsi_stat_sess_show_attr_conn_timeout_errors, 0}; static struct iscsi_node_stat_grps *to_iscsi_stat_sess(struct config_item *ci ) { struct config_group const *__mptr ; struct config_group *tmp ; struct iscsi_node_stat_grps *tmp___0 ; { if ((unsigned long )ci != (unsigned long )((struct config_item *)0)) { tmp = to_config_group(ci); __mptr = (struct config_group const *)tmp; tmp___0 = (struct iscsi_node_stat_grps *)__mptr; } else { tmp___0 = (struct iscsi_node_stat_grps *)0; } return (tmp___0); } } static ssize_t iscsi_stat_sess_attr_show(struct config_item *item , struct configfs_attribute *attr , char *page ) { struct iscsi_node_stat_grps *iscsi_node_stat_grps ; struct iscsi_node_stat_grps *tmp ; struct iscsi_stat_sess_attribute *iscsi_stat_sess_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_sess(item); iscsi_node_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_sess_attr = (struct iscsi_stat_sess_attribute *)__mptr; ret = 0L; if ((unsigned long )iscsi_stat_sess_attr->show != (unsigned long )((ssize_t (*)(struct iscsi_node_stat_grps * , char * ))0)) { ret = (*(iscsi_stat_sess_attr->show))(iscsi_node_stat_grps, page); } else { } return (ret); } } static ssize_t iscsi_stat_sess_attr_store(struct config_item *item , struct configfs_attribute *attr , char const *page , size_t count ) { struct iscsi_node_stat_grps *iscsi_node_stat_grps ; struct iscsi_node_stat_grps *tmp ; struct iscsi_stat_sess_attribute *iscsi_stat_sess_attr ; struct configfs_attribute const *__mptr ; ssize_t ret ; { tmp = to_iscsi_stat_sess(item); iscsi_node_stat_grps = tmp; __mptr = (struct configfs_attribute const *)attr; iscsi_stat_sess_attr = (struct iscsi_stat_sess_attribute *)__mptr; ret = -22L; if ((unsigned long )iscsi_stat_sess_attr->store != (unsigned long )((ssize_t (*)(struct iscsi_node_stat_grps * , char const * , size_t ))0)) { ret = (*(iscsi_stat_sess_attr->store))(iscsi_node_stat_grps, page, count); } else { } return (ret); } } static struct configfs_attribute *iscsi_stat_sess_stats_attrs[10U] = { & iscsi_stat_sess_inst.attr, & iscsi_stat_sess_node.attr, & iscsi_stat_sess_indx.attr, & iscsi_stat_sess_cmd_pdus.attr, & iscsi_stat_sess_rsp_pdus.attr, & iscsi_stat_sess_txdata_octs.attr, & iscsi_stat_sess_rxdata_octs.attr, & iscsi_stat_sess_conn_digest_errors.attr, & iscsi_stat_sess_conn_timeout_errors.attr, (struct configfs_attribute *)0}; static struct configfs_item_operations iscsi_stat_sess_stats_item_ops = {0, & iscsi_stat_sess_attr_show, & iscsi_stat_sess_attr_store, 0, 0}; struct config_item_type iscsi_stat_sess_cit = {& __this_module, & iscsi_stat_sess_stats_item_ops, 0, (struct configfs_attribute **)(& iscsi_stat_sess_stats_attrs)}; void ldv_initialize_configfs_item_operations_48(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(24UL); iscsi_stat_instance_item_ops_group0 = (struct configfs_attribute *)tmp; tmp___0 = ldv_init_zalloc(80UL); iscsi_stat_instance_item_ops_group1 = (struct config_item *)tmp___0; return; } } void ldv_initialize_configfs_item_operations_20(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(24UL); iscsi_stat_logout_stats_item_ops_group0 = (struct configfs_attribute *)tmp; tmp___0 = ldv_init_zalloc(80UL); iscsi_stat_logout_stats_item_ops_group1 = (struct config_item *)tmp___0; return; } } void ldv_initialize_configfs_item_operations_34(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(24UL); iscsi_stat_tgt_attr_item_ops_group0 = (struct configfs_attribute *)tmp; tmp___0 = ldv_init_zalloc(80UL); iscsi_stat_tgt_attr_item_ops_group1 = (struct config_item *)tmp___0; return; } } void ldv_initialize_configfs_item_operations_43(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(24UL); iscsi_stat_sess_err_item_ops_group0 = (struct configfs_attribute *)tmp; tmp___0 = ldv_init_zalloc(80UL); iscsi_stat_sess_err_item_ops_group1 = (struct config_item *)tmp___0; return; } } void ldv_initialize_configfs_item_operations_10(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(24UL); iscsi_stat_sess_stats_item_ops_group0 = (struct configfs_attribute *)tmp; tmp___0 = ldv_init_zalloc(80UL); iscsi_stat_sess_stats_item_ops_group1 = (struct config_item *)tmp___0; return; } } void ldv_initialize_configfs_item_operations_25(void) { void *tmp ; void *tmp___0 ; { tmp = ldv_init_zalloc(24UL); iscsi_stat_login_stats_item_ops_group0 = (struct configfs_attribute *)tmp; tmp___0 = ldv_init_zalloc(80UL); iscsi_stat_login_stats_item_ops_group1 = (struct config_item *)tmp___0; return; } } void ldv_main_exported_33(void) { char *ldvarg168 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg167 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg168 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg167 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_33 == 1) { iscsi_stat_login_show_attr_inst(ldvarg167, ldvarg168); ldv_state_variable_33 = 1; } else { } goto ldv_58050; default: ldv_stop(); } ldv_58050: ; return; } } void ldv_main_exported_32(void) { struct iscsi_wwn_stat_grps *ldvarg3 ; void *tmp ; char *ldvarg4 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg3 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg4 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_32 == 1) { iscsi_stat_login_show_attr_indx(ldvarg3, ldvarg4); ldv_state_variable_32 = 1; } else { } goto ldv_58058; default: ldv_stop(); } ldv_58058: ; return; } } void ldv_main_exported_21(void) { struct iscsi_wwn_stat_grps *ldvarg169 ; void *tmp ; char *ldvarg170 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg169 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg170 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_21 == 1) { iscsi_stat_logout_show_attr_abnormal_logouts(ldvarg169, ldvarg170); ldv_state_variable_21 = 1; } else { } goto ldv_58066; default: ldv_stop(); } ldv_58066: ; return; } } void ldv_main_exported_26(void) { struct iscsi_wwn_stat_grps *ldvarg174 ; void *tmp ; char *ldvarg175 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg174 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg175 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_26 == 1) { iscsi_stat_login_show_attr_negotiate_fails(ldvarg174, ldvarg175); ldv_state_variable_26 = 1; } else { } goto ldv_58074; default: ldv_stop(); } ldv_58074: ; return; } } void ldv_main_exported_17(void) { char *ldvarg114 ; void *tmp ; struct iscsi_node_stat_grps *ldvarg113 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg114 = (char *)tmp; tmp___0 = ldv_init_zalloc(224UL); ldvarg113 = (struct iscsi_node_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_17 == 1) { iscsi_stat_sess_show_attr_indx(ldvarg113, ldvarg114); ldv_state_variable_17 = 1; } else { } goto ldv_58082; default: ldv_stop(); } ldv_58082: ; return; } } void ldv_main_exported_18(void) { struct iscsi_node_stat_grps *ldvarg16 ; void *tmp ; char *ldvarg17 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(224UL); ldvarg16 = (struct iscsi_node_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg17 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_18 == 1) { iscsi_stat_sess_show_attr_node(ldvarg16, ldvarg17); ldv_state_variable_18 = 1; } else { } goto ldv_58090; default: ldv_stop(); } ldv_58090: ; return; } } void ldv_main_exported_30(void) { char *ldvarg268 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg267 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg268 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg267 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_30 == 1) { iscsi_stat_login_show_attr_other_fails(ldvarg267, ldvarg268); ldv_state_variable_30 = 1; } else { } goto ldv_58098; default: ldv_stop(); } ldv_58098: ; return; } } void ldv_main_exported_16(void) { char *ldvarg22 ; void *tmp ; struct iscsi_node_stat_grps *ldvarg21 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg22 = (char *)tmp; tmp___0 = ldv_init_zalloc(224UL); ldvarg21 = (struct iscsi_node_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_16 == 1) { iscsi_stat_sess_show_attr_cmd_pdus(ldvarg21, ldvarg22); ldv_state_variable_16 = 1; } else { } goto ldv_58106; default: ldv_stop(); } ldv_58106: ; return; } } void ldv_main_exported_44(void) { struct iscsi_wwn_stat_grps *ldvarg23 ; void *tmp ; char *ldvarg24 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg23 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg24 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_44 == 1) { iscsi_stat_sess_err_show_attr_format_errors(ldvarg23, ldvarg24); ldv_state_variable_44 = 1; } else { } goto ldv_58114; default: ldv_stop(); } ldv_58114: ; return; } } void ldv_main_exported_55(void) { struct iscsi_wwn_stat_grps *ldvarg25 ; void *tmp ; char *ldvarg26 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg25 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg26 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_55 == 1) { iscsi_stat_instance_show_attr_fail_sess(ldvarg25, ldvarg26); ldv_state_variable_55 = 1; } else { } goto ldv_58122; default: ldv_stop(); } ldv_58122: ; return; } } void ldv_main_exported_27(void) { struct iscsi_wwn_stat_grps *ldvarg30 ; void *tmp ; char *ldvarg31 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg30 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg31 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_27 == 1) { iscsi_stat_login_show_attr_authenticate_fails(ldvarg30, ldvarg31); ldv_state_variable_27 = 1; } else { } goto ldv_58130; default: ldv_stop(); } ldv_58130: ; return; } } void ldv_main_exported_25(void) { char *ldvarg274 ; void *tmp ; char *ldvarg273 ; void *tmp___0 ; size_t ldvarg272 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg274 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg273 = (char *)tmp___0; ldv_memset((void *)(& ldvarg272), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_25 == 1) { iscsi_stat_login_attr_show(iscsi_stat_login_stats_item_ops_group1, iscsi_stat_login_stats_item_ops_group0, ldvarg274); ldv_state_variable_25 = 1; } else { } goto ldv_58139; case 1: ; if (ldv_state_variable_25 == 1) { iscsi_stat_login_attr_store(iscsi_stat_login_stats_item_ops_group1, iscsi_stat_login_stats_item_ops_group0, (char const *)ldvarg273, ldvarg272); ldv_state_variable_25 = 1; } else { } goto ldv_58139; default: ldv_stop(); } ldv_58139: ; return; } } void ldv_main_exported_28(void) { char *ldvarg279 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg278 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg279 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg278 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_28 == 1) { iscsi_stat_login_show_attr_authorize_fails(ldvarg278, ldvarg279); ldv_state_variable_28 = 1; } else { } goto ldv_58148; default: ldv_stop(); } ldv_58148: ; return; } } void ldv_main_exported_57(void) { struct iscsi_wwn_stat_grps *ldvarg34 ; void *tmp ; char *ldvarg35 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg34 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg35 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_57 == 1) { iscsi_stat_instance_show_attr_nodes(ldvarg34, ldvarg35); ldv_state_variable_57 = 1; } else { } goto ldv_58156; default: ldv_stop(); } ldv_58156: ; return; } } void ldv_main_exported_40(void) { char *ldvarg286 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg285 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg286 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg285 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_40 == 1) { iscsi_stat_tgt_attr_show_attr_login_fails(ldvarg285, ldvarg286); ldv_state_variable_40 = 1; } else { } goto ldv_58164; default: ldv_stop(); } ldv_58164: ; return; } } void ldv_main_exported_61(void) { struct iscsi_wwn_stat_grps *ldvarg190 ; void *tmp ; char *ldvarg191 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg190 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg191 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_61 == 1) { iscsi_stat_instance_show_attr_inst(ldvarg190, ldvarg191); ldv_state_variable_61 = 1; } else { } goto ldv_58172; default: ldv_stop(); } ldv_58172: ; return; } } void ldv_main_exported_14(void) { char *ldvarg125 ; void *tmp ; struct iscsi_node_stat_grps *ldvarg124 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg125 = (char *)tmp; tmp___0 = ldv_init_zalloc(224UL); ldvarg124 = (struct iscsi_node_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_14 == 1) { iscsi_stat_sess_show_attr_txdata_octs(ldvarg124, ldvarg125); ldv_state_variable_14 = 1; } else { } goto ldv_58180; default: ldv_stop(); } ldv_58180: ; return; } } void ldv_main_exported_20(void) { char *ldvarg38 ; void *tmp ; size_t ldvarg36 ; char *ldvarg37 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg38 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg37 = (char *)tmp___0; ldv_memset((void *)(& ldvarg36), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_20 == 1) { iscsi_stat_logout_attr_show(iscsi_stat_logout_stats_item_ops_group1, iscsi_stat_logout_stats_item_ops_group0, ldvarg38); ldv_state_variable_20 = 1; } else { } goto ldv_58189; case 1: ; if (ldv_state_variable_20 == 1) { iscsi_stat_logout_attr_store(iscsi_stat_logout_stats_item_ops_group1, iscsi_stat_logout_stats_item_ops_group0, (char const *)ldvarg37, ldvarg36); ldv_state_variable_20 = 1; } else { } goto ldv_58189; default: ldv_stop(); } ldv_58189: ; return; } } void ldv_main_exported_59(void) { char *ldvarg294 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg293 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg294 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg293 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_59 == 1) { iscsi_stat_instance_show_attr_max_ver(ldvarg293, ldvarg294); ldv_state_variable_59 = 1; } else { } goto ldv_58198; default: ldv_stop(); } ldv_58198: ; return; } } void ldv_main_exported_49(void) { struct iscsi_wwn_stat_grps *ldvarg130 ; void *tmp ; char *ldvarg131 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg130 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg131 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_49 == 1) { iscsi_stat_instance_show_attr_version(ldvarg130, ldvarg131); ldv_state_variable_49 = 1; } else { } goto ldv_58206; default: ldv_stop(); } ldv_58206: ; return; } } void ldv_main_exported_24(void) { struct iscsi_wwn_stat_grps *ldvarg132 ; void *tmp ; char *ldvarg133 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg132 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg133 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_24 == 1) { iscsi_stat_logout_show_attr_inst(ldvarg132, ldvarg133); ldv_state_variable_24 = 1; } else { } goto ldv_58214; default: ldv_stop(); } ldv_58214: ; return; } } void ldv_main_exported_10(void) { char *ldvarg205 ; void *tmp ; size_t ldvarg203 ; char *ldvarg204 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg205 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg204 = (char *)tmp___0; ldv_memset((void *)(& ldvarg203), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_10 == 1) { iscsi_stat_sess_attr_show(iscsi_stat_sess_stats_item_ops_group1, iscsi_stat_sess_stats_item_ops_group0, ldvarg205); ldv_state_variable_10 = 1; } else { } goto ldv_58223; case 1: ; if (ldv_state_variable_10 == 1) { iscsi_stat_sess_attr_store(iscsi_stat_sess_stats_item_ops_group1, iscsi_stat_sess_stats_item_ops_group0, (char const *)ldvarg204, ldvarg203); ldv_state_variable_10 = 1; } else { } goto ldv_58223; default: ldv_stop(); } ldv_58223: ; return; } } void ldv_main_exported_31(void) { char *ldvarg46 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg45 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg46 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg45 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_31 == 1) { iscsi_stat_login_show_attr_accepts(ldvarg45, ldvarg46); ldv_state_variable_31 = 1; } else { } goto ldv_58232; default: ldv_stop(); } ldv_58232: ; return; } } void ldv_main_exported_35(void) { struct iscsi_wwn_stat_grps *ldvarg47 ; void *tmp ; char *ldvarg48 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg47 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg48 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_35 == 1) { iscsi_stat_tgt_attr_show_attr_fail_intr_addr(ldvarg47, ldvarg48); ldv_state_variable_35 = 1; } else { } goto ldv_58240; default: ldv_stop(); } ldv_58240: ; return; } } void ldv_main_exported_11(void) { char *ldvarg50 ; void *tmp ; struct iscsi_node_stat_grps *ldvarg49 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg50 = (char *)tmp; tmp___0 = ldv_init_zalloc(224UL); ldvarg49 = (struct iscsi_node_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_11 == 1) { iscsi_stat_sess_show_attr_conn_timeout_errors(ldvarg49, ldvarg50); ldv_state_variable_11 = 1; } else { } goto ldv_58248; default: ldv_stop(); } ldv_58248: ; return; } } void ldv_main_exported_53(void) { struct iscsi_wwn_stat_grps *ldvarg298 ; void *tmp ; char *ldvarg299 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg298 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg299 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_53 == 1) { iscsi_stat_instance_show_attr_fail_rem_name(ldvarg298, ldvarg299); ldv_state_variable_53 = 1; } else { } goto ldv_58256; default: ldv_stop(); } ldv_58256: ; return; } } void ldv_main_exported_48(void) { char *ldvarg212 ; void *tmp ; size_t ldvarg211 ; char *ldvarg213 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg212 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg213 = (char *)tmp___0; ldv_memset((void *)(& ldvarg211), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_48 == 1) { iscsi_stat_instance_attr_show(iscsi_stat_instance_item_ops_group1, iscsi_stat_instance_item_ops_group0, ldvarg213); ldv_state_variable_48 = 1; } else { } goto ldv_58265; case 1: ; if (ldv_state_variable_48 == 1) { iscsi_stat_instance_attr_store(iscsi_stat_instance_item_ops_group1, iscsi_stat_instance_item_ops_group0, (char const *)ldvarg212, ldvarg211); ldv_state_variable_48 = 1; } else { } goto ldv_58265; default: ldv_stop(); } ldv_58265: ; return; } } void ldv_main_exported_42(void) { struct iscsi_wwn_stat_grps *ldvarg302 ; void *tmp ; char *ldvarg303 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg302 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg303 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_42 == 1) { iscsi_stat_tgt_attr_show_attr_inst(ldvarg302, ldvarg303); ldv_state_variable_42 = 1; } else { } goto ldv_58274; default: ldv_stop(); } ldv_58274: ; return; } } void ldv_main_exported_22(void) { struct iscsi_wwn_stat_grps *ldvarg304 ; void *tmp ; char *ldvarg305 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg304 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg305 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_22 == 1) { iscsi_stat_logout_show_attr_normal_logouts(ldvarg304, ldvarg305); ldv_state_variable_22 = 1; } else { } goto ldv_58282; default: ldv_stop(); } ldv_58282: ; return; } } void ldv_main_exported_46(void) { struct iscsi_wwn_stat_grps *ldvarg306 ; void *tmp ; char *ldvarg307 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg306 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg307 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_46 == 1) { iscsi_stat_sess_err_show_attr_digest_errors(ldvarg306, ldvarg307); ldv_state_variable_46 = 1; } else { } goto ldv_58290; default: ldv_stop(); } ldv_58290: ; return; } } void ldv_main_exported_13(void) { char *ldvarg309 ; void *tmp ; struct iscsi_node_stat_grps *ldvarg308 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg309 = (char *)tmp; tmp___0 = ldv_init_zalloc(224UL); ldvarg308 = (struct iscsi_node_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_13 == 1) { iscsi_stat_sess_show_attr_rxdata_octs(ldvarg308, ldvarg309); ldv_state_variable_13 = 1; } else { } goto ldv_58298; default: ldv_stop(); } ldv_58298: ; return; } } void ldv_main_exported_23(void) { struct iscsi_wwn_stat_grps *ldvarg148 ; void *tmp ; char *ldvarg149 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg148 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg149 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_23 == 1) { iscsi_stat_logout_show_attr_indx(ldvarg148, ldvarg149); ldv_state_variable_23 = 1; } else { } goto ldv_58306; default: ldv_stop(); } ldv_58306: ; return; } } void ldv_main_exported_29(void) { char *ldvarg64 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg63 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg64 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg63 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_29 == 1) { iscsi_stat_login_show_attr_redirects(ldvarg63, ldvarg64); ldv_state_variable_29 = 1; } else { } goto ldv_58314; default: ldv_stop(); } ldv_58314: ; return; } } void ldv_main_exported_50(void) { struct iscsi_wwn_stat_grps *ldvarg228 ; void *tmp ; char *ldvarg229 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg228 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg229 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_50 == 1) { iscsi_stat_instance_show_attr_vendor(ldvarg228, ldvarg229); ldv_state_variable_50 = 1; } else { } goto ldv_58322; default: ldv_stop(); } ldv_58322: ; return; } } void ldv_main_exported_39(void) { char *ldvarg231 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg230 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg231 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg230 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_39 == 1) { iscsi_stat_tgt_attr_show_attr_last_fail_time(ldvarg230, ldvarg231); ldv_state_variable_39 = 1; } else { } goto ldv_58330; default: ldv_stop(); } ldv_58330: ; return; } } void ldv_main_exported_36(void) { struct iscsi_wwn_stat_grps *ldvarg316 ; void *tmp ; char *ldvarg317 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg316 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg317 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_36 == 1) { iscsi_stat_tgt_attr_show_attr_fail_intr_addr_type(ldvarg316, ldvarg317); ldv_state_variable_36 = 1; } else { } goto ldv_58338; default: ldv_stop(); } ldv_58338: ; return; } } void ldv_main_exported_51(void) { struct iscsi_wwn_stat_grps *ldvarg321 ; void *tmp ; char *ldvarg322 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg321 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg322 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_51 == 1) { iscsi_stat_instance_show_attr_description(ldvarg321, ldvarg322); ldv_state_variable_51 = 1; } else { } goto ldv_58346; default: ldv_stop(); } ldv_58346: ; return; } } void ldv_main_exported_58(void) { char *ldvarg71 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg70 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg71 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg70 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_58 == 1) { iscsi_stat_instance_show_attr_portals(ldvarg70, ldvarg71); ldv_state_variable_58 = 1; } else { } goto ldv_58354; default: ldv_stop(); } ldv_58354: ; return; } } void ldv_main_exported_12(void) { char *ldvarg239 ; void *tmp ; struct iscsi_node_stat_grps *ldvarg238 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg239 = (char *)tmp; tmp___0 = ldv_init_zalloc(224UL); ldvarg238 = (struct iscsi_node_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_12 == 1) { iscsi_stat_sess_show_attr_conn_digest_errors(ldvarg238, ldvarg239); ldv_state_variable_12 = 1; } else { } goto ldv_58362; default: ldv_stop(); } ldv_58362: ; return; } } void ldv_main_exported_41(void) { char *ldvarg241 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg240 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg241 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg240 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_41 == 1) { iscsi_stat_tgt_attr_show_attr_indx(ldvarg240, ldvarg241); ldv_state_variable_41 = 1; } else { } goto ldv_58370; default: ldv_stop(); } ldv_58370: ; return; } } void ldv_main_exported_47(void) { struct iscsi_wwn_stat_grps *ldvarg155 ; void *tmp ; char *ldvarg156 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg155 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg156 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_47 == 1) { iscsi_stat_sess_err_show_attr_inst(ldvarg155, ldvarg156); ldv_state_variable_47 = 1; } else { } goto ldv_58378; default: ldv_stop(); } ldv_58378: ; return; } } void ldv_main_exported_15(void) { struct iscsi_node_stat_grps *ldvarg72 ; void *tmp ; char *ldvarg73 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(224UL); ldvarg72 = (struct iscsi_node_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg73 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_15 == 1) { iscsi_stat_sess_show_attr_rsp_pdus(ldvarg72, ldvarg73); ldv_state_variable_15 = 1; } else { } goto ldv_58386; default: ldv_stop(); } ldv_58386: ; return; } } void ldv_main_exported_52(void) { char *ldvarg243 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg242 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg243 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg242 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_52 == 1) { iscsi_stat_instance_show_attr_disc_time(ldvarg242, ldvarg243); ldv_state_variable_52 = 1; } else { } goto ldv_58394; default: ldv_stop(); } ldv_58394: ; return; } } void ldv_main_exported_38(void) { struct iscsi_wwn_stat_grps *ldvarg326 ; void *tmp ; char *ldvarg327 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg326 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg327 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_38 == 1) { iscsi_stat_tgt_attr_show_attr_last_fail_type(ldvarg326, ldvarg327); ldv_state_variable_38 = 1; } else { } goto ldv_58402; default: ldv_stop(); } ldv_58402: ; return; } } void ldv_main_exported_60(void) { struct iscsi_wwn_stat_grps *ldvarg80 ; void *tmp ; char *ldvarg81 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg80 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg81 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_60 == 1) { iscsi_stat_instance_show_attr_min_ver(ldvarg80, ldvarg81); ldv_state_variable_60 = 1; } else { } goto ldv_58410; default: ldv_stop(); } ldv_58410: ; return; } } void ldv_main_exported_34(void) { size_t ldvarg328 ; char *ldvarg330 ; void *tmp ; char *ldvarg329 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg330 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg329 = (char *)tmp___0; ldv_memset((void *)(& ldvarg328), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_34 == 1) { iscsi_stat_tgt_attr_attr_show(iscsi_stat_tgt_attr_item_ops_group1, iscsi_stat_tgt_attr_item_ops_group0, ldvarg330); ldv_state_variable_34 = 1; } else { } goto ldv_58419; case 1: ; if (ldv_state_variable_34 == 1) { iscsi_stat_tgt_attr_attr_store(iscsi_stat_tgt_attr_item_ops_group1, iscsi_stat_tgt_attr_item_ops_group0, (char const *)ldvarg329, ldvarg328); ldv_state_variable_34 = 1; } else { } goto ldv_58419; default: ldv_stop(); } ldv_58419: ; return; } } void ldv_main_exported_56(void) { char *ldvarg245 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg244 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg245 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg244 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_56 == 1) { iscsi_stat_instance_show_attr_sessions(ldvarg244, ldvarg245); ldv_state_variable_56 = 1; } else { } goto ldv_58428; default: ldv_stop(); } ldv_58428: ; return; } } void ldv_main_exported_45(void) { char *ldvarg247 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg246 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg247 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg246 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_45 == 1) { iscsi_stat_sess_err_show_attr_cxn_errors(ldvarg246, ldvarg247); ldv_state_variable_45 = 1; } else { } goto ldv_58436; default: ldv_stop(); } ldv_58436: ; return; } } void ldv_main_exported_37(void) { struct iscsi_wwn_stat_grps *ldvarg160 ; void *tmp ; char *ldvarg161 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(672UL); ldvarg160 = (struct iscsi_wwn_stat_grps *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg161 = (char *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_37 == 1) { iscsi_stat_tgt_attr_show_attr_fail_intr_name(ldvarg160, ldvarg161); ldv_state_variable_37 = 1; } else { } goto ldv_58444; default: ldv_stop(); } ldv_58444: ; return; } } void ldv_main_exported_43(void) { char *ldvarg166 ; void *tmp ; char *ldvarg165 ; void *tmp___0 ; size_t ldvarg164 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg166 = (char *)tmp; tmp___0 = ldv_init_zalloc(1UL); ldvarg165 = (char *)tmp___0; ldv_memset((void *)(& ldvarg164), 0, 8UL); tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_43 == 1) { iscsi_stat_sess_err_attr_show(iscsi_stat_sess_err_item_ops_group1, iscsi_stat_sess_err_item_ops_group0, ldvarg166); ldv_state_variable_43 = 1; } else { } goto ldv_58453; case 1: ; if (ldv_state_variable_43 == 1) { iscsi_stat_sess_err_attr_store(iscsi_stat_sess_err_item_ops_group1, iscsi_stat_sess_err_item_ops_group0, (char const *)ldvarg165, ldvarg164); ldv_state_variable_43 = 1; } else { } goto ldv_58453; default: ldv_stop(); } ldv_58453: ; return; } } void ldv_main_exported_19(void) { char *ldvarg251 ; void *tmp ; struct iscsi_node_stat_grps *ldvarg250 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg251 = (char *)tmp; tmp___0 = ldv_init_zalloc(224UL); ldvarg250 = (struct iscsi_node_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_19 == 1) { iscsi_stat_sess_show_attr_inst(ldvarg250, ldvarg251); ldv_state_variable_19 = 1; } else { } goto ldv_58462; default: ldv_stop(); } ldv_58462: ; return; } } void ldv_main_exported_54(void) { char *ldvarg253 ; void *tmp ; struct iscsi_wwn_stat_grps *ldvarg252 ; void *tmp___0 ; int tmp___1 ; { tmp = ldv_init_zalloc(1UL); ldvarg253 = (char *)tmp; tmp___0 = ldv_init_zalloc(672UL); ldvarg252 = (struct iscsi_wwn_stat_grps *)tmp___0; tmp___1 = __VERIFIER_nondet_int(); switch (tmp___1) { case 0: ; if (ldv_state_variable_54 == 1) { iscsi_stat_instance_show_attr_fail_type(ldvarg252, ldvarg253); ldv_state_variable_54 = 1; } else { } goto ldv_58470; default: ldv_stop(); } ldv_58470: ; return; } } bool ldv_queue_work_on_523(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_524(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_525(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_526(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_527(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_528(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_529(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_530(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_531(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_532(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_533(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_534(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } __inline static long ldv__builtin_expect(long exp , long c ) ; int ldv_mutex_trylock_559(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_557(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_560(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_561(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_564(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_565(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_567(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_unlock_569(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_556(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_558(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_562(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_563(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_566(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_568(struct mutex *ldv_func_arg1 ) ; void ldv_mutex_lock_transport_mutex(struct mutex *lock ) ; void ldv_mutex_unlock_transport_mutex(struct mutex *lock ) ; bool ldv_queue_work_on_551(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_work_on_553(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) ; bool ldv_queue_delayed_work_on_552(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; bool ldv_queue_delayed_work_on_555(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) ; void ldv_flush_workqueue_554(struct workqueue_struct *ldv_func_arg1 ) ; extern void module_put(struct module * ) ; static struct list_head g_transport_list = {& g_transport_list, & g_transport_list}; static struct mutex transport_mutex = {{1}, {{{{{0}}, 3735899821U, 4294967295U, (void *)-1, {0, {0, 0}, "transport_mutex.wait_lock", 0, 0UL}}}}, {& transport_mutex.wait_list, & transport_mutex.wait_list}, 0, (void *)(& transport_mutex), {0, {0, 0}, "transport_mutex", 0, 0UL}}; struct iscsit_transport *iscsit_get_transport(int type ) { struct iscsit_transport *t ; struct list_head const *__mptr ; bool tmp ; int tmp___0 ; struct list_head const *__mptr___0 ; { ldv_mutex_lock_563(& transport_mutex); __mptr = (struct list_head const *)g_transport_list.next; t = (struct iscsit_transport *)__mptr + 0xffffffffffffffe0UL; goto ldv_58147; ldv_58146: ; if (t->transport_type == type) { if ((unsigned long )t->owner != (unsigned long )((struct module *)0)) { tmp = try_module_get(t->owner); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } if (tmp___0) { t = (struct iscsit_transport *)0; } else { } } else { } ldv_mutex_unlock_564(& transport_mutex); return (t); } else { } __mptr___0 = (struct list_head const *)t->t_node.next; t = (struct iscsit_transport *)__mptr___0 + 0xffffffffffffffe0UL; ldv_58147: ; if ((unsigned long )(& t->t_node) != (unsigned long )(& g_transport_list)) { goto ldv_58146; } else { } ldv_mutex_unlock_565(& transport_mutex); return ((struct iscsit_transport *)0); } } void iscsit_put_transport(struct iscsit_transport *t ) { { module_put(t->owner); return; } } int iscsit_register_transport(struct iscsit_transport *t ) { struct _ddebug descriptor ; long tmp ; { INIT_LIST_HEAD(& t->t_node); ldv_mutex_lock_566(& transport_mutex); list_add_tail(& t->t_node, & g_transport_list); ldv_mutex_unlock_567(& transport_mutex); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_register_transport"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_transport.c"; descriptor.format = "Registered iSCSI transport: %s\n"; descriptor.lineno = 40U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Registered iSCSI transport: %s\n", (char *)(& t->name)); } else { } return (0); } } static char const __kstrtab_iscsit_register_transport[26U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'r', 'e', 'g', 'i', 's', 't', 'e', 'r', '_', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '\000'}; struct kernel_symbol const __ksymtab_iscsit_register_transport ; struct kernel_symbol const __ksymtab_iscsit_register_transport = {(unsigned long )(& iscsit_register_transport), (char const *)(& __kstrtab_iscsit_register_transport)}; void iscsit_unregister_transport(struct iscsit_transport *t ) { struct _ddebug descriptor ; long tmp ; { ldv_mutex_lock_568(& transport_mutex); list_del(& t->t_node); ldv_mutex_unlock_569(& transport_mutex); descriptor.modname = "iscsi_target_mod"; descriptor.function = "iscsit_unregister_transport"; descriptor.filename = "/work/ldvuser/mutilin/launch/work/current--X--drivers/--X--defaultlinux-4.2-rc1.tar.xz--X--32_7a--X--cpachecker/linux-4.2-rc1.tar.xz/csd_deg_dscv/5848/dscv_tempdir/dscv/ri/32_7a/drivers/target/iscsi/iscsi_target_transport.c"; descriptor.format = "Unregistered iSCSI transport: %s\n"; descriptor.lineno = 52U; descriptor.flags = 0U; tmp = ldv__builtin_expect((long )descriptor.flags & 1L, 0L); if (tmp != 0L) { __dynamic_pr_debug(& descriptor, "Unregistered iSCSI transport: %s\n", (char *)(& t->name)); } else { } return; } } static char const __kstrtab_iscsit_unregister_transport[28U] = { 'i', 's', 'c', 's', 'i', 't', '_', 'u', 'n', 'r', 'e', 'g', 'i', 's', 't', 'e', 'r', '_', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '\000'}; struct kernel_symbol const __ksymtab_iscsit_unregister_transport ; struct kernel_symbol const __ksymtab_iscsit_unregister_transport = {(unsigned long )(& iscsit_unregister_transport), (char const *)(& __kstrtab_iscsit_unregister_transport)}; bool ldv_queue_work_on_551(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } bool ldv_queue_delayed_work_on_552(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___0 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } bool ldv_queue_work_on_553(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct work_struct *ldv_func_arg3 ) { ldv_func_ret_type___1 ldv_func_res ; bool tmp ; { tmp = queue_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3); ldv_func_res = tmp; activate_work_2(ldv_func_arg3, 2); return (ldv_func_res); } } void ldv_flush_workqueue_554(struct workqueue_struct *ldv_func_arg1 ) { { flush_workqueue(ldv_func_arg1); call_and_disable_all_2(2); return; } } bool ldv_queue_delayed_work_on_555(int ldv_func_arg1 , struct workqueue_struct *ldv_func_arg2 , struct delayed_work *ldv_func_arg3 , unsigned long ldv_func_arg4 ) { ldv_func_ret_type___2 ldv_func_res ; bool tmp ; { tmp = queue_delayed_work_on(ldv_func_arg1, ldv_func_arg2, ldv_func_arg3, ldv_func_arg4); ldv_func_res = tmp; activate_work_2(& ldv_func_arg3->work, 2); return (ldv_func_res); } } void ldv_mutex_lock_556(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_lock(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_557(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_lock(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_558(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_mutex_of_device(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } int ldv_mutex_trylock_559(struct mutex *ldv_func_arg1 ) { ldv_func_ret_type___3 ldv_func_res ; int tmp ; int tmp___0 ; { tmp = mutex_trylock(ldv_func_arg1); ldv_func_res = tmp; tmp___0 = ldv_mutex_trylock_mutex_of_device(ldv_func_arg1); return (tmp___0); return (ldv_func_res); } } void ldv_mutex_unlock_560(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_mutex_of_device(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_561(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_i_mutex_of_inode(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_562(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_i_mutex_of_inode(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_lock_563(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_transport_mutex(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_564(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_transport_mutex(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_unlock_565(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_transport_mutex(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_566(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_transport_mutex(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_567(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_transport_mutex(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } void ldv_mutex_lock_568(struct mutex *ldv_func_arg1 ) { { ldv_mutex_lock_transport_mutex(ldv_func_arg1); mutex_lock(ldv_func_arg1); return; } } void ldv_mutex_unlock_569(struct mutex *ldv_func_arg1 ) { { ldv_mutex_unlock_transport_mutex(ldv_func_arg1); mutex_unlock(ldv_func_arg1); return; } } __inline static void ldv_error(void) { { ERROR: ; __VERIFIER_error(); } } __inline static int ldv_undef_int_negative(void) { int ret ; int tmp ; { tmp = ldv_undef_int(); ret = tmp; if (ret >= 0) { ldv_stop(); } else { } return (ret); } } bool ldv_is_err(void const *ptr ) { { return ((unsigned long )ptr > 2012UL); } } void *ldv_err_ptr(long error ) { { return ((void *)(2012L - error)); } } long ldv_ptr_err(void const *ptr ) { { return ((long )(2012UL - (unsigned long )ptr)); } } bool ldv_is_err_or_null(void const *ptr ) { bool tmp ; int tmp___0 ; { if ((unsigned long )ptr == (unsigned long )((void const *)0)) { tmp___0 = 1; } else { tmp = ldv_is_err(ptr); if ((int )tmp) { tmp___0 = 1; } else { tmp___0 = 0; } } return ((bool )tmp___0); } } static int ldv_mutex_auth_id_lock = 1; int ldv_mutex_lock_interruptible_auth_id_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_auth_id_lock != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_auth_id_lock = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_auth_id_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_auth_id_lock != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_auth_id_lock = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_auth_id_lock(struct mutex *lock ) { { if (ldv_mutex_auth_id_lock != 1) { ldv_error(); } else { } ldv_mutex_auth_id_lock = 2; return; } } int ldv_mutex_trylock_auth_id_lock(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_auth_id_lock != 1) { ldv_error(); } else { } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread != 0) { return (0); } else { ldv_mutex_auth_id_lock = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_auth_id_lock(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_auth_id_lock != 1) { ldv_error(); } else { } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_auth_id_lock = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_auth_id_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_auth_id_lock == 1) { nondetermined = ldv_undef_int(); if (nondetermined != 0) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_auth_id_lock(struct mutex *lock ) { { if (ldv_mutex_auth_id_lock != 2) { ldv_error(); } else { } ldv_mutex_auth_id_lock = 1; return; } } void ldv_usb_lock_device_auth_id_lock(void) { { ldv_mutex_lock_auth_id_lock((struct mutex *)0); return; } } int ldv_usb_trylock_device_auth_id_lock(void) { int tmp ; { tmp = ldv_mutex_trylock_auth_id_lock((struct mutex *)0); return (tmp); } } int ldv_usb_lock_device_for_reset_auth_id_lock(void) { int tmp ; int tmp___0 ; { tmp___0 = ldv_undef_int(); if (tmp___0 != 0) { ldv_mutex_lock_auth_id_lock((struct mutex *)0); return (0); } else { tmp = ldv_undef_int_negative(); return (tmp); } } } void ldv_usb_unlock_device_auth_id_lock(void) { { ldv_mutex_unlock_auth_id_lock((struct mutex *)0); return; } } static int ldv_mutex_cmdsn_mutex_of_iscsi_session = 1; int ldv_mutex_lock_interruptible_cmdsn_mutex_of_iscsi_session(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_cmdsn_mutex_of_iscsi_session != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_cmdsn_mutex_of_iscsi_session = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_cmdsn_mutex_of_iscsi_session(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_cmdsn_mutex_of_iscsi_session != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_cmdsn_mutex_of_iscsi_session = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_cmdsn_mutex_of_iscsi_session(struct mutex *lock ) { { if (ldv_mutex_cmdsn_mutex_of_iscsi_session != 1) { ldv_error(); } else { } ldv_mutex_cmdsn_mutex_of_iscsi_session = 2; return; } } int ldv_mutex_trylock_cmdsn_mutex_of_iscsi_session(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_cmdsn_mutex_of_iscsi_session != 1) { ldv_error(); } else { } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread != 0) { return (0); } else { ldv_mutex_cmdsn_mutex_of_iscsi_session = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_cmdsn_mutex_of_iscsi_session(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_cmdsn_mutex_of_iscsi_session != 1) { ldv_error(); } else { } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_cmdsn_mutex_of_iscsi_session = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_cmdsn_mutex_of_iscsi_session(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_cmdsn_mutex_of_iscsi_session == 1) { nondetermined = ldv_undef_int(); if (nondetermined != 0) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session(struct mutex *lock ) { { if (ldv_mutex_cmdsn_mutex_of_iscsi_session != 2) { ldv_error(); } else { } ldv_mutex_cmdsn_mutex_of_iscsi_session = 1; return; } } void ldv_usb_lock_device_cmdsn_mutex_of_iscsi_session(void) { { ldv_mutex_lock_cmdsn_mutex_of_iscsi_session((struct mutex *)0); return; } } int ldv_usb_trylock_device_cmdsn_mutex_of_iscsi_session(void) { int tmp ; { tmp = ldv_mutex_trylock_cmdsn_mutex_of_iscsi_session((struct mutex *)0); return (tmp); } } int ldv_usb_lock_device_for_reset_cmdsn_mutex_of_iscsi_session(void) { int tmp ; int tmp___0 ; { tmp___0 = ldv_undef_int(); if (tmp___0 != 0) { ldv_mutex_lock_cmdsn_mutex_of_iscsi_session((struct mutex *)0); return (0); } else { tmp = ldv_undef_int_negative(); return (tmp); } } } void ldv_usb_unlock_device_cmdsn_mutex_of_iscsi_session(void) { { ldv_mutex_unlock_cmdsn_mutex_of_iscsi_session((struct mutex *)0); return; } } static int ldv_mutex_i_mutex_of_inode = 1; int ldv_mutex_lock_interruptible_i_mutex_of_inode(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_i_mutex_of_inode != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_i_mutex_of_inode = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_i_mutex_of_inode(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_i_mutex_of_inode != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_i_mutex_of_inode = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_i_mutex_of_inode(struct mutex *lock ) { { if (ldv_mutex_i_mutex_of_inode != 1) { ldv_error(); } else { } ldv_mutex_i_mutex_of_inode = 2; return; } } int ldv_mutex_trylock_i_mutex_of_inode(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_i_mutex_of_inode != 1) { ldv_error(); } else { } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread != 0) { return (0); } else { ldv_mutex_i_mutex_of_inode = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_i_mutex_of_inode(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_i_mutex_of_inode != 1) { ldv_error(); } else { } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_i_mutex_of_inode = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_i_mutex_of_inode(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_i_mutex_of_inode == 1) { nondetermined = ldv_undef_int(); if (nondetermined != 0) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_i_mutex_of_inode(struct mutex *lock ) { { if (ldv_mutex_i_mutex_of_inode != 2) { ldv_error(); } else { } ldv_mutex_i_mutex_of_inode = 1; return; } } void ldv_usb_lock_device_i_mutex_of_inode(void) { { ldv_mutex_lock_i_mutex_of_inode((struct mutex *)0); return; } } int ldv_usb_trylock_device_i_mutex_of_inode(void) { int tmp ; { tmp = ldv_mutex_trylock_i_mutex_of_inode((struct mutex *)0); return (tmp); } } int ldv_usb_lock_device_for_reset_i_mutex_of_inode(void) { int tmp ; int tmp___0 ; { tmp___0 = ldv_undef_int(); if (tmp___0 != 0) { ldv_mutex_lock_i_mutex_of_inode((struct mutex *)0); return (0); } else { tmp = ldv_undef_int_negative(); return (tmp); } } } void ldv_usb_unlock_device_i_mutex_of_inode(void) { { ldv_mutex_unlock_i_mutex_of_inode((struct mutex *)0); return; } } static int ldv_mutex_lock = 1; int ldv_mutex_lock_interruptible_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_lock != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_lock = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_lock != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_lock = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_lock(struct mutex *lock ) { { if (ldv_mutex_lock != 1) { ldv_error(); } else { } ldv_mutex_lock = 2; return; } } int ldv_mutex_trylock_lock(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_lock != 1) { ldv_error(); } else { } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread != 0) { return (0); } else { ldv_mutex_lock = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_lock(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_lock != 1) { ldv_error(); } else { } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_lock = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_lock == 1) { nondetermined = ldv_undef_int(); if (nondetermined != 0) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_lock(struct mutex *lock ) { { if (ldv_mutex_lock != 2) { ldv_error(); } else { } ldv_mutex_lock = 1; return; } } void ldv_usb_lock_device_lock(void) { { ldv_mutex_lock_lock((struct mutex *)0); return; } } int ldv_usb_trylock_device_lock(void) { int tmp ; { tmp = ldv_mutex_trylock_lock((struct mutex *)0); return (tmp); } } int ldv_usb_lock_device_for_reset_lock(void) { int tmp ; int tmp___0 ; { tmp___0 = ldv_undef_int(); if (tmp___0 != 0) { ldv_mutex_lock_lock((struct mutex *)0); return (0); } else { tmp = ldv_undef_int_negative(); return (tmp); } } } void ldv_usb_unlock_device_lock(void) { { ldv_mutex_unlock_lock((struct mutex *)0); return; } } static int ldv_mutex_mutex_of_device = 1; int ldv_mutex_lock_interruptible_mutex_of_device(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_mutex_of_device != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_mutex_of_device = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_mutex_of_device(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_mutex_of_device != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_mutex_of_device = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_mutex_of_device(struct mutex *lock ) { { if (ldv_mutex_mutex_of_device != 1) { ldv_error(); } else { } ldv_mutex_mutex_of_device = 2; return; } } int ldv_mutex_trylock_mutex_of_device(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_mutex_of_device != 1) { ldv_error(); } else { } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread != 0) { return (0); } else { ldv_mutex_mutex_of_device = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_mutex_of_device(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_mutex_of_device != 1) { ldv_error(); } else { } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_mutex_of_device = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_mutex_of_device(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_mutex_of_device == 1) { nondetermined = ldv_undef_int(); if (nondetermined != 0) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_mutex_of_device(struct mutex *lock ) { { if (ldv_mutex_mutex_of_device != 2) { ldv_error(); } else { } ldv_mutex_mutex_of_device = 1; return; } } void ldv_usb_lock_device_mutex_of_device(void) { { ldv_mutex_lock_mutex_of_device((struct mutex *)0); return; } } int ldv_usb_trylock_device_mutex_of_device(void) { int tmp ; { tmp = ldv_mutex_trylock_mutex_of_device((struct mutex *)0); return (tmp); } } int ldv_usb_lock_device_for_reset_mutex_of_device(void) { int tmp ; int tmp___0 ; { tmp___0 = ldv_undef_int(); if (tmp___0 != 0) { ldv_mutex_lock_mutex_of_device((struct mutex *)0); return (0); } else { tmp = ldv_undef_int_negative(); return (tmp); } } } void ldv_usb_unlock_device_mutex_of_device(void) { { ldv_mutex_unlock_mutex_of_device((struct mutex *)0); return; } } static int ldv_mutex_np_lock = 1; int ldv_mutex_lock_interruptible_np_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_np_lock != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_np_lock = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_np_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_np_lock != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_np_lock = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_np_lock(struct mutex *lock ) { { if (ldv_mutex_np_lock != 1) { ldv_error(); } else { } ldv_mutex_np_lock = 2; return; } } int ldv_mutex_trylock_np_lock(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_np_lock != 1) { ldv_error(); } else { } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread != 0) { return (0); } else { ldv_mutex_np_lock = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_np_lock(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_np_lock != 1) { ldv_error(); } else { } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_np_lock = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_np_lock(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_np_lock == 1) { nondetermined = ldv_undef_int(); if (nondetermined != 0) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_np_lock(struct mutex *lock ) { { if (ldv_mutex_np_lock != 2) { ldv_error(); } else { } ldv_mutex_np_lock = 1; return; } } void ldv_usb_lock_device_np_lock(void) { { ldv_mutex_lock_np_lock((struct mutex *)0); return; } } int ldv_usb_trylock_device_np_lock(void) { int tmp ; { tmp = ldv_mutex_trylock_np_lock((struct mutex *)0); return (tmp); } } int ldv_usb_lock_device_for_reset_np_lock(void) { int tmp ; int tmp___0 ; { tmp___0 = ldv_undef_int(); if (tmp___0 != 0) { ldv_mutex_lock_np_lock((struct mutex *)0); return (0); } else { tmp = ldv_undef_int_negative(); return (tmp); } } } void ldv_usb_unlock_device_np_lock(void) { { ldv_mutex_unlock_np_lock((struct mutex *)0); return; } } static int ldv_mutex_tpg_access_lock_of_iscsi_portal_group = 1; int ldv_mutex_lock_interruptible_tpg_access_lock_of_iscsi_portal_group(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_tpg_access_lock_of_iscsi_portal_group != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_tpg_access_lock_of_iscsi_portal_group = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_tpg_access_lock_of_iscsi_portal_group(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_tpg_access_lock_of_iscsi_portal_group != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_tpg_access_lock_of_iscsi_portal_group = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_tpg_access_lock_of_iscsi_portal_group(struct mutex *lock ) { { if (ldv_mutex_tpg_access_lock_of_iscsi_portal_group != 1) { ldv_error(); } else { } ldv_mutex_tpg_access_lock_of_iscsi_portal_group = 2; return; } } int ldv_mutex_trylock_tpg_access_lock_of_iscsi_portal_group(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_tpg_access_lock_of_iscsi_portal_group != 1) { ldv_error(); } else { } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread != 0) { return (0); } else { ldv_mutex_tpg_access_lock_of_iscsi_portal_group = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_tpg_access_lock_of_iscsi_portal_group(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_tpg_access_lock_of_iscsi_portal_group != 1) { ldv_error(); } else { } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_tpg_access_lock_of_iscsi_portal_group = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_tpg_access_lock_of_iscsi_portal_group(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_tpg_access_lock_of_iscsi_portal_group == 1) { nondetermined = ldv_undef_int(); if (nondetermined != 0) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_tpg_access_lock_of_iscsi_portal_group(struct mutex *lock ) { { if (ldv_mutex_tpg_access_lock_of_iscsi_portal_group != 2) { ldv_error(); } else { } ldv_mutex_tpg_access_lock_of_iscsi_portal_group = 1; return; } } void ldv_usb_lock_device_tpg_access_lock_of_iscsi_portal_group(void) { { ldv_mutex_lock_tpg_access_lock_of_iscsi_portal_group((struct mutex *)0); return; } } int ldv_usb_trylock_device_tpg_access_lock_of_iscsi_portal_group(void) { int tmp ; { tmp = ldv_mutex_trylock_tpg_access_lock_of_iscsi_portal_group((struct mutex *)0); return (tmp); } } int ldv_usb_lock_device_for_reset_tpg_access_lock_of_iscsi_portal_group(void) { int tmp ; int tmp___0 ; { tmp___0 = ldv_undef_int(); if (tmp___0 != 0) { ldv_mutex_lock_tpg_access_lock_of_iscsi_portal_group((struct mutex *)0); return (0); } else { tmp = ldv_undef_int_negative(); return (tmp); } } } void ldv_usb_unlock_device_tpg_access_lock_of_iscsi_portal_group(void) { { ldv_mutex_unlock_tpg_access_lock_of_iscsi_portal_group((struct mutex *)0); return; } } static int ldv_mutex_transport_mutex = 1; int ldv_mutex_lock_interruptible_transport_mutex(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_transport_mutex != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_transport_mutex = 2; return (0); } else { return (-4); } } } int ldv_mutex_lock_killable_transport_mutex(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_transport_mutex != 1) { ldv_error(); } else { } nondetermined = ldv_undef_int(); if (nondetermined != 0) { ldv_mutex_transport_mutex = 2; return (0); } else { return (-4); } } } void ldv_mutex_lock_transport_mutex(struct mutex *lock ) { { if (ldv_mutex_transport_mutex != 1) { ldv_error(); } else { } ldv_mutex_transport_mutex = 2; return; } } int ldv_mutex_trylock_transport_mutex(struct mutex *lock ) { int is_mutex_held_by_another_thread ; { if (ldv_mutex_transport_mutex != 1) { ldv_error(); } else { } is_mutex_held_by_another_thread = ldv_undef_int(); if (is_mutex_held_by_another_thread != 0) { return (0); } else { ldv_mutex_transport_mutex = 2; return (1); } } } int ldv_atomic_dec_and_mutex_lock_transport_mutex(atomic_t *cnt , struct mutex *lock ) { int atomic_value_after_dec ; { if (ldv_mutex_transport_mutex != 1) { ldv_error(); } else { } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_mutex_transport_mutex = 2; return (1); } else { } return (0); } } int ldv_mutex_is_locked_transport_mutex(struct mutex *lock ) { int nondetermined ; { if (ldv_mutex_transport_mutex == 1) { nondetermined = ldv_undef_int(); if (nondetermined != 0) { return (0); } else { return (1); } } else { return (1); } } } void ldv_mutex_unlock_transport_mutex(struct mutex *lock ) { { if (ldv_mutex_transport_mutex != 2) { ldv_error(); } else { } ldv_mutex_transport_mutex = 1; return; } } void ldv_usb_lock_device_transport_mutex(void) { { ldv_mutex_lock_transport_mutex((struct mutex *)0); return; } } int ldv_usb_trylock_device_transport_mutex(void) { int tmp ; { tmp = ldv_mutex_trylock_transport_mutex((struct mutex *)0); return (tmp); } } int ldv_usb_lock_device_for_reset_transport_mutex(void) { int tmp ; int tmp___0 ; { tmp___0 = ldv_undef_int(); if (tmp___0 != 0) { ldv_mutex_lock_transport_mutex((struct mutex *)0); return (0); } else { tmp = ldv_undef_int_negative(); return (tmp); } } } void ldv_usb_unlock_device_transport_mutex(void) { { ldv_mutex_unlock_transport_mutex((struct mutex *)0); return; } } void ldv_check_final_state(void) { { if (ldv_mutex_auth_id_lock != 1) { ldv_error(); } else { } if (ldv_mutex_cmdsn_mutex_of_iscsi_session != 1) { ldv_error(); } else { } if (ldv_mutex_i_mutex_of_inode != 1) { ldv_error(); } else { } if (ldv_mutex_lock != 1) { ldv_error(); } else { } if (ldv_mutex_mutex_of_device != 1) { ldv_error(); } else { } if (ldv_mutex_np_lock != 1) { ldv_error(); } else { } if (ldv_mutex_tpg_access_lock_of_iscsi_portal_group != 1) { ldv_error(); } else { } if (ldv_mutex_transport_mutex != 1) { ldv_error(); } else { } return; } }