Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1348058
| From | Matthew Wilcox <willy@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dax: check return value of dax_radix_entry() |
| Date | 2016-03-02 15:10 +0100 |
| Message-ID | <r8fDs-gr-25@gated-at.bofh.it> (permalink) |
| References | <r80O6-6VE-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Mar 01, 2016 at 03:15:08PM -0700, Ross Zwisler wrote: > dax_pfn_mkwrite() previously wasn't checking the return value of the call > to dax_radix_entry(), which was a mistake. > > Instead, capture this return value and pass it up the stack if it is an > error. > */ > - dax_radix_entry(file->f_mapping, vmf->pgoff, NO_SECTOR, false, true); > + error = dax_radix_entry(file->f_mapping, vmf->pgoff, NO_SECTOR, false, > + true); > + if (error) > + return error; > + > return VM_FAULT_NOPAGE; You can't return an errno from here. if (error) return VM_FAULT_SIGBUS; is better. For full points, if (error == -ENOMEM) return VM_FAULT_OOM; if (error) return VM_FAULT_SIGBUS; return VM_FAULT_NOPAGE;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] dax: check return value of dax_radix_entry() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-03-01 23:20 +0100
Re: [PATCH] dax: check return value of dax_radix_entry() Matthew Wilcox <willy@linux.intel.com> - 2016-03-02 15:10 +0100
Re: [PATCH] dax: check return value of dax_radix_entry() Ross Zwisler <ross.zwisler@linux.intel.com> - 2016-03-02 17:40 +0100
csiph-web