Re: [PATCH] cifs: do not fail __smb_send_rqst if non-fatal signals are pending

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



пн, 25 янв. 2021 г. в 09:07, Shyam Prasad N <nspmangalore@xxxxxxxxx>:
>
> From my readings so far, -ERESTARTSYS assumes that the syscall is idempotent.
> Can we safely make such assumptions for all VFS file operations? For
> example, what happens if a close gets restarted, and we already
> scheduled a delayed close because the original close failed with
> ERESTARTSYS?

I don't think we can assume all system calls to be idempotent. We
should probably examine them one-by-one and return -ERESTARTSYS for
some and -EINTR for the others.

>
> Also, I ran a quick grep for EINTR, and it looks like __cifs_readv and
> __cifs_writev return EINTR too. Should those be replaced by
> ERESTARTSYS too?
>

They return -EINTR after receiving a kill signal (see
wait_for_completion_killable around those lines). It doesn't seem
there is any point in returning -ERESTARTSYS after a kill signal
anyway, so, I think the code is correct there.

--
Best regards,
Pavel Shilovsky




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux