Hi all,
Today's linux-next merge of the hyperv tree got a conflict in:
drivers/net/hyperv/netvsc.c
between commit:
e9268a943998 ("hv_netvsc: Use bitmap_zalloc() when applicable")
from the net-next tree and commit:
63cd06c67a2f ("net: netvsc: Add Isolation VM support for netvsc driver")
from the hyperv tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/net/hyperv/netvsc.c
index 5086cd07d1ed,ea2d867121d5..000000000000
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@@ -153,9 -153,22 +153,22 @@@ static void free_netvsc_device(struct r
int i;
kfree(nvdev->extension);
- vfree(nvdev->recv_buf);
- vfree(nvdev->send_buf);
+
+ if (nvdev->recv_original_buf) {
+ hv_unmap_memory(nvdev->recv_buf);
+ vfree(nvdev->recv_original_buf);
+ } else {
+ vfree(nvdev->recv_buf);
+ }
+
+ if (nvdev->send_original_buf) {
+ hv_unmap_memory(nvdev->send_buf);
+ vfree(nvdev->send_original_buf);
+ } else {
+ vfree(nvdev->send_buf);
+ }
+
- kfree(nvdev->send_section_map);
+ bitmap_free(nvdev->send_section_map);
for (i = 0; i < VRSS_CHANNEL_MAX; i++) {
xdp_rxq_info_unreg(&nvdev->chan_table[i].xdp_rxq);
@@@ -336,7 -349,9 +349,8 @@@ static int netvsc_init_buf(struct hv_de
struct net_device *ndev = hv_get_drvdata(device);
struct nvsp_message *init_packet;
unsigned int buf_size;
- size_t map_words;
int i, ret = 0;
+ void *vaddr;
/* Get receive buffer area. */
buf_size = device_info->recv_sections * device_info->recv_section_size;
On Mon, Dec 20, 2021 at 06:51:39PM +1100, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the hyperv tree got a conflict in:
>
> drivers/net/hyperv/netvsc.c
>
> between commit:
>
> e9268a943998 ("hv_netvsc: Use bitmap_zalloc() when applicable")
>
> from the net-next tree and commit:
>
> 63cd06c67a2f ("net: netvsc: Add Isolation VM support for netvsc driver")
>
> from the hyperv tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
The fix looks correct to me. Thanks.
Wei.