--- linux-4.9.37/drivers/usb/gadget/function/u_uac1.c 2017-07-12 16:42:41.000000000 +0300 +++ linux-4.9.y/drivers/usb/gadget/function/u_uac1.c 2021-06-07 13:01:34.000000000 +0300 @@ -157,7 +157,6 @@ struct gaudio_snd_dev *snd = &card->playback; struct snd_pcm_substream *substream = snd->substream; struct snd_pcm_runtime *runtime = substream->runtime; - mm_segment_t old_fs; ssize_t result; snd_pcm_sframes_t frames; @@ -174,15 +173,11 @@ } frames = bytes_to_frames(runtime, count); - old_fs = get_fs(); - set_fs(KERNEL_DS); - result = snd_pcm_lib_write(snd->substream, (void __user *)buf, frames); + result = snd_pcm_kernel_write(snd->substream, buf, frames); if (result != frames) { ERROR(card, "Playback error: %d\n", (int)result); - set_fs(old_fs); goto try_again; } - set_fs(old_fs); return 0; }