From: Arjan van de Ven <arjan@infradead.org>
To: zhiyi huang <hzy@cs.otago.ac.nz>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>, linux-kernel@vger.kernel.org
Subject: Re: Slab corruption after unloading a module
Date: Tue, 18 Apr 2006 00:09:20 +0200 [thread overview]
Message-ID: <1145311760.2847.97.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <F77F3A5F-D618-4F7F-A266-14391E5DD739@cs.otago.ac.nz>
On Tue, 2006-04-18 at 10:08 +1200, zhiyi huang wrote:
> >
> >> There was no problem if I just load and unload the module. But if I
> >> write to the device using "ls > /dev/temp" and then unload the
> >> module, I would get slab corruption.
> >
> > you return different value as what has really been consumed:
> >
> >> if (*f_pos + count > MAX_DSIZE)
> >> count1 = MAX_DSIZE - *f_pos;
> >>
> >> if (copy_from_user (temp_dev->data+*f_pos, buf, count1)) {
this is still buggy.. what if f_pos is huge???
next prev parent reply other threads:[~2006-04-17 22:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-16 10:43 Andrey Borzenkov
2006-04-17 22:08 ` zhiyi huang
2006-04-17 22:09 ` Arjan van de Ven [this message]
2006-04-17 22:23 ` zhiyi huang
-- strict thread matches above, loose matches on Subject: below --
2006-04-12 23:04 Zhiyi Huang
2006-04-12 23:30 ` Randy.Dunlap
2006-04-16 4:21 ` Randy.Dunlap
2006-04-16 9:38 ` zhiyi huang
2006-04-17 2:17 ` Randy.Dunlap
2006-04-17 2:55 ` Randy.Dunlap
2006-04-17 21:49 ` zhiyi huang
2006-04-18 5:01 ` Randy.Dunlap
2006-04-12 0:37 Zhiyi Huang
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=1145311760.2847.97.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=arvidjaar@mail.ru \
--cc=hzy@cs.otago.ac.nz \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®