From: newell.roger@gmail.com (Roger H Newell)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Possible Bug
Date: Thu, 31 Mar 2016 14:59:51 -0230 [thread overview]
Message-ID: <CAEE9rjZx2DvGfXQq0et05CZHkBScyMkm9D-FnWEoROQh4_ZeBA@mail.gmail.com> (raw)
In-Reply-To: <56FD5358.5010101@gmail.com>
On Thu, Mar 31, 2016 at 2:12 PM, nick <xerofoify@gmail.com> wrote:
>
>
> On 2016-03-31 12:30 PM, Carlo Caione wrote:
>> On Thu, Mar 31, 2016 at 5:08 PM, Roger H Newell <newell.roger@gmail.com> wrote:
>>> On Thu, Mar 31, 2016 at 12:18 PM, nick <xerofoify@gmail.com> wrote:
>>>>
>>>>
>>>> On 2016-03-31 08:34 AM, Roger H Newell wrote:
>>>> In the fs/file_table.c file as from the root directory of your kernel tree change in the function,
>>>> get_empty_flip change these lines:
>>>> if (unlikely(error)) {
>>>> file_free(f);
>>>> return ERR_PTR(error);
>>>> }
>>>> to:
>>>> if (unlikely(error))
>>>> return ERR_PTR(error);
>>>> and tell me if that fixes your issue.
>>>> Nick
>>>
>>>
>>> Seems to have worked, the error is is gone and I can mount the USB device.
>>
>> That's not a fix, you are leaking f.
>>
> Good catch seems:
> static inline void file_free(struct file *f)
> {
> percpu_counter_dec(&nr_files);
> if (f)
> call_rcu(&f->f_u.fu_rcuhead, file_free_rcu);
> }
> Roger can you tell this and see if it fixes your issue. The file
> is fs/file_table.c from the root of the kernel directory.
> Thanks,
> Nick
I reverted the previous change, and applied the if(f) test in
file_free. There are no error messages in dmseg and I can mount the
USB device.
next prev parent reply other threads:[~2016-03-31 17:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 12:34 Possible Bug Roger H Newell
2016-03-31 14:37 ` Valdis.Kletnieks at vt.edu
[not found] ` <56FD5089.5070302@canonical.com>
2016-03-31 17:52 ` Valdis.Kletnieks at vt.edu
2016-03-31 18:16 ` Roger H Newell
2016-03-31 19:23 ` Valdis.Kletnieks at vt.edu
2016-03-31 20:22 ` Roger H Newell
[not found] ` <56FDD8D9.9010408@gmail.com>
2016-04-01 13:00 ` Roger H Newell
[not found] ` <56FD38C4.8030201@gmail.com>
2016-03-31 15:08 ` Roger H Newell
[not found] ` <56FD4C35.5040301@gmail.com>
2016-03-31 16:25 ` Roger H Newell
2016-03-31 17:22 ` Valdis.Kletnieks at vt.edu
2016-03-31 16:30 ` Carlo Caione
[not found] ` <56FD5358.5010101@gmail.com>
2016-03-31 17:29 ` Roger H Newell [this message]
2016-03-31 18:42 ` Valdis.Kletnieks at vt.edu
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=CAEE9rjZx2DvGfXQq0et05CZHkBScyMkm9D-FnWEoROQh4_ZeBA@mail.gmail.com \
--to=newell.roger@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).