git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: yangerkun <yangerkun@huawei.com>
To: <git@vger.kernel.org>
Cc: <yangerkun@huawei.com>, "zhangyi (F)" <yi.zhang@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Ye Bin <yebin10@huawei.com>,
	Zhen Lei <thunder.leizhen@huawei.com>,
	Jason Yan <yanaijie@huawei.com>, Hou Tao <houtao1@huawei.com>
Subject: problem about 'git am --rej'
Date: Mon, 27 Jul 2020 19:50:53 +0800	[thread overview]
Message-ID: <ebec6423-20f9-d866-1d07-9e6c94ce845c@huawei.com> (raw)

Hi,

Trying 'git am --rej'(git version 2.25.4) to apply patch eead1c2ea250 
("netlabel: cope with NULL catmap") with linux stable branch 
4.4.y(git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git), 
it seems the patch has been applied with wrong function(should be 
cipso_v4_parsetag_rbm or cipso_v4_parsetag_rng, but 
cipso_v4_parsetag_enum). Does this a bug or a expected result?




[xxx@code-website linux-stable]$ git am 
0001-netlabel-cope-with-NULL-catmap.patch --rej
Applying: netlabel: cope with NULL catmap
Checking patch net/ipv4/cipso_ipv4.c...
Hunk #1 succeeded at 1435 (offset 177 lines).
error: while searching for:
                         return ret_val;
                 }

                 secattr->flags |= NETLBL_SECATTR_MLS_CAT;
         }

         return 0;

error: patch failed: net/ipv4/cipso_ipv4.c:1439
Checking patch net/ipv6/calipso.c...
error: net/ipv6/calipso.c: does not exist in index
Checking patch net/netlabel/netlabel_kapi.c...
error: while searching for:
         if ((off & (BITS_PER_LONG - 1)) != 0)
                 return -EINVAL;

         if (off < catmap->startbit) {
                 off = catmap->startbit;
                 *offset = off;

error: patch failed: net/netlabel/netlabel_kapi.c:734
Applying patch net/ipv4/cipso_ipv4.c with 1 reject...
Hunk #1 applied cleanly.
Rejected hunk #2.
Applying patch net/netlabel/netlabel_kapi.c with 1 reject...
Rejected hunk #1.
Patch failed at 0001 netlabel: cope with NULL catmap
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
[xxx@code-website linux-stable]$ git diff
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index 0e83c5b08e0e..375733b96bdf 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -1435,7 +1435,8 @@ static int cipso_v4_parsetag_enum(const struct 
cipso_v4_doi *doi_def,
                         return ret_val;
                 }

-               secattr->flags |= NETLBL_SECATTR_MLS_CAT;
+               if (secattr->attr.mls.cat)
+                       secattr->flags |= NETLBL_SECATTR_MLS_CAT;
         }

         return 0;



             reply	other threads:[~2020-07-27 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 11:50 yangerkun [this message]
2020-07-27 12:05 ` problem about 'git am --rej' yangerkun

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebec6423-20f9-d866-1d07-9e6c94ce845c@huawei.com \
    --to=yangerkun@huawei.com \
    --cc=git@vger.kernel.org \
    --cc=houtao1@huawei.com \
    --cc=thunder.leizhen@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yanaijie@huawei.com \
    --cc=yebin10@huawei.com \
    --cc=yi.zhang@huawei.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).