From: Andrey Borzenkov <arvidjaar@mail.ru>
To: zhiyi huang <hzy@cs.otago.ac.nz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Slab corruption after unloading a module
Date: Sun, 16 Apr 2006 14:43:20 +0400 [thread overview]
Message-ID: <200604161443.21653.arvidjaar@mail.ru> (raw)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> 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)) {
> rv = -EFAULT;
> goto wrap_up;
> }
> up (&temp_dev->sem);
> *f_pos += count1;
> return count;
may be it confuses the rest of kernel a bit?
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
iD8DBQFEQh/JR6LMutpd94wRAgn/AKCapb6QcSSeHn1X7qD1TxLBs2OCSACgnGg7
o7fTn3l6DTnLEr5EwqL7hjk=
=bHLf
-----END PGP SIGNATURE-----
next reply other threads:[~2006-04-16 10:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-16 10:43 Andrey Borzenkov [this message]
2006-04-17 22:08 ` zhiyi huang
2006-04-17 22:09 ` Arjan van de Ven
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=200604161443.21653.arvidjaar@mail.ru \
--to=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®