mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "J.A. Magallon" <jamagallon@able.es>
To: linux-kernel@vger.kernel.org
Cc: Takashi Iwai <tiwai@suse.de>
Subject: Re: 2.6.12-rc3-mm3: ALSA broken ?
Date: Fri, 27 May 2005 21:18:00 +0000	[thread overview]
Message-ID: <1117228680l.24619l.0l@werewolf.able.es> (raw)
In-Reply-To: <s5his15xaz2.wl@alsa2.suse.de> (from tiwai@suse.de on Fri May 27 11:41:05 2005)


On 05.27, Takashi Iwai wrote:
> At Thu, 26 May 2005 23:51:58 +0000,
> J.A. Magallon wrote:
> 
> > A side note. In the process of solving all this, I tried to generate a patch
> > for 1.0.9rc4a against -mm. I noticed some things:
> > - Your code reverts some in-kernel changes related to
> >     if (ptr)
> >         kfree(ptr)
> >   The if is killed in mainline, as kfree accepts null pointers.
> 
> Could you point which places?
> 

Oops, I think this is not ALSA specific code.
I took the directory alsa-kernel, in the alsa tarball, and diffed against
2.6.12-rc5-mm1:

--- /usr/src/linux-2.6.12-rc5-mm1/sound/core/seq/oss/seq_oss_synth.c    2005-05-27 00:25:37.000000000 +0200
+++ alsa-kernel/core/seq/oss/seq_oss_synth.c    2005-01-20 18:42:37.000000000 +0100
@@ -325,10 +325,14 @@
            }
            snd_use_lock_free(&rec->use_lock);
        }
-       kfree(info->sysex);
-       info->sysex = NULL;
-       kfree(info->ch);
-       info->ch = NULL;
+       if (info->sysex) {
+           kfree(info->sysex);
+           info->sysex = NULL;
+       }
+       if (info->ch) {
+           kfree(info->ch);
+           info->ch = NULL;
+       }
    }
    dp->synth_opened = 0;
    dp->max_synthdev = 0;
@@ -414,10 +418,14 @@
                      dp->file_mode) < 0) {
            midi_synth_dev.opened--;
            info->opened = 0;
-           kfree(info->sysex);
-           info->sysex = NULL;
-           kfree(info->ch);
-           info->ch = NULL;
+           if (info->sysex) {
+               kfree(info->sysex);
+               info->sysex = NULL;
+           }
+           if (info->ch) {
+               kfree(info->ch);
+               info->ch = NULL;
+           }
        }
        return;
    }

This looks like OSS code. Why does the tarball include OSS code ?
Which is the correct way to generate a patch against a kernel tree ?

--
J.A. Magallon <jamagallon()able!es>     \               Software is like sex:
werewolf!able!es                         \         It's better when it's free
Mandriva Linux release 2006.0 (Cooker) for i586
Linux 2.6.11-jam20 (gcc 4.0.0 (4.0.0-3mdk for Mandriva Linux release 2006.0))



  reply	other threads:[~2005-05-27 21:18 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-05  5:10 2.6.12-rc3-mm3 Andrew Morton
2005-05-05  7:08 ` 2.6.12-rc3-mm3 Richard A Nelson
2005-05-05 11:55 ` 2.6.12-rc3-mm3 Francois Romieu
2005-05-05 18:00   ` 2.6.12-rc3-mm3 Andrew Morton
2005-05-05 12:39 ` 2.6.12-rc3-mm3 Rafael J. Wysocki
2005-05-05 12:58 ` 2.6.12-rc3-mm3 Rafael J. Wysocki
2005-05-05 22:47   ` 2.6.12-rc3-mm3: Kernel BUG at "mm/slab.c":1219 Rafael J. Wysocki
2005-05-05 14:57 ` 2.6.12-rc3-mm3 Valdis.Kletnieks
2005-05-05 15:22   ` 2.6.12-rc3-mm3 Adrian Bunk
2005-05-05 15:49     ` 2.6.12-rc3-mm3 Valdis.Kletnieks
2005-05-05 16:44       ` 2.6.12-rc3-mm3 Adrian Bunk
2005-05-05 14:59 ` 2.6.12-rc3-mm3 Borislav Petkov
2005-05-08  0:07 ` 2.6.12-rc3-mm3: ALSA broken ? J.A. Magallon
2005-05-08 23:24   ` J.A. Magallon
2005-05-11 14:23     ` Takashi Iwai
2005-05-12 22:27       ` J.A. Magallon
2005-05-13  9:57         ` Takashi Iwai
2005-05-17 12:02           ` J.A. Magallon
2005-05-17 12:20             ` Takashi Iwai
2005-05-17 22:39               ` J.A. Magallon
2005-05-18 13:39                 ` Takashi Iwai
2005-05-26 23:51                   ` J.A. Magallon
2005-05-27  9:41                     ` Takashi Iwai
2005-05-27 21:18                       ` J.A. Magallon [this message]
2005-05-30 13:37                         ` Takashi Iwai
2005-05-30 14:30                           ` J.A. Magallon
2005-05-30 15:21                             ` Takashi Iwai
2005-05-30 17:58                           ` Takashi Iwai
2005-05-27 14:52                     ` Lee Revell
2005-05-28  0:11                       ` J.A. Magallon
2005-05-30 13:26                         ` Takashi Iwai
     [not found]     ` <20050526001828.0b3959f6.akpm@osdl.org>
2005-05-27  6:54       ` J.A. Magallon

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=1117228680l.24619l.0l@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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

Powered by JetHome