[PATCH v10 0/7] Introduce sendpage_ok() to detect misused sendpage in network related drivers

2020-10-02 Thread Coly Li
As Sagi Grimberg suggested, the original fix is refind to a more common inline routine: static inline bool sendpage_ok(struct page *page) { return (!PageSlab(page) && page_count(page) >= 1); } If sendpage_ok() returns true, the checking page can be handled by the concrete zero-

Re: [PATCH v10 0/7] Introduce sendpage_ok() to detect misused sendpage in network related drivers

2020-10-02 Thread David Miller
From: Coly Li Date: Fri, 2 Oct 2020 16:27:27 +0800 > As Sagi Grimberg suggested, the original fix is refind to a more common > inline routine: > static inline bool sendpage_ok(struct page *page) > { > return (!PageSlab(page) && page_count(page) >= 1); > } > If sendpage_ok()

Re: [PATCH v10 0/7] Introduce sendpage_ok() to detect misused sendpage in network related drivers

2020-10-03 Thread Coly Li
On 2020/10/3 06:28, David Miller wrote: > From: Coly Li > Date: Fri, 2 Oct 2020 16:27:27 +0800 > >> As Sagi Grimberg suggested, the original fix is refind to a more common >> inline routine: >> static inline bool sendpage_ok(struct page *page) >> { >> return (!PageSlab(page) &&