ioctl.c: FIX: must take io_sem around ecrt_master_send/ecrt_master_receive

This commit is contained in:
till straumann 2021-10-14 10:20:52 +02:00
parent 34dcf04d4c
commit 5437ec4ef1
1 changed files with 4 additions and 0 deletions

View File

@ -1899,7 +1899,9 @@ static ATTRIBUTES int ec_ioctl_send(
return -EPERM;
}
down( & master->io_sem );
ecrt_master_send(master);
up( & master->io_sem );
return 0;
}
@ -1919,7 +1921,9 @@ static ATTRIBUTES int ec_ioctl_receive(
return -EPERM;
}
down( & master->io_sem );
ecrt_master_receive(master);
up( & master->io_sem );
return 0;
}