[openEuler-5.10-LTS 364/501] tty: n_gsm: fix race condition in gsmld_write()