LCOV - code coverage report
Current view: top level - avtg/fs/ext2/ext2.ko/linux:drivers:clk2/weaver - dir.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 166 168 98.8 %
Date: 2017-01-25 Functions: 6 6 100.0 %

          Line data    Source code
       1             : 
       2             : struct device;
       3             : 
       4             : void *ldv_dev_get_drvdata(const struct device *dev);
       5             : int ldv_dev_set_drvdata(struct device *dev, void *data);
       6             : 
       7             : struct spi_master;
       8             : struct device;
       9             : struct spi_master *ldv_spi_alloc_master(struct device *host, unsigned size);
      10             : 
      11             : #include <linux/ldv/err.h>
      12             : 
      13             : #include <linux/types.h>
      14             : void *ldv_kzalloc(size_t size, gfp_t flags);
      15             : 
      16             : struct clk;
      17             : 
      18             : extern void ldv_clk_disable(struct clk *clk);
      19             : extern int ldv_clk_enable(void);
      20             : 
      21             : #include <linux/ldv/common.h>
      22             : #include <linux/ldv/irq.h>
      23             : #include <verifier/common.h>
      24             : #include <verifier/nondet.h>
      25             : #include <verifier/memory.h>
      26             : #include <verifier/thread.h>
      27             : 
      28             : #include <linux/cdev.h>
      29             : #include <linux/miscdevice.h>
      30             : #include <linux/seq_file.h>
      31             : #include <linux/fs.h>
      32             : #include <linux/pagemap.h>
      33             : 
      34             : 
      35             : struct ldv_struct_insmod_10 {
      36             :  int signal_pending;
      37             : };
      38             : 
      39             : struct ldv_struct_random_containerless_scenario_5 {
      40             :  struct file_system_type *arg0;
      41             :  int signal_pending;
      42             : };
      43             : 
      44             : /* EMG Function declarations */
      45             : void ldv_character_driver_scenario_1(void *);
      46             : extern void ldv_character_driver_scenario_callback_1_22(ssize_t (*)(struct kiocb *, struct iovec *, long unsigned int, loff_t ), struct kiocb *, struct iovec *, long unsigned int, long long int);
      47             : extern void ldv_character_driver_scenario_callback_1_25(long int (*)(struct file *, unsigned int, long unsigned int), struct file *, unsigned int, long unsigned int);
      48             : extern void ldv_character_driver_scenario_callback_1_28(int (*)(struct file *, struct dentry *, int), struct file *, struct dentry *, int);
      49             : extern void ldv_character_driver_scenario_callback_1_31(loff_t (*)(struct file *, loff_t , int), struct file *, long long int, int);
      50             : extern void ldv_character_driver_scenario_callback_1_34(int (*)(struct file *, struct vm_area_struct *), struct file *, struct vm_area_struct *);
      51             : void ldv_character_driver_scenario_callback_1_35(ssize_t (*)(struct file *, char *, long unsigned int, loff_t *), struct file *, char *, long unsigned int, loff_t *);
      52             : void ldv_character_driver_scenario_callback_1_38(int (*)(struct file *, void *, filldir_t ), struct file *, void *, int (*)(void *, char *, int, loff_t , u64 , unsigned int));
      53             : extern void ldv_character_driver_scenario_callback_1_39(ssize_t (*)(struct file *, loff_t *, struct pipe_inode_info *, long unsigned int, unsigned int), struct file *, loff_t *, struct pipe_inode_info *, long unsigned int, unsigned int);
      54             : extern void ldv_character_driver_scenario_callback_1_42(ssize_t (*)(struct pipe_inode_info *, struct file *, loff_t *, long unsigned int, unsigned int), struct pipe_inode_info *, struct file *, loff_t *, long unsigned int, unsigned int);
      55             : extern void ldv_character_driver_scenario_callback_1_45(long int (*)(struct file *, unsigned int, long unsigned int), struct file *, unsigned int, long unsigned int);
      56             : extern void ldv_character_driver_scenario_callback_1_5(ssize_t (*)(struct kiocb *, struct iovec *, long unsigned int, loff_t ), struct kiocb *, struct iovec *, long unsigned int, long long int);
      57             : extern int ldv_character_driver_scenario_probe_1_13(int (*)(struct inode *, struct file *), struct inode *, struct file *);
      58             : extern void ldv_character_driver_scenario_release_1_2(int (*)(struct inode *, struct file *), struct inode *, struct file *);
      59             : extern void ldv_character_driver_scenario_write_1_4(ssize_t (*)(struct file *, char *, long unsigned int, loff_t *), struct file *, char *, long unsigned int, loff_t *);
      60             : 
      61             : /* EMG variable declarations */
      62           1 : struct ldv_thread ldv_thread_1;
      63             : 
      64             : /* EMG variable initialization */
      65             : 
      66             : /* EMG function definitions */
      67             : /* AUX_FUNC ldv_character_driver_scenario_1 */
      68             : void ldv_character_driver_scenario_1(void *arg0) {
      69             :  /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_1"} */
      70           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
      71             :  ssize_t (*ldv_1_callback_aio_read)(struct kiocb *, struct iovec *, long unsigned int, loff_t );
      72           1 :  ssize_t (*ldv_1_callback_aio_write)(struct kiocb *, struct iovec *, long unsigned int, loff_t );
      73             :  long int (*ldv_1_callback_compat_ioctl)(struct file *, unsigned int, long unsigned int);
      74           1 :  int (*ldv_1_callback_fsync)(struct file *, struct dentry *, int);
      75           1 :  loff_t (*ldv_1_callback_llseek)(struct file *, loff_t , int);
      76           1 :  int (*ldv_1_callback_mmap)(struct file *, struct vm_area_struct *);
      77           1 :  ssize_t (*ldv_1_callback_read)(struct file *, char *, size_t , loff_t *);
      78           1 :  int (*ldv_1_callback_readdir)(struct file *, void *, filldir_t );
      79           1 :  ssize_t (*ldv_1_callback_splice_read)(struct file *, loff_t *, struct pipe_inode_info *, size_t , unsigned int);
      80             :  ssize_t (*ldv_1_callback_splice_write)(struct pipe_inode_info *, struct file *, loff_t *, size_t , unsigned int);
      81             :  long int (*ldv_1_callback_unlocked_ioctl)(struct file *, unsigned int, long unsigned int);
      82           1 :  struct file_operations *ldv_1_container_file_operations;
      83             :  long long int ldv_1_ldv_param_22_3_default;
      84           1 :  unsigned int ldv_1_ldv_param_25_1_default;
      85             :  int ldv_1_ldv_param_28_2_default;
      86           1 :  long long int ldv_1_ldv_param_31_1_default;
      87           1 :  int ldv_1_ldv_param_31_2_default;
      88           1 :  char *ldv_1_ldv_param_35_1_default;
      89           1 :  long long int *ldv_1_ldv_param_35_3_default;
      90           1 :  long long int *ldv_1_ldv_param_39_1_default;
      91           1 :  unsigned int ldv_1_ldv_param_39_4_default;
      92           1 :  struct pipe_inode_info *ldv_1_ldv_param_42_0_default;
      93           1 :  long long int *ldv_1_ldv_param_42_2_default;
      94           1 :  unsigned int ldv_1_ldv_param_42_4_default;
      95           1 :  unsigned int ldv_1_ldv_param_45_1_default;
      96           1 :  char *ldv_1_ldv_param_4_1_default;
      97           1 :  long long int *ldv_1_ldv_param_4_3_default;
      98           1 :  long long int ldv_1_ldv_param_5_3_default;
      99           1 :  struct file *ldv_1_resource_file;
     100           1 :  struct inode *ldv_1_resource_inode;
     101           1 :  struct kiocb *ldv_1_resource_struct_kiocb_ptr;
     102           1 :  int ldv_1_ret_default;
     103           1 :  int (*ldv_1_size_cnt_func_1_ptr)(void *, char *, int, loff_t , u64 , unsigned int);
     104           1 :  struct dentry *ldv_1_size_cnt_struct_dentry_ptr;
     105           1 :  struct iovec *ldv_1_size_cnt_struct_iovec_ptr;
     106           1 :  struct pipe_inode_info *ldv_1_size_cnt_struct_pipe_inode_info_ptr;
     107           1 :  struct vm_area_struct *ldv_1_size_cnt_struct_vm_area_struct_ptr;
     108           1 :  long unsigned int ldv_1_size_cnt_write_size;
     109           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     110           1 :  /* Initialize automaton variables */
     111           2 :  ldv_1_ret_default = 1;
     112           1 :  /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
     113           3 :  ldv_free(arg0);
     114           1 :  /* LDV {"action": "DEFAULT_REGISTER_1", "type": "RECEIVE_END"} */
     115           1 : 
     116           1 :  /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     117           4 :  ldv_1_container_file_operations = ldv_xmalloc_unknown_size(0);
     118           1 :  /* LDV {"action": "DEFAULT_ALLOC_1", "type": "CONDITION_END"} */
     119           1 : 
     120           1 :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
     121           4 :  ldv_1_resource_file = ldv_xmalloc(sizeof(struct file));
     122           4 :  ldv_1_resource_inode = ldv_xmalloc(sizeof(struct inode));
     123           4 :  ldv_1_resource_struct_kiocb_ptr = ldv_xmalloc_unknown_size(0);
     124           4 :  ldv_1_size_cnt_func_1_ptr = ldv_undef_int();
     125           1 :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     126           1 : 
     127           1 :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     128           1 :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     129           1 : 
     130             :  /* Jump to a subprocess 'main' initial state */
     131           1 :  goto ldv_main_1;
     132             :  /* End of the process */
     133             :  return;
     134           1 : 
     135             :  /* Sbprocess main */
     136             :  ldv_main_1:
     137             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     138             : 
     139           4 :  if (ldv_undef_int()) {
     140             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback probe from FILE_OPERATIONS."} */
     141           3 :   if (ldv_1_container_file_operations->open) {
     142             :   /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = (ldv_1_container_file_operations->open)(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "probe"} */
     143           2 :    ldv_1_ret_default = ldv_character_driver_scenario_probe_1_13(ldv_1_container_file_operations->open, ldv_1_resource_inode, ldv_1_resource_file);
     144             :   }
     145             :   /* Callback post-call */
     146           4 :   ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
     147             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
     148             : 
     149           4 :   if (ldv_undef_int()) {
     150             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
     151           2 :    ldv_assume(ldv_1_ret_default == 0);
     152             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
     153             : 
     154             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     155             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     156             : 
     157             :    /* Jump to a subprocess 'call' initial state */
     158           1 :    goto ldv_call_1;
     159             :   }
     160             :   else {
     161             :    /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
     162           2 :    ldv_assume(ldv_1_ret_default != 0);
     163             :    /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
     164             : 
     165             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     166             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     167             : 
     168             :    /* Jump to a subprocess 'main' initial state */
     169           1 :    goto ldv_main_1;
     170             :   }
     171             :  }
     172             :  else {
     173             :   /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
     174           2 :   ldv_free(ldv_1_resource_file);
     175           2 :   ldv_free(ldv_1_resource_inode);
     176           2 :   ldv_free(ldv_1_resource_struct_kiocb_ptr);
     177             :   /* LDV {"action": "FREE", "type": "CONDITION_END"} */
     178             : 
     179             :   /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     180           2 :   ldv_free(ldv_1_container_file_operations);
     181             :   /* LDV {"action": "DEFAULT_FREE_1", "type": "CONDITION_END"} */
     182             : 
     183             :   /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
     184             :   /* Skip a non-replicative signal receiving */
     185             :   /* LDV {"action": "DEFAULT_DEREGISTER_1", "type": "RECEIVE_END"} */
     186             : 
     187             :   /* Exit function at a terminal state */
     188           1 :   return;
     189             :  }
     190             :  /* End of the subprocess 'main' */
     191             :  return;
     192           1 : 
     193             :  /* Sbprocess call */
     194             :  ldv_call_1:
     195             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     196             : 
     197           2 :  switch (ldv_undef_int()) {
     198           3 :   case 1: {
     199             :    /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     200           3 :    ldv_1_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
     201           3 :    ldv_1_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
     202             :    /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
     203             : 
     204             :    /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from FILE_OPERATIONS."} */
     205             :    /* Callback pre-call */
     206           2 :    ldv_assume(ldv_1_size_cnt_func_1_ptr <= (INT_MAX & PAGE_CACHE_MASK));
     207           3 :    if (ldv_1_container_file_operations->write) {
     208             :    /* LDV {"type": "CALLBACK", "call": "(ldv_1_container_file_operations->write)(ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default);", "comment": "write"} */
     209           3 :     ldv_character_driver_scenario_write_1_4(ldv_1_container_file_operations->write, ldv_1_resource_file, ldv_1_ldv_param_4_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_4_3_default);
     210             :    }
     211             :    /* LDV {"action": "WRITE", "type": "CALL_END"} */
     212             : 
     213             :    /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     214           4 :    ldv_free(ldv_1_ldv_param_4_1_default);
     215           2 :    ldv_free(ldv_1_ldv_param_4_3_default);
     216             :    /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     217             : 
     218             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     219             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     220             : 
     221             :    /* Jump to a subprocess 'call' initial state */
     222           1 :    goto ldv_call_1;
     223           1 :    break;
     224             :   }
     225           3 :   case 2: {
     226             :    /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "File structure is released. Invoke callback release from FILE_OPERATIONS."} */
     227           3 :    if (ldv_1_container_file_operations->release) {
     228             :    /* LDV {"type": "CALLBACK", "call": "(ldv_1_container_file_operations->release)(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "release"} */
     229           2 :     ldv_character_driver_scenario_release_1_2(ldv_1_container_file_operations->release, ldv_1_resource_inode, ldv_1_resource_file);
     230             :    }
     231             :    /* LDV {"action": "RELEASE", "type": "CALL_END"} */
     232             : 
     233             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     234             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     235             : 
     236             :    /* Jump to a subprocess 'main' initial state */
     237           2 :    goto ldv_main_1;
     238           1 :    break;
     239             :   }
     240           3 :   case 3: {
     241             :    /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     242             :    /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
     243             : 
     244           2 :    switch (ldv_undef_int()) {
     245           3 :     case 1: {
     246             :      /* LDV {"action": "PRE_CALL_45", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     247             :      /* LDV {"action": "PRE_CALL_45", "type": "CONDITION_END"} */
     248             : 
     249             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback unlocked_ioctl from file_operations."} */
     250             :      /* LDV {"type": "CALLBACK", "call": "((& ext2_ioctl))(ldv_1_resource_file, ldv_1_ldv_param_45_1_default, ldv_1_size_cnt_write_size);", "comment": "callback"} */
     251           2 :      ldv_character_driver_scenario_callback_1_45(ldv_1_callback_unlocked_ioctl, ldv_1_resource_file, ldv_1_ldv_param_45_1_default, ldv_1_size_cnt_write_size);
     252             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     253             : 
     254             :      /* LDV {"action": "POST_CALL_45", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     255             :      /* LDV {"action": "POST_CALL_45", "type": "CONDITION_END"} */
     256             : 
     257           1 :      break;
     258           1 :     }
     259           3 :     case 2: {
     260             :      /* LDV {"action": "PRE_CALL_42", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     261           3 :      ldv_1_ldv_param_42_0_default = ldv_xmalloc_unknown_size(0);
     262           3 :      ldv_1_ldv_param_42_2_default = ldv_xmalloc_unknown_size(0);
     263             :      /* LDV {"action": "PRE_CALL_42", "type": "CONDITION_END"} */
     264             : 
     265             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     266           2 :      if (ldv_1_callback_splice_write) {
     267             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_splice_write)(ldv_1_ldv_param_42_0_default, ldv_1_resource_file, ldv_1_ldv_param_42_2_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_42_4_default);", "comment": "callback"} */
     268           2 :       ldv_character_driver_scenario_callback_1_42(ldv_1_callback_splice_write, ldv_1_ldv_param_42_0_default, ldv_1_resource_file, ldv_1_ldv_param_42_2_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_42_4_default);
     269             :      }
     270             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     271             : 
     272             :      /* LDV {"action": "POST_CALL_42", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     273           4 :      ldv_free(ldv_1_ldv_param_42_0_default);
     274           2 :      ldv_free(ldv_1_ldv_param_42_2_default);
     275             :      /* LDV {"action": "POST_CALL_42", "type": "CONDITION_END"} */
     276             : 
     277           1 :      break;
     278           1 :     }
     279           3 :     case 3: {
     280             :      /* LDV {"action": "PRE_CALL_39", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     281           3 :      ldv_1_ldv_param_39_1_default = ldv_xmalloc_unknown_size(0);
     282             :      /* LDV {"action": "PRE_CALL_39", "type": "CONDITION_END"} */
     283             : 
     284             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     285           2 :      if (ldv_1_callback_splice_read) {
     286             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_splice_read)(ldv_1_resource_file, ldv_1_ldv_param_39_1_default, ldv_1_size_cnt_struct_pipe_inode_info_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_39_4_default);", "comment": "callback"} */
     287           2 :       ldv_character_driver_scenario_callback_1_39(ldv_1_callback_splice_read, ldv_1_resource_file, ldv_1_ldv_param_39_1_default, ldv_1_size_cnt_struct_pipe_inode_info_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_39_4_default);
     288             :      }
     289             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     290             : 
     291             :      /* LDV {"action": "POST_CALL_39", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     292           4 :      ldv_free(ldv_1_ldv_param_39_1_default);
     293             :      /* LDV {"action": "POST_CALL_39", "type": "CONDITION_END"} */
     294             : 
     295           1 :      break;
     296           1 :     }
     297           3 :     case 4: {
     298             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback readdir from file_operations."} */
     299             :      /* LDV {"type": "CALLBACK", "call": "((& ext2_readdir))(ldv_1_resource_file, ldv_1_resource_inode, ldv_1_size_cnt_func_1_ptr);", "comment": "callback"} */
     300           2 :      ldv_character_driver_scenario_callback_1_38(ldv_1_callback_readdir, ldv_1_resource_file, ldv_1_resource_inode, ldv_1_size_cnt_func_1_ptr);
     301             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     302             : 
     303           1 :      break;
     304           1 :     }
     305           3 :     case 5: {
     306             :      /* LDV {"action": "PRE_CALL_35", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     307           3 :      ldv_1_ldv_param_35_1_default = ldv_xmalloc_unknown_size(0);
     308           3 :      ldv_1_ldv_param_35_3_default = ldv_xmalloc_unknown_size(0);
     309             :      /* LDV {"action": "PRE_CALL_35", "type": "CONDITION_END"} */
     310             : 
     311             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read from file_operations."} */
     312             :      /* LDV {"type": "CALLBACK", "call": "((& generic_read_dir))(ldv_1_resource_file, ldv_1_ldv_param_35_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_35_3_default);", "comment": "callback"} */
     313           2 :      ldv_character_driver_scenario_callback_1_35(ldv_1_callback_read, ldv_1_resource_file, ldv_1_ldv_param_35_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_35_3_default);
     314             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     315             : 
     316             :      /* LDV {"action": "POST_CALL_35", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     317           2 :      ldv_free(ldv_1_ldv_param_35_1_default);
     318           2 :      ldv_free(ldv_1_ldv_param_35_3_default);
     319             :      /* LDV {"action": "POST_CALL_35", "type": "CONDITION_END"} */
     320             : 
     321           1 :      break;
     322           1 :     }
     323           3 :     case 6: {
     324             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     325           2 :      if (ldv_1_callback_mmap) {
     326             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_mmap)(ldv_1_resource_file, ldv_1_size_cnt_struct_vm_area_struct_ptr);", "comment": "callback"} */
     327           2 :       ldv_character_driver_scenario_callback_1_34(ldv_1_callback_mmap, ldv_1_resource_file, ldv_1_size_cnt_struct_vm_area_struct_ptr);
     328             :      }
     329             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     330             : 
     331           2 :      break;
     332           1 :     }
     333           3 :     case 7: {
     334             :      /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     335             :      /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
     336             : 
     337             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback llseek from file_operations."} */
     338             :      /* LDV {"type": "CALLBACK", "call": "((& generic_file_llseek))(ldv_1_resource_file, ldv_1_ldv_param_31_1_default, ldv_1_ldv_param_31_2_default);", "comment": "callback"} */
     339           2 :      ldv_character_driver_scenario_callback_1_31(ldv_1_callback_llseek, ldv_1_resource_file, ldv_1_ldv_param_31_1_default, ldv_1_ldv_param_31_2_default);
     340             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     341             : 
     342             :      /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     343             :      /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
     344             : 
     345           1 :      break;
     346           1 :     }
     347           3 :     case 8: {
     348             :      /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     349             :      /* LDV {"action": "PRE_CALL_28", "type": "CONDITION_END"} */
     350             : 
     351             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback fsync from file_operations."} */
     352             :      /* LDV {"type": "CALLBACK", "call": "((& ext2_fsync))(ldv_1_resource_file, ldv_1_size_cnt_struct_dentry_ptr, ldv_1_ldv_param_28_2_default);", "comment": "callback"} */
     353           2 :      ldv_character_driver_scenario_callback_1_28(ldv_1_callback_fsync, ldv_1_resource_file, ldv_1_size_cnt_struct_dentry_ptr, ldv_1_ldv_param_28_2_default);
     354             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     355             : 
     356             :      /* LDV {"action": "POST_CALL_28", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     357             :      /* LDV {"action": "POST_CALL_28", "type": "CONDITION_END"} */
     358             : 
     359           1 :      break;
     360           1 :     }
     361           3 :     case 9: {
     362             :      /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     363             :      /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_END"} */
     364             : 
     365             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback compat_ioctl from file_operations."} */
     366             :      /* LDV {"type": "CALLBACK", "call": "((& ext2_compat_ioctl))(ldv_1_resource_file, ldv_1_ldv_param_25_1_default, ldv_1_size_cnt_write_size);", "comment": "callback"} */
     367           2 :      ldv_character_driver_scenario_callback_1_25(ldv_1_callback_compat_ioctl, ldv_1_resource_file, ldv_1_ldv_param_25_1_default, ldv_1_size_cnt_write_size);
     368             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     369             : 
     370             :      /* LDV {"action": "POST_CALL_25", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     371             :      /* LDV {"action": "POST_CALL_25", "type": "CONDITION_END"} */
     372             : 
     373           1 :      break;
     374           1 :     }
     375           3 :     case 10: {
     376             :      /* LDV {"action": "PRE_CALL_22", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     377             :      /* LDV {"action": "PRE_CALL_22", "type": "CONDITION_END"} */
     378             : 
     379             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     380           2 :      if (ldv_1_callback_aio_write) {
     381             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_aio_write)(ldv_1_resource_struct_kiocb_ptr, ldv_1_size_cnt_struct_iovec_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_22_3_default);", "comment": "callback"} */
     382           2 :       ldv_character_driver_scenario_callback_1_22(ldv_1_callback_aio_write, ldv_1_resource_struct_kiocb_ptr, ldv_1_size_cnt_struct_iovec_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_22_3_default);
     383             :      }
     384             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     385             : 
     386             :      /* LDV {"action": "POST_CALL_22", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     387             :      /* LDV {"action": "POST_CALL_22", "type": "CONDITION_END"} */
     388             : 
     389           2 :      break;
     390           1 :     }
     391           3 :     case 11: {
     392             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback callback from FILE_OPERATIONS."} */
     393           2 :      if (ldv_1_callback_aio_read) {
     394             :      /* LDV {"type": "CALLBACK", "call": "(ldv_1_callback_aio_read)(ldv_1_resource_struct_kiocb_ptr, ldv_1_size_cnt_struct_iovec_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_5_3_default);", "comment": "callback"} */
     395           2 :       ldv_character_driver_scenario_callback_1_5(ldv_1_callback_aio_read, ldv_1_resource_struct_kiocb_ptr, ldv_1_size_cnt_struct_iovec_ptr, ldv_1_size_cnt_write_size, ldv_1_ldv_param_5_3_default);
     396             :      }
     397             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     398             : 
     399           2 :      break;
     400           1 :     }
     401           2 :     default: ldv_stop();
     402           1 :    }
     403          12 :    break;
     404           1 :   }
     405           2 :   default: ldv_stop();
     406           1 :  }
     407           0 :  /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     408             :  /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
     409           0 : 
     410             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     411             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     412             : 
     413             :  /* Jump to a subprocess 'call' initial state */
     414          12 :  goto ldv_call_1;
     415             :  /* Jump to a subprocess 'call' initial state */
     416             :  goto ldv_call_1;
     417             :  /* End of the subprocess 'call' */
     418             :  return;
     419             :  /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_1"} */
     420             : }
     421             : 
     422             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_35 */
     423             : void ldv_character_driver_scenario_callback_1_35(ssize_t (*arg0)(struct file *, char *, long unsigned int, loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
     424           1 :  ((& generic_read_dir))(arg1, arg2, arg3, arg4);
     425           1 : }
     426             : 
     427             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_38 */
     428             : void ldv_character_driver_scenario_callback_1_38(int (*arg0)(struct file *, void *, filldir_t ), struct file *arg1, void *arg2, int (*arg3)(void *, char *, int, loff_t , u64 , unsigned int)) {
     429           6 :  ((& ext2_readdir))(arg1, arg2, arg3);
     430           1 : }
     431             : 
     432             : 
     433             : /* AUX_FUNC  ERR_PTR */
     434             : static inline void *ERR_PTR (long int error)
     435             : {
     436         247 : 
     437         741 :  return ldv_err_ptr(error);
     438             : }
     439             : 
     440             : /* AUX_FUNC  PTR_ERR */
     441             : static inline long int PTR_ERR (void const *ptr)
     442             : {
     443         154 : 
     444         462 :  return ldv_ptr_err(ptr);
     445             : }
     446             : 
     447             : /* AUX_FUNC  IS_ERR */
     448             : static inline long int IS_ERR (void const *ptr)
     449             : {
     450         275 : 
     451         825 :  return ldv_is_err(ptr);
     452             : }
     453             : 
     454             : /* AUX_FUNC  IS_ERR_OR_NULL */
     455             : static inline long int IS_ERR_OR_NULL (void const *ptr)
     456             : {
     457             : 
     458             :  return ldv_is_err_or_null(ptr);
     459             : }
     460             : 
     461             : /* AUX_FUNC  kzalloc */
     462             : static inline void *kzalloc (size_t size, gfp_t flags)
     463             : {
     464             : 
     465             :  return ldv_kzalloc(size, flags);
     466             : }

Generated by: LCOV version 1.10