FADV_DEACTIVATE advises kernel to move file pages from active to
inactive list.
https://jira.sw.ru/browse/PSBM-57915
Signed-off-by: Andrey Ryabinin
---
include/uapi/linux/fadvise.h | 1 +
mm/fadvise.c | 43 +++
2 files changed, 44 inserti
When skb_copy_datagram_iovec called to fetch queued data
it may fail with EFAULT and if MSG_PEEK set by a caller
the position get advanced even if data hasn't been read.
So we might loose data bits here on subsequent recvmsg
calls. Instead lets exit early with error.
In sake of https://jira.sw.ru/
On Thu, Dec 22, 2016 at 06:41:42PM +0300, Cyrill Gorcunov wrote:
> When skb_copy_datagram_iovec called to fetch queued data
> it may fail with EFAULT and if MSG_PEEK set by a caller
> the position get advanced even if data hasn't been read.
> So we might loose data bits here on subsequent recvmsg
>
On Thu, Dec 22, 2016 at 03:34:15PM -0800, Andrey Vagin wrote:
> On Thu, Dec 22, 2016 at 06:41:42PM +0300, Cyrill Gorcunov wrote:
> > When skb_copy_datagram_iovec called to fetch queued data
> > it may fail with EFAULT and if MSG_PEEK set by a caller
> > the position get advanced even if data hasn't
On Thu, Dec 22, 2016 at 04:12:13PM -0800, Andrey Vagin wrote:
> On Thu, Dec 22, 2016 at 03:34:15PM -0800, Andrey Vagin wrote:
> > On Thu, Dec 22, 2016 at 06:41:42PM +0300, Cyrill Gorcunov wrote:
> > > When skb_copy_datagram_iovec called to fetch queued data
> > > it may fail with EFAULT and if MSG_
On Thu, Dec 22, 2016 at 04:45:10PM -0800, Andrey Vagin wrote:
>
> Actually, this patch breaks the old behaviour even when MSG_PEEK isn't set.
>
> I was thinking a bit more and I don't understand why it is a problem. If
> we can't fill a buffer, an error will be returned and a user will be able
>
On Fri, Dec 23, 2016 at 09:59:28AM +0300, Cyrill Gorcunov wrote:
> On Thu, Dec 22, 2016 at 04:45:10PM -0800, Andrey Vagin wrote:
> >
> > Actually, this patch breaks the old behaviour even when MSG_PEEK isn't set.
> >
> > I was thinking a bit more and I don't understand why it is a problem. If
> >