| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/08/01 00:03 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch is a pure refactoring that removes the redundant `dev` pointer from `struct ppp` and replaces it with `netdev_from_priv(ppp)`. Since `struct ppp` is allocated as the private data of `struct net_device`, this does not change any functional logic or execution flow.",
"WorthFuzzing": false
} |
| 1/1 | 2026/08/01 00:03 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 6a2ec7a3d413cb5c0d20e7ee425f0693b25af030\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Sat Aug 1 00:03:35 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c\nindex 08bb89765487f..e1013621eb1d9 100644\n--- a/drivers/net/ppp/ppp_generic.c\n+++ b/drivers/net/ppp/ppp_generic.c\n@@ -139,7 +139,6 @@ struct ppp {\n \tvoid\t\t*rc_state;\t/* its internal state 98 */\n \tunsigned long\tlast_xmit;\t/* jiffies when last pkt sent 9c */\n \tunsigned long\tlast_recv;\t/* jiffies when last pkt rcvd a0 */\n-\tstruct net_device *dev;\t\t/* network interface device a4 */\n \tint\t\tclosing;\t/* is device closing down? a8 */\n #ifdef CONFIG_PPP_MULTILINK\n \tint\t\tnxchan;\t\t/* next channel to send something on */\n@@ -412,7 +411,7 @@ static int ppp_release(struct inode *unused, struct file *file)\n \t\t\tppp = PF_TO_PPP(pf);\n \t\t\trtnl_lock();\n \t\t\tif (file == ppp-\u003eowner)\n-\t\t\t\tunregister_netdevice(ppp-\u003edev);\n+\t\t\t\tunregister_netdevice(netdev_from_priv(ppp));\n \t\t\trtnl_unlock();\n \t\t\tppp_release_interface(ppp);\n \t\t\tbreak;\n@@ -921,7 +920,7 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)\n \t\t} else {\n \t\t\tWRITE_ONCE(ppp-\u003enpmode[i], npi.mode);\n \t\t\t/* we may be able to transmit more packets now (??) */\n-\t\t\tnetif_wake_queue(ppp-\u003edev);\n+\t\t\tnetif_wake_queue(netdev_from_priv(ppp));\n \t\t}\n \t\terr = 0;\n \t\tbreak;\n@@ -1147,7 +1146,7 @@ static __net_exit void ppp_exit_rtnl_net(struct net *net,\n \tint id;\n \n \tidr_for_each_entry(\u0026pn-\u003eunits_idr, ppp, id)\n-\t\tppp_nl_dellink(ppp-\u003edev, dev_to_kill);\n+\t\tppp_nl_dellink(netdev_from_priv(ppp), dev_to_kill);\n }\n \n static __net_exit void ppp_exit_net(struct net *net)\n@@ -1170,6 +1169,7 @@ static struct pernet_operations ppp_net_ops = {\n \n static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n \tstruct ppp_net *pn = ppp_pernet(ppp-\u003eppp_net);\n \tint ret;\n \n@@ -1181,8 +1181,8 @@ static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)\n \t\t\tgoto err;\n \t\tif (!ifname_is_set) {\n \t\t\twhile (1) {\n-\t\t\t\tsnprintf(ppp-\u003edev-\u003ename, IFNAMSIZ, \"ppp%i\", ret);\n-\t\t\t\tif (!netdev_name_in_use(ppp-\u003eppp_net, ppp-\u003edev-\u003ename))\n+\t\t\t\tsnprintf(dev-\u003ename, IFNAMSIZ, \"ppp%i\", ret);\n+\t\t\t\tif (!netdev_name_in_use(ppp-\u003eppp_net, dev-\u003ename))\n \t\t\t\t\tbreak;\n \t\t\t\tunit_put(\u0026pn-\u003eunits_idr, ret);\n \t\t\t\tret = unit_get(\u0026pn-\u003eunits_idr, ppp, ret + 1);\n@@ -1210,11 +1210,11 @@ static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)\n \tppp-\u003efile.index = ret;\n \n \tif (!ifname_is_set)\n-\t\tsnprintf(ppp-\u003edev-\u003ename, IFNAMSIZ, \"ppp%i\", ppp-\u003efile.index);\n+\t\tsnprintf(dev-\u003ename, IFNAMSIZ, \"ppp%i\", ppp-\u003efile.index);\n \n \tmutex_unlock(\u0026pn-\u003eall_ppp_mutex);\n \n-\tret = register_netdevice(ppp-\u003edev);\n+\tret = register_netdevice(dev);\n \tif (ret \u003c 0)\n \t\tgoto err_unit;\n \n@@ -1239,7 +1239,6 @@ static int ppp_dev_configure(struct net *src_net, struct net_device *dev,\n \tint err;\n \tint cpu;\n \n-\tppp-\u003edev = dev;\n \tppp-\u003eppp_net = src_net;\n \tppp-\u003emru = PPP_MRU;\n \tppp-\u003eowner = conf-\u003efile;\n@@ -1658,7 +1657,7 @@ static void ppp_xmit_flush(struct ppp *ppp)\n \t/* If there's no work left to do, tell the core net code that we can\n \t * accept some more.\n \t */\n-\tnetif_wake_queue(ppp-\u003edev);\n+\tnetif_wake_queue(netdev_from_priv(ppp));\n }\n \n static void __ppp_xmit_process(struct ppp *ppp, struct sk_buff *skb)\n@@ -1674,7 +1673,7 @@ static void __ppp_xmit_process(struct ppp *ppp, struct sk_buff *skb)\n \tif (likely(skb_queue_empty(\u0026ppp-\u003efile.xq))) {\n \t\tif (unlikely(!ppp_push(ppp, skb))) {\n \t\t\tskb_queue_tail(\u0026ppp-\u003efile.xq, skb);\n-\t\t\tnetif_stop_queue(ppp-\u003edev);\n+\t\t\tnetif_stop_queue(netdev_from_priv(ppp));\n \t\t}\n \t\tgoto out;\n \t}\n@@ -1712,17 +1711,18 @@ static void ppp_xmit_process(struct ppp *ppp, struct sk_buff *skb)\n \tkfree_skb(skb);\n \n \tif (net_ratelimit())\n-\t\tnetdev_err(ppp-\u003edev, \"recursion detected\\n\");\n+\t\tnetdev_err(netdev_from_priv(ppp), \"recursion detected\\n\");\n }\n \n static inline struct sk_buff *\n pad_compress_skb(struct ppp *ppp, struct sk_buff *skb)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n \tstruct sk_buff *new_skb;\n \tint len;\n-\tint new_skb_size = ppp-\u003edev-\u003emtu +\n-\t\tppp-\u003excomp-\u003ecomp_extra + ppp-\u003edev-\u003ehard_header_len;\n-\tint compressor_skb_size = ppp-\u003edev-\u003emtu +\n+\tint new_skb_size = dev-\u003emtu +\n+\t\tppp-\u003excomp-\u003ecomp_extra + dev-\u003ehard_header_len;\n+\tint compressor_skb_size = dev-\u003emtu +\n \t\tppp-\u003excomp-\u003ecomp_extra + PPP_HDRLEN;\n \n \tif (skb_linearize(skb))\n@@ -1731,12 +1731,11 @@ pad_compress_skb(struct ppp *ppp, struct sk_buff *skb)\n \tnew_skb = alloc_skb(new_skb_size, GFP_ATOMIC);\n \tif (!new_skb) {\n \t\tif (net_ratelimit())\n-\t\t\tnetdev_err(ppp-\u003edev, \"PPP: no memory (comp pkt)\\n\");\n+\t\t\tnetdev_err(dev, \"PPP: no memory (comp pkt)\\n\");\n \t\treturn NULL;\n \t}\n-\tif (ppp-\u003edev-\u003ehard_header_len \u003e PPP_HDRLEN)\n-\t\tskb_reserve(new_skb,\n-\t\t\t ppp-\u003edev-\u003ehard_header_len - PPP_HDRLEN);\n+\tif (dev-\u003ehard_header_len \u003e PPP_HDRLEN)\n+\t\tskb_reserve(new_skb, dev-\u003ehard_header_len - PPP_HDRLEN);\n \n \t/* compressor still expects A/C bytes in hdr */\n \tlen = ppp-\u003excomp-\u003ecompress(ppp-\u003exc_state, skb-\u003edata - 2,\n@@ -1761,7 +1760,7 @@ pad_compress_skb(struct ppp *ppp, struct sk_buff *skb)\n \t\t * the same number.\n \t\t */\n \t\tif (net_ratelimit())\n-\t\t\tnetdev_err(ppp-\u003edev, \"ppp: compressor dropped pkt\\n\");\n+\t\t\tnetdev_err(dev, \"ppp: compressor dropped pkt\\n\");\n \t\tconsume_skb(new_skb);\n \t\tnew_skb = NULL;\n \t}\n@@ -1777,13 +1776,14 @@ pad_compress_skb(struct ppp *ppp, struct sk_buff *skb)\n static int\n ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n \tstruct sk_buff *skb = *pskb;\n \tint proto = PPP_PROTO(skb);\n \tstruct sk_buff *new_skb;\n \tint len;\n \tunsigned char *cp;\n \n-\tskb-\u003edev = ppp-\u003edev;\n+\tskb-\u003edev = dev;\n \n \tif (proto \u003c 0x8000) {\n #ifdef CONFIG_PPP_FILTER\n@@ -1794,7 +1794,7 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)\n \t\tif (ppp-\u003epass_filter \u0026\u0026\n \t\t bpf_prog_run(ppp-\u003epass_filter, skb) == 0) {\n \t\t\tif (READ_ONCE(ppp-\u003edebug) \u0026 1)\n-\t\t\t\tnetdev_printk(KERN_DEBUG, ppp-\u003edev,\n+\t\t\t\tnetdev_printk(KERN_DEBUG, dev,\n \t\t\t\t\t \"PPP: outbound frame \"\n \t\t\t\t\t \"not passed\\n\");\n \t\t\tkfree_skb(skb);\n@@ -1811,7 +1811,7 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)\n #endif /* CONFIG_PPP_FILTER */\n \t}\n \n-\tdev_sw_netstats_tx_add(ppp-\u003edev, 1, skb-\u003elen - PPP_PROTO_LEN);\n+\tdev_sw_netstats_tx_add(dev, 1, skb-\u003elen - PPP_PROTO_LEN);\n \n \tswitch (proto) {\n \tcase PPP_IP:\n@@ -1822,13 +1822,13 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)\n \t\t\tgoto drop;\n \n \t\t/* try to do VJ TCP header compression */\n-\t\tnew_skb = alloc_skb(skb-\u003elen + ppp-\u003edev-\u003ehard_header_len - 2,\n+\t\tnew_skb = alloc_skb(skb-\u003elen + dev-\u003ehard_header_len - 2,\n \t\t\t\t GFP_ATOMIC);\n \t\tif (!new_skb) {\n-\t\t\tnetdev_err(ppp-\u003edev, \"PPP: no memory (VJ comp pkt)\\n\");\n+\t\t\tnetdev_err(dev, \"PPP: no memory (VJ comp pkt)\\n\");\n \t\t\tgoto drop;\n \t\t}\n-\t\tskb_reserve(new_skb, ppp-\u003edev-\u003ehard_header_len - 2);\n+\t\tskb_reserve(new_skb, dev-\u003ehard_header_len - 2);\n \t\tcp = skb-\u003edata + 2;\n \t\tlen = slhc_compress(ppp-\u003evj, cp, skb-\u003elen - 2,\n \t\t\t\t new_skb-\u003edata + 2, \u0026cp,\n@@ -1864,7 +1864,7 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)\n \t proto != PPP_LCP \u0026\u0026 proto != PPP_CCP) {\n \t\tif (!(ppp-\u003eflags \u0026 SC_CCP_UP) \u0026\u0026 (ppp-\u003eflags \u0026 SC_MUST_COMP)) {\n \t\t\tif (net_ratelimit())\n-\t\t\t\tnetdev_err(ppp-\u003edev,\n+\t\t\t\tnetdev_err(dev,\n \t\t\t\t\t \"ppp: compression required but \"\n \t\t\t\t\t \"down - pkt dropped.\\n\");\n \t\t\tgoto drop;\n@@ -1892,7 +1892,7 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)\n \n drop:\n \tkfree_skb(skb);\n-\tDEV_STATS_INC(ppp-\u003edev, tx_errors);\n+\tDEV_STATS_INC(dev, tx_errors);\n \treturn 1;\n }\n \n@@ -1962,6 +1962,7 @@ MODULE_PARM_DESC(mp_protocol_compress,\n */\n static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n \tint len, totlen;\n \tint i, bits, hdrlen, mtu;\n \tint flen;\n@@ -2158,8 +2159,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)\n \tspin_unlock(\u0026pch-\u003edownl);\n err_linearize:\n \tif (READ_ONCE(ppp-\u003edebug) \u0026 1)\n-\t\tnetdev_err(ppp-\u003edev, \"PPP: no memory (fragment)\\n\");\n-\tDEV_STATS_INC(ppp-\u003edev, tx_errors);\n+\t\tnetdev_err(dev, \"PPP: no memory (fragment)\\n\");\n+\tDEV_STATS_INC(dev, tx_errors);\n \t++ppp-\u003enxseq;\n \treturn 1;\t/* abandon the frame */\n }\n@@ -2332,7 +2333,7 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb)\n \tif (!ppp_decompress_proto(skb)) {\n \t\tkfree_skb(skb);\n \t\tif (ppp) {\n-\t\t\tDEV_STATS_INC(ppp-\u003edev, rx_length_errors);\n+\t\t\tDEV_STATS_INC(netdev_from_priv(ppp), rx_length_errors);\n \t\t\tppp_receive_error(ppp);\n \t\t}\n \t\tgoto done;\n@@ -2394,7 +2395,7 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)\n static void\n ppp_receive_error(struct ppp *ppp)\n {\n-\tDEV_STATS_INC(ppp-\u003edev, rx_errors);\n+\tDEV_STATS_INC(netdev_from_priv(ppp), rx_errors);\n \tif (ppp-\u003evj)\n \t\tslhc_toss(ppp-\u003evj);\n }\n@@ -2402,6 +2403,7 @@ ppp_receive_error(struct ppp *ppp)\n static void\n ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n \tstruct sk_buff *ns;\n \tint proto, len, npi;\n \n@@ -2431,8 +2433,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)\n \t\t\t/* copy to a new sk_buff with more tailroom */\n \t\t\tns = dev_alloc_skb(skb-\u003elen + 128);\n \t\t\tif (!ns) {\n-\t\t\t\tnetdev_err(ppp-\u003edev, \"PPP: no memory \"\n-\t\t\t\t\t \"(VJ decomp)\\n\");\n+\t\t\t\tnetdev_err(dev, \"PPP: no memory (VJ decomp)\\n\");\n \t\t\t\tgoto err;\n \t\t\t}\n \t\t\tskb_reserve(ns, 2);\n@@ -2445,7 +2446,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)\n \n \t\tlen = slhc_uncompress(ppp-\u003evj, skb-\u003edata + 2, skb-\u003elen - 2);\n \t\tif (len \u003c= 0) {\n-\t\t\tnetdev_printk(KERN_DEBUG, ppp-\u003edev,\n+\t\t\tnetdev_printk(KERN_DEBUG, dev,\n \t\t\t\t \"PPP: VJ decompression error\\n\");\n \t\t\tgoto err;\n \t\t}\n@@ -2468,7 +2469,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)\n \t\t\tgoto err;\n \n \t\tif (slhc_remember(ppp-\u003evj, skb-\u003edata + 2, skb-\u003elen - 2) \u003c= 0) {\n-\t\t\tnetdev_err(ppp-\u003edev, \"PPP: VJ uncompressed error\\n\");\n+\t\t\tnetdev_err(dev, \"PPP: VJ uncompressed error\\n\");\n \t\t\tgoto err;\n \t\t}\n \t\tproto = PPP_IP;\n@@ -2479,7 +2480,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)\n \t\tbreak;\n \t}\n \n-\tdev_sw_netstats_rx_add(ppp-\u003edev, skb-\u003elen - PPP_PROTO_LEN);\n+\tdev_sw_netstats_rx_add(dev, skb-\u003elen - PPP_PROTO_LEN);\n \n \tnpi = proto_to_npindex(proto);\n \tif (npi \u003c 0) {\n@@ -2506,7 +2507,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)\n \t\t\tif (ppp-\u003epass_filter \u0026\u0026\n \t\t\t bpf_prog_run(ppp-\u003epass_filter, skb) == 0) {\n \t\t\t\tif (READ_ONCE(ppp-\u003edebug) \u0026 1)\n-\t\t\t\t\tnetdev_printk(KERN_DEBUG, ppp-\u003edev,\n+\t\t\t\t\tnetdev_printk(KERN_DEBUG, dev,\n \t\t\t\t\t\t \"PPP: inbound frame \"\n \t\t\t\t\t\t \"not passed\\n\");\n \t\t\t\tkfree_skb(skb);\n@@ -2520,17 +2521,17 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)\n #endif /* CONFIG_PPP_FILTER */\n \t\t\tWRITE_ONCE(ppp-\u003elast_recv, jiffies);\n \n-\t\tif ((ppp-\u003edev-\u003eflags \u0026 IFF_UP) == 0 ||\n+\t\tif ((dev-\u003eflags \u0026 IFF_UP) == 0 ||\n \t\t READ_ONCE(ppp-\u003enpmode[npi]) != NPMODE_PASS) {\n \t\t\tkfree_skb(skb);\n \t\t} else {\n \t\t\t/* chop off protocol */\n \t\t\tskb_pull_rcsum(skb, 2);\n-\t\t\tskb-\u003edev = ppp-\u003edev;\n+\t\t\tskb-\u003edev = dev;\n \t\t\tskb-\u003eprotocol = htons(npindex_to_ethertype[npi]);\n \t\t\tskb_reset_mac_header(skb);\n \t\t\tskb_scrub_packet(skb, !net_eq(ppp-\u003eppp_net,\n-\t\t\t\t\t\t dev_net(ppp-\u003edev)));\n+\t\t\t\t\t\t dev_net(dev)));\n \t\t\tnetif_rx(skb);\n \t\t}\n \t}\n@@ -2568,8 +2569,8 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb)\n \n \t\tns = dev_alloc_skb(obuff_size);\n \t\tif (!ns) {\n-\t\t\tnetdev_err(ppp-\u003edev, \"ppp_decompress_frame: \"\n-\t\t\t\t \"no memory\\n\");\n+\t\t\tnetdev_err(netdev_from_priv(ppp),\n+\t\t\t\t \"ppp_decompress_frame: no memory\\n\");\n \t\t\tgoto err;\n \t\t}\n \t\t/* the decompressor still expects the A/C bytes in the hdr */\n@@ -2617,6 +2618,7 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb)\n static void\n ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n \tu32 mask, seq;\n \tstruct channel *ch;\n \tint mphdrlen = (ppp-\u003eflags \u0026 SC_MP_SHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN;\n@@ -2661,7 +2663,7 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)\n \t */\n \tif (seq_before(seq, ppp-\u003enextseq)) {\n \t\tkfree_skb(skb);\n-\t\tDEV_STATS_INC(ppp-\u003edev, rx_dropped);\n+\t\tDEV_STATS_INC(dev, rx_dropped);\n \t\tppp_receive_error(ppp);\n \t\treturn;\n \t}\n@@ -2697,7 +2699,7 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)\n \t\tif (pskb_may_pull(skb, 2))\n \t\t\tppp_receive_nonmp_frame(ppp, skb);\n \t\telse {\n-\t\t\tDEV_STATS_INC(ppp-\u003edev, rx_length_errors);\n+\t\t\tDEV_STATS_INC(dev, rx_length_errors);\n \t\t\tkfree_skb(skb);\n \t\t\tppp_receive_error(ppp);\n \t\t}\n@@ -2739,6 +2741,7 @@ ppp_mp_insert(struct ppp *ppp, struct sk_buff *skb)\n static struct sk_buff *\n ppp_mp_reconstruct(struct ppp *ppp)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n \tu32 seq = ppp-\u003enextseq;\n \tu32 minseq = ppp-\u003eminseq;\n \tstruct sk_buff_head *list = \u0026ppp-\u003emrq;\n@@ -2755,8 +2758,7 @@ ppp_mp_reconstruct(struct ppp *ppp)\n \tagain:\n \t\tif (seq_before(PPP_MP_CB(p)-\u003esequence, seq)) {\n \t\t\t/* this can't happen, anyway ignore the skb */\n-\t\t\tnetdev_err(ppp-\u003edev, \"ppp_mp_reconstruct bad \"\n-\t\t\t\t \"seq %u \u003c %u\\n\",\n+\t\t\tnetdev_err(dev, \"ppp_mp_reconstruct bad seq %u \u003c %u\\n\",\n \t\t\t\t PPP_MP_CB(p)-\u003esequence, seq);\n \t\t\t__skb_unlink(p, list);\n \t\t\tkfree_skb(p);\n@@ -2775,7 +2777,7 @@ ppp_mp_reconstruct(struct ppp *ppp)\n \t\t\t\tminseq + 1: PPP_MP_CB(p)-\u003esequence;\n \n \t\t\tif (READ_ONCE(ppp-\u003edebug) \u0026 1)\n-\t\t\t\tnetdev_printk(KERN_DEBUG, ppp-\u003edev,\n+\t\t\t\tnetdev_printk(KERN_DEBUG, dev,\n \t\t\t\t\t \"lost frag %u..%u\\n\",\n \t\t\t\t\t oldseq, seq-1);\n \n@@ -2803,8 +2805,8 @@ ppp_mp_reconstruct(struct ppp *ppp)\n \t\tif (lost == 0 \u0026\u0026 (PPP_MP_CB(p)-\u003eBEbits \u0026 E) \u0026\u0026\n \t\t (PPP_MP_CB(head)-\u003eBEbits \u0026 B)) {\n \t\t\tif (len \u003e ppp-\u003emrru + 2) {\n-\t\t\t\tDEV_STATS_INC(ppp-\u003edev, rx_length_errors);\n-\t\t\t\tnetdev_printk(KERN_DEBUG, ppp-\u003edev,\n+\t\t\t\tDEV_STATS_INC(dev, rx_length_errors);\n+\t\t\t\tnetdev_printk(KERN_DEBUG, dev,\n \t\t\t\t\t \"PPP: reconstructed packet\"\n \t\t\t\t\t \" is too long (%d)\\n\", len);\n \t\t\t} else {\n@@ -2824,7 +2826,7 @@ ppp_mp_reconstruct(struct ppp *ppp)\n \n \t\t\tskb_queue_reverse_walk_from_safe(list, p, tmp2) {\n \t\t\t\tif (READ_ONCE(ppp-\u003edebug) \u0026 1)\n-\t\t\t\t\tnetdev_printk(KERN_DEBUG, ppp-\u003edev,\n+\t\t\t\t\tnetdev_printk(KERN_DEBUG, dev,\n \t\t\t\t\t\t \"discarding frag %u\\n\",\n \t\t\t\t\t\t PPP_MP_CB(p)-\u003esequence);\n \t\t\t\t__skb_unlink(p, list);\n@@ -2846,7 +2848,7 @@ ppp_mp_reconstruct(struct ppp *ppp)\n \t\t\t\tif (p == head)\n \t\t\t\t\tbreak;\n \t\t\t\tif (READ_ONCE(ppp-\u003edebug) \u0026 1)\n-\t\t\t\t\tnetdev_printk(KERN_DEBUG, ppp-\u003edev,\n+\t\t\t\t\tnetdev_printk(KERN_DEBUG, dev,\n \t\t\t\t\t\t \"discarding frag %u\\n\",\n \t\t\t\t\t\t PPP_MP_CB(p)-\u003esequence);\n \t\t\t\t__skb_unlink(p, list);\n@@ -2854,11 +2856,11 @@ ppp_mp_reconstruct(struct ppp *ppp)\n \t\t\t}\n \n \t\t\tif (READ_ONCE(ppp-\u003edebug) \u0026 1)\n-\t\t\t\tnetdev_printk(KERN_DEBUG, ppp-\u003edev,\n+\t\t\t\tnetdev_printk(KERN_DEBUG, dev,\n \t\t\t\t\t \" missed pkts %u..%u\\n\",\n \t\t\t\t\t ppp-\u003enextseq,\n \t\t\t\t\t PPP_MP_CB(head)-\u003esequence-1);\n-\t\t\tDEV_STATS_INC(ppp-\u003edev, rx_dropped);\n+\t\t\tDEV_STATS_INC(dev, rx_dropped);\n \t\t\tppp_receive_error(ppp);\n \t\t}\n \n@@ -2977,8 +2979,8 @@ char *ppp_dev_name(struct ppp_channel *chan)\n \n \tif (pch) {\n \t\tppp = rcu_dereference(pch-\u003eppp);\n-\t\tif (ppp \u0026\u0026 ppp-\u003edev)\n-\t\t\tname = ppp-\u003edev-\u003ename;\n+\t\tif (ppp)\n+\t\t\tname = netdev_from_priv(ppp)-\u003ename;\n \t}\n \treturn name;\n }\n@@ -3309,12 +3311,13 @@ find_compressor(int type)\n static void\n ppp_get_stats(struct ppp *ppp, struct ppp_stats *st)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n \tstruct slcompress *vj = ppp-\u003evj;\n \tint cpu;\n \n \tmemset(st, 0, sizeof(*st));\n \tfor_each_possible_cpu(cpu) {\n-\t\tstruct pcpu_sw_netstats *p = per_cpu_ptr(ppp-\u003edev-\u003etstats, cpu);\n+\t\tstruct pcpu_sw_netstats *p = per_cpu_ptr(dev-\u003etstats, cpu);\n \t\tu64 rx_packets, rx_bytes, tx_packets, tx_bytes;\n \n \t\trx_packets = u64_stats_read(\u0026p-\u003erx_packets);\n@@ -3327,8 +3330,8 @@ ppp_get_stats(struct ppp *ppp, struct ppp_stats *st)\n \t\tst-\u003ep.ppp_opackets += tx_packets;\n \t\tst-\u003ep.ppp_obytes += tx_bytes;\n \t}\n-\tst-\u003ep.ppp_ierrors = DEV_STATS_READ(ppp-\u003edev, rx_errors);\n-\tst-\u003ep.ppp_oerrors = DEV_STATS_READ(ppp-\u003edev, tx_errors);\n+\tst-\u003ep.ppp_ierrors = DEV_STATS_READ(dev, rx_errors);\n+\tst-\u003ep.ppp_oerrors = DEV_STATS_READ(dev, tx_errors);\n \tif (!vj)\n \t\treturn;\n \tst-\u003evj.vjs_packets = vj-\u003esls_o_compressed + vj-\u003esls_o_uncompressed;\n@@ -3408,6 +3411,8 @@ init_ppp_file(struct ppp_file *pf, int kind)\n */\n static void ppp_release_interface(struct ppp *ppp)\n {\n+\tstruct net_device *dev = netdev_from_priv(ppp);\n+\n \tif (!refcount_dec_and_test(\u0026ppp-\u003efile.refcnt))\n \t\treturn;\n \n@@ -3415,7 +3420,7 @@ static void ppp_release_interface(struct ppp *ppp)\n \n \tif (!ppp-\u003efile.dead || ppp-\u003en_channels) {\n \t\t/* \"can't happen\" */\n-\t\tnetdev_err(ppp-\u003edev, \"ppp: destroying ppp struct %p \"\n+\t\tnetdev_err(dev, \"ppp: destroying ppp struct %p \"\n \t\t\t \"but dead=%d n_channels=%d !\\n\",\n \t\t\t ppp, ppp-\u003efile.dead, ppp-\u003en_channels);\n \t\treturn;\n@@ -3445,7 +3450,7 @@ static void ppp_release_interface(struct ppp *ppp)\n \n \tfree_percpu(ppp-\u003exmit_recursion);\n \n-\tfree_netdev(ppp-\u003edev);\n+\tfree_netdev(dev);\n }\n \n /*\n@@ -3492,6 +3497,7 @@ ppp_find_channel(struct ppp_net *pn, int unit)\n static int\n ppp_connect_channel(struct channel *pch, int unit)\n {\n+\tstruct net_device *dev;\n \tstruct ppp *ppp;\n \tstruct ppp_net *pn;\n \tint ret = -ENXIO;\n@@ -3503,6 +3509,7 @@ ppp_connect_channel(struct channel *pch, int unit)\n \tppp = ppp_find_unit(pn, unit);\n \tif (!ppp)\n \t\tgoto out;\n+\tdev = netdev_from_priv(ppp);\n \tspin_lock(\u0026pch-\u003eupl);\n \tret = -EINVAL;\n \tif (rcu_dereference_protected(pch-\u003eppp, lockdep_is_held(\u0026pch-\u003eupl)) ||\n@@ -3519,15 +3526,15 @@ ppp_connect_channel(struct channel *pch, int unit)\n \t\tgoto outl;\n \t}\n \tif (pch-\u003echan-\u003edirect_xmit)\n-\t\tppp-\u003edev-\u003epriv_flags |= IFF_NO_QUEUE;\n+\t\tdev-\u003epriv_flags |= IFF_NO_QUEUE;\n \telse\n-\t\tppp-\u003edev-\u003epriv_flags \u0026= ~IFF_NO_QUEUE;\n+\t\tdev-\u003epriv_flags \u0026= ~IFF_NO_QUEUE;\n \tspin_unlock_bh(\u0026pch-\u003edownl);\n \tif (pch-\u003efile.hdrlen \u003e ppp-\u003efile.hdrlen)\n \t\tppp-\u003efile.hdrlen = pch-\u003efile.hdrlen;\n \thdrlen = pch-\u003efile.hdrlen + 2;\t/* for protocol bytes */\n-\tif (hdrlen \u003e ppp-\u003edev-\u003ehard_header_len)\n-\t\tppp-\u003edev-\u003ehard_header_len = hdrlen;\n+\tif (hdrlen \u003e dev-\u003ehard_header_len)\n+\t\tdev-\u003ehard_header_len = hdrlen;\n \tlist_add_tail_rcu(\u0026pch-\u003eclist, \u0026ppp-\u003echannels);\n \t++ppp-\u003en_channels;\n \trcu_assign_pointer(pch-\u003eppp, ppp);\n"
} |
| 2/1 | 2026/08/01 00:03 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch is a pure refactoring that removes the redundant `dev` pointer from `struct ppp` and replaces it with `netdev_from_priv(ppp)`. Since `struct ppp` is allocated as the private data of `struct net_device`, this does not change any functional logic or execution flow.",
"WorthFuzzing": false
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4"). Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt: For your convenience, here is the diff of the changes:
commit 6a2ec7a3d413cb5c0d20e7ee425f0693b25af030
Author: syz-cluster <triage@syzkaller.com>
Date: Sat Aug 1 00:03:35 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 08bb89765487f..e1013621eb1d9 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -139,7 +139,6 @@ struct ppp {
void *rc_state; /* its internal state 98 */
unsigned long last_xmit; /* jiffies when last pkt sent 9c */
unsigned long last_recv; /* jiffies when last pkt rcvd a0 */
- struct net_device *dev; /* network interface device a4 */
int closing; /* is device closing down? a8 */
#ifdef CONFIG_PPP_MULTILINK
int nxchan; /* next channel to send something on */
@@ -412,7 +411,7 @@ static int ppp_release(struct inode *unused, struct file *file)
ppp = PF_TO_PPP(pf);
rtnl_lock();
if (file == ppp->owner)
- unregister_netdevice(ppp->dev);
+ unregister_netdevice(netdev_from_priv(ppp));
rtnl_unlock();
ppp_release_interface(ppp);
break;
@@ -921,7 +920,7 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
} else {
WRITE_ONCE(ppp->npmode[i], npi.mode);
/* we may be able to transmit more packets now (??) */
- netif_wake_queue(ppp->dev);
+ netif_wake_queue(netdev_from_priv(ppp));
}
err = 0;
break;
@@ -1147,7 +1146,7 @@ static __net_exit void ppp_exit_rtnl_net(struct net *net,
int id;
idr_for_each_entry(&pn->units_idr, ppp, id)
- ppp_nl_dellink(ppp->dev, dev_to_kill);
+ ppp_nl_dellink(netdev_from_priv(ppp), dev_to_kill);
}
static __net_exit void ppp_exit_net(struct net *net)
@@ -1170,6 +1169,7 @@ static struct pernet_operations ppp_net_ops = {
static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)
{
+ struct net_device *dev = netdev_from_priv(ppp);
struct ppp_net *pn = ppp_pernet(ppp->ppp_net);
int ret;
@@ -1181,8 +1181,8 @@ static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)
goto err;
if (!ifname_is_set) {
while (1) {
- snprintf(ppp->dev->name, IFNAMSIZ, "ppp%i", ret);
- if (!netdev_name_in_use(ppp->ppp_net, ppp->dev->name))
+ snprintf(dev->name, IFNAMSIZ, "ppp%i", ret);
+ if (!netdev_name_in_use(ppp->ppp_net, dev->name))
break;
unit_put(&pn->units_idr, ret);
ret = unit_get(&pn->units_idr, ppp, ret + 1);
@@ -1210,11 +1210,11 @@ static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)
ppp->file.index = ret;
if (!ifname_is_set)
- snprintf(ppp->dev->name, IFNAMSIZ, "ppp%i", ppp->file.index);
+ snprintf(dev->name, IFNAMSIZ, "ppp%i", ppp->file.index);
mutex_unlock(&pn->all_ppp_mutex);
- ret = register_netdevice(ppp->dev);
+ ret = register_netdevice(dev);
if (ret < 0)
goto err_unit;
@@ -1239,7 +1239,6 @@ static int ppp_dev_configure(struct net *src_net, struct net_device *dev,
int err;
int cpu;
- ppp->dev = dev;
ppp->ppp_net = src_net;
ppp->mru = PPP_MRU;
ppp->owner = conf->file;
@@ -1658,7 +1657,7 @@ static void ppp_xmit_flush(struct ppp *ppp)
/* If there's no work left to do, tell the core net code that we can
* accept some more.
*/
- netif_wake_queue(ppp->dev);
+ netif_wake_queue(netdev_from_priv(ppp));
}
static void __ppp_xmit_process(struct ppp *ppp, struct sk_buff *skb)
@@ -1674,7 +1673,7 @@ static void __ppp_xmit_process(struct ppp *ppp, struct sk_buff *skb)
if (likely(skb_queue_empty(&ppp->file.xq))) {
if (unlikely(!ppp_push(ppp, skb))) {
skb_queue_tail(&ppp->file.xq, skb);
- netif_stop_queue(ppp->dev);
+ netif_stop_queue(netdev_from_priv(ppp));
}
goto out;
}
@@ -1712,17 +1711,18 @@ static void ppp_xmit_process(struct ppp *ppp, struct sk_buff *skb)
kfree_skb(skb);
if (net_ratelimit())
- netdev_err(ppp->dev, "recursion detected\n");
+ netdev_err(netdev_from_priv(ppp), "recursion detected\n");
}
static inline struct sk_buff *
pad_compress_skb(struct ppp *ppp, struct sk_buff *skb)
{
+ struct net_device *dev = netdev_from_priv(ppp);
struct sk_buff *new_skb;
int len;
- int new_skb_size = ppp->dev->mtu +
- ppp->xcomp->comp_extra + ppp->dev->hard_header_len;
- int compressor_skb_size = ppp->dev->mtu +
+ int new_skb_size = dev->mtu +
+ ppp->xcomp->comp_extra + dev->hard_header_len;
+ int compressor_skb_size = dev->mtu +
ppp->xcomp->comp_extra + PPP_HDRLEN;
if (skb_linearize(skb))
@@ -1731,12 +1731,11 @@ pad_compress_skb(struct ppp *ppp, struct sk_buff *skb)
new_skb = alloc_skb(new_skb_size, GFP_ATOMIC);
if (!new_skb) {
if (net_ratelimit())
- netdev_err(ppp->dev, "PPP: no memory (comp pkt)\n");
+ netdev_err(dev, "PPP: no memory (comp pkt)\n");
return NULL;
}
- if (ppp->dev->hard_header_len > PPP_HDRLEN)
- skb_reserve(new_skb,
- ppp->dev->hard_header_len - PPP_HDRLEN);
+ if (dev->hard_header_len > PPP_HDRLEN)
+ skb_reserve(new_skb, dev->hard_header_len - PPP_HDRLEN);
/* compressor still expects A/C bytes in hdr */
len = ppp->xcomp->compress(ppp->xc_state, skb->data - 2,
@@ -1761,7 +1760,7 @@ pad_compress_skb(struct ppp *ppp, struct sk_buff *skb)
* the same number.
*/
if (net_ratelimit())
- netdev_err(ppp->dev, "ppp: compressor dropped pkt\n");
+ netdev_err(dev, "ppp: compressor dropped pkt\n");
consume_skb(new_skb);
new_skb = NULL;
}
@@ -1777,13 +1776,14 @@ pad_compress_skb(struct ppp *ppp, struct sk_buff *skb)
static int
ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)
{
+ struct net_device *dev = netdev_from_priv(ppp);
struct sk_buff *skb = *pskb;
int proto = PPP_PROTO(skb);
struct sk_buff *new_skb;
int len;
unsigned char *cp;
- skb->dev = ppp->dev;
+ skb->dev = dev;
if (proto < 0x8000) {
#ifdef CONFIG_PPP_FILTER
@@ -1794,7 +1794,7 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)
if (ppp->pass_filter &&
bpf_prog_run(ppp->pass_filter, skb) == 0) {
if (READ_ONCE(ppp->debug) & 1)
- netdev_printk(KERN_DEBUG, ppp->dev,
+ netdev_printk(KERN_DEBUG, dev,
"PPP: outbound frame "
"not passed\n");
kfree_skb(skb);
@@ -1811,7 +1811,7 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)
#endif /* CONFIG_PPP_FILTER */
}
- dev_sw_netstats_tx_add(ppp->dev, 1, skb->len - PPP_PROTO_LEN);
+ dev_sw_netstats_tx_add(dev, 1, skb->len - PPP_PROTO_LEN);
switch (proto) {
case PPP_IP:
@@ -1822,13 +1822,13 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)
goto drop;
/* try to do VJ TCP header compression */
- new_skb = alloc_skb(skb->len + ppp->dev->hard_header_len - 2,
+ new_skb = alloc_skb(skb->len + dev->hard_header_len - 2,
GFP_ATOMIC);
if (!new_skb) {
- netdev_err(ppp->dev, "PPP: no memory (VJ comp pkt)\n");
+ netdev_err(dev, "PPP: no memory (VJ comp pkt)\n");
goto drop;
}
- skb_reserve(new_skb, ppp->dev->hard_header_len - 2);
+ skb_reserve(new_skb, dev->hard_header_len - 2);
cp = skb->data + 2;
len = slhc_compress(ppp->vj, cp, skb->len - 2,
new_skb->data + 2, &cp,
@@ -1864,7 +1864,7 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)
proto != PPP_LCP && proto != PPP_CCP) {
if (!(ppp->flags & SC_CCP_UP) && (ppp->flags & SC_MUST_COMP)) {
if (net_ratelimit())
- netdev_err(ppp->dev,
+ netdev_err(dev,
"ppp: compression required but "
"down - pkt dropped.\n");
goto drop;
@@ -1892,7 +1892,7 @@ ppp_prepare_tx_skb(struct ppp *ppp, struct sk_buff **pskb)
drop:
kfree_skb(skb);
- DEV_STATS_INC(ppp->dev, tx_errors);
+ DEV_STATS_INC(dev, tx_errors);
return 1;
}
@@ -1962,6 +1962,7 @@ MODULE_PARM_DESC(mp_protocol_compress,
*/
static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
{
+ struct net_device *dev = netdev_from_priv(ppp);
int len, totlen;
int i, bits, hdrlen, mtu;
int flen;
@@ -2158,8 +2159,8 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
spin_unlock(&pch->downl);
err_linearize:
if (READ_ONCE(ppp->debug) & 1)
- netdev_err(ppp->dev, "PPP: no memory (fragment)\n");
- DEV_STATS_INC(ppp->dev, tx_errors);
+ netdev_err(dev, "PPP: no memory (fragment)\n");
+ DEV_STATS_INC(dev, tx_errors);
++ppp->nxseq;
return 1; /* abandon the frame */
}
@@ -2332,7 +2333,7 @@ ppp_input(struct ppp_channel *chan, struct sk_buff *skb)
if (!ppp_decompress_proto(skb)) {
kfree_skb(skb);
if (ppp) {
- DEV_STATS_INC(ppp->dev, rx_length_errors);
+ DEV_STATS_INC(netdev_from_priv(ppp), rx_length_errors);
ppp_receive_error(ppp);
}
goto done;
@@ -2394,7 +2395,7 @@ ppp_receive_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
static void
ppp_receive_error(struct ppp *ppp)
{
- DEV_STATS_INC(ppp->dev, rx_errors);
+ DEV_STATS_INC(netdev_from_priv(ppp), rx_errors);
if (ppp->vj)
slhc_toss(ppp->vj);
}
@@ -2402,6 +2403,7 @@ ppp_receive_error(struct ppp *ppp)
static void
ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
{
+ struct net_device *dev = netdev_from_priv(ppp);
struct sk_buff *ns;
int proto, len, npi;
@@ -2431,8 +2433,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
/* copy to a new sk_buff with more tailroom */
ns = dev_alloc_skb(skb->len + 128);
if (!ns) {
- netdev_err(ppp->dev, "PPP: no memory "
- "(VJ decomp)\n");
+ netdev_err(dev, "PPP: no memory (VJ decomp)\n");
goto err;
}
skb_reserve(ns, 2);
@@ -2445,7 +2446,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
len = slhc_uncompress(ppp->vj, skb->data + 2, skb->len - 2);
if (len <= 0) {
- netdev_printk(KERN_DEBUG, ppp->dev,
+ netdev_printk(KERN_DEBUG, dev,
"PPP: VJ decompression error\n");
goto err;
}
@@ -2468,7 +2469,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
goto err;
if (slhc_remember(ppp->vj, skb->data + 2, skb->len - 2) <= 0) {
- netdev_err(ppp->dev, "PPP: VJ uncompressed error\n");
+ netdev_err(dev, "PPP: VJ uncompressed error\n");
goto err;
}
proto = PPP_IP;
@@ -2479,7 +2480,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
break;
}
- dev_sw_netstats_rx_add(ppp->dev, skb->len - PPP_PROTO_LEN);
+ dev_sw_netstats_rx_add(dev, skb->len - PPP_PROTO_LEN);
npi = proto_to_npindex(proto);
if (npi < 0) {
@@ -2506,7 +2507,7 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
if (ppp->pass_filter &&
bpf_prog_run(ppp->pass_filter, skb) == 0) {
if (READ_ONCE(ppp->debug) & 1)
- netdev_printk(KERN_DEBUG, ppp->dev,
+ netdev_printk(KERN_DEBUG, dev,
"PPP: inbound frame "
"not passed\n");
kfree_skb(skb);
@@ -2520,17 +2521,17 @@ ppp_receive_nonmp_frame(struct ppp *ppp, struct sk_buff *skb)
#endif /* CONFIG_PPP_FILTER */
WRITE_ONCE(ppp->last_recv, jiffies);
- if ((ppp->dev->flags & IFF_UP) == 0 ||
+ if ((dev->flags & IFF_UP) == 0 ||
READ_ONCE(ppp->npmode[npi]) != NPMODE_PASS) {
kfree_skb(skb);
} else {
/* chop off protocol */
skb_pull_rcsum(skb, 2);
- skb->dev = ppp->dev;
+ skb->dev = dev;
skb->protocol = htons(npindex_to_ethertype[npi]);
skb_reset_mac_header(skb);
skb_scrub_packet(skb, !net_eq(ppp->ppp_net,
- dev_net(ppp->dev)));
+ dev_net(dev)));
netif_rx(skb);
}
}
@@ -2568,8 +2569,8 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb)
ns = dev_alloc_skb(obuff_size);
if (!ns) {
- netdev_err(ppp->dev, "ppp_decompress_frame: "
- "no memory\n");
+ netdev_err(netdev_from_priv(ppp),
+ "ppp_decompress_frame: no memory\n");
goto err;
}
/* the decompressor still expects the A/C bytes in the hdr */
@@ -2617,6 +2618,7 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb)
static void
ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
{
+ struct net_device *dev = netdev_from_priv(ppp);
u32 mask, seq;
struct channel *ch;
int mphdrlen = (ppp->flags & SC_MP_SHORTSEQ)? MPHDRLEN_SSN: MPHDRLEN;
@@ -2661,7 +2663,7 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
*/
if (seq_before(seq, ppp->nextseq)) {
kfree_skb(skb);
- DEV_STATS_INC(ppp->dev, rx_dropped);
+ DEV_STATS_INC(dev, rx_dropped);
ppp_receive_error(ppp);
return;
}
@@ -2697,7 +2699,7 @@ ppp_receive_mp_frame(struct ppp *ppp, struct sk_buff *skb, struct channel *pch)
if (pskb_may_pull(skb, 2))
ppp_receive_nonmp_frame(ppp, skb);
else {
- DEV_STATS_INC(ppp->dev, rx_length_errors);
+ DEV_STATS_INC(dev, rx_length_errors);
kfree_skb(skb);
ppp_receive_error(ppp);
}
@@ -2739,6 +2741,7 @@ ppp_mp_insert(struct ppp *ppp, struct sk_buff *skb)
static struct sk_buff *
ppp_mp_reconstruct(struct ppp *ppp)
{
+ struct net_device *dev = netdev_from_priv(ppp);
u32 seq = ppp->nextseq;
u32 minseq = ppp->minseq;
struct sk_buff_head *list = &ppp->mrq;
@@ -2755,8 +2758,7 @@ ppp_mp_reconstruct(struct ppp *ppp)
again:
if (seq_before(PPP_MP_CB(p)->sequence, seq)) {
/* this can't happen, anyway ignore the skb */
- netdev_err(ppp->dev, "ppp_mp_reconstruct bad "
- "seq %u < %u\n",
+ netdev_err(dev, "ppp_mp_reconstruct bad seq %u < %u\n",
PPP_MP_CB(p)->sequence, seq);
__skb_unlink(p, list);
kfree_skb(p);
@@ -2775,7 +2777,7 @@ ppp_mp_reconstruct(struct ppp *ppp)
minseq + 1: PPP_MP_CB(p)->sequence;
if (READ_ONCE(ppp->debug) & 1)
- netdev_printk(KERN_DEBUG, ppp->dev,
+ netdev_printk(KERN_DEBUG, dev,
"lost frag %u..%u\n",
oldseq, seq-1);
@@ -2803,8 +2805,8 @@ ppp_mp_reconstruct(struct ppp *ppp)
if (lost == 0 && (PPP_MP_CB(p)->BEbits & E) &&
(PPP_MP_CB(head)->BEbits & B)) {
if (len > ppp->mrru + 2) {
- DEV_STATS_INC(ppp->dev, rx_length_errors);
- netdev_printk(KERN_DEBUG, ppp->dev,
+ DEV_STATS_INC(dev, rx_length_errors);
+ netdev_printk(KERN_DEBUG, dev,
"PPP: reconstructed packet"
" is too long (%d)\n", len);
} else {
@@ -2824,7 +2826,7 @@ ppp_mp_reconstruct(struct ppp *ppp)
skb_queue_reverse_walk_from_safe(list, p, tmp2) {
if (READ_ONCE(ppp->debug) & 1)
- netdev_printk(KERN_DEBUG, ppp->dev,
+ netdev_printk(KERN_DEBUG, dev,
"discarding frag %u\n",
PPP_MP_CB(p)->sequence);
__skb_unlink(p, list);
@@ -2846,7 +2848,7 @@ ppp_mp_reconstruct(struct ppp *ppp)
if (p == head)
break;
if (READ_ONCE(ppp->debug) & 1)
- netdev_printk(KERN_DEBUG, ppp->dev,
+ netdev_printk(KERN_DEBUG, dev,
"discarding frag %u\n",
PPP_MP_CB(p)->sequence);
__skb_unlink(p, list);
@@ -2854,11 +2856,11 @@ ppp_mp_reconstruct(struct ppp *ppp)
}
if (READ_ONCE(ppp->debug) & 1)
- netdev_printk(KERN_DEBUG, ppp->dev,
+ netdev_printk(KERN_DEBUG, dev,
" missed pkts %u..%u\n",
ppp->nextseq,
PPP_MP_CB(head)->sequence-1);
- DEV_STATS_INC(ppp->dev, rx_dropped);
+ DEV_STATS_INC(dev, rx_dropped);
ppp_receive_error(ppp);
}
@@ -2977,8 +2979,8 @@ char *ppp_dev_name(struct ppp_channel *chan)
if (pch) {
ppp = rcu_dereference(pch->ppp);
- if (ppp && ppp->dev)
- name = ppp->dev->name;
+ if (ppp)
+ name = netdev_from_priv(ppp)->name;
}
return name;
}
@@ -3309,12 +3311,13 @@ find_compressor(int type)
static void
ppp_get_stats(struct ppp *ppp, struct ppp_stats *st)
{
+ struct net_device *dev = netdev_from_priv(ppp);
struct slcompress *vj = ppp->vj;
int cpu;
memset(st, 0, sizeof(*st));
for_each_possible_cpu(cpu) {
- struct pcpu_sw_netstats *p = per_cpu_ptr(ppp->dev->tstats, cpu);
+ struct pcpu_sw_netstats *p = per_cpu_ptr(dev->tstats, cpu);
u64 rx_packets, rx_bytes, tx_packets, tx_bytes;
rx_packets = u64_stats_read(&p->rx_packets);
@@ -3327,8 +3330,8 @@ ppp_get_stats(struct ppp *ppp, struct ppp_stats *st)
st->p.ppp_opackets += tx_packets;
st->p.ppp_obytes += tx_bytes;
}
- st->p.ppp_ierrors = DEV_STATS_READ(ppp->dev, rx_errors);
- st->p.ppp_oerrors = DEV_STATS_READ(ppp->dev, tx_errors);
+ st->p.ppp_ierrors = DEV_STATS_READ(dev, rx_errors);
+ st->p.ppp_oerrors = DEV_STATS_READ(dev, tx_errors);
if (!vj)
return;
st->vj.vjs_packets = vj->sls_o_compressed + vj->sls_o_uncompressed;
@@ -3408,6 +3411,8 @@ init_ppp_file(struct ppp_file *pf, int kind)
*/
static void ppp_release_interface(struct ppp *ppp)
{
+ struct net_device *dev = netdev_from_priv(ppp);
+
if (!refcount_dec_and_test(&ppp->file.refcnt))
return;
@@ -3415,7 +3420,7 @@ static void ppp_release_interface(struct ppp *ppp)
if (!ppp->file.dead || ppp->n_channels) {
/* "can't happen" */
- netdev_err(ppp->dev, "ppp: destroying ppp struct %p "
+ netdev_err(dev, "ppp: destroying ppp struct %p "
"but dead=%d n_channels=%d !\n",
ppp, ppp->file.dead, ppp->n_channels);
return;
@@ -3445,7 +3450,7 @@ static void ppp_release_interface(struct ppp *ppp)
free_percpu(ppp->xmit_recursion);
- free_netdev(ppp->dev);
+ free_netdev(dev);
}
/*
@@ -3492,6 +3497,7 @@ ppp_find_channel(struct ppp_net *pn, int unit)
static int
ppp_connect_channel(struct channel *pch, int unit)
{
+ struct net_device *dev;
struct ppp *ppp;
struct ppp_net *pn;
int ret = -ENXIO;
@@ -3503,6 +3509,7 @@ ppp_connect_channel(struct channel *pch, int unit)
ppp = ppp_find_unit(pn, unit);
if (!ppp)
goto out;
+ dev = netdev_from_priv(ppp);
spin_lock(&pch->upl);
ret = -EINVAL;
if (rcu_dereference_protected(pch->ppp, lockdep_is_held(&pch->upl)) ||
@@ -3519,15 +3526,15 @@ ppp_connect_channel(struct channel *pch, int unit)
goto outl;
}
if (pch->chan->direct_xmit)
- ppp->dev->priv_flags |= IFF_NO_QUEUE;
+ dev->priv_flags |= IFF_NO_QUEUE;
else
- ppp->dev->priv_flags &= ~IFF_NO_QUEUE;
+ dev->priv_flags &= ~IFF_NO_QUEUE;
spin_unlock_bh(&pch->downl);
if (pch->file.hdrlen > ppp->file.hdrlen)
ppp->file.hdrlen = pch->file.hdrlen;
hdrlen = pch->file.hdrlen + 2; /* for protocol bytes */
- if (hdrlen > ppp->dev->hard_header_len)
- ppp->dev->hard_header_len = hdrlen;
+ if (hdrlen > dev->hard_header_len)
+ dev->hard_header_len = hdrlen;
list_add_tail_rcu(&pch->clist, &ppp->channels);
++ppp->n_channels;
rcu_assign_pointer(pch->ppp, ppp);
|
| 3/2 | 2026/08/01 00:03 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 9932 output: 35 thoughts: 350 Thoughts: **Analyzing the PPP Driver Patch** Okay, so I'm looking at this patch for `drivers/net/ppp/ppp_generic.c`. Immediately, I see it's removing the `struct net_device *dev` field from the `struct ppp`. That's a pretty significant change. My first thought is, why? The obvious implication is that they're now using `netdev_from_priv(ppp)` everywhere `ppp->dev` was used. This strongly suggests the `struct ppp` is *now* being allocated as the private data of the `struct net_device`. Instead of separately allocated structs with a pointer between them. But wait, hold on a second. This *fundamentally* changes the memory layout and allocation strategy. I need to be sure. I'm going to have to dive into the code that creates the PPP interface. Functions like `ppp_create_interface` are what I'm interested in. I need to see *how* the `struct ppp` is being allocated now. The diff alone doesn't give me enough context. This change could have ripple effects throughout the driver. The whole structure of `ppp_create_interface` might have changed, maybe even how it's linked into the device tree. I need to see the allocation. |
| 4/2 | 2026/08/01 00:03 | tool | grepper |
0mArgs:{
"Expression": "alloc_netdev",
"PathPrefix": "drivers/net/ppp/ppp_generic.c"
}Results: {
"Output": "drivers/net/ppp/ppp_generic.c=3357=static int ppp_create_interface(struct net *net, struct file *file, int *unit)\n--\ndrivers/net/ppp/ppp_generic.c-3367-\ndrivers/net/ppp/ppp_generic.c:3368:\tdev = alloc_netdev(sizeof(struct ppp), \"\", NET_NAME_ENUM, ppp_setup);\ndrivers/net/ppp/ppp_generic.c-3369-\tif (!dev) {\n"
} |
| 5/2 | 2026/08/01 00:03 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 10734 output: 40 thoughts: 52 Thoughts: Here's my take on those thoughts: **Analyzing PPP Interface Creation in the Kernel** Okay, so I'm looking at this PPP code and immediately I see `alloc_netdev(sizeof(struct ppp), ...)` – that part's already implemented, good. But hang on, the author explicitly assigns `ppp->dev` to `dev`, and *then* they use `ppp->dev`. I need to figure out the reasoning behind this explicit assignment, as it seems a bit redundant at first glance. Now, I need to understand the larger context of this interface creation, so I'm going to jump into `ppp_create_interface` in the file. Hopefully, that will shed some light on why this explicit assignment is necessary and what's going on behind the scenes with this device structure. Time to dig in and see the bigger picture. |
| 6/2 | 2026/08/01 00:03 | tool | read-file |
0mArgs:{
"File": "drivers/net/ppp/ppp_generic.c",
"FirstLine": 3357,
"LineCount": 50
}Results: {
"Contents": "3357:\tstatic int ppp_create_interface(struct net *net, struct file *file, int *unit)\n3358:\t{\n3359:\t\tstruct ppp_config conf = {\n3360:\t\t\t.file = file,\n3361:\t\t\t.unit = *unit,\n3362:\t\t\t.ifname_is_set = false,\n3363:\t\t};\n3364:\t\tstruct net_device *dev;\n3365:\t\tstruct ppp *ppp;\n3366:\t\tint err;\n3367:\t\n3368:\t\tdev = alloc_netdev(sizeof(struct ppp), \"\", NET_NAME_ENUM, ppp_setup);\n3369:\t\tif (!dev) {\n3370:\t\t\terr = -ENOMEM;\n3371:\t\t\tgoto err;\n3372:\t\t}\n3373:\t\tdev_net_set(dev, net);\n3374:\t\tdev-\u003ertnl_link_ops = \u0026ppp_link_ops;\n3375:\t\n3376:\t\trtnl_lock();\n3377:\t\n3378:\t\terr = ppp_dev_configure(net, dev, \u0026conf);\n3379:\t\tif (err \u003c 0)\n3380:\t\t\tgoto err_dev;\n3381:\t\tppp = netdev_priv(dev);\n3382:\t\t*unit = ppp-\u003efile.index;\n3383:\t\n3384:\t\trtnl_unlock();\n3385:\t\n3386:\t\treturn 0;\n3387:\t\n3388:\terr_dev:\n3389:\t\trtnl_unlock();\n3390:\t\tfree_netdev(dev);\n3391:\terr:\n3392:\t\treturn err;\n3393:\t}\n3394:\t\n3395:\t/*\n3396:\t * Initialize a ppp_file structure.\n3397:\t */\n3398:\tstatic void\n3399:\tinit_ppp_file(struct ppp_file *pf, int kind)\n3400:\t{\n3401:\t\tpf-\u003ekind = kind;\n3402:\t\tskb_queue_head_init(\u0026pf-\u003exq);\n3403:\t\tskb_queue_head_init(\u0026pf-\u003erq);\n3404:\t\trefcount_set(\u0026pf-\u003erefcnt, 1);\n3405:\t\tinit_waitqueue_head(\u0026pf-\u003erwait);\n3406:\t}\n"
} |
| 7/2 | 2026/08/01 00:03 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 11680 output: 34 thoughts: 182 Thoughts: **Analyzing the PPP Device Driver Patch** Okay, so looking at this patch, the first thing that jumps out is the `alloc_netdev(sizeof(struct ppp), ...)` call. Right, that means the `ppp` structure is being allocated as the private data for the network device, which is accessed using `netdev_priv(dev)`. So, `ppp` and the `dev` struct are inherently linked, good. Now, the patch is removing `ppp->dev` and substituting it with `netdev_from_priv(ppp)`. Hmm, is `netdev_from_priv(ppp)` a function or a macro? I need to clarify that. Wait a second, is `netdev_from_priv` a standard kernel function? Is it in `include/linux/netdevice.h` or somewhere similar? Actually, no, I think it is usually `netdev_priv(dev)` to get the private data. Is there even a `netdev_from_priv(priv)` defined somewhere? I need to double-check that. Alright, let's just see where `netdev_from_priv` is used in the codebase. That'll be the fastest way to get to the bottom of this. |
| 8/2 | 2026/08/01 00:03 | tool | grepper |
0mArgs:{
"Expression": "netdev_from_priv",
"PathPrefix": "include/linux/netdevice.h"
}Results: {
"Output": "include/linux/netdevice.h=2819=static inline void *netdev_priv(const struct net_device *dev)\n--\ninclude/linux/netdevice.h-2824-/**\ninclude/linux/netdevice.h:2825: * netdev_from_priv() - get network device from priv\ninclude/linux/netdevice.h-2826- * @priv: network device private data\n--\ninclude/linux/netdevice.h-2829- */\ninclude/linux/netdevice.h:2830:static inline struct net_device *netdev_from_priv(const void *priv)\ninclude/linux/netdevice.h-2831-{\n"
} |
| 9/2 | 2026/08/01 00:03 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 12343 output: 55 thoughts: 270 Thoughts: **Refactoring PPP Device Handling** Okay, so `netdev_from_priv` is definitely a thing, good. The patch aims for pure refactoring, that's what I'm seeing here. It's all about eliminating the redundant `dev` pointer within the `struct ppp` and leveraging `netdev_from_priv(ppp)` instead. My first instinct is to immediately assess if there's any functional change. Is this just a straight swap of `ppp->dev` with the `netdev_from_priv(ppp)` equivalent? Let me just double-check, though, no need to be hasty. Okay, back to the patch. Yup, it's removing that assignment in `ppp_dev_configure`: `- ppp->dev = dev;` and then it's replacing all instances of `ppp->dev` with `netdev_from_priv(ppp)`. Hmm, now I have to be thorough... Could there *ever* have been a scenario where `ppp->dev` was NULL or diverged from what `netdev_from_priv(ppp)` returns? Thinking it through, no, not really. Because `ppp` is allocated using `alloc_netdev(sizeof(struct ppp), ...)` which always, in effect, ensures that `ppp`'s memory location aligns perfectly with the private data region of the associated `dev` structure. The calculation, therefore, is just correct. Hold on, though...what if there's an *alternative* way that `ppp` could be allocated? Is `struct ppp` ever instantiated outside of the `alloc_netdev` context? Let's go look for that. I need to make sure I haven't missed a corner case. |
| 10/2 | 2026/08/01 00:03 | tool | grepper |
0mError:no matches Args: {
"Expression": "(kmalloc|kzalloc|kcalloc|vmalloc|vzalloc)\\(.*sizeof\\(struct ppp\\)",
"PathPrefix": "drivers/net/ppp/ppp_generic.c"
}Results: {
"error": "no matches"
} |
| 11/2 | 2026/08/01 00:03 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 13052 output: 37 thoughts: 28 Thoughts: Okay, here's my summary, taking the role of the thinker: **Investigating `struct ppp` Allocation in `drivers/net/ppp/ppp_generic.c`** Alright, time to get to the bottom of this. I need to understand the usage of the `struct ppp` within the `drivers/net/ppp/ppp_generic.c` file. My immediate thought is to check for allocation of the struct *specifically* within that file. I'm operating under the assumption that the way it is allocated may have an effect on its usage. I need to understand whether this struct is being instantiated within this particular file and if so, how. This is the starting point for my analysis. Let's see if it's allocated directly there, or if other functions are responsible. Finding where it's being allocated is the crucial first step. |
| 12/2 | 2026/08/01 00:03 | tool | grepper |
0mArgs:{
"Expression": "sizeof\\(struct ppp\\)",
"PathPrefix": "drivers/net/ppp/ppp_generic.c"
}Results: {
"Output": "drivers/net/ppp/ppp_generic.c=1383=static struct rtnl_link_ops ppp_link_ops __read_mostly = {\n--\ndrivers/net/ppp/ppp_generic.c-1386-\t.policy\t\t= ppp_nl_policy,\ndrivers/net/ppp/ppp_generic.c:1387:\t.priv_size\t= sizeof(struct ppp),\ndrivers/net/ppp/ppp_generic.c-1388-\t.setup\t\t= ppp_setup,\n--\ndrivers/net/ppp/ppp_generic.c=3357=static int ppp_create_interface(struct net *net, struct file *file, int *unit)\n--\ndrivers/net/ppp/ppp_generic.c-3367-\ndrivers/net/ppp/ppp_generic.c:3368:\tdev = alloc_netdev(sizeof(struct ppp), \"\", NET_NAME_ENUM, ppp_setup);\ndrivers/net/ppp/ppp_generic.c-3369-\tif (!dev) {\n"
} |
| 13/2 | 2026/08/01 00:03 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 13572 output: 40 thoughts: 775 Thoughts: **Analyzing the PPP Refactoring Patch** Okay, so this patch is essentially just removing a redundant pointer within the `struct ppp`. Specifically, this pointer that stores the `net_device` within the structure itself. It looks like `struct ppp` is only ever allocated as `netdev_priv`, either through `alloc_netdev` or via `rtnl_link_ops.priv_size`. Therefore, `netdev_from_priv(ppp)` will always correctly give you the associated `net_device`. So, on the surface, this should just save a few bytes and should have no impact on the execution flow or functional logic of the code. My initial assessment is `WorthFuzzing=false`. However, I should probably double-check the patch for any sneaky changes. Looking at the code diff, the first change is just replacing `ppp->dev->name` with `dev->name`, where `dev` is a local variable initialized as `netdev_from_priv(ppp)`. That's fine. It's just using the local variable, as expected. Then there's a change in `ppp_dev_name`. It now calls `netdev_from_priv(ppp)->name` instead of `ppp->dev->name`. Hang on, does this change indicate that `ppp->dev` *could* have been NULL previously? Let me dig a little deeper. Let's see. In `ppp_dev_configure`, `ppp->dev = dev;` is set. Okay, so where is `ppp->dev` *not* set? Is there a situation where `ppp` exists but `ppp->dev` is NULL? I need to check how `ppp` is created. Looking at `ppp_create_interface`, we see `dev = alloc_netdev(...)`. Then `dev_net_set(dev, net)`, and so on. `ppp_dev_configure` is called, and *then* `ppp->dev = dev;` is assigned. If `ppp_dev_configure` fails, the code jumps to `err_dev`, and `dev` is unlocked and freed. Crucially, because `ppp` is within the memory allocated for `dev` (as it's `netdev_priv`!), freeing `dev` would also free `ppp`. Therefore, `ppp` can't exist without `dev`. Wait a minute, what about `ppp_nl_newlink`? Let me see... |
| 14/2 | 2026/08/01 00:04 | tool | read-file |
0mArgs:{
"File": "drivers/net/ppp/ppp_generic.c",
"FirstLine": 1320,
"LineCount": 50
}Results: {
"Contents": "1320:\t\tint err;\n1321:\t\n1322:\t\tfile = fget(nla_get_s32(data[IFLA_PPP_DEV_FD]));\n1323:\t\tif (!file)\n1324:\t\t\treturn -EBADF;\n1325:\t\n1326:\t\t/* rtnl_lock is already held here, but ppp_create_interface() locks\n1327:\t\t * ppp_mutex before holding rtnl_lock. Using mutex_trylock() avoids\n1328:\t\t * possible deadlock due to lock order inversion, at the cost of\n1329:\t\t * pushing the problem back to userspace.\n1330:\t\t */\n1331:\t\tif (!mutex_trylock(\u0026ppp_mutex)) {\n1332:\t\t\terr = -EBUSY;\n1333:\t\t\tgoto out;\n1334:\t\t}\n1335:\t\n1336:\t\tif (file-\u003ef_op != \u0026ppp_device_fops || file-\u003eprivate_data) {\n1337:\t\t\terr = -EBADF;\n1338:\t\t\tgoto out_unlock;\n1339:\t\t}\n1340:\t\n1341:\t\tconf.file = file;\n1342:\t\n1343:\t\t/* Don't use device name generated by the rtnetlink layer when ifname\n1344:\t\t * isn't specified. Let ppp_dev_configure() set the device name using\n1345:\t\t * the PPP unit identifer as suffix (i.e. ppp\u003cunit_id\u003e). This allows\n1346:\t\t * userspace to infer the device name using to the PPPIOCGUNIT ioctl.\n1347:\t\t */\n1348:\t\tif (!tb[IFLA_IFNAME] || !nla_len(tb[IFLA_IFNAME]) || !*(char *)nla_data(tb[IFLA_IFNAME]))\n1349:\t\t\tconf.ifname_is_set = false;\n1350:\t\n1351:\t\terr = ppp_dev_configure(link_net, dev, \u0026conf);\n1352:\t\n1353:\tout_unlock:\n1354:\t\tmutex_unlock(\u0026ppp_mutex);\n1355:\tout:\n1356:\t\tfput(file);\n1357:\t\n1358:\t\treturn err;\n1359:\t}\n1360:\t\n1361:\tstatic void ppp_nl_dellink(struct net_device *dev, struct list_head *head)\n1362:\t{\n1363:\t\tunregister_netdevice_queue(dev, head);\n1364:\t}\n1365:\t\n1366:\tstatic size_t ppp_nl_get_size(const struct net_device *dev)\n1367:\t{\n1368:\t\treturn 0;\n1369:\t}\n"
} |
| 15/2 | 2026/08/01 00:04 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 15681 output: 41 thoughts: 228 Thoughts: **Analyzing Potential NULL Pointer Dereference in PPP Device Configuration**
Okay, so I'm looking at this `ppp_nl_newlink` function, and it calls `ppp_dev_configure`. My main concern right now is the potential for a null pointer dereference. The code states that if `ppp_dev_configure` fails, the `dev` is eventually freed by the rtnetlink layer. This should mean that `ppp` is always part of `dev`. However, I need to be absolutely sure: is there *any* scenario where `ppp->dev` could actually be NULL?
I'm focusing on this section of code *before* the proposed patch:
```c
if (pch) {
ppp = rcu_dereference(pch->ppp);
if (ppp && ppp->dev)
name = ppp->dev->name;
}
```
The worry is that removing the `ppp->dev` check could lead to a crash if, under some circumstances, `ppp->dev` *could* be NULL. But, wait... isn't `ppp` allocated as `netdev_priv(dev)`? That makes `ppp->dev` basically a pointer back to `dev` itself. And it gets initialized inside `ppp_dev_configure`. That seems pretty solid.
Still, I can't dismiss this without digging deeper. The crucial question is: could `pch->ppp` be set *before* `ppp_dev_configure` finishes? That's the only way I can see a potential problem. I need to trace back where `pch->ppp` is actually set. I'm going to follow the pointer chain to figure out how this is set before I can give the green light. Let's see...
|
| 16/2 | 2026/08/01 00:04 | tool | grepper |
0mArgs:{
"Expression": "rcu_assign_pointer\\(pch-\u003eppp",
"PathPrefix": "drivers/net/ppp/ppp_generic.c"
}Results: {
"Output": "drivers/net/ppp/ppp_generic.c=3498=ppp_connect_channel(struct channel *pch, int unit)\n--\ndrivers/net/ppp/ppp_generic.c-3539-\t++ppp-\u003en_channels;\ndrivers/net/ppp/ppp_generic.c:3540:\trcu_assign_pointer(pch-\u003eppp, ppp);\ndrivers/net/ppp/ppp_generic.c-3541-\trefcount_inc(\u0026ppp-\u003efile.refcnt);\n"
} |
| 17/2 | 2026/08/01 00:04 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 16465 output: 97 thoughts: 208 Thoughts: **Refactoring `ppp_connect_channel` - A Closer Look** Okay, so I've been digging into this `ppp_connect_channel` function and I think I've got a handle on what's going on here. Essentially, this `ppp_connect_channel` is responsible for setting up the connection, and the critical part involves getting the `ppp` structure. It uses `ppp_find_unit` to locate it, which is then added to the IDR via `ppp_unit_register`. This registration happens during `ppp_dev_configure`, meaning the `ppp` structure is fully initialized and importantly, `ppp->dev` has *already* been assigned before it's even added to the IDR. Therefore, because `ppp` is registered correctly, and initialized correctly, if `ppp` is found, `ppp->dev` can *never* be NULL. The code seems to check `if (ppp && ppp->dev)` but that looks like either defensive programming – anticipating some earlier, now-removed possibility – or perhaps just a remnant of a time when `ppp` and `dev` were managed separately. Now, the `ppp->dev` is a redundant pointer. My assessment is that removing this `ppp->dev` and replacing it with `netdev_from_priv(ppp)` is purely a structural refactoring. It's about streamlining the code and improving maintainability, but it doesn't actually alter the *functionality* of the connection process in any way. Given this understanding, I'm confident in setting `WorthFuzzing=false`. This is a clean refactor to eliminate a redundant pointer. |
| 18/2 | 2026/08/01 00:04 | tool | set-results |
0mArgs:{
"EnableConfigs": [],
"FocusSymbols": [],
"Reasoning": "The patch is a pure refactoring that removes the redundant `dev` pointer from `struct ppp` and replaces it with `netdev_from_priv(ppp)`. Since `struct ppp` is allocated as the private data of `struct net_device`, this does not change any functional logic or execution flow.",
"WorthFuzzing": false
}Results: {
"EnableConfigs": null,
"FocusSymbols": [],
"Reasoning": "The patch is a pure refactoring that removes the redundant `dev` pointer from `struct ppp` and replaces it with `netdev_from_priv(ppp)`. Since `struct ppp` is allocated as the private data of `struct net_device`, this does not change any functional logic or execution flow.",
"WorthFuzzing": false
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|