From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: <ath6kl-devel@qualcomm.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH 2/2] ath6kl: add blocking debugfs file for retrieving firmware logs
Date: Tue, 7 Feb 2012 15:29:35 +0530 [thread overview]
Message-ID: <20120207095933.GB5765@chvasanth-lnx> (raw)
In-Reply-To: <4F30122E.3060004@qca.qualcomm.com>
On Mon, Feb 06, 2012 at 07:47:26PM +0200, Kalle Valo wrote:
> > Are you not making sure that the
> > length of the data is not more than the requested one which is
> > passed to copy_to_user() so that read() is always called with
> > *ppos=0?. The following code seems to do that
>
> But the function is called multiple times with increasing values of
> *ppos as more data is returned to user space:
>
> [ 100.303747] ath6kl_fwlog_block_read(): *ppos 0
> [ 100.305252] ath6kl_fwlog_block_read(): *ppos 30116
> [ 101.768947] ath6kl_fwlog_block_read(): *ppos 31624
> [ 117.027469] ath6kl_fwlog_block_read(): *ppos 33124
> [ 117.090146] ath6kl_fwlog_block_read(): *ppos 34628
> [ 117.172338] ath6kl_fwlog_block_read(): *ppos 36128
>
> So I can't assume that *ppos = 0.
Right, unless we say we have no more data to pass
(when read() returns 0), *ppos would be keep on increasing
by the number of bytes copied to user space. Updating *ppos
just looks like a formality here though. But I'm also not
sure about doing it cleanly.
Vasanth
next prev parent reply other threads:[~2012-02-07 9:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 6:23 [PATCH 1/2] ath6kl: store firmware logs in skbuffs Kalle Valo
2012-02-06 6:23 ` [PATCH 2/2] ath6kl: add blocking debugfs file for retrieving firmware logs Kalle Valo
2012-02-06 9:06 ` Vasanthakumar Thiagarajan
2012-02-06 12:37 ` Kalle Valo
2012-02-06 15:05 ` Vasanthakumar Thiagarajan
2012-02-06 17:47 ` Kalle Valo
2012-02-07 9:59 ` Vasanthakumar Thiagarajan [this message]
2012-02-08 9:30 ` [PATCH 1/2] ath6kl: store firmware logs in skbuffs Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120207095933.GB5765@chvasanth-lnx \
--to=vthiagar@qca.qualcomm.com \
--cc=ath6kl-devel@qualcomm.com \
--cc=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.