Re: mm: use down_read_killable for locking mmap_sem in access_remote_vm

2019-05-16 Thread Michal Koutný
On Wed, May 15, 2019 at 11:48:32AM +0300, Konstantin Khlebnikov wrote: > This function ignores any error like reading from unmapped area and > returns only size of successful transfer. It never returned any error codes. This is a point I missed. Hence no need to adjust consumers of __access_rem

Re: mm: use down_read_killable for locking mmap_sem in access_remote_vm

2019-05-15 Thread Matthew Wilcox
On Wed, May 15, 2019 at 10:38:26AM +0200, Michal Koutný wrote: > Hi, > making this holder of mmap_sem killable was for the reasons of /proc/... > diagnostics was an idea I was pondeering too. However, I think the > approach of pretending we read 0 bytes is not correct. The API would IMO > need to b

Re: mm: use down_read_killable for locking mmap_sem in access_remote_vm

2019-05-15 Thread Konstantin Khlebnikov
On 15.05.2019 11:38, Michal Koutný wrote: Hi, making this holder of mmap_sem killable was for the reasons of /proc/... diagnostics was an idea I was pondeering too. However, I think the approach of pretending we read 0 bytes is not correct. The API would IMO need to be extended to allow pass a re

Re: mm: use down_read_killable for locking mmap_sem in access_remote_vm

2019-05-15 Thread Michal Koutný
Hi, making this holder of mmap_sem killable was for the reasons of /proc/... diagnostics was an idea I was pondeering too. However, I think the approach of pretending we read 0 bytes is not correct. The API would IMO need to be extended to allow pass a result such as EINTR to the end caller. Why do