LCOV - code coverage report
Current view: top level - home/alexey/klever/native-scheduler-work-dir/native-scheduler-work-dir/scheduler/jobs/032ed983781f2acce615a4df71b22f31/klever-core-work-dir/0f4725e/linux-drivers-clk2/avtg/drivers/input/mousedev.ko/linux:drivers:clk2/weaver - mousedev.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 234 238 98.3 %
Date: 2017-01-25 Functions: 32 32 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/fs.h>
      30             : #include <linux/pagemap.h>
      31             : 
      32             : 
      33             : struct ldv_struct_character_driver_scenario_1 {
      34             :  struct file_operations *arg0;
      35             :  int signal_pending;
      36             : };
      37           1 : 
      38             : struct ldv_struct_insmod_3 {
      39             :  int signal_pending;
      40             : };
      41             : 
      42             : /* EMG Function declarations */
      43             : void ldv_character_driver_scenario_1(void *);
      44             : void ldv_character_driver_scenario_callback_1_20(void (*)(struct input_handle *), struct input_handle *);
      45             : void ldv_character_driver_scenario_callback_1_23(void (*)(struct input_handle *, unsigned int, unsigned int, int), struct input_handle *, unsigned int, unsigned int, int);
      46             : void ldv_character_driver_scenario_callback_1_26(int (*)(int, struct file *, int), int, struct file *, int);
      47             : void ldv_character_driver_scenario_callback_1_29(unsigned int (*)(struct file *, poll_table *), struct file *, poll_table *);
      48             : void ldv_character_driver_scenario_callback_1_30(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
      49             : void ldv_character_driver_scenario_callback_1_5(int (*)(struct input_handler *, struct input_dev *, struct input_device_id *), struct input_handler *, struct input_dev *, struct input_device_id *);
      50             : int ldv_character_driver_scenario_probe_1_12(int (*)(struct inode *, struct file *), struct inode *, struct file *);
      51             : void ldv_character_driver_scenario_release_1_2(int (*)(struct inode *, struct file *), struct inode *, struct file *);
      52             : void ldv_character_driver_scenario_write_1_4(ssize_t (*)(struct file *, char *, size_t , loff_t *), struct file *, char *, long unsigned int, loff_t *);
      53             : void ldv_dispatch_default_deregister_4_3_4(void);
      54             : void ldv_dispatch_default_register_4_3_5(void);
      55             : void ldv_dispatch_deregister_4_1(struct file_operations *);
      56             : void ldv_dispatch_insmod_deregister_6_2(void);
      57             : void ldv_dispatch_insmod_register_6_3(void);
      58             : void ldv_dispatch_register_5_3(struct file_operations *);
      59             : void ldv_emg_misc_deregister(struct miscdevice *);
      60             : int ldv_emg_misc_register(struct miscdevice *);
      61             : void ldv_insmod_3(void *);
      62             : void ldv_insmod_mousedev_exit_3_2(void (*)(void));
      63             : int ldv_insmod_mousedev_init_3_9(int (*)(void));
      64             : void ldv_main_6(void *);
      65             : void ldv_random_containerless_scenario_2(void *);
      66             : void ldv_random_containerless_scenario_callback_2_10(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      67             : void ldv_random_containerless_scenario_callback_2_4(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      68             : int main(void);
      69             : 
      70             : /* EMG variable declarations */
      71           1 : struct ldv_thread ldv_thread_1;
      72           1 : struct ldv_thread ldv_thread_2;
      73           1 : struct ldv_thread ldv_thread_3;
      74           1 : struct ldv_thread ldv_thread_6;
      75             : 
      76             : /* EMG variable initialization */
      77             : 
      78             : /* EMG function definitions */
      79             : /* AUX_FUNC ldv_character_driver_scenario_1 */
      80             : void ldv_character_driver_scenario_1(void *arg0) {
      81             :  /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'character_driver_scenario(file_operations)'", "function": "ldv_character_driver_scenario_1"} */
      82           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
      83           1 :  int (*ldv_1_callback_connect)(struct input_handler *, struct input_dev *, struct input_device_id *);
      84           1 :  void (*ldv_1_callback_disconnect)(struct input_handle *);
      85             :  void (*ldv_1_callback_event)(struct input_handle *, unsigned int, unsigned int, int);
      86           1 :  int (*ldv_1_callback_fasync)(int, struct file *, int);
      87           1 :  unsigned int (*ldv_1_callback_poll)(struct file *, poll_table *);
      88           1 :  ssize_t (*ldv_1_callback_read)(struct file *, char *, size_t , loff_t *);
      89           1 :  struct file_operations *ldv_1_container_file_operations;
      90           1 :  struct input_handle *ldv_1_ldv_param_20_0_default;
      91           1 :  struct input_handle *ldv_1_ldv_param_23_0_default;
      92           1 :  unsigned int ldv_1_ldv_param_23_1_default;
      93           1 :  unsigned int ldv_1_ldv_param_23_2_default;
      94           1 :  int ldv_1_ldv_param_23_3_default;
      95           1 :  int ldv_1_ldv_param_26_0_default;
      96           1 :  int ldv_1_ldv_param_26_2_default;
      97           1 :  char *ldv_1_ldv_param_30_1_default;
      98           1 :  long long int *ldv_1_ldv_param_30_3_default;
      99           1 :  char *ldv_1_ldv_param_4_1_default;
     100           1 :  long long int *ldv_1_ldv_param_4_3_default;
     101           1 :  struct input_handler *ldv_1_ldv_param_5_0_default;
     102           1 :  struct file *ldv_1_resource_file;
     103           1 :  struct inode *ldv_1_resource_inode;
     104           1 :  int ldv_1_ret_default;
     105           1 :  struct input_dev *ldv_1_size_cnt_struct_input_dev_ptr;
     106           1 :  struct input_device_id *ldv_1_size_cnt_struct_input_device_id;
     107           1 :  struct input_handle *ldv_1_size_cnt_struct_input_handle_ptr;
     108           1 :  struct input_handler *ldv_1_size_cnt_struct_input_handler;
     109           1 :  struct poll_table_struct *ldv_1_size_cnt_struct_poll_table_struct_ptr;
     110           1 :  long unsigned int ldv_1_size_cnt_write_size;
     111           1 :  /* Received labels */
     112           2 :  struct ldv_struct_character_driver_scenario_1 *data = (struct ldv_struct_character_driver_scenario_1*) arg0;
     113           1 : 
     114           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     115           1 :  /* Initialize automaton variables */
     116           2 :  ldv_1_ret_default = 1;
     117           2 :  ldv_1_size_cnt_write_size = 112UL;
     118           1 :  /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin FILE_OPERATIONS callbacks invocations scenario."} */
     119           1 :  /* Assign recieved labels */
     120           3 :  if (data) {
     121           2 :   ldv_1_container_file_operations = data->arg0;
     122           3 :   ldv_free(data);
     123           1 :  }
     124             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
     125             : 
     126             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Allocate memory for file and inode structures."} */
     127           5 :  ldv_1_resource_file = ldv_xmalloc(sizeof(struct file));
     128           3 :  ldv_1_resource_inode = ldv_xmalloc(sizeof(struct inode));
     129           3 :  ldv_1_size_cnt_struct_input_dev_ptr = ldv_undef_int();
     130             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     131             : 
     132             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     133             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     134             : 
     135             :  /* Jump to a subprocess 'main' initial state */
     136           1 :  goto ldv_main_1;
     137             :  /* End of the process */
     138             :  return;
     139           1 : 
     140             :  /* Sbprocess main */
     141             :  ldv_main_1:
     142             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     143             : 
     144           4 :  if (ldv_undef_int()) {
     145             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Open the device file. Invoke callback open from file_operations."} */
     146             :   /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = ((& mousedev_open))(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "probe"} */
     147           2 :   ldv_1_ret_default = ldv_character_driver_scenario_probe_1_12(ldv_1_container_file_operations->open, ldv_1_resource_inode, ldv_1_resource_file);
     148             :   /* Callback post-call */
     149           2 :   ldv_1_ret_default = ldv_filter_err_code(ldv_1_ret_default);
     150             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
     151             : 
     152           4 :   if (ldv_undef_int()) {
     153             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Device file is opened successfully."} */
     154           2 :    ldv_assume(ldv_1_ret_default == 0);
     155             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
     156             : 
     157             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     158             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     159             : 
     160             :    /* Jump to a subprocess 'call' initial state */
     161           1 :    goto ldv_call_1;
     162             :   }
     163             :   else {
     164             :    /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to open devices file."} */
     165           2 :    ldv_assume(ldv_1_ret_default != 0);
     166             :    /* LDV {"action": "PROBE_FAIL", "type": "CONDITION_END"} */
     167             : 
     168             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     169             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     170             : 
     171             :    /* Jump to a subprocess 'main' initial state */
     172           1 :    goto ldv_main_1;
     173             :   }
     174             :  }
     175             :  else {
     176             :   /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory of file and inode structures."} */
     177           2 :   ldv_free(ldv_1_resource_file);
     178           2 :   ldv_free(ldv_1_resource_inode);
     179             :   /* LDV {"action": "FREE", "type": "CONDITION_END"} */
     180             : 
     181             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish FILE_OPERATIONS callbacks invocations scenario."} */
     182             :   /* Skip a non-replicative signal receiving */
     183             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
     184             : 
     185             :   /* Exit function at a terminal state */
     186           1 :   return;
     187             :  }
     188             :  /* End of the subprocess 'main' */
     189             :  return;
     190           1 : 
     191             :  /* Sbprocess call */
     192             :  ldv_call_1:
     193             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     194             : 
     195           2 :  switch (ldv_undef_int()) {
     196           3 :   case 1: {
     197             :    /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     198           3 :    ldv_1_ldv_param_4_1_default = ldv_xmalloc_unknown_size(0);
     199           3 :    ldv_1_ldv_param_4_3_default = ldv_xmalloc_unknown_size(0);
     200             :    /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
     201             : 
     202             :    /* LDV {"action": "WRITE", "type": "CALL_BEGIN", "callback": true, "comment": "Write data to the device. Invoke callback write from file_operations."} */
     203             :    /* Callback pre-call */
     204           2 :    ldv_assume(ldv_1_size_cnt_struct_input_dev_ptr <= (INT_MAX & PAGE_CACHE_MASK));
     205             :    /* LDV {"type": "CALLBACK", "call": "((& mousedev_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"} */
     206           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);
     207             :    /* LDV {"action": "WRITE", "type": "CALL_END"} */
     208             : 
     209             :    /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     210           2 :    ldv_free(ldv_1_ldv_param_4_1_default);
     211           2 :    ldv_free(ldv_1_ldv_param_4_3_default);
     212             :    /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     213             : 
     214             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     215             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     216             : 
     217             :    /* Jump to a subprocess 'call' initial state */
     218           1 :    goto ldv_call_1;
     219           1 :    break;
     220             :   }
     221           3 :   case 2: {
     222             :    /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "File structure is released. Invoke callback release from file_operations."} */
     223             :    /* LDV {"type": "CALLBACK", "call": "((& mousedev_release))(ldv_1_resource_inode, ldv_1_resource_file);", "comment": "release"} */
     224           2 :    ldv_character_driver_scenario_release_1_2(ldv_1_container_file_operations->release, ldv_1_resource_inode, ldv_1_resource_file);
     225             :    /* LDV {"action": "RELEASE", "type": "CALL_END"} */
     226             : 
     227             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Device appeared in the system."} */
     228             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     229             : 
     230             :    /* Jump to a subprocess 'main' initial state */
     231           1 :    goto ldv_main_1;
     232           1 :    break;
     233             :   }
     234           3 :   case 3: {
     235             :    /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     236           3 :    ldv_1_ldv_param_5_0_default = ldv_xmalloc_unknown_size(0);
     237             :    /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
     238             : 
     239           2 :    switch (ldv_undef_int()) {
     240           3 :     case 1: {
     241             :      /* LDV {"action": "PRE_CALL_30", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     242           3 :      ldv_1_ldv_param_30_1_default = ldv_xmalloc_unknown_size(0);
     243           3 :      ldv_1_ldv_param_30_3_default = ldv_xmalloc_unknown_size(0);
     244             :      /* LDV {"action": "PRE_CALL_30", "type": "CONDITION_END"} */
     245             : 
     246             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback read from file_operations."} */
     247             :      /* LDV {"type": "CALLBACK", "call": "((& mousedev_read))(ldv_1_resource_file, ldv_1_ldv_param_30_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_30_3_default);", "comment": "callback"} */
     248           2 :      ldv_character_driver_scenario_callback_1_30(ldv_1_callback_read, ldv_1_resource_file, ldv_1_ldv_param_30_1_default, ldv_1_size_cnt_write_size, ldv_1_ldv_param_30_3_default);
     249             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     250             : 
     251             :      /* LDV {"action": "POST_CALL_30", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     252           2 :      ldv_free(ldv_1_ldv_param_30_1_default);
     253           2 :      ldv_free(ldv_1_ldv_param_30_3_default);
     254             :      /* LDV {"action": "POST_CALL_30", "type": "CONDITION_END"} */
     255             : 
     256           1 :      break;
     257           1 :     }
     258           3 :     case 2: {
     259             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback poll from file_operations."} */
     260             :      /* LDV {"type": "CALLBACK", "call": "(( & mousedev_poll))(ldv_1_resource_file, ldv_1_size_cnt_struct_poll_table_struct_ptr);", "comment": "callback"} */
     261           2 :      ldv_character_driver_scenario_callback_1_29(ldv_1_callback_poll, ldv_1_resource_file, ldv_1_size_cnt_struct_poll_table_struct_ptr);
     262             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     263             : 
     264           1 :      break;
     265           1 :     }
     266           3 :     case 3: {
     267             :      /* LDV {"action": "PRE_CALL_26", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     268             :      /* LDV {"action": "PRE_CALL_26", "type": "CONDITION_END"} */
     269             : 
     270             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback fasync from file_operations."} */
     271             :      /* LDV {"type": "CALLBACK", "call": "((& mousedev_fasync))(ldv_1_ldv_param_26_0_default, ldv_1_resource_file, ldv_1_ldv_param_26_2_default);", "comment": "callback"} */
     272           2 :      ldv_character_driver_scenario_callback_1_26(ldv_1_callback_fasync, ldv_1_ldv_param_26_0_default, ldv_1_resource_file, ldv_1_ldv_param_26_2_default);
     273             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     274             : 
     275             :      /* LDV {"action": "POST_CALL_26", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     276             :      /* LDV {"action": "POST_CALL_26", "type": "CONDITION_END"} */
     277             : 
     278           1 :      break;
     279           1 :     }
     280           3 :     case 4: {
     281             :      /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     282           3 :      ldv_1_ldv_param_23_0_default = ldv_xmalloc_unknown_size(0);
     283             :      /* LDV {"action": "PRE_CALL_23", "type": "CONDITION_END"} */
     284             : 
     285             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback event from input_handler."} */
     286             :      /* LDV {"type": "CALLBACK", "call": "((& mousedev_event))(ldv_1_ldv_param_23_0_default, ldv_1_ldv_param_23_1_default, ldv_1_ldv_param_23_2_default, ldv_1_ldv_param_23_3_default);", "comment": "callback"} */
     287           2 :      ldv_character_driver_scenario_callback_1_23(ldv_1_callback_event, ldv_1_ldv_param_23_0_default, ldv_1_ldv_param_23_1_default, ldv_1_ldv_param_23_2_default, ldv_1_ldv_param_23_3_default);
     288             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     289             : 
     290             :      /* LDV {"action": "POST_CALL_23", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     291           2 :      ldv_free(ldv_1_ldv_param_23_0_default);
     292             :      /* LDV {"action": "POST_CALL_23", "type": "CONDITION_END"} */
     293             : 
     294           1 :      break;
     295           1 :     }
     296           3 :     case 5: {
     297             :      /* LDV {"action": "PRE_CALL_20", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     298           3 :      ldv_1_ldv_param_20_0_default = ldv_xmalloc_unknown_size(0);
     299             :      /* LDV {"action": "PRE_CALL_20", "type": "CONDITION_END"} */
     300             : 
     301             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback disconnect from input_handler."} */
     302             :      /* LDV {"type": "CALLBACK", "call": "((& mousedev_disconnect))(ldv_1_ldv_param_20_0_default);", "comment": "callback"} */
     303           2 :      ldv_character_driver_scenario_callback_1_20(ldv_1_callback_disconnect, ldv_1_ldv_param_20_0_default);
     304             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     305             : 
     306             :      /* LDV {"action": "POST_CALL_20", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     307           2 :      ldv_free(ldv_1_ldv_param_20_0_default);
     308             :      /* LDV {"action": "POST_CALL_20", "type": "CONDITION_END"} */
     309             : 
     310           1 :      break;
     311           1 :     }
     312           3 :     case 6: {
     313             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback connect from input_handler."} */
     314             :      /* LDV {"type": "CALLBACK", "call": "((& mousedev_connect))(ldv_1_ldv_param_5_0_default, ldv_1_size_cnt_struct_input_dev_ptr, ldv_1_size_cnt_struct_input_device_id);", "comment": "callback"} */
     315           2 :      ldv_character_driver_scenario_callback_1_5(ldv_1_callback_connect, ldv_1_ldv_param_5_0_default, ldv_1_size_cnt_struct_input_dev_ptr, ldv_1_size_cnt_struct_input_device_id);
     316             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     317             : 
     318           1 :      break;
     319           1 :     }
     320           2 :     default: ldv_stop();
     321           1 :    }
     322           6 :    break;
     323           1 :   }
     324           2 :   default: ldv_stop();
     325           1 :  }
     326           0 :  /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     327          12 :  ldv_free(ldv_1_ldv_param_5_0_default);
     328           0 :  /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
     329             : 
     330             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Device file is opened, ready to read and write."} */
     331             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     332             : 
     333             :  /* Jump to a subprocess 'call' initial state */
     334           1 :  goto ldv_call_1;
     335             :  /* Jump to a subprocess 'call' initial state */
     336             :  goto ldv_call_1;
     337             :  /* End of the subprocess 'call' */
     338             :  return;
     339             :  /* LDV {"comment": "End of control function based on process 'character_driver_scenario(file_operations)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_character_driver_scenario_1"} */
     340             : }
     341             : 
     342             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_20 */
     343             : void ldv_character_driver_scenario_callback_1_20(void (*arg0)(struct input_handle *), struct input_handle *arg1) {
     344           2 :  ((& mousedev_disconnect))(arg1);
     345           1 : }
     346             : 
     347             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_23 */
     348             : void ldv_character_driver_scenario_callback_1_23(void (*arg0)(struct input_handle *, unsigned int, unsigned int, int), struct input_handle *arg1, unsigned int arg2, unsigned int arg3, int arg4) {
     349          10 :  ((& mousedev_event))(arg1, arg2, arg3, arg4);
     350           1 : }
     351             : 
     352             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_26 */
     353             : void ldv_character_driver_scenario_callback_1_26(int (*arg0)(int, struct file *, int), int arg1, struct file *arg2, int arg3) {
     354           2 :  ((& mousedev_fasync))(arg1, arg2, arg3);
     355           1 : }
     356             : 
     357             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_29 */
     358             : void ldv_character_driver_scenario_callback_1_29(unsigned int (*arg0)(struct file *, poll_table *), struct file *arg1, struct poll_table_struct *arg2) {
     359           2 :  (( & mousedev_poll))(arg1, arg2);
     360           1 : }
     361             : 
     362             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_30 */
     363             : void ldv_character_driver_scenario_callback_1_30(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
     364           5 :  ((& mousedev_read))(arg1, arg2, arg3, arg4);
     365           1 : }
     366             : 
     367             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_callback_1_5 */
     368             : void ldv_character_driver_scenario_callback_1_5(int (*arg0)(struct input_handler *, struct input_dev *, struct input_device_id *), struct input_handler *arg1, struct input_dev *arg2, struct input_device_id *arg3) {
     369           5 :  ((& mousedev_connect))(arg1, arg2, arg3);
     370           1 : }
     371             : 
     372             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_probe_1_12 */
     373             : int ldv_character_driver_scenario_probe_1_12(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
     374           7 :  return ((& mousedev_open))(arg1, arg2);
     375             : }
     376           1 : 
     377             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_release_1_2 */
     378             : void ldv_character_driver_scenario_release_1_2(int (*arg0)(struct inode *, struct file *), struct inode *arg1, struct file *arg2) {
     379           2 :  ((& mousedev_release))(arg1, arg2);
     380           1 : }
     381             : 
     382             : /* AUX_FUNC_CALLBACK ldv_character_driver_scenario_write_1_4 */
     383             : void ldv_character_driver_scenario_write_1_4(ssize_t (*arg0)(struct file *, char *, size_t , loff_t *), struct file *arg1, char *arg2, long unsigned int arg3, long long int *arg4) {
     384           3 :  ((& mousedev_write))(arg1, arg2, arg3, arg4);
     385           1 : }
     386             : 
     387             : /* AUX_FUNC ldv_dispatch_default_deregister_4_3_4 */
     388             : void ldv_dispatch_default_deregister_4_3_4() {
     389             :  struct ldv_struct_insmod_3 *cf_arg_2;
     390             :  /* Skip thread join call */
     391           1 :  return;
     392             : }
     393             : 
     394             : /* AUX_FUNC ldv_dispatch_default_register_4_3_5 */
     395             : void ldv_dispatch_default_register_4_3_5() {
     396             :  struct ldv_struct_insmod_3 *cf_arg_2;
     397           4 :  cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_3));
     398           3 :  ldv_random_containerless_scenario_2(cf_arg_2);
     399           1 :  return;
     400             : }
     401             : 
     402             : /* AUX_FUNC ldv_dispatch_deregister_4_1 */
     403             : void ldv_dispatch_deregister_4_1(struct file_operations *arg0) {
     404             :  struct ldv_struct_character_driver_scenario_1 *cf_arg_1;
     405             :  /* Skip thread join call */
     406           2 :  return;
     407             : }
     408             : 
     409             : /* AUX_FUNC ldv_dispatch_insmod_deregister_6_2 */
     410             : void ldv_dispatch_insmod_deregister_6_2() {
     411             :  struct ldv_struct_insmod_3 *cf_arg_3;
     412             :  /* Skip thread join call */
     413           1 :  return;
     414             : }
     415             : 
     416             : /* AUX_FUNC ldv_dispatch_insmod_register_6_3 */
     417             : void ldv_dispatch_insmod_register_6_3() {
     418             :  struct ldv_struct_insmod_3 *cf_arg_3;
     419           4 :  cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_3));
     420           4 :  ldv_insmod_3(cf_arg_3);
     421           1 :  return;
     422             : }
     423             : 
     424             : /* AUX_FUNC ldv_dispatch_register_5_3 */
     425             : void ldv_dispatch_register_5_3(struct file_operations *arg0) {
     426             :  struct ldv_struct_character_driver_scenario_1 *cf_arg_1;
     427           4 :  cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_character_driver_scenario_1));
     428           2 :  cf_arg_1->arg0 = arg0;
     429           2 :  ldv_character_driver_scenario_1(cf_arg_1);
     430           1 :  return;
     431             : }
     432             : 
     433             : /* AUX_FUNC ldv_emg_misc_deregister */
     434             : void ldv_emg_misc_deregister(struct miscdevice *arg0) {
     435             :  /* LDV {"comment": "Control function 'misc_deregister'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_misc_deregister"} */
     436           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     437           2 :  struct file_operations *ldv_4_file_operations_file_operations;
     438             :  struct miscdevice *ldv_4_miscdevice_miscdevice;
     439             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     440             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Extract a file_operations structure pointer."} */
     441           2 :  ldv_4_miscdevice_miscdevice = arg0;
     442           4 :  ldv_4_file_operations_file_operations = ldv_4_miscdevice_miscdevice->fops;
     443             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     444             : 
     445             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister FILE_OPERATIONS callbacks."} */
     446           4 :  ldv_dispatch_deregister_4_1(ldv_4_file_operations_file_operations);
     447             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
     448             : 
     449             :  /* Exit function at a terminal state */
     450           2 :  return;
     451             :  /* End of the process */
     452             :  return;
     453             :  /* LDV {"comment": "End of control function based on process 'misc_deregister'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_misc_deregister"} */
     454             : }
     455             : 
     456             : /* AUX_FUNC ldv_emg_misc_register */
     457             : int ldv_emg_misc_register(struct miscdevice *arg0) {
     458             :  /* LDV {"comment": "Control function 'misc_register'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_misc_register"} */
     459           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     460           1 :  struct file_operations *ldv_5_file_operations_file_operations;
     461           1 :  struct miscdevice *ldv_5_miscdevice_miscdevice;
     462           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     463             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     464             : 
     465           4 :  if (ldv_undef_int()) {
     466             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Extract a file_operations structure pointer."} */
     467           1 :   ldv_5_miscdevice_miscdevice = arg0;
     468           2 :   ldv_5_file_operations_file_operations = ldv_5_miscdevice_miscdevice->fops;
     469             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     470             : 
     471             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register file_operations callbacks of the miscellaneous character driver."} */
     472           2 :   ldv_dispatch_register_5_3(ldv_5_file_operations_file_operations);
     473             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
     474             : 
     475             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully registered the miscellaneous character driver."} */
     476           1 :   return 0;
     477             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     478             : 
     479             :   /* Exit function at a terminal state */
     480             :  }
     481             :  else {
     482             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Fail to register the miscellaneous character driver."} */
     483           3 :   return ldv_undef_int_negative();
     484             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     485             : 
     486             :   /* Exit function at a terminal state */
     487             :  }
     488             :  /* End of the process */
     489             :  /* LDV {"comment": "End of control function based on process 'misc_register'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_misc_register"} */
     490             : }
     491             : 
     492             : /* AUX_FUNC ldv_insmod_3 */
     493             : void ldv_insmod_3(void *arg0) {
     494             :  /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_3"} */
     495           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     496           1 :  void (*ldv_3_mousedev_exit_default)(void);
     497           1 :  int (*ldv_3_mousedev_init_default)(void);
     498           1 :  int ldv_3_ret_default;
     499           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     500             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
     501           2 :  ldv_free(arg0);
     502             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
     503             : 
     504             :  /* LDV {"action": "MOUSEDEV_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'mousedev_init' function. Invoke callback mousedev_init from ARTIFICIAL."} */
     505             :  /* LDV {"type": "CALLBACK", "call": "ldv_3_ret_default = (mousedev_init)();", "comment": "mousedev_init"} */
     506           2 :  ldv_3_ret_default = ldv_insmod_mousedev_init_3_9(ldv_3_mousedev_init_default);
     507             :  /* Callback post-call */
     508           2 :  ldv_3_ret_default = ldv_post_init(ldv_3_ret_default);
     509             :  /* LDV {"action": "MOUSEDEV_INIT", "type": "CALL_END"} */
     510             : 
     511           4 :  if (ldv_undef_int()) {
     512             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
     513           2 :   ldv_assume(ldv_3_ret_default != 0);
     514             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
     515             : 
     516             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     517             :   /* Skip a non-replicative signal receiving */
     518             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     519             : 
     520             :   /* Exit function at a terminal state */
     521           1 :   return;
     522             :  }
     523             :  else {
     524             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
     525           2 :   ldv_assume(ldv_3_ret_default == 0);
     526             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
     527             : 
     528           4 :   if (ldv_undef_int()) {
     529             :    /* LDV {"action": "DEFAULT_REGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_KERNEL_PARAM' callbacks with unknown registration function."} */
     530           2 :    ldv_dispatch_default_register_4_3_5();
     531             :    /* LDV {"action": "DEFAULT_REGISTER_4", "type": "DISPATCH_END"} */
     532             : 
     533             :    /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_KERNEL_PARAM' callbacks with unknown deregistration function."} */
     534           2 :    ldv_dispatch_default_deregister_4_3_4();
     535             :    /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_END"} */
     536             : 
     537             :   }
     538             :   else {
     539             :    /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
     540             :    /* LDV {"action": "NONE", "type": "CONDITION_END"} */
     541             : 
     542             :   }
     543             :   /* LDV {"action": "MOUSEDEV_EXIT", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'mousedev_exit' function. Invoke callback mousedev_exit from ARTIFICIAL."} */
     544             :   /* LDV {"type": "CALLBACK", "call": "(mousedev_exit)();", "comment": "mousedev_exit"} */
     545           4 :   ldv_insmod_mousedev_exit_3_2(ldv_3_mousedev_exit_default);
     546             :   /* LDV {"action": "MOUSEDEV_EXIT", "type": "CALL_END"} */
     547             : 
     548             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     549             :   /* Skip a non-replicative signal receiving */
     550             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     551             : 
     552             :   /* Exit function at a terminal state */
     553           1 :   return;
     554             :  }
     555             :  /* End of the process */
     556             :  return;
     557             :  /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_3"} */
     558             : }
     559             : 
     560             : /* AUX_FUNC_CALLBACK ldv_insmod_mousedev_exit_3_2 */
     561             : void ldv_insmod_mousedev_exit_3_2(void (*arg0)(void)) {
     562           4 :  (mousedev_exit)();
     563           2 : }
     564             : 
     565             : /* AUX_FUNC_CALLBACK ldv_insmod_mousedev_init_3_9 */
     566             : int ldv_insmod_mousedev_init_3_9(int (*arg0)(void)) {
     567           5 :  return (mousedev_init)();
     568           1 : }
     569             : 
     570             : /* AUX_FUNC ldv_main_6 */
     571             : void ldv_main_6(void *arg0) {
     572             :  /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_6"} */
     573             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     574             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     575             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
     576           1 :  ldv_initialize();
     577             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     578             : 
     579             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
     580           2 :  ldv_dispatch_insmod_register_6_3();
     581             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
     582             : 
     583             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
     584           2 :  ldv_dispatch_insmod_deregister_6_2();
     585             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
     586             : 
     587             :  /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
     588           1 :  ldv_check_final_state();
     589           1 :  ldv_stop();
     590             :  /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
     591             : 
     592             :  /* Exit function at a terminal state */
     593           0 :  return;
     594             :  /* End of the process */
     595             :  return;
     596             :  /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_6"} */
     597             : }
     598             : 
     599             : /* AUX_FUNC ldv_random_containerless_scenario_2 */
     600             : void ldv_random_containerless_scenario_2(void *arg0) {
     601             :  /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_kernel_param)'", "function": "ldv_random_containerless_scenario_2"} */
     602           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     603           1 :  int (*ldv_2_callback_get)(char *, struct kernel_param *);
     604           1 :  int (*ldv_2_callback_set)(char *, struct kernel_param *);
     605           1 :  struct kernel_param *ldv_2_container_struct_kernel_param;
     606           1 :  char *ldv_2_ldv_param_10_0_default;
     607           1 :  char *ldv_2_ldv_param_4_0_default;
     608           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     609           1 :  /* LDV {"action": "DEFAULT_REGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     610           3 :  ldv_free(arg0);
     611           1 :  /* LDV {"action": "DEFAULT_REGISTER_4", "type": "RECEIVE_END"} */
     612             : 
     613             :  /* LDV {"action": "DEFAULT_ALLOC_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     614           3 :  ldv_2_container_struct_kernel_param = ldv_xmalloc_unknown_size(0);
     615             :  /* LDV {"action": "DEFAULT_ALLOC_4", "type": "CONDITION_END"} */
     616             : 
     617             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     618             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     619             : 
     620             :  /* Jump to a subprocess 'call' initial state */
     621           1 :  goto ldv_call_2;
     622             :  /* End of the process */
     623             :  return;
     624           1 : 
     625             :  /* Sbprocess call */
     626             :  ldv_call_2:
     627             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     628             : 
     629           4 :  if (ldv_undef_int()) {
     630             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     631           3 :   ldv_2_ldv_param_4_0_default = ldv_xmalloc_unknown_size(0);
     632             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
     633             : 
     634           4 :   if (ldv_undef_int()) {
     635             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     636           3 :    ldv_2_ldv_param_10_0_default = ldv_xmalloc_unknown_size(0);
     637             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
     638             : 
     639             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set from kernel_param."} */
     640             :    /* LDV {"type": "CALLBACK", "call": "((& param_set_uint))(ldv_2_ldv_param_10_0_default, ldv_2_container_struct_kernel_param);", "comment": "callback"} */
     641           2 :    ldv_random_containerless_scenario_callback_2_10(ldv_2_callback_set, ldv_2_ldv_param_10_0_default, ldv_2_container_struct_kernel_param);
     642             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     643             : 
     644             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     645           2 :    ldv_free(ldv_2_ldv_param_10_0_default);
     646             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
     647             : 
     648             :   }
     649             :   else {
     650             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get from kernel_param."} */
     651             :    /* LDV {"type": "CALLBACK", "call": "((& param_get_uint))(ldv_2_ldv_param_4_0_default, ldv_2_container_struct_kernel_param);", "comment": "callback"} */
     652           2 :    ldv_random_containerless_scenario_callback_2_4(ldv_2_callback_get, ldv_2_ldv_param_4_0_default, ldv_2_container_struct_kernel_param);
     653             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     654             : 
     655             :   }
     656             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     657           4 :   ldv_free(ldv_2_ldv_param_4_0_default);
     658             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     659             : 
     660             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     661             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     662             : 
     663             :   /* Jump to a subprocess 'call' initial state */
     664           1 :   goto ldv_call_2;
     665             :  }
     666             :  else {
     667             :   /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     668           2 :   ldv_free(ldv_2_container_struct_kernel_param);
     669             :   /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_END"} */
     670             : 
     671             :   /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     672             :   /* Skip a non-replicative signal receiving */
     673             :   /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_END"} */
     674             : 
     675             :   /* Exit function at a terminal state */
     676           1 :   return;
     677             :  }
     678             :  /* End of the subprocess 'call' */
     679             :  return;
     680             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_kernel_param)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_2"} */
     681             : }
     682             : 
     683             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_2_10 */
     684             : void ldv_random_containerless_scenario_callback_2_10(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     685           1 :  ((& param_set_uint))(arg1, arg2);
     686           1 : }
     687             : 
     688             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_2_4 */
     689             : void ldv_random_containerless_scenario_callback_2_4(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     690           1 :  ((& param_get_uint))(arg1, arg2);
     691           1 : }
     692             : 
     693             : /* AUX_FUNC main */
     694             : int main() {
     695           1 :  ldv_main_6(0);
     696           0 :  return 0;
     697             : }
     698             : 
     699             : 
     700             : /* AUX_FUNC  ERR_PTR */
     701             : static inline void *ERR_PTR (long int error)
     702             : {
     703           8 : 
     704          24 :  return ldv_err_ptr(error);
     705             : }
     706             : 
     707             : /* AUX_FUNC  PTR_ERR */
     708             : static inline long int PTR_ERR (void const *ptr)
     709             : {
     710           2 : 
     711           6 :  return ldv_ptr_err(ptr);
     712             : }
     713             : 
     714             : /* AUX_FUNC  IS_ERR */
     715             : static inline long int IS_ERR (void const *ptr)
     716             : {
     717           2 : 
     718           6 :  return ldv_is_err(ptr);
     719             : }
     720             : 
     721             : /* AUX_FUNC  IS_ERR_OR_NULL */
     722             : static inline long int IS_ERR_OR_NULL (void const *ptr)
     723             : {
     724             : 
     725             :  return ldv_is_err_or_null(ptr);
     726             : }
     727             : 
     728             : /* AUX_FUNC  kzalloc */
     729             : static inline void *kzalloc (size_t size, gfp_t flags)
     730             : {
     731           4 : 
     732          12 :  return ldv_kzalloc(size, flags);
     733             : }
     734             : 
     735             : /* AUX_FUNC  ldv_dev_get_drvdata_6 */
     736             : void *ldv_dev_get_drvdata_6 (struct device const *dev)
     737             : {
     738             : 
     739             :  return ldv_dev_get_drvdata(dev);
     740             : }
     741             : 
     742             : /* AUX_FUNC  ldv_misc_register_7 */
     743             : int ldv_misc_register_7 (struct miscdevice *ldv_func_arg1)
     744             : {
     745           1 : 
     746             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'misc_register'"} */
     747           4 :  return ldv_emg_misc_register(ldv_func_arg1);
     748             : }
     749             : 
     750             : /* AUX_FUNC  ldv_misc_deregister_8 */
     751             : int ldv_misc_deregister_8 (struct miscdevice *ldv_func_arg1)
     752             : {
     753             : 
     754             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'misc_deregister'"} */
     755           4 :  ldv_emg_misc_deregister(ldv_func_arg1);
     756           2 : }

Generated by: LCOV version 1.10