Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1336015
| From | Al Viro <viro@ZenIV.linux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/7] drivers: char: mem: fix IS_ERROR_VALUE usage |
| Date | 2016-02-17 03:40 +0100 |
| Message-ID | <r30c2-8ce-13@gated-at.bofh.it> (permalink) |
| References | <r2stH-2fA-9@gated-at.bofh.it> <r2stH-2fA-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Feb 15, 2016 at 03:35:21PM +0100, Andrzej Hajda wrote:
> diff --git a/drivers/char/mem.c b/drivers/char/mem.c
> index 4f6f94c..71025c2 100644
> --- a/drivers/char/mem.c
> +++ b/drivers/char/mem.c
> @@ -695,7 +695,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
> offset += file->f_pos;
> case SEEK_SET:
> /* to avoid userland mistaking f_pos=-9 as -EBADF=-9 */
> - if (IS_ERR_VALUE((unsigned long long)offset)) {
> + if ((unsigned long long)offset >= -MAX_ERRNO) {
> ret = -EOVERFLOW;
> break;
> }
ACK
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 3/7] drivers: char: mem: fix IS_ERROR_VALUE usage Andrzej Hajda <a.hajda@samsung.com> - 2016-02-15 15:40 +0100 Re: [PATCH 3/7] drivers: char: mem: fix IS_ERROR_VALUE usage Al Viro <viro@ZenIV.linux.org.uk> - 2016-02-17 03:40 +0100
csiph-web