login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
6
Re: [PATCH] /dev/mem: Allow rewinding
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: =?UTF-8?Q?Am=C3=A9rico_Wang?=
Subject:
Re: [PATCH] /dev/mem: Allow rewinding
Date: Monday, April 5, 2010 - 11:24 pm
On Tue, Apr 6, 2010 at 1:43 PM, Wu Fengguang <fengguang.wu@intel.com> wrote:
quoted text
> On Tue, Apr 06, 2010 at 01:30:29PM +0800, Américo Wang wrote: >> On Tue, Apr 6, 2010 at 5:19 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote: >> > Le lundi 05 avril 2010 à 23:04 +0200, Eric Dumazet a écrit : >> >> Andrew, commit dcefafb6ac90ece8d68a6c203105f3d313e52da4 seems to be the >> >> problem. >> >> >> >> It breaks rewinds (negative offsets to lseek (... SEEK_CUR)) >> >> >> > >> > Here is a patch to make rewind working again on /dev/mem >> > >> > [PATCH] /dev/mem: Allow rewinding >> > >> > commit dcefafb6 (/dev/mem: dont allow seek to last page) >> > inadvertently disabled rewinding on /dev/mem. >> > >> > This broke x86info for example. >> > >> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> >> > --- >> > diff --git a/drivers/char/mem.c b/drivers/char/mem.c >> > index 1f3215a..3973a1d 100644 >> > --- a/drivers/char/mem.c >> > +++ b/drivers/char/mem.c >> > @@ -710,11 +710,6 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig) >> > switch (orig) { >> > case SEEK_CUR: >> > offset += file->f_pos; >> > - if ((unsigned long long)offset < >> > - (unsigned long long)file->f_pos) { >> > - ret = -EOVERFLOW; >> > - break; >> > - } >> >> Why completely dropping the overflow check? What you need to do is just >> adding the 'offset < 0' case check. > > It will fall through to the next EOVERFLOW check in the SEEK_SET case :) >
Oh, right, I didn't read the code, merely the patch. Thanks. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[BUG] x86info fails on 2.6.34 ?
, Eric Dumazet
, (Mon Apr 5, 1:24 pm)
Re: [BUG] x86info fails on 2.6.34 ?
, Eric Dumazet
, (Mon Apr 5, 2:04 pm)
[PATCH] /dev/mem: Allow rewinding
, Eric Dumazet
, (Mon Apr 5, 2:19 pm)
Re: [PATCH] /dev/mem: Allow rewinding
, Wu Fengguang
, (Mon Apr 5, 10:15 pm)
Re: [PATCH] /dev/mem: Allow rewinding
, =?UTF-8?Q?Am=C3=A9ri ...
, (Mon Apr 5, 10:30 pm)
Re: [PATCH] /dev/mem: Allow rewinding
, Wu Fengguang
, (Mon Apr 5, 10:43 pm)
Re: [PATCH] /dev/mem: Allow rewinding
, Eric Dumazet
, (Mon Apr 5, 11:21 pm)
Re: [PATCH] /dev/mem: Allow rewinding
, =?UTF-8?Q?Am=C3=A9ri ...
, (Mon Apr 5, 11:24 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Jan Engelhardt
Re: [PATCH] Allow Kconfig to set default mmap_min_addr protection
Dmitry Torokhov
Re: [2.6 patch] input/serio/hp_sdc.c section fix
Rafael J. Wysocki
[Bug #16380] Loop devices act strangely in 2.6.35
git
:
Steven Grimm
Using git as a general backup mechanism (was Re: Using GIT to store /etc)
Jeff King
Re: [PATCH] git-reset: allow --soft in a bare repo
Johannes Sixt
Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
Johannes Schindelin
Re: [PATCH] Uninstall rule for top level Makefile
Shawn O. Pearce
Re: [PATCH v2] Speed up bash completion loading
git-commits-head
:
Linux Kernel Mailing List
cgroups: clean up cgroup_pidlist_find() a bit
Linux Kernel Mailing List
sony-laptop: Add support for extended hotkeys
Linux Kernel Mailing List
IB/core: Add support for masked atomic operations
Linux Kernel Mailing List
V4L/DVB (8939): cx18: fix sparse warnings
Linux Kernel Mailing List
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
linux-netdev
:
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Karsten Keil
[mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send()
linux
Re: 2.6.23-rc8 network problem. Mem leak? ip1000a?
David Miller
Re: tun: Use netif_receive_skb instead of netif_rx
David Miller
Re: [net-next PATCH v2] llc enhancements
freebsd-current
:
Matthew Fleming
Re: [RFC] Outline of USB process integration in the kernel taskqueue system
illoai@gmail.com
Re: OT: 2d password
Hartmut Brandt
Re: problem with nss_ldap
Andrew Reilly
Re: FreeBSD's problems as seen by the BSDForen.de community
Max Laier
Re: Upcoming ABI Breakage in RELENG_7
Colocation donated by:
Syndicate