diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-26 18:36:51 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-26 18:36:51 (GMT) |
commit | f19e6c69390251efa549ff07c863e09b94b81537 (patch) | |
tree | 3aebd43b979f9ae4ee7bea2856c6a5876173475e /drivers/staging/android/logger.c | |
parent | 05e4cb7c25c1ac35a6a61c79ad40cf69dd3538bf (diff) | |
parent | 81b884c9dfe6753a78df0cbf4e96f095d718bd95 (diff) | |
download | linux-fsl-qoriq-f19e6c69390251efa549ff07c863e09b94b81537.tar.xz |
Merge tag 'staging-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging fixes from Greg KH:
"Here are some tiny drivers/staging/ fixes for 3.11-rc3
A number of bugfixes, all pretty tiny, but resolve issues that have
been reported (the kstrtos32 change fixes a data corruption problem
that Dan found). And a MAINTAINERS file update for the comedi
drivers"
* tag 'staging-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
MAINTAINERS: Update the list of maintainers for staging/comedi driver.
staging: tidspbridge: replace strict_strtol() with kstrtos32()
staging: android: logger: Correct write offset reset on error
staging: zram: protect zram_reset_device() call
staging: gdm72xx: potential use after free in send_qos_list()
staging: drm/imx: drop "select OF_VIDEOMODE"
staging: frontier: use after free in disconnect()
staging: comedi: fix a race between do_cmd_ioctl() and read/write
staging: comedi: COMEDI_CANCEL ioctl should wake up read/write
Diffstat (limited to 'drivers/staging/android/logger.c')
-rw-r--r-- | drivers/staging/android/logger.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c index 080abf2..a8c3444 100644 --- a/drivers/staging/android/logger.c +++ b/drivers/staging/android/logger.c @@ -469,7 +469,7 @@ static ssize_t logger_aio_write(struct kiocb *iocb, const struct iovec *iov, unsigned long nr_segs, loff_t ppos) { struct logger_log *log = file_get_log(iocb->ki_filp); - size_t orig = log->w_off; + size_t orig; struct logger_entry header; struct timespec now; ssize_t ret = 0; @@ -490,6 +490,8 @@ static ssize_t logger_aio_write(struct kiocb *iocb, const struct iovec *iov, mutex_lock(&log->mutex); + orig = log->w_off; + /* * Fix up any readers, pulling them forward to the first readable * entry after (what will be) the new write offset. We do this now |