]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - net/core/dev.c
Merge tag 'drm/tegra/for-5.5-rc1-fixes' of git://anongit.freedesktop.org/tegra/linux...
[linux.git] / net / core / dev.c
index 96afd464284a9d1a46a5a0409a0d1832de80d394..99ac84ff398f42ff171d5882991724f2f4df11a4 100644 (file)
@@ -8421,7 +8421,8 @@ int dev_change_xdp_fd(struct net_device *dev, struct netlink_ext_ack *extack,
                        return -EINVAL;
                }
 
-               if (prog->aux->id == prog_id) {
+               /* prog->aux->id may be 0 for orphaned device-bound progs */
+               if (prog->aux->id && prog->aux->id == prog_id) {
                        bpf_prog_put(prog);
                        return 0;
                }