LCOV - code coverage report
Current view: top level - avtg/drivers/usb/host/xhci.ko/linux:drivers:clk2/weaver - xhci-hcd.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 115 117 98.3 %
Date: 2017-01-25 Functions: 25 25 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/pci.h>
      29             : #include <linux/pm.h>
      30             : #include <linux/timer.h>
      31             : 
      32             : 
      33             : struct ldv_struct_insmod_6 {
      34             :  int signal_pending;
      35             : };
      36             : 
      37             : struct ldv_struct_pci_scenario_1 {
      38             :  struct pci_driver *arg0;
      39             :  int signal_pending;
      40             : };
      41           1 : 
      42             : struct ldv_struct_timer_scenario_4 {
      43             :  struct timer_list *arg0;
      44             :  int signal_pending;
      45             : };
      46             : 
      47             : /* EMG Function declarations */
      48             : void ldv_dispatch_default_deregister_6_6_5(void);
      49             : void ldv_dispatch_default_deregister_7_6_6(void);
      50             : void ldv_dispatch_default_deregister_9_6_4(void);
      51             : void ldv_dispatch_default_register_6_6_8(void);
      52             : void ldv_dispatch_default_register_7_6_7(void);
      53             : void ldv_dispatch_default_register_9_6_9(void);
      54             : void ldv_dispatch_insmod_deregister_11_2(void);
      55             : void ldv_dispatch_insmod_register_11_3(void);
      56             : extern void ldv_dispatch_instance_deregister_7_1(struct timer_list *);
      57             : void ldv_dispatch_instance_register_5_4(struct timer_list *);
      58             : extern int ldv_emg___pci_register_driver(struct pci_driver *, struct module *, char *);
      59             : extern int ldv_emg_del_timer(struct timer_list *);
      60             : extern int ldv_emg_del_timer_sync(struct timer_list *);
      61             : extern void ldv_emg_pci_unregister_driver(struct pci_driver *);
      62             : void ldv_factory_scenario_5(void *);
      63             : void ldv_insmod_6(void *);
      64             : void ldv_insmod_xhci_hcd_cleanup_6_2(void (*)(void));
      65             : int ldv_insmod_xhci_hcd_init_6_13(int (*)(void));
      66             : void ldv_main_11(void *);
      67             : extern void ldv_partially_ordered_scenario_2(void *);
      68             : extern void ldv_pci_scenario_1(void *);
      69             : void ldv_pci_scenario_resume_1_5(int (*)(struct pci_dev *), struct pci_dev *);
      70             : void ldv_pci_scenario_resume_early_1_6(int (*)(struct pci_dev *), struct pci_dev *);
      71             : int ldv_pci_scenario_suspend_1_8(int (*)(struct pci_dev *, struct pm_message), struct pci_dev *, struct pm_message);
      72             : int ldv_pci_scenario_suspend_late_1_7(int (*)(struct pci_dev *, struct pm_message), struct pci_dev *, struct pm_message);
      73             : void ldv_random_containerless_scenario_3(void *);
      74             : void ldv_random_containerless_scenario_callback_3_10(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      75             : void ldv_random_containerless_scenario_callback_3_4(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      76             : void ldv_timer_scenario_4(void *);
      77             : void ldv_timer_scenario_callback_4_2(void (*)(unsigned long), unsigned long);
      78             : int main(void);
      79             : 
      80             : /* EMG variable declarations */
      81           1 : struct ldv_thread ldv_thread_11;
      82           1 : struct ldv_thread ldv_thread_3;
      83           1 : struct ldv_thread ldv_thread_4;
      84           1 : struct ldv_thread ldv_thread_5;
      85           1 : struct ldv_thread ldv_thread_6;
      86             : 
      87             : /* EMG variable initialization */
      88             : 
      89             : /* EMG function definitions */
      90             : /* AUX_FUNC ldv_dispatch_default_deregister_6_6_5 */
      91             : void ldv_dispatch_default_deregister_6_6_5() {
      92             :  struct ldv_struct_insmod_6 *cf_arg_2;
      93             :  /* Skip thread join call */
      94           1 :  return;
      95             : }
      96             : 
      97             : /* AUX_FUNC ldv_dispatch_default_deregister_7_6_6 */
      98             : void ldv_dispatch_default_deregister_7_6_6() {
      99             :  struct ldv_struct_insmod_6 *cf_arg_3;
     100             :  /* Skip thread join call */
     101           1 :  return;
     102             : }
     103             : 
     104             : /* AUX_FUNC ldv_dispatch_default_deregister_9_6_4 */
     105             : void ldv_dispatch_default_deregister_9_6_4() {
     106             :  struct ldv_struct_insmod_6 *cf_arg_5;
     107             :  /* Skip thread join call */
     108           1 :  return;
     109             : }
     110             : 
     111             : /* AUX_FUNC ldv_dispatch_default_register_6_6_8 */
     112             : void ldv_dispatch_default_register_6_6_8() {
     113             :  struct ldv_struct_insmod_6 *cf_arg_2;
     114           4 :  cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
     115           3 :  ldv_partially_ordered_scenario_2(cf_arg_2);
     116           1 :  return;
     117             : }
     118             : 
     119             : /* AUX_FUNC ldv_dispatch_default_register_7_6_7 */
     120             : void ldv_dispatch_default_register_7_6_7() {
     121             :  struct ldv_struct_insmod_6 *cf_arg_3;
     122           4 :  cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
     123           3 :  ldv_random_containerless_scenario_3(cf_arg_3);
     124           1 :  return;
     125             : }
     126             : 
     127             : /* AUX_FUNC ldv_dispatch_default_register_9_6_9 */
     128             : void ldv_dispatch_default_register_9_6_9() {
     129             :  struct ldv_struct_insmod_6 *cf_arg_5;
     130           4 :  cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
     131           3 :  ldv_factory_scenario_5(cf_arg_5);
     132           1 :  return;
     133             : }
     134             : 
     135             : /* AUX_FUNC ldv_dispatch_insmod_deregister_11_2 */
     136             : void ldv_dispatch_insmod_deregister_11_2() {
     137             :  struct ldv_struct_insmod_6 *cf_arg_6;
     138             :  /* Skip thread join call */
     139           1 :  return;
     140             : }
     141             : 
     142             : /* AUX_FUNC ldv_dispatch_insmod_register_11_3 */
     143             : void ldv_dispatch_insmod_register_11_3() {
     144             :  struct ldv_struct_insmod_6 *cf_arg_6;
     145           4 :  cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_6));
     146           4 :  ldv_insmod_6(cf_arg_6);
     147           1 :  return;
     148             : }
     149             : 
     150             : /* AUX_FUNC ldv_dispatch_instance_register_5_4 */
     151             : void ldv_dispatch_instance_register_5_4(struct timer_list *arg0) {
     152             :  struct ldv_struct_timer_scenario_4 *cf_arg_4;
     153           4 :  cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_timer_scenario_4));
     154           2 :  cf_arg_4->arg0 = arg0;
     155           4 :  ldv_timer_scenario_4(cf_arg_4);
     156           1 :  return;
     157             : }
     158             : 
     159             : /* AUX_FUNC ldv_factory_scenario_5 */
     160             : void ldv_factory_scenario_5(void *arg0) {
     161             :  /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'factory_scenario(timer)'", "function": "ldv_factory_scenario_5"} */
     162           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     163           1 :  struct timer_list *ldv_5_container_timer_list;
     164             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     165             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Proceed to TIMER callbacks invocations scenarios."} */
     166           2 :  ldv_free(arg0);
     167             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_END"} */
     168             : 
     169             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     170           3 :  ldv_5_container_timer_list = ldv_xmalloc_unknown_size(0);
     171             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_END"} */
     172             : 
     173             :  /* LDV {"action": "INSTANCE_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Initiate scenario for TIMER callbacks invocations"} */
     174           2 :  ldv_dispatch_instance_register_5_4(ldv_5_container_timer_list);
     175             :  /* LDV {"action": "INSTANCE_REGISTER", "type": "DISPATCH_END"} */
     176             : 
     177             :  /* LDV {"action": "INSTANCE_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Skip the action, since no callbacks has been found."} */
     178             :  /* Dispatch 'instance_deregister' is not expected by any process, skipping the action */
     179             :  /* Skip the dispatch because there is no process to receive the signal */
     180             :  /* LDV {"action": "INSTANCE_DEREGISTER", "type": "DISPATCH_END"} */
     181             : 
     182             :  /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     183           2 :  ldv_free(ldv_5_container_timer_list);
     184             :  /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_END"} */
     185             : 
     186             :  /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Finish TIMER callbacks invocations scenarios."} */
     187             :  /* Skip a non-replicative signal receiving */
     188             :  /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_END"} */
     189             : 
     190             :  /* Exit function at a terminal state */
     191           1 :  return;
     192             :  /* End of the process */
     193             :  return;
     194             :  /* LDV {"comment": "End of control function based on process 'factory_scenario(timer)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_factory_scenario_5"} */
     195             : }
     196             : 
     197             : /* AUX_FUNC ldv_insmod_6 */
     198             : void ldv_insmod_6(void *arg0) {
     199             :  /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_6"} */
     200           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     201           1 :  int ldv_6_ret_default;
     202           1 :  void (*ldv_6_xhci_hcd_cleanup_default)(void);
     203           1 :  int (*ldv_6_xhci_hcd_init_default)(void);
     204           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     205             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
     206           2 :  ldv_free(arg0);
     207             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
     208             : 
     209             :  /* LDV {"action": "XHCI_HCD_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'xhci_hcd_init' function. Invoke callback xhci_hcd_init from ARTIFICIAL."} */
     210             :  /* LDV {"type": "CALLBACK", "call": "ldv_6_ret_default = (xhci_hcd_init)();", "comment": "xhci_hcd_init"} */
     211           2 :  ldv_6_ret_default = ldv_insmod_xhci_hcd_init_6_13(ldv_6_xhci_hcd_init_default);
     212             :  /* Callback post-call */
     213           2 :  ldv_6_ret_default = ldv_post_init(ldv_6_ret_default);
     214             :  /* LDV {"action": "XHCI_HCD_INIT", "type": "CALL_END"} */
     215             : 
     216           4 :  if (ldv_undef_int()) {
     217             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
     218           2 :   ldv_assume(ldv_6_ret_default != 0);
     219             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
     220             : 
     221             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     222             :   /* Skip a non-replicative signal receiving */
     223             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     224             : 
     225             :   /* Exit function at a terminal state */
     226           1 :   return;
     227             :  }
     228             :  else {
     229             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
     230           2 :   ldv_assume(ldv_6_ret_default == 0);
     231             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
     232             : 
     233           4 :   if (ldv_undef_int()) {
     234             :    /* LDV {"action": "DEFAULT_REGISTER_9", "type": "DISPATCH_BEGIN", "comment": "Register 'TIMER' callbacks with unknown registration function."} */
     235           2 :    ldv_dispatch_default_register_9_6_9();
     236             :    /* LDV {"action": "DEFAULT_REGISTER_9", "type": "DISPATCH_END"} */
     237             : 
     238             :    /* LDV {"action": "DEFAULT_REGISTER_6", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_HC_DRIVER' callbacks with unknown registration function."} */
     239           2 :    ldv_dispatch_default_register_6_6_8();
     240             :    /* LDV {"action": "DEFAULT_REGISTER_6", "type": "DISPATCH_END"} */
     241             : 
     242             :    /* LDV {"action": "DEFAULT_REGISTER_7", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_KERNEL_PARAM' callbacks with unknown registration function."} */
     243           2 :    ldv_dispatch_default_register_7_6_7();
     244             :    /* LDV {"action": "DEFAULT_REGISTER_7", "type": "DISPATCH_END"} */
     245             : 
     246             :    /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_KERNEL_PARAM' callbacks with unknown deregistration function."} */
     247           2 :    ldv_dispatch_default_deregister_7_6_6();
     248             :    /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "DISPATCH_END"} */
     249             : 
     250             :    /* LDV {"action": "DEFAULT_DEREGISTER_6", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_HC_DRIVER' callbacks with unknown deregistration function."} */
     251           2 :    ldv_dispatch_default_deregister_6_6_5();
     252             :    /* LDV {"action": "DEFAULT_DEREGISTER_6", "type": "DISPATCH_END"} */
     253             : 
     254             :    /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "DISPATCH_BEGIN", "comment": "Deregister 'TIMER' callbacks with unknown deregistration function."} */
     255           2 :    ldv_dispatch_default_deregister_9_6_4();
     256             :    /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "DISPATCH_END"} */
     257             : 
     258             :   }
     259             :   else {
     260             :    /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
     261             :    /* LDV {"action": "NONE", "type": "CONDITION_END"} */
     262             : 
     263             :   }
     264             :   /* LDV {"action": "XHCI_HCD_CLEANUP", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'xhci_hcd_cleanup' function. Invoke callback xhci_hcd_cleanup from ARTIFICIAL."} */
     265             :   /* LDV {"type": "CALLBACK", "call": "(xhci_hcd_cleanup)();", "comment": "xhci_hcd_cleanup"} */
     266           4 :   ldv_insmod_xhci_hcd_cleanup_6_2(ldv_6_xhci_hcd_cleanup_default);
     267             :   /* LDV {"action": "XHCI_HCD_CLEANUP", "type": "CALL_END"} */
     268             : 
     269             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     270             :   /* Skip a non-replicative signal receiving */
     271             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     272             : 
     273             :   /* Exit function at a terminal state */
     274           1 :   return;
     275             :  }
     276             :  /* End of the process */
     277             :  return;
     278             :  /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_6"} */
     279             : }
     280             : 
     281             : /* AUX_FUNC_CALLBACK ldv_insmod_xhci_hcd_cleanup_6_2 */
     282             : void ldv_insmod_xhci_hcd_cleanup_6_2(void (*arg0)(void)) {
     283           4 :  (xhci_hcd_cleanup)();
     284           2 : }
     285             : 
     286             : /* AUX_FUNC_CALLBACK ldv_insmod_xhci_hcd_init_6_13 */
     287             : int ldv_insmod_xhci_hcd_init_6_13(int (*arg0)(void)) {
     288           3 :  return (xhci_hcd_init)();
     289           1 : }
     290             : 
     291             : /* AUX_FUNC ldv_main_11 */
     292             : void ldv_main_11(void *arg0) {
     293             :  /* LDV {"thread": 11, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_11"} */
     294             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     295             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     296             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
     297           1 :  ldv_initialize();
     298             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     299             : 
     300             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
     301           2 :  ldv_dispatch_insmod_register_11_3();
     302             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
     303             : 
     304             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
     305           2 :  ldv_dispatch_insmod_deregister_11_2();
     306             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
     307             : 
     308             :  /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
     309           1 :  ldv_check_final_state();
     310           1 :  ldv_stop();
     311             :  /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
     312             : 
     313             :  /* Exit function at a terminal state */
     314           0 :  return;
     315             :  /* End of the process */
     316             :  return;
     317             :  /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_11"} */
     318             : }
     319             : 
     320             : /* AUX_FUNC_CALLBACK ldv_pci_scenario_resume_1_5 */
     321             : void ldv_pci_scenario_resume_1_5(int (*arg0)(struct pci_dev *), struct pci_dev *arg1) {
     322           2 :  (*arg0)(arg1);
     323           2 : }
     324             : 
     325             : /* AUX_FUNC_CALLBACK ldv_pci_scenario_resume_early_1_6 */
     326             : void ldv_pci_scenario_resume_early_1_6(int (*arg0)(struct pci_dev *), struct pci_dev *arg1) {
     327           1 :  (*arg0)(arg1);
     328           1 : }
     329             : 
     330             : /* AUX_FUNC_CALLBACK ldv_pci_scenario_suspend_1_8 */
     331             : int ldv_pci_scenario_suspend_1_8(int (*arg0)(struct pci_dev *, struct pm_message), struct pci_dev *arg1, struct pm_message arg2) {
     332           2 :  return (*arg0)(arg1, arg2);
     333             : }
     334           1 : 
     335             : /* AUX_FUNC_CALLBACK ldv_pci_scenario_suspend_late_1_7 */
     336             : int ldv_pci_scenario_suspend_late_1_7(int (*arg0)(struct pci_dev *, struct pm_message), struct pci_dev *arg1, struct pm_message arg2) {
     337           2 :  return (*arg0)(arg1, arg2);
     338             : }
     339           1 : 
     340             : /* AUX_FUNC ldv_random_containerless_scenario_3 */
     341             : void ldv_random_containerless_scenario_3(void *arg0) {
     342             :  /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_kernel_param)'", "function": "ldv_random_containerless_scenario_3"} */
     343           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     344           1 :  int (*ldv_3_callback_get)(char *, struct kernel_param *);
     345           1 :  int (*ldv_3_callback_set)(char *, struct kernel_param *);
     346           1 :  struct kernel_param *ldv_3_container_struct_kernel_param;
     347           1 :  char *ldv_3_ldv_param_10_0_default;
     348           1 :  char *ldv_3_ldv_param_4_0_default;
     349           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     350           1 :  /* LDV {"action": "DEFAULT_REGISTER_7", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     351           3 :  ldv_free(arg0);
     352           1 :  /* LDV {"action": "DEFAULT_REGISTER_7", "type": "RECEIVE_END"} */
     353             : 
     354             :  /* LDV {"action": "DEFAULT_ALLOC_7", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     355           3 :  ldv_3_container_struct_kernel_param = ldv_xmalloc_unknown_size(0);
     356             :  /* LDV {"action": "DEFAULT_ALLOC_7", "type": "CONDITION_END"} */
     357             : 
     358             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     359             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     360             : 
     361             :  /* Jump to a subprocess 'call' initial state */
     362           1 :  goto ldv_call_3;
     363             :  /* End of the process */
     364             :  return;
     365           1 : 
     366             :  /* Sbprocess call */
     367             :  ldv_call_3:
     368             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     369             : 
     370           4 :  if (ldv_undef_int()) {
     371             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     372           3 :   ldv_3_ldv_param_4_0_default = ldv_xmalloc_unknown_size(0);
     373             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
     374             : 
     375           4 :   if (ldv_undef_int()) {
     376             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     377           3 :    ldv_3_ldv_param_10_0_default = ldv_xmalloc_unknown_size(0);
     378             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
     379             : 
     380             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set from kernel_param."} */
     381             :    /* LDV {"type": "CALLBACK", "call": "((& param_set_int))(ldv_3_ldv_param_10_0_default, ldv_3_container_struct_kernel_param);", "comment": "callback"} */
     382           2 :    ldv_random_containerless_scenario_callback_3_10(ldv_3_callback_set, ldv_3_ldv_param_10_0_default, ldv_3_container_struct_kernel_param);
     383             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     384             : 
     385             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     386           2 :    ldv_free(ldv_3_ldv_param_10_0_default);
     387             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
     388             : 
     389             :   }
     390             :   else {
     391             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get from kernel_param."} */
     392             :    /* LDV {"type": "CALLBACK", "call": "((& param_get_int))(ldv_3_ldv_param_4_0_default, ldv_3_container_struct_kernel_param);", "comment": "callback"} */
     393           2 :    ldv_random_containerless_scenario_callback_3_4(ldv_3_callback_get, ldv_3_ldv_param_4_0_default, ldv_3_container_struct_kernel_param);
     394             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     395             : 
     396             :   }
     397             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     398           4 :   ldv_free(ldv_3_ldv_param_4_0_default);
     399             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     400             : 
     401             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     402             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     403             : 
     404             :   /* Jump to a subprocess 'call' initial state */
     405           1 :   goto ldv_call_3;
     406             :  }
     407             :  else {
     408             :   /* LDV {"action": "DEFAULT_FREE_7", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     409           2 :   ldv_free(ldv_3_container_struct_kernel_param);
     410             :   /* LDV {"action": "DEFAULT_FREE_7", "type": "CONDITION_END"} */
     411             : 
     412             :   /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     413             :   /* Skip a non-replicative signal receiving */
     414             :   /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "RECEIVE_END"} */
     415             : 
     416             :   /* Exit function at a terminal state */
     417           1 :   return;
     418             :  }
     419             :  /* End of the subprocess 'call' */
     420             :  return;
     421             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_kernel_param)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_3"} */
     422             : }
     423             : 
     424             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_3_10 */
     425             : void ldv_random_containerless_scenario_callback_3_10(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     426           1 :  ((& param_set_int))(arg1, arg2);
     427           1 : }
     428             : 
     429             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_3_4 */
     430             : void ldv_random_containerless_scenario_callback_3_4(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     431           1 :  ((& param_get_int))(arg1, arg2);
     432           1 : }
     433             : 
     434             : /* AUX_FUNC ldv_timer_scenario_4 */
     435             : void ldv_timer_scenario_4(void *arg0) {
     436             :  /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'timer_scenario(timer)'", "function": "ldv_timer_scenario_4"} */
     437           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     438           1 :  struct timer_list *ldv_4_container_timer_list;
     439             :  /* Received labels */
     440           1 :  struct ldv_struct_timer_scenario_4 *data = (struct ldv_struct_timer_scenario_4*) arg0;
     441             : 
     442             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     443             :  /* LDV {"action": "INSTANCE_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin TIMER callbacks invocations scenario."} */
     444             :  /* Assign recieved labels */
     445           2 :  if (data) {
     446           1 :   ldv_4_container_timer_list = data->arg0;
     447           2 :   ldv_free(data);
     448             :  }
     449             :  /* LDV {"action": "INSTANCE_REGISTER", "type": "RECEIVE_END"} */
     450             : 
     451             :  /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Time has come: call the timer callback. Invoke callback callback from TIMER."} */
     452             :  /* Callback pre-call */
     453           2 :  ldv_switch_to_interrupt_context();
     454           6 :  if (ldv_4_container_timer_list->function) {
     455             :  /* LDV {"type": "CALLBACK", "call": "(ldv_4_container_timer_list->function)(ldv_4_container_timer_list->data);", "comment": "callback"} */
     456           4 :   ldv_timer_scenario_callback_4_2(ldv_4_container_timer_list->function, ldv_4_container_timer_list->data);
     457             :  }
     458             :  /* Callback post-call */
     459           3 :  ldv_switch_to_process_context();
     460             :  /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     461             : 
     462             :  /* LDV {"action": "INSTANCE_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish TIMER callbacks invocations scenario."} */
     463             :  /* Skip a non-replicative signal receiving */
     464             :  /* LDV {"action": "INSTANCE_DEREGISTER", "type": "RECEIVE_END"} */
     465             : 
     466             :  /* Exit function at a terminal state */
     467           3 :  return;
     468             :  /* End of the process */
     469             :  return;
     470             :  /* LDV {"comment": "End of control function based on process 'timer_scenario(timer)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_timer_scenario_4"} */
     471             : }
     472             : 
     473             : /* AUX_FUNC_CALLBACK ldv_timer_scenario_callback_4_2 */
     474             : void ldv_timer_scenario_callback_4_2(void (*arg0)(unsigned long), unsigned long arg1) {
     475           4 :  (*arg0)(arg1);
     476           2 : }
     477             : 
     478             : /* AUX_FUNC main */
     479             : int main() {
     480           1 :  ldv_main_11(0);
     481           0 :  return 0;
     482             : }
     483             : 
     484             : 
     485             : /* AUX_FUNC  ERR_PTR */
     486             : static inline void *ERR_PTR (long int error)
     487             : {
     488             : 
     489             :  return ldv_err_ptr(error);
     490             : }
     491             : 
     492             : /* AUX_FUNC  PTR_ERR */
     493             : static inline long int PTR_ERR (void const *ptr)
     494             : {
     495             : 
     496             :  return ldv_ptr_err(ptr);
     497             : }
     498             : 
     499             : /* AUX_FUNC  IS_ERR */
     500             : static inline long int IS_ERR (void const *ptr)
     501             : {
     502             : 
     503             :  return ldv_is_err(ptr);
     504             : }
     505             : 
     506             : /* AUX_FUNC  IS_ERR_OR_NULL */
     507             : static inline long int IS_ERR_OR_NULL (void const *ptr)
     508             : {
     509             : 
     510             :  return ldv_is_err_or_null(ptr);
     511             : }
     512             : 
     513             : /* AUX_FUNC  ldv_del_timer_sync_5 */
     514             : int ldv_del_timer_sync_5 (struct timer_list *ldv_func_arg1)
     515             : {
     516             : 
     517             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer_sync'"} */
     518             :  return ldv_emg_del_timer_sync(ldv_func_arg1);
     519             : }
     520             : 
     521             : /* AUX_FUNC  ldv_del_timer_6 */
     522             : int ldv_del_timer_6 (struct timer_list *ldv_func_arg1)
     523             : {
     524             : 
     525             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer'"} */
     526             :  return ldv_emg_del_timer(ldv_func_arg1);
     527             : }
     528             : 
     529             : /* AUX_FUNC  kzalloc */
     530             : static inline void *kzalloc (size_t size, gfp_t flags)
     531             : {
     532             : 
     533             :  return ldv_kzalloc(size, flags);
     534             : }
     535             : 
     536             : /* AUX_FUNC  ldv_dev_get_drvdata_8 */
     537             : void *ldv_dev_get_drvdata_8 (struct device const *dev)
     538             : {
     539             : 
     540             :  return ldv_dev_get_drvdata(dev);
     541             : }
     542             : 
     543             : /* AUX_FUNC  ldv_dev_get_drvdata_9 */
     544             : void *ldv_dev_get_drvdata_9 (struct device const *dev)
     545             : {
     546             : 
     547             :  return ldv_dev_get_drvdata(dev);
     548             : }
     549             : 
     550             : /* AUX_FUNC  ldv_del_timer_sync_10 */
     551             : int ldv_del_timer_sync_10 (struct timer_list *ldv_func_arg1)
     552             : {
     553           1 : 
     554             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer_sync'"} */
     555           3 :  return ldv_emg_del_timer_sync(ldv_func_arg1);
     556             : }

Generated by: LCOV version 1.10